From MAILER-DAEMON Sat Aug 01 05:37:36 2009
Received: from mailman by lists.gnu.org with archive (Exim 4.43)
	id 1MXB20-0001g1-Jf
	for mharc-myserver-commit@gnu.org; Sat, 01 Aug 2009 05:37:36 -0400
Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43)
	id 1MXB1y-0001aV-40
	for myserver-commit@gnu.org; Sat, 01 Aug 2009 05:37:34 -0400
Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43)
	id 1MXB1v-0001Ux-Ve
	for myserver-commit@gnu.org; Sat, 01 Aug 2009 05:37:32 -0400
Received: from [199.232.76.173] (port=49551 helo=monty-python.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43) id 1MXB1v-0001TF-GB
	for myserver-commit@gnu.org; Sat, 01 Aug 2009 05:37:31 -0400
Received: from savannah.gnu.org ([199.232.41.3]:40840 helo=sv.gnu.org)
	by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32)
	(Exim 4.60) (envelope-from <gscrivano@gnu.org>) id 1MXB1v-0002TJ-7B
	for myserver-commit@gnu.org; Sat, 01 Aug 2009 05:37:31 -0400
Received: from download.savannah.gnu.org ([199.232.41.75]
	helo=cvs.savannah.gnu.org) by sv.gnu.org with esmtp (Exim 4.69)
	(envelope-from <gscrivano@gnu.org>) id 1MXB1u-000441-OK
	for myserver-commit@gnu.org; Sat, 01 Aug 2009 09:37:30 +0000
Received: from gscrivano by cvs.savannah.gnu.org with local (Exim 4.69)
	(envelope-from <gscrivano@savannah.gnu.org>) id 1MXB1r-00043S-VN
	for myserver-commit@gnu.org; Sat, 01 Aug 2009 09:37:30 +0000
To: myserver-commit@gnu.org
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: dde8b6efbc2a7ccc51ed0915ad1b431707120bc8
X-Git-Newrev: 2843fd3284f881233055fc58e66ed524c1061e5a
Message-Id: <E1MXB1r-00043S-VN@cvs.savannah.gnu.org>
From: Giuseppe Scrivano <gscrivano@gnu.org>
Date: Sat, 01 Aug 2009 09:37:29 +0000
X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2)
Subject: [myserver-commit] [SCM] GNU MyServer branch, master,
	updated. 2843fd3284f881233055fc58e66ed524c1061e5a
X-BeenThere: myserver-commit@gnu.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: myserver-commit.gnu.org
List-Unsubscribe: <http://lists.gnu.org/mailman/listinfo/myserver-commit>,
	<mailto:myserver-commit-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/pipermail/myserver-commit>
List-Post: <mailto:myserver-commit@gnu.org>
List-Help: <mailto:myserver-commit-request@gnu.org?subject=help>
List-Subscribe: <http://lists.gnu.org/mailman/listinfo/myserver-commit>,
	<mailto:myserver-commit-request@gnu.org?subject=subscribe>
X-List-Received-Date: Sat, 01 Aug 2009 09:37:35 -0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU MyServer".

The branch, master has been updated
       via  2843fd3284f881233055fc58e66ed524c1061e5a (commit)
       via  9243cf10d83015668c7368771fdecca11fb76bc3 (commit)
      from  dde8b6efbc2a7ccc51ed0915ad1b431707120bc8 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------


commit 2843fd3284f881233055fc58e66ed524c1061e5a
Author: Giuseppe Scrivano <gscrivano@gnu.org>
Date:   Sat Aug 1 11:27:44 2009 +0200

    Create the empty plugins/ directory.

diff --git a/misc/wingen/NSIS installer script.nsi b/misc/wingen/NSIS installer script.nsi
index 84d196e..f3c1f5c 100644
--- a/misc/wingen/NSIS installer script.nsi	
+++ b/misc/wingen/NSIS installer script.nsi	
@@ -18,7 +18,7 @@ VIAddVersionKey /LANG=${LANG_ENGLISH} "FileVersion"         "0.9.0.1"
 VIAddVersionKey /LANG=${LANG_ENGLISH} "ProductVersion"      "0.9.0.1"
 VIAddVersionKey /LANG=${LANG_ENGLISH} "InternalName"        ""
 ;VIAddVersionKey /LANG=${LANG_ENGLISH} "LegalTrademarks"    ""
-VIAddVersionKey /LANG=${LANG_ENGLISH} "OriginalFilename"    "MyServer-win32-0.9-rc1.exe"
+VIAddVersionKey /LANG=${LANG_ENGLISH} "OriginalFilename"    "MyServer-win32-0.9.exe"
 ;VIAddVersionKey /LANG=${LANG_ENGLISH} "PrivateBuild"       "1"
 ;VIAddVersionKey /LANG=${LANG_ENGLISH} "SpecialBuild"       "1"
 
@@ -196,6 +196,8 @@ Section "MyServer core" SecCore
   File "virtualhosts.xml"
   File "README"
   File "COPYING"
+
+  CreateDirectory "$INSTDIR\plugins"
   CreateDirectory "$INSTDIR\logs"
   SetOutPath $INSTDIR\web
   File "web\*.html"



commit 9243cf10d83015668c7368771fdecca11fb76bc3
Author: Giuseppe Scrivano <gscrivano@gnu.org>
Date:   Sat Aug 1 11:26:02 2009 +0200

    makeinfo generates index.html not index.htm.

diff --git a/myserver/binaries/web/default.html b/myserver/binaries/web/default.html
index 9d8556f..007c9bd 100644
--- a/myserver/binaries/web/default.html
+++ b/myserver/binaries/web/default.html
@@ -33,7 +33,7 @@ GNU MyServer examples. <a href="link.html"><img src="goto.png" alt=""
 																						style="border: 0px;" /></a>
 <br /><br />
 GNU MyServer documentation. 
-<a href="documentation/index.htm"><img src="goto.png" alt="" 
+<a href="documentation/index.html"><img src="goto.png" alt=""
 																			 style="border: 0px;" /></a>
 <br />
 <br />

-----------------------------------------------------------------------

Summary of changes:
 misc/wingen/NSIS installer script.nsi |    4 +++-
 myserver/binaries/web/default.html    |    2 +-
 2 files changed, 4 insertions(+), 2 deletions(-)


hooks/post-receive
-- 
GNU MyServer



From MAILER-DAEMON Sat Aug 01 06:28:33 2009
Received: from mailman by lists.gnu.org with archive (Exim 4.43)
	id 1MXBpI-0005Xf-RF
	for mharc-myserver-commit@gnu.org; Sat, 01 Aug 2009 06:28:33 -0400
Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43)
	id 1MXBpF-0005W0-JR
	for myserver-commit@gnu.org; Sat, 01 Aug 2009 06:28:29 -0400
Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43)
	id 1MXBpE-0005VK-Fj
	for myserver-commit@gnu.org; Sat, 01 Aug 2009 06:28:28 -0400
Received: from [199.232.76.173] (port=53372 helo=monty-python.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43) id 1MXBpD-0005Uz-Hk
	for myserver-commit@gnu.org; Sat, 01 Aug 2009 06:28:27 -0400
Received: from savannah.gnu.org ([199.232.41.3]:37938 helo=sv.gnu.org)
	by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32)
	(Exim 4.60) (envelope-from <gscrivano@gnu.org>) id 1MXBpD-0000JN-1k
	for myserver-commit@gnu.org; Sat, 01 Aug 2009 06:28:27 -0400
Received: from download.savannah.gnu.org ([199.232.41.75]
	helo=cvs.savannah.gnu.org) by sv.gnu.org with esmtp (Exim 4.69)
	(envelope-from <gscrivano@gnu.org>) id 1MXBp3-00078p-T7
	for myserver-commit@gnu.org; Sat, 01 Aug 2009 10:28:18 +0000
Received: from gscrivano by cvs.savannah.gnu.org with local (Exim 4.69)
	(envelope-from <gscrivano@savannah.gnu.org>) id 1MXBoz-00078M-8G
	for myserver-commit@gnu.org; Sat, 01 Aug 2009 10:28:17 +0000
To: myserver-commit@gnu.org
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: 2843fd3284f881233055fc58e66ed524c1061e5a
X-Git-Newrev: 43c54268b6894190bafaf46656e633a9cf994c4d
Message-Id: <E1MXBoz-00078M-8G@cvs.savannah.gnu.org>
From: Giuseppe Scrivano <gscrivano@gnu.org>
Date: Sat, 01 Aug 2009 10:28:15 +0000
X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2)
Subject: [myserver-commit] [SCM] GNU MyServer branch, master,
	updated. 43c54268b6894190bafaf46656e633a9cf994c4d
X-BeenThere: myserver-commit@gnu.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: myserver-commit.gnu.org
List-Unsubscribe: <http://lists.gnu.org/mailman/listinfo/myserver-commit>,
	<mailto:myserver-commit-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/pipermail/myserver-commit>
List-Post: <mailto:myserver-commit@gnu.org>
List-Help: <mailto:myserver-commit-request@gnu.org?subject=help>
List-Subscribe: <http://lists.gnu.org/mailman/listinfo/myserver-commit>,
	<mailto:myserver-commit-request@gnu.org?subject=subscribe>
X-List-Received-Date: Sat, 01 Aug 2009 10:28:30 -0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU MyServer".

The branch, master has been updated
       via  43c54268b6894190bafaf46656e633a9cf994c4d (commit)
      from  2843fd3284f881233055fc58e66ed524c1061e5a (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------


commit 43c54268b6894190bafaf46656e633a9cf994c4d
Author: Giuseppe Scrivano <gscrivano@gnu.org>
Date:   Sat Aug 1 12:27:53 2009 +0200

    Fix a problem when executed as NT service.

diff --git a/myserver/src/myserver.cpp b/myserver/src/myserver.cpp
index c0e7a2d..3b47053 100644
--- a/myserver/src/myserver.cpp
+++ b/myserver/src/myserver.cpp
@@ -822,7 +822,7 @@ void registerService()
   char path [MAX_PATH];
   GetCurrentDirectory(MAX_PATH,path);
   strcat(path,"\\");
-  strcat(path,"myserver.exe SERVICE");
+  strcat(path,"myserver.exe");
 
   manager = OpenSCManager(NULL,NULL,SC_MANAGER_ALL_ACCESS);
   if (manager)
@@ -877,7 +877,7 @@ void RunAsService()
   manager = OpenSCManager(NULL,NULL,SC_MANAGER_ALL_ACCESS);
   if (manager)
     {
-      service = OpenService (manager, "MyServer", SERVICE_ALL_ACCESS);
+      service = OpenService (manager, "GNU MyServer", SERVICE_ALL_ACCESS);
       if (service)
         {
           StartService(service,0,NULL);

-----------------------------------------------------------------------

Summary of changes:
 myserver/src/myserver.cpp |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)


hooks/post-receive
-- 
GNU MyServer



From MAILER-DAEMON Sat Aug 01 08:02:08 2009
Received: from mailman by lists.gnu.org with archive (Exim 4.43)
	id 1MXDHs-000897-Im
	for mharc-myserver-commit@gnu.org; Sat, 01 Aug 2009 08:02:08 -0400
Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43)
	id 1MXDHp-000878-L0
	for myserver-commit@gnu.org; Sat, 01 Aug 2009 08:02:05 -0400
Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43)
	id 1MXDHo-00086G-DD
	for myserver-commit@gnu.org; Sat, 01 Aug 2009 08:02:05 -0400
Received: from [199.232.76.173] (port=51354 helo=monty-python.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43) id 1MXDHo-000867-8d
	for myserver-commit@gnu.org; Sat, 01 Aug 2009 08:02:04 -0400
Received: from savannah.gnu.org ([199.232.41.3]:45331 helo=sv.gnu.org)
	by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32)
	(Exim 4.60) (envelope-from <gscrivano@gnu.org>) id 1MXDHn-0005F6-LE
	for myserver-commit@gnu.org; Sat, 01 Aug 2009 08:02:03 -0400
Received: from download.savannah.gnu.org ([199.232.41.75]
	helo=cvs.savannah.gnu.org) by sv.gnu.org with esmtp (Exim 4.69)
	(envelope-from <gscrivano@gnu.org>) id 1MXDHn-0005CN-8d
	for myserver-commit@gnu.org; Sat, 01 Aug 2009 12:02:03 +0000
Received: from gscrivano by cvs.savannah.gnu.org with local (Exim 4.69)
	(envelope-from <gscrivano@savannah.gnu.org>) id 1MXDHk-0005Bi-3k
	for myserver-commit@gnu.org; Sat, 01 Aug 2009 12:02:03 +0000
To: myserver-commit@gnu.org
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: 43c54268b6894190bafaf46656e633a9cf994c4d
X-Git-Newrev: 5cd7e999d26f10dcb623d9370edf353527bab2a1
Message-Id: <E1MXDHk-0005Bi-3k@cvs.savannah.gnu.org>
From: Giuseppe Scrivano <gscrivano@gnu.org>
Date: Sat, 01 Aug 2009 12:02:01 +0000
X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2)
Subject: [myserver-commit] [SCM] GNU MyServer branch, master,
	updated. 5cd7e999d26f10dcb623d9370edf353527bab2a1
X-BeenThere: myserver-commit@gnu.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: myserver-commit.gnu.org
List-Unsubscribe: <http://lists.gnu.org/mailman/listinfo/myserver-commit>,
	<mailto:myserver-commit-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/pipermail/myserver-commit>
List-Post: <mailto:myserver-commit@gnu.org>
List-Help: <mailto:myserver-commit-request@gnu.org?subject=help>
List-Subscribe: <http://lists.gnu.org/mailman/listinfo/myserver-commit>,
	<mailto:myserver-commit-request@gnu.org?subject=subscribe>
X-List-Received-Date: Sat, 01 Aug 2009 12:02:05 -0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU MyServer".

The branch, master has been updated
       via  5cd7e999d26f10dcb623d9370edf353527bab2a1 (commit)
      from  43c54268b6894190bafaf46656e633a9cf994c4d (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------


commit 5cd7e999d26f10dcb623d9370edf353527bab2a1
Author: Giuseppe Scrivano <gscrivano@gnu.org>
Date:   Sat Aug 1 14:01:18 2009 +0200

    The NT service doesn't hang when it is executed.

diff --git a/myserver/src/myserver.cpp b/myserver/src/myserver.cpp
index 3b47053..a0735a0 100644
--- a/myserver/src/myserver.cpp
+++ b/myserver/src/myserver.cpp
@@ -40,19 +40,19 @@ extern "C" {
 #define MYSERVER_RUNAS_CONSOLE 1
 #define MYSERVER_RUNAS_SERVICE 2
 
-void consoleService(string &, string &, string &, string &, string &);
+void consoleService (string &, string &, string &, string &, string &);
 
 #ifdef WIN32
-void __stdcall myServerCtrlHandler(u_long fdwControl);
-void __stdcall myServerMain (u_long , LPTSTR *argv);
-static BOOL SignalHandler(DWORD type) ;
+void __stdcall myServerCtrlHandler (u_long fdwControl);
+void __stdcall myServerMainNT (u_long , LPTSTR *argv);
+static BOOL SignalHandler (DWORD type) ;
 #else
-int  writePidfile(const char* file = NULL);
+int  writePidfile (const char* file = NULL);
 #endif
-void runService();
-void registerService();
-void removeService();
-void RunAsService();
+void runService ();
+void registerService ();
+void removeService ();
+void runAsService ();
 
 int argn;
 char **argv;
@@ -527,35 +527,36 @@ int main (int argn, char **argv)
 #else
   if(argn > 1)
     {
-      if(!strcmpi(argv[1], "VERSION"))
+      if (!strcmpi (argv[1], "VERSION"))
         {
           cout << MYSERVER_VERSION << endl;
           return 0;
         }
-      if(!strcmpi(argv[1], "CONSOLE"))
+      if (!strcmpi (argv[1], "CONSOLE"))
         {
           runas = MYSERVER_RUNAS_CONSOLE;
         }
-      if(!strcmpi(argv[1], "REGISTER"))
+      if (!strcmpi (argv[1], "REGISTER"))
         {
-          registerService();
+          registerService ();
 #ifndef ARGP
-          RunAsService();
+          runAsService ();
 #endif
           runas = MYSERVER_RUNAS_SERVICE;
           return 0;
         }
-      if(!strcmpi(argv[1], "RUNSERVICE"))
+      if (!strcmpi (argv[1], "RUNSERVICE"))
         {
-          RunAsService();
+          runAsService ();
           return 0;
         }
-      if(!strcmpi(argv[1], "UNREGISTER"))
+      if (!strcmpi (argv[1], "UNREGISTER"))
         {
-          removeService();
+          removeService ();
           runas = MYSERVER_RUNAS_SERVICE;
+          return 0;
         }
-      if(!strcmpi(argv[1], "SERVICE"))
+      if (!strcmpi (argv[1], "SERVICE"))
         {
           /*
            *Set the log file to use when in service mode.
@@ -578,24 +579,24 @@ int main (int argn, char **argv)
    */
   try
     {
-      setcwdBuffer();
-      loadConfFilesLocation(mainConf, mimeConf, vhostConf, externPath, langPath);
+      setcwdBuffer ();
+      loadConfFilesLocation (mainConf, mimeConf, vhostConf, externPath, langPath);
 
       switch(runas)
         {
         case MYSERVER_RUNAS_CONSOLE:
-          consoleService(mainConf, mimeConf, vhostConf, externPath, langPath);
+          consoleService (mainConf, mimeConf, vhostConf, externPath, langPath);
           break;
         case MYSERVER_RUNAS_SERVICE:
 #ifdef WIN32
-          runService();
+          runService ();
 #else
           /*
            *Run the daemon.
            *pid is the process ID for the forked process.
            *Fork the process.
            */
-          pid = fork();
+          pid = fork ();
 
           /*
            *An error happened, return with errors.
@@ -612,20 +613,18 @@ int main (int argn, char **argv)
                */
 #ifdef ARGP
               if(input.pidFileName)
-                writePidfile(input.pidFileName);
+                writePidfile (input.pidFileName);
               else
-                {
-                  writePidfile();
-                }
+                writePidfile();
 #else
-              writePidfile();
+              writePidfile ();
 #endif
               return 0;
             }
           /*
            *Create a SID for the new process.
            */
-          sid = setsid();
+          sid = setsid ();
    
           /*
            *Error in setting a new sid, return the error.
@@ -637,7 +636,7 @@ int main (int argn, char **argv)
           /*
            *Finally run the server from the forked process.
            */
-          consoleService(mainConf, mimeConf, vhostConf, externPath, langPath);
+          consoleService (mainConf, mimeConf, vhostConf, externPath, langPath);
 #endif
           break;
         }
@@ -709,8 +708,10 @@ SERVICE_STATUS_HANDLE   MyServiceStatusHandle;
 /*!
  *Entry-point for the NT service.
  */
-void  __stdcall myServerMain (u_long, LPTSTR*)
+void  __stdcall myServerMainNT (u_long, LPTSTR*)
 {
+  string mainConf, mimeConf, vhostConf, externPath, langPath;
+
   MyServiceStatus.dwServiceType = SERVICE_WIN32;
   MyServiceStatus.dwCurrentState = SERVICE_STOPPED;
   MyServiceStatus.dwControlsAccepted = 0;
@@ -721,7 +722,8 @@ void  __stdcall myServerMain (u_long, LPTSTR*)
 
   try
     {
-      Server::createInstance();
+      Server::createInstance ();
+
     }
   catch(...)
     {
@@ -730,7 +732,7 @@ void  __stdcall myServerMain (u_long, LPTSTR*)
     };
 
 
-  MyServiceStatusHandle = RegisterServiceCtrlHandler( "MyServer",
+  MyServiceStatusHandle = RegisterServiceCtrlHandler( "GNU MyServer",
                                                       myServerCtrlHandler );
   if(MyServiceStatusHandle)
     {
@@ -742,8 +744,9 @@ void  __stdcall myServerMain (u_long, LPTSTR*)
       MyServiceStatus.dwCurrentState = SERVICE_RUNNING;
       SetServiceStatus( MyServiceStatusHandle, &MyServiceStatus );
 
-      string null ("");
-      Server::getInstance()->start(null, null, null, null, null);
+
+      loadConfFilesLocation (mainConf, mimeConf, vhostConf, externPath, langPath);
+      Server::getInstance()->start (mainConf, mimeConf, vhostConf, externPath, langPath);
 
       MyServiceStatus.dwCurrentState = SERVICE_STOP_PENDING;
       SetServiceStatus( MyServiceStatusHandle, &MyServiceStatus );
@@ -753,6 +756,7 @@ void  __stdcall myServerMain (u_long, LPTSTR*)
       MyServiceStatus.dwCurrentState = SERVICE_STOPPED;
       SetServiceStatus( MyServiceStatusHandle, &MyServiceStatus );
     }
+
 }
 
 /*!
@@ -790,24 +794,24 @@ void __stdcall myServerCtrlHandler(u_long fdwControl)
 /*!
  *Run MyServer service.
  */
-void runService()
+void runService ()
 {
-  Server::getInstance()->logWriteln("Running service...");
+  Server::getInstance()->logWriteln ("Running service...");
 #ifdef WIN32
   SERVICE_TABLE_ENTRY serviceTable[] =
     {
-      { (CHAR*) "MyServer", myServerMain },
+      { (CHAR*) "GNU MyServer", myServerMainNT },
       { 0, 0 }
     };
 
-  if(!StartServiceCtrlDispatcher( serviceTable ))
+  if (!StartServiceCtrlDispatcher (serviceTable))
     {
-      if(GetLastError() == ERROR_INVALID_DATA)
-          Server::getInstance()->logWriteln("Invalid data");
-      else if(GetLastError() == ERROR_SERVICE_ALREADY_RUNNING)
-          Server::getInstance()->logWriteln("Already running");
+      if (GetLastError () == ERROR_INVALID_DATA)
+          Server::getInstance ()->logWriteln("Invalid data");
+      else if (GetLastError () == ERROR_SERVICE_ALREADY_RUNNING)
+          Server::getInstance ()->logWriteln("Already running");
       else
-          Server::getInstance()->logWriteln("Error running service");
+          Server::getInstance ()->logWriteln("Error running service");
     }
 #endif
 }
@@ -815,22 +819,22 @@ void runService()
 /*!
  *Register the service.
  */
-void registerService()
+void registerService ()
 {
 #ifdef WIN32
-  SC_HANDLE service,manager;
+  SC_HANDLE service, manager;
   char path [MAX_PATH];
-  GetCurrentDirectory(MAX_PATH,path);
-  strcat(path,"\\");
-  strcat(path,"myserver.exe");
+  GetCurrentDirectory (MAX_PATH, path);
+  strcat (path, "\\");
+  strcat (path, "myserver.exe SERVICE");
 
-  manager = OpenSCManager(NULL,NULL,SC_MANAGER_ALL_ACCESS);
+  manager = OpenSCManager (NULL, NULL, SC_MANAGER_ALL_ACCESS);
   if (manager)
     {
-      service = CreateService(manager,"GNU MyServer","GNU MyServer",
-                              SERVICE_ALL_ACCESS,SERVICE_WIN32_OWN_PROCESS,
-                              SERVICE_AUTO_START, SERVICE_ERROR_IGNORE, path,
-                              0, 0, 0, 0, 0);
+      service = CreateService (manager, "GNU MyServer", "GNU MyServer",
+                               SERVICE_ALL_ACCESS, SERVICE_WIN32_OWN_PROCESS,
+                               SERVICE_AUTO_START, SERVICE_ERROR_IGNORE, path,
+                               0, 0, 0, 0, 0);
       if (service)
         {
           CloseServiceHandle (service);
@@ -869,18 +873,18 @@ void removeService()
 /*!
  *Start the service.
  */
-void RunAsService()
+void runAsService ()
 {
 #ifdef WIN32
-  SC_HANDLE service,manager;
+  SC_HANDLE service, manager;
 
-  manager = OpenSCManager(NULL,NULL,SC_MANAGER_ALL_ACCESS);
+  manager = OpenSCManager (NULL,NULL,SC_MANAGER_ALL_ACCESS);
   if (manager)
     {
       service = OpenService (manager, "GNU MyServer", SERVICE_ALL_ACCESS);
       if (service)
         {
-          StartService(service,0,NULL);
+          StartService (service, 0, NULL);
 
           while (QueryServiceStatus (service, &MyServiceStatus))
             {

-----------------------------------------------------------------------

Summary of changes:
 myserver/src/myserver.cpp |  122 +++++++++++++++++++++++----------------------
 1 files changed, 63 insertions(+), 59 deletions(-)


hooks/post-receive
-- 
GNU MyServer



From MAILER-DAEMON Sat Aug 01 16:56:07 2009
Received: from mailman by lists.gnu.org with archive (Exim 4.43)
	id 1MXLcd-0004o6-Cj
	for mharc-myserver-commit@gnu.org; Sat, 01 Aug 2009 16:56:07 -0400
Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43)
	id 1MXLcb-0004lJ-8M
	for myserver-commit@gnu.org; Sat, 01 Aug 2009 16:56:05 -0400
Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43)
	id 1MXLcZ-0004hn-Ch
	for myserver-commit@gnu.org; Sat, 01 Aug 2009 16:56:03 -0400
Received: from [199.232.76.173] (port=40977 helo=monty-python.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43) id 1MXLcZ-0004hY-9p
	for myserver-commit@gnu.org; Sat, 01 Aug 2009 16:56:03 -0400
Received: from savannah.gnu.org ([199.232.41.3]:50268 helo=sv.gnu.org)
	by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32)
	(Exim 4.60) (envelope-from <gscrivano@gnu.org>) id 1MXLcY-00053N-Lo
	for myserver-commit@gnu.org; Sat, 01 Aug 2009 16:56:03 -0400
Received: from download.savannah.gnu.org ([199.232.41.75]
	helo=cvs.savannah.gnu.org) by sv.gnu.org with esmtp (Exim 4.69)
	(envelope-from <gscrivano@gnu.org>) id 1MXLcY-0006dL-5R
	for myserver-commit@gnu.org; Sat, 01 Aug 2009 20:56:02 +0000
Received: from gscrivano by cvs.savannah.gnu.org with local (Exim 4.69)
	(envelope-from <gscrivano@savannah.gnu.org>) id 1MXLcU-0006c9-U0
	for myserver-commit@gnu.org; Sat, 01 Aug 2009 20:56:02 +0000
To: myserver-commit@gnu.org
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: 5cd7e999d26f10dcb623d9370edf353527bab2a1
X-Git-Newrev: 8fe2ee5ff7da322945a84c44f7c06fdfdcaeeb4f
Message-Id: <E1MXLcU-0006c9-U0@cvs.savannah.gnu.org>
From: Giuseppe Scrivano <gscrivano@gnu.org>
Date: Sat, 01 Aug 2009 20:56:00 +0000
X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2)
Subject: [myserver-commit] [SCM] GNU MyServer branch, master,
	updated. 8fe2ee5ff7da322945a84c44f7c06fdfdcaeeb4f
X-BeenThere: myserver-commit@gnu.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: myserver-commit.gnu.org
List-Unsubscribe: <http://lists.gnu.org/mailman/listinfo/myserver-commit>,
	<mailto:myserver-commit-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/pipermail/myserver-commit>
List-Post: <mailto:myserver-commit@gnu.org>
List-Help: <mailto:myserver-commit-request@gnu.org?subject=help>
List-Subscribe: <http://lists.gnu.org/mailman/listinfo/myserver-commit>,
	<mailto:myserver-commit-request@gnu.org?subject=subscribe>
X-List-Received-Date: Sat, 01 Aug 2009 20:56:05 -0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU MyServer".

The branch, master has been updated
       via  8fe2ee5ff7da322945a84c44f7c06fdfdcaeeb4f (commit)
      from  5cd7e999d26f10dcb623d9370edf353527bab2a1 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------


commit 8fe2ee5ff7da322945a84c44f7c06fdfdcaeeb4f
Author: Giuseppe Scrivano <gscrivano@gnu.org>
Date:   Sat Aug 1 21:48:53 2009 +0200

    Code refactoring: changed code formatting

diff --git a/myserver/src/http_handler/cgi/cgi.cpp b/myserver/src/http_handler/cgi/cgi.cpp
index 140a412..fd9dafa 100644
--- a/myserver/src/http_handler/cgi/cgi.cpp
+++ b/myserver/src/http_handler/cgi/cgi.cpp
@@ -53,8 +53,8 @@ using namespace std;
  *\param execute Specify if the script has to be executed.
  *\param onlyHeader Specify if send only the HTTP header.
  */
-int Cgi::send(HttpThreadContext* td, const char* scriptpath,
-              const char *cgipath, bool execute, bool onlyHeader)
+int Cgi::send (HttpThreadContext* td, const char* scriptpath,
+               const char *cgipath, bool execute, bool onlyHeader)
 {
    /* 
    *Use this flag to check if the CGI executable is 
@@ -90,13 +90,13 @@ int Cgi::send(HttpThreadContext* td, const char* scriptpath,
   
   int subString = cgipath[0] == '"';
   /* Do not modify the text between " and ".  */
-  for(i = 1; i < len; i++)
-  {
-    if(!subString && cgipath[i] == ' ')
-      break;
-    if(cgipath[i] == '"' && cgipath[i - 1] != '\\')
-      subString = !subString;
-  }
+  for (i = 1; i < len; i++)
+    {
+      if (!subString && cgipath[i] == ' ')
+        break;
+      if (cgipath[i] == '"' && cgipath[i - 1] != '\\')
+        subString = !subString;
+    }
 
   /*
    *Save the cgi path and the possible arguments.
@@ -104,172 +104,170 @@ int Cgi::send(HttpThreadContext* td, const char* scriptpath,
    *If the cgipath is enclosed between " and " do not consider them 
    *when splitting directory and file name.
    */
-  if(i < len)
-  {
-    string tmpString(cgipath);
-    int begin = tmpString[0] == '"' ? 1 : 0;
-    int end   = tmpString[i] == '"' ? i : i - 1;
-    tmpCgiPath.assign(tmpString.substr(begin, end - 1));
-    moreArg.assign(tmpString.substr(i, len - 1));  
-  }
+  if (i < len)
+    {
+      string tmpString (cgipath);
+      int begin = tmpString[0] == '"' ? 1 : 0;
+      int end   = tmpString[i] == '"' ? i : i - 1;
+      tmpCgiPath.assign (tmpString.substr (begin, end - 1));
+      moreArg.assign (tmpString.substr (i, len - 1));
+    }
   else
-  {
-    int begin = (cgipath[0] == '"') ? 1 : 0;
-    int end   = (cgipath[len] == '"') ? len-1 : len;
-    tmpCgiPath.assign(&cgipath[begin], end-begin);
-    moreArg.assign("");
-  }
-  FilesUtility::splitPath(tmpCgiPath, td->cgiRoot, td->cgiFile);
+    {
+      int begin = (cgipath[0] == '"') ? 1 : 0;
+      int end   = (cgipath[len] == '"') ? len-1 : len;
+      tmpCgiPath.assign (&cgipath[begin], end-begin);
+      moreArg.assign ("");
+    }
+  FilesUtility::splitPath (tmpCgiPath, td->cgiRoot, td->cgiFile);
     
-  tmpScriptPath.assign(scriptpath);
-  FilesUtility::splitPath(tmpScriptPath, td->scriptDir, td->scriptFile);
+  tmpScriptPath.assign (scriptpath);
+  FilesUtility::splitPath (tmpScriptPath, td->scriptDir, td->scriptFile);
 
-  chain.setProtocol(td->http);
-  chain.setProtocolData(td);
-  chain.setStream(td->connection->socket);
+  chain.setProtocol (td->http);
+  chain.setProtocolData (td);
+  chain.setStream (td->connection->socket);
   
-  if(execute)
-  {
-    const char *args = 0;
-    if(td->request.uriOpts.length())
-      args = td->request.uriOpts.c_str();
-    else if(td->pathInfo.length())
-      args = &td->pathInfo[1];
-    
-    if(cgipath && strlen(cgipath))
-      cmdLine << tmpCgiPath << " " << moreArg << " " 
+  if (execute)
+    {
+      const char *args = 0;
+      if(td->request.uriOpts.length())
+        args = td->request.uriOpts.c_str();
+      else if (td->pathInfo.length())
+        args = &td->pathInfo[1];
+
+    if (cgipath && strlen(cgipath))
+      cmdLine << tmpCgiPath << " " << moreArg << " "
               << td->scriptFile <<  (args ? args : "" ) ;
     else
       cmdLine << tmpScriptPath << moreArg << " " << (args ? args : "" );
 
-    nph = td->scriptFile.length() > 4 && td->scriptFile[0] == 'n'
-      && td->scriptFile[1] == 'p' && td->scriptFile[2] == 'h' 
+    nph = td->scriptFile.length () > 4 && td->scriptFile[0] == 'n'
+      && td->scriptFile[1] == 'p' && td->scriptFile[2] == 'h'
       && td->scriptFile[3] == '-' ;
 
-    if(cgipath && strlen(cgipath))
-    {
-      spi.cmd.assign(tmpCgiPath);
-      spi.arg.append(" ");
-      spi.arg.assign(moreArg);
-      spi.arg.append(" ");
-      spi.arg.append(td->scriptFile);
-
-      if(args)
+    if (cgipath && strlen(cgipath))
       {
-        spi.arg.append(" ");
-        spi.arg.append(args);
+        spi.cmd.assign (tmpCgiPath);
+        spi.arg.append (" ");
+        spi.arg.assign (moreArg);
+        spi.arg.append (" ");
+        spi.arg.append (td->scriptFile);
+
+        if (args)
+          {
+            spi.arg.append (" ");
+            spi.arg.append (args);
+          }
       }
-    }
     else
-    {
-      spi.cmd.assign(scriptpath);
-      spi.arg.assign(moreArg);
-      if(args)
       {
-        spi.arg.append(" ");
-        spi.arg.append(args);
-      }
+      spi.cmd.assign (scriptpath);
+      spi.arg.assign (moreArg);
+
+      if (args)
+        {
+          spi.arg.append (" ");
+          spi.arg.append (args);
+        }
+    }
     }
-
-  }
   else
-  {
-    if (!FilesUtility::fileExists (tmpCgiPath.c_str ()))
     {
-      if(tmpCgiPath.length() > 0)
-      {
-        string msg;
-        msg.assign("Cgi: Cannot find the ");
-        msg.append(tmpCgiPath);
-        msg.append(" executable");
-        td->connection->host->warningsLogWrite(msg.c_str());
-      }
-      else
-      {
-        td->connection->host->warningsLogWrite(
-                                    "Cgi: Executable file not specified");
-      }
-      td->scriptPath.assign("");
-      td->scriptFile.assign("");
-      td->scriptDir.assign("");
-      chain.clearAllFilters(); 
-      return td->http->raiseHTTPError(500);
-    }
-
-    spi.arg.assign(moreArg);
-    spi.arg.append(" ");
-    spi.arg.append(td->scriptFile);    
+      if (!FilesUtility::fileExists (tmpCgiPath.c_str ()))
+        {
+          if (tmpCgiPath.length() > 0)
+            {
+              string msg;
+              msg.assign ("Cgi: Cannot find the ");
+              msg.append (tmpCgiPath);
+              msg.append (" executable");
+              td->connection->host->warningsLogWrite (msg.c_str ());
+            }
+          else
+            {
+              td->connection->host->warningsLogWrite(
+                             "Cgi: Executable file not specified");
+            }
+          td->scriptPath.assign ("");
+          td->scriptFile.assign ("");
+          td->scriptDir.assign ("");
+          chain.clearAllFilters ();
+          return td->http->raiseHTTPError (500);
+        }
+
+      spi.arg.assign (moreArg);
+      spi.arg.append (" ");
+      spi.arg.append (td->scriptFile);    
     
-    cmdLine << "\"" << td->cgiRoot << "/" << td->cgiFile << "\" " 
+    cmdLine << "\"" << td->cgiRoot << "/" << td->cgiFile << "\" "
             << moreArg << " " << td->scriptFile;
   
-    spi.cmd.assign(td->cgiRoot);
-    spi.cmd.append("/");
-    spi.cmd.append(td->cgiFile);
-    
-    if(td->cgiFile.length() > 4 && td->cgiFile[0] == 'n'  
-       && td->cgiFile[1] == 'p' && td->cgiFile[2] == 'h' 
-       && td->cgiFile[3] == '-' )
+    spi.cmd.assign (td->cgiRoot);
+    spi.cmd.append ("/");
+    spi.cmd.append (td->cgiFile);
+
+    if (td->cgiFile.length() > 4 && td->cgiFile[0] == 'n'  
+        && td->cgiFile[1] == 'p' && td->cgiFile[2] == 'h' 
+        && td->cgiFile[3] == '-' )
       nph = true;
     else
       nph = false;
-  }
+    }
 
   /*
    *Open the stdout file for the new CGI process. 
    */
-  if(stdOutFile.create())
-  {
-    td->connection->host->warningsLogWrite
-                          ("Cgi: Cannot create CGI stdout file");
-    chain.clearAllFilters(); 
-    return td->http->raiseHTTPError(500);
-  }
+  if (stdOutFile.create())
+    {
+      td->connection->host->warningsLogWrite
+        ("Cgi: Cannot create CGI stdout file");
+      chain.clearAllFilters ();
+      return td->http->raiseHTTPError (500);
+    }
 
-  /*! Open the stdin file for the new CGI process. */
-  if(stdInFile.openFile(td->inputDataPath, 
-                        File::READ | File::FILE_OPEN_ALWAYS))
-  {
-    td->connection->host->warningsLogWrite("Cgi: Cannot open CGI stdin file.");
-    stdOutFile.close();
-    chain.clearAllFilters(); 
-    return td->http->raiseHTTPError(500);
-  }
+  /* Open the stdin file for the new CGI process. */
+  if (stdInFile.openFile(td->inputDataPath,
+                         File::READ | File::FILE_OPEN_ALWAYS))
+    {
+      td->connection->host->warningsLogWrite ("Cgi: Cannot open CGI stdin file.");
+      stdOutFile.close ();
+      chain.clearAllFilters ();
+      return td->http->raiseHTTPError (500);
+    }
   
   /*
    *Build the environment string used by the CGI process.
    *Use the td->secondaryBuffer to build the environment string.
    */
-  (td->secondaryBuffer->getBuffer())[0] = '\0';
-  Env::buildEnvironmentString(td, td->secondaryBuffer->getBuffer());
+  (td->secondaryBuffer->getBuffer ())[0] = '\0';
+  Env::buildEnvironmentString (td, td->secondaryBuffer->getBuffer ());
   
-  spi.cmdLine = cmdLine.str();
-  spi.cwd.assign(td->scriptDir);
+  spi.cmdLine = cmdLine.str ();
+  spi.cwd.assign (td->scriptDir);
 
   spi.gid =  atoi (td->securityToken.getHashedData ("cgi.gid", MYSERVER_VHOST_CONF |
                                                     MYSERVER_MIME_CONF |
                                                     MYSERVER_SECURITY_CONF |
                                                     MYSERVER_SERVER_CONF, "0"));
-
   spi.uid =  atoi (td->securityToken.getHashedData ("cgi.uid", MYSERVER_VHOST_CONF |
                                                     MYSERVER_MIME_CONF |
                                                     MYSERVER_SECURITY_CONF |
                                                     MYSERVER_SERVER_CONF, "0"));
 
-
-  spi.stdError = (FileHandle) stdOutFile.getWriteHandle();
-  spi.stdIn = (FileHandle) stdInFile.getHandle();
+  spi.stdError = (FileHandle) stdOutFile.getWriteHandle ();
+  spi.stdIn = (FileHandle) stdInFile.getHandle ();
   spi.stdOut = (FileHandle) stdOutFile.getWriteHandle();
   spi.envString = td->secondaryBuffer->getBuffer();
-  
-  if(spi.stdError ==  (FileHandle)-1 || 
-       spi.stdIn == (FileHandle)-1 || 
-       spi.stdOut == (FileHandle)-1)
+
+  if (spi.stdError == (FileHandle) -1 ||
+      spi.stdIn == (FileHandle) -1 ||
+      spi.stdOut == (FileHandle) -1)
   {
-    td->connection->host->warningsLogWrite("Cgi: Invalid file handler.");
-    stdOutFile.close();
-    chain.clearAllFilters(); 
-    return td->http->raiseHTTPError(500);
+    td->connection->host->warningsLogWrite ("Cgi: Invalid file handler.");
+    stdOutFile.close ();
+    chain.clearAllFilters ();
+    return td->http->raiseHTTPError (500);
   }
 
   /* Execute the CGI process. */
@@ -297,28 +295,25 @@ int Cgi::send(HttpThreadContext* td, const char* scriptpath,
       stdOutFile.close();
       td->connection->host->warningsLogWrite
                                        ("Cgi: Error in the CGI execution");
-      chain.clearAllFilters(); 
-      return td->http->raiseHTTPError(500);
+      chain.clearAllFilters ();
+      return td->http->raiseHTTPError (500);
       }
     /* Close the write stream of the pipe on the server.  */
-    stdOutFile.closeWrite();  
+    stdOutFile.closeWrite ();
   }
 
   int ret = sendData (td, stdOutFile, chain, cgiProc, onlyHeader, nph);
 
-  stdOutFile.close();
-  stdInFile.close();
-  cgiProc.terminateProcess();
-  chain.clearAllFilters(); 
-
-
-  chain.clearAllFilters();   
+  stdOutFile.close ();
+  stdInFile.close ();
+  cgiProc.terminateProcess ();
+  chain.clearAllFilters ();
 
   cgiProc.terminateProcess();
 
   /* Delete the file only if it was created by the CGI module.  */
-  if(!td->inputData.getHandle())
-    FilesUtility::deleteFile(td->inputDataPath.c_str());
+  if (!td->inputData.getHandle ())
+    FilesUtility::deleteFile (td->inputDataPath.c_str ());
 
   return ret;
 }
@@ -338,33 +333,29 @@ int Cgi::sendData (HttpThreadContext* td, Pipe &stdOutFile, FiltersChain& chain,
   int ret = 0;
 
   /* Reset the secondaryBuffer length counter. */
-  td->secondaryBuffer->setLength(0);
+  td->secondaryBuffer->setLength (0);
 
-  procStartTime = getTicks();
+  procStartTime = getTicks ();
 
-  checkDataChunks(td, &keepalive, &useChunks);
+  checkDataChunks (td, &keepalive, &useChunks);
 
-  if (sendHeader (td, stdOutFile, chain, cgiProc, onlyHeader, nph, procStartTime, keepalive, useChunks, &ret))
-  {
+  if (sendHeader (td, stdOutFile, chain, cgiProc, onlyHeader, nph,
+                  procStartTime, keepalive, useChunks, &ret))
     return ret;
-  }
 
-  if(!nph && onlyHeader)
-  {
+  if (!nph && onlyHeader)
     return 1;
-  }
-
 
   /* Create the output filters chain.  */
-  if(td->mime && Server::getInstance()->getFiltersFactory()->chain(&chain,
-                                                                   td->mime->filters, 
-                                                                   td->connection->socket, 
-                                                                   &nbw, 
-                                                                   1))
-  {
-    td->connection->host->warningsLogWrite("Cgi: Error loading filters");
-    return td->http->raiseHTTPError(500);
-  }
+  if (td->mime && Server::getInstance()->getFiltersFactory()->chain(&chain,
+                                                                    td->mime->filters,
+                                                                    td->connection->socket,
+                                                                    &nbw,
+                                                                    1))
+    {
+      td->connection->host->warningsLogWrite("Cgi: Error loading filters");
+      return td->http->raiseHTTPError(500);
+    }
 
   if (td->response.getStatusType () == HttpResponseHeader::SUCCESSFUL)
   {
@@ -377,26 +368,24 @@ int Cgi::sendData (HttpThreadContext* td, Pipe &stdOutFile, FiltersChain& chain,
       u_long timeout = td->http->getTimeout ();
       if (ticks >= timeout ||
           stdOutFile.waitForData ((timeout - ticks) / 1000, (timeout - ticks) % 1000) == 0)
-      {
-        ostringstream msg;
-        msg << "Cgi: timeout for process " << cgiProc.getPid();
-        td->connection->host->warningsLogWrite (msg.str ().c_str ());
-        break;
-      }
+        {
+          ostringstream msg;
+          msg << "Cgi: timeout for process " << cgiProc.getPid();
+          td->connection->host->warningsLogWrite (msg.str ().c_str ());
+          break;
+        }
 
-      aliveProcess = !(stdOutFile.pipeTerminated ());
+      aliveProcess = !stdOutFile.pipeTerminated ();
 
       /* Read data from the process standard output file.  */
-      if (stdOutFile.read(td->secondaryBuffer->getBuffer (), 
-                          td->secondaryBuffer->getRealLength (), 
-                          &nBytesRead))
-      {
-        return 0;      
-      }
-      
+      if (stdOutFile.read (td->secondaryBuffer->getBuffer (),
+                           td->secondaryBuffer->getRealLength (),
+                           &nBytesRead))
+        return 0;
+
       if (!aliveProcess && !nBytesRead)
         break;
-      
+
       if (nBytesRead && 
           HttpDataHandler::appendDataToHTTPChannel (td, 
                                                     td->secondaryBuffer->getBuffer(),
@@ -405,24 +394,18 @@ int Cgi::sendData (HttpThreadContext* td, Pipe &stdOutFile, FiltersChain& chain,
                                                     &chain,
                                                     td->appendOutputs, 
                                                     useChunks))
-      {
         return 0;       
-      }
       
       nbw += nBytesRead;
     }
-  
-  
+
     /* Send the last null chunk if needed.  */
-    if(useChunks && chain.getStream ()->write("0\r\n\r\n", 5, &nbw2))
-    {
+    if(useChunks && chain.getStream ()->write ("0\r\n\r\n", 5, &nbw2))
       return 0;       
-    }
   }
 
   /* Update the Content-Length field for logging activity.  */
   td->sentData += nbw;
-  
   return 1;  
 }
 
@@ -440,18 +423,19 @@ int Cgi::sendHeader (HttpThreadContext* td, Pipe &stdOutFile, FiltersChain& chai
   u_long nbw = 0;
   u_long nBytesRead;
   /* Parse initial chunks of data looking for the HTTP header.  */
-  while(!headerCompleted && !nph)
+  while (!headerCompleted && !nph)
   {
     u_long timeout = td->http->getTimeout ();
-    u_long ticks = getTicks() - procStartTime;
+    u_long ticks = getTicks () - procStartTime;
     bool term;
+
     nBytesRead = 0;
     /* Do not try to read using a small buffer as this has some
        bad influence on the performances.  */
-    if(td->secondaryBuffer->getRealLength() - headerOffset - 1 < 512)
+    if (td->secondaryBuffer->getRealLength() - headerOffset - 1 < 512)
       break;
     
-    term = stdOutFile.pipeTerminated();
+    term = stdOutFile.pipeTerminated ();
 
     if (!term && 
         stdOutFile.waitForData ((timeout - ticks) / 1000, (timeout - ticks) % 1000) == 0)
@@ -462,121 +446,115 @@ int Cgi::sendHeader (HttpThreadContext* td, Pipe &stdOutFile, FiltersChain& chai
       break;
     }
 
-    if (stdOutFile.read (td->secondaryBuffer->getBuffer() + headerOffset, 
-                         td->secondaryBuffer->getRealLength() - headerOffset - 1, 
+    if (stdOutFile.read (td->secondaryBuffer->getBuffer() + headerOffset,
+                         td->secondaryBuffer->getRealLength() - headerOffset - 1,
                          &nBytesRead))
-    {
-      *ret = td->http->raiseHTTPError(500);
-      return 1;
-    }
-      
-    if (nBytesRead == 0 && term)
-    {
-      headerCompleted = true;
-      headerSize = 0;
-      break;
-    }
-
-    headerOffset += nBytesRead;
-
-    if(headerOffset > td->secondaryBufferSize - 5)
-      (td->secondaryBuffer->getBuffer())[headerOffset] = '\0';
-    
-    if(headerOffset == 0)
-    {
-      *ret = td->http->raiseHTTPError(500);
-      return 1;
-    }
-
-    for(u_long i = std::max(0, (int)headerOffset - (int)nBytesRead - 10); 
-        i < headerOffset; i++)
-    {
-      char *buff = td->secondaryBuffer->getBuffer();
-      if( (buff[i] == '\r') && (buff[i+1] == '\n') 
-          && (buff[i+2] == '\r') && (buff[i+3] == '\n') )
       {
-        /*
-         *The HTTP header ends with a \r\n\r\n sequence so 
-         *determine where it ends and set the header size
-         *to i + 4.
-         */
-        headerSize = i + 4 ;
-        headerCompleted = true;
-        break;
+        *ret = td->http->raiseHTTPError(500);
+        return 1;
       }
-      else if((buff[i] == '\n') && (buff[i+1] == '\n'))
+
+    if (nBytesRead == 0 && term)
       {
-        /*
-         *\n\n case.
-         */
-        headerSize = i + 2;
         headerCompleted = true;
+        headerSize = 0;
         break;
       }
-    }
-  }
 
-  /* Send the header.  */
-  if(!nph)
-  {
-    if(keepalive)
-      td->response.connection.assign("keep-alive");
-
-    /* Send the header.  */
-    if(headerSize)
-      HttpHeaders::buildHTTPResponseHeaderStruct(td->secondaryBuffer->getBuffer(),
-                                                 &td->response, 
-                                                 &(td->nBytesToRead));
-    /*
-     *If we have not to append the output send data 
-     *directly to the client.  
-     */
-    if(!td->appendOutputs)
-    {
-      string* location = td->response.getValue("Location", 0);
+    headerOffset += nBytesRead;
 
-      /*
-       *If it is present Location: foo in the header 
-       *send a redirect to `foo'.  
-       */
-      if(location && location->length())
+    if (headerOffset > td->secondaryBufferSize - 5)
+      (td->secondaryBuffer->getBuffer ())[headerOffset] = '\0';
+
+    if(headerOffset == 0)
       {
-        *ret = td->http->sendHTTPRedirect(location->c_str());
+        *ret = td->http->raiseHTTPError(500);
         return 1;
       }
 
-      u_long hdrLen = HttpHeaders::buildHTTPResponseHeader(td->buffer->getBuffer(),
-                                                           &td->response);
-
-      td->buffer->setLength(hdrLen);
-
-      if (chain.getStream ()->write(td->buffer->getBuffer(),
-                                    static_cast<int> (td->buffer->getLength()),
-                                    &nbw))
+    for (u_long i = std::max(0, (int)headerOffset - (int)nBytesRead - 10);
+         i < headerOffset; i++)
       {
-        *ret = 0;
-        return 1;
+        char *buff = td->secondaryBuffer->getBuffer();
+        if( (buff[i] == '\r') && (buff[i+1] == '\n')
+            && (buff[i+2] == '\r') && (buff[i+3] == '\n') )
+          {
+            /*
+             *The HTTP header ends with a \r\n\r\n sequence so
+             *determine where it ends and set the header size
+             *to i + 4.
+             */
+            headerSize = i + 4 ;
+            headerCompleted = true;
+            break;
+          }
+        else if ((buff[i] == '\n') && (buff[i+1] == '\n'))
+          {
+            /*
+             *\n\n case.
+             */
+            headerSize = i + 2;
+            headerCompleted = true;
+            break;
+          }
       }
-    }
   }
 
-  if(headerOffset - headerSize)
-  {
-    /* Flush the buffer.  Data from the header parsing can be present.  */
-    if(HttpDataHandler::appendDataToHTTPChannel(td, 
-                                                td->secondaryBuffer->getBuffer() + headerSize, 
-                                                headerOffset - headerSize,
-                                                &(td->outputData),
-                                                &chain,
-                                                td->appendOutputs, 
-                                                useChunks))
+  /* Send the header.  */
+  if (!nph)
     {
-      return 0;    
+      if (keepalive)
+        td->response.connection.assign ("keep-alive");
+
+      /* Send the header.  */
+      if (headerSize)
+        HttpHeaders::buildHTTPResponseHeaderStruct (td->secondaryBuffer->getBuffer(),
+                                                    &td->response,
+                                                    &(td->nBytesToRead));
+      /*
+       *If we have not to append the output send data
+       *directly to the client.
+       */
+      if (!td->appendOutputs)
+        {
+          string* location = td->response.getValue ("Location", 0);
+
+          /* If it is present Location: foo in the header send a redirect to `foo'.  */
+          if (location && location->length ())
+            {
+              *ret = td->http->sendHTTPRedirect (location->c_str ());
+              return 1;
+            }
+
+          u_long hdrLen = HttpHeaders::buildHTTPResponseHeader (td->buffer->getBuffer (),
+                                                                &td->response);
+
+          td->buffer->setLength (hdrLen);
+
+          if (chain.getStream ()->write (td->buffer->getBuffer (),
+                                         static_cast<int> (td->buffer->getLength ()),
+                                         &nbw))
+            {
+              *ret = 0;
+              return 1;
+            }
+        }
     }
 
-    td->sentData += headerOffset - headerSize;
-  }
+  if (headerOffset - headerSize)
+    {
+      /* Flush the buffer.  Data from the header parsing can be present.  */
+      if (HttpDataHandler::appendDataToHTTPChannel (td,
+                                                    td->secondaryBuffer->getBuffer () + headerSize,
+                                                    headerOffset - headerSize,
+                                                    &(td->outputData),
+                                                    &chain,
+                                                    td->appendOutputs,
+                                                    useChunks))
+        return 0;
 
+      td->sentData += headerOffset - headerSize;
+    }
 
   return 0;
 }

-----------------------------------------------------------------------

Summary of changes:
 myserver/src/http_handler/cgi/cgi.cpp |  538 ++++++++++++++++-----------------
 1 files changed, 258 insertions(+), 280 deletions(-)


hooks/post-receive
-- 
GNU MyServer



From MAILER-DAEMON Sun Aug 02 07:02:53 2009
Received: from mailman by lists.gnu.org with archive (Exim 4.43)
	id 1MXYq5-0002TX-9O
	for mharc-myserver-commit@gnu.org; Sun, 02 Aug 2009 07:02:53 -0400
Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43)
	id 1MXYq2-0002R3-AM
	for myserver-commit@gnu.org; Sun, 02 Aug 2009 07:02:50 -0400
Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43)
	id 1MXYpx-0002NA-Ph
	for myserver-commit@gnu.org; Sun, 02 Aug 2009 07:02:49 -0400
Received: from [199.232.76.173] (port=33928 helo=monty-python.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43) id 1MXYpx-0002N1-1Y
	for myserver-commit@gnu.org; Sun, 02 Aug 2009 07:02:45 -0400
Received: from savannah.gnu.org ([199.232.41.3]:45184 helo=sv.gnu.org)
	by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32)
	(Exim 4.60) (envelope-from <gscrivano@gnu.org>) id 1MXYpv-0000RE-Kb
	for myserver-commit@gnu.org; Sun, 02 Aug 2009 07:02:44 -0400
Received: from download.savannah.gnu.org ([199.232.41.75]
	helo=cvs.savannah.gnu.org) by sv.gnu.org with esmtp (Exim 4.69)
	(envelope-from <gscrivano@gnu.org>) id 1MXYpv-0001JA-2r
	for myserver-commit@gnu.org; Sun, 02 Aug 2009 11:02:43 +0000
Received: from gscrivano by cvs.savannah.gnu.org with local (Exim 4.69)
	(envelope-from <gscrivano@savannah.gnu.org>) id 1MXYps-0001Ia-Ku
	for myserver-commit@gnu.org; Sun, 02 Aug 2009 11:02:43 +0000
To: myserver-commit@gnu.org
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: 8fe2ee5ff7da322945a84c44f7c06fdfdcaeeb4f
X-Git-Newrev: b9fbdcecc5bccd3e9f027201557eaa656194319d
Message-Id: <E1MXYps-0001Ia-Ku@cvs.savannah.gnu.org>
From: Giuseppe Scrivano <gscrivano@gnu.org>
Date: Sun, 02 Aug 2009 11:02:41 +0000
X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2)
Subject: [myserver-commit] [SCM] GNU MyServer branch, master,
	updated. b9fbdcecc5bccd3e9f027201557eaa656194319d
X-BeenThere: myserver-commit@gnu.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: myserver-commit.gnu.org
List-Unsubscribe: <http://lists.gnu.org/mailman/listinfo/myserver-commit>,
	<mailto:myserver-commit-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/pipermail/myserver-commit>
List-Post: <mailto:myserver-commit@gnu.org>
List-Help: <mailto:myserver-commit-request@gnu.org?subject=help>
List-Subscribe: <http://lists.gnu.org/mailman/listinfo/myserver-commit>,
	<mailto:myserver-commit-request@gnu.org?subject=subscribe>
X-List-Received-Date: Sun, 02 Aug 2009 11:02:51 -0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU MyServer".

The branch, master has been updated
       via  b9fbdcecc5bccd3e9f027201557eaa656194319d (commit)
       via  e3a9db94e29ba31a5312a5896bb49de8c97bf6ce (commit)
       via  f13e2b6d1fb952d4684eb6f12def7b9cf73fb44e (commit)
      from  8fe2ee5ff7da322945a84c44f7c06fdfdcaeeb4f (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------


commit b9fbdcecc5bccd3e9f027201557eaa656194319d
Author: Giuseppe Scrivano <gscrivano@gnu.org>
Date:   Sun Aug 2 12:15:58 2009 +0200

    Use socklen_t instead of int as parameter type to Socket::accept.

diff --git a/myserver/include/base/socket/socket.h b/myserver/include/base/socket/socket.h
index f3f5771..5d9ccf5 100644
--- a/myserver/include/base/socket/socket.h
+++ b/myserver/include/base/socket/socket.h
@@ -89,7 +89,7 @@ public:
   Socket(Socket*);
   Socket(SocketHandle);
 
-  Socket accept(MYSERVER_SOCKADDR*, int*);
+  Socket accept(MYSERVER_SOCKADDR*, socklen_t*);
   int setsockopt(int,int, const char*,int);
 
   virtual int connect(MYSERVER_SOCKADDR*, int);
diff --git a/myserver/src/base/socket/socket.cpp b/myserver/src/base/socket/socket.cpp
index 7664dff..49d84fe 100644
--- a/myserver/src/base/socket/socket.cpp
+++ b/myserver/src/base/socket/socket.cpp
@@ -197,7 +197,7 @@ int Socket::listen(int max)
 /*!
  *Accept a new connection.
  */
-Socket Socket::accept(MYSERVER_SOCKADDR* sa, int* sockaddrlen)
+Socket Socket::accept(MYSERVER_SOCKADDR* sa, socklen_t* sockaddrlen)
 {
   Socket s;
 
diff --git a/myserver/src/base/unix_socket/unix_socket.cpp b/myserver/src/base/unix_socket/unix_socket.cpp
index af63545..8cd55ca 100644
--- a/myserver/src/base/unix_socket/unix_socket.cpp
+++ b/myserver/src/base/unix_socket/unix_socket.cpp
@@ -113,7 +113,7 @@ Socket UnixSocket::accept ()
 
 #ifdef AF_UNIX
   sockaddr_un addr;
-  int len = sizeof (addr);
+  socklen_t len = sizeof (addr);
   return Socket::accept ((MYSERVER_SOCKADDR*)&addr, &len);
 #else
   Socket s;
diff --git a/myserver/src/connections_scheduler/connections_scheduler.cpp b/myserver/src/connections_scheduler/connections_scheduler.cpp
index 865bc91..803dc6e 100644
--- a/myserver/src/connections_scheduler/connections_scheduler.cpp
+++ b/myserver/src/connections_scheduler/connections_scheduler.cpp
@@ -135,25 +135,21 @@ static void listenerHandler (int fd, short event, void *arg)
   ConnectionsScheduler::ListenerArg* s = (ConnectionsScheduler::ListenerArg*)arg;
 
   if (event == EV_TIMEOUT)
-  {
     event_add (&(s->ev), &tv);
-  }
   else if (event == EV_READ)
-  {
-    MYSERVER_SOCKADDRIN asockIn;
-    int asockInLen = 0;
-    Socket asock;
+    {
+      MYSERVER_SOCKADDRIN asockIn;
+      socklen_t asockInLen = 0;
+      Socket clientSock;
 
-    asockInLen = sizeof (asockIn);
-    asock = s->serverSocket->accept (&asockIn, &asockInLen);
+      asockInLen = sizeof (asockIn);
+      clientSock = s->serverSocket->accept (&asockIn, &asockInLen);
 
-    if (s->server && (SocketHandle)asock.getHandle() != INVALID_SOCKET)
-    {
-      s->server->addConnection (asock, &asockIn);
-    }
+      if (s->server && (SocketHandle)clientSock.getHandle () != INVALID_SOCKET)
+        s->server->addConnection (clientSock, &asockIn);
 
-    event_add (&(s->ev), &tv);
-  }
+      event_add (&(s->ev), &tv);
+    }
 }
 
 /*!
diff --git a/myserver/src/protocol/ftp/ftp.cpp b/myserver/src/protocol/ftp/ftp.cpp
index 23e13d0..567e22b 100755
--- a/myserver/src/protocol/ftp/ftp.cpp
+++ b/myserver/src/protocol/ftp/ftp.cpp
@@ -582,15 +582,14 @@ void Ftp::pasv ()
   timeoutvalue = 5;
 #endif
   MYSERVER_SOCKADDRIN asockIn;
-  int asockInLen = 0;
+  socklen_t asockInLen = 0;
   Socket asock;
   if (pFtpuserData->m_pDataConnection->socket->dataOnRead (timeoutvalue, 0)
       == 1)
     {
       asockInLen = sizeof (sockaddr_in);
-      asock =
-        pFtpuserData->m_pDataConnection->socket->accept (&asockIn,
-                                                         &asockInLen);
+      asock =pFtpuserData->m_pDataConnection->socket->accept (&asockIn,
+                                                           &asockInLen);
       if (asock.getHandle () == (Handle) INVALID_SOCKET)
         return;
 
diff --git a/myserver/tests/test_socket.cpp b/myserver/tests/test_socket.cpp
index 74ecf25..e7018f9 100644
--- a/myserver/tests/test_socket.cpp
+++ b/myserver/tests/test_socket.cpp
@@ -93,7 +93,7 @@ public:
     ((sockaddr_in*) (&sockIn))->sin_addr.s_addr = inet_addr ( "127.0.0.1" );
     ((sockaddr_in*) (&sockIn))->sin_port = htons ( port );
     
-    int sockInLen = sizeof ( sockaddr_in );
+    socklen_t sockInLen = sizeof ( sockaddr_in );
     
     CPPUNIT_ASSERT( obj->socket ( AF_INET, SOCK_STREAM, 0 ) != -1 );
     
diff --git a/myserver/tests/test_ssl_socket.cpp b/myserver/tests/test_ssl_socket.cpp
index 2532028..c9a5e00 100644
--- a/myserver/tests/test_ssl_socket.cpp
+++ b/myserver/tests/test_ssl_socket.cpp
@@ -137,7 +137,7 @@ public:
     ((sockaddr_in*) (&sockIn))->sin_addr.s_addr = inet_addr ( "127.0.0.1" );
     ((sockaddr_in*) (&sockIn))->sin_port = htons ( port );
     
-    int sockInLen = sizeof ( sockaddr_in );
+    socklen_t sockInLen = sizeof ( sockaddr_in );
     
     CPPUNIT_ASSERT( obj->socket ( AF_INET, SOCK_STREAM, 0 ) != -1 );
     



commit e3a9db94e29ba31a5312a5896bb49de8c97bf6ce
Author: Giuseppe Scrivano <gscrivano@gnu.org>
Date:   Sun Aug 2 11:33:04 2009 +0200

    Code refactoring for the HttpFile class.

diff --git a/myserver/src/http_handler/http_file/http_file.cpp b/myserver/src/http_handler/http_file/http_file.cpp
index 26cebd2..9a15cce 100644
--- a/myserver/src/http_handler/http_file/http_file.cpp
+++ b/myserver/src/http_handler/http_file/http_file.cpp
@@ -40,7 +40,7 @@ extern "C"
 }
 
 /*!
- *Main function to handle the HTTP PUT command.
+ * Main function to handle the HTTP PUT command.
  */
 int HttpFile::putFile (HttpThreadContext* td,
                        string& filename)
@@ -54,113 +54,106 @@ int HttpFile::putFile (HttpThreadContext* td,
     HttpHeaders::buildDefaultHTTPResponseHeader(&td->response);
 
     if(td->request.isKeepAlive())
-    {
-      td->response.connection.assign("keep-alive");
-      keepalive = 1;
-    }
+      {
+        td->response.connection.assign("keep-alive");
+        keepalive = 1;
+      }
 
     if(!(td->permissions & MYSERVER_PERMISSION_WRITE))
-    {
       return td->http->sendAuth();
-    }
 
-    if(FilesUtility::fileExists(td->filenamePath.c_str()))
-    {
-      /*! If the file exists update it. */
-      File file;
-      if(file.openFile(td->filenamePath.c_str(), File::OPEN_IF_EXISTS |
-                       File::WRITE))
-      {
-        /*! Return an internal server error. */
-        return td->http->raiseHTTPError(500);
-      }
-      file.seek (firstByte);
-      for(;;)
+    if(FilesUtility::fileExists (td->filenamePath.c_str()))
       {
-        u_long nbr = 0, nbw = 0;
-        if(td->inputData.read (td->buffer->getBuffer(),
-                               td->buffer->getRealLength(), &nbr))
-        {
-          file.close();
-          /*! Return an internal server error.  */
-          return td->http->raiseHTTPError(500);
-        }
-        if(nbr)
-        {
-          if(file.writeToFile(td->buffer->getBuffer(), nbr, &nbw))
+        File file;
+        if (file.openFile (td->filenamePath.c_str(), File::OPEN_IF_EXISTS |
+                           File::WRITE))
+          return td->http->raiseHTTPError (500);
+
+        file.seek (firstByte);
+
+        for(;;)
           {
-            file.close();
-            /*! Return an internal server error.  */
-            return td->http->raiseHTTPError(500);
-          }
-        }
-        else
-          break;
-        if(nbw != nbr)
-        {
-          file.close();
-          /*! Internal server error.  */
-          return td->http->raiseHTTPError(500);
+            u_long nbr = 0, nbw = 0;
+            if(td->inputData.read (td->buffer->getBuffer(),
+                                   td->buffer->getRealLength(), &nbr))
+              {
+                file.close ();
+                return td->http->raiseHTTPError(500);
+              }
+
+            if(nbr)
+              {
+                if (file.writeToFile (td->buffer->getBuffer (), nbr, &nbw))
+                  {
+                    file.close ();
+                  return td->http->raiseHTTPError (500);
+                  }
+              }
+            else
+              break;
+
+          if (nbw != nbr)
+            {
+              file.close ();
+              return td->http->raiseHTTPError (500);
+            }
         }
-      }
-      file.close();
-      /*! Successful updated.  */
-      td->http->raiseHTTPError(200);
+        file.close ();
 
-      return keepalive;
-    }
-    else
-    {
-      /*!
-       *If the file doesn't exist create it.
-       */
-      File file;
-      if(file.openFile(td->filenamePath.c_str(),
-                       File::FILE_CREATE_ALWAYS |
-                       File::WRITE))
-      {
-        /*! Internal server error. */
-        return td->http->raiseHTTPError(500);
+        td->http->raiseHTTPError (200);
+        return keepalive;
       }
-      for(;;)
+    else
       {
-        u_long nbr = 0, nbw = 0;
-        if(td->inputData.read(td->buffer->getBuffer(),
-                                      td->buffer->getRealLength(), &nbr))
-        {
-          file.close();
-          return td->http->raiseHTTPError(500);
-        }
-        if(nbr)
-        {
-          if(file.writeToFile(td->buffer->getBuffer(), nbr, &nbw))
+        /* The file doesn't exist.  */
+        File file;
+        if(file.openFile(td->filenamePath.c_str(),
+                         File::FILE_CREATE_ALWAYS |
+                         File::WRITE))
           {
-            file.close();
+            /* Internal server error. */
             return td->http->raiseHTTPError(500);
           }
-        }
-        else
-          break;
-        if( nbw != nbr )
-        {
-          file.close();
-          return td->http->raiseHTTPError(500);
-        }
+
+        for (;;)
+          {
+            u_long nbr = 0, nbw = 0;
+            if (td->inputData.read (td->buffer->getBuffer (),
+                                    td->buffer->getRealLength (), &nbr))
+              {
+                file.close ();
+                return td->http->raiseHTTPError (500);
+              }
+            if(nbr)
+              {
+                if (file.writeToFile (td->buffer->getBuffer (), nbr, &nbw))
+                  {
+                    file.close ();
+                    return td->http->raiseHTTPError (500);
+                  }
+              }
+            else
+              break;
+            if( nbw != nbr )
+              {
+                file.close ();
+                return td->http->raiseHTTPError (500);
+              }
+          }
+        file.close ();
+
+        td->http->raiseHTTPError (201);
+        return 1;
       }
-      file.close();
-      /*! Successful created. */
-      td->http->raiseHTTPError(201);
-      return 1;
-    }
   }
-  catch(...)
-  {
-    return td->http->raiseHTTPError(500);
-  };
+  catch (...)
+    {
+      return td->http->raiseHTTPError (500);
+    };
 }
 
 /*!
- *Delete the resource identified by filename.
+ * Delete the resource identified by filename.
  */
 int HttpFile::deleteFile (HttpThreadContext* td,
                           string& filename)
@@ -171,53 +164,48 @@ int HttpFile::deleteFile (HttpThreadContext* td,
   int ret;
   try
   {
-    HttpHeaders::buildDefaultHTTPResponseHeader(&td->response);
-
-    if(!(td->permissions & MYSERVER_PERMISSION_DELETE))
-      return td->http->sendAuth();
+    HttpHeaders::buildDefaultHTTPResponseHeader (&td->response);
 
-    if(FilesUtility::fileExists(td->filenamePath))
-    {
-      FilesUtility::deleteFile(td->filenamePath.c_str());
+    if (!(td->permissions & MYSERVER_PERMISSION_DELETE))
+      return td->http->sendAuth ();
 
-      /*! Successful deleted.  */
-      return td->http->raiseHTTPError(202);
-    }
+    if (FilesUtility::fileExists (td->filenamePath))
+      {
+        FilesUtility::deleteFile (td->filenamePath.c_str ());
+        return td->http->raiseHTTPError (202);
+      }
     else
-    {
-      /*! No content.  */
-      return td->http->raiseHTTPError(204);
-    }
+      return td->http->raiseHTTPError (204);
   }
   catch(...)
-  {
-    return td->http->raiseHTTPError(500);
-  };
+    {
+      return td->http->raiseHTTPError (500);
+    };
 
 }
 
 /*!
- *Send a file to the client using the HTTP protocol.
- *\param td The current HTTP thread context.
- *\param filenamePath The path of the static file to send.
- *\param exec Not used.
- *\param execute Not used.
- *\param onlyHeader Specify if send only the HTTP header.
+ * Send a file to the client using the HTTP protocol.
+ * \param td The current HTTP thread context.
+ * \param filenamePath The path of the static file to send.
+ * \param exec Not used.
+ * \param execute Not used.
+ * \param onlyHeader Specify if send only the HTTP header.
   */
-int HttpFile::send(HttpThreadContext* td,
-                   const char *filenamePath,
-                   const char* exec,
-                   bool execute,
-                   bool onlyHeader)
+int HttpFile::send (HttpThreadContext* td,
+                    const char *filenamePath,
+                    const char* exec,
+                    bool execute,
+                    bool onlyHeader)
 {
   /*
-   *With this routine we send a file through the HTTP protocol.
-   *Open the file and save its handle.
+   * With this routine we send a file through the HTTP protocol.
+   * Open the file and save its handle.
    */
   int ret;
 
   /* 
-   *Will we use GZIP compression to send data?
+   * Will we use GZIP compression to send data?
    */
   bool useGzip = false;
   u_long filesize = 0;
@@ -228,7 +216,7 @@ int HttpFile::send(HttpThreadContext* td,
   bool keepalive = false;
   bool useChunks = false;
   bool useModifiers = false;
-  MemoryStream memStream(td->secondaryBuffer);
+  MemoryStream memStream (td->secondaryBuffer);
   FiltersChain chain;
   u_long nbw;
   u_long nbr;
@@ -239,54 +227,52 @@ int HttpFile::send(HttpThreadContext* td,
   try
   {
 
-    if(!td->request.cmd.compare("PUT"))
+    if (!td->request.cmd.compare ("PUT"))
       return putFile (td, td->filenamePath);
 
-    if(!td->request.cmd.compare("DELETE"))
+    if (!td->request.cmd.compare ("DELETE"))
       return deleteFile (td, td->filenamePath);
 
-    if ( !(td->permissions & MYSERVER_PERMISSION_READ))
+    if (!(td->permissions & MYSERVER_PERMISSION_READ))
       return td->http->sendAuth ();
 
     if (!FilesUtility::fileExists (filenamePath))
       return td->http->raiseHTTPError(404);
 
-    lastMT = FilesUtility::getLastModTime(td->filenamePath.c_str());
-    if(lastMT == -1)
+    lastMT = FilesUtility::getLastModTime (td->filenamePath.c_str());
+
+    if (lastMT == -1)
       return td->http->raiseHTTPError(500);
 
-    getRFC822GMTTime(lastMT, tmpTime, HTTP_RESPONSE_LAST_MODIFIED_DIM);
-    td->response.lastModified.assign(tmpTime);
+    getRFC822GMTTime (lastMT, tmpTime, HTTP_RESPONSE_LAST_MODIFIED_DIM);
+    td->response.lastModified.assign (tmpTime);
 
     HttpRequestHeader::Entry *ifModifiedSince = 
-      td->request.other.get("Last-Modified");
+      td->request.other.get ("Last-Modified");
 
-    if(ifModifiedSince && ifModifiedSince->value->length() && 
-       !ifModifiedSince->value->compare(td->response.lastModified.c_str()))
-          return td->http->sendHTTPNonModified();
+    if (ifModifiedSince && ifModifiedSince->value->length () && 
+       !ifModifiedSince->value->compare(td->response.lastModified.c_str ()))
+          return td->http->sendHTTPNonModified ();
+
+    file = Server::getInstance ()->getCachedFiles ()->open (filenamePath);
+    if (file == 0)
+      return td->http->raiseHTTPError (500);
 
-    file = Server::getInstance()->getCachedFiles()->open(filenamePath);
-    if(file == 0)
-    {  
-      return td->http->raiseHTTPError(500);
-    }
     /*
-     *Check how many bytes are ready to be send.  
+     * Check how many bytes are ready to be send.  
      */
-    filesize = file->getFileSize();
+    filesize = file->getFileSize ();
     bytesToSend = filesize;
-    if(lastByte == 0)
-    {
+    if (lastByte == 0)
       lastByte = bytesToSend;
-    }
     else
-    {
-      /* 
-       *If the client use ranges set the right value 
-       *for the last byte number.  
-       */
-      lastByte = std::min(lastByte + 1, bytesToSend);
-    }
+      {
+        /* 
+         * If the client use ranges set the right value 
+         * for the last byte number.  
+         */
+        lastByte = std::min (lastByte + 1, bytesToSend);
+      }
 
     /*
      * bytesToSend is the interval between the first and the last byte.  
@@ -297,412 +283,361 @@ int HttpFile::send(HttpThreadContext* td,
      * If fail to set the file pointer returns an internal server error.  
      */
     ret = file->seek (firstByte);
-    if(ret)
-    {
-      file->close();
-      delete file;
-      return td->http->raiseHTTPError(500);
-    }
-
+    if (ret)
+      {
+        file->close();
+        delete file;
+        return td->http->raiseHTTPError(500);
+      }
 
-    {
-      /* 
-       *Use GZIP compression to send files bigger than GZIP threshold.  
-       */
-      const char *val = td->securityToken.getHashedData ("gzip.threshold", 
-                                                         MYSERVER_SECURITY_CONF | 
-                                                         MYSERVER_VHOST_CONF |
-                                                         MYSERVER_MIME_CONF |
-                                                         MYSERVER_SERVER_CONF, "0");
+    /*
+     * Use GZIP compression to send files bigger than GZIP threshold.
+     */
+    const char *val = td->securityToken.getHashedData ("gzip.threshold",
+                                                       MYSERVER_SECURITY_CONF
+                                                       | MYSERVER_VHOST_CONF
+                                                       | MYSERVER_MIME_CONF
+                                                       | MYSERVER_SERVER_CONF, "0");
 
-      useGzip = false;
-      if (val)
+    useGzip = false;
+    if (val)
       {
         u_long gzipThreshold = atoi (val);
-        if(bytesToSend >= gzipThreshold)
+        if (bytesToSend >= gzipThreshold)
           useGzip = true;
       }
 
-    }
-
-    keepalive = td->request.isKeepAlive();
+    keepalive = td->request.isKeepAlive ();
 
 #ifndef DO_NOT_USEGZIP
     /*
-     *Be sure that the client accept GZIP compressed data.  
+     * Be sure that the client accept GZIP compressed data.
      */
-    if(useGzip)
-    {
-      HttpRequestHeader::Entry* e = td->request.other.get("Accept-Encoding");
-      if(e)
+    if (useGzip)
       {
-        useGzip &= (e->value->find("gzip") != string::npos);
+        HttpRequestHeader::Entry* e = td->request.other.get("Accept-Encoding");
+        if(e)
+          useGzip &= (e->value->find("gzip") != string::npos);
+        else
+          useGzip = false;
       }
-      else
-        useGzip = false;
-
-    }
 #else
-    /* 
-     * If compiled without GZIP support force the server to don't use it.  
-     */
+    /* If compiled without GZIP support force the server to don't use it.  */
     useGzip = false;
 #endif  
-    if(td->appendOutputs)
+    if (td->appendOutputs)
       useGzip = false;
 
-    td->buffer->setLength(0);
+    td->buffer->setLength (0);
 
     /* If a Range was requested send 206 and not 200 for success.  */
-    if( td->request.rangeByteBegin ||  td->request.rangeByteEnd )
-    {  
-      HttpResponseHeader::Entry *e;
-      ostringstream buffer;
-      td->response.httpStatus = 206;
-      buffer << "bytes "<< (u_long)firstByte << "-" 
-             << (u_long)lastByte << "/" << (u_long)filesize ;
-
-      e = td->response.other.get("Content-Range");
-      if(e)
-        e->value->assign(buffer.str());
-      else
+    if (td->request.rangeByteBegin || td->request.rangeByteEnd)
       {
-        e = new HttpResponseHeader::Entry();
-        e->name->assign("Content-Range");
-        e->value->assign(buffer.str());
-        td->response.other.put(*(e->name), e);
-      }
-
+        HttpResponseHeader::Entry *e;
+        ostringstream buffer;
+        td->response.httpStatus = 206;
+        buffer << "bytes "<< (u_long)firstByte << "-"
+               << (u_long)lastByte << "/" << (u_long)filesize ;
+
+        e = td->response.other.get ("Content-Range");
+        if (e)
+          e->value->assign (buffer.str ());
+      else
+        {
+          e = new HttpResponseHeader::Entry ();
+          e->name->assign ("Content-Range");
+          e->value->assign (buffer.str());
+          td->response.other.put (*(e->name), e);
+        }
 
-      e = td->response.other.get("Transfer-Encoding");
-      if(e)
-        e->value->assign("chunked");
+      e = td->response.other.get ("Transfer-Encoding");
+      if (e)
+        e->value->assign ("chunked");
       else
-      {
-        e = new HttpResponseHeader::Entry();
-        e->name->assign("Transfer-Encoding");
-        e->value->assign("chunked");
-        td->response.other.put(*(e->name), e);
-      }
+        {
+          e = new HttpResponseHeader::Entry();
+          e->name->assign ("Transfer-Encoding");
+          e->value->assign ("chunked");
+          td->response.other.put (*(e->name), e);
+        }
 
       useGzip = false;
     }
-    chain.setProtocol(td->http);
-    chain.setProtocolData(td);
-    chain.setStream(&memStream);
-    if(td->mime)
-    {
-      if(td->mime && 
-         Server::getInstance()->getFiltersFactory()->chain (&chain,
-                                                            td->mime->filters,
-                                                            &memStream,
-                                                            &nbw))
+    chain.setProtocol (td->http);
+    chain.setProtocolData (td);
+    chain.setStream (&memStream);
+    if (td->mime)
       {
-        file->close();
-        delete file;
-        chain.clearAllFilters();
-        return 0;
-      }
+        if (td->mime &&
+            Server::getInstance()->getFiltersFactory()->chain (&chain,
+                                                               td->mime->filters,
+                                                               &memStream,
+                                                               &nbw))
+          {
+            file->close ();
+            delete file;
+            chain.clearAllFilters ();
+            return 0;
+          }
       memStream.refresh();
-
       dataSent += nbw;
     }
     
-    if(useGzip && !chain.isFilterPresent("gzip"))
-    {
-      Filter* gzipFilter = 
-        Server::getInstance()->getFiltersFactory()->getFilter("gzip");
-      u_long nbw;
-      if(!gzipFilter)
-      {
-        file->close();
-        delete file;
-        chain.clearAllFilters();
-        return 0;
-      }
-      if(chain.addFilter (gzipFilter, &nbw))
+    if (useGzip && !chain.isFilterPresent ("gzip"))
       {
-        delete gzipFilter;
-        file->close();
-        delete file;
-        chain.clearAllFilters();
-        return 0;
+        Filter* gzipFilter =
+          Server::getInstance()->getFiltersFactory()->getFilter ("gzip");
+        u_long nbw;
+        if (!gzipFilter)
+          {
+            file->close ();
+            delete file;
+            chain.clearAllFilters ();
+            return 0;
+          }
+        if (chain.addFilter (gzipFilter, &nbw))
+          {
+            delete gzipFilter;
+            file->close ();
+            delete file;
+            chain.clearAllFilters ();
+            return 0;
+          }
+        dataSent += nbw;
       }
-      dataSent += nbw;
-    }
 
-    useModifiers = chain.hasModifiersFilters();
+    useModifiers = chain.hasModifiersFilters ();
  
-    if(keepalive && !useModifiers)
-    {
-      ostringstream buffer;
-      buffer << (u_int)bytesToSend;
-      td->response.contentLength.assign(buffer.str());
-    }
+    if (keepalive && !useModifiers)
+      {
+        ostringstream buffer;
+        buffer << (u_int)bytesToSend;
+        td->response.contentLength.assign (buffer.str ());
+      }
 
-    /* Specify the connection type.  */
-    if(keepalive)
-    {
+    if (keepalive)
       td->response.connection.assign("keep-alive");
-    }
     else
-    {
       td->response.connection.assign("close");
-    }
 
-    if(useModifiers)
-    {
-      string s;
-      HttpResponseHeader::Entry *e;
-      chain.getName(s);
-      e = td->response.other.get("Content-Encoding");
-      if(e)
-        e->value->assign(s);
-      else
-      {
-        e = new HttpResponseHeader::Entry();
-        e->name->assign("Content-Encoding");
-        e->value->assign(s);
-        td->response.other.put(*(e->name), e);
-      }
-      /* Do not use chunked transfer with old HTTP/1.0 clients.  */
-      if(keepalive)
+    if (useModifiers)
       {
+        string s;
         HttpResponseHeader::Entry *e;
-        e = td->response.other.get("Transfer-Encoding");
-        if(e)
-          e->value->assign("chunked");
+        chain.getName(s);
+        e = td->response.other.get ("Content-Encoding");
+        if (e)
+        e->value->assign (s);
         else
+          {
+            e = new HttpResponseHeader::Entry ();
+            e->name->assign ("Content-Encoding");
+            e->value->assign (s);
+            td->response.other.put (*(e->name), e);
+          }
+        /* Do not use chunked transfer with old HTTP/1.0 clients.  */
+      if (keepalive)
         {
-          e = new HttpResponseHeader::Entry();
-          e->name->assign("Transfer-Encoding");
-          e->value->assign("chunked");
-          td->response.other.put(*(e->name), e);
+          HttpResponseHeader::Entry *e;
+          e = td->response.other.get ("Transfer-Encoding");
+          if(e)
+            e->value->assign ("chunked");
+          else
+            {
+              e = new HttpResponseHeader::Entry ();
+              e->name->assign ("Transfer-Encoding");
+              e->value->assign ("chunked");
+              td->response.other.put (*(e->name), e);
+            }
+          useChunks = true;
         }
-
-        useChunks = true;
       }
-    }
  
-    u_long hdrLen = HttpHeaders::buildHTTPResponseHeader(td->buffer->getBuffer(), 
-                                                         &td->response);
+    u_long hdrLen = HttpHeaders::buildHTTPResponseHeader (td->buffer->getBuffer(),
+                                                          &td->response);
 
-    td->buffer->setLength(hdrLen);
+    td->buffer->setLength (hdrLen);
 
-    if(!td->appendOutputs)
-    {
-      /* Send the HTTP header.  */
-      if(td->connection->socket->send(td->buffer->getBuffer(),
-                         (u_long)td->buffer->getLength(), 0) == SOCKET_ERROR)
+    if (!td->appendOutputs)
       {
-        file->close();
-        delete file;
-        chain.clearAllFilters();
+        /* Send the HTTP header.  */
+      if (td->connection->socket->send(td->buffer->getBuffer(),
+                                       (u_long)td->buffer->getLength(),
+                                       0) == SOCKET_ERROR)
+        {
+          file->close ();
+          delete file;
+        chain.clearAllFilters ();
         return 1;
+        }
       }
-    }
 
     /*
-     *If is requested only the header exit from the function; 
-     *used by the HEAD request.  
+     * If is requested only the header exit from the function;
+     * used by the HEAD request.
      */
-    if(onlyHeader)
-    {
-      file->close();
-      delete file;
-      chain.clearAllFilters();
-      return 0;
-    }
+    if (onlyHeader)
+      {
+        file->close ();
+        delete file;
+        chain.clearAllFilters ();
+        return 0;
+      }
 
-    /* 
+    /*
      * Check if there are all the conditions to use a direct copy from the 
      * file to the socket.
      */
-    if(!useChunks && chain.isEmpty() && 
-       !td->appendOutputs &&
-       !(td->http->getProtocolOptions() & PROTOCOL_USES_SSL))
-    {
-      u_long nbw = 0;
-      int ret = file->fastCopyToSocket (td->connection->socket, firstByte,
-                                        td->buffer, &nbw);
+    if (!useChunks && chain.isEmpty () && !td->appendOutputs
+        && !(td->http->getProtocolOptions() & PROTOCOL_USES_SSL))
+      {
+        u_long nbw = 0;
+        int ret = file->fastCopyToSocket (td->connection->socket, firstByte,
+                                          td->buffer, &nbw);
 
-      file->close();
-      delete file;
+        file->close ();
+        delete file;
 
-      chain.clearAllFilters();
+        chain.clearAllFilters ();
 
-      td->sentData += nbw;
+        td->sentData += nbw;
 
-      return ret;
-    }
+        return ret;
+      }
 
-    if(td->appendOutputs)
-      chain.setStream(&(td->outputData));
+    if (td->appendOutputs)
+      chain.setStream (&(td->outputData));
     else
-      chain.setStream(td->connection->socket);
+      chain.setStream (td->connection->socket);
 
     /*
-     *Flush initial data.  This is data that filters could have added
-     *and we have to send before the file itself, for example the gzip
-     *filter add a header to file.
+     * Flush initial data.  This is data that filters could have added
+     * and we have to send before the file itself, for example the gzip
+     * filter add a header to file.
      */
-    if(memStream.availableToRead())
-    {
-      ret = memStream.read(td->buffer->getBuffer(),
-                           td->buffer->getRealLength(), 
-                           &nbr);
-      
-      if(ret)
+    if (memStream.availableToRead ())
       {
-        file->close();
-        delete file;
-        chain.clearAllFilters();
-        return 0;
-      }
+        if (memStream.read (td->buffer->getBuffer(),
+                              td->buffer->getRealLength(),
+                            &nbr))
+          {
+            file->close ();
+            delete file;
+            chain.clearAllFilters ();
+            return 0;
+          }
 
-      memStream.refresh();
-
-      if(nbr)
-      {
-        if(HttpDataHandler::appendDataToHTTPChannel(td, 
-                                                    td->buffer->getBuffer(), 
-                                                    nbr,
-                                                    &(td->outputData), 
-                                                    &chain,
-                                                    td->appendOutputs, 
-                                                    useChunks))
-        {
-          file->close();
-          delete file;
-          chain.clearAllFilters();
-          return 1;
-          dataSent += nbw;
-        }
-      } /* nbr.  */
-    } /* memStream.availableToRead().  */
+        memStream.refresh ();
 
+        if (nbr)
+          {
+            if (HttpDataHandler::appendDataToHTTPChannel(td,
+                                   td->buffer->getBuffer(),
+                                   nbr, &(td->outputData),
+                                   &chain, td->appendOutputs,
+                                   useChunks))
+              {
+                file->close ();
+                delete file;
+                chain.clearAllFilters ();
+                return 1;
+                dataSent += nbw;
+              }
+          } /* nbr.  */
+      } /* memStream.availableToRead().  */
 
     /* Flush the rest of the file.  */
-    for(;;)
-    {
-      u_long nbr;
-      u_long nbw;
-
-      /* Check if there are other bytes to send.  */
-      if(bytesToSend)
+    for (;;)
       {
-        /* Read from the file the bytes to send.  */
-        ret = file->read(td->buffer->getBuffer(),
-                                 std::min(static_cast<u_long>(bytesToSend), 
-                                          static_cast<u_long>(td->buffer->getRealLength()/2)), 
-                                 &nbr);
-        if(ret)
-          break;
-
-        if(nbr == 0)
-        {
-          bytesToSend = 0;
-          continue;
-        }
-        
-        bytesToSend -= nbr;
-
-
-        ret = appendDataToHTTPChannel (td, td->buffer->getBuffer (),
-                                       nbr,
-                                       &(td->outputData),
-                                       &chain,
-                                       td->appendOutputs,
-                                       useChunks,
-                                       td->buffer->getRealLength (),
-                                       &memStream);
-        if(ret)
-          break;     
-          
-        dataSent += nbr;
-      }
-      else /* if(bytesToSend) */
-      {
-        /* If we don't use chunks we can flush directly.  */
-        if(!useChunks)
-        {
-          ret = chain.flush(&nbw);
-
-          break;
-        }
-        else
-        {
-          /*
-           *Replace the final stream before the flush and write to a
-           *memory buffer, after all the data is flushed from the
-           *chain we can replace the stream with the original one and
-           *write there the HTTP data chunk.
-           */
-          Stream* tmpStream = chain.getStream();
-
-          chain.setStream(&memStream);
-
-          memStream.refresh();
-
-          ret = chain.flush(&nbw);
-
-          if(ret)
-            break;
-
-          chain.setStream(tmpStream);
-
-          ret = memStream.read(td->buffer->getBuffer(), 
-                               td->buffer->getRealLength(), 
-                               &nbr);
-          if(ret)
-            break;
-
-          ret = HttpDataHandler::appendDataToHTTPChannel(td,
-                                                         td->buffer->getBuffer(), 
-                                                         nbr,
-                                                         &(td->outputData), 
-                                                         &chain,
-                                                         td->appendOutputs, 
-                                                         useChunks);
-          if(ret)
-            break;
-          
-          ret = HttpDataHandler::appendDataToHTTPChannel(td, 
-                                                         0,
-                                                         0,
-                                                         &(td->outputData), 
-                                                         &chain,
-                                                         td->appendOutputs, 
-                                                         useChunks);
-        
-          break;
-        }
-      }
-
-      memStream.refresh();
+        u_long nbr;
+        u_long nbw;
 
+        /* Check if there are other bytes to send.  */
+        if (bytesToSend)
+          {
+            /* Read from the file the bytes to send.  */
+            if (ret = file->read (td->buffer->getBuffer(),
+                  std::min (static_cast<u_long> (bytesToSend),
+                  static_cast<u_long> (td->buffer->getRealLength() / 2)),
+                  &nbr))
+              break;
+
+            if (nbr == 0)
+              {
+                bytesToSend = 0;
+                continue;
+              }
+
+            bytesToSend -= nbr;
+
+            if (ret = appendDataToHTTPChannel (td, td->buffer->getBuffer (),
+                     nbr, &(td->outputData), &chain, td->appendOutputs,
+                     useChunks, td->buffer->getRealLength (), &memStream))
+              break;
+
+            dataSent += nbr;
+          }
+        else /* if(bytesToSend) */
+          {
+            /* If we don't use chunks we can flush directly.  */
+            if (!useChunks)
+              {
+                ret = chain.flush (&nbw);
+                break;
+              }
+            else
+              {
+                /*
+                 * Replace the final stream before the flush and write to a
+                 * memory buffer, after all the data is flushed from the
+                 * chain we can replace the stream with the original one and
+                 * write there the HTTP data chunk.
+                 */
+                Stream* tmpStream = chain.getStream ();
+                chain.setStream (&memStream);
+                memStream.refresh ();
+                if (ret = chain.flush (&nbw))
+                  break;
+
+                chain.setStream (tmpStream);
+                if (ret = memStream.read (td->buffer->getBuffer (),
+                    td->buffer->getRealLength(), &nbr))
+                  break;
+
+                if (ret = HttpDataHandler::appendDataToHTTPChannel (td,
+                    td->buffer->getBuffer (), nbr, &(td->outputData),
+                    &chain, td->appendOutputs, useChunks))
+                  break;
+
+                ret = HttpDataHandler::appendDataToHTTPChannel (td, 0, 0,
+                                         &(td->outputData), &chain,
+                                         td->appendOutputs,useChunks);
+                break;
+              }
+          }
+        memStream.refresh ();
     }/* End for loop.  */
 
-    file->close();
-    delete file;
-  }
-  catch (bad_alloc &ba)
-  {
     file->close ();
     delete file;
-    td->connection->host->warningsLogWrite ("HttpFile: Error allocating memory");
-    chain.clearAllFilters ();
-    return td->http->raiseHTTPError (500);
   }
+  catch (bad_alloc &ba)
+    {
+      file->close ();
+      delete file;
+      td->connection->host->warningsLogWrite ("HttpFile: Error allocating memory");
+      chain.clearAllFilters ();
+      return td->http->raiseHTTPError (500);
+    }
   catch (...)
-  {
-    file->close ();
-    delete file;
-    td->connection->host->warningsLogWrite ("HttpFile: Internal error");
-    chain.clearAllFilters();
-    return td->http->raiseHTTPError (500);
-  };
- 
+    {
+      file->close ();
+      delete file;
+      td->connection->host->warningsLogWrite ("HttpFile: Internal error");
+      chain.clearAllFilters ();
+      return td->http->raiseHTTPError (500);
+    };
+
   /* For logging activity.  */
   td->sentData += dataSent;
 
@@ -711,7 +646,7 @@ int HttpFile::send(HttpThreadContext* td,
 }
 
 /*!
- *Constructor for the class.
+ * Constructor for the class.
  */
 HttpFile::HttpFile ()
 {
@@ -719,7 +654,7 @@ HttpFile::HttpFile ()
 }
 
 /*!
- *Destroy the object.
+ * Destroy the object.
  */
 HttpFile::~HttpFile ()
 {
@@ -727,8 +662,8 @@ HttpFile::~HttpFile ()
 }
 
 /*!
- *Load the static elements.
- *\param confFile Not used.
+ * Load the static elements.
+ * \param confFile Not used.
  */
 int HttpFile::load ()
 {
@@ -736,7 +671,7 @@ int HttpFile::load ()
 }
 
 /*!
- *Unload the static elements.
+ * Unload the static elements.
  */
 int HttpFile::unLoad ()
 {



commit f13e2b6d1fb952d4684eb6f12def7b9cf73fb44e
Author: Giuseppe Scrivano <gscrivano@gnu.org>
Date:   Sun Aug 2 10:17:57 2009 +0200

    Code refactoring: code indentation.

diff --git a/myserver/src/protocol/ftp/ftp.cpp b/myserver/src/protocol/ftp/ftp.cpp
index 46ad2f6..23e13d0 100755
--- a/myserver/src/protocol/ftp/ftp.cpp
+++ b/myserver/src/protocol/ftp/ftp.cpp
@@ -32,12 +32,12 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 #include <include/conf/security/auth_domain.h>
 
 #ifndef WIN32
-#include <netinet/in.h>
-#ifdef SENDFILE
-#include <sys/sendfile.h>
-#endif
-#include <sys/socket.h>
-#include <arpa/inet.h>
+# include <netinet/in.h>
+# ifdef SENDFILE
+#  include <sys/sendfile.h>
+# endif
+# include <sys/socket.h>
+# include <arpa/inet.h>
 #endif
 
 static DEFINE_THREAD (SendAsciiFile, pParam);
@@ -174,8 +174,6 @@ int FtpuserData::closeDataConnection ()
       m_pDataConnection->socket = NULL;
       m_pDataConnection->setScheduled (0);
     }
-
-  //m_DataConnBusy.unlock();
   m_nFtpstate = USER_LOGGED_IN;
   return 1;
 }
@@ -293,6 +291,7 @@ void ftpReply (ConnectionPtr pConnection, int nReplyCode,
       else
         buffer << nReplyCode << "-" << sReplyText << "\r\n";
     }
+
   pConnection->socket->send (buffer.str ().c_str (),
 			     strlen (buffer.str ().c_str ()), 0);
 }
@@ -574,7 +573,7 @@ void Ftp::pasv ()
 #endif //WIN32
   ftpReply (227, sTempText);
 
-  //wait for incoming connection
+  // wait for incoming connection
   int timeoutvalue = 3;
 #ifdef __linux__
   timeoutvalue = 1;
@@ -585,21 +584,22 @@ void Ftp::pasv ()
   MYSERVER_SOCKADDRIN asockIn;
   int asockInLen = 0;
   Socket asock;
-  if (pFtpuserData->m_pDataConnection->socket->dataOnRead (timeoutvalue, 0) ==
-      1)
+  if (pFtpuserData->m_pDataConnection->socket->dataOnRead (timeoutvalue, 0)
+      == 1)
     {
       asockInLen = sizeof (sockaddr_in);
       asock =
-	pFtpuserData->m_pDataConnection->socket->accept (&asockIn,
-							 &asockInLen);
+        pFtpuserData->m_pDataConnection->socket->accept (&asockIn,
+                                                         &asockInLen);
       if (asock.getHandle () == (Handle) INVALID_SOCKET)
-	return;
+        return;
 
       pFtpuserData->m_pDataConnection->socket->shutdown (SD_BOTH);
       pFtpuserData->m_pDataConnection->socket->close ();
       delete pFtpuserData->m_pDataConnection->socket;
       pFtpuserData->m_pDataConnection->socket = new Socket (asock);
     }
+
   pFtpuserData->m_bPassiveSrv = false;
 }
 
@@ -607,29 +607,23 @@ void Ftp::retrstor (bool bretr, bool bappend, const std::string & sPath)
 {
   std::string sLocalPath;
   if (!userLoggedIn ())
-    {
-      //closeDataConnection();
-      return;
-    }
+    return;
+
   if ((bretr && !getLocalPath (sPath, sLocalPath)) ||
       (!bretr && !buildLocalPath (sPath, sLocalPath)))
-    {
-      //closeDataConnection();
-      return;
-    }
+    return;
 
   std::string sLocalDir, sLocalFileName;
   FilesUtility::splitPath (sLocalPath, sLocalDir, sLocalFileName);
 
   /* The security file doesn't exist in any case.  */
   const char *secName = td.st.getHashedData ("security.filename",
-					     MYSERVER_VHOST_CONF |
-					     MYSERVER_SERVER_CONF,
-					     ".security.xml");
+                                             MYSERVER_VHOST_CONF |
+                                             MYSERVER_SERVER_CONF,
+                                             ".security.xml");
   if (!strcmpi (sLocalFileName.c_str (), secName))
     {
       ftpReply (550);
-      //closeDataConnection();
       return;
     }
 
@@ -642,12 +636,10 @@ void Ftp::retrstor (bool bretr, bool bappend, const std::string & sPath)
   FtpuserData *pFtpuserData =
     static_cast < FtpuserData * >(td.pConnection->protocolBuffer);
 
-  if (checkRights
-      (pFtpuserData->m_suserName, pFtpuserData->m_sPass, sLocalPath,
-       nMask) == 0)
+  if (checkRights (pFtpuserData->m_suserName, pFtpuserData->m_sPass,
+                   sLocalPath, nMask) == 0)
     {
       ftpReply (530);
-      //closeDataConnection();
       return;
     }
 
@@ -1015,22 +1007,22 @@ DEFINE_THREAD (SendImageFile, pParam)
 						       c_str ());
     if (file == NULL)
       {
-	ftpReply (pConnection, 451);
-	pFtpuserData->closeDataConnection ();
-	pFtpuserData->m_DataConnBusy.unlock ();
-	delete pWt;
+        ftpReply (pConnection, 451);
+        pFtpuserData->closeDataConnection ();
+        pFtpuserData->m_DataConnBusy.unlock ();
+        delete pWt;
 #ifdef WIN32
-	return 0;
+        return 0;
 #elif HAVE_PTHREAD
-	return (void *) 0;
+        return (void *) 0;
 #endif
       }
     u_long filesize = file->getFileSize ();
     u_long nbr, nBufferSize = 0;
     if (pWt->m_bappend && pFtpuserData->m_nrestartOffset < filesize)
       {
-	file->seek (pFtpuserData->m_nrestartOffset);
-	filesize -= pFtpuserData->m_nrestartOffset;
+        file->seek (pFtpuserData->m_nrestartOffset);
+        filesize -= pFtpuserData->m_nrestartOffset;
       }
 
     pFtpuserData->m_sCurrentFileName = pWt->m_sFilePath;
@@ -1040,47 +1032,45 @@ DEFINE_THREAD (SendImageFile, pParam)
     secondaryBuffer.setLength (1024);
     while (filesize != 0)
       {
-	nBufferSize =
-	  std::min (static_cast < u_long > (filesize),
-		    static_cast < u_long >
-		    (secondaryBuffer.getRealLength () / 2));
-	if (file->read (secondaryBuffer.getBuffer (), nBufferSize, &nbr)
-	    || pFtpuserData->m_pDataConnection->socket->send (secondaryBuffer.
-							      getBuffer (),
-							      (u_long)
-							      nBufferSize,
-							      0) ==
-	    SOCKET_ERROR)
-	  {
-	    ftpReply (pConnection, 451);
-	    file->close ();
-	    delete file;
-	    pFtpuserData->closeDataConnection ();
-	    pFtpuserData->m_DataConnBusy.unlock ();
-	    delete pWt;
+        nBufferSize =
+          std::min (static_cast < u_long > (filesize),
+                    static_cast < u_long >
+                    (secondaryBuffer.getRealLength () / 2));
+
+        if (file->read (secondaryBuffer.getBuffer (), nBufferSize, &nbr)
+            || pFtpuserData->m_pDataConnection->socket->send (secondaryBuffer.getBuffer (),
+                                                              (u_long)nBufferSize, 0)
+            == SOCKET_ERROR)
+          {
+            ftpReply (pConnection, 451);
+            file->close ();
+            delete file;
+            pFtpuserData->closeDataConnection ();
+            pFtpuserData->m_DataConnBusy.unlock ();
+            delete pWt;
 #ifdef WIN32
-	    return 0;
+            return 0;
 #elif HAVE_PTHREAD
-	    return (void *) 0;
+            return (void *) 0;
 #endif
-	  }
-	filesize -= nbr;
-	pFtpuserData->m_nBytesSent += nbr;
-	pFtpuserData->m_nrestartOffset += nbr;
-	if (pFtpuserData->m_bBreakDataConnection)
-	  {
-	    pFtpuserData->m_bBreakDataConnection = false;
-	    file->close ();
-	    delete file;
-	    pFtpuserData->closeDataConnection ();
-	    pFtpuserData->m_DataConnBusy.unlock ();
-	    delete pWt;
+          }
+        filesize -= nbr;
+        pFtpuserData->m_nBytesSent += nbr;
+        pFtpuserData->m_nrestartOffset += nbr;
+        if (pFtpuserData->m_bBreakDataConnection)
+          {
+            pFtpuserData->m_bBreakDataConnection = false;
+            file->close ();
+            delete file;
+            pFtpuserData->closeDataConnection ();
+            pFtpuserData->m_DataConnBusy.unlock ();
+            delete pWt;
 #ifdef WIN32
-	    return 1;
+            return 1;
 #elif HAVE_PTHREAD
-	    return (void *) 1;
+            return (void *) 1;
 #endif
-	  }
+          }
       }
     file->close ();
     delete file;
@@ -1090,7 +1080,6 @@ DEFINE_THREAD (SendImageFile, pParam)
     if (file != NULL)
       file->close ();
     delete file;
-    //report error
   }
 
   pFtpuserData->m_sCurrentFileName = "";
@@ -1168,17 +1157,17 @@ DEFINE_THREAD (ReceiveAsciiFile, pParam)
     {
       ftpReply (pConnection, 150);
       if (pWt->m_pFtp->OpenDataConnection () == 0)
-	{
-	  ftpReply (pConnection, 425);
-	  pFtpuserData->closeDataConnection ();
-	  pFtpuserData->m_DataConnBusy.unlock ();
-	  delete pWt;
+        {
+          ftpReply (pConnection, 425);
+          pFtpuserData->closeDataConnection ();
+          pFtpuserData->m_DataConnBusy.unlock ();
+          delete pWt;
 #ifdef WIN32
-	  return 0;
+          return 0;
 #elif HAVE_PTHREAD
-	  return (void *) 0;
+          return (void *) 0;
 #endif
-	}
+        }
     }
 
   if (pFtpuserData->m_pDataConnection == NULL ||
@@ -1197,106 +1186,102 @@ DEFINE_THREAD (ReceiveAsciiFile, pParam)
 
   File file;
   try
-  {
-    u_long flags = 0;
-    if (pWt->m_bappend)
-      flags = File::APPEND | File::WRITE;
-    else
-      flags = File::FILE_CREATE_ALWAYS | File::WRITE;
-    if (file.openFile (pWt->m_sFilePath.c_str (), flags))
-      {
-	ftpReply (pConnection, 451);
-	pFtpuserData->closeDataConnection ();
-	pFtpuserData->m_DataConnBusy.unlock ();
-	delete pWt;
+    {
+      u_long flags = 0;
+      if (pWt->m_bappend)
+        flags = File::APPEND | File::WRITE;
+      else
+        flags = File::FILE_CREATE_ALWAYS | File::WRITE;
+      if (file.openFile (pWt->m_sFilePath.c_str (), flags))
+        {
+          ftpReply (pConnection, 451);
+          pFtpuserData->closeDataConnection ();
+          pFtpuserData->m_DataConnBusy.unlock ();
+          delete pWt;
 #ifdef WIN32
-	return 0;
+          return 0;
 #elif HAVE_PTHREAD
-	return (void *) 0;
+          return (void *) 0;
 #endif
-      }
+        }
 
-    MemBuf buffer, secondaryBuffer;
-    buffer.setLength (1024);
-    memset (buffer.getBuffer (), 0, buffer.getRealLength ());
-    char *pLine = NULL;
-    int nLineLength = 0;
-    std::string sLine;
-    u_long nbr;
-    while (pFtpuserData->m_pDataConnection->socket->read (buffer.getBuffer (),
-							  (u_long) buffer.
-							  getRealLength () -
-							  1,
-							  &nbr) !=
-	   SOCKET_ERROR && nbr != 0)
-      {
-	memset (secondaryBuffer.getBuffer (), 0,
-		secondaryBuffer.getRealLength ());
-	secondaryBuffer.setLength (0);
-	pLine = buffer.getBuffer ();
-	if (pLine == NULL)
-	  {
-	    ftpReply (pConnection, 451);
-	    file.close ();
-	    pFtpuserData->closeDataConnection ();
-	    pFtpuserData->m_DataConnBusy.unlock ();
-	    delete pWt;
+      MemBuf buffer, secondaryBuffer;
+      buffer.setLength (1024);
+      memset (buffer.getBuffer (), 0, buffer.getRealLength ());
+      char *pLine = NULL;
+      int nLineLength = 0;
+      std::string sLine;
+      u_long nbr;
+      while (pFtpuserData->m_pDataConnection->socket->read (buffer.getBuffer (),
+                                (u_long) buffer.getRealLength () - 1, &nbr)
+            != SOCKET_ERROR && nbr != 0)
+        {
+          memset (secondaryBuffer.getBuffer (), 0,
+                  secondaryBuffer.getRealLength ());
+          secondaryBuffer.setLength (0);
+          pLine = buffer.getBuffer ();
+          if (pLine == NULL)
+            {
+              ftpReply (pConnection, 451);
+              file.close ();
+              pFtpuserData->closeDataConnection ();
+              pFtpuserData->m_DataConnBusy.unlock ();
+              delete pWt;
 #ifdef WIN32
-	    return 0;
+              return 0;
 #elif HAVE_PTHREAD
-	    return (void *) 0;
+              return (void *) 0;
 #endif
-	  }
-	while (*pLine != 0)
-	  {
-	    nLineLength = getEndLine (pLine, 0);
-	    if (nLineLength < 0)	//last line
-	      {
-		sLine.assign (pLine, strlen (pLine));
-		if (!sLine.empty ())
-		  secondaryBuffer << sLine;
-		pLine += strlen (pLine);
-	      }
-	    else
-	      {
-		sLine.assign (pLine, nLineLength);
+            }
+        while (*pLine != 0)
+          {
+            nLineLength = getEndLine (pLine, 0);
+            if (nLineLength < 0)	//last line
+              {
+                sLine.assign (pLine, strlen (pLine));
+                if (!sLine.empty ())
+                  secondaryBuffer << sLine;
+                pLine += strlen (pLine);
+              }
+            else
+              {
+                sLine.assign (pLine, nLineLength);
 #ifdef WIN32
-		secondaryBuffer << sLine << "\r\n";
+                secondaryBuffer << sLine << "\r\n";
 #else
-		secondaryBuffer << sLine << "\n";
+                secondaryBuffer << sLine << "\n";
 #endif
-		if (*(pLine + nLineLength) == '\r')
-		  nLineLength++;
-		if (*(pLine + nLineLength) == '\n')
-		  nLineLength++;
-		pLine += nLineLength;
-	      }
-	  }
-	file.write (secondaryBuffer.getBuffer (),
-		    (u_long) secondaryBuffer.getLength (), &nbr);
-
-	if (pFtpuserData->m_bBreakDataConnection)
-	  {
-	    pFtpuserData->m_bBreakDataConnection = false;
-	    file.close ();
-	    pFtpuserData->closeDataConnection ();
-	    pFtpuserData->m_DataConnBusy.unlock ();
-	    delete pWt;
+                if (*(pLine + nLineLength) == '\r')
+                  nLineLength++;
+                if (*(pLine + nLineLength) == '\n')
+                  nLineLength++;
+                pLine += nLineLength;
+              }
+          }
+        file.write (secondaryBuffer.getBuffer (),
+                    (u_long) secondaryBuffer.getLength (), &nbr);
+
+        if (pFtpuserData->m_bBreakDataConnection)
+          {
+            pFtpuserData->m_bBreakDataConnection = false;
+            file.close ();
+            pFtpuserData->closeDataConnection ();
+            pFtpuserData->m_DataConnBusy.unlock ();
+            delete pWt;
 #ifdef WIN32
-	    return 1;
+            return 1;
 #elif HAVE_PTHREAD
-	    return (void *) 1;
+            return (void *) 1;
 #endif
-	  }
-	memset (buffer.getBuffer (), 0, buffer.getRealLength ());
+          }
+        memset (buffer.getBuffer (), 0, buffer.getRealLength ());
       }
-    file.close ();
-  }
+      file.close ();
+    }
   catch (bad_alloc & ba)
-  {
-    file.close ();
-    //report error
-  }
+    {
+      file.close ();
+    }
 
   ftpReply (pConnection, 226);
   pFtpuserData->closeDataConnection ();
@@ -1369,19 +1354,19 @@ DEFINE_THREAD (ReceiveImageFile, pParam)
     {
       ftpReply (pConnection, 150);
       if (pWt->m_pFtp->OpenDataConnection () == 0)
-	{
-	  ftpReply (pConnection, 425);
-	  pFtpuserData->closeDataConnection ();
-	  pFtpuserData->m_DataConnBusy.unlock ();
-	  delete pWt;
+        {
+          ftpReply (pConnection, 425);
+          pFtpuserData->closeDataConnection ();
+          pFtpuserData->m_DataConnBusy.unlock ();
+          delete pWt;
 #ifdef WIN32
-	  return 0;
+          return 0;
 #elif HAVE_PTHREAD
-	  return (void *) 0;
+          return (void *) 0;
 #endif
-	}
+        }
     }
-
+  
   if (pFtpuserData->m_pDataConnection == NULL ||
       pFtpuserData->m_pDataConnection->socket == NULL)
     {
@@ -1398,57 +1383,56 @@ DEFINE_THREAD (ReceiveImageFile, pParam)
 
   File file;
   try
-  {
-    u_long flags = 0;
-    if (pWt->m_bappend)
-      flags = File::APPEND | File::WRITE;
-    else
-      flags = File::FILE_CREATE_ALWAYS | File::WRITE;
-    if (file.openFile (pWt->m_sFilePath.c_str (), flags))
-      {
-	ftpReply (pConnection, 451);
-	pFtpuserData->closeDataConnection ();
-	pFtpuserData->m_DataConnBusy.unlock ();
-	delete pWt;
+    {
+      u_long flags = 0;
+      if (pWt->m_bappend)
+        flags = File::APPEND | File::WRITE;
+      else
+        flags = File::FILE_CREATE_ALWAYS | File::WRITE;
+      if (file.openFile (pWt->m_sFilePath.c_str (), flags))
+        {
+          ftpReply (pConnection, 451);
+          pFtpuserData->closeDataConnection ();
+          pFtpuserData->m_DataConnBusy.unlock ();
+          delete pWt;
 #ifdef WIN32
-	return 0;
+          return 0;
 #elif HAVE_PTHREAD
-	return (void *) 0;
+          return (void *) 0;
 #endif
-      }
-    u_long nbr;
-    MemBuf buffer;
-    buffer.setLength (1024);
-    memset (buffer.getBuffer (), 0, buffer.getRealLength ());
-    while (pFtpuserData->m_pDataConnection->socket->read (buffer.getBuffer (),
-							  (u_long) buffer.
-							  getRealLength () -
-							  1,
-							  &nbr) !=
-	   SOCKET_ERROR && nbr != 0)
-      {
-	file.write (buffer.getBuffer (), nbr, &nbr);
-	if (pFtpuserData->m_bBreakDataConnection)
-	  {
-	    pFtpuserData->m_bBreakDataConnection = false;
-	    file.close ();
-	    pFtpuserData->closeDataConnection ();
-	    pFtpuserData->m_DataConnBusy.unlock ();
-	    delete pWt;
+        }
+      u_long nbr;
+      MemBuf buffer;
+      buffer.setLength (1024);
+      memset (buffer.getBuffer (), 0, buffer.getRealLength ());
+      while (pFtpuserData->m_pDataConnection->socket->read (buffer.getBuffer (),
+                                                            (u_long) buffer.
+                                                            getRealLength () -
+                                                            1,
+                                                            &nbr) !=
+             SOCKET_ERROR && nbr != 0)
+        {
+          file.write (buffer.getBuffer (), nbr, &nbr);
+          if (pFtpuserData->m_bBreakDataConnection)
+            {
+              pFtpuserData->m_bBreakDataConnection = false;
+              file.close ();
+              pFtpuserData->closeDataConnection ();
+              pFtpuserData->m_DataConnBusy.unlock ();
+              delete pWt;
 #ifdef WIN32
-	    return 1;
+              return 1;
 #elif HAVE_PTHREAD
-	    return (void *) 1;
+              return (void *) 1;
 #endif
-	  }
-      }
-    file.close ();
-  }
+            }
+        }
+      file.close ();
+    }
   catch (bad_alloc & ba)
-  {
-    //report error
-    file.close ();
-  }
+    {
+      file.close ();
+    }
 
   ftpReply (pConnection, 226);
   pFtpuserData->closeDataConnection ();
@@ -1536,7 +1520,6 @@ bool Ftp::getLocalPath (const std::string & sPath, std::string & sOutPath)
       ftpReply (550);
       return false;
     }
-
   return true;
 }
 
@@ -1580,9 +1563,8 @@ Ftp::OpenDataConnection ()
   if (pFtpuserData->m_nFtpstate == FtpuserData::DATA_CONNECTION_UP)
     return 1;
 
-  //pFtpuserData->m_DataConnBusy.lock();
-  int nRet =
-    pFtpuserData->m_bPassiveSrv ? openDataPassive () : openDataActive ();
+  int nRet = pFtpuserData->m_bPassiveSrv ? openDataPassive () 
+                                         : openDataActive ();
   if (nRet != 0)
     pFtpuserData->m_nFtpstate = FtpuserData::DATA_CONNECTION_UP;
   return nRet;
@@ -1617,8 +1599,9 @@ Ftp::openDataPassive ()
     htons (getPortNo (pFtpuserData->m_cdh));
   if (pSocket->
       setsockopt (SOL_SOCKET, SO_REUSEADDR, (const char *) &nReuseAddr,
-		  sizeof (nReuseAddr)) < 0)
+                  sizeof (nReuseAddr)) < 0)
     return 0;
+
   if (pSocket->bind (&storage, sizeof (sockaddr_in)) != 0
       || pSocket->listen (SOMAXCONN) != 0)
     return 0;
@@ -1674,17 +1657,18 @@ Ftp::type (int ntypeCode, int nFormatControlCode /* = -1 */ )
     {
     case FtpuserData::NON_PRINT:
       if (ntypeCode == FtpuserData::REPR_ASCII)
-	pFtpuserData->m_nFtpFormatControl =
-	  (FtpuserData::FtpFormatControl) nFormatControlCode;
+        pFtpuserData->m_nFtpFormatControl =
+          (FtpuserData::FtpFormatControl) nFormatControlCode;
       else
-	{
-	  ftpReply (501);
-	  return 0;
-	}
+        {
+          ftpReply (501);
+          return 0;
+        }
       break;
+
     case FtpuserData::REPR_IMAGE:
       pFtpuserData->m_nFtpFormatControl =
-	(FtpuserData::FtpFormatControl) nFormatControlCode;
+        (FtpuserData::FtpFormatControl) nFormatControlCode;
       break;
     }
 
@@ -1771,96 +1755,96 @@ Ftp::list (const std::string & sParam /*= ""*/ )
       FindData fd;
       //dir MUST ends with '/'
       if (fd.findfirst (sPath))
-	{
-	  ftpReply (450);
-	  closeDataConnection ();
-	  return;
-	}
+        {
+          ftpReply (450);
+          closeDataConnection ();
+          return;
+        }
 
       const char *secName = td.st.getHashedData ("security.filename",
-						 MYSERVER_VHOST_CONF |
-						 MYSERVER_SERVER_CONF,
-						 ".security.xml");
+                                                 MYSERVER_VHOST_CONF |
+                                                 MYSERVER_SERVER_CONF,
+                                                 ".security.xml");
       do
-	{
-	  if (fd.name[0] == '.' || !strcmpi (fd.name, secName))
-	    continue;
-
-	  perm[10] = '\0';
-	  perm[0] = fd.attrib == FILE_ATTRIBUTE_DIRECTORY ? 'd' : '-';
-	  string completeFileName (sPath);
-	  completeFileName.append (fd.name);
-	  int guestMask = checkRights ("Guest", "", completeFileName, -1);
-	  int pMask = checkRights (username, password, completeFileName, -1);
-
-	  //Owner and group permissions are the same.
-	  perm[1] = perm[4] = pMask & MYSERVER_PERMISSION_READ ? 'r' : '-';
-	  perm[2] = perm[5] = pMask & MYSERVER_PERMISSION_WRITE ? 'w' : '-';
-	  perm[3] = perm[6] = pMask & MYSERVER_PERMISSION_EXECUTE ? 'x' : '-';
-
-	  //Permission for All are the permission for Guest
-	  perm[7] = guestMask & MYSERVER_PERMISSION_READ ? 'r' : '-';
-	  perm[8] = guestMask & MYSERVER_PERMISSION_WRITE ? 'w' : '-';
-	  perm[9] = guestMask & MYSERVER_PERMISSION_EXECUTE ? 'x' : '-';
-
-	  string date;
-	  const char *datePtr = getRFC822LocalTime (fd.time_write, date, 32);
-
-	  char dateFtpFormat[13];
-
-	  dateFtpFormat[3] = ' ';
-	  dateFtpFormat[6] = ' ';
-	  dateFtpFormat[7] = ' ';
-	  dateFtpFormat[12] = '\0';
-
-	  int offset = datePtr[6] == ' ' ? 0 : 1;
-
-	  //Day
-	  dateFtpFormat[4] = datePtr[5];
-	  dateFtpFormat[5] = datePtr[6];
-
-	  //Month
-	  dateFtpFormat[0] = datePtr[7 + offset];
-	  dateFtpFormat[1] = datePtr[8 + offset];
-	  dateFtpFormat[2] = datePtr[9 + offset];
-
-	  //If the file was modified in the last 6 months
-	  //show the hour instead of the year
-	  if (now - fd.time_write < 60 * 60 * 183 && now > fd.time_write)
-	    {
-	      //Hour
-	      dateFtpFormat[7] = datePtr[16 + offset];
-	      dateFtpFormat[8] = datePtr[17 + offset];
-	      dateFtpFormat[9] = ':';
-	      dateFtpFormat[10] = datePtr[19 + offset];
-	      dateFtpFormat[11] = datePtr[20 + offset];
-	    }
-	  else
-	    {
-	      //Year
-	      dateFtpFormat[8] = datePtr[11 + offset];
-	      dateFtpFormat[9] = datePtr[12 + offset];
-	      dateFtpFormat[10] = datePtr[13 + offset];
-	      dateFtpFormat[11] = datePtr[14 + offset];
-	    }
-
-	  char nlinkStr[12];
-	  memset (nlinkStr, 0, sizeof (char) * 12);
+        {
+          if (fd.name[0] == '.' || !strcmpi (fd.name, secName))
+            continue;
+
+          perm[10] = '\0';
+          perm[0] = fd.attrib == FILE_ATTRIBUTE_DIRECTORY ? 'd' : '-';
+          string completeFileName (sPath);
+          completeFileName.append (fd.name);
+          int guestMask = checkRights ("Guest", "", completeFileName, -1);
+          int pMask = checkRights (username, password, completeFileName, -1);
+
+          //Owner and group permissions are the same.
+          perm[1] = perm[4] = pMask & MYSERVER_PERMISSION_READ ? 'r' : '-';
+          perm[2] = perm[5] = pMask & MYSERVER_PERMISSION_WRITE ? 'w' : '-';
+          perm[3] = perm[6] = pMask & MYSERVER_PERMISSION_EXECUTE ? 'x' : '-';
+
+          //Permission for All are the permission for Guest
+          perm[7] = guestMask & MYSERVER_PERMISSION_READ ? 'r' : '-';
+          perm[8] = guestMask & MYSERVER_PERMISSION_WRITE ? 'w' : '-';
+          perm[9] = guestMask & MYSERVER_PERMISSION_EXECUTE ? 'x' : '-';
+
+          string date;
+          const char *datePtr = getRFC822LocalTime (fd.time_write, date, 32);
+
+          char dateFtpFormat[13];
+
+          dateFtpFormat[3] = ' ';
+          dateFtpFormat[6] = ' ';
+          dateFtpFormat[7] = ' ';
+          dateFtpFormat[12] = '\0';
+
+          int offset = datePtr[6] == ' ' ? 0 : 1;
+
+          //Day
+          dateFtpFormat[4] = datePtr[5];
+          dateFtpFormat[5] = datePtr[6];
+
+          //Month
+          dateFtpFormat[0] = datePtr[7 + offset];
+          dateFtpFormat[1] = datePtr[8 + offset];
+          dateFtpFormat[2] = datePtr[9 + offset];
+
+          //If the file was modified in the last 6 months
+          //show the hour instead of the year
+          if (now - fd.time_write < 60 * 60 * 183 && now > fd.time_write)
+            {
+              //Hour
+              dateFtpFormat[7] = datePtr[16 + offset];
+              dateFtpFormat[8] = datePtr[17 + offset];
+              dateFtpFormat[9] = ':';
+              dateFtpFormat[10] = datePtr[19 + offset];
+              dateFtpFormat[11] = datePtr[20 + offset];
+            }
+          else
+            {
+              //Year
+              dateFtpFormat[8] = datePtr[11 + offset];
+              dateFtpFormat[9] = datePtr[12 + offset];
+              dateFtpFormat[10] = datePtr[13 + offset];
+              dateFtpFormat[11] = datePtr[14 + offset];
+            }
+
+          char nlinkStr[12];
+          memset (nlinkStr, 0, sizeof (char) * 12);
 #ifndef WIN32
-	  nlink_t nlink = 1;
-	  nlink = fd.getStatStruct ()->st_nlink;
-	  sprintf (nlinkStr, "%lu", (u_long) nlink);
+          nlink_t nlink = 1;
+          nlink = fd.getStatStruct ()->st_nlink;
+          sprintf (nlinkStr, "%lu", (u_long) nlink);
 #endif
 
-	  char fdSizeStr[12];
-	  sprintf (fdSizeStr, "%li", fd.size);
+          char fdSizeStr[12];
+          sprintf (fdSizeStr, "%li", fd.size);
 
-	  secondaryBuffer << (const char *) perm << " " << nlinkStr << " "
-	    << username << " " << username << " " << fdSizeStr
-	    << " " << (const char *) dateFtpFormat << " "
-	    << fd.name << "\r\n";
+          secondaryBuffer << (const char *) perm << " " << nlinkStr << " "
+                          << username << " " << username << " " << fdSizeStr
+                          << " " << (const char *) dateFtpFormat << " "
+                          << fd.name << "\r\n";
 
-	}
+        }
       while (!fd.findnext ());
       fd.findclose ();
     }
@@ -1871,97 +1855,98 @@ Ftp::list (const std::string & sParam /*= ""*/ )
       FilesUtility::splitPath (sLocalPath, sDir, sFileName);
       FindData fd;
       if (fd.findfirst (sDir))
-	{
-	  ftpReply (450);
-	  closeDataConnection ();
-	  return;
-	}
+        {
+          ftpReply (450);
+          closeDataConnection ();
+          return;
+        }
       do
-	{
-	  if (strcmp (fd.name, sFileName.c_str ()) != 0)
-	    continue;
-
-	  perm[10] = '\0';
-	  perm[0] = fd.attrib == FILE_ATTRIBUTE_DIRECTORY ? 'd' : '-';
-
-	  string completeFileName (sDir);
-	  completeFileName.append (fd.name);
-
-	  int guestMask = checkRights ("guest", "", completeFileName, -1);
-	  int pMask = checkRights (username, password, completeFileName, -1);
-	  //Owner and group permissions are the same.
-	  perm[1] = perm[4] = pMask & MYSERVER_PERMISSION_READ ? 'r' : '-';
-	  perm[2] = perm[5] = pMask & MYSERVER_PERMISSION_WRITE ? 'w' : '-';
-	  perm[3] = perm[6] = pMask & MYSERVER_PERMISSION_EXECUTE ? 'x' : '-';
-
-	  //Permission for All are the permission for Guest
-	  perm[7] = guestMask & MYSERVER_PERMISSION_READ ? 'r' : '-';
-	  perm[8] = guestMask & MYSERVER_PERMISSION_WRITE ? 'w' : '-';
-	  perm[9] = guestMask & MYSERVER_PERMISSION_EXECUTE ? 'x' : '-';
-
-	  string date;
-	  const char *datePtr = getRFC822LocalTime (fd.time_write, date, 32);
-
-	  char dateFtpFormat[13];
-
-	  dateFtpFormat[3] = ' ';
-	  dateFtpFormat[6] = ' ';
-	  dateFtpFormat[7] = ' ';
-	  dateFtpFormat[12] = '\0';
-
-	  int offset = datePtr[6] == ' ' ? 0 : 1;
-
-	  //Day
-	  dateFtpFormat[4] = datePtr[5];
-	  dateFtpFormat[5] = datePtr[6];
-
-	  //Month
-	  dateFtpFormat[0] = datePtr[7 + offset];
-	  dateFtpFormat[1] = datePtr[8 + offset];
-	  dateFtpFormat[2] = datePtr[9 + offset];
-
-	  //If the file was modified in the last 6 months
-	  //show the hour instead of the year
-	  if (now - fd.time_write < 60 * 60 * 183 && now > fd.time_write)
-	    {
-	      //Hour
-	      dateFtpFormat[7] = datePtr[16 + offset];
-	      dateFtpFormat[8] = datePtr[17 + offset];
-	      dateFtpFormat[9] = ':';
-	      dateFtpFormat[10] = datePtr[19 + offset];
-	      dateFtpFormat[11] = datePtr[20 + offset];
-	    }
-	  else
-	    {
-	      //Year
-	      dateFtpFormat[8] = datePtr[11 + offset];
-	      dateFtpFormat[9] = datePtr[12 + offset];
-	      dateFtpFormat[10] = datePtr[13 + offset];
-	      dateFtpFormat[11] = datePtr[14 + offset];
-	    }
-
-	  char nlinkStr[12];
-	  memset (nlinkStr, 0, sizeof (char) * 12);
+        {
+          if (strcmp (fd.name, sFileName.c_str ()) != 0)
+            continue;
+
+          perm[10] = '\0';
+          perm[0] = fd.attrib == FILE_ATTRIBUTE_DIRECTORY ? 'd' : '-';
+
+          string completeFileName (sDir);
+          completeFileName.append (fd.name);
+
+          int guestMask = checkRights ("guest", "", completeFileName, -1);
+          int pMask = checkRights (username, password, completeFileName, -1);
+          //Owner and group permissions are the same.
+          perm[1] = perm[4] = pMask & MYSERVER_PERMISSION_READ ? 'r' : '-';
+          perm[2] = perm[5] = pMask & MYSERVER_PERMISSION_WRITE ? 'w' : '-';
+          perm[3] = perm[6] = pMask & MYSERVER_PERMISSION_EXECUTE ? 'x' : '-';
+
+          //Permission for All are the permission for Guest
+          perm[7] = guestMask & MYSERVER_PERMISSION_READ ? 'r' : '-';
+          perm[8] = guestMask & MYSERVER_PERMISSION_WRITE ? 'w' : '-';
+          perm[9] = guestMask & MYSERVER_PERMISSION_EXECUTE ? 'x' : '-';
+
+          string date;
+          const char *datePtr = getRFC822LocalTime (fd.time_write, date, 32);
+
+          char dateFtpFormat[13];
+
+          dateFtpFormat[3] = ' ';
+          dateFtpFormat[6] = ' ';
+          dateFtpFormat[7] = ' ';
+          dateFtpFormat[12] = '\0';
+
+          int offset = datePtr[6] == ' ' ? 0 : 1;
+
+          //Day
+          dateFtpFormat[4] = datePtr[5];
+          dateFtpFormat[5] = datePtr[6];
+
+          //Month
+          dateFtpFormat[0] = datePtr[7 + offset];
+          dateFtpFormat[1] = datePtr[8 + offset];
+          dateFtpFormat[2] = datePtr[9 + offset];
+
+          //If the file was modified in the last 6 months
+          //show the hour instead of the year
+          if (now - fd.time_write < 60 * 60 * 183 && now > fd.time_write)
+            {
+              //Hour
+              dateFtpFormat[7] = datePtr[16 + offset];
+              dateFtpFormat[8] = datePtr[17 + offset];
+              dateFtpFormat[9] = ':';
+              dateFtpFormat[10] = datePtr[19 + offset];
+              dateFtpFormat[11] = datePtr[20 + offset];
+            }
+          else
+            {
+              //Year
+              dateFtpFormat[8] = datePtr[11 + offset];
+              dateFtpFormat[9] = datePtr[12 + offset];
+              dateFtpFormat[10] = datePtr[13 + offset];
+              dateFtpFormat[11] = datePtr[14 + offset];
+            }
+
+          char nlinkStr[12];
+          memset (nlinkStr, 0, sizeof (char) * 12);
 #ifndef WIN32
-	  nlink_t nlink = 1;
-	  nlink = fd.getStatStruct ()->st_nlink;
-	  sprintf (nlinkStr, "%lu", (u_long) nlink);
+          nlink_t nlink = 1;
+          nlink = fd.getStatStruct ()->st_nlink;
+          sprintf (nlinkStr, "%lu", (u_long) nlink);
 #endif
 
-	  char fdSizeStr[12];
-	  sprintf (fdSizeStr, "%li", fd.size);
+          char fdSizeStr[12];
+          sprintf (fdSizeStr, "%li", fd.size);
 
-	  secondaryBuffer << (const char *) perm << " " << nlinkStr << " "
-	    << username << " " << username << " " << fdSizeStr
-	    << " " << (const char *) dateFtpFormat << " "
-	    << fd.name << "\r\n";
-	}
+          secondaryBuffer << (const char *) perm << " " << nlinkStr << " "
+                          << username << " " << username << " " << fdSizeStr
+                          << " " << (const char *) dateFtpFormat << " "
+                          << fd.name << "\r\n";
+        }
       while (!fd.findnext ());
       fd.findclose ();
     }
+
   if (pFtpuserData->m_pDataConnection->socket->
       send (td.secondaryBuffer->getBuffer (),
-	    (u_long) td.secondaryBuffer->getLength (), 0) == SOCKET_ERROR)
+            (u_long) td.secondaryBuffer->getLength (), 0) == SOCKET_ERROR)
     {
       ftpReply (451);
     }
@@ -2021,19 +2006,18 @@ Ftp::nlst (const std::string & sParam /* = "" */ )
   do
     {
       if (fd.name[0] == '.' || !strcmpi (fd.name, secName))
-	continue;
+        continue;
 
       if (!sParam.empty ())
-	secondaryBuffer << sParam << "/";
+        secondaryBuffer << sParam << "/";
       secondaryBuffer << fd.name << "\r\n";
     }
   while (!fd.findnext ());
-
   fd.findclose ();
 
   if (pFtpuserData->m_pDataConnection->socket->
       send (td.secondaryBuffer->getBuffer (),
-	    (u_long) td.secondaryBuffer->getLength (), 0) == SOCKET_ERROR)
+            (u_long) td.secondaryBuffer->getLength (), 0) == SOCKET_ERROR)
     {
       ftpReply (451);
     }
@@ -2066,35 +2050,34 @@ Ftp::escapeTelnet (MemBuf & In, MemBuf & Out)
   while ((u_int) (pIn - In.getBuffer ()) < In.getLength ())
     {
       if (*pIn == '\377')
-	{
-	  szReply[0] = *pIn++;
-	  if (*pIn == '\0')
-	    break;
-	  switch (*pIn)
-	    {
-	    case '\375':	//DO
-	    case '\376':	//DONT
-	      szReply[1] = '\374';
-	      pIn++;
-	      break;
-	    case '\373':	//WILL
-	    case '\374':	//WONT
-	      szReply[1] = '\376';
-	      pIn++;
-	      break;
-	    case '\377':
-	      szReply[1] = '\0';
-	      Out << *pIn;
-	      break;
-
-	    default:
-	      pIn++;
-	      continue;
-	    }
-	  szReply[2] = *pIn++;
-	  ftpReply (-1, szReply);
-	  continue;
-	}
+        {
+          szReply[0] = *pIn++;
+          if (*pIn == '\0')
+            break;
+          switch (*pIn)
+            {
+            case '\375':	//DO
+            case '\376':	//DONT
+              szReply[1] = '\374';
+            pIn++;
+            break;
+            case '\373':	//WILL
+            case '\374':	//WONT
+              szReply[1] = '\376';
+            pIn++;
+            break;
+            case '\377':
+              szReply[1] = '\0';
+              Out << *pIn;
+              break;
+            default:
+              pIn++;
+              continue;
+            }
+          szReply[2] = *pIn++;
+          ftpReply (-1, szReply);
+          continue;
+        }
       Out << *pIn++;
     }
   Out << '\0';
@@ -2115,7 +2098,7 @@ void Ftp::removePipelinedCmds (MemBuf & In, MemBuf & Out)
     {
       Out << c;
       if (c == '\n')
-	break;
+        break;
     }
   Out << '\0';
 }
@@ -2183,8 +2166,8 @@ void Ftp::cwd (const std::string & sPath)
   else if (sPath.size () != 1 || sPath[0] != '.')
     {
       if (pFtpuserData->m_cwd.size () &&
-	  pFtpuserData->m_cwd[pFtpuserData->m_cwd.size () - 1] != '/')
-	pFtpuserData->m_cwd += "/";
+          pFtpuserData->m_cwd[pFtpuserData->m_cwd.size () - 1] != '/')
+        pFtpuserData->m_cwd += "/";
       pFtpuserData->m_cwd += sPath;
     }
 
@@ -2215,7 +2198,7 @@ void Ftp::syst ()
 #ifdef WIN32
     sTempText.replace (n, 2, "WIN32");
 #else
-    sTempText.replace (n, 2, "UNIX type: L8");
+  sTempText.replace (n, 2, "UNIX type: L8");
 #endif //WIN32
   ftpReply (215, sTempText);
 }
@@ -2237,8 +2220,8 @@ void Ftp::stat (const std::string & sParam /* = "" */ )
       std::ostringstream sstat;
       sstat << "Transferring file: " << pFtpuserData->m_sCurrentFileName;
       sstat << " " << pFtpuserData->
-	m_nBytesSent << " bytes transferred from " << pFtpuserData->
-	m_nFileSize;
+        m_nBytesSent << " bytes transferred from " << pFtpuserData->
+        m_nFileSize;
       ftpReply (213, sstat.str ());
     }
   else
@@ -2275,13 +2258,13 @@ void Ftp::stou (const std::string & sPath)
   do
     {
       if (nCount >= 0)
-	{
-	  std::ostringstream sRename;
-	  sRename << nCount;
-	  sTempPath = sPath + sRename.str ();
-	}
+        {
+          std::ostringstream sRename;
+          sRename << nCount;
+          sTempPath = sPath + sRename.str ();
+        }
       if (!buildLocalPath (sTempPath, sOutPath))
-	return;
+        return;
       nCount++;
     }
   while (FilesUtility::fileExists (sOutPath));
@@ -2304,10 +2287,9 @@ void Ftp::dele (const std::string & sPath)
 
   /* The security file doesn't exist in any case.  */
   const char *secName = td.st.getHashedData ("security.filename",
-					     MYSERVER_VHOST_CONF |
-					     MYSERVER_SERVER_CONF,
-					     ".security.xml");
-
+                                             MYSERVER_VHOST_CONF |
+                                             MYSERVER_SERVER_CONF,
+                                             ".security.xml");
   if (!strcmpi (sLocalFileName.c_str (), secName))
     {
       ftpReply (550);
@@ -2320,21 +2302,22 @@ void Ftp::dele (const std::string & sPath)
   if (strcmpi (pFtpuserData->m_suserName.c_str (), "anonymous") == 0)
     {
       if (checkRights ("Guest", "", sLocalFileName, MYSERVER_PERMISSION_WRITE)
-	  == 0)
-	{
-	  ftpReply (550);
-	  return;
-	}
+          == 0)
+        {
+          ftpReply (550);
+          return;
+        }
     }
   else
     {
       if (checkRights (pFtpuserData->m_suserName, pFtpuserData->m_sPass,
-		       sLocalFileName, MYSERVER_PERMISSION_WRITE) == 0)
-	{
-	  ftpReply (550);
-	  return;
-	}
+                       sLocalFileName, MYSERVER_PERMISSION_WRITE) == 0)
+        {
+          ftpReply (550);
+          return;
+        }
     }
+
   if (FilesUtility::deleteFile (sLocalPath) != 0)
     ftpReply (450);
   ftpReply (250);
@@ -2434,8 +2417,7 @@ void Ftp::rnfr (const std::string & sPath)
   FilesUtility::splitPath (sLocalPath, sLocalDir, sLocalFileName);
 
   const char *secName = td.st.getHashedData ("security.filename",
-					     MYSERVER_VHOST_CONF |
-					     MYSERVER_SERVER_CONF,
+					     MYSERVER_VHOST_CONF | MYSERVER_SERVER_CONF,
 					     ".security.xml");
 
   /* The security file doesn't exist in any case.  */

-----------------------------------------------------------------------

Summary of changes:
 myserver/include/base/socket/socket.h              |    2 +-
 myserver/src/base/socket/socket.cpp                |    2 +-
 myserver/src/base/unix_socket/unix_socket.cpp      |    2 +-
 .../connections_scheduler.cpp                      |   24 +-
 myserver/src/http_handler/http_file/http_file.cpp  |  895 +++++++++-----------
 myserver/src/protocol/ftp/ftp.cpp                  |  897 ++++++++++----------
 myserver/tests/test_socket.cpp                     |    2 +-
 myserver/tests/test_ssl_socket.cpp                 |    2 +-
 8 files changed, 869 insertions(+), 957 deletions(-)


hooks/post-receive
-- 
GNU MyServer



From MAILER-DAEMON Mon Aug 03 17:22:00 2009
Received: from mailman by lists.gnu.org with archive (Exim 4.43)
	id 1MY4yk-0001kl-Ev
	for mharc-myserver-commit@gnu.org; Mon, 03 Aug 2009 17:21:58 -0400
Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43)
	id 1MY4yh-0001j0-Ja
	for myserver-commit@gnu.org; Mon, 03 Aug 2009 17:21:55 -0400
Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43)
	id 1MY4yf-0001hp-IT
	for myserver-commit@gnu.org; Mon, 03 Aug 2009 17:21:54 -0400
Received: from [199.232.76.173] (port=53360 helo=monty-python.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43) id 1MY4ye-0001hU-1h
	for myserver-commit@gnu.org; Mon, 03 Aug 2009 17:21:52 -0400
Received: from savannah.gnu.org ([199.232.41.3]:37100 helo=sv.gnu.org)
	by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32)
	(Exim 4.60) (envelope-from <gscrivano@gnu.org>) id 1MY4yd-0005ya-Iw
	for myserver-commit@gnu.org; Mon, 03 Aug 2009 17:21:51 -0400
Received: from download.savannah.gnu.org ([199.232.41.75]
	helo=cvs.savannah.gnu.org) by sv.gnu.org with esmtp (Exim 4.69)
	(envelope-from <gscrivano@gnu.org>) id 1MY4yd-00043z-4t
	for myserver-commit@gnu.org; Mon, 03 Aug 2009 21:21:51 +0000
Received: from gscrivano by cvs.savannah.gnu.org with local (Exim 4.69)
	(envelope-from <gscrivano@savannah.gnu.org>) id 1MY4ya-00043V-Mx
	for myserver-commit@gnu.org; Mon, 03 Aug 2009 21:21:51 +0000
To: myserver-commit@gnu.org
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: b9fbdcecc5bccd3e9f027201557eaa656194319d
X-Git-Newrev: d44143d5850c8244068fdc2aa6a9a3bc7aa10872
Message-Id: <E1MY4ya-00043V-Mx@cvs.savannah.gnu.org>
From: Giuseppe Scrivano <gscrivano@gnu.org>
Date: Mon, 03 Aug 2009 21:21:49 +0000
X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2)
Subject: [myserver-commit] [SCM] GNU MyServer branch, master,
	updated. d44143d5850c8244068fdc2aa6a9a3bc7aa10872
X-BeenThere: myserver-commit@gnu.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: myserver-commit.gnu.org
List-Unsubscribe: <http://lists.gnu.org/mailman/listinfo/myserver-commit>,
	<mailto:myserver-commit-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/pipermail/myserver-commit>
List-Post: <mailto:myserver-commit@gnu.org>
List-Help: <mailto:myserver-commit-request@gnu.org?subject=help>
List-Subscribe: <http://lists.gnu.org/mailman/listinfo/myserver-commit>,
	<mailto:myserver-commit-request@gnu.org?subject=subscribe>
X-List-Received-Date: Mon, 03 Aug 2009 21:21:56 -0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU MyServer".

The branch, master has been updated
       via  d44143d5850c8244068fdc2aa6a9a3bc7aa10872 (commit)
      from  b9fbdcecc5bccd3e9f027201557eaa656194319d (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------


commit d44143d5850c8244068fdc2aa6a9a3bc7aa10872
Author: Giuseppe Scrivano <gscrivano@gnu.org>
Date:   Mon Aug 3 23:22:15 2009 +0200

    Clean temporary file used by the test.

diff --git a/myserver/tests/test_file.cpp b/myserver/tests/test_file.cpp
index 1d897e7..14b7da7 100644
--- a/myserver/tests/test_file.cpp
+++ b/myserver/tests/test_file.cpp
@@ -98,6 +98,8 @@ public:
     CPPUNIT_ASSERT_EQUAL (tfile->getSeek (), 1ul);
 
     CPPUNIT_ASSERT_EQUAL (tfile->close (), 0);
+
+    FilesUtility::deleteFile (fname.c_str ());
   }
 
   void testTruncate ()
@@ -127,6 +129,7 @@ public:
 
     CPPUNIT_ASSERT_EQUAL (tfile->getFileSize (), dataLen + dataLen / 2);
 
+    FilesUtility::deleteFile (fname.c_str ());
   }
 
 };

-----------------------------------------------------------------------

Summary of changes:
 myserver/tests/test_file.cpp |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)


hooks/post-receive
-- 
GNU MyServer



From MAILER-DAEMON Tue Aug 04 13:43:36 2009
Received: from mailman by lists.gnu.org with archive (Exim 4.43)
	id 1MYO2y-0007LS-A8
	for mharc-myserver-commit@gnu.org; Tue, 04 Aug 2009 13:43:36 -0400
Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43)
	id 1MYO2w-0007KN-TA
	for myserver-commit@gnu.org; Tue, 04 Aug 2009 13:43:34 -0400
Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43)
	id 1MYO2w-0007JS-A8
	for myserver-commit@gnu.org; Tue, 04 Aug 2009 13:43:34 -0400
Received: from [199.232.76.173] (port=58935 helo=monty-python.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43) id 1MYO2v-0007JK-IH
	for myserver-commit@gnu.org; Tue, 04 Aug 2009 13:43:33 -0400
Received: from savannah.gnu.org ([199.232.41.3]:52138 helo=sv.gnu.org)
	by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32)
	(Exim 4.60) (envelope-from <gscrivano@gnu.org>) id 1MYO2v-0004yY-53
	for myserver-commit@gnu.org; Tue, 04 Aug 2009 13:43:33 -0400
Received: from download.savannah.gnu.org ([199.232.41.75]
	helo=cvs.savannah.gnu.org) by sv.gnu.org with esmtp (Exim 4.69)
	(envelope-from <gscrivano@gnu.org>) id 1MYO2u-0000AO-L8
	for myserver-commit@gnu.org; Tue, 04 Aug 2009 17:43:32 +0000
Received: from gscrivano by cvs.savannah.gnu.org with local (Exim 4.69)
	(envelope-from <gscrivano@savannah.gnu.org>) id 1MYO2r-00009m-Fj
	for myserver-commit@gnu.org; Tue, 04 Aug 2009 17:43:32 +0000
To: myserver-commit@gnu.org
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: d44143d5850c8244068fdc2aa6a9a3bc7aa10872
X-Git-Newrev: 582ef5270d7e583a725575cd15f570cd64662610
Message-Id: <E1MYO2r-00009m-Fj@cvs.savannah.gnu.org>
From: Giuseppe Scrivano <gscrivano@gnu.org>
Date: Tue, 04 Aug 2009 17:43:30 +0000
X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2)
Subject: [myserver-commit] [SCM] GNU MyServer branch, master,
	updated. 582ef5270d7e583a725575cd15f570cd64662610
X-BeenThere: myserver-commit@gnu.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: myserver-commit.gnu.org
List-Unsubscribe: <http://lists.gnu.org/mailman/listinfo/myserver-commit>,
	<mailto:myserver-commit-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/pipermail/myserver-commit>
List-Post: <mailto:myserver-commit@gnu.org>
List-Help: <mailto:myserver-commit-request@gnu.org?subject=help>
List-Subscribe: <http://lists.gnu.org/mailman/listinfo/myserver-commit>,
	<mailto:myserver-commit-request@gnu.org?subject=subscribe>
X-List-Received-Date: Tue, 04 Aug 2009 17:43:35 -0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU MyServer".

The branch, master has been updated
       via  582ef5270d7e583a725575cd15f570cd64662610 (commit)
       via  911c59d1eecdd38395c00aa687ba47dc37ab78d5 (commit)
       via  baa7b7cfe59b4ed4c55cca5bb78cdd90d8c7c78a (commit)
      from  d44143d5850c8244068fdc2aa6a9a3bc7aa10872 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------


commit 582ef5270d7e583a725575cd15f570cd64662610
Author: Giuseppe Scrivano <gscrivano@gnu.org>
Date:   Tue Aug 4 19:23:21 2009 +0200

    Code refactoring for the class Thread.

diff --git a/myserver/src/base/thread/thread.cpp b/myserver/src/base/thread/thread.cpp
index acdbb4f..2e242b3 100755
--- a/myserver/src/base/thread/thread.cpp
+++ b/myserver/src/base/thread/thread.cpp
@@ -20,18 +20,19 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #include <include/base/utility.h>
 #include <include/base/thread/thread.h>
 
-extern "C" {
+extern "C"
+{
 #include <string.h>
 #include <stdlib.h>
 #include <stdarg.h>
 #include <stdio.h>
 #ifndef WIN32
-#include <errno.h>
-#include <netdb.h>
-#include <unistd.h>
+# include <errno.h>
+# include <netdb.h>
+# include <unistd.h>
 #include <signal.h>
 #ifdef HAVE_PTHREAD
-#include <pthread.h>
+# include <pthread.h>
 #endif
 #include <sys/wait.h>
 #endif
@@ -46,12 +47,12 @@ extern "C" {
 /*!
  *Sleep the caller thread for [TIME] microseconds.
  */
-void Thread::wait(u_long time)
+void Thread::wait (u_long time)
 {
 #ifdef WIN32
-  Sleep(time/1000);
+  Sleep (time / 1000);
 #else
-  usleep(time);
+  usleep (time);
 #endif
 
 }
@@ -63,60 +64,60 @@ void Thread::wait(u_long time)
  *\param arg Argument to pass to the new created thread.
  */
 #ifdef WIN32
-int Thread::create(ThreadID*  ID, 
-                   unsigned int  (_stdcall *startRoutine)(void *), 
-                   void * arg)
+int Thread::create (ThreadID*  ID,
+                    unsigned int  (_stdcall *startRoutine)(void *),
+                    void * arg)
 #endif
 #ifdef HAVE_PTHREAD
-int Thread::create(ThreadID*  ID, void * (*startRoutine)(void *), 
-                   void * arg)
+int Thread::create (ThreadID*  ID, void * (*startRoutine)(void *),
+                    void * arg)
 #endif
 {
 #ifdef WIN32
-  *ID = _beginthreadex(NULL, 0, startRoutine, arg, 0, NULL);
+  *ID = _beginthreadex (NULL, 0, startRoutine, arg, 0, NULL);
 
   return !(*ID);
 #endif
 #ifdef HAVE_PTHREAD
-  return pthread_create((pthread_t*)ID, NULL, startRoutine, (void *)(arg));
+  return pthread_create ((pthread_t*)ID, NULL, startRoutine, (void *)(arg));
 #endif
 }
 
 /*!
  *Get the calling thread ID.
  */
-ThreadID Thread::threadID()
+ThreadID Thread::threadID ()
 {
 #ifdef WIN32
-  return GetCurrentThreadId();
+  return GetCurrentThreadId ();
 #endif
 #ifdef HAVE_PTHREAD
-  return pthread_self();
+  return pthread_self ();
 #endif
 }
 
 /*!
  *Terminate the caller thread.
  */
-void Thread::terminate()
+void Thread::terminate ()
 {
 #ifdef WIN32
-  _endthread();
+  _endthread ();
 #endif
 #ifdef HAVE_PTHREAD
-  pthread_exit(0);
+  pthread_exit (0);
 #endif
 }
 
 /*!
  *Sleep until the thread identified by tid complete its execution.
  */
-int Thread::join(ThreadID tid)
+int Thread::join (ThreadID tid)
 {
 #ifdef WIN32
-  return WaitForSingleObject((void*)tid, INFINITE) != WAIT_OBJECT_0;
+  return WaitForSingleObject ((void*)tid, INFINITE) != WAIT_OBJECT_0;
 #endif
 #ifdef HAVE_PTHREAD
-  return pthread_join(tid, NULL);
+  return pthread_join (tid, NULL);
 #endif
 }



commit 911c59d1eecdd38395c00aa687ba47dc37ab78d5
Author: Giuseppe Scrivano <gscrivano@gnu.org>
Date:   Tue Aug 4 19:22:27 2009 +0200

    Free resources used by the thread.

diff --git a/myserver/src/server/server.cpp b/myserver/src/server/server.cpp
index ad46279..32d1ba9 100644
--- a/myserver/src/server/server.cpp
+++ b/myserver/src/server/server.cpp
@@ -762,15 +762,16 @@ int Server::purgeThreads()
     /*
      *Shutdown all threads that can be destroyed.
      */
-    if(thread->isToDestroy())
+    if (thread->isToDestroy ())
     {
-      if(destroyed < purgeThreadsThreshold)
+      if (destroyed < purgeThreadsThreshold)
       {
         list<ClientsThread*>::iterator next = it;
         next++;
 
-        thread->stop();
-        threads.erase(it);
+        thread->stop ();
+        thread->join ();
+        threads.erase (it);
         destroyed++;
 
         it = next;
@@ -780,10 +781,10 @@ int Server::purgeThreads()
     }
     else
     {
+      if (!thread->isStatic ())
+        if (ticks - thread->getTimeout () > MYSERVER_SEC (15))
+          thread->setToDestroy (1);
 
-      if(!thread->isStatic())
-        if(ticks - thread->getTimeout() > MYSERVER_SEC(15))
-          thread->setToDestroy(1);
       it++;
     }
   }



commit baa7b7cfe59b4ed4c55cca5bb78cdd90d8c7c78a
Author: Giuseppe Scrivano <gscrivano@gnu.org>
Date:   Tue Aug 4 18:56:16 2009 +0200

    Alloc dinamically the connection if there are not free slots in the slab.

diff --git a/myserver/src/server/server.cpp b/myserver/src/server/server.cpp
index b87fb40..ad46279 100644
--- a/myserver/src/server/server.cpp
+++ b/myserver/src/server/server.cpp
@@ -1375,7 +1375,7 @@ ConnectionPtr Server::addConnectionToList(Socket* s,
   vector<Multicast<string, void*, int>*>* handlers;
 
   connectionsPoolLock.lock ();
-  newConnection = connectionsPool.get ();
+  newConnection = connectionsPool.forcedGet ();
   connectionsPoolLock.unlock ();
 
   if(!newConnection)

-----------------------------------------------------------------------

Summary of changes:
 myserver/src/base/thread/thread.cpp |   49 ++++++++++++++++++-----------------
 myserver/src/server/server.cpp      |   17 ++++++-----
 2 files changed, 34 insertions(+), 32 deletions(-)


hooks/post-receive
-- 
GNU MyServer



From MAILER-DAEMON Tue Aug 04 16:09:05 2009
Received: from mailman by lists.gnu.org with archive (Exim 4.43)
	id 1MYQJl-0004n9-OT
	for mharc-myserver-commit@gnu.org; Tue, 04 Aug 2009 16:09:05 -0400
Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43)
	id 1MYQJj-0004ls-8a
	for myserver-commit@gnu.org; Tue, 04 Aug 2009 16:09:03 -0400
Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43)
	id 1MYQJh-0004lH-Ur
	for myserver-commit@gnu.org; Tue, 04 Aug 2009 16:09:02 -0400
Received: from [199.232.76.173] (port=35688 helo=monty-python.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43) id 1MYQJh-0004lE-Rk
	for myserver-commit@gnu.org; Tue, 04 Aug 2009 16:09:01 -0400
Received: from savannah.gnu.org ([199.232.41.3]:45906 helo=sv.gnu.org)
	by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32)
	(Exim 4.60) (envelope-from <gscrivano@gnu.org>) id 1MYQJh-0005rB-6d
	for myserver-commit@gnu.org; Tue, 04 Aug 2009 16:09:01 -0400
Received: from download.savannah.gnu.org ([199.232.41.75]
	helo=cvs.savannah.gnu.org) by sv.gnu.org with esmtp (Exim 4.69)
	(envelope-from <gscrivano@gnu.org>) id 1MYQJg-00008a-OT
	for myserver-commit@gnu.org; Tue, 04 Aug 2009 20:09:00 +0000
Received: from gscrivano by cvs.savannah.gnu.org with local (Exim 4.69)
	(envelope-from <gscrivano@savannah.gnu.org>) id 1MYQJg-00007z-64
	for myserver-commit@gnu.org; Tue, 04 Aug 2009 20:09:00 +0000
To: myserver-commit@gnu.org
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: 582ef5270d7e583a725575cd15f570cd64662610
X-Git-Newrev: 70c279cbf4b71bd0931a1e438c38cf65aee31ee7
Message-Id: <E1MYQJg-00007z-64@cvs.savannah.gnu.org>
From: Giuseppe Scrivano <gscrivano@gnu.org>
Date: Tue, 04 Aug 2009 20:09:00 +0000
X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2)
Subject: [myserver-commit] [SCM] GNU MyServer branch, master,
	updated. 70c279cbf4b71bd0931a1e438c38cf65aee31ee7
X-BeenThere: myserver-commit@gnu.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: myserver-commit.gnu.org
List-Unsubscribe: <http://lists.gnu.org/mailman/listinfo/myserver-commit>,
	<mailto:myserver-commit-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/pipermail/myserver-commit>
List-Post: <mailto:myserver-commit@gnu.org>
List-Help: <mailto:myserver-commit-request@gnu.org?subject=help>
List-Subscribe: <http://lists.gnu.org/mailman/listinfo/myserver-commit>,
	<mailto:myserver-commit-request@gnu.org?subject=subscribe>
X-List-Received-Date: Tue, 04 Aug 2009 20:09:03 -0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU MyServer".

The branch, master has been updated
       via  70c279cbf4b71bd0931a1e438c38cf65aee31ee7 (commit)
       via  14c1af986336bf420b2c3f65e44b30017145561e (commit)
       via  22db7d21bcb370b861af4c36d5ad80340177ab6f (commit)
       via  d442a438e1402ce99796e231a0b3f90e258df628 (commit)
      from  582ef5270d7e583a725575cd15f570cd64662610 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------


commit 70c279cbf4b71bd0931a1e438c38cf65aee31ee7
Author: Giuseppe Scrivano <gscrivano@gnu.org>
Date:   Tue Aug 4 22:05:50 2009 +0200

    BitVec class refactoring: use size_t as `capacity' and `dataSize' type instead of int.

diff --git a/myserver/include/base/bitvec/bitvec.h b/myserver/include/base/bitvec/bitvec.h
index 931966c..d59c14c 100644
--- a/myserver/include/base/bitvec/bitvec.h
+++ b/myserver/include/base/bitvec/bitvec.h
@@ -65,7 +65,7 @@ public:
     delete [] data;
   }
   
-  int getCapacity ()
+  size_t getCapacity ()
   {
     return capacity;
   }
@@ -75,8 +75,8 @@ private:
   int lastFound;
 
   long int *data;
-  int dataSize;
-  int capacity;
+  size_t dataSize;
+  size_t capacity;
 };
 
 #endif
diff --git a/myserver/tests/test_bitvec.cpp b/myserver/tests/test_bitvec.cpp
index 7d7487e..1c26f8d 100644
--- a/myserver/tests/test_bitvec.cpp
+++ b/myserver/tests/test_bitvec.cpp
@@ -47,11 +47,11 @@ public:
 
   void testInit ()
   {
-    int N = 100;
+    size_t N = 100;
     BitVec vec (N, false);
     CPPUNIT_ASSERT_EQUAL (vec.getCapacity (), N);
 
-    for (int i = 1; i < 100; i += 10)
+    for (size_t i = 1; i < 100; i += 10)
       {
         vec.init (i, false);
         CPPUNIT_ASSERT_EQUAL (vec.getCapacity (), i);
@@ -107,7 +107,7 @@ public:
   void testRevert ()
   {
     BitVec vec (200, true);
-    for (int i = 18; i < 120; i += 2)
+    for (size_t i = 18; i < 120; i += 2)
       {
         CPPUNIT_ASSERT_EQUAL (vec.get (i), true);
         vec.unset (i);
@@ -121,14 +121,14 @@ public:
   {
     BitVec vec (200, false);
 
-    for (int i = 0; i < 80; i += 3)
+    for (size_t i = 0; i < 80; i += 3)
       {
         CPPUNIT_ASSERT_EQUAL (vec.get (i), false);
         vec.set (i);
         CPPUNIT_ASSERT_EQUAL (vec.get (i), true);
       }
 
-    for (int i = 0; i < 80; i += 3)
+    for (size_t i = 0; i < 80; i += 3)
       {
         int j = vec.find ();
 



commit 14c1af986336bf420b2c3f65e44b30017145561e
Author: Giuseppe Scrivano <gscrivano@gnu.org>
Date:   Tue Aug 4 21:54:07 2009 +0200

    Slab class refactoring: use size_t for capacity, not int.  Add a check against the index returned by the bit mask.

diff --git a/myserver/include/base/slab/slab.h b/myserver/include/base/slab/slab.h
index d8d145c..375de35 100644
--- a/myserver/include/base/slab/slab.h
+++ b/myserver/include/base/slab/slab.h
@@ -27,13 +27,13 @@ template<class T>
 class Slab
 {
 public:
-  Slab<T> (int capacity) : mask (capacity, true)
+  Slab<T> (size_t capacity) : mask (capacity, true)
   {
     this->capacity = capacity;
     data = new T[capacity];
   }
 
-  void init (int capacity)
+  void init (size_t capacity)
   {
     mask.init (capacity, true);
     this->capacity = capacity;
@@ -41,7 +41,7 @@ public:
     data = new T[capacity];
   }
 
-  int getCapacity ()
+  size_t getCapacity ()
   {
     return capacity;
   }
@@ -60,7 +60,7 @@ public:
   {
     int i = mask.find ();
 
-    if (i == -1)
+    if (i == -1 || i >= capacity)
       return NULL;
 
     mask.unset (i);
@@ -70,9 +70,9 @@ public:
 
   void put (T* t)
   {
-    int i = t - data;
+    size_t i = t - data;
 
-    if (i >= 0 && i < capacity)
+    if (i < capacity)
       mask.set (i);
     else
       delete t;
@@ -85,7 +85,7 @@ public:
 
 private:
   BitVec mask;
-  int capacity;
+  size_t capacity;
   T *data;
 };
 
diff --git a/myserver/tests/test_slab.cpp b/myserver/tests/test_slab.cpp
index c33cd61..4d08d28 100644
--- a/myserver/tests/test_slab.cpp
+++ b/myserver/tests/test_slab.cpp
@@ -51,11 +51,11 @@ public:
 
   void testInit ()
   {
-    int N = 10;
+    size_t N = 10;
     Slab<TestSlabRecord> slabs (N);
     CPPUNIT_ASSERT_EQUAL (slabs.getCapacity (), N);
 
-    for (int i = 1; i < 100; i += 10)
+    for (size_t i = 1; i < 100; i += 10)
       {
         slabs.init (i);
         CPPUNIT_ASSERT_EQUAL (slabs.getCapacity (), i);
@@ -64,7 +64,7 @@ public:
 
   void testCapacity ()
   {
-    int N = 100;
+    size_t N = 100;
     Slab<TestSlabRecord> slabs (N);
 
     CPPUNIT_ASSERT_EQUAL (slabs.getCapacity (), N);
@@ -72,7 +72,7 @@ public:
 
   void testGet ()
   {
-    int N = 100;
+    size_t N = 100;
     Slab<TestSlabRecord> slabs (N);
     TestSlabRecord *recs[N];
 
@@ -94,7 +94,7 @@ public:
 
   void testForcedGet ()
   {
-    int N = 100;
+    size_t N = 100;
     Slab<TestSlabRecord> slabs (N);
     TestSlabRecord *recs[N * 2];
 



commit 22db7d21bcb370b861af4c36d5ad80340177ab6f
Author: Giuseppe Scrivano <gscrivano@gnu.org>
Date:   Tue Aug 4 21:49:47 2009 +0200

    Check that the returned index is less than the specified `capacity'.

diff --git a/myserver/src/base/bitvec/bitvec.cpp b/myserver/src/base/bitvec/bitvec.cpp
index 7b97185..c47871c 100644
--- a/myserver/src/base/bitvec/bitvec.cpp
+++ b/myserver/src/base/bitvec/bitvec.cpp
@@ -82,7 +82,9 @@ int BitVec::ffs ()
   for (int i = 0; i < dataSize; i++)
     if (p = ffsl (data[i]))
       {
-        return (i * sizeof (long int) * 8) + p - 1;
+        int r = (i * sizeof (long int) * 8) + p - 1;
+        if (r < capacity)
+          return r;
       }
 
   return -1;
@@ -106,8 +108,12 @@ int BitVec::find ()
   for (int i = lastFound; i < dataSize + lastFound; i++)
     if (p = ffsl (data[i % dataSize]))
       {
-        lastFound = i;
-        return (i * sizeof (long int) * 8) + p - 1;
+        int r = (i * sizeof (long int) * 8) + p - 1;
+        if (r < capacity)
+          {
+            lastFound = i;
+            return r;
+          }
       }
 
   return -1;



commit d442a438e1402ce99796e231a0b3f90e258df628
Author: Giuseppe Scrivano <gscrivano@gnu.org>
Date:   Tue Aug 4 21:47:49 2009 +0200

    Connection class refactoring: dinamically allocate members and hide them to be accessed directly from outside.

diff --git a/myserver/include/connection/connection.h b/myserver/include/connection/connection.h
index 2c60cb9..8b6cecd 100644
--- a/myserver/include/connection/connection.h
+++ b/myserver/include/connection/connection.h
@@ -57,40 +57,40 @@ public:
   void init ();
   void destroy ();
 
-	int getPriority();
-	void setPriority(int);
+	int getPriority ();
+	void setPriority (int);
 
-  u_long getID();
-  void setID(u_long);
+  u_long getID ();
+  void setID (u_long);
 
-  void setScheduled(int);
-  int isScheduled();
-  int allowDelete(bool bWait = false);
+  void setScheduled (int);
+  int isScheduled ();
+  int allowDelete (bool bWait = false);
 
-  u_short getPort();
-  void setPort(u_short);
+  u_short getPort ();
+  void setPort (u_short);
 	
-  u_short getLocalPort();
-  void setLocalPort(u_short);
+  u_short getLocalPort ();
+  void setLocalPort (u_short);
 
-  const char* getLogin();
-  void setLogin(const char*);
+  const char* getLogin ();
+  void setLogin (const char*);
 
-  const char* getPassword();
-  void setPassword(const char*);
+  const char* getPassword ();
+  void setPassword (const char*);
 
 	void setnTries(char);
-	char getnTries();
-	void incnTries();
+	char getnTries ();
+	void incnTries ();
 
-  const char* getIpAddr();
-  void setIpAddr(const char*);
+  const char* getIpAddr ();
+  void setIpAddr (const char*);
 
-  const char* getLocalIpAddr();
-  void setLocalIpAddr(const char*);
+  const char* getLocalIpAddr ();
+  void setLocalIpAddr (const char*);
 
-	u_long getTimeout();
-  void setTimeout(u_long);
+	u_long getTimeout ();
+  void setTimeout (u_long);
 
 	/*! Connection socket.  */
 	Socket *socket;
@@ -98,43 +98,46 @@ public:
 	/*! Pointer to an host structure.  */
 	Vhost *host;
 	
-  int getToRemove();
-  void setToRemove(int);
+  int getToRemove ();
+  void setToRemove (int);
+
+  int isForceControl ();
+  void setForceControl (int);	
 
-  int isForceControl();
-  void setForceControl(int);	
-	
-	/*! This buffer must be used only by the ClientsTHREAD class.  */
-	MemBuf connectionBuffer;
-	
 	/*! Buffer for the connection struct. Used by protocols.  */
 	ProtocolBuffer *protocolBuffer;
 
 	/*! Set the thread that is currently using the connection.  */
-	void setActiveThread(ClientsThread* t){thread = t;}
+	void setActiveThread (ClientsThread* t){thread = t;}
 
 	/*! Get the thread that is using the connection.  */
-	ClientsThread* getActiveThread(){return thread;}
+	ClientsThread* getActiveThread (){return thread;}
 
-  Connection()
+  Connection ()
   {
     init ();
   }
 
-  virtual ~Connection()
+  virtual ~Connection ()
   {
     destroy ();
   }
 
   /*! Get the continuation function.  */
-  continuationPROC getContinuation(){return continuation;}
+  continuationPROC getContinuation (){return continuation;}
 
   /*! Set a new continuation function.  */
-  void setContinuation(continuationPROC newContinuation){continuation = newContinuation;}
+  void setContinuation (continuationPROC newContinuation){continuation = newContinuation;}
 
   /*! Check if the connection/connection.has a continuation.  */
-  bool hasContinuation(){return continuation ? true : false;}
+  bool hasContinuation (){return continuation ? true : false;}
+
+  MemBuf *getConnectionBuffer (){return connectionBuffer;}
 protected:
+	
+	/*! This buffer must be used only by the ClientsTHREAD class.  */
+	MemBuf *connectionBuffer;
+
 	ClientsThread *thread;
 
   /*! Continuation function.  */
@@ -150,19 +153,19 @@ protected:
 	u_short port;
 
 	/*! Login name.  */
-	string login;
+	string *login;
 	
 	/*! Password used to log in.  */
-	string password;
+	string *password;
 
 	/*! # of tries for an authorized login.  */
 	char nTries;
 
 	/*! Remote IP address.  */
-	string ipAddr;
+	string *ipAddr;
 	
 	/*! Local IP used to connect to.  */
-	string localIpAddr;
+	string *localIpAddr;
 
 	/*! Local port used to connect to.  */
 	u_short localPort;
diff --git a/myserver/src/base/thread/thread.cpp b/myserver/src/base/thread/thread.cpp
index 2e242b3..b3416ef 100755
--- a/myserver/src/base/thread/thread.cpp
+++ b/myserver/src/base/thread/thread.cpp
@@ -30,11 +30,11 @@ extern "C"
 # include <errno.h>
 # include <netdb.h>
 # include <unistd.h>
-#include <signal.h>
-#ifdef HAVE_PTHREAD
-# include <pthread.h>
-#endif
-#include <sys/wait.h>
+# include <signal.h>
+# ifdef HAVE_PTHREAD
+#  include <pthread.h>
+# endif
+# include <sys/wait.h>
 #endif
 }
 
diff --git a/myserver/src/connection/connection.cpp b/myserver/src/connection/connection.cpp
index 48b2998..69f6564 100644
--- a/myserver/src/connection/connection.cpp
+++ b/myserver/src/connection/connection.cpp
@@ -25,11 +25,11 @@ void Connection::init ()
 {
   thread = 0;
   scheduled = 0;
-  login.assign("");
-  password.assign("");
+  login = new string ();
+  password = new string ();
+  ipAddr = new string ();
+  localIpAddr = new string ();
   nTries = 0;
-  ipAddr[0] = '\0';
-  localIpAddr[0] = '\0';
   port = 0;
   localPort = 0;
   timeout = 0;
@@ -40,6 +40,7 @@ void Connection::init ()
   socket = 0;
   priority = -1;
   continuation = NULL;
+	connectionBuffer = new MemBuf ();
 }
 
 /*!
@@ -47,33 +48,54 @@ void Connection::init ()
  */
 void Connection::destroy ()
 {
-  if(socket)
+  if (socket)
   {
-    socket->shutdown(SD_BOTH);
+    socket->shutdown (SD_BOTH);
     char buffer[256];
     int buffersize = 256;
     int err;
-    do
-    {
-      err = socket->recv(buffer, buffersize, 0);
-    }while((err != -1) && err);
 
-    socket->close();
+    socket->close ();
     delete socket;
+    socket = NULL;
   }
 
+  if (login)
+    delete login;
+
+  if (password)
+    delete password;
+
+  if(ipAddr)
+    delete ipAddr;
+
+  if (localIpAddr)
+    delete localIpAddr;
+
+  if (connectionBuffer)
+    delete connectionBuffer;
+
   if(protocolBuffer)
     delete protocolBuffer;
 
   /*! Remove the reference for the vhost. */
-  if(host)
-    ((Vhost*)host)->removeRef();
+  if (host)
+    ((Vhost*)host)->removeRef ();
+
+  login = NULL;
+  password = NULL;
+  ipAddr = NULL;
+  localIpAddr = NULL;
+  protocolBuffer = NULL;
+  connectionBuffer = NULL;
+
+  host = NULL;
 }
 
 /*!
  *Return the IDentifier for the connection.
  */
-u_long Connection::getID()
+u_long Connection::getID ()
 {
   return ID;
 }
@@ -82,7 +104,7 @@ u_long Connection::getID()
  *Set the IDentifier for the connection.
  *\param nID The new ID. 
  */
-void Connection::setID(u_long nID)
+void Connection::setID (u_long nID)
 {
   ID = nID;
 }
@@ -91,7 +113,7 @@ void Connection::setID(u_long nID)
  *Set if the connection is scheduled by the server.
  *\param np The new scheduled state.
  */
-void Connection::setScheduled(int np)
+void Connection::setScheduled (int np)
 {
   scheduled = np;
 }
@@ -99,7 +121,7 @@ void Connection::setScheduled(int np)
 /*!
  *Return if the connection is scheduled.
  */
-int Connection::isScheduled()
+int Connection::isScheduled ()
 {
   return scheduled;
 }
@@ -107,21 +129,21 @@ int Connection::isScheduled()
 /*!
  *Return if the connection may be deleted by the server.
  */
-int Connection::allowDelete(bool bWait/*= false*/)
+int Connection::allowDelete (bool bWait/*= false*/)
 {
-  if ( isScheduled () )
+  if (isScheduled ())
      return 0;
 
-  if ( protocolBuffer != NULL )
-    return protocolBuffer->allowDelete(bWait);
-  
+  if (protocolBuffer != NULL)
+    return protocolBuffer->allowDelete (bWait);
+
   return 1;
 }
 
 /*!
  *Get the port used by the connection.
  */
-u_short Connection::getPort()
+u_short Connection::getPort ()
 {
   return port;
 }
@@ -130,7 +152,7 @@ u_short Connection::getPort()
  *Set the port used by the connection.
  *\param newPort The new port.
  */
-void Connection::setPort(u_short newPort)
+void Connection::setPort (u_short newPort)
 {
   port = newPort;
 }
@@ -138,25 +160,25 @@ void Connection::setPort(u_short newPort)
 /*!
  *Get the login name used by the connection user.
  */
-const char* Connection::getLogin()
+const char* Connection::getLogin ()
 {
-  return login.c_str();
+  return login->c_str();
 }
 
 /*!
  *Set the login name for the connection user.
  *\param loginName The login name. 
  */
-void Connection::setLogin(const char* loginName)
+void Connection::setLogin (const char* loginName)
 {
-  login.assign(loginName);
+  login->assign (loginName);
 }
 
 /*!
  *Set the # of attempts to authenticate the user.
  *\arg n The new number of tries.
  */
-void Connection::setnTries(char n)
+void Connection::setnTries (char n)
 {
   nTries = n;
 }
@@ -164,14 +186,14 @@ void Connection::setnTries(char n)
 /*!
  *Get the attempts number to authenticate the user.
  */
-char Connection::getnTries()
+char Connection::getnTries ()
 {
   return nTries;
 }
 /*!
  *Increment by 1 the # of attempts to authenticate the user.
  */
-void Connection::incnTries()
+void Connection::incnTries ()
 {
   nTries++;
 }
@@ -179,41 +201,41 @@ void Connection::incnTries()
 /*!
  *Get the IP address of the client.
  */
-const char* Connection::getIpAddr()
+const char* Connection::getIpAddr ()
 {
-  return ipAddr.c_str();
+  return ipAddr->c_str();
 }
 
 /*!
  *Set the IP address of the client.
  *\param na The new IP address.
  */
-void Connection::setIpAddr(const char* na)
+void Connection::setIpAddr (const char* na)
 {
-  ipAddr.assign(na);
+  ipAddr->assign (na);
 }
 
 /*!
  *Get the IP address of the local interface used to connect to.
  */
-const char* Connection::getLocalIpAddr()
+const char* Connection::getLocalIpAddr ()
 {
-  return localIpAddr.c_str();
+  return localIpAddr->c_str ();
 }
 
 /*!
  *Set the IP address of the local interface used to connect to.
  *\param na The new local IP address.
  */
-void Connection::setLocalIpAddr(const char* na)
+void Connection::setLocalIpAddr (const char* na)
 {
-  localIpAddr.assign(na);
+  localIpAddr->assign (na);
 }
 
 /*!
  *Get the local port used to connect to.
  */
-u_short Connection::getLocalPort()
+u_short Connection::getLocalPort ()
 {
   return localPort;
 }
@@ -222,7 +244,7 @@ u_short Connection::getLocalPort()
  *Set the local port used to connect to.
  *\param np The new local port. 
  */
-void Connection::setLocalPort(u_short np)
+void Connection::setLocalPort (u_short np)
 {
   localPort = np;
 }
@@ -230,7 +252,7 @@ void Connection::setLocalPort(u_short np)
 /*!
  *Get the timeout to use with the connection.
  */
-u_long Connection::getTimeout()
+u_long Connection::getTimeout ()
 {
   return timeout;
 }
@@ -239,7 +261,7 @@ u_long Connection::getTimeout()
  *Set the timeout to use with the connection.
  *\param nTimeout The new timeout value. 
  */
-void Connection::setTimeout(u_long nTimeout)
+void Connection::setTimeout (u_long nTimeout)
 {
   timeout = nTimeout;
 }
@@ -247,7 +269,7 @@ void Connection::setTimeout(u_long nTimeout)
 /*!
  *Return if the connection must be removed and why.
  */
-int Connection::getToRemove()
+int Connection::getToRemove ()
 {
   return toRemove;
 }
@@ -256,7 +278,7 @@ int Connection::getToRemove()
  *Set the reason to remove the connection.
  *\param r Set if the connection/connection.has to be removed. 
  */
-void Connection::setToRemove(int r)
+void Connection::setToRemove (int r)
 {
   toRemove = r;
 }
@@ -264,7 +286,7 @@ void Connection::setToRemove(int r)
 /*!
  *Get if the connection is forced to be parsed.
  */
-int Connection::isForceControl()
+int Connection::isForceControl ()
 {
   return forceControl;
 }
@@ -272,7 +294,7 @@ int Connection::isForceControl()
  *Force the control of this connection on next server loop.
  *\param fp The new force control value even if there is new data. 
  */
-void Connection::setForceControl(int fp)
+void Connection::setForceControl (int fp)
 {
   forceControl = fp;
 }
@@ -280,24 +302,24 @@ void Connection::setForceControl(int fp)
 /*!
  *Return the password submitted by the user.
  */
-const char* Connection::getPassword()
+const char* Connection::getPassword ()
 {
-  return password.c_str();
+  return password->c_str();
 }
 
 /*!
  *Set the password for the user.
  *\param p The new password.
  */
-void Connection::setPassword(const char* p)
+void Connection::setPassword (const char* p)
 {
-  password.assign(p);
+  password->assign(p);
 }
 
 /*!
  *Get the connection priority.
  */
-int Connection::getPriority()
+int Connection::getPriority ()
 {
   return priority;
 }
@@ -306,7 +328,7 @@ int Connection::getPriority()
  *Set the connection priority.
  *\param p The new priority.
  */
-void Connection::setPriority(int p)
+void Connection::setPriority (int p)
 {
   priority = p;
 }
diff --git a/myserver/src/protocol/http/http.cpp b/myserver/src/protocol/http/http.cpp
index 32ce74c..93f18ce 100644
--- a/myserver/src/protocol/http/http.cpp
+++ b/myserver/src/protocol/http/http.cpp
@@ -1169,9 +1169,11 @@ Http::controlConnection (ConnectionPtr a, char* /*b1*/, char* /*b2*/,
 
                   if (remainingData)
                     {
+                      const char *data = (td->buffer->getBuffer ()
+                                          + td->nHeaderChars);
                       u_long toCopy = nbtr - td->nHeaderChars;
-                      a->connectionBuffer.setBuffer ((td->buffer->getBuffer () + td->nHeaderChars),
-                                                     toCopy);
+
+                      a->getConnectionBuffer()->setBuffer (data, toCopy);
                       retvalue = ClientsThread::INCOMPLETE_REQUEST_NO_WAIT;
                     }
                   else
diff --git a/myserver/src/server/clients_thread.cpp b/myserver/src/server/clients_thread.cpp
index ea4c07b..6fe7768 100644
--- a/myserver/src/server/clients_thread.cpp
+++ b/myserver/src/server/clients_thread.cpp
@@ -305,7 +305,7 @@ int ClientsThread::controlConnections()
     return 1;
 
   busy = 1;
-  dataRead = c->connectionBuffer.getLength();
+  dataRead = c->getConnectionBuffer ()->getLength ();
 
   err = c->socket->recv(&((char*)(buffer.getBuffer()))[dataRead],
                         MYSERVER_KB(8) - dataRead - 1, 0);
@@ -337,69 +337,65 @@ int ClientsThread::controlConnections()
 
   if(dataRead)
   {
-    memcpy((char*)buffer.getBuffer(), c->connectionBuffer, dataRead);
+    memcpy((char*)buffer.getBuffer(), c->getConnectionBuffer ()->getBuffer (), dataRead);
   }
 
   c->setActiveThread(this);
   try
   {
-    if (c->hasContinuation())
-    {
-      retcode = c->getContinuation()(c, 
-                                     (char*)buffer.getBuffer(), 
-                                     (char*)secondaryBuffer.getBuffer(), 
-                                     buffer.getRealLength(), 
-                                     secondaryBuffer.getRealLength(), 
-                                     nBytesToRead, 
-                                     id);
-      c->setContinuation(NULL);
-    }
+    if (c->hasContinuation ())
+      {
+        retcode = c->getContinuation ()(c, (char*)buffer.getBuffer(), 
+                                   (char*)secondaryBuffer.getBuffer(), 
+                                   buffer.getRealLength(), 
+                                   secondaryBuffer.getRealLength(), 
+                                   nBytesToRead, id);
+        c->setContinuation (NULL);
+      }
     else
-    {
-      protocol = server->getProtocol(c->host->getProtocolName());
-      if(protocol)
       {
-        retcode = protocol->controlConnection(c, 
-                                              (char*)buffer.getBuffer(), 
-                                              (char*)secondaryBuffer.getBuffer(), 
+        protocol = server->getProtocol (c->host->getProtocolName ());
+        if (protocol)
+          {
+            retcode = protocol->controlConnection(c, (char*)buffer.getBuffer(),
+                                             (char*)secondaryBuffer.getBuffer(), 
                                               buffer.getRealLength(), 
-                                              secondaryBuffer.getRealLength(), 
-                                              nBytesToRead, 
-                                              id);
+                                             secondaryBuffer.getRealLength(), 
+                                             nBytesToRead, id);
+          }
+        else
+          retcode = DELETE_CONNECTION;
       }
-      else
-        retcode = DELETE_CONNECTION;
-    }
   }
-  catch(...)
-  {
-    retcode = DELETE_CONNECTION;
-  };
+  catch (...)
+    {
+      retcode = DELETE_CONNECTION;
+    };
 
-  c->setTimeout( getTicks() );
+  c->setTimeout (getTicks ());
 
-  /*! Delete the connection.  */
-  if(retcode == DELETE_CONNECTION)
+  /* Delete the connection.  */
+  if (retcode == DELETE_CONNECTION)
   {
-    server->deleteConnection(c);
+    server->deleteConnection (c);
     return 0;
   }
-  /*! Keep the connection.  */
-  else if(retcode == KEEP_CONNECTION)
+  /* Keep the connection.  */
+  else if (retcode == KEEP_CONNECTION)
   {
-    c->connectionBuffer.setLength(0);
-    server->getConnectionsScheduler()->addWaitingConnection(c);
+    c->getConnectionBuffer ()->setLength (0);
+    server->getConnectionsScheduler ()->addWaitingConnection (c);
   }
-  /*! Incomplete request to buffer.  */
-  else if(retcode == INCOMPLETE_REQUEST)
+  /* Incomplete request to buffer.  */
+  else if (retcode == INCOMPLETE_REQUEST)
   {
     /*
      *If the header is incomplete save the current received
      *data in the connection buffer.
      *Save the header in the connection buffer.
      */
-    c->connectionBuffer.setBuffer(buffer.getBuffer(), nBytesToRead);
-    server->getConnectionsScheduler()->addWaitingConnection(c);
+    c->getConnectionBuffer ()->setBuffer (buffer.getBuffer (), nBytesToRead);
+    server->getConnectionsScheduler ()->addWaitingConnection (c);
   }
   /* Incomplete request to check before new data is available.  */
   else if(retcode == INCOMPLETE_REQUEST_NO_WAIT)

-----------------------------------------------------------------------

Summary of changes:
 myserver/include/base/bitvec/bitvec.h    |    6 +-
 myserver/include/base/slab/slab.h        |   14 ++--
 myserver/include/connection/connection.h |   87 +++++++++++----------
 myserver/src/base/bitvec/bitvec.cpp      |   12 ++-
 myserver/src/base/thread/thread.cpp      |   10 +-
 myserver/src/connection/connection.cpp   |  128 +++++++++++++++++------------
 myserver/src/protocol/http/http.cpp      |    6 +-
 myserver/src/server/clients_thread.cpp   |   78 +++++++++----------
 myserver/tests/test_bitvec.cpp           |   10 +-
 myserver/tests/test_slab.cpp             |   10 +-
 10 files changed, 195 insertions(+), 166 deletions(-)


hooks/post-receive
-- 
GNU MyServer



From MAILER-DAEMON Wed Aug 05 16:56:57 2009
Received: from mailman by lists.gnu.org with archive (Exim 4.43)
	id 1MYnXd-0001R4-2q
	for mharc-myserver-commit@gnu.org; Wed, 05 Aug 2009 16:56:57 -0400
Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43)
	id 1MYnXa-0001Q8-TD
	for myserver-commit@gnu.org; Wed, 05 Aug 2009 16:56:54 -0400
Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43)
	id 1MYnXY-0001No-Hs
	for myserver-commit@gnu.org; Wed, 05 Aug 2009 16:56:54 -0400
Received: from [199.232.76.173] (port=43549 helo=monty-python.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43) id 1MYnXY-0001NP-Az
	for myserver-commit@gnu.org; Wed, 05 Aug 2009 16:56:52 -0400
Received: from savannah.gnu.org ([199.232.41.3]:46074 helo=sv.gnu.org)
	by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32)
	(Exim 4.60) (envelope-from <gscrivano@gnu.org>) id 1MYnXX-0005MQ-JN
	for myserver-commit@gnu.org; Wed, 05 Aug 2009 16:56:52 -0400
Received: from download.savannah.gnu.org ([199.232.41.75]
	helo=cvs.savannah.gnu.org) by sv.gnu.org with esmtp (Exim 4.69)
	(envelope-from <gscrivano@gnu.org>) id 1MYnXW-0002cv-Vf
	for myserver-commit@gnu.org; Wed, 05 Aug 2009 20:56:51 +0000
Received: from gscrivano by cvs.savannah.gnu.org with local (Exim 4.69)
	(envelope-from <gscrivano@savannah.gnu.org>) id 1MYnXT-0002cK-T4
	for myserver-commit@gnu.org; Wed, 05 Aug 2009 20:56:50 +0000
To: myserver-commit@gnu.org
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: 70c279cbf4b71bd0931a1e438c38cf65aee31ee7
X-Git-Newrev: 0ab6af04e95a4f4db41f9bfb5385ccab319307fd
Message-Id: <E1MYnXT-0002cK-T4@cvs.savannah.gnu.org>
From: Giuseppe Scrivano <gscrivano@gnu.org>
Date: Wed, 05 Aug 2009 20:56:49 +0000
X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2)
Subject: [myserver-commit] [SCM] GNU MyServer branch, master,
	updated. 0ab6af04e95a4f4db41f9bfb5385ccab319307fd
X-BeenThere: myserver-commit@gnu.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: myserver-commit.gnu.org
List-Unsubscribe: <http://lists.gnu.org/mailman/listinfo/myserver-commit>,
	<mailto:myserver-commit-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/pipermail/myserver-commit>
List-Post: <mailto:myserver-commit@gnu.org>
List-Help: <mailto:myserver-commit-request@gnu.org?subject=help>
List-Subscribe: <http://lists.gnu.org/mailman/listinfo/myserver-commit>,
	<mailto:myserver-commit-request@gnu.org?subject=subscribe>
X-List-Received-Date: Wed, 05 Aug 2009 20:56:55 -0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU MyServer".

The branch, master has been updated
       via  0ab6af04e95a4f4db41f9bfb5385ccab319307fd (commit)
       via  16b1ddee345a0af3d378c1b5111c6f98cc9281b4 (commit)
       via  4039683a689de1d2aeb973c272eb2db907ed3028 (commit)
       via  c9cd743bc922211f2467400ac52a246c25c62842 (commit)
      from  70c279cbf4b71bd0931a1e438c38cf65aee31ee7 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------


commit 0ab6af04e95a4f4db41f9bfb5385ccab319307fd
Author: Giuseppe Scrivano <gscrivano@gnu.org>
Date:   Wed Aug 5 22:42:37 2009 +0200

    Protect the access to the connections map.

diff --git a/myserver/src/connections_scheduler/connections_scheduler.cpp b/myserver/src/connections_scheduler/connections_scheduler.cpp
index 803dc6e..853b327 100644
--- a/myserver/src/connections_scheduler/connections_scheduler.cpp
+++ b/myserver/src/connections_scheduler/connections_scheduler.cpp
@@ -69,7 +69,12 @@ static void newDataHandler(int fd, short event, void *param)
 
 void ConnectionsScheduler::newData(short event, SocketHandle handle)
 {
-  ConnectionPtr connection = connections.get (handle);
+  ConnectionPtr connection = NULL;
+
+  connectionsMutex.lock();
+  connection = connections.get (handle);
+  connectionsMutex.unlock();
+
 
   if(connection == NULL || server == NULL)
     return;



commit 16b1ddee345a0af3d378c1b5111c6f98cc9281b4
Author: Giuseppe Scrivano <gscrivano@gnu.org>
Date:   Wed Aug 5 22:25:40 2009 +0200

    Specify the Content-Length with keep-alive connections too when it is possible.

diff --git a/myserver/src/http_handler/http_file/http_file.cpp b/myserver/src/http_handler/http_file/http_file.cpp
index 9a15cce..f1839e4 100644
--- a/myserver/src/http_handler/http_file/http_file.cpp
+++ b/myserver/src/http_handler/http_file/http_file.cpp
@@ -408,7 +408,7 @@ int HttpFile::send (HttpThreadContext* td,
 
     useModifiers = chain.hasModifiersFilters ();
  
-    if (keepalive && !useModifiers)
+    if (!useModifiers)
       {
         ostringstream buffer;
         buffer << (u_int)bytesToSend;
@@ -424,10 +424,11 @@ int HttpFile::send (HttpThreadContext* td,
       {
         string s;
         HttpResponseHeader::Entry *e;
-        chain.getName(s);
+        chain.getName (s);
         e = td->response.other.get ("Content-Encoding");
+
         if (e)
-        e->value->assign (s);
+          e->value->assign (s);
         else
           {
             e = new HttpResponseHeader::Entry ();
@@ -436,21 +437,21 @@ int HttpFile::send (HttpThreadContext* td,
             td->response.other.put (*(e->name), e);
           }
         /* Do not use chunked transfer with old HTTP/1.0 clients.  */
-      if (keepalive)
-        {
-          HttpResponseHeader::Entry *e;
-          e = td->response.other.get ("Transfer-Encoding");
-          if(e)
-            e->value->assign ("chunked");
-          else
-            {
-              e = new HttpResponseHeader::Entry ();
-              e->name->assign ("Transfer-Encoding");
+        if (keepalive)
+          {
+            HttpResponseHeader::Entry *e;
+            e = td->response.other.get ("Transfer-Encoding");
+            if(e)
               e->value->assign ("chunked");
-              td->response.other.put (*(e->name), e);
-            }
-          useChunks = true;
-        }
+            else
+              {
+                e = new HttpResponseHeader::Entry ();
+                e->name->assign ("Transfer-Encoding");
+                e->value->assign ("chunked");
+                td->response.other.put (*(e->name), e);
+              }
+            useChunks = true;
+          }
       }
  
     u_long hdrLen = HttpHeaders::buildHTTPResponseHeader (td->buffer->getBuffer(),
@@ -461,15 +462,15 @@ int HttpFile::send (HttpThreadContext* td,
     if (!td->appendOutputs)
       {
         /* Send the HTTP header.  */
-      if (td->connection->socket->send(td->buffer->getBuffer(),
-                                       (u_long)td->buffer->getLength(),
-                                       0) == SOCKET_ERROR)
-        {
-          file->close ();
-          delete file;
-        chain.clearAllFilters ();
-        return 1;
-        }
+        if (td->connection->socket->send (td->buffer->getBuffer (),
+                                          (u_long) td->buffer->getLength (),
+                                          0) == SOCKET_ERROR)
+          {
+            file->close ();
+            delete file;
+            chain.clearAllFilters ();
+            return 1;
+          }
       }
 
     /*



commit 4039683a689de1d2aeb973c272eb2db907ed3028
Author: Giuseppe Scrivano <gscrivano@gnu.org>
Date:   Wed Aug 5 21:34:35 2009 +0200

    The main server purge threads loop avoids to join a sleeping thread.

diff --git a/myserver/src/server/clients_thread.cpp b/myserver/src/server/clients_thread.cpp
index 6fe7768..ce6c941 100644
--- a/myserver/src/server/clients_thread.cpp
+++ b/myserver/src/server/clients_thread.cpp
@@ -169,52 +169,47 @@ DEFINE_THREAD(clients_thread, pParam)
    *This function when is alive only call the controlConnections(...) function
    *of the ClientsThread class instance used for control the thread.
    */
-  while(ct->threadIsRunning) 
-  {
-    int ret;
-    try
-    {
-      /*
-       *If the thread can be destroyed don't use it.
-       */
-      if((!ct->isStatic()) && ct->isToDestroy())
-      {
-        Thread::wait(1000);
-        continue;
-      }
-
-      ret = ct->controlConnections();
-      ct->server->increaseFreeThread();
-      ct->busy = 0;
-
-      /*
-       *The thread served the connection, so update the timeout value.
-       */
-      if(ret != 1)
-      {
-        ct->setTimeout(getTicks());
-      }
-    }
-    catch( bad_alloc &ba)
-    {
-      ostringstream s;
-      s << "Bad alloc: " << ba.what();
-      
-      ct->server->logWriteln(s.str().c_str(), MYSERVER_LOG_MSG_ERROR);
-    }
-    catch( exception &e)
+  while (ct->threadIsRunning)
     {
-      ostringstream s;
-      s << "Error: " << e.what();
-
-      ct->server->logWriteln(s.str().c_str(), MYSERVER_LOG_MSG_ERROR);
-    };
-    
+      int ret;
+      try
+        {
+          /*
+           *If the thread can be destroyed don't use it.
+           */
+          if ((!ct->isStatic ()) && ct->isToDestroy ())
+            {
+              Thread::wait (1000);
+              break;
+            }
+
+          ret = ct->controlConnections ();
+          ct->server->increaseFreeThread ();
+          ct->busy = 0;
+
+          /*
+           *The thread served the connection, so update the timeout value.
+           */
+          if (ret != 1)
+            ct->setTimeout (getTicks ());
+        }
+      catch (bad_alloc &ba)
+        {
+          ostringstream s;
+          s << "Bad alloc: " << ba.what();
+
+          ct->server->logWriteln (s.str ().c_str (), MYSERVER_LOG_MSG_ERROR);
+        }
+      catch (exception &e)
+        {
+          ostringstream s;
+          s << "Error: " << e.what ();
+          ct->server->logWriteln (s.str ().c_str (), MYSERVER_LOG_MSG_ERROR);
+        };
   }
 
-  ct->server->decreaseFreeThread();
-
-  delete ct;
+  ct->server->decreaseFreeThread ();
+  ct->threadIsStopped = 1;
 
   Thread::terminate();
   return 0;
diff --git a/myserver/src/server/server.cpp b/myserver/src/server/server.cpp
index 32d1ba9..74d3435 100644
--- a/myserver/src/server/server.cpp
+++ b/myserver/src/server/server.cpp
@@ -762,31 +762,34 @@ int Server::purgeThreads()
     /*
      *Shutdown all threads that can be destroyed.
      */
-    if (thread->isToDestroy ())
-    {
-      if (destroyed < purgeThreadsThreshold)
+    if (thread->isStopped ())
       {
+        ClientsThread* thread = *it;
         list<ClientsThread*>::iterator next = it;
         next++;
 
-        thread->stop ();
         thread->join ();
         threads.erase (it);
-        destroyed++;
+        delete thread;
 
+        destroyed++;
         it = next;
       }
-      else
+    if (thread->isToDestroy ())
+      {
+        if (destroyed < purgeThreadsThreshold)
+          thread->stop ();
+
         it++;
-    }
+      }
     else
-    {
-      if (!thread->isStatic ())
-        if (ticks - thread->getTimeout () > MYSERVER_SEC (15))
-          thread->setToDestroy (1);
+      {
+        if (!thread->isStatic ())
+          if (ticks - thread->getTimeout () > MYSERVER_SEC (15))
+            thread->setToDestroy (1);
 
-      it++;
-    }
+        it++;
+      }
   }
   threadsMutex->unlock();
 
@@ -796,17 +799,17 @@ int Server::purgeThreads()
 /*!
  *Do the final cleanup.  Called once when the process is terminated.
  */
-void Server::finalCleanup()
+void Server::finalCleanup ()
 {
-  XmlParser::cleanXML();
-  freecwdBuffer();
-  myserver_safetime_destroy();
+  XmlParser::cleanXML ();
+  freecwdBuffer ();
+  myserver_safetime_destroy ();
 }
 
 /*!
  *Return the user identifier to use for the process.
  */
-const char *Server::getUid()
+const char *Server::getUid ()
 {
   return uid.c_str ();
 }
@@ -814,7 +817,7 @@ const char *Server::getUid()
 /*!
  *Return the group identifier to use for the process.
  */
-const char *Server::getGid()
+const char *Server::getGid ()
 {
   return gid.c_str ();
 }
@@ -822,7 +825,7 @@ const char *Server::getGid()
 /*!
  *Get a pointer to the language parser.
  */
-XmlParser* Server::getLanguageParser()
+XmlParser* Server::getLanguageParser ()
 {
   return &languageParser;
 }
@@ -830,7 +833,7 @@ XmlParser* Server::getLanguageParser()
 /*!
  *Returns the numbers of active connections the list.
  */
-u_long Server::getNumConnections()
+u_long Server::getNumConnections ()
 {
   return connectionsScheduler.getConnectionsNumber();
 }
@@ -838,15 +841,15 @@ u_long Server::getNumConnections()
 /*!
  *Returns the numbers of all the connections to the server.
  */
-u_long Server::getNumTotalConnections()
+u_long Server::getNumTotalConnections ()
 {
-  return connectionsScheduler.getNumTotalConnections();
+  return connectionsScheduler.getNumTotalConnections ();
 }
 
 /*!
  *Get the verbosity value.
  */
-u_long Server::getVerbosity()
+u_long Server::getVerbosity ()
 {
   return verbosity;
 }
@@ -854,7 +857,7 @@ u_long Server::getVerbosity()
 /*!
  *Set the verbosity value.
  */
-void  Server::setVerbosity(u_long nv)
+void  Server::setVerbosity (u_long nv)
 {
   verbosity=nv;
 }
@@ -862,7 +865,7 @@ void  Server::setVerbosity(u_long nv)
 /*!
  *Return a home directory object.
  */
-HomeDir* Server::getHomeDir()
+HomeDir* Server::getHomeDir ()
 {
   return &homeDir;
 }
@@ -870,7 +873,7 @@ HomeDir* Server::getHomeDir()
 /*!
  *Stop the execution of the server.
  */
-void Server::stop()
+void Server::stop ()
 {
   endServer = true;
 }
@@ -879,95 +882,89 @@ void Server::stop()
  *Unload the server.
  *Return nonzero on errors.
  */
-int Server::terminate()
+int Server::terminate ()
 {
-  list<ThreadID> threadsIds;
+  if (verbosity > 1)
+    logWriteln(languageParser.getValue ("MSG_STOPT"));
 
-  if(verbosity > 1)
-    logWriteln(languageParser.getValue("MSG_STOPT"));
+  listenThreads.terminate ();
 
-  listenThreads.terminate();
+  threadsMutex->lock ();
 
-  threadsMutex->lock();
-
-  for(list<ClientsThread*>::iterator it = threads.begin(); it != threads.end(); it++)
-  {
-    threadsIds.push_back((*it)->getThreadId());
-    (*it)->stop();
-  }
+  for (list<ClientsThread*>::iterator it = threads.begin ();
+       it != threads.end (); it++)
+    (*it)->stop ();
 
-  threadsMutex->unlock();
-  Socket::stopBlockingOperations(true);
+  threadsMutex->unlock ();
+  Socket::stopBlockingOperations (true);
 
-  connectionsScheduler.release();
+  connectionsScheduler.release ();
 
-  for(list<ThreadID>::iterator it = threadsIds.begin(); it != threadsIds.end(); it++)
-  {
-    Thread::join(*it);
-  }
+  for (list<ClientsThread*>::iterator it = threads.begin ();
+       it != threads.end (); it++)
+    {
+      Thread::join ((*it)->getThreadId ());
+      delete *it;
+    }
 
-  clearAllConnections();
+  clearAllConnections ();
 
   /* Clear the home directories data.  */
-  homeDir.clear();
+  homeDir.clear ();
 
-  if(verbosity > 1)
-    logWriteln(languageParser.getValue("MSG_TSTOPPED"));
+  if (verbosity > 1)
+    logWriteln (languageParser.getValue ("MSG_TSTOPPED"));
 
 
-  if(verbosity > 1)
-  {
-    logWriteln(languageParser.getValue("MSG_MEMCLEAN"));
-  }
+  if (verbosity > 1)
+    logWriteln (languageParser.getValue ("MSG_MEMCLEAN"));
 
-  freeHashedData();
+  freeHashedData ();
 
   /* Restore the blocking status in case of a reboot.  */
-  Socket::stopBlockingOperations(false);
+  Socket::stopBlockingOperations (false);
 
   ipAddresses = 0;
   vhostList = 0;
-  languageParser.close();
+  languageParser.close ();
 
-  if(mimeManager)
-  {
-    mimeManager->clean();
-    delete mimeManager;
-    mimeManager = 0;
-  }
+  if (mimeManager)
+    {
+      mimeManager->clean ();
+      delete mimeManager;
+      mimeManager = 0;
+    }
 
 #ifdef WIN32
   /*
    *Under WIN32 cleanup environment strings.
    */
-  FreeEnvironmentStrings((LPTSTR)envString);
+  FreeEnvironmentStrings ((LPTSTR)envString);
 #endif
 
-  getProcessServerManager()->clear();
+  getProcessServerManager ()->clear ();
 
-  filtersFactory.free();
+  filtersFactory.free ();
 
-  getPluginsManager()->unLoad();
+  getPluginsManager ()->unLoad ();
 
   delete connectionsMutex;
 
-  clearMulticastRegistry();
+  clearMulticastRegistry ();
 
-  globalData.clear();
+  globalData.clear ();
 
   /*
    *Free all the threads.
    */
-  threadsMutex->lock();
-  threads.clear();
-  threadsMutex->unlock();
+  threadsMutex->lock ();
+  threads.clear ();
+  threadsMutex->unlock ();
   delete threadsMutex;
 
   nStaticThreads = 0;
-  if(verbosity > 1)
-  {
-    logWriteln("MyServer is stopped");
-  }
+  if (verbosity > 1)
+    logWriteln ("MyServer is stopped");
   
   logManager->clear ();
   



commit c9cd743bc922211f2467400ac52a246c25c62842
Author: Giuseppe Scrivano <gscrivano@gnu.org>
Date:   Wed Aug 5 20:01:03 2009 +0200

    Ensure xml document root is not null.

diff --git a/myserver/src/conf/security/xml_validator.cpp b/myserver/src/conf/security/xml_validator.cpp
index a70b08b..e738849 100644
--- a/myserver/src/conf/security/xml_validator.cpp
+++ b/myserver/src/conf/security/xml_validator.cpp
@@ -189,7 +189,7 @@ int XmlValidator::getPermissionMaskImpl (SecurityToken* st,
 {
   XmlParser* xmlFile = getParser (st);
 
-  if (!xmlFile)
+  if (!xmlFile || !xmlFile->getDoc ())
     return 0;
 
   for (xmlNodePtr cur = xmlFile->getDoc ()->children; cur; cur = cur->next)

-----------------------------------------------------------------------

Summary of changes:
 myserver/src/conf/security/xml_validator.cpp       |    2 +-
 .../connections_scheduler.cpp                      |    7 +-
 myserver/src/http_handler/http_file/http_file.cpp  |   53 ++++----
 myserver/src/server/clients_thread.cpp             |   81 +++++------
 myserver/src/server/server.cpp                     |  149 ++++++++++----------
 5 files changed, 145 insertions(+), 147 deletions(-)


hooks/post-receive
-- 
GNU MyServer



From MAILER-DAEMON Thu Aug 06 13:49:23 2009
Received: from mailman by lists.gnu.org with archive (Exim 4.43)
	id 1MZ75f-0001W5-Q2
	for mharc-myserver-commit@gnu.org; Thu, 06 Aug 2009 13:49:23 -0400
Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43)
	id 1MZ75d-0001W0-Ps
	for myserver-commit@gnu.org; Thu, 06 Aug 2009 13:49:21 -0400
Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43)
	id 1MZ75b-0001Vo-Tk
	for myserver-commit@gnu.org; Thu, 06 Aug 2009 13:49:20 -0400
Received: from [199.232.76.173] (port=48360 helo=monty-python.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43) id 1MZ75b-0001Vl-R4
	for myserver-commit@gnu.org; Thu, 06 Aug 2009 13:49:19 -0400
Received: from savannah.gnu.org ([199.232.41.3]:56521 helo=sv.gnu.org)
	by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32)
	(Exim 4.60) (envelope-from <gscrivano@gnu.org>) id 1MZ75b-0000RW-49
	for myserver-commit@gnu.org; Thu, 06 Aug 2009 13:49:19 -0400
Received: from download.savannah.gnu.org ([199.232.41.75]
	helo=cvs.savannah.gnu.org) by sv.gnu.org with esmtp (Exim 4.69)
	(envelope-from <gscrivano@gnu.org>) id 1MZ75a-0004e4-MK
	for myserver-commit@gnu.org; Thu, 06 Aug 2009 17:49:18 +0000
Received: from gscrivano by cvs.savannah.gnu.org with local (Exim 4.69)
	(envelope-from <gscrivano@savannah.gnu.org>) id 1MZ75Z-0004dY-H3
	for myserver-commit@gnu.org; Thu, 06 Aug 2009 17:49:18 +0000
To: myserver-commit@gnu.org
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: 0ab6af04e95a4f4db41f9bfb5385ccab319307fd
X-Git-Newrev: ef155de41266092eff980e8ce0593f996a0fc099
Message-Id: <E1MZ75Z-0004dY-H3@cvs.savannah.gnu.org>
From: Giuseppe Scrivano <gscrivano@gnu.org>
Date: Thu, 06 Aug 2009 17:49:17 +0000
X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2)
Subject: [myserver-commit] [SCM] GNU MyServer branch, master,
	updated. ef155de41266092eff980e8ce0593f996a0fc099
X-BeenThere: myserver-commit@gnu.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: myserver-commit.gnu.org
List-Unsubscribe: <http://lists.gnu.org/mailman/listinfo/myserver-commit>,
	<mailto:myserver-commit-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/pipermail/myserver-commit>
List-Post: <mailto:myserver-commit@gnu.org>
List-Help: <mailto:myserver-commit-request@gnu.org?subject=help>
List-Subscribe: <http://lists.gnu.org/mailman/listinfo/myserver-commit>,
	<mailto:myserver-commit-request@gnu.org?subject=subscribe>
X-List-Received-Date: Thu, 06 Aug 2009 17:49:22 -0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU MyServer".

The branch, master has been updated
       via  ef155de41266092eff980e8ce0593f996a0fc099 (commit)
       via  4ab5842ae944798446e4e8d53e9591b28735ff71 (commit)
      from  0ab6af04e95a4f4db41f9bfb5385ccab319307fd (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------


commit ef155de41266092eff980e8ce0593f996a0fc099
Author: Giuseppe Scrivano <gscrivano@gnu.org>
Date:   Thu Aug 6 19:49:50 2009 +0200

    Use bool instead of int as type for booleans members.

diff --git a/myserver/include/server/clients_thread.h b/myserver/include/server/clients_thread.h
index 0488c2c..39fba2d 100644
--- a/myserver/include/server/clients_thread.h
+++ b/myserver/include/server/clients_thread.h
@@ -59,38 +59,38 @@ public:
     */
     INCOMPLETE_REQUEST_NO_WAIT = 3
   };
-  MemBuf *getBuffer();
-  MemBuf *getSecondaryBuffer();
-  ClientsThread(Server* server);
-  ~ClientsThread();
-  void stop();
-  int getTimeout();
-  void setTimeout(int);
-  int isToDestroy();
-  void setToDestroy(int);
-  int isStatic();
-  int isBusy();
-  void setStatic(int);
-  int run();
-  ThreadID getThreadId(){return tid;}
-  int join();
+  MemBuf *getBuffer ();
+  MemBuf *getSecondaryBuffer ();
+  ClientsThread (Server* server);
+  ~ClientsThread ();
+  void stop ();
+  int getTimeout ();
+  void setTimeout (int);
+  bool isToDestroy ();
+  void setToDestroy (bool);
+  bool isStatic();
+  bool isBusy();
+  void setStatic (bool);
+  int run ();
+  ThreadID getThreadId (){return tid;}
+  int join ();
 
 
 private:
   Server* server;
   ThreadID tid;
-  int toDestroy;
+  bool toDestroy;
   int timeout;
-  int initialized;
+  bool initialized;
   int staticThread;
   u_long id;
-  int busy;
-  int threadIsStopped;
-  int threadIsRunning;
+  bool busy;
+  bool threadIsStopped;
+  bool threadIsRunning;
   u_long buffersize;
   u_long secondaryBufferSize;
-  int isRunning();
-  int isStopped();
+  bool isRunning();
+  bool isStopped();
   FtpProtocol *ftpParser;
   HttpProtocol* httpParser;
   HttpsProtocol* httpsParser;
diff --git a/myserver/src/server/clients_thread.cpp b/myserver/src/server/clients_thread.cpp
index ce6c941..e32fb3b 100644
--- a/myserver/src/server/clients_thread.cpp
+++ b/myserver/src/server/clients_thread.cpp
@@ -32,38 +32,37 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #ifndef WIN32
 extern "C" 
 {
-#include <sys/socket.h>
-#include <netinet/in.h>
-#include <arpa/inet.h>
-#include <string.h>
-#include <signal.h>
-#include <unistd.h>
-#include <time.h>
-#ifdef HAVE_PTHREAD
-#include <pthread.h>
-#endif
-#include <sys/types.h>
-#include <sys/wait.h>
-
+# include <sys/socket.h>
+# include <netinet/in.h>
+# include <arpa/inet.h>
+# include <string.h>
+# include <signal.h>
+# include <unistd.h>
+# include <time.h>
+# ifdef HAVE_PTHREAD
+#  include <pthread.h>
+# endif
+# include <sys/types.h>
+# include <sys/wait.h>
 }
 #endif
 
 /*!
  *Construct the object.
  */
-ClientsThread::ClientsThread(Server* server)
+ClientsThread::ClientsThread (Server* server)
 {
   this->server = server;
-  busy = 0;
-  initialized = 0;
-  toDestroy = 0;
+  busy = false;
+  initialized = false;
+  toDestroy = false;
   staticThread = 0;
   nBytesToRead = 0;
 
-  httpParser = 0;
-  httpsParser = 0;
-  controlProtocolParser = 0;
-  ftpParser = 0;
+  httpParser = NULL;
+  httpsParser = NULL;
+  controlProtocolParser = NULL;
+  ftpParser = NULL;
 }
 
 /*!
@@ -71,35 +70,31 @@ ClientsThread::ClientsThread(Server* server)
  */
 ClientsThread::~ClientsThread()
 {
-  if(initialized == 0)
+  if (!initialized)
     return;
 
-  threadIsRunning = 0;
+  threadIsRunning = false;
 
-  if(httpParser)
+  if (httpParser)
     delete httpParser;
 
-  if(httpsParser)
+  if (httpsParser)
     delete httpsParser;
 
-  if(controlProtocolParser)
+  if (controlProtocolParser)
     delete controlProtocolParser;
 
-  if ( ftpParser != NULL )
+  if (ftpParser)
     delete ftpParser;
 
-  httpParser = 0;
-  httpsParser = 0;
-  controlProtocolParser = 0;
-
-  buffer.free();
-  secondaryBuffer.free();
+  buffer.free ();
+  secondaryBuffer.free ();
 }
 
 /*!
  *Get the timeout value.
  */
-int ClientsThread::getTimeout()
+int ClientsThread::getTimeout ()
 {
   return timeout;
 }
@@ -108,7 +103,7 @@ int ClientsThread::getTimeout()
  *Set the timeout value for the thread.
  *\param newTimeout The new timeout value.
  */
-void ClientsThread::setTimeout(int newTimeout)
+void ClientsThread::setTimeout (int newTimeout)
 {
   timeout = newTimeout;
 }
@@ -123,16 +118,16 @@ DEFINE_THREAD(clients_thread, pParam)
 #ifndef WIN32
   /* Block SigTerm, SigInt, and SigPipe in threads.  */
   sigset_t sigmask;
-  sigemptyset(&sigmask);
-  sigaddset(&sigmask, SIGPIPE);
-  sigaddset(&sigmask, SIGINT);
-  sigaddset(&sigmask, SIGTERM);
-  sigprocmask(SIG_SETMASK, &sigmask, NULL);
+  sigemptyset (&sigmask);
+  sigaddset (&sigmask, SIGPIPE);
+  sigaddset (&sigmask, SIGINT);
+  sigaddset (&sigmask, SIGTERM);
+  sigprocmask (SIG_SETMASK, &sigmask, NULL);
 #endif
   ClientsThread *ct = (ClientsThread*)pParam;
 
   /* Return an error if the thread is initialized.  */
-  if(ct->initialized)
+  if (ct->initialized)
 #ifdef WIN32
     return 1;
 #endif
@@ -140,34 +135,28 @@ DEFINE_THREAD(clients_thread, pParam)
   return (void*)1;
 #endif
 
-  ct->threadIsRunning = 1;
-  ct->threadIsStopped = 0;
-  ct->buffersize = ct->server->getBuffersize();
-  ct->secondaryBufferSize = ct->server->getBuffersize2();
+  ct->threadIsRunning = true;
+  ct->threadIsStopped = false;
+  ct->buffersize = ct->server->getBuffersize ();
+  ct->secondaryBufferSize = ct->server->getBuffersize2 ();
   
-  ct->buffer.setLength(ct->buffersize);
+  ct->buffer.setLength (ct->buffersize);
   ct->buffer.m_nSizeLimit = ct->buffersize;
-  ct->secondaryBuffer.setLength(ct->secondaryBufferSize);
+  ct->secondaryBuffer.setLength (ct->secondaryBufferSize);
   ct->secondaryBuffer.m_nSizeLimit = ct->secondaryBufferSize;
 
   /* Built-in protocols will be initialized at the first use.  */
-  ct->httpParser = 0;
-  ct->httpsParser = 0;
-  ct->controlProtocolParser = 0;
+  ct->initialized = true;
 
-  ct->initialized = 1;
-
-  ct->server->increaseFreeThread();
+  ct->server->increaseFreeThread ();
 
   /* Wait that the server is ready before go in the running loop.  */
-  while(!ct->server->isServerReady() && ct->threadIsRunning)
-  {
+  while (!ct->server->isServerReady() && ct->threadIsRunning)
     Thread::wait(500);
-  }
 
   /*
-   *This function when is alive only call the controlConnections(...) function
-   *of the ClientsThread class instance used for control the thread.
+   * This function when is alive only call the controlConnections(...) function
+   * of the ClientsThread class instance used for control the thread.
    */
   while (ct->threadIsRunning)
     {
@@ -198,7 +187,7 @@ DEFINE_THREAD(clients_thread, pParam)
           ostringstream s;
           s << "Bad alloc: " << ba.what();
 
-          ct->server->logWriteln (s.str ().c_str (), MYSERVER_LOG_MSG_ERROR);
+          ct->server->logWriteln  (s.str ().c_str (), MYSERVER_LOG_MSG_ERROR);
         }
       catch (exception &e)
         {
@@ -209,9 +198,9 @@ DEFINE_THREAD(clients_thread, pParam)
   }
 
   ct->server->decreaseFreeThread ();
-  ct->threadIsStopped = 1;
+  ct->threadIsStopped = true;
 
-  Thread::terminate();
+  Thread::terminate ();
   return 0;
 }
 
@@ -219,26 +208,26 @@ DEFINE_THREAD(clients_thread, pParam)
  *Join the thread.
  *
  */
-int ClientsThread::join()
+int ClientsThread::join ()
 {
-  return Thread::join(tid);
+  return Thread::join (tid);
 }
 
 
 /*!
  *Create the new thread.
  */
-int ClientsThread::run()
+int ClientsThread::run ()
 {
   tid = 0;
-  return Thread::create(&tid, &::clients_thread,
-                        (void *)this);
+  return Thread::create (&tid, &::clients_thread,
+                         (void *)this);
 }
 
 /*!
  *Returns if the thread can be destroyed.
  */
-int ClientsThread::isToDestroy()
+bool ClientsThread::isToDestroy()
 {
   return toDestroy;
 }
@@ -246,7 +235,7 @@ int ClientsThread::isToDestroy()
 /*!
  *Check if the thread is a static one.
  */
-int ClientsThread::isStatic()
+bool ClientsThread::isStatic()
 {
   return staticThread;
 }
@@ -255,7 +244,7 @@ int ClientsThread::isStatic()
  *Set the thread to be static.
  *\param value The new static value.
  */
-void ClientsThread::setStatic(int value)
+void ClientsThread::setStatic (bool value)
 {
   staticThread = value;
 }
@@ -264,7 +253,7 @@ void ClientsThread::setStatic(int value)
  *Set if the thread can be destroyed.
  *\param value The new destroy value.
  */
-void ClientsThread::setToDestroy(int value)
+void ClientsThread::setToDestroy(bool value)
 {
   toDestroy = value;
 }
@@ -277,7 +266,7 @@ void ClientsThread::setToDestroy(int value)
  *Return 1 if no connections to serve are available.
  *Return 0 in all other cases.
  */
-int ClientsThread::controlConnections()
+int ClientsThread::controlConnections ()
 {
   /*
    *Control the protocol used by the connection.
@@ -288,15 +277,14 @@ int ClientsThread::controlConnections()
   Protocol* protocol = 0;
   u_long dataRead = 0;
 
-  c = server->getConnection(this->id);
-
-  server->decreaseFreeThread();
+  c = server->getConnection (this->id);
 
+  server->decreaseFreeThread ();
 
   /*
    *Check if c is a valid connection structure.
    */
-  if(!c)
+  if (!c)
     return 1;
 
   busy = 1;
@@ -308,34 +296,28 @@ int ClientsThread::controlConnections()
   if(err == -1 && !server->deleteConnection(c))
     return 0;
 
-  buffer.setLength(dataRead + err);    
-
-  c->setForceControl(0);
-
+  buffer.setLength (dataRead + err);
+  c->setForceControl (0);
 
   /* Refresh with the right value.  */
   nBytesToRead = dataRead + err;
 
-  if((dataRead + err) < MYSERVER_KB(8))
-  {
+  if ((dataRead + err) < MYSERVER_KB (8))
     ((char*)buffer.getBuffer())[dataRead + err] = '\0';
-  }
   else
-  {
-    server->deleteConnection(c);
-    return 0;
-  }
-
+    {
+      server->deleteConnection (c);
+      return 0;
+    }
 
-  if(getTicks() - c->getTimeout() > 5000)
-    c->setnTries(0);
+  if (getTicks() - c->getTimeout () > 5000)
+    c->setnTries (0);
 
-  if(dataRead)
-  {
-    memcpy((char*)buffer.getBuffer(), c->getConnectionBuffer ()->getBuffer (), dataRead);
-  }
+  if (dataRead)
+    memcpy ((char*)buffer.getBuffer(), c->getConnectionBuffer ()->getBuffer (),
+            dataRead);
 
-  c->setActiveThread(this);
+  c->setActiveThread (this);
   try
   {
     if (c->hasContinuation ())
@@ -352,7 +334,7 @@ int ClientsThread::controlConnections()
         protocol = server->getProtocol (c->host->getProtocolName ());
         if (protocol)
           {
-            retcode = protocol->controlConnection(c, (char*)buffer.getBuffer(),
+            retcode = protocol->controlConnection (c, (char*)buffer.getBuffer(),
                                              (char*)secondaryBuffer.getBuffer(), 
                                               buffer.getRealLength(), 
                                              secondaryBuffer.getRealLength(), 
@@ -371,86 +353,86 @@ int ClientsThread::controlConnections()
 
   /* Delete the connection.  */
   if (retcode == DELETE_CONNECTION)
-  {
-    server->deleteConnection (c);
-    return 0;
-  }
+    {
+      server->deleteConnection (c);
+      return 0;
+    }
   /* Keep the connection.  */
   else if (retcode == KEEP_CONNECTION)
-  {
-    c->getConnectionBuffer ()->setLength (0);
-    server->getConnectionsScheduler ()->addWaitingConnection (c);
-  }
+    {
+      c->getConnectionBuffer ()->setLength (0);
+      server->getConnectionsScheduler ()->addWaitingConnection (c);
+    }
   /* Incomplete request to buffer.  */
   else if (retcode == INCOMPLETE_REQUEST)
-  {
-    /*
-     *If the header is incomplete save the current received
-     *data in the connection buffer.
-     *Save the header in the connection buffer.
-     */
-    c->getConnectionBuffer ()->setBuffer (buffer.getBuffer (), nBytesToRead);
-    server->getConnectionsScheduler ()->addWaitingConnection (c);
-  }
+    {
+      /*
+       *If the header is incomplete save the current received
+       *data in the connection buffer.
+       *Save the header in the connection buffer.
+       */
+      c->getConnectionBuffer ()->setBuffer (buffer.getBuffer (), nBytesToRead);
+      server->getConnectionsScheduler ()->addWaitingConnection (c);
+    }
   /* Incomplete request to check before new data is available.  */
-  else if(retcode == INCOMPLETE_REQUEST_NO_WAIT)
-  {
-    c->setForceControl(1);
-    server->getConnectionsScheduler()->addReadyConnection(c);
-  }    
+  else if (retcode == INCOMPLETE_REQUEST_NO_WAIT)
+    {
+      c->setForceControl (1);
+      server->getConnectionsScheduler ()->addReadyConnection (c);
+    }
 
   return 0;
 }
 
 /*!
- *Stop the thread.
+ * Stop the thread.
  */
 void ClientsThread::stop()
 {
   /*
-   *Set the run flag to False.
-   *When the current thread find the threadIsRunning
-   *flag setted to 0 automatically destroy the
-   *thread.
+   * Set the run flag to False.
+   * When the current thread find the threadIsRunning
+   * flag setted to 0 automatically destroy the
+   * thread.
    */
-  threadIsRunning = 0;
+  threadIsRunning = false;
 }
 
 /*!
- *Returns a non-null value if the thread is active.
+ * Returns a non-null value if the thread is active.
  */
-int ClientsThread::isRunning()
+bool ClientsThread::isRunning ()
 {
   return threadIsRunning;
 }
 
 /*!
- *Returns 1 if the thread is stopped.
+ * Returns if the thread is stopped.
  */
-int ClientsThread::isStopped()
+bool ClientsThread::isStopped ()
 {
   return threadIsStopped;
 }
 
 /*!
- *Get a pointer to the buffer.
+ * Get a pointer to the buffer.
  */
-MemBuf* ClientsThread::getBuffer()
+MemBuf* ClientsThread::getBuffer ()
 {
   return &buffer;
 }
 /*!
- *Get a pointer to the secondaryBuffer.
+ * Get a pointer to the secondary buffer.
  */
-MemBuf *ClientsThread::getSecondaryBuffer()
+MemBuf *ClientsThread::getSecondaryBuffer ()
 {
   return &secondaryBuffer;
 }
 
 /*!
- *Check if the thread is working.
+ * Check if the thread is working.
  */
-int ClientsThread::isBusy()
+bool ClientsThread::isBusy ()
 {
   return busy;
 }



commit 4ab5842ae944798446e4e8d53e9591b28735ff71
Author: Giuseppe Scrivano <gscrivano@gnu.org>
Date:   Thu Aug 6 19:39:11 2009 +0200

    Do not access just freed memory.

diff --git a/myserver/src/server/server.cpp b/myserver/src/server/server.cpp
index 74d3435..5922a41 100644
--- a/myserver/src/server/server.cpp
+++ b/myserver/src/server/server.cpp
@@ -747,14 +747,16 @@ void Server::displayBoot()
  *Removed threads that can be destroyed.
  *The function returns the number of threads that were destroyed.
  */
-int Server::purgeThreads()
+int Server::purgeThreads ()
 {
-  u_long ticks = getTicks();
+  u_long ticks = getTicks ();
   u_long destroyed = 0;
 
-  purgeThreadsThreshold = std::min(purgeThreadsThreshold << 1, nMaxThreads);
-  threadsMutex->lock();
-  for(list<ClientsThread*>::iterator it = threads.begin(); it != threads.end();)
+  purgeThreadsThreshold = std::min (purgeThreadsThreshold << 1,
+                                    nMaxThreads);
+  threadsMutex->lock ();
+  for (list<ClientsThread*>::iterator it = threads.begin ();
+       it != threads.end ();)
   {
     ClientsThread* thread = *it;
 
@@ -775,7 +777,7 @@ int Server::purgeThreads()
         destroyed++;
         it = next;
       }
-    if (thread->isToDestroy ())
+    else if (thread->isToDestroy ())
       {
         if (destroyed < purgeThreadsThreshold)
           thread->stop ();
@@ -791,9 +793,9 @@ int Server::purgeThreads()
         it++;
       }
   }
-  threadsMutex->unlock();
+  threadsMutex->unlock ();
 
-  return threads.size();
+  return threads.size ();
 }
 
 /*!

-----------------------------------------------------------------------

Summary of changes:
 myserver/include/server/clients_thread.h |   44 +++---
 myserver/src/server/clients_thread.cpp   |  248 ++++++++++++++----------------
 myserver/src/server/server.cpp           |   18 ++-
 3 files changed, 147 insertions(+), 163 deletions(-)


hooks/post-receive
-- 
GNU MyServer



From MAILER-DAEMON Sat Aug 08 06:14:31 2009
Received: from mailman by lists.gnu.org with archive (Exim 4.43)
	id 1MZiwZ-00020s-3H
	for mharc-myserver-commit@gnu.org; Sat, 08 Aug 2009 06:14:31 -0400
Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43)
	id 1MZiwX-00020e-0V
	for myserver-commit@gnu.org; Sat, 08 Aug 2009 06:14:29 -0400
Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43)
	id 1MZiwW-00020S-JP
	for myserver-commit@gnu.org; Sat, 08 Aug 2009 06:14:28 -0400
Received: from [199.232.76.173] (port=53595 helo=monty-python.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43) id 1MZiwW-00020P-63
	for myserver-commit@gnu.org; Sat, 08 Aug 2009 06:14:28 -0400
Received: from savannah.gnu.org ([199.232.41.3]:48193 helo=sv.gnu.org)
	by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32)
	(Exim 4.60) (envelope-from <gscrivano@gnu.org>) id 1MZiwV-0006lx-TA
	for myserver-commit@gnu.org; Sat, 08 Aug 2009 06:14:28 -0400
Received: from download.savannah.gnu.org ([199.232.41.75]
	helo=cvs.savannah.gnu.org) by sv.gnu.org with esmtp (Exim 4.69)
	(envelope-from <gscrivano@gnu.org>) id 1MZiwV-000468-DH
	for myserver-commit@gnu.org; Sat, 08 Aug 2009 10:14:27 +0000
Received: from gscrivano by cvs.savannah.gnu.org with local (Exim 4.69)
	(envelope-from <gscrivano@savannah.gnu.org>) id 1MZiwU-00045a-Lj
	for myserver-commit@gnu.org; Sat, 08 Aug 2009 10:14:27 +0000
To: myserver-commit@gnu.org
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: ef155de41266092eff980e8ce0593f996a0fc099
X-Git-Newrev: 5d93aeb906b5f2e25ee8dd030d665b89dd4f5cb9
Message-Id: <E1MZiwU-00045a-Lj@cvs.savannah.gnu.org>
From: Giuseppe Scrivano <gscrivano@gnu.org>
Date: Sat, 08 Aug 2009 10:14:27 +0000
X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2)
Subject: [myserver-commit] [SCM] GNU MyServer branch, master,
	updated. 5d93aeb906b5f2e25ee8dd030d665b89dd4f5cb9
X-BeenThere: myserver-commit@gnu.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: myserver-commit.gnu.org
List-Unsubscribe: <http://lists.gnu.org/mailman/listinfo/myserver-commit>,
	<mailto:myserver-commit-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/pipermail/myserver-commit>
List-Post: <mailto:myserver-commit@gnu.org>
List-Help: <mailto:myserver-commit-request@gnu.org?subject=help>
List-Subscribe: <http://lists.gnu.org/mailman/listinfo/myserver-commit>,
	<mailto:myserver-commit-request@gnu.org?subject=subscribe>
X-List-Received-Date: Sat, 08 Aug 2009 10:14:29 -0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU MyServer".

The branch, master has been updated
       via  5d93aeb906b5f2e25ee8dd030d665b89dd4f5cb9 (commit)
       via  bdbfa76cf7ff6a80f781b14825d03ecc37abe67b (commit)
      from  ef155de41266092eff980e8ce0593f996a0fc099 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------


commit 5d93aeb906b5f2e25ee8dd030d665b89dd4f5cb9
Author: Giuseppe Scrivano <gscrivano@gnu.org>
Date:   Sat Aug 8 12:10:12 2009 +0200

    The HTTP Content-Range header is inclusive for the last specified byte.  Fix a bug specifying the payload 1-byte bigger than it really is.

diff --git a/myserver/src/http_handler/http_file/http_file.cpp b/myserver/src/http_handler/http_file/http_file.cpp
index f1839e4..cfde37b 100644
--- a/myserver/src/http_handler/http_file/http_file.cpp
+++ b/myserver/src/http_handler/http_file/http_file.cpp
@@ -285,9 +285,9 @@ int HttpFile::send (HttpThreadContext* td,
     ret = file->seek (firstByte);
     if (ret)
       {
-        file->close();
+        file->close ();
         delete file;
-        return td->http->raiseHTTPError(500);
+        return td->http->raiseHTTPError (500);
       }
 
     /*
@@ -315,8 +315,8 @@ int HttpFile::send (HttpThreadContext* td,
      */
     if (useGzip)
       {
-        HttpRequestHeader::Entry* e = td->request.other.get("Accept-Encoding");
-        if(e)
+        HttpRequestHeader::Entry* e = td->request.other.get ("Accept-Encoding");
+        if (e)
           useGzip &= (e->value->find("gzip") != string::npos);
         else
           useGzip = false;
@@ -337,7 +337,7 @@ int HttpFile::send (HttpThreadContext* td,
         ostringstream buffer;
         td->response.httpStatus = 206;
         buffer << "bytes "<< (u_long)firstByte << "-"
-               << (u_long)lastByte << "/" << (u_long)filesize ;
+               << (u_long) (lastByte - 1) << "/" << (u_long)filesize;
 
         e = td->response.other.get ("Content-Range");
         if (e)



commit bdbfa76cf7ff6a80f781b14825d03ecc37abe67b
Author: Giuseppe Scrivano <gscrivano@gnu.org>
Date:   Sat Aug 8 12:02:30 2009 +0200

    Rollback to read/write when sendfile fails.

diff --git a/myserver/src/base/file/file.cpp b/myserver/src/base/file/file.cpp
index efd0989..ac4f2f7 100644
--- a/myserver/src/base/file/file.cpp
+++ b/myserver/src/base/file/file.cpp
@@ -437,28 +437,44 @@ int File::read (char* buffer, u_long buffersize, u_long* nbr)
 }
 
 /*!
- *Copy the file directly to the socket.
- *\param dest Destination socket.
- *\param firstByte File offset.
- *\param buf Temporary buffer that can be used by this function.
- *\param nbw Number of bytes sent.
+ * Copy the file directly to the socket.
+ * Return 0 on success.
+ *
+ * \param dest Destination socket.
+ * \param firstByte File offset.
+ * \param buf Temporary buffer that can be used by this function.
+ * \param nbw Number of bytes sent.
  */
 int File::fastCopyToSocket (Socket *dest, u_long firstByte, MemBuf *buf, u_long *nbw)
 {
+  *nbw = 0;
 #ifdef SENDFILE
   off_t offset = firstByte;
-  int ret = sendfile (dest->getHandle(), 
-                      getHandle(), &offset, getFileSize () - firstByte);
+  size_t fileSize = getFileSize ();
+  while (1)
+    {
+      int ret = sendfile (dest->getHandle (), getHandle (), &offset,
+                          fileSize - offset);
 
-  if (ret < 0)
-    return ret;
+      if (ret < 0)
+        {
+          /* Rollback to read/write on EINVAL or ENOSYS.  */
+          if (errno == EINVAL || errno == ENOSYS)
+            break;
 
-  *nbw = ret;
-  return 0;
+          return -1;
+        }
+
+      *nbw += ret;
+
+      if (fileSize == offset)
+        return 0;
+    }
+
+  firstByte = offset;
 #else
   char *buffer = buf->getBuffer ();
   u_long size = buf->getRealLength ();
-  *nbw = 0;
 
 	if (seek (firstByte))
     return 0;
@@ -479,7 +495,7 @@ int File::fastCopyToSocket (Socket *dest, u_long firstByte, MemBuf *buf, u_long
 
     *nbw += tmpNbw;
   }
- 
+
   return 0;
 #endif
 }

-----------------------------------------------------------------------

Summary of changes:
 myserver/src/base/file/file.cpp                   |   42 ++++++++++++++------
 myserver/src/http_handler/http_file/http_file.cpp |   10 ++--
 2 files changed, 34 insertions(+), 18 deletions(-)


hooks/post-receive
-- 
GNU MyServer



From MAILER-DAEMON Sat Aug 08 06:48:53 2009
Received: from mailman by lists.gnu.org with archive (Exim 4.43)
	id 1MZjTp-0007qw-IC
	for mharc-myserver-commit@gnu.org; Sat, 08 Aug 2009 06:48:53 -0400
Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43)
	id 1MZjTn-0007qk-Mc
	for myserver-commit@gnu.org; Sat, 08 Aug 2009 06:48:51 -0400
Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43)
	id 1MZjTh-0007qH-7G
	for myserver-commit@gnu.org; Sat, 08 Aug 2009 06:48:50 -0400
Received: from [199.232.76.173] (port=54587 helo=monty-python.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43) id 1MZjTh-0007qE-0E
	for myserver-commit@gnu.org; Sat, 08 Aug 2009 06:48:45 -0400
Received: from savannah.gnu.org ([199.232.41.3]:58881 helo=sv.gnu.org)
	by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32)
	(Exim 4.60) (envelope-from <gscrivano@gnu.org>) id 1MZjTg-0004wK-4z
	for myserver-commit@gnu.org; Sat, 08 Aug 2009 06:48:44 -0400
Received: from download.savannah.gnu.org ([199.232.41.75]
	helo=cvs.savannah.gnu.org) by sv.gnu.org with esmtp (Exim 4.69)
	(envelope-from <gscrivano@gnu.org>) id 1MZjTf-0006Ny-L6
	for myserver-commit@gnu.org; Sat, 08 Aug 2009 10:48:43 +0000
Received: from gscrivano by cvs.savannah.gnu.org with local (Exim 4.69)
	(envelope-from <gscrivano@savannah.gnu.org>) id 1MZjTc-0006NO-Ih
	for myserver-commit@gnu.org; Sat, 08 Aug 2009 10:48:43 +0000
To: myserver-commit@gnu.org
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: 5d93aeb906b5f2e25ee8dd030d665b89dd4f5cb9
X-Git-Newrev: 46f541486dec795c35892089564e39e7b897853e
Message-Id: <E1MZjTc-0006NO-Ih@cvs.savannah.gnu.org>
From: Giuseppe Scrivano <gscrivano@gnu.org>
Date: Sat, 08 Aug 2009 10:48:42 +0000
X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2)
Subject: [myserver-commit] [SCM] GNU MyServer branch, master,
	updated. 46f541486dec795c35892089564e39e7b897853e
X-BeenThere: myserver-commit@gnu.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: myserver-commit.gnu.org
List-Unsubscribe: <http://lists.gnu.org/mailman/listinfo/myserver-commit>,
	<mailto:myserver-commit-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/pipermail/myserver-commit>
List-Post: <mailto:myserver-commit@gnu.org>
List-Help: <mailto:myserver-commit-request@gnu.org?subject=help>
List-Subscribe: <http://lists.gnu.org/mailman/listinfo/myserver-commit>,
	<mailto:myserver-commit-request@gnu.org?subject=subscribe>
X-List-Received-Date: Sat, 08 Aug 2009 10:48:51 -0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU MyServer".

The branch, master has been updated
       via  46f541486dec795c35892089564e39e7b897853e (commit)
      from  5d93aeb906b5f2e25ee8dd030d665b89dd4f5cb9 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------


commit 46f541486dec795c35892089564e39e7b897853e
Author: Giuseppe Scrivano <gscrivano@gnu.org>
Date:   Sat Aug 8 12:47:59 2009 +0200

    Refactoring, removed unused #include's and code cleaning.

diff --git a/myserver/src/base/file/files_utility.cpp b/myserver/src/base/file/files_utility.cpp
index 8af35ca..03eba95 100644
--- a/myserver/src/base/file/files_utility.cpp
+++ b/myserver/src/base/file/files_utility.cpp
@@ -29,16 +29,16 @@ extern "C"
 #ifndef WIN32
 extern "C"
 {
-#include <fcntl.h>
-#include <unistd.h>
-#include <sys/types.h>
-#include <errno.h>
-#include <stdio.h>
-#include <fcntl.h>
-#include <stdlib.h>
-#include <string.h>
-#include <math.h>
-#include <time.h>
+# include <fcntl.h>
+# include <unistd.h>
+# include <sys/types.h>
+# include <errno.h>
+# include <stdio.h>
+# include <fcntl.h>
+# include <stdlib.h>
+# include <string.h>
+# include <math.h>
+# include <time.h>
 }
 #endif
 
@@ -51,7 +51,7 @@ using namespace std;
 string FilesUtility::tmpPath;
 
 /*!
- *Constructor body.
+ * Constructor body.
  */
 FilesUtility::FilesUtility()
 {
@@ -59,100 +59,100 @@ FilesUtility::FilesUtility()
 }
 
 /*!
- *This funtion iterates through every character of the path
- *The first IF tries to clear out the bars, if it finds one,
- *just advances one character and starts the cycle again
- *The second IF tries to find at least two dots.
- *if it finds only 1, does nothing,
- *WIN32 if it finds 2 or more rec=rec-(number of dots -1)
+ * This funtion iterates through every character of the path
+ * The first IF tries to clear out the bars, if it finds one,
+ * just advances one character and starts the cycle again
+ * The second IF tries to find at least two dots.
+ * if it finds only 1, does nothing,
+ * WIN32 if it finds 2 or more rec=rec-(number of dots -1)
  * *NIX if it finds 2, decrements rec, if it finds more,
- *increments it considering it's a name if it ends with
- *something else other then a bar of a NULL,
- *then it's a path of the form "/...qwerty/" that should be considered rec++
- *The last ELSE, catches the rest and advances to the next bar.
- *Return the recursion of the path.
- *\param path The file name.
+ * increments it considering it's a name if it ends with
+ * something else other then a bar of a NULL,
+ * then it's a path of the form "/...qwerty/" that should be considered rec++
+ * The last ELSE, catches the rest and advances to the next bar.
+ * Return the recursion of the path.
+ * \param path The file name.
  */
-int FilesUtility::getPathRecursionLevel(const char* path)
+int FilesUtility::getPathRecursionLevel (const char* path)
 {
   const char *lpath = path;
   int rec = 0;
 #ifdef WIN32
   int temp;
 #endif
-  while(*lpath != 0)
+  while (*lpath != 0)
   {
-  /* ".." decreases the recursion level.  */
-    if( (*lpath == '\\') || (*lpath == '/') )
-    {
-      lpath++;
-      continue;
-    }
-
-    if(*lpath=='.')
-    {
-      lpath++;
-#ifdef WIN32//--------------------------------
-      temp = 0;
-      while(*lpath == '.')
-      {
-        lpath++;
-        temp++;
-      }
-      if( (*lpath == '\\') || (*lpath == '/') || (*lpath == 0))
-        rec -= temp;
-      else
+    /* ".." decreases the recursion level.  */
+    if ((*lpath == '\\') || (*lpath == '/'))
       {
         lpath++;
-        while( (*lpath != '\\') && (*lpath != '/') && (*lpath != 0))
-          lpath++;
-        rec++;
+        continue;
       }
-#else    //--------------------------------
-      if(*lpath == '.')
+
+    if (*lpath=='.')
       {
         lpath++;
-        if( (*lpath == '\\') || (*lpath == '/') || (*lpath == 0))
-          rec--;
+#ifdef WIN32
+        temp = 0;
+        while (*lpath == '.')
+          {
+            lpath++;
+            temp++;
+          }
+        if ((*lpath == '\\') || (*lpath == '/') || (*lpath == 0))
+          rec -= temp;
         else
-        {
-          while( (*lpath != '\\') && (*lpath != '/') && (*lpath != 0))
+          {
             lpath++;
-          rec++;
-        }
+            while ((*lpath != '\\') && (*lpath != '/') && (*lpath != 0))
+              lpath++;
+            rec++;
+          }
+#else
+        if (*lpath == '.')
+          {
+            lpath++;
+            if ((*lpath == '\\') || (*lpath == '/') || (*lpath == 0))
+              rec--;
+            else
+              {
+                while ((*lpath != '\\') && (*lpath != '/') && (*lpath != 0))
+                  lpath++;
+                rec++;
+              }
+          }
+#endif
       }
-#endif    //--------------------------------
-    }
     else
-    {
-      while( (*lpath != '\\') && (*lpath != '/') && (*lpath != 0))
-        lpath++;
-      rec++;
-    }
+      {
+        while( (*lpath != '\\') && (*lpath != '/') && (*lpath != 0))
+          lpath++;
+        rec++;
+      }
   }
   return rec;
 }
 
 
 /*!
- *Rename the file [BEFORE] to [AFTER]. Returns 0 on success.
- *\param before The old file name.
- *\param after The new file name.
+ * Rename the file [BEFORE] to [AFTER]. Returns 0 on success.
+ * \param before The old file name.
+ * \param after The new file name.
  */
-int FilesUtility::renameFile(const char* before, const char* after)
+int FilesUtility::renameFile (const char* before, const char* after)
 {
 #ifdef WIN32
-  return MoveFile(before, after) ? 0 : 1;
+  return MoveFile (before, after) ? 0 : 1;
 #else
-  return rename(before, after);
+  return rename (before, after);
 #endif
 }
 
 /*!
- *Copy the file from [SRC] to [DEST]. Returns 0 on success.
- *\param src The source file name.
- *\param dest The destination file name.
- *\param overwrite Overwrite the dest file if already exists?
+ * Copy the file from [SRC] to [DEST]. Returns 0 on success.
+ * \param src The source file name.
+ * \param dest The destination file name.
+ * \param overwrite Overwrite the dest file if already exists?
  */
 int FilesUtility::copyFile (const char* src, const char* dest, int overwrite)
 {
@@ -183,9 +183,9 @@ int FilesUtility::copyFile (const char* src, const char* dest, int overwrite)
 }
 
 /*!
- *Copy the file from [SRC] to [DEST]. Returns 0 on success.
- *\param src The source File.
- *\param dest The destination File.
+ * Copy the file from [SRC] to [DEST]. Returns 0 on success.
+ * \param src The source File.
+ * \param dest The destination File.
  */
 int FilesUtility::copyFile (File& src, File& dest)
 {
@@ -216,9 +216,9 @@ int FilesUtility::copyFile (File& src, File& dest)
 }
 
 /*!
- *Delete an existing file passing the path.
- *Return a non-null value on errors.
- *\param filename The file to delete.
+ * Delete an existing file passing the path.
+ * Return a non-null value on errors.
+ * \param filename The file to delete.
  */
 int FilesUtility::deleteFile (const char *filename)
 {
@@ -237,13 +237,13 @@ int FilesUtility::deleteFile (const char *filename)
 }
 
 /*!
- *Returns a non-null value if the path is a directory.
- *\param filename The path to check.
+ * Returns a non-null value if the path is a directory.
+ * \param filename The path to check.
  */
-int FilesUtility::isDirectory(const char *filename)
+int FilesUtility::isDirectory (const char *filename)
 {
 #ifdef WIN32
-  u_long fa = GetFileAttributes(filename);
+  u_long fa = GetFileAttributes (filename);
   if(fa != INVALID_FILE_ATTRIBUTES)
     return(fa & FILE_ATTRIBUTE_DIRECTORY)?1:0;
   else
@@ -259,8 +259,8 @@ int FilesUtility::isDirectory(const char *filename)
 }
 
 /*!
- *Returns a non-null value if the given path is a link.
- *\param filename The path to check.
+ * Returns a non-null value if the given path is a link.
+ * \param filename The path to check.
  */
 int FilesUtility::isLink(const char* filename)
 {
@@ -278,110 +278,105 @@ int FilesUtility::isLink(const char* filename)
 }
 
 /*!
- *Returns a non-null value if the given path is a valid file.
- *\param filename The path to check.
+ * Returns a non-null value if the given path is a valid file.
+ * \param filename The path to check.
  */
 int FilesUtility::fileExists(const char* filename)
 {
 #ifdef WIN32
-  /*! OpenFile is obsolete
-  OFSTRUCT of;
-  int ret = OpenFile(filename, &of, OF_EXIST);
-  return (ret != HFILE_ERROR)?1:0;*/
-  HANDLE hFile = CreateFile(filename, GENERIC_READ, FILE_SHARE_READ,
-                       NULL, OPEN_EXISTING,
-                       FILE_ATTRIBUTE_NORMAL | FILE_FLAG_BACKUP_SEMANTICS,
-                       NULL);
+  HANDLE hFile = CreateFile (filename, GENERIC_READ, FILE_SHARE_READ,
+                             NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL
+                             | FILE_FLAG_BACKUP_SEMANTICS, NULL);
 
   int nRet = hFile != INVALID_HANDLE_VALUE ? 1 : 0;
-  CloseHandle(hFile);
+  CloseHandle (hFile);
   return nRet;
 #else
-  struct stat F_Stats;
-  int ret = stat(filename, &F_Stats);
+  struct stat fstats;
+  int ret = stat (filename, &fstats);
   if(ret < 0)
     return 0;
   /*! Return 1 if it is a regular file or a directory.  */
-  return (S_ISREG(F_Stats.st_mode) | S_ISDIR(F_Stats.st_mode))? 1 : 0;
+  return (S_ISREG (fstats.st_mode) | S_ISDIR(fstats.st_mode))? 1 : 0;
 #endif
 }
 
 /*!
- *Returns the time of the last modify to the file.
- *Returns -1 on errors.
- *\param filename The path to check.
+ * Returns the time of the last modify to the file.
+ * Returns -1 on errors.
+ * \param filename The path to check.
  */
-time_t FilesUtility::getLastModTime(const char *filename)
+time_t FilesUtility::getLastModTime (const char *filename)
 {
   int res;
 #ifdef WIN32
   struct _stat sf;
-  res = _stat(filename,&sf);
+  res = _stat (filename, &sf);
 #else
   struct stat sf;
-  res = stat(filename,&sf);
+  res = stat (filename,&sf);
 #endif
 
-  if(res == 0)
+  if (res == 0)
     return sf.st_mtime;
   else
-    return (-1);
+    return -1;
 }
 
 /*!
- *Returns the time of the file creation.
- *Returns -1 on errors.
- *\param filename The path to check.
+ * Returns the time of the file creation.
+ * Returns -1 on errors.
+ * \param filename The path to check.
  */
-time_t FilesUtility::getCreationTime(const char *filename)
+time_t FilesUtility::getCreationTime (const char *filename)
 {
   int res;
 #ifdef WIN32
   struct _stat sf;
-  res = _stat(filename, &sf);
+  res = _stat (filename, &sf);
 #else
   struct stat sf;
-  res = stat(filename, &sf);
+  res = stat (filename, &sf);
 #endif
-  if(res == 0)
+  if (res == 0)
     return sf.st_ctime;
   else
-    return (-1);
+    return -1;
 }
 
 /*!
- *Returns the time of the last access to the file.
- *Returns -1 on errors.
- *\param filename The path to check.
+ * Returns the time of the last access to the file.
+ * Returns -1 on errors.
+ * \param filename The path to check.
  */
-time_t FilesUtility::getLastAccTime(const char *filename)
+time_t FilesUtility::getLastAccTime (const char *filename)
 {
   int res;
 #ifdef WIN32
   struct _stat sf;
-  res = _stat(filename, &sf);
+  res = _stat (filename, &sf);
 #else
   struct stat sf;
-  res = stat(filename, &sf);
+  res = stat (filename, &sf);
 #endif
-  if(res == 0)
+  if (res == 0)
     return sf.st_atime;
   else
-    return (-1);
+    return -1;
 }
 
 /*!
- *Change the owner of the current file, use the value -1 for uid or gid
- *to do not change the value. Return 0 on success.
- *\param filename The path to the file to chown.
- *\param uid The user id.
- *\param gid the group id.
+ * Change the owner of the current file, use the value -1 for uid or gid
+ * to do not change the value. Return 0 on success.
+ * \param filename The path to the file to chown.
+ * \param uid The user id.
+ * \param gid the group id.
  */
 int FilesUtility::chown(const char* filename, string &uid, string &gid)
 {
 #ifndef WIN32
-  return ::chown(filename, Process::getUid (uid.c_str ()),
-                 Process::getGid (gid.c_str ())) ? 1 : 0;
+  return ::chown (filename, Process::getUid (uid.c_str ()),
+                  Process::getGid (gid.c_str ())) ? 1 : 0;
 #endif
   return 0;
 }
@@ -391,169 +386,155 @@ int FilesUtility::chown(const char* filename, string &uid, string &gid)
  *\param path The full path where get the filename length.
  *\param filename A pointer to the start of the file name.
  */
-int FilesUtility::getFilenameLength(const char *path, int *filename)
+int FilesUtility::getFilenameLength (const char *path, int *filename)
 {
-  int splitpoint, i, j;
-  i = 0;
-  j = 0;
+  int splitpoint, i = 0, j = 0;
   splitpoint = static_cast<int>(strlen(path) - 1);
   while ((splitpoint > 0) && (path[splitpoint] != '/'))
     splitpoint--;
   *filename = splitpoint + 1;
   return *filename;
-
 }
 
 /*!
- *Get the filename from a path.
- *Be sure that the filename buffer is at least getFilenameLength(...) bytes
- *before call this function.
- *\param path The full path to the file.
- *\param filename A buffer to fullfill with the file name.
+ * Get the filename from a path.
+ * Be sure that the filename buffer is at least getFilenameLength(...) bytes
+ * before call this function.
+ * \param path The full path to the file.
+ * \param filename A buffer to fullfill with the file name.
  */
-void FilesUtility::getFilename(const char *path, char *filename)
+void FilesUtility::getFilename (const char *path, char *filename)
 {
-  int splitpoint, i, j;
-  i = 0;
-  j = 0;
+  int splitpoint, i = 0, j = 0;
   splitpoint = static_cast<int>(strlen(path) - 1);
   while ((splitpoint > 0) && (path[splitpoint] != '/'))
     splitpoint--;
   if ((splitpoint == 0) && (path[splitpoint] != '/'))
-  {
-    strcpy(filename, path);
-  }
+    strcpy (filename, path);
   else
-  {
-    splitpoint++;
-    i=splitpoint;
-    while(path[i] != 0)
     {
-      filename[j] = path[i];
-      j++;
-      i++;
+      splitpoint++;
+      i=splitpoint;
+      while (path[i] != 0)
+        {
+          filename[j] = path[i];
+          j++;
+          i++;
+        }
+      filename[j] = 0;
     }
-    filename[j] = 0;
-  }
 }
 
 /*!
- *Get the filename from a path.
- *\param path The full path to the file.
- *\param filename A buffer to fullfill with the file name.
+ * Get the filename from a path.
+ * \param path The full path to the file.
+ * \param filename A buffer to fullfill with the file name.
  */
-void FilesUtility::getFilename(string const &path, string& filename)
+void FilesUtility::getFilename (string const &path, string& filename)
 {
-  u_long splitpoint = path.find_last_of("\\/");
-  if(splitpoint != string::npos)
-  {
+  u_long splitpoint = path.find_last_of ("\\/");
+  if (splitpoint != string::npos)
     filename = path.substr(splitpoint+1, path.length()-1);
-  }
   else
-    filename.assign("");
-
+    filename.assign ("");
 }
 
 /*!
- *Use this function before call splitPath to be sure that the buffers
- *dir and filename are bigger enough to contain the data.
- *\param path The full path to the file.
- *\param dir The directory part length of the path.
- *\param filename The length of the buffer needed to contain the file name.
+ * Use this function before call splitPath to be sure that the buffers
+ * dir and filename are bigger enough to contain the data.
+ * \param path The full path to the file.
+ * \param dir The directory part length of the path.
+ * \param filename The length of the buffer needed to contain the file name.
  */
-void FilesUtility::splitPathLength(const char *path, int *dir, int *filename)
+void FilesUtility::splitPathLength (const char *path, int *dir, int *filename)
 {
   int splitpoint = 0;
   int i = 0;
 
-  for(i = 0; path[i]; i++)
+  for (i = 0; path[i]; i++)
     if(path[i] == '/' || path[i] == '\\' )
       splitpoint = i;
 
-  if(dir)
-  {
+  if (dir)
     *dir = splitpoint + 2;
-  }
 
   if(filename)
-  {
     *filename = i - splitpoint + 2;
-  }
 }
 
 /*!
- *Splits a file path into a directory and filename.
- *Path is an input value while dir and filename are the output values.
- *\param path The full path to the file.
- *\param dir The directory part of the path.
- *\param filename A buffer to fullfill with the file name.
+ * Splits a file path into a directory and filename.
+ * Path is an input value while dir and filename are the output values.
+ * \param path The full path to the file.
+ * \param dir The directory part of the path.
+ * \param filename A buffer to fullfill with the file name.
  */
-void FilesUtility::splitPath(const char *path, char *dir, char *filename)
+void FilesUtility::splitPath (const char *path, char *dir, char *filename)
 {
   int splitpoint = 0;
   int i = 0;
 
-  for(i = 0; path[i]; i++)
-    if(path[i] == '/' || path[i] == '\\' )
+  for (i = 0; path[i]; i++)
+    if (path[i] == '/' || path[i] == '\\' )
       splitpoint = i;
 
-  if(dir)
+  if (dir)
   {
-    if(splitpoint)
-    {
-      memcpy(dir, path, splitpoint);
-      dir[splitpoint] = '/';
-      dir[splitpoint + 1] = '\0';
-    }
+    if (splitpoint)
+      {
+        memcpy (dir, path, splitpoint);
+        dir[splitpoint] = '/';
+        dir[splitpoint + 1] = '\0';
+      }
     else
       dir[0] = '\0';
   }
 
-  if(filename)
-  {
-    memcpy(filename, path + splitpoint + (splitpoint ? 1 : 0), i - splitpoint - (splitpoint ? 1 : 0));
-    filename[i - splitpoint - (splitpoint ? 1 : 0)] = '\0';
-  }
+  if (filename)
+    {
+      memcpy(filename, path + splitpoint + (splitpoint ? 1 : 0),
+             i - splitpoint - (splitpoint ? 1 : 0));
+      filename[i - splitpoint - (splitpoint ? 1 : 0)] = '\0';
+    }
 }
 
 /*!
- *Split a path in a dir and a filename.
- *\param path The full path to the file.
- *\param dir The directory part of the path.
- *\param filename A buffer to fullfill with the file name.
+ * Split a path in a dir and a filename.
+ * \param path The full path to the file.
+ * \param dir The directory part of the path.
+ * \param filename A buffer to fullfill with the file name.
  */
-void FilesUtility::splitPath(string const &path, string& dir, string& filename)
+void FilesUtility::splitPath (string const &path, string& dir, string& filename)
 {
   u_long splitpoint;
-  u_long len = path.length();
-  splitpoint = path.find_last_of("\\/");
-  if(splitpoint != string::npos)
-  {
-    char lastDirChar;
-    dir  = path.substr(0, splitpoint);
-
-    lastDirChar = dir[dir.length() - 1];
+  u_long len = path.length ();
+  splitpoint = path.find_last_of ("\\/");
+  if (splitpoint != string::npos)
+    {
+      char lastDirChar;
+      dir  = path.substr (0, splitpoint);
 
-    if(lastDirChar != '\\' && lastDirChar != '/')
-      dir.append("/");
+      lastDirChar = dir[dir.length() - 1];
 
+      if (lastDirChar != '\\' && lastDirChar != '/')
+        dir.append ("/");
 
-    filename = path.substr(splitpoint+1, len-1);
-  }
+      filename = path.substr (splitpoint + 1, len - 1);
+    }
   else
-  {
-    filename  = path;
-    dir.assign("");
-  }
+    {
+      filename  = path;
+      dir.assign("");
+    }
 }
 
 /*!
- *Get the file extension passing its path.
- *Save in ext all the bytes afer the last dot(.) in filename.
- *\param ext The buffer to fullfill with the file extension.
- *\param filename The path to the file.
+ * Get the file extension passing its path.
+ * Save in ext all the bytes afer the last dot(.) in filename.
+ * \param ext The buffer to fullfill with the file extension.
+ * \param filename The path to the file.
  */
-void FilesUtility::getFileExt(char* ext, const char* filename)
+void FilesUtility::getFileExt (char* ext, const char* filename)
 {
   int nDot;
   nDot = static_cast<int>(strlen(filename) - 1);
@@ -562,93 +543,87 @@ void FilesUtility::getFileExt(char* ext, const char* filename)
     nDot--;
 
   if (nDot > 0)
-    strcpy(ext, filename + nDot + 1);
+    strcpy (ext, filename + nDot + 1);
   else
     ext[0] = 0;
 }
 
 /*!
- *Get the file extension passing its path.
- *Save in ext all the bytes afer the last dot(.) in filename.
- *\param ext The buffer to fullfill with the file extension.
- *\param filename The path to the file.
+ * Get the file extension passing its path.
+ * Save in ext all the bytes afer the last dot(.) in filename.
+ * \param ext The buffer to fullfill with the file extension.
+ * \param filename The path to the file.
  */
-void FilesUtility::getFileExt(string& ext, string const &filename)
+void FilesUtility::getFileExt (string& ext, string const &filename)
 {
-  u_long pos = filename.find_last_of('.');
-  if(pos != string::npos)
-  {
-    ext = filename.substr(pos+1, filename.length()-1);
-  }
+  u_long pos = filename.find_last_of ('.');
+  if (pos != string::npos)
+    ext = filename.substr (pos + 1, filename.length () - 1);
   else
-  {
-    ext.assign("");
-  }
-
+    ext.assign ("");
 }
 
 /*!
- *Get the file path in the short form of the specified file
- *Return -1 on errors.
- *\param filePath The path to use.
- *\param out The buffer where write.
- *\param buffersize The buffer length.
+ * Get the file path in the short form of the specified file.
+ * Return -1 on errors.
+ * \param filePath The path to use.
+ * \param out The buffer where write.
+ * \param buffersize The buffer length.
  */
-int FilesUtility::getShortFileName(char *filePath, char *out, int buffersize)
+int FilesUtility::getShortFileName (char *filePath, char *out, int buffersize)
 {
 #ifdef WIN32
-  int ret = GetShortPathName(filePath, out, buffersize);
-  if(!ret)
+  int ret = GetShortPathName (filePath, out, buffersize);
+  if (!ret)
     return -1;
   return 0;
 #else
-  strncpy(out, filePath, buffersize);
+  strncpy (out, filePath, buffersize);
   return 0;
 #endif
 }
 
 /*!
- *Complete the path of the file.
- *Return non-zero on errors.
- *\param fileName The buffer to use.
- *\param size The new buffer size.
- *\param dontRealloc Don't realloc a new buffer.
+ * Complete the path of the file.
+ * Return non-zero on errors.
+ * \param fileName The buffer to use.
+ * \param size The new buffer size.
+ * \param dontRealloc Don't realloc a new buffer.
  */
-int FilesUtility::completePath(char **fileName,int *size, int dontRealloc)
+int FilesUtility::completePath (char **fileName, int *size, int dontRealloc)
 {
-  if((fileName == 0) ||( *fileName==0))
+  if (!fileName || !(*fileName))
     return -1;
 #ifdef WIN32
   char *buffer;
-  int bufferLen = strlen(*fileName) + 1;
+  int bufferLen = strlen (*fileName) + 1;
   int bufferNewLen;
-  auto_ptr<char> bufferAutoPtr( new char[bufferLen] );
+  auto_ptr<char> bufferAutoPtr (new char[bufferLen]);
 
-  buffer = bufferAutoPtr.get();
+  buffer = bufferAutoPtr.get ();
 
-  strcpy(buffer, *fileName);
-  bufferNewLen = GetFullPathName(buffer, 0, *fileName, 0) + 1;
-  if(bufferNewLen == 0)
-  {
+  strcpy (buffer, *fileName);
+  bufferNewLen = GetFullPathName (buffer, 0, *fileName, 0) + 1;
+  if (bufferNewLen == 0)
     return -1;
-  }
-  if(dontRealloc)
-  {
-    if(*size < bufferNewLen )
-      return -1;
-  }
+
+  if (dontRealloc)
+    {
+      if (*size < bufferNewLen )
+        return -1;
+    }
   else
-  {
-    delete [] (*fileName);
-    *fileName = new char[bufferNewLen];
-    if(*fileName == 0)
     {
-      *size = 0;
-      return -1;
+      delete [] (*fileName);
+      *fileName = new char[bufferNewLen];
+      if (*fileName == 0)
+        {
+          *size = 0;
+          return -1;
+        }
+      *size = bufferNewLen;
     }
-    *size = bufferNewLen;
-  }
-  if(GetFullPathName(buffer, bufferNewLen, *fileName, 0) == 0)
+  if (GetFullPathName (buffer, bufferNewLen, *fileName, 0) == 0)
     return -1;
 
   return 0;
@@ -657,121 +632,116 @@ int FilesUtility::completePath(char **fileName,int *size, int dontRealloc)
   int bufferLen;
   int bufferNewLen;
   /* We assume that path starting with / are yet completed.  */
-  if((*fileName)[0]=='/')
+  if ((*fileName)[0]=='/')
     return 0;
-  bufferLen = strlen(*fileName) + 1;
-
-  auto_ptr<char> bufferAutoPtr( new char[bufferLen] );
-
-  buffer = bufferAutoPtr.get();
+  bufferLen = strlen (*fileName) + 1;
 
+  auto_ptr<char> bufferAutoPtr (new char[bufferLen]);
 
-  strcpy(buffer, *fileName);
+  buffer = bufferAutoPtr.get ();
+  strcpy (buffer, *fileName);
   bufferNewLen =  getdefaultwdlen() +  bufferLen + 1 ;
-  if(dontRealloc)
-  {
-    if(*size < bufferNewLen )
-      return -1;
-  }
+  if (dontRealloc)
+    {
+      if (*size < bufferNewLen )
+        return -1;
+    }
   else
-  {
-    delete [] (*fileName);
-    *fileName = new char[bufferNewLen];
-    if(*fileName == 0)
     {
-      *size = 0;
-      return -1;
+      delete [] (*fileName);
+      *fileName = new char[bufferNewLen];
+      if (*fileName == 0)
+        {
+          *size = 0;
+          return -1;
+        }
+      *size = bufferNewLen;
     }
-    *size = bufferNewLen;
-  }
-  sprintf(*fileName, "%s/%s", getdefaultwd(0, 0), buffer );
-
+  sprintf (*fileName, "%s/%s", getdefaultwd (0, 0), buffer);
   return 0;
 #endif
 }
 
 /*!
- *Complete the path of the file.
- *Return non-zero on errors.
- *\param fileName The file name to complete.
+ * Complete the path of the file.
+ * Return non-zero on errors.
+ * \param fileName The file name to complete.
  */
-int FilesUtility::completePath(string &fileName)
+int FilesUtility::completePath (string &fileName)
 {
 #ifdef WIN32
   char *buffer;
   int bufferLen;
 
-  bufferLen = GetFullPathName(fileName.c_str(), 0, buffer, 0) + 1;
-  if(bufferLen == 0)
+  bufferLen = GetFullPathName (fileName.c_str (), 0, buffer, 0) + 1;
+  if (!bufferLen)
     return -1;
 
-  auto_ptr<char> bufferAutoPtr( new char[bufferLen] );
+  auto_ptr<char> bufferAutoPtr (new char[bufferLen]);
 
-  buffer = bufferAutoPtr.get();
+  buffer = bufferAutoPtr.get ();
 
-  if(GetFullPathName(fileName.c_str(), bufferLen, buffer, 0) == 0)
+  if (GetFullPathName(fileName.c_str (), bufferLen, buffer, 0) == 0)
     return -1;
 
-  fileName.assign(buffer);
+  fileName.assign (buffer);
 
   return 0;
 #else
   ostringstream stream;
-  /* We assume that path starting with / are yet completed. */
-  if(fileName[0] != '/')
-  {
-    stream << getdefaultwd(0, 0) << "/" <<  fileName.c_str();
-    fileName.assign(stream.str());
-  }
-
+  /* Assume that path starting with / are absolute paths.  */
+  if (fileName[0] != '/')
+    {
+      stream << getdefaultwd (0, 0) << "/" <<  fileName.c_str ();
+      fileName.assign (stream.str ());
+    }
   return 0;
 #endif
 }
 
 /*!
- *Create a new directory.
- *Return non-zero on errors.
- *\param path The path to the directory to create.
+ * Create a new directory.
+ * Return non-zero on errors.
+ * \param path The path to the directory to create.
  */
 int FilesUtility::mkdir (const char *path)
 {
 #ifdef WIN32
-  return CreateDirectory(path, NULL)?0:-1;
+  return CreateDirectory (path, NULL) ? 0 : -1;
 #else
-  return ::mkdir(path, S_IRUSR | S_IWUSR);
+  return ::mkdir (path, S_IRUSR | S_IWUSR);
 #endif
 }
 
-
 /*!
- *Delete a directory.
- *Return non-zero on errors.
- *\param path The directory to remove.
+ * Delete a directory.
+ * Return non-zero on errors.
+ * \param path The directory to remove.
  */
 int FilesUtility::rmdir (const char *path)
 {
 #ifdef WIN32
-  return RemoveDirectory(path)?0:-1;
+  return RemoveDirectory (path) ? 0 : -1;
 #else
-  return ::rmdir(path);
+  return ::rmdir (path);
 #endif
 }
 
 /*!
- *Set the temporary path to a default one.
+ * Set the temporary path to a default one.
  */
-void FilesUtility::resetTmpPath()
+void FilesUtility::resetTmpPath ()
 {
 #ifdef WIN32
   const char *tmpDir = getenv ("TMPDIR");
   if (tmpDir)
     tmpPath.assign (tmpDir);
   else
-  {
-    TCHAR lpPathBuffer[MAX_PATH];
-    GetTempPath (MAX_PATH, lpPathBuffer);
-    tmpPath.assign (lpPathBuffer);
-  }
+    {
+      TCHAR lpPathBuffer[MAX_PATH];
+      GetTempPath (MAX_PATH, lpPathBuffer);
+      tmpPath.assign (lpPathBuffer);
+    }
 #else
   const char *tmpDir = getenv ("TMPDIR");
 
@@ -782,7 +752,6 @@ void FilesUtility::resetTmpPath()
 
   if (tmpDir == NULL)
     tmpDir = "/tmp";
-
   tmpPath.assign (tmpDir);
 #endif
 }
diff --git a/myserver/src/http_handler/http_dir/http_dir.cpp b/myserver/src/http_handler/http_dir/http_dir.cpp
index aadc0b8..9d2d919 100644
--- a/myserver/src/http_handler/http_dir/http_dir.cpp
+++ b/myserver/src/http_handler/http_dir/http_dir.cpp
@@ -25,14 +25,12 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 extern "C" 
 {
-#ifdef WIN32
-#include <direct.h>
 #include <errno.h>
-#endif
 
-#ifndef WIN32
-#include <string.h>
-#include <errno.h>
+#ifdef WIN32
+# include <direct.h>
+#else
+# include <string.h>
 #endif
 }
 
@@ -52,7 +50,8 @@ using namespace std;
 /*!
  * Compare two HttpDir::FileStruct by their filename.
  */
-bool HttpDir::compareFileStructByName (HttpDir::FileStruct i, HttpDir::FileStruct j)
+bool HttpDir::compareFileStructByName (HttpDir::FileStruct i,
+                                       HttpDir::FileStruct j)
 {
   return stringcmpi (i.name, j.name) < 0 ? true : false;
 }
@@ -61,7 +60,8 @@ bool HttpDir::compareFileStructByName (HttpDir::FileStruct i, HttpDir::FileStruc
  * Compare two HttpDir::FileStruct by their last modified file time.
  */
 
-bool HttpDir::compareFileStructByTime (HttpDir::FileStruct i, HttpDir::FileStruct j)
+bool HttpDir::compareFileStructByTime (HttpDir::FileStruct i,
+                                       HttpDir::FileStruct j)
 {
   return i.time_write < j.time_write;
 }
@@ -69,29 +69,30 @@ bool HttpDir::compareFileStructByTime (HttpDir::FileStruct i, HttpDir::FileStruc
 /*!
  * Compare two HttpDir::FileStruct by their file size.
  */
-bool HttpDir::compareFileStructBySize (HttpDir::FileStruct i, HttpDir::FileStruct j)
+bool HttpDir::compareFileStructBySize (HttpDir::FileStruct i,
+                                       HttpDir::FileStruct j)
 {
   return i.size < j.size;
 }
 
 /*!
- *Constructor for the class.
+ * Constructor for the class.
  */
-HttpDir::HttpDir()
+HttpDir::HttpDir ()
 {
 
 }
 
 /*!
- *Destroy the object.
+ * Destroy the object.
  */
-HttpDir::~HttpDir()
+HttpDir::~HttpDir ()
 {
 
 }
 
 /*!
- *Load the static elements.
+ * Load the static elements.
  */
 int HttpDir::load ()
 {
@@ -99,7 +100,7 @@ int HttpDir::load ()
 }
 
 /*!
- *Unload the static elements.
+ * Unload the static elements.
  */
 int HttpDir::unLoad ()
 {
@@ -107,12 +108,12 @@ int HttpDir::unLoad ()
 }
 
 /*!
- *Get a formatted dobule representation of BYTES right shifted by POWER.
- *\param bytes Number of bytes.
- *\param power Power of 2.
- *\return the double representation for BYTES>>POWER.
+  *Get a formatted dobule representation of BYTES right shifted by POWER.
+ * \param bytes Number of bytes.
+ * \param power Power of 2.
+ * \return the double representation for BYTES>>POWER.
  */
-double HttpDir::formatBytes(u_long bytes, u_int power)
+double HttpDir::formatBytes (u_long bytes, u_int power)
 {
   /* u_long can be 32 bits.  Don't do a right shift that is bigger than
    * its size.  */
@@ -129,11 +130,11 @@ double HttpDir::formatBytes(u_long bytes, u_int power)
 
 
 /*!
- *Fullfill the string out with a formatted representation for bytes.
- *\param bytes Size to format.
- *\param out Out string. 
+ * Fullfill the string out with a formatted representation for bytes.
+ * \param bytes Size to format.
+ * \param out Out string. 
  */
-void HttpDir::getFormattedSize(u_long bytes, string & out)
+void HttpDir::getFormattedSize (u_long bytes, string & out)
 {
   const string symbols[] = {"TB", "GB", "MB", "KB", "bytes"};
   const u_int powers[] = {40, 30, 20, 10, 0};
@@ -163,11 +164,11 @@ void HttpDir::getFormattedSize(u_long bytes, string & out)
 }
 
 /*!
- *Generate the HTML header for the results table.
- *\param out Buffer where write it.
- *\param sortType How elements are sorted.
- *\param sortReverse True if element are in reverse order.
- *\param formatString Decide which fields show.
+ * Generate the HTML header for the results table.
+ * \param out Buffer where write it.
+ * \param sortType How elements are sorted.
+ * \param sortReverse True if element are in reverse order.
+ * \param formatString Decide which fields show.
  */
 void HttpDir::generateHeader (MemBuf &out, char sortType, bool sortReverse,
                               const char* formatString)
@@ -214,11 +215,11 @@ void HttpDir::generateHeader (MemBuf &out, char sortType, bool sortReverse,
 }
 
 /*!
- *Generate the HTML code for an element in the result table.
- *\param out Buffer where write the HTML.
- *\param file Structure with information on the element.
- *\param linkPrefix Prefix to use for the generated links.
- *\param formatString Specify which element show.
+ * Generate the HTML code for an element in the result table.
+ * \param out Buffer where write the HTML.
+ * \param file Structure with information on the element.
+ * \param linkPrefix Prefix to use for the generated links.
+ * \param formatString Specify which element show.
  */
 void HttpDir::generateElement (MemBuf &out, 
                                FileStruct &file, 
@@ -282,12 +283,12 @@ void HttpDir::generateElement (MemBuf &out,
 
 
 /*!
- *Browse a directory printing its contents in an HTML file.
- *\param td The current thread context.
- *\param directory Directory to show.
- *\param cgi not used.
- *\param execute not used.
- *\param onlyHeader Specify if send only the HTTP header.
+ * Browse a directory printing its contents in an HTML file.
+ * \param td The current thread context.
+ * \param directory Directory to show.
+ * \param cgi not used.
+ * \param execute not used.
+ * \param onlyHeader Specify if send only the HTTP header.
 */
 int HttpDir::send(HttpThreadContext* td,
                   const char* directory, const char* cgi, 
@@ -454,8 +455,8 @@ int HttpDir::send(HttpThreadContext* td,
   }
 
   /*
-   *With the current code we build the HTML TABLE to indicize the
-   *files in the directory.
+   * With the current code we build the HTML TABLE to indicize the
+   * files in the directory.
    */
   td->secondaryBuffer->setLength(0);
   *td->secondaryBuffer << "<table width=\"100%\">\r\n" ;
@@ -646,17 +647,17 @@ int HttpDir::send(HttpThreadContext* td,
 }
 
 /*!
- *Format a string to html.
- *\param in String to convert.
- *\param out HTML converted string.
+ * Format a string to html.
+ * \param in String to convert.
+ * \param out HTML converted string.
  */
 void HttpDir::formatHtml(string& in, string& out)
 {
   string::size_type pos = 0;
   out.assign(in);
   /*
-   *Replace characters in the ranges 32-65 91-96 123-126 160-255
-   *with "&#CODE;".
+   * Replace characters in the ranges 32-65 91-96 123-126 160-255
+   * with "&#CODE;".
    */
   for(pos = 0; out[pos] != '\0'; pos++)
   {
diff --git a/myserver/src/http_handler/http_file/http_file.cpp b/myserver/src/http_handler/http_file/http_file.cpp
index cfde37b..539d951 100644
--- a/myserver/src/http_handler/http_file/http_file.cpp
+++ b/myserver/src/http_handler/http_file/http_file.cpp
@@ -31,11 +31,11 @@ using namespace std;
 extern "C" 
 {
 #ifdef WIN32
-#include <direct.h>
-#include <errno.h>
+# include <direct.h>
+# include <errno.h>
 #else
-#include <string.h>
-#include <errno.h>
+# include <string.h>
+# include <errno.h>
 #endif
 }
 
@@ -369,10 +369,10 @@ int HttpFile::send (HttpThreadContext* td,
     if (td->mime)
       {
         if (td->mime &&
-            Server::getInstance()->getFiltersFactory()->chain (&chain,
-                                                               td->mime->filters,
-                                                               &memStream,
-                                                               &nbw))
+            Server::getInstance ()->getFiltersFactory ()->chain (&chain,
+                                                                 td->mime->filters,
+                                                                 &memStream,
+                                                                 &nbw))
           {
             file->close ();
             delete file;
diff --git a/myserver/src/protocol/protocol.cpp b/myserver/src/protocol/protocol.cpp
index ab6ce81..106d613 100755
--- a/myserver/src/protocol/protocol.cpp
+++ b/myserver/src/protocol/protocol.cpp
@@ -15,66 +15,56 @@ You should have received a copy of the GNU General Public License
 along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
 
-
 #include <include/protocol/protocol.h>
-#include <include/base/xml/xml_parser.h>
-
 
 /*!
- *Load the protocol. Called once at runtime.
+ * Load the protocol. Called once at runtime.
  */
-int Protocol::loadProtocol(XmlParser* /*languageParser*/)
+int Protocol::loadProtocol (XmlParser* /*languageParser*/)
 {
   return 1;
 }
 
 /*!
- *Unload the protocol. Called once.
+ * Unload the protocol. Called once.
  */
-int Protocol::unLoadProtocol(XmlParser* /*languageParser*/)
+int Protocol::unLoadProtocol (XmlParser* /*languageParser*/)
 {
   return 1;
 }
 
 /*!
- *Control the connection.
+ * Control the connection.
  */
-int Protocol::controlConnection(ConnectionPtr /*a*/,char* /*b1*/,
-                                char* /*b2*/,int /*bs1*/,int /*bs2*/,
-                                u_long /*nbtr*/,u_long /*id*/)
+int Protocol::controlConnection (ConnectionPtr /*a*/,char* /*b1*/,
+                                 char* /*b2*/,int /*bs1*/,int /*bs2*/,
+                                 u_long /*nbtr*/,u_long /*id*/)
 {
-  /*!
-   *Returns value are:
-   *0 to delete the connection from the active connections list
-   *1 to keep the connection active and clear the connectionBuffer
-   *2 if the header is incomplete and to save it in a temporary buffer
-   *3 if the header is incomplete without save it in a temporary buffer
-   */
   return 0;
 }
 
 /*!
- *Returns the name of the protocol. If an out buffer is 
- *defined fullfill it with the name too.
+ * Returns the name of the protocol. If an out buffer is 
+ * defined fullfill it with the name too.
  */
-char* Protocol::registerName(char* /*out*/,int /*len*/)
+char* Protocol::registerName (char* /*out*/,int /*len*/)
 {
   return 0;
 }
 
 /*!
- *Constructor for the class protocol.
+ * Constructor for the class protocol.
  */
-Protocol::Protocol()
+Protocol::Protocol ()
 {
   protocolOptions = 0;
   protocolPrefix.assign ("");
 }
 
 /*!
- *Destroy the object.
+ * Destroy the object.
  */
-Protocol::~Protocol()
+Protocol::~Protocol ()
 {
 
 }
diff --git a/myserver/src/protocol/protocol_buffer.cpp b/myserver/src/protocol/protocol_buffer.cpp
index 5e70c30..10a0d67 100644
--- a/myserver/src/protocol/protocol_buffer.cpp
+++ b/myserver/src/protocol/protocol_buffer.cpp
@@ -1,6 +1,6 @@
 /*
 MyServer
-Copyright (C) 2002, 2003, 2004, 2007 Free Software Foundation, Inc.
+Copyright (C) 2002, 2003, 2004, 2007, 2009 Free Software Foundation, Inc.
 This program 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 3 of the License, or
@@ -15,7 +15,6 @@ You should have received a copy of the GNU General Public License
 along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
 
-#include "stdafx.h"
 #include <include/protocol/protocol_buffer.h>
 
 /*!
diff --git a/myserver/src/protocol/protocols_manager.cpp b/myserver/src/protocol/protocols_manager.cpp
index bd76c48..7bc933d 100755
--- a/myserver/src/protocol/protocols_manager.cpp
+++ b/myserver/src/protocol/protocols_manager.cpp
@@ -1,6 +1,6 @@
 /*
 MyServer
-Copyright (C) 2002, 2003, 2004, 2007, 2008 Free Software Foundation, Inc.
+Copyright (C) 2002, 2003, 2004, 2007, 2008, 2009 Free Software Foundation, Inc.
 This program 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 3 of the License, or
@@ -17,50 +17,44 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 
 #include <include/protocol/protocols_manager.h>
-#include <include/base/xml/xml_parser.h>
-#include <include/server/server.h>
 #include <string>
 #include <algorithm>
 #include <cctype> 
 
-
-
 /*!
- *Class constructor.
+ * Class constructor.
  */
-ProtocolsManager::ProtocolsManager() 
+ProtocolsManager::ProtocolsManager ()
 {
 
 }
 
 /*!
- *Class destructor.
+ * Class destructor.
  */
-ProtocolsManager::~ProtocolsManager()
+ProtocolsManager::~ProtocolsManager ()
 {
 
 }
 
 /*!
- *Return a protocol by its name.
+ * Return a protocol by its name.
  */
-Protocol* ProtocolsManager::getProtocol(string& name)
+Protocol* ProtocolsManager::getProtocol (string& name)
 {
-  return staticProtocols.get(name);
+  return staticProtocols.get (name);
 }
 
 /*!
- *Add a static protocol to the list.
+ * Add a static protocol to the list.
  */
-void ProtocolsManager::addProtocol(string& name, Protocol* protocol)
+void ProtocolsManager::addProtocol (string& name, Protocol* protocol)
 {
-  std::transform(name.begin(),
-                 name.end(),
-                 name.begin(),
-                 static_cast < int(*)(int) > (tolower) );
+  std::transform (name.begin (), name.end (), name.begin (),
+                  static_cast < int(*)(int) > (tolower));
 
-  staticProtocols.put(name, protocol);
-  staticProtocolsList.push_back(protocol);
+  staticProtocols.put (name, protocol);
+  staticProtocolsList.push_back (protocol);
 }
 
 

-----------------------------------------------------------------------

Summary of changes:
 myserver/src/base/file/files_utility.cpp          |  639 ++++++++++-----------
 myserver/src/http_handler/http_dir/http_dir.cpp   |   95 ++--
 myserver/src/http_handler/http_file/http_file.cpp |   16 +-
 myserver/src/protocol/protocol.cpp                |   40 +-
 myserver/src/protocol/protocol_buffer.cpp         |    3 +-
 myserver/src/protocol/protocols_manager.cpp       |   34 +-
 6 files changed, 390 insertions(+), 437 deletions(-)


hooks/post-receive
-- 
GNU MyServer



From MAILER-DAEMON Sat Aug 08 07:32:29 2009
Received: from mailman by lists.gnu.org with archive (Exim 4.43)
	id 1MZkA1-0007JI-Mi
	for mharc-myserver-commit@gnu.org; Sat, 08 Aug 2009 07:32:29 -0400
Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43)
	id 1MZk9w-0007I8-5W
	for myserver-commit@gnu.org; Sat, 08 Aug 2009 07:32:24 -0400
Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43)
	id 1MZk9t-0007Hh-I8
	for myserver-commit@gnu.org; Sat, 08 Aug 2009 07:32:22 -0400
Received: from [199.232.76.173] (port=35780 helo=monty-python.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43) id 1MZk9t-0007HV-3j
	for myserver-commit@gnu.org; Sat, 08 Aug 2009 07:32:21 -0400
Received: from savannah.gnu.org ([199.232.41.3]:42016 helo=sv.gnu.org)
	by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32)
	(Exim 4.60) (envelope-from <gscrivano@gnu.org>) id 1MZk9s-000513-P0
	for myserver-commit@gnu.org; Sat, 08 Aug 2009 07:32:20 -0400
Received: from download.savannah.gnu.org ([199.232.41.75]
	helo=cvs.savannah.gnu.org) by sv.gnu.org with esmtp (Exim 4.69)
	(envelope-from <gscrivano@gnu.org>) id 1MZk9r-00013L-MP
	for myserver-commit@gnu.org; Sat, 08 Aug 2009 11:32:19 +0000
Received: from gscrivano by cvs.savannah.gnu.org with local (Exim 4.69)
	(envelope-from <gscrivano@savannah.gnu.org>) id 1MZk9o-00012t-Cg
	for myserver-commit@gnu.org; Sat, 08 Aug 2009 11:32:19 +0000
To: myserver-commit@gnu.org
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: 46f541486dec795c35892089564e39e7b897853e
X-Git-Newrev: fbc5966d528e40ddf3fc25ee7450363fa8168848
Message-Id: <E1MZk9o-00012t-Cg@cvs.savannah.gnu.org>
From: Giuseppe Scrivano <gscrivano@gnu.org>
Date: Sat, 08 Aug 2009 11:32:17 +0000
X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2)
Subject: [myserver-commit] [SCM] GNU MyServer branch, master,
	updated. fbc5966d528e40ddf3fc25ee7450363fa8168848
X-BeenThere: myserver-commit@gnu.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: myserver-commit.gnu.org
List-Unsubscribe: <http://lists.gnu.org/mailman/listinfo/myserver-commit>,
	<mailto:myserver-commit-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/pipermail/myserver-commit>
List-Post: <mailto:myserver-commit@gnu.org>
List-Help: <mailto:myserver-commit-request@gnu.org?subject=help>
List-Subscribe: <http://lists.gnu.org/mailman/listinfo/myserver-commit>,
	<mailto:myserver-commit-request@gnu.org?subject=subscribe>
X-List-Received-Date: Sat, 08 Aug 2009 11:32:26 -0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU MyServer".

The branch, master has been updated
       via  fbc5966d528e40ddf3fc25ee7450363fa8168848 (commit)
      from  46f541486dec795c35892089564e39e7b897853e (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------


commit fbc5966d528e40ddf3fc25ee7450363fa8168848
Author: Giuseppe Scrivano <gscrivano@gnu.org>
Date:   Sat Aug 8 13:19:33 2009 +0200

    Fix an implicit cast to a signed type.

diff --git a/myserver/src/protocol/http/http_data_read.cpp b/myserver/src/protocol/http/http_data_read.cpp
index 3e15e68..afb3744 100644
--- a/myserver/src/protocol/http/http_data_read.cpp
+++ b/myserver/src/protocol/http/http_data_read.cpp
@@ -359,7 +359,7 @@ int HttpDataRead::readPostData(HttpThreadContext* td, int* httpRetCode)
         {
 
           /* Do not try to read more than what we expect.  */
-          u_long dimBuffer = std::min (td->secondaryBuffer->getRealLength() - 1l,
+          u_long dimBuffer = std::min (td->secondaryBuffer->getRealLength() - 1ul,
                                        length);
 
           if (readContiguousPrimitivePostData (td->request.uriOptsPtr,

-----------------------------------------------------------------------

Summary of changes:
 myserver/src/protocol/http/http_data_read.cpp |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)


hooks/post-receive
-- 
GNU MyServer



From MAILER-DAEMON Sun Aug 09 06:05:02 2009
Received: from mailman by lists.gnu.org with archive (Exim 4.43)
	id 1Ma5Gv-00009N-Vw
	for mharc-myserver-commit@gnu.org; Sun, 09 Aug 2009 06:05:02 -0400
Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43)
	id 1Ma5Gt-00006s-89
	for myserver-commit@gnu.org; Sun, 09 Aug 2009 06:04:59 -0400
Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43)
	id 1Ma5Go-0008Ta-Sg
	for myserver-commit@gnu.org; Sun, 09 Aug 2009 06:04:58 -0400
Received: from [199.232.76.173] (port=45444 helo=monty-python.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43) id 1Ma5Go-0008TK-KA
	for myserver-commit@gnu.org; Sun, 09 Aug 2009 06:04:54 -0400
Received: from savannah.gnu.org ([199.232.41.3]:52461 helo=sv.gnu.org)
	by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32)
	(Exim 4.60) (envelope-from <gscrivano@gnu.org>) id 1Ma5Gm-0006a1-Lg
	for myserver-commit@gnu.org; Sun, 09 Aug 2009 06:04:54 -0400
Received: from download.savannah.gnu.org ([199.232.41.75]
	helo=cvs.savannah.gnu.org) by sv.gnu.org with esmtp (Exim 4.69)
	(envelope-from <gscrivano@gnu.org>) id 1Ma5Gm-0004ZT-5b
	for myserver-commit@gnu.org; Sun, 09 Aug 2009 10:04:52 +0000
Received: from gscrivano by cvs.savannah.gnu.org with local (Exim 4.69)
	(envelope-from <gscrivano@savannah.gnu.org>) id 1Ma5Gj-0004Yu-4E
	for myserver-commit@gnu.org; Sun, 09 Aug 2009 10:04:51 +0000
To: myserver-commit@gnu.org
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: fbc5966d528e40ddf3fc25ee7450363fa8168848
X-Git-Newrev: 40159f18d6d81acded8f0e875075105aa0a68b63
Message-Id: <E1Ma5Gj-0004Yu-4E@cvs.savannah.gnu.org>
From: Giuseppe Scrivano <gscrivano@gnu.org>
Date: Sun, 09 Aug 2009 10:04:50 +0000
X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2)
Subject: [myserver-commit] [SCM] GNU MyServer branch, master,
	updated. 40159f18d6d81acded8f0e875075105aa0a68b63
X-BeenThere: myserver-commit@gnu.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: myserver-commit.gnu.org
List-Unsubscribe: <http://lists.gnu.org/mailman/listinfo/myserver-commit>,
	<mailto:myserver-commit-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/pipermail/myserver-commit>
List-Post: <mailto:myserver-commit@gnu.org>
List-Help: <mailto:myserver-commit-request@gnu.org?subject=help>
List-Subscribe: <http://lists.gnu.org/mailman/listinfo/myserver-commit>,
	<mailto:myserver-commit-request@gnu.org?subject=subscribe>
X-List-Received-Date: Sun, 09 Aug 2009 10:04:59 -0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU MyServer".

The branch, master has been updated
       via  40159f18d6d81acded8f0e875075105aa0a68b63 (commit)
       via  142ea49d9a8945ec00c312bc680929bb755960a5 (commit)
      from  fbc5966d528e40ddf3fc25ee7450363fa8168848 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------


commit 40159f18d6d81acded8f0e875075105aa0a68b63
Author: Giuseppe Scrivano <gscrivano@gnu.org>
Date:   Sun Aug 9 12:00:35 2009 +0200

    Rename the `StrTrim' function to `trim'.

diff --git a/myserver/include/base/string/securestr.h b/myserver/include/base/string/securestr.h
index 8dab641..110ad30 100755
--- a/myserver/include/base/string/securestr.h
+++ b/myserver/include/base/string/securestr.h
@@ -2,7 +2,7 @@
 /*
 MyServer
 * strlcpy and strlcat by codingmaster
-Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc.
+Copyright (C) 2002, 2003, 2004, 2009 Free Software Foundation, Inc.
 Copyright (C) 2004 by codingmaster
 This program is free software; you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
@@ -19,10 +19,13 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
 #include "stdafx.h"
 #ifndef SECURESTR_H
-#define SECURESTR_H
+# define SECURESTR_H
 
-unsigned int myserver_strlcat(char *destination, const char *source, unsigned int size);
-unsigned int myserver_strlcpy(char *destination, const char *source, unsigned int size);
+unsigned int myserver_strlcat (char *destination, const char *source,
+                               unsigned int size);
+
+unsigned int myserver_strlcpy (char *destination, const char *source,
+                               unsigned int size);
 #endif
 
 
diff --git a/myserver/include/base/string/stringutils.h b/myserver/include/base/string/stringutils.h
index 2f534f7..f5ece8a 100644
--- a/myserver/include/base/string/stringutils.h
+++ b/myserver/include/base/string/stringutils.h
@@ -1,19 +1,19 @@
 /* -*- mode: c++ -*- */
 /*
-MyServer
-Copyright (C) 2002, 2003, 2004, 2008, 2009 Free Software Foundation, Inc.
-This program 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 3 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program.  If not, see <http://www.gnu.org/licenses/>.
+  MyServer
+  Copyright (C) 2002, 2003, 2004, 2008, 2009 Free Software Foundation, Inc.
+  This program 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 3 of the License, or
+  (at your option) any later version.
+
+  This program is distributed in the hope that it will be useful,
+  but WITHOUT ANY WARRANTY; without even the implied warranty of
+  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+  GNU General Public License for more details.
+
+  You should have received a copy of the GNU General Public License
+  along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
 
 #ifndef STRINGUTILS_H
@@ -24,68 +24,67 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 using namespace std;
 
-const char *getRFC822GMTTime(char* out,int len);
-const char *getRFC822GMTTime(const time_t,char* out,int len);
-const char *getRFC822LocalTime(char* out,int len);
-const char *getRFC822LocalTime(const time_t,char* out,int len);
+const char *getRFC822GMTTime (char* out,int len);
+const char *getRFC822GMTTime (const time_t,char* out,int len);
+const char *getRFC822LocalTime (char* out,int len);
+const char *getRFC822LocalTime (const time_t,char* out,int len);
 
-const char *getRFC822GMTTime(string& out,int len);
-const char *getRFC822GMTTime(const time_t, string& out, int len);
-const char *getRFC822LocalTime(string& out,int len);
-const char *getRFC822LocalTime(const time_t, string &out,int len);
+const char *getRFC822GMTTime (string& out,int len);
+const char *getRFC822GMTTime (const time_t, string& out, int len);
+const char *getRFC822LocalTime (string& out,int len);
+const char *getRFC822LocalTime (const time_t, string &out,int len);
 
-int getCharInString(const char*,const char*,int max);
+int getCharInString (const char*,const char*,int max);
 
-const char* getLocalLogFormatDate(const time_t t, char* out, int len);
-const char* getGMTLogFormatDate(const time_t t, char* out, int len);
-const char* getLocalLogFormatDate(char* out, int len);
-const char* getGMTLogFormatDate(char* out, int len);
+const char* getLocalLogFormatDate (const time_t t, char* out, int len);
+const char* getGMTLogFormatDate (const time_t t, char* out, int len);
+const char* getLocalLogFormatDate (char* out, int len);
+const char* getGMTLogFormatDate (char* out, int len);
 
-const char* getLocalLogFormatDate(const time_t t, string& out, int len);
-const char* getGMTLogFormatDate(const time_t t, string& out, int len);
-const char* getLocalLogFormatDate(string& out, int len);
-const char* getGMTLogFormatDate(string& out, int len);
+const char* getLocalLogFormatDate (const time_t t, string& out, int len);
+const char* getGMTLogFormatDate (const time_t t, string& out, int len);
+const char* getLocalLogFormatDate (string& out, int len);
+const char* getGMTLogFormatDate (string& out, int len);
 
-time_t getTime(const char* str);
-inline time_t getTime(string const& str){ return getTime(str.c_str()); }
+time_t getTime (const char* str);
+inline time_t getTime (string const& str){ return getTime (str.c_str ()); }
 
-void StrTrim(char* str, char* trimChars);
+void trim (char* str, char* trimChars);
 
-void gotoNextLine(char** cmd);
+void gotoNextLine (char** cmd);
 
-int hexVal(char c);
+int hexVal (char c);
 
-void translateEscapeString(char *TargetStr);
-void translateEscapeString(string& TargetStr);
+void translateEscapeString (char *TargetStr);
+void translateEscapeString (string& TargetStr);
 
 int hexToInt(const char *str);
-inline time_t hexToInt(string const& str){ return hexToInt(str.c_str()); }
+inline time_t hexToInt(string const& str){ return hexToInt(str.c_str ()); }
 
-int getEndLine(const char* str, int max);
-inline int getEndLine(string const& str, int max)
-                {return getEndLine(str.c_str(), max); }
+int getEndLine (const char* str, int max);
+inline int getEndLine (string const& str, int max)
+{return getEndLine (str.c_str (), max); }
 
-string trim(string const& s, string const&t = " ");
+string trim (string const& s, string const&t = " ");
 string trimLeft ( string const &s , string const &t = " " );
 string trimRight ( string const &s , string const &t = " " );
 
-int stringcmpi(string const &a, string const &b);
-int stringcmp(string const &a, string const &b);
+int stringcmpi (string const &a, string const &b);
+int stringcmp (string const &a, string const &b);
 
-int stringcmpi(string const &a, const char* b);
-int stringcmp(string const &a, const char* b);
+int stringcmpi (string const &a, const char* b);
+int stringcmp (string const &a, const char* b);
 
 #ifndef WIN32
-extern "C" {
+extern "C"
+{
 char* strupr(char * string);
-
-#include <string.h>
+# include <string.h>
 }
 #endif
 
 #ifndef strcmpi
-#define strcmpi strcasecmp
+# define strcmpi strcasecmp
 #endif
 
 #endif
-
diff --git a/myserver/src/base/string/securestr.cpp b/myserver/src/base/string/securestr.cpp
index 860b345..28531a6 100644
--- a/myserver/src/base/string/securestr.cpp
+++ b/myserver/src/base/string/securestr.cpp
@@ -1,20 +1,20 @@
 /*
-MyServer
-* strlcpy and strlcat by codingmaster
-Copyright (C) 2002, 2003, 2004, 2007, 2008 Free Software Foundation, Inc.
-Copyright (C) 2004 by codingmaster
-This program 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 3 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program.  If not, see <http://www.gnu.org/licenses/>.
+  MyServer
+  * strlcpy and strlcat by codingmaster
+  Copyright (C) 2002, 2003, 2004, 2007, 2008, 2009 Free Software Foundation, Inc.
+  Copyright (C) 2004 by codingmaster
+  This program 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 3 of the License, or
+  (at your option) any later version.
+
+  This program is distributed in the hope that it will be useful,
+  but WITHOUT ANY WARRANTY; without even the implied warranty of
+  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+  GNU General Public License for more details.
+
+  You should have received a copy of the GNU General Public License
+  along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
 #include <include/base/string/securestr.h>
 #include <string.h>
@@ -22,100 +22,101 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #define FAST_SECURE_STR
 
 /*!
- *Secure string concatenate routine.
+ * Secure string concatenate routine.
  */
-unsigned int myserver_strlcat(char *dst, const char *src, unsigned int size)
+unsigned int myserver_strlcat (char *dst, const char *src, unsigned int size)
 {
 #ifdef FAST_SECURE_STR
-  u_long dstLen = strlen(dst);
-  u_long srcLen = strlen(src);
+  u_long dstLen = strlen (dst);
+  u_long srcLen = strlen (src);
   u_long tc;
 
   size -= dstLen;
 
   tc = (srcLen < size ? srcLen : size);
 
-  if(tc)
-  {
-    if(size <= srcLen)
-      tc--;
-    memcpy(dst + dstLen, src, tc);
-    dst[tc] = '\0';
-  }
+  if (tc)
+    {
+      if (size <= srcLen)
+        tc--;
+      memcpy (dst + dstLen, src, tc);
+      dst[tc] = '\0';
+    }
 
   return dstLen + srcLen;
 #else
   char *dstptr = dst;
   size_t dstlen,tocopy = size;
   const char *srcptr = src;
-  
-  while(tocopy-- && *dstptr)
-  dstptr++;
-    
+
+  while (tocopy-- && *dstptr)
+    dstptr++;
+
   dstlen = dstptr - dst;
-  
+
   tocopy = size - dstlen;
-  if(!tocopy)
-    return((int)(dstlen + strlen(src)));
-    
-  while(*srcptr)
-  {
-    if(tocopy!=1)
+  if (!tocopy)
+    return ((int)(dstlen + strlen (src)));
+
+  while (*srcptr)
     {
-      *dstptr++ = *srcptr;
-      tocopy--;
+      if (tocopy!=1)
+        {
+          *dstptr++ = *srcptr;
+          tocopy--;
+        }
+      srcptr++;
     }
-    srcptr++;
-  }
-  
+
   *dstptr = 0;
-  
-  return((int)(dstlen + (srcptr - src)));
+
+  return ((int)(dstlen + (srcptr - src)));
 #endif
 }
 
 /*!
- *Secure string copy routine.
- */   
-unsigned int myserver_strlcpy(register char *dst, register const char *src, unsigned int size)
+ * Secure string copy routine.
+ */
+unsigned int myserver_strlcpy (register char *dst, register const char *src,
+                               unsigned int size)
 {
 #ifdef FAST_SECURE_STR
-  u_long ret = strlen(src);
+  u_long ret = strlen (src);
   u_long tc = (ret < size ? ret : size);
-  
-  if(tc)
-  {
-    if(size <= ret)
-      tc--;
-
-    memcpy(dst, src, tc);
-    dst[tc] = '\0';
-  }
+
+  if (tc)
+    {
+      if (size <= ret)
+        tc--;
+
+      memcpy (dst, src, tc);
+      dst[tc] = '\0';
+    }
   return ret;
 #else
   char *dstptr = dst;
   size_t tocopy = size;
   const char *srcptr = src;
-  
-  if(tocopy && --tocopy)
-  {
-    do
+
+  if (tocopy && --tocopy)
     {
-      if(!(*dstptr++ = *srcptr++))
-        break;
+      do
+        {
+          if (!(*dstptr++ = *srcptr++))
+            break;
+        }
+
+      while (--tocopy);
     }
-  
-    while(--tocopy);
-  }
-  
-  if(!tocopy)
-  {
-    if(size)
-      *dstptr = 0;
-    
-    while(*srcptr++);
-  }
-  
-  return((int)(srcptr - src - 1));
+
+  if (!tocopy)
+    {
+      if (size)
+        *dstptr = 0;
+
+      while (*srcptr++);
+    }
+
+  return ((int)(srcptr - src - 1));
 #endif
 }
diff --git a/myserver/src/base/string/stringutils.cpp b/myserver/src/base/string/stringutils.cpp
index a3bb5a6..71aed2c 100644
--- a/myserver/src/base/string/stringutils.cpp
+++ b/myserver/src/base/string/stringutils.cpp
@@ -1,48 +1,48 @@
 /*
-MyServer
-Copyright (C) 2002, 2003, 2004, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
-This program 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 3 of the License,  or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful, 
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program.  If not, see <http://www.gnu.org/licenses/>.
+  MyServer
+  Copyright (C) 2002, 2003, 2004, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
+  This program 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 3 of the License,  or
+  (at your option) any later version.
+
+  This program is distributed in the hope that it will be useful,
+  but WITHOUT ANY WARRANTY; without even the implied warranty of
+  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+  GNU General Public License for more details.
+
+  You should have received a copy of the GNU General Public License
+  along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
 
-
 #include "stdafx.h"
 #include <include/base/string/stringutils.h>
 #include <include/base/safetime/safetime.h>
 
-extern "C" {
+extern "C"
+{
 #include <stdlib.h>
 #include <string.h>
 #include <ctype.h>
 #ifndef WIN32
-#include <stdio.h>
+# include <stdio.h>
 #endif
 }
 
 #ifdef GETTIMEOFDAY
-#include <sys/time.h>
+# include <sys/time.h>
 #endif
 
 #ifdef WIN32
-#include <direct.h>
-#include <time.h>
+# include <direct.h>
+# include <time.h>
 #endif
 
 /*!
- *This function format current time to the RFC 822 format and output 
- *it to a string.
+ * This function format current time to the RFC 822 format and output
+ * it to a string.
  */
-const char *getRFC822GMTTime(string& out,int len)
+const char *getRFC822GMTTime (string& out,int len)
 {
   time_t ltime;
   time( &ltime );
@@ -50,127 +50,121 @@ const char *getRFC822GMTTime(string& out,int len)
 }
 
 /*!
- *This function format current time to the RFC 822 format and output 
- *it to a string.
+ * This function format current time to the RFC 822 format and output
+ * it to a string.
  */
-const char *getRFC822GMTTime(const time_t t, string& out, int len)
+const char *getRFC822GMTTime (const time_t t, string& out, int len)
 {
-  /*! 
-   *FIXME: Do not use a temporary buffer but access directly the string
-   *class data. 
-   */
   char buff[32];
-  getRFC822GMTTime(t, buff, 32);
-  out.assign(buff);
-  return out.c_str();
+  getRFC822GMTTime (t, buff, 32);
+  out.assign (buff);
+  return out.c_str ();
 }
 
 /*!
- *This function format current time to the RFC 822 format and output 
- *it to a string.
+ * This function format current time to the RFC 822 format and output
+ * it to a string.
  */
-const char *getRFC822LocalTime(string& out,int len)
+const char *getRFC822LocalTime (string& out,int len)
 {
   time_t ltime;
-  time( &ltime );
-  return getRFC822LocalTime(ltime, out, len);
+  time (&ltime);
+  return getRFC822LocalTime (ltime, out, len);
 }
 
 /*!
- *This function format current time to the RFC 822 format and output 
- *it to a string.
+ * This function format current time to the RFC 822 format and output
+ * it to a string.
  */
-const char *getRFC822LocalTime(const time_t t, string &out,int len)
+const char *getRFC822LocalTime (const time_t t, string &out,int len)
 {
-  /*! 
-   *FIXME: Do not use a temporary buffer but access directly the string
-   *class data. 
-   */
   char buff[32];
-  getRFC822LocalTime(t, buff, 32);
-  out.assign(buff);
-  return out.c_str();
+  getRFC822LocalTime (t, buff, 32);
+  out.assign (buff);
+  return out.c_str ();
 }
 
 /*!
- *This function format current time to the RFC 822 format.
+ * This function format current time to the RFC 822 format.
  */
-const char *getRFC822GMTTime(char* out, int len)
+const char *getRFC822GMTTime (char* out, int len)
 {
   time_t ltime;
-  time( &ltime );
-  return getRFC822GMTTime(ltime, out, len);
+  time (&ltime);
+  return getRFC822GMTTime (ltime, out, len);
 }
+
 /*!
- *This function formats a time to the RFC 822 format.
+ * This function formats a time to the RFC 822 format.
  */
-const char *getRFC822GMTTime(const time_t ltime, char* out, int /*!len*/)
+const char *getRFC822GMTTime (const time_t ltime, char* out, int /*!len*/)
 {
   char *asct;
   u_long ind = 0;
-  tm* GMtime = gmtime( &ltime );
-  GMtime->tm_year += 1900;
-  asct=asctime(GMtime);
-  out[ind++]=asct[0];
-  out[ind++]=asct[1];
-  out[ind++]=asct[2];
-  out[ind++]=',';
-
-  if(asct[8] != ' ')
-    out[ind++]=' ';
-
-  out[ind++]=asct[8];
-  out[ind++]=asct[9];
-  out[ind++]=' ';
-  out[ind++]=asct[4];
-  out[ind++]=asct[5];
-  out[ind++]=asct[6];
-  out[ind++]=' ';
-
-  sprintf(&out[ind], "%i", GMtime->tm_year);
+  tm* gmTime = gmtime (&ltime);
+  gmTime->tm_year += 1900;
+  asct= asctime (gmTime);
+  out[ind++]= asct[0];
+  out[ind++]= asct[1];
+  out[ind++]= asct[2];
+  out[ind++] = ',';
+
+  if (asct[8] != ' ')
+    out[ind++] = ' ';
+
+  out[ind++] = asct[8];
+  out[ind++] = asct[9];
+  out[ind++] = ' ';
+  out[ind++]= asct[4];
+  out[ind++]= asct[5];
+  out[ind++]= asct[6];
+  out[ind++] = ' ';
+
+  sprintf(&out[ind], "%i", gmTime->tm_year);
   ind += 4;
 
-  out[ind++]=' ';
-  out[ind++]=asct[11];
-  out[ind++]=asct[12];
-  out[ind++]=':';
-  out[ind++]=asct[14];
-  out[ind++]=asct[15];
-  out[ind++]=':';
-  out[ind++]=asct[17];
-  out[ind++]=asct[18];
-  out[ind++]=' ';
-  out[ind++]='G';
-  out[ind++]='M';
-  out[ind++]='T';
-  out[ind++]='\0';
-  out[ind++]='\0';
-  out[ind++]='\0';
+  out[ind++] = ' ';
+  out[ind++]= asct[11];
+  out[ind++]= asct[12];
+  out[ind++] = ':';
+  out[ind++]= asct[14];
+  out[ind++]= asct[15];
+  out[ind++] = ':';
+  out[ind++]= asct[17];
+  out[ind++]= asct[18];
+  out[ind++] = ' ';
+  out[ind++] = 'G';
+  out[ind++] = 'M';
+  out[ind++] = 'T';
+  out[ind++] = '\0';
+  out[ind++] = '\0';
+  out[ind++] = '\0';
   return out;
 }
+
 /*!
- *This function convert from a RFC 822 format to a time_t.
+ * This function convert from a RFC 822 format to a time_t.
  */
-time_t getTime(const char* str)
+time_t getTime (const char* str)
 {
   char lb[30];
   int c = 0;
   int i;
   tm t;
-  for(i = 0; i < 30; i++)
-  {
-    if(str[c] == ',')
+  for (i = 0; i < 30; i++)
     {
-      c++;
-      lb[i] = '\0';
-      break;
+      if (str[c] == ',')
+        {
+          c++;
+          lb[i] = '\0';
+          break;
+        }
+      else
+        lb[i] = str[c++];
     }
-    else
-      lb[i] = str[c++];
-  }
   i = lb[0] + lb[1] + lb[3];
   switch(i)
-  {
+    {
     case 310:
       t.tm_wday = 0;  //Sun
       break;
@@ -192,36 +186,36 @@ time_t getTime(const char* str)
     case 296:
       t.tm_wday = 6;  //Sat
       break;
-  }
+    }
 
   c++;
-  for(i = 0; i < 30; i++)
-  {
-    if(i && str[c]==' ')
+  for (i = 0; i < 30; i++)
     {
-      c++;
-      lb[i] = '\0';
-      break;
+      if (i && str[c] == ' ')
+        {
+          c++;
+          lb[i] = '\0';
+          break;
+        }
+      else
+        lb[i] = str[c++];
     }
-    else
-      lb[i] = str[c++];
-  }
   t.tm_mday = atoi(lb);
-  
-  for(i = 0; i < 30; i++)
-  {
-    if(i && str[c] == ' ')
+
+  for (i = 0; i < 30; i++)
     {
-      c++;
-      lb[i] = '\0';
-      break;
+      if (i && str[c] == ' ')
+        {
+          c++;
+          lb[i] = '\0';
+          break;
+        }
+      else
+        lb[i] = str[c++];
     }
-    else
-      lb[i] = str[c++];
-  }
   i = lb[0] + lb[1] + lb[3];
   switch(i)
-  {
+    {
     case 281:
       t.tm_wday = 0;  //Jan
       break;
@@ -258,61 +252,61 @@ time_t getTime(const char* str)
     case 268:
       t.tm_wday = 11;  //Dec
       break;
-  }
+    }
 
-  for(i = 0; i < 30; i++)
-  {
-    if(i && str[c]==' ')
+  for (i = 0; i < 30; i++)
     {
-      c++;
-      lb[i] = '\0';
-      break;
+      if (i && str[c] == ' ')
+        {
+          c++;
+          lb[i] = '\0';
+          break;
+        }
+      else
+        lb[i] = str[c++];
     }
-    else
-      lb[i] = str[c++];
-  }
   t.tm_year = atoi(lb) - 1900;
-  
-  for(i = 0; i < 30; i++)
-  {
-    if(i && str[c] == ':')
+
+  for (i = 0; i < 30; i++)
     {
-      c++;
-      lb[i] = '\0';
-      break;
+      if (i && str[c] == ':')
+        {
+          c++;
+          lb[i] = '\0';
+          break;
+        }
+      else
+        lb[i] = str[c++];
     }
-    else
-      lb[i] = str[c++];
-  }
   t.tm_hour = atoi(lb);
 
-  for(i = 0; i < 30; i++)
-  {
-    if(i && str[c] == ':')
+  for (i = 0; i < 30; i++)
     {
-      c++;
-      lb[i] = '\0';
-      break;
+      if (i && str[c] == ':')
+        {
+          c++;
+          lb[i] = '\0';
+          break;
+        }
+      else
+        lb[i] = str[c++];
     }
-    else
-      lb[i] = str[c++];
-  }
   t.tm_min = atoi(lb);
 
-  for(i = 0; i < 30; i++)
-  {
-    if(i && str[c]==':')
+  for (i = 0; i < 30; i++)
     {
-      c++;
-      lb[i] = '\0';
-      break;
+      if (i && str[c] == ':')
+        {
+          c++;
+          lb[i] = '\0';
+          break;
+        }
+      else
+        lb[i] = str[c++];
     }
-    else
-      lb[i] = str[c++];
-  }
   t.tm_sec = atoi(lb);
   t.tm_yday = 0;
-  t.tm_wday = 0;  
+  t.tm_wday = 0;
 
   t.tm_isdst = -1;
 
@@ -320,33 +314,33 @@ time_t getTime(const char* str)
 }
 
 /*!
- *This function format current time to the RFC 822 format.
+ * This function format current time to the RFC 822 format.
  */
-const char *getRFC822LocalTime(char* out, int len)
+const char *getRFC822LocalTime (char* out, int len)
 {
   time_t ltime;
-  time( &ltime );
-  return getRFC822LocalTime(ltime, out, len);
+  time (&ltime);
+  return getRFC822LocalTime (ltime, out, len);
 }
 /*!
- *This function formats a time to the RFC 822 format.
+ * This function formats a time to the RFC 822 format.
  */
-const char *getRFC822LocalTime(const time_t ltime, char* out, int /*!len*/)
+const char *getRFC822LocalTime (const time_t ltime, char* out, int /*!len*/)
 {
   char *asct;
   tm result;
   u_long ind = 0;
-  
-  myserver_localtime( &ltime, &result );
+
+  myserver_localtime (&ltime, &result);
 
   result.tm_year += 1900;
-  asct = asctime(&result);
+  asct = asctime (&result);
   out[ind++] = asct[0];
   out[ind++] = asct[1];
   out[ind++] = asct[2];
   out[ind++] = ',';
 
-  if(asct[8] != ' ')
+  if (asct[8] != ' ')
     out[ind++] = ' ';
 
   out[ind++] = asct[8];
@@ -357,7 +351,7 @@ const char *getRFC822LocalTime(const time_t ltime, char* out, int /*!len*/)
   out[ind++] = asct[6];
   out[ind++] = ' ';
 
-  sprintf(&out[ind], "%i", result.tm_year);
+  sprintf (&out[ind], "%i", result.tm_year);
   ind += 4;
 
   out[ind++] = ' ';
@@ -380,93 +374,94 @@ const char *getRFC822LocalTime(const time_t ltime, char* out, int /*!len*/)
 }
 
 /*!
- *Get the local time string.
+ * Get the local time string.
  */
-const char* getLocalLogFormatDate(char* out, int len)
+const char* getLocalLogFormatDate (char* out, int len)
 {
   time_t ltime;
-  time( &ltime );
-  return getLocalLogFormatDate(ltime, out, len);
+  time (&ltime);
+  return getLocalLogFormatDate (ltime, out, len);
 }
 
 /*!
- *Get the GMT time string.
+ * Get the GMT time string.
  */
-const char* getGMTLogFormatDate(char* out, int len)
-{  
+const char* getGMTLogFormatDate (char* out, int len)
+{
   time_t ltime;
-  time( &ltime );
-  return getGMTLogFormatDate(ltime, out, len);
+  time(&ltime);
+  return getGMTLogFormatDate (ltime, out, len);
 }
 
 
 /*!
- *Get the local time string.
+ * Get the local time string.
  */
-const char* getLocalLogFormatDate(const time_t t, string& out, int len)
+const char* getLocalLogFormatDate (const time_t t, string& out, int len)
 {
   char buff[32];
-  getLocalLogFormatDate(t, buff, len);
-  out.assign(buff);
-  return out.c_str();
+  getLocalLogFormatDate (t, buff, len);
+  out.assign (buff);
+  return out.c_str ();
 }
 
 /*!
- *Get the GMT time string.
+ * Get the GMT time string.
  */
-const char* getGMTLogFormatDate(const time_t t, string& out, int len)
+const char* getGMTLogFormatDate (const time_t t, string& out, int len)
 {
   char buff[32];
-  getGMTLogFormatDate(t, buff, len);
-  out.assign(buff);
-  return out.c_str();
+  getGMTLogFormatDate (t, buff, len);
+  out.assign (buff);
+  return out.c_str ();
 }
 /*!
- *Get the local time string.
+ * Get the local time string.
  */
-const char* getLocalLogFormatDate(string& out, int len)
+const char* getLocalLogFormatDate (string& out, int len)
 {
   char buff[32];
-  getLocalLogFormatDate(buff, len);
-  out.assign(buff);
-  return out.c_str();
+  getLocalLogFormatDate (buff, len);
+  out.assign (buff);
+  return out.c_str ();
 }
 
 /*!
- *Get the GMT time string.
+ * Get the GMT time string.
  */
 const char* getGMTLogFormatDate(string& out, int len)
 {
   char buff[32];
-  getGMTLogFormatDate(buff, len);
-  out.assign(buff);
-  return out.c_str();
+  getGMTLogFormatDate (buff, len);
+  out.assign (buff);
+  return out.c_str ();
 }
 
 /*!
- *Get a string in the format "day/month/year:hour:minute:second offset" 
- *for the local zone.
+ * Get a string in the format "day/month/year:hour:minute:second offset"
+ * for the local zone.
  */
-const char* getLocalLogFormatDate(const time_t t, char* out, int len)
+const char* getLocalLogFormatDate (const time_t t, char* out, int len)
 {
   int offset = 0;
   time_t ltime;
-  time( &ltime );
+  time (&ltime);
   char *asct;
-  tm GMtime;
-  myserver_localtime( &ltime, &GMtime );
-  if(len < 25)
+  tm gmTime;
+  myserver_localtime (&ltime, &gmTime );
+  if (len < 25)
     return 0;
-  GMtime.tm_year += 1900;
-  asct = asctime(&GMtime);
-   out[0] = asct[8] != ' ' ? asct[8] : '0';
+
+  gmTime.tm_year += 1900;
+  asct = asctime (&gmTime);
+  out[0] = asct[8] != ' ' ? asct[8] : '0';
   out[1] = asct[9];
   out[2] = '/';
   out[3] = asct[4];
   out[4]= asct[5];
   out[5] = asct[6];
   out[6] = '/';
-  sprintf(&out[7], "%i", GMtime.tm_year);
+  sprintf (&out[7], "%i", gmTime.tm_year);
   out[11] = ':';
   out[12] = asct[11];
   out[13] = asct[12];
@@ -479,7 +474,7 @@ const char* getLocalLogFormatDate(const time_t t, char* out, int len)
   out[20] = ' ';
 
 #ifndef WIN32
-  extern long timezone; 
+  extern long timezone;
   offset = -timezone;
 #else
 
@@ -487,56 +482,56 @@ const char* getLocalLogFormatDate(const time_t t, char* out, int len)
   struct timeval tv;
   struct timezone tz;
 
-  gettimeofday(&tv, &tz);
+  gettimeofday (&tv, &tz);
   offset = -tz.tz_minuteswest * 60;
 
 #else
   TIME_ZONE_INFORMATION tzi;
-  GetTimeZoneInformation(&tzi);
+  GetTimeZoneInformation (&tzi);
   offset = -tzi.Bias * 60;
 #endif
 
 #endif
 
-  if(offset < 0)
-  {
-    offset = -offset;
-    out[21] = '-';
-  }
+  if (offset < 0)
+    {
+      offset = -offset;
+      out[21] = '-';
+    }
   else
     out[21] = '+';
-  sprintf(&out[22], "%.2i%.2i", offset / (60 * 60), offset % (60 * 60) / 60);
+  sprintf (&out[22], "%.2i%.2i", offset / (60 * 60), offset % (60 * 60) / 60);
   out[26] = '\0';
   return out;
 }
 
 
 /*!
- *Get a string in the format "day/month/year:hour:minute:second offset" 
+ *Get a string in the format "day/month/year:hour:minute:second offset"
  *for the GMT zone.
  */
-const char* getGMTLogFormatDate(const time_t t, char* out, int len)
+const char* getGMTLogFormatDate (const time_t t, char* out, int len)
 {
   time_t ltime;
-  time( &ltime );
+  time (&ltime);
   char *asct;
   tm result;
 
-  myserver_localtime( &ltime, &result );
+  myserver_localtime ( &ltime, &result );
 
-  if(len < 25)
+  if (len < 25)
     return 0;
 
   result.tm_year += 1900;
-  asct = asctime(&result);
-   out[0] = asct[8] != ' ' ? asct[8] : '0';
+  asct = asctime (&result);
+  out[0] = asct[8] != ' ' ? asct[8] : '0';
   out[1] = asct[9];
   out[2] = '/';
   out[3] = asct[4];
   out[4] = asct[5];
   out[5] = asct[6];
   out[6] = '/';
-  sprintf(&out[7], "%i", result.tm_year);
+  sprintf (&out[7], "%i", result.tm_year);
   out[11] = ':';
   out[12] = asct[11];
   out[13] = asct[12];
@@ -559,131 +554,102 @@ const char* getGMTLogFormatDate(const time_t t, char* out, int len)
 /*!
  *Trim a string from the right side.
  */
-string trimRight(string const &s, string const &t )
+string trimRight (string const &s, string const &t)
 {
   string str = s;
-  return str.erase(str.find_last_not_of(t) + 1 ) ;
+  return str.erase (str.find_last_not_of (t) + 1 );
 }
 
 
 /*!
  *Trim a string from the left side.
  */
-string trimLeft(string const &s, string const &t )
+string trimLeft (string const &s, string const &t )
 {
   std::string str = s;
-  return str.erase( 0, s.find_first_not_of (t)) ;
+  return str.erase (0, s.find_first_not_of (t));
 }
 
 /*!
  *Trim a string.
  */
-string trim(string const &s,  string const &t)
+string trim (string const &s,  string const &t)
 {
-  return trimLeft(trimRight(s, t));
+  return trimLeft (trimRight (s, t));
 }
 
 /*!
  *This funtions takes two strings, first the str we're going to work on,
- *and second a list of characters that the funtion is going to remove 
+ *and second a list of characters that the funtion is going to remove
  *from the head and tail of the first string.
  *Ex:       char str[16]="Hellow World!!!";
  *          char trim[7]="e!HlwW";
  *          StrTrim(str,trim);
  *result:    str="ow World"
- *'w', 'W' and the last 'l' aren't removed because they aren't 
+ *'w', 'W' and the last 'l' aren't removed because they aren't
  *attached to the head or tail of the string
  */
 
-void StrTrim(char* str, char* trimchars)
+void trim (char* str, char* trimchars)
 {
   char *strptr = str;
   char *trimptr = trimchars;
-  
-  /*!
-  *Here we trim the characters of the head of the string.
-  *Just cycle through the trimchars and compare,
-  *if we find a char in str, increment the str to check the next char,
-  *and set the trimchars to the beggining.
-  *The first time it fails to find a char in str, it just leaves.
-  */
-  while(*trimptr && *strptr)
-  {
-    if(*strptr == *trimptr)
+
+  while (*trimptr && *strptr)
     {
-      strptr++;
-      trimptr = trimchars;
-      continue;
+      if (*strptr == *trimptr)
+        {
+          strptr++;
+          trimptr = trimchars;
+          continue;
+        }
+      trimptr++;
     }
-    trimptr++;
-  }
-
   trimptr = trimchars;
-  
-  /*!
-  *Here we push the string back to occupy the potencial
-  *empty spaces created at the beginning of the string.
-  *If the string was completly trimmed (if(!(*strptr))),
-  *just return an empty string. 
-  *If no 'holes' were created (!if(str!=strptr)) just move
-  *the pointer to the tail of the string to check there now.
-  */
-  if(str != strptr)      //Holes were created
-  {
-    if(!(*strptr))    //Full trim
+
+  if (str != strptr)
     {
-      *str = 0;
-      return;
+      if (!(*strptr))
+        {
+          *str = 0;
+          return;
+        }
+      while (*strptr)
+        {
+          *str = *strptr;
+          str++;
+          strptr++;
+        }
     }
-    while(*strptr)
+  else
     {
-      *str = *strptr;
-      str++;
-      strptr++;
+      while (*str)
+        str++;
     }
-  }else          //No holes were created
-  {
-    while(*str)
-      str++;
-  }
-  
-  /*!
-  *Now str-1 is exactly at the end of the string, we'll start trim from
-  *there then.
-  */
+
   str--;
-  /*!
-  *Here we trim the characters of the tail of the string.
-  *Just cycle through the trimchars and compare,
-  *if we find a char in the str, decrement the str to
-  *check the previous char, and set the trimchars to the beggining.
-  *The first time it fails to find a char in str, it just leaves.
-  *Note: Here we only check *trimptr in the while loop and not *str,
-  *that's because i know there is at least one character in there that
-  *isn't on trimchars, the character that stoped the first trim up there,
-  *so that character will allways be reach before str's NULL.
-  */
-  while(*trimptr)
-  {
-    if(*str == *trimptr)
+
+  while (*trimptr)
     {
-      str--;
-      trimptr = trimchars;
-      continue;
+      if (*str == *trimptr)
+        {
+          str--;
+          trimptr = trimchars;
+          continue;
+        }
+      trimptr++;
     }
-    trimptr++;
-  }
-  *(str + 1) = 0;        //Now to finish up
+  *(str + 1) = 0;
 }
 
 /*!
- *Set the buffer passed to the next line.
- *A new line is the first character after \n.
+ * Set the buffer passed to the next line.
+ * A new line is the first character after \n.
  */
-void gotoNextLine(char** cmd)
+void gotoNextLine (char** cmd)
 {
-  while(*(*cmd++) != '\n')
-    if(**cmd == '\0')
+  while (*(*cmd++) != '\n')
+    if (**cmd == '\0')
       break;
 
 }
@@ -697,19 +663,19 @@ void translateEscapeString(char *str)
   i = 0;
   j = 0;
   while (str[i] != 0)
-  {
-    if ((str[i] == '%') && (str[i + 1] != 0) && (str[i + 2] != 0))
     {
-      str[j] =(char) (16 * hexVal(str[i + 1]) + hexVal(str[i + 2]));
-      i = i + 3;
-    }
-    else
-    {
-      str[j] = str[i];
-      i++;
+      if ((str[i] == '%') && (str[i + 1] != 0) && (str[i + 2] != 0))
+        {
+          str[j] =(char) (16 * hexVal(str[i + 1]) + hexVal(str[i + 2]));
+          i = i + 3;
+        }
+      else
+        {
+          str[j] = str[i];
+          i++;
+        }
+      j++;
     }
-    j++;
-  }
   str[j] = 0;
 }
 
@@ -723,19 +689,19 @@ void translateEscapeString(string& str)
   j = 0;
   len = str.length();
   while (len--)
-  {
-    if ((str[i] == '%') && (str[i + 1] != 0) && (str[i + 2] != 0))
     {
-      str[j] =(char) (16 * hexVal(str[i + 1]) + hexVal(str[i + 2]));
-      i = i + 3;
-    }
-    else
-    {
-      str[j] = str[i];
-      i++;
+      if ((str[i] == '%') && (str[i + 1] != 0) && (str[i + 2] != 0))
+        {
+          str[j] =(char) (16 * hexVal(str[i + 1]) + hexVal(str[i + 2]));
+          i = i + 3;
+        }
+      else
+        {
+          str[j] = str[i];
+          i++;
+        }
+      j++;
     }
-    j++;
-  }
   str[j] = 0;
 }
 
@@ -747,17 +713,17 @@ int hexVal(char ch)
   if (ch >= '0' && ch <= '9')
     return ch - '0';
   else
-  {
-    if (ch >= 'a' && ch <= 'f')
-      return ch - 'a' + 10;
-    else
     {
-      if (ch >= 'A' && ch <= 'F')
-        return ch - 'A' + 10;
+      if (ch >= 'a' && ch <= 'f')
+        return ch - 'a' + 10;
       else
-        return 0;
+        {
+          if (ch >= 'A' && ch <= 'F')
+            return ch - 'A' + 10;
+          else
+            return 0;
+        }
     }
-  }
 }
 
 /*!
@@ -769,26 +735,26 @@ int hexToInt(const char *str)
   register const char *cp;
   cp = str;
   if (*cp == '\0')
-      return 0;
+    return 0;
   u = 0;
 
-  while (*cp != '\0') 
-  {
-    if (!isxdigit((int)*cp))
-      return 0;
+  while (*cp != '\0')
+    {
+      if (!isxdigit((int)*cp))
+        return 0;
 
-    if (u >= 0x10000000)
+      if (u >= 0x10000000)
         return 0;
 
-    u <<= 4;
+      u <<= 4;
 
-    if (*cp <= '9')  
+      if (*cp <= '9')
         u += *cp++ - '0';
-    else if (*cp >= 'a')
+      else if (*cp >= 'a')
         u += *cp++ - 'a' + 10;
-    else
+      else
         u += *cp++ - 'A' + 10;
-  }
+    }
   return u;
 }
 /*!
@@ -797,28 +763,29 @@ int hexToInt(const char *str)
 int getCharInString(const char* str, const char* characters, int max)
 {
   int i, j;
-  
-  if(max)
-  {
-    for(i = 0; (i < max) && (str[i]); i++ )
+
+  if (max)
     {
-      for(j = 0; characters[j]; j++)
-      {
-        if(str[i] == characters[j])
-          return i;
-      }
+      for (i = 0; (i < max) && (str[i]); i++ )
+        {
+          for (j = 0; characters[j]; j++)
+            {
+              if (str[i] == characters[j])
+                return i;
+            }
+        }
     }
-  }else
-  {  
-    for(i = 0; str[i]; i++ )
+  else
     {
-      for(j = 0; characters[j]; j++)
-      {
-        if(str[i] == characters[j])
-          return i;
-      }
+      for (i = 0; str[i]; i++ )
+        {
+          for (j = 0; characters[j]; j++)
+            {
+              if (str[i] == characters[j])
+                return i;
+            }
+        }
     }
-  }
   return -1;
 }
 
@@ -826,82 +793,83 @@ int getCharInString(const char* str, const char* characters, int max)
  *Get the offset to the first '\\r' or '\\n'.
  *Returns -1 on errors.
  */
-int getEndLine(const char* str, int max)
+int getEndLine (const char* str, int max)
 {
   int i;
-  
-  if(max)
-  {
-    for(i = 0; (i < max) && (str[i]); i++ )
+
+  if (max)
     {
-      if((str[i]=='\r') || (str[i]=='\n'))
-        return i;
+      for (i = 0; (i < max) && (str[i]); i++ )
+        {
+          if ((str[i] == '\r') || (str[i] == '\n'))
+            return i;
+        }
     }
-  }else
-  {
-    for(i = 0; str[i]; i++ )
+  else
     {
-      if((str[i] == '\r') || (str[i] == '\n'))
-        return i;
+      for (i = 0; str[i]; i++ )
+        {
+          if ((str[i] == '\r') || (str[i] == '\n'))
+            return i;
+        }
     }
-  }
   return -1;
 }
 
 /*!
- *Compares two strings and returns a value indicating their relationship. 
+ *Compares two strings and returns a value indicating their relationship.
  *This function ignores case.
  *Returns = 0 if [A] is identical to [B].
  *Returns < 0 if [A] is less than [B].
  *Returns > 0 if [A] is greater than [B].
  */
-int stringcmpi(string const &a, string const &b)
+int stringcmpi (string const &a, string const &b)
 {
-  return strcmpi(a.c_str(), b.c_str());
+  return strcmpi (a.c_str (), b.c_str ());
 }
 
 /*!
- *Compares two strings and returns a value indicating their relationship. 
+ *Compares two strings and returns a value indicating their relationship.
  *This function ignores case.
  *Returns = 0 if [A] is identical to [B].
  *Returns < 0 if [A] is less than [B].
  *Returns > 0 if [A] is greater than [B].
  */
-int stringcmpi(string const &a, const char* b)
+int stringcmpi (string const &a, const char* b)
 {
-  return strcmpi(a.c_str(), b);
+  return strcmpi (a.c_str (), b);
 }
 
 /*!
- *Compares two strings and returns a value indicating their relationship. 
+ *Compares two strings and returns a value indicating their relationship.
  *This function values the strings case too.
  *Returns = 0 if [A] is identical to [B].
  *Returns < 0 if [A] is less than [B].
  *Returns > 0 if [A] is greater than [B].
  */
-int stringcmp(const string& a, const string& b)
+int stringcmp (const string& a, const string& b)
 {
-  return strcmp(a.c_str(), b.c_str());
+  return strcmp (a.c_str (), b.c_str ());
 }
 
 /*!
- *Compares two strings and returns a value indicating their relationship. 
+ *Compares two strings and returns a value indicating their relationship.
  *This function values the strings case too.
  *Returns = 0 if [A] is identical to [B].
  *Returns < 0 if [A] is less than [B].
  *Returns > 0 if [A] is greater than [B].
  */
-int stringcmp(string const &a, const char* b)
+int stringcmp (string const &a, const char* b)
 {
-  return strcmp(a.c_str(), b);
+  return strcmp (a.c_str (), b);
 }
 
-#ifndef WIN32 
+#ifndef WIN32
 char* strupr(char * s)
 {
-    unsigned int len = strlen(s);
-    for(register unsigned int i = 0; i < len; i++)
-       s[i] = toupper(s[i]);
-    return s;
+  unsigned int len = strlen(s);
+  for (register unsigned int i = 0; i < len; i++)
+    s[i] = toupper(s[i]);
+  return s;
 }
 #endif
diff --git a/myserver/src/protocol/http/http_headers.cpp b/myserver/src/protocol/http/http_headers.cpp
index 8f6be37..e935b51 100755
--- a/myserver/src/protocol/http/http_headers.cpp
+++ b/myserver/src/protocol/http/http_headers.cpp
@@ -877,13 +877,13 @@ int HttpHeaders::readReqAuthLine (HttpRequestHeader *request,
         return 400;
       do
         {
-          StrTrim (digestToken, (char*)" ");
+          trim (digestToken, (char*)" ");
           if (!strcmpi (digestToken, (char*)"nonce"))
             {
               digestToken = strtok (NULL, (char*)"," );
               if (digestToken)
                 {
-                  StrTrim (digestToken, (char*)"\" ");
+                  trim (digestToken, (char*)"\" ");
                   myserver_strlcpy (request->digestNonce,digestToken,48 + 1);
                 }
             }
@@ -892,7 +892,7 @@ int HttpHeaders::readReqAuthLine (HttpRequestHeader *request,
               digestToken = strtok (NULL, (char*)"," );
               if (digestToken)
                 {
-                  StrTrim (digestToken, (char*)"\" ");
+                  trim (digestToken, (char*)"\" ");
                   myserver_strlcpy (request->digestOpaque,digestToken,48 + 1);
                 }
             }
@@ -901,7 +901,7 @@ int HttpHeaders::readReqAuthLine (HttpRequestHeader *request,
               digestToken = strtok (NULL, (char*)"\r\n," );
               if (digestToken)
                 {
-                  StrTrim (digestToken, (char*)"\" ");
+                  trim (digestToken, (char*)"\" ");
                   myserver_strlcpy (request->digestUri,digestToken,1024 + 1);
                 }
             }
@@ -910,7 +910,7 @@ int HttpHeaders::readReqAuthLine (HttpRequestHeader *request,
               digestToken = strtok (NULL, (char*)"\r\n," );
               if (digestToken)
                 {
-                  StrTrim (digestToken, (char*)"\" ");
+                  trim (digestToken, (char*)"\" ");
                   myserver_strlcpy (request->digestMethod,digestToken,16 + 1);
                 }
             }
@@ -919,7 +919,7 @@ int HttpHeaders::readReqAuthLine (HttpRequestHeader *request,
               digestToken = strtok (NULL, (char*)"\r\n," );
               if (digestToken)
                 {
-                  StrTrim (digestToken,(char*)"\" ");
+                  trim (digestToken,(char*)"\" ");
                   myserver_strlcpy (request->digestQop,digestToken,16 + 1);
                 }
             }
@@ -928,7 +928,7 @@ int HttpHeaders::readReqAuthLine (HttpRequestHeader *request,
               digestToken = strtok (NULL, (char*)"\r\n," );
               if (digestToken)
                 {
-                  StrTrim (digestToken, (char*)"\" ");
+                  trim (digestToken, (char*)"\" ");
                   myserver_strlcpy (request->digestRealm,digestToken,48 + 1);
                 }
             }
@@ -937,7 +937,7 @@ int HttpHeaders::readReqAuthLine (HttpRequestHeader *request,
               digestToken = strtok (NULL, (char*)"\r\n," );
               if (digestToken)
                 {
-                  StrTrim (digestToken, (char*)" \"");
+                  trim (digestToken, (char*)" \"");
                   myserver_strlcpy (request->digestCnonce, digestToken, 48 + 1);
                 }
             }
@@ -946,7 +946,7 @@ int HttpHeaders::readReqAuthLine (HttpRequestHeader *request,
               digestToken = strtok (NULL, (char*)"\r\n," );
               if (digestToken)
                 {
-                  StrTrim (digestToken, (char*)"\" ");
+                  trim (digestToken, (char*)"\" ");
                   myserver_strlcpy (request->digestUsername, digestToken, 48 + 1);
                   connection->setLogin (digestToken);
                 }
@@ -956,7 +956,7 @@ int HttpHeaders::readReqAuthLine (HttpRequestHeader *request,
               digestToken = strtok (NULL, "\r\n," );
               if (digestToken)
                 {
-                  StrTrim (digestToken, (char*)"\" ");
+                  trim (digestToken, (char*)"\" ");
                   myserver_strlcpy (request->digestResponse,digestToken,48 + 1);
                 }
             }
@@ -965,7 +965,7 @@ int HttpHeaders::readReqAuthLine (HttpRequestHeader *request,
               digestToken = strtok (NULL, (char*)"\r\n," );
               if (digestToken)
                 {
-                  StrTrim (digestToken, (char*)"\" ");
+                  trim (digestToken, (char*)"\" ");
                   myserver_strlcpy (request->digestNc, digestToken, 10 + 1);
                 }
             }



commit 142ea49d9a8945ec00c312bc680929bb755960a5
Author: Giuseppe Scrivano <gscrivano@gnu.org>
Date:   Sun Aug 9 11:41:56 2009 +0200

    Refactoring: removed comments that were interpreted as inline documentation by doxygen and code re-formatted

diff --git a/myserver/src/base/find_data/find_data.cpp b/myserver/src/base/find_data/find_data.cpp
index 92b7786..a33d86e 100644
--- a/myserver/src/base/find_data/find_data.cpp
+++ b/myserver/src/base/find_data/find_data.cpp
@@ -29,31 +29,31 @@ extern "C"
 using namespace std;
 
 /*!
- *Initialize class members.
+ * Initialize class members.
  */
-FindData::FindData()
+FindData::FindData ()
 {
 #ifdef WIN32
   ff = 0;
 #else
-  dirName.empty();
+  dirName.empty ();
   dh = 0;
 #endif
 }
 
 /*!
- *free class members.
+ * D'ctor.
  */
-FindData::~FindData()
+FindData::~FindData ()
 {
 
 }
 
 /*!
- *find the first file using its name.
- *Return -1 or errors.
+ * Find the first file using its name.
+ * Return -1 or errors.
  */
-int FindData::findfirst(const char *filename)
+int FindData::findfirst (const char *filename)
 {
 #ifdef WIN32
   string filenameStar;
@@ -63,17 +63,17 @@ int FindData::findfirst(const char *filename)
   filenameStar.erase (slashBackSlash + 1);
   filenameStar.append ("\\*");
 
-  ff = _findfirst(filenameStar.c_str(), &fd );
+  ff = _findfirst (filenameStar.c_str (), &fd );
   if(ff!=-1)
-  {
-    name = fd.name;
-    attrib = fd.attrib;
-    time_write = fd.time_write;
-    size = fd.size ;
-    return 0;
-  }
+    {
+      name = fd.name;
+      attrib = fd.attrib;
+      time_write = fd.time_write;
+      size = fd.size ;
+      return 0;
+    }
   else
-      return ff;
+    return ff;
 
 #else
    struct dirent * dirInfo;
@@ -118,15 +118,15 @@ int FindData::findfirst(const char *filename)
 }
 
 /*!
- *find the next file in the directory.
+ * Find the next file in the directory.
  */
 int FindData::findnext ()
 {
 #ifdef WIN32
   if (!ff)
     return -1;
-  int ret = _findnext (ff, &fd)? -1 : 0 ;
-  if (ret!=-1)
+  int ret = _findnext (ff, &fd) ? -1 : 0 ;
+  if (ret != -1)
   {
     name = fd.name;
     attrib = fd.attrib;
@@ -168,21 +168,21 @@ int FindData::findnext ()
 }
 
 /*!
- *free the used resources.
+ * Free the used resources.
  */
-int FindData::findclose()
+int FindData::findclose ()
 {
 #ifdef WIN32
   int ret;
-  if(!ff)
+  if (!ff)
     return -1;
-  ret = _findclose(ff);
+  ret = _findclose (ff);
   ff = 0;
   return ret;
 #else
-  if(dh)
-    closedir(dh);
-   dirName.empty();
-   return 0;
+  if (dh)
+    closedir (dh);
+  dirName.empty ();
+  return 0;
 #endif
 }
diff --git a/myserver/src/base/home_dir/home_dir.cpp b/myserver/src/base/home_dir/home_dir.cpp
index a1621b0..fc3c93f 100755
--- a/myserver/src/base/home_dir/home_dir.cpp
+++ b/myserver/src/base/home_dir/home_dir.cpp
@@ -24,59 +24,62 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 
 #ifdef WIN32
-#include <userenv.h>
+# include <userenv.h>
 #endif
-extern "C" {
+
+extern "C"
+{
 #include <string.h>
 #include <stdlib.h>
 #include <stdarg.h>
 #include <stdio.h>
 
 #ifdef GETPWNAM
-#include <pwd.h>
+# include <pwd.h>
 #endif
 
 #ifndef WIN32
-#include <errno.h>
-#include <netdb.h>
-#include <unistd.h>
-#include <signal.h>
+# include <errno.h>
+# include <netdb.h>
+# include <unistd.h>
+# include <signal.h>
 #ifdef HAVE_PTHREAD
-#include <pthread.h>
+# include <pthread.h>
 #endif
+
 #include <sys/wait.h>
 #endif
 }
 
-#include <sys/types.h>
-
 #ifdef WIN32
-#include <direct.h>
+# include <direct.h>
 #endif
 
+#include <sys/types.h>
+
 /*!
- *Class constructor.
+ * Class constructor.
  */
-HomeDir::HomeDir()
+HomeDir::HomeDir ()
 {
 #ifdef WIN32
-  data.assign("");
+  data.assign ("");
 #elif !GETPWNAM
-  data.clear();
+  data.clear ();
 #endif
   timestamp = 0;
   loaded = 0;
 
-  loadMutex.init();
+  loadMutex.init ();
 }
 
 /*!
- *Destroy th object.
+ * D'tor.
  */
-HomeDir::~HomeDir()
+HomeDir::~HomeDir ()
 {
-  clear();
-  loadMutex.destroy();
+  clear ();
+  loadMutex.destroy ();
 }
 
 /*!
@@ -85,16 +88,16 @@ HomeDir::~HomeDir()
 void HomeDir::clear()
 {
 #ifdef WIN32
-  data.assign("");
+  data.assign ("");
 #elif !GETPWNAM
-  HashMap<string, string*>::Iterator i = data.begin();
-  for( ; i != data.end(); i++)
-  {
-    string* val = *i;
-    if(val)
-      delete val;
-  }
-  data.clear();
+  HashMap<string, string*>::Iterator i = data.begin ();
+  for (; i != data.end (); i++)
+    {
+      string* val = *i;
+      if (val)
+        delete val;
+    }
+  data.clear ();
   timestamp = 0;
 #endif
   loaded = 0;
@@ -103,38 +106,38 @@ void HomeDir::clear()
 /*!
  *Public wrapper to loadImpl.
  */
-int HomeDir::load()
+int HomeDir::load ()
 {
   int ret;
-  loadMutex.lock();
+  loadMutex.lock ();
   
-  ret = loadImpl();
+  ret = loadImpl ();
 
-  loadMutex.unlock();
+  loadMutex.unlock ();
   return ret;
 }
 
 /*!
- *Load the internal buffer.
+ * Load the internal buffer.
  */
-int HomeDir::loadImpl()
+int HomeDir::loadImpl ()
 {
 #ifdef WIN32
   DWORD len = 64;
   char *buf;
   buf = new char[len];
 
-  if(GetProfilesDirectory(buf, &len) == FALSE)
-  {
-    delete [] buf;
-    buf = new char[len];
-    if(GetProfilesDirectory(buf, &len) == FALSE)
+  if (GetProfilesDirectory(buf, &len) == FALSE)
     {
-      delete [] buf; 
-      return 1;                               
+      delete [] buf;
+      buf = new char[len];
+      if (GetProfilesDirectory(buf, &len) == FALSE)
+        {
+          delete [] buf;
+          return 1;
+        }
     }
-  }
-  data.assign(buf);
+  data.assign (buf);
 #elif !GETPWNAM
   File usersFile;
   u_long size;
@@ -142,74 +145,74 @@ int HomeDir::loadImpl()
   u_long read;
   u_long counter;
 
-  clear();
+  clear ();
 
-  if (usersFile.openFile("/etc/passwd", File::READ | 
-                         File::OPEN_IF_EXISTS))
+  if (usersFile.openFile ("/etc/passwd", File::READ |
+                          File::OPEN_IF_EXISTS))
     return 1;
-  size = usersFile.getFileSize();
-  timestamp = usersFile.getLastModTime();
+  size = usersFile.getFileSize ();
+  timestamp = usersFile.getLastModTime ();
   if (size == (u_long) -1)
-  {
-    usersFile.close();
-    return 1;
-  }
+    {
+      usersFile.close ();
+      return 1;
+    }
 
   buffer = new char[size+1]; 
 
   usersFile.read (buffer, size, &read);
   buffer[read] = '\0';
 
- for (counter = 0; counter < read; counter++)
-   if (buffer[counter] == ':')
-     buffer[counter] = '\0';
+  for (counter = 0; counter < read; counter++)
+    if (buffer[counter] == ':')
+      buffer[counter] = '\0';
 
   for (counter = 0; counter < size;)
-  {
-    char *username = 0;
-    char *home = 0;
-    string sUsername;
-    string *sHome;
-    string *old;
-
-    if (buffer[counter] == '#')
     {
-      while (buffer[counter++] != '\n');
-      continue;
-    }
+      char *username = 0;
+      char *home = 0;
+      string sUsername;
+      string *sHome;
+      string *old;
+
+      if (buffer[counter] == '#')
+        {
+          while (buffer[counter++] != '\n');
+          continue;
+        }
 
-     /* Username.  */
-    username = &buffer[counter];
+      /* Username.  */
+      username = &buffer[counter];
 
-    while (buffer[counter++] != '\0');
-    /* Password.  */
+      while (buffer[counter++] != '\0');
+      /* Password.  */
 
-    while (buffer[counter++] != '\0');
-    /* User ID.  */
+      while (buffer[counter++] != '\0');
+      /* User ID.  */
 
-    while (buffer[counter++] != '\0');
-    /* Group ID.  */
+      while (buffer[counter++] != '\0');
+      /* Group ID.  */
 
-    while (buffer[counter++] != '\0');
-    /* Info.  */
+      while (buffer[counter++] != '\0');
+      /* Info.  */
 
-    while (buffer[counter++] != '\0');
-    /* Home.  */
+      while (buffer[counter++] != '\0');
+      /* Home.  */
 
-    home = &buffer[counter++];
-    sUsername = string (username);
-    sHome = new string (home);
+      home = &buffer[counter++];
+      sUsername = string (username);
+      sHome = new string (home);
 
-    old = data.put (sUsername, sHome);
+      old = data.put (sUsername, sHome);
 
-    if (old)
-      delete old;
+      if (old)
+        delete old;
 
-    while (buffer[counter++] != '\0');
-    /* Shell.  */
+      while (buffer[counter++] != '\0');
+      /* Shell.  */
 
-    while (buffer[counter++] != '\n');
-    /* Next tuple.  */
+      while (buffer[counter++] != '\n');
+      /* Next tuple.  */
   }
   delete [] buffer;
   usersFile.close ();
@@ -220,13 +223,13 @@ int HomeDir::loadImpl()
 }
 
 /*!
- *Get the home directory for a specified user and write
- *it directly to the supplied buffer.
- *\param userName The user name.
- *\param out The buffer where write.
- *\return 0 on success.
+ * Get the home directory for a specified user and write
+ * it directly to the supplied buffer.
+ * \param userName The user name.
+ * \param out The buffer where write.
+ * \return 0 on success.
  */
-int HomeDir::getHomeDir(string& userName, string& out)
+int HomeDir::getHomeDir (string& userName, string& out)
 {
 #ifdef WIN32
   out.assign (data);
@@ -255,19 +258,16 @@ int HomeDir::getHomeDir(string& userName, string& out)
     return 1;
 
   if (getTicks () - lastCheckTime > MYSERVER_SEC (1))
-  {
-    if(FilesUtility::getLastModTime ("/etc/passwd") != timestamp)
-      load ();
-    lastCheckTime = getTicks ();
-  }
+    {
+      if (FilesUtility::getLastModTime ("/etc/passwd") != timestamp)
+        load ();
+      lastCheckTime = getTicks ();
+    }
   res = data.get (userName);
   if (res)
-  {
-    out.assign (*res);
-  }
+      out.assign (*res);
   else
     out.assign ("");
 #endif
-
   return 0;
 }
diff --git a/myserver/src/base/pipe/pipe.cpp b/myserver/src/base/pipe/pipe.cpp
index 4341d06..3171019 100644
--- a/myserver/src/base/pipe/pipe.cpp
+++ b/myserver/src/base/pipe/pipe.cpp
@@ -21,21 +21,22 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #include <include/base/pipe/pipe.h>
 
 #ifndef WIN32
-extern "C" {
-#include <fcntl.h>
-#include <unistd.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <errno.h>
-#include <stdio.h>
-#include <fcntl.h>
-#include <stdlib.h>
-#include <string.h>
-#include <math.h>
-#include <time.h>
+extern "C"
+{
+# include <fcntl.h>
+# include <unistd.h>
+# include <sys/types.h>
+# include <sys/stat.h>
+# include <errno.h>
+# include <stdio.h>
+# include <fcntl.h>
+# include <stdlib.h>
+# include <string.h>
+# include <math.h>
+# include <time.h>
 }
 #else
-#include <windows.h>
+# include <windows.h>
 #endif
 
 #include <string>
diff --git a/myserver/src/protocol/http/http.cpp b/myserver/src/protocol/http/http.cpp
index 93f18ce..917bffd 100644
--- a/myserver/src/protocol/http/http.cpp
+++ b/myserver/src/protocol/http/http.cpp
@@ -51,23 +51,22 @@ using namespace std;
 extern "C"
 {
 #ifdef WIN32
-#include <direct.h>
-#include <errno.h>
+# include <direct.h>
+# include <errno.h>
 #endif
 
 #ifndef WIN32
-#include <string.h>
-#include <errno.h>
+# include <string.h>
+# include <errno.h>
 #endif
 }
 
 static HttpStaticData staticHttp;
 
 /*!
- *Get a pointer to a structure shared among all the instances.
+ * Get a pointer to a structure shared among all the instances.
  */
-HttpStaticData*
-Http::getStaticData ()
+HttpStaticData* Http::getStaticData ()
 {
   return &staticHttp;
 }
@@ -77,10 +76,9 @@ HttpStaticData::HttpStaticData () { }
 HttpStaticData::~HttpStaticData () { }
 
 /*!
- *Build a response for an OPTIONS request.
+ * Build a response for an OPTIONS request.
  */
-int
-Http::optionsHTTPRESOURCE (string& filename, int yetmapped)
+int Http::optionsHTTPRESOURCE (string& filename, int yetmapped)
 {
   int ret;
   string time;
@@ -136,10 +134,9 @@ Http::optionsHTTPRESOURCE (string& filename, int yetmapped)
 }
 
 /*!
- *Handle the HTTP TRACE command.
+ * Handle the HTTP TRACE command.
  */
-int
-Http::traceHTTPRESOURCE (string& filename, int yetmapped)
+int Http::traceHTTPRESOURCE (string& filename, int yetmapped)
 {
   int ret;
   char tmpStr[12];
@@ -170,7 +167,7 @@ Http::traceHTTPRESOURCE (string& filename, int yetmapped)
               << "Content-Type: message/http\r\n"
               << "Accept-Ranges: bytes\r\n\r\n";
 
-      /*! Send our HTTP header.  */
+      /* Send our HTTP header.  */
       ret = td->connection->socket->send (td->secondaryBuffer->getBuffer (),
                                           (u_long) td->secondaryBuffer->getLength (), 0);
       if (ret == SOCKET_ERROR)
@@ -183,7 +180,7 @@ Http::traceHTTPRESOURCE (string& filename, int yetmapped)
           return 0;
         }
 
-      /*! Send the client request header as the HTTP body.  */
+      /* Send the client request header as the HTTP body.  */
       ret = td->connection->socket->send (td->buffer->getBuffer (),
                                           contentLength, 0);
       if (ret == SOCKET_ERROR)
@@ -205,12 +202,11 @@ Http::traceHTTPRESOURCE (string& filename, int yetmapped)
 }
 
 /*!
- *Check if the method is allowed.
- *\param method The HTTP method name.
- *\return true if it is allowed.
+ * Check if the method is allowed.
+ * \param method The HTTP method name.
+ * \return true if it is allowed.
  */
-bool
-Http::allowMethod (const char *method)
+bool Http::allowMethod (const char *method)
 {
   char name[64];
   sprintf (name, "http.%s.allow", method);
@@ -225,40 +221,35 @@ Http::allowMethod (const char *method)
 }
 
 /*!
- *Get the timeout for the cgi.
+ * Get the timeout for the cgi.
  */
-u_long
-Http::getTimeout ()
+u_long Http::getTimeout ()
 {
   return staticHttp.timeout;
 }
 
 /*!
- *Main function to handle the HTTP PUT command.
+ * Main function to handle the HTTP PUT command.
  */
-int
-Http::putHTTPRESOURCE (string& filename,
-                       int sysReq,
-                       int onlyHeader,
-                       int yetmapped)
+int Http::putHTTPRESOURCE (string& filename, int sysReq, int onlyHeader,
+                           int yetmapped)
 {
   return sendHTTPResource (filename, sysReq, onlyHeader, yetmapped);
 }
 
 /*!
- *Get the file permissions mask.
- *\param filename Resource to access.
- *\param directory Directory where the resource is.
- *\param file The file specified by the resource.
- *\param filenamePath Complete path to the file.
- *\param yetmapped Is the resource mapped to the localfilesystem?
- *\param permissions Permission mask for this resource.
- *\return Return 200 on success.
- *\return Any other value is the HTTP error code.
+ * Get the file permissions mask.
+ * \param filename Resource to access.
+ * \param directory Directory where the resource is.
+ * \param file The file specified by the resource.
+ * \param filenamePath Complete path to the file.
+ * \param yetmapped Is the resource mapped to the localfilesystem?
+ * \param permissions Permission mask for this resource.
+ * \return Return 200 on success.
+ * \return Any other value is the HTTP error code.
  */
-int
-Http::getFilePermissions (string& filename, string& directory, string& file,
-                          string &filenamePath, int yetmapped, int* permissions)
+int Http::getFilePermissions (string& filename, string& directory, string& file,
+                              string &filenamePath, int yetmapped, int* permissions)
 {
   try
     {
@@ -273,29 +264,25 @@ Http::getFilePermissions (string& filename, string& directory, string& file,
       td->securityToken.setResource (&filenamePath);
       td->securityToken.setDirectory (&directory);
 
-      /*!
-       *td->filenamePath is the file system mapped path while filename
-       *is the uri requested.
-       *systemrequest is 1 if the file is in the system directory.
-       *If filename is already mapped on the file system don't map it again.
+      /*
+       * td->filenamePath is the file system mapped path while filename
+       * is the uri requested.
+       * systemrequest is 1 if the file is in the system directory.
+       * If filename is already mapped on the file system don't map it again.
        */
       if (yetmapped)
-        {
-          filenamePath.assign (filename);
-        }
+        filenamePath.assign (filename);
       else
         {
           int ret;
-          /*!
-           *If the client tries to access files that aren't in the web directory
-           *send a HTTP 401 error page.
+          /*
+           * If the client tries to access files that aren't in the web directory
+           * send a HTTP 401 error page.
            */
           translateEscapeString (filename);
           if ((filename[0] != '\0') &&
               (FilesUtility::getPathRecursionLevel (filename) < 1))
-            {
-              return 401;
-            }
+            return 401;
 
           ret = getPath (filenamePath, filename, 0);
 
@@ -305,21 +292,17 @@ Http::getFilePermissions (string& filename, string& directory, string& file,
 
       if (FilesUtility::isLink (td->filenamePath.c_str ()))
         {
-          const char *perm = td->securityToken.getHashedData ("symlinks.follow", MYSERVER_VHOST_CONF |
-                                                              MYSERVER_SERVER_CONF, "NO");
+          const char *perm = td->securityToken.getHashedData ("symlinks.follow", 
+                              MYSERVER_VHOST_CONF | MYSERVER_SERVER_CONF, "NO");
 
           if (!perm || strcmpi (perm, "YES"))
             return raiseHTTPError (401);
         }
 
       if (FilesUtility::isDirectory (filenamePath.c_str ()))
-        {
-          directory.assign (filenamePath);
-        }
+        directory.assign (filenamePath);
       else
-        {
-          FilesUtility::splitPath (filenamePath, directory, file);
-        }
+        FilesUtility::splitPath (filenamePath, directory, file);
 
       if (td->connection->protocolBuffer == 0)
         {
@@ -342,14 +325,14 @@ Http::getFilePermissions (string& filename, string& directory, string& file,
         }
       else
         {
-          /* The default user is Guest with a null password. */
+          /* The default user is Guest with a null password.  */
           user.assign ("Guest");
           password.assign ("");
         }
       if (*permissions == -1)
         {
           td->connection->host->warningsLogWrite (
-                                                  "HTTP<ERROR>: Error reading security file.");
+                                   "HTTP<ERROR>: Error reading security file.");
           return 500;
         }
 
@@ -368,15 +351,13 @@ Http::getFilePermissions (string& filename, string& directory, string& file,
       SecurityDomain * domains[] = {&auth, &httpReqSecDom, NULL};
 
       Server::getInstance ()->getSecurityManager ()->getPermissionMask (&(td->securityToken),
-                                                                        domains,
-                                                                        validator, authMethod);
+                                                         domains, validator, authMethod);
 
-      const char *authType = td->securityToken.getHashedData ("http.auth", MYSERVER_SECURITY_CONF |
-                                                              MYSERVER_VHOST_CONF |
-                                                              MYSERVER_SERVER_CONF);
+      const char *authType = td->securityToken.getHashedData ("http.auth",
+           MYSERVER_SECURITY_CONF | MYSERVER_VHOST_CONF | MYSERVER_SERVER_CONF);
       *permissions = td->securityToken.getMask ();
 
-      /*! Check if we have to use digest for the current directory. */
+      /* Check if we have to use digest for the current directory.  */
       if (authType && !strcmpi (authType, "Digest"))
         {
           HttpUserData* hud = (HttpUserData*) td->connection->protocolBuffer;
@@ -396,11 +377,9 @@ Http::getFilePermissions (string& filename, string& directory, string& file,
             }
           td->authScheme = HTTP_AUTH_SCHEME_DIGEST;
         }
-        /*! By default use the Basic authentication scheme. */
+        /* By default use the Basic authentication scheme. */
       else
-        {
-          td->authScheme = HTTP_AUTH_SCHEME_BASIC;
-        }
+        td->authScheme = HTTP_AUTH_SCHEME_BASIC;
     }
   catch (...)
     {
@@ -417,7 +396,7 @@ Http::getFilePermissions (string& filename, string& directory, string& file,
                                                     MYSERVER_VHOST_CONF |
                                                     MYSERVER_SERVER_CONF);
 
-  /*! If a throttling rate was specifed use it.  */
+  /* If a throttling rate was specifed use it.  */
   if (tr)
     td->connection->socket->setThrottling (atoi (tr));
 
@@ -425,15 +404,14 @@ Http::getFilePermissions (string& filename, string& directory, string& file,
 }
 
 /*!
- *Preprocess a HTTP request.
- *\param filename Resource to access.
- *\param yetmapped Is the resource mapped to the localfilesystem?
- *\param permissions Permission mask for this resource.
- *\return Return 200 on success.
- *\return Any other value is the HTTP error code.
+ * Preprocess a HTTP request.
+ * \param filename Resource to access.
+ * \param yetmapped Is the resource mapped to the localfilesystem?
+ * \param permissions Permission mask for this resource.
+ * \return Return 200 on success.
+ * \return Any other value is the HTTP error code.
  */
-int
-Http::preprocessHttpRequest (string& filename, int yetmapped, int* permissions)
+int Http::preprocessHttpRequest (string& filename, int yetmapped, int* permissions)
 {
   string directory;
   string file;
@@ -471,12 +449,12 @@ Http::preprocessHttpRequest (string& filename, int yetmapped, int* permissions)
       for (u_long i = 0;;)
         {
           /*
-           *http://host/path/to/file/file.txt/PATH_INFO_VALUE?QUERY_INFO_VALUE
-           *When a request has this form send the file file.txt with the
-           *environment string PATH_INFO equals to PATH_INFO_VALUE and QUERY_INFO
-           *to QUERY_INFO_VALUE.
+           * http://host/path/to/file/file.txt/PATH_INFO_VALUE?QUERY_INFO_VALUE
+           * When a request has this form send the file file.txt with the
+           * environment string PATH_INFO equals to PATH_INFO_VALUE and QUERY_INFO
+           * to QUERY_INFO_VALUE.
            *
-           *If there is the '/' character check if dirscan is a file.
+           * If there is the '/' character check if dirscan is a file.
            */
 
           u_long next = td->filenamePath.find ('/', i + 1);
@@ -493,9 +471,7 @@ Http::preprocessHttpRequest (string& filename, int yetmapped, int* permissions)
                   td->filenamePath.erase (next);
                 }
               else
-                {
-                  td->pathInfo.assign ("");
-                }
+                td->pathInfo.assign ("");
 
               break;
             }
@@ -503,8 +479,7 @@ Http::preprocessHttpRequest (string& filename, int yetmapped, int* permissions)
           if (next >= filenamePathLen)
             break;
 
-          if (mimeLoc ||
-              !FilesUtility::isDirectory (curr.c_str ()))
+          if (mimeLoc || !FilesUtility::isDirectory (curr.c_str ()))
             {
               td->pathInfo.assign (&(td->filenamePath.c_str ()[next]));
               td->filenamePath.erase (next);
@@ -550,22 +525,18 @@ Http::preprocessHttpRequest (string& filename, int yetmapped, int* permissions)
 }
 
 /*!
- *Delete the resource identified by filename.
+ * Delete the resource identified by filename.
  */
-int
-Http::deleteHTTPRESOURCE (string& filename,
-                          int sysReq,
-                          int onlyHeader,
+int Http::deleteHTTPRESOURCE (string& filename, int sysReq, int onlyHeader,
                           int yetmapped)
 {
   return sendHTTPResource (filename, sysReq, onlyHeader, yetmapped);
 }
 
 /*!
- *Check the Digest authorization
+ * Check the Digest authorization
  */
-u_long
-Http::checkDigest ()
+u_long Http::checkDigest ()
 {
   Md5 md5;
   char A1[48];
@@ -573,7 +544,7 @@ Http::checkDigest ()
   char response[48];
   char *uri;
   u_long digestCount;
-  /*! Return 0 if the password is different.  */
+  /* Return 0 if the password is different.  */
   if (td->request.digestOpaque[0] && strcmp (td->request.digestOpaque,
                                              ((HttpUserData*) td->connection->protocolBuffer)->opaque))
     return 0;
@@ -592,7 +563,7 @@ Http::checkDigest ()
   md5.init ();
   td->secondaryBuffer->setLength (0);
   *td->secondaryBuffer << td->request.digestUsername << ":" << td->request.digestRealm
-          << ":" << td->securityToken.getNeededPassword ();
+                       << ":" << td->securityToken.getNeededPassword ();
 
   md5.update ((unsigned char const*) td->secondaryBuffer->getBuffer (),
               (unsigned int) td->secondaryBuffer->getLength ());
@@ -627,7 +598,7 @@ Http::checkDigest ()
 }
 
 /*!
- *Create the buffer.
+ * Create the buffer.
  */
 HttpUserData::HttpUserData ()
 {
@@ -635,12 +606,12 @@ HttpUserData::HttpUserData ()
 }
 
 /*!
- *Destroy the buffer.
+ * Destroy the buffer.
  */
 HttpUserData::~HttpUserData () { }
 
 /*!
- *Reset the structure.
+ * Reset the structure.
  */
 void
 HttpUserData::reset ()
@@ -655,22 +626,22 @@ HttpUserData::reset ()
 }
 
 /*!
- *Main function to send a resource to a client.
+ * Main function to send a resource to a client.
  */
 int
 Http::sendHTTPResource (string& uri, int systemrequest, int onlyHeader,
                         int yetmapped)
 {
-  /*!
-   *With this code we manage a request of a file or a directory or anything
-   *that we must send over the HTTP.
+  /*
+   * With this code we manage a request of a file or a directory or anything
+   * that we must send over the HTTP.
    */
   string filename;
   const char *cgiManager;
   int ret;
   HttpDataHandler *manager;
 
-  /*! By default allows only few actions. */
+  /* By default allows only few actions.  */
   td->permissions = MYSERVER_PERMISSION_READ | MYSERVER_PERMISSION_BROWSE;
 
   try
@@ -705,8 +676,6 @@ Http::sendHTTPResource (string& uri, int systemrequest, int onlyHeader,
           cgiManager = "";
         }
 
-
-
       if (td->mime && (manager = staticHttp.dynManagerList.getHttpManager (td->mime->cmdName)))
         return manager->send (td, td->filenamePath.c_str (), cgiManager,
                               td->mime->selfExecuted, onlyHeader);
@@ -744,10 +713,9 @@ Http::sendHTTPResource (string& uri, int systemrequest, int onlyHeader,
 }
 
 /*!
- *Log the access using the Common Log Format or the Combined one.
+ * Log the access using the Common Log Format or the Combined one.
  */
-int
-Http::logHTTPaccess ()
+int Http::logHTTPaccess ()
 {
   char tmpStrInt[12];
 
@@ -817,7 +785,7 @@ Http::logHTTPaccess ()
       *td->secondaryBuffer << "\n" << end_str;
 #endif
       /*!
-       *Request the access to the log file then append the message.
+       * Request the access to the log file then append the message.
        */
       if (td->connection->host)
         {
@@ -833,12 +801,10 @@ Http::logHTTPaccess ()
 }
 
 /*!
- *This is the HTTP protocol main procedure to parse a request
- *over HTTP.
+ * This is the HTTP protocol main procedure to parse a request over HTTP.
  */
-int
-Http::controlConnection (ConnectionPtr a, char* /*b1*/, char* /*b2*/,
-                         int bs1, int bs2, u_long nbtr, u_long id)
+int Http::controlConnection (ConnectionPtr a, char* /*b1*/, char* /*b2*/,
+                             int bs1, int bs2, u_long nbtr, u_long id)
 {
   int retvalue = -1;
   int ret = 0;
@@ -877,27 +843,28 @@ Http::controlConnection (ConnectionPtr a, char* /*b1*/, char* /*b2*/,
       }
       td->other.clear ();
 
-      /*!
-       *Reset the request and response structures.
+      /*
+       * Reset the request and response structures.
        */
       HttpHeaders::resetHTTPRequest (&td->request);
       HttpHeaders::resetHTTPResponse (&td->response);
 
-      /*! Reset the HTTP status once per request. */
+      /* Reset the HTTP status once per request. */
       td->response.httpStatus = 200;
 
-      /*!
-       *If the connection must be removed, remove it.
+      /*
+       * If the connection must be removed, remove it.
        */
       if (td->connection->getToRemove ())
         {
           switch (td->connection->getToRemove ())
             {
-              /*! Remove the connection from the list.  */
+              /* Remove the connection from the list.  */
             case CONNECTION_REMOVE_OVERLOAD:
               retvalue = raiseHTTPError (503);
               logHTTPaccess ();
               return ClientsThread::DELETE_CONNECTION;
+
             default:
               return ClientsThread::DELETE_CONNECTION;
             }
@@ -909,7 +876,7 @@ Http::controlConnection (ConnectionPtr a, char* /*b1*/, char* /*b2*/,
                                                                 &(td->request),
                                                                 td->connection);
 
-      /*! -1 means the request is not complete yet. */
+      /* -1 means the request is not complete yet. */
       if (validRequest == -1)
         {
           return ClientsThread::INCOMPLETE_REQUEST;
@@ -918,29 +885,27 @@ Http::controlConnection (ConnectionPtr a, char* /*b1*/, char* /*b2*/,
       if (a->protocolBuffer)
         ((HttpUserData*) a->protocolBuffer)->digestChecked = 0;
 
-      /*!
-       *If the validRequest cointains an error code send it to the user.
-       */
+      /* If the validRequest cointains an error code send it to the user.  */
       if (validRequest != 200)
         {
           retvalue = raiseHTTPError (validRequest);
           logHTTPaccess ();
           return ClientsThread::DELETE_CONNECTION;
         }
-      /*! Be sure that we can handle the HTTP version.  */
+      /* Be sure that we can handle the HTTP version.  */
       if ((td->request.ver.compare ("HTTP/1.1")) &&
           (td->request.ver.compare ("HTTP/1.0")) &&
           (td->request.ver.compare ("HTTP/0.9")))
         {
           raiseHTTPError (505);
           logHTTPaccess ();
-          /*! Remove the connection from the list.  */
+          /* Remove the connection from the list.  */
           return ClientsThread::DELETE_CONNECTION;
         }
 
       td->response.ver.assign (td->request.ver.c_str ());
 
-      /*! Do not use Keep-Alive with HTTP version older than 1.1.  */
+      /* Do not use Keep-Alive with HTTP version older than 1.1.  */
       if (td->request.ver.compare ("HTTP/1.1"))
         {
           HttpRequestHeader::Entry *connection =
@@ -952,9 +917,9 @@ Http::controlConnection (ConnectionPtr a, char* /*b1*/, char* /*b2*/,
             }
         }
 
-      /*!
-       *For methods that accept data after the HTTP header set the correct
-       *pointer and create a file containing the informations after the header.
+      /*
+       * For methods that accept data after the HTTP header set the correct
+       * pointer and create a file containing the informations after the header.
        */
       FilesUtility::temporaryFileName (td->id, td->inputDataPath);
       FilesUtility::temporaryFileName (td->id, td->outputDataPath);
@@ -969,7 +934,7 @@ Http::controlConnection (ConnectionPtr a, char* /*b1*/, char* /*b2*/,
           int ret;
           int httpErrorCode;
 
-          /*! Be sure that the client can handle the 100 status code.  */
+          /* Be sure that the client can handle the 100 status code.  */
           if (nbtr == td->nHeaderChars && td->request.contentLength.compare ("0") &&
               td->request.ver.compare ("HTTP/1.0"))
             {
@@ -1006,14 +971,14 @@ Http::controlConnection (ConnectionPtr a, char* /*b1*/, char* /*b2*/,
           td->request.uriOptsPtr = 0;
         }
 
-      /*! If return value is not configured propertly.  */
+      /* If return value is not configured propertly.  */
       if (retvalue == -1)
         {
-          /*!
-           *How is expressly said in the RFC2616 a client that sends an
-           *HTTP/1.1 request MUST sends a Host header.
-           *Servers MUST reports a 400 (Bad request) error if an HTTP/1.1
-           *request does not include a Host request-header.
+          /*
+           * How is expressly said in the RFC2616 a client that sends an
+           * HTTP/1.1 request MUST sends a Host header.
+           * Servers MUST reports a 400 (Bad request) error if an HTTP/1.1
+           * request does not include a Host request-header.
            */
           HttpRequestHeader::Entry *host = td->request.other.get ("Host");
 
@@ -1021,18 +986,14 @@ Http::controlConnection (ConnectionPtr a, char* /*b1*/, char* /*b2*/,
               ((host && host->value->length () == 0) || (host == 0)))
             {
               raiseHTTPError (400);
-              /*!
-               *If the inputData file was not closed close it.
-               */
+              /* If the inputData file was not closed close it.  */
               if (td->inputData.getHandle ())
                 {
                   td->inputData.close ();
                   FilesUtility::deleteFile (td->inputDataPath);
                 }
 
-              /*!
-               *If the outputData file was not closed close it.
-               */
+              /* If the outputData file was not closed close it.  */
               if (td->outputData.getHandle ())
                 {
                   td->outputData.close ();
@@ -1043,12 +1004,10 @@ Http::controlConnection (ConnectionPtr a, char* /*b1*/, char* /*b2*/,
             }
           else
             {
-              /*!
-               *Find the virtual host to check both host name and IP value.
-               */
+              /* Find the virtual host to check both host name and IP value.  */
               Vhost* newHost = Server::getInstance ()->getVhosts ()->getVHost (host ?
-                                                                               host->value->c_str () : "",
-                                                                               a->getLocalIpAddr (), a->getLocalPort ());
+                                                           host->value->c_str () : "",
+                                            a->getLocalIpAddr (), a->getLocalPort ());
               if (a->host)
                 a->host->removeRef ();
               a->host = newHost;
@@ -1061,7 +1020,7 @@ Http::controlConnection (ConnectionPtr a, char* /*b1*/, char* /*b2*/,
                   Server::getInstance ()->logWriteln (errMsg.c_str (), MYSERVER_LOG_MSG_ERROR);
 
                   raiseHTTPError (400);
-                  /*!
+                  /*
                    *If the inputData file was not closed close it.
                    */
                   if (td->inputData.getHandle ())
@@ -1069,9 +1028,8 @@ Http::controlConnection (ConnectionPtr a, char* /*b1*/, char* /*b2*/,
                       td->inputData.close ();
                       FilesUtility::deleteFile (td->inputDataPath);
                     }
-                  /*!
-                   *If the outputData file was not closed close it.
-                   */
+
+                   /* If the outputData file was not closed close it.  */
                   if (td->outputData.getHandle ())
                     {
                       td->outputData.close ();
@@ -1097,13 +1055,11 @@ Http::controlConnection (ConnectionPtr a, char* /*b1*/, char* /*b2*/,
               if (documentRoot.length ())
                 {
                   const char *useHomeDir = td->securityToken.getHashedData ("http.use_home_directory",
-                                                                            MYSERVER_VHOST_CONF |
-                                                                            MYSERVER_SERVER_CONF, "YES");
+                                                   MYSERVER_VHOST_CONF | MYSERVER_SERVER_CONF, "YES");
 
 
                   const char *homeDir = td->securityToken.getHashedData ("http.home_directory",
-                                                                         MYSERVER_VHOST_CONF |
-                                                                         MYSERVER_SERVER_CONF,
+                                                   MYSERVER_VHOST_CONF | MYSERVER_SERVER_CONF,
                                                                          "public_html");
 
                   if (strcmpi (useHomeDir, "YES"))
@@ -1127,7 +1083,7 @@ Http::controlConnection (ConnectionPtr a, char* /*b1*/, char* /*b2*/,
                 }
             }
 
-          /*!
+          /*
            *Check if there is a limit for the number of connections in the
            *virtual host A value of zero means no limit.
            */
@@ -1144,21 +1100,17 @@ Http::controlConnection (ConnectionPtr a, char* /*b1*/, char* /*b2*/,
                     retvalue = raiseHTTPError (500);
                     logHTTPaccess ();
                     return retvalue ? ClientsThread::KEEP_CONNECTION
-                            : ClientsThread::DELETE_CONNECTION;
+                                    : ClientsThread::DELETE_CONNECTION;
                   }
               }
           }
 
           if (td->request.isKeepAlive ())
             {
-              /*!
-               *Support for HTTP pipelining.
-               */
+              /* Support for HTTP pipelining.  */
               if (contentLength == 0)
                 {
-                  /*!
-                   *connectionBuffer is 8 KB, so don't copy more bytes.
-                   */
+                  /*  connectionBuffer is 8 KB, so don't copy more bytes.  */
                   u_long bufferStrLen = strlen (td->buffer->getBuffer ());
                   u_long remainingData = 0;
 
@@ -1187,9 +1139,9 @@ Http::controlConnection (ConnectionPtr a, char* /*b1*/, char* /*b2*/,
               retvalue = ClientsThread::DELETE_CONNECTION;
             }
 
-          /*!
-           *Set the throttling rate for the socket. This setting can be
-           *changed later.
+          /*
+           * Set the throttling rate for the socket. This setting can be
+           * changed later.
            */
           if (a->host->getThrottlingRate () == (u_long) - 1)
             a->socket->setThrottling (Server::getInstance ()->getThrottlingRate ());
@@ -1271,17 +1223,14 @@ Http::controlConnection (ConnectionPtr a, char* /*b1*/, char* /*b2*/,
           logHTTPaccess ();
         }
 
-      /*
-       *If the inputData file was not closed close it.
-       */
+      /* If the inputData file was not closed close it.  */
       if (td->inputData.getHandle ())
         {
           td->inputData.close ();
           FilesUtility::deleteFile (td->inputDataPath);
         }
-      /*
-       *If the outputData file was not closed close it.
-       */
+
+       /* If the outputData file was not closed close it.  */
       if (td->outputData.getHandle ())
         {
           td->outputData.close ();
@@ -1311,10 +1260,9 @@ Http::controlConnection (ConnectionPtr a, char* /*b1*/, char* /*b2*/,
 }
 
 /*!
- *Compute the Digest outputting it to a buffer.
+ * Compute the Digest outputting it to a buffer.
  */
-void
-Http::computeDigest (char* out, char* buffer)
+void Http::computeDigest (char* out, char* buffer)
 {
   Md5 md5;
   if (!out)
@@ -1327,10 +1275,9 @@ Http::computeDigest (char* out, char* buffer)
 }
 
 /*!
- *Send to the client an authorization request.
+ * Send to the client an authorization request.
  */
-int
-Http::requestAuthorization ()
+int Http::requestAuthorization ()
 {
   Md5 md5;
   string time;
@@ -1368,7 +1315,7 @@ Http::requestAuthorization ()
       myserver_strlcpy (((HttpUserData*) td->connection->protocolBuffer)->realm,
                         host ? host->value->c_str () : "", 48);
 
-      /*! Just a random string.  */
+      /* Just a random string.  */
       md5Str[0] = (char) td->id;
       md5Str[1] = (char) ((clock () >> 24) & 0xFF);
       md5Str[2] = (char) ((clock () >> 16) & 0xFF);
@@ -1408,9 +1355,7 @@ Http::requestAuthorization ()
     }
   else
     {
-      /*!
-       *Send a non implemented error page if the auth scheme is not known.
-       */
+      /* Send a non implemented error page if the auth scheme is not known.  */
       return raiseHTTPError (501);
     }
   *td->secondaryBuffer << "Date: ";
@@ -1427,11 +1372,10 @@ Http::requestAuthorization ()
 }
 
 /*!
- *Sends an error page to the client.
- *Nonzero to keep the connection.
+ * Sends an error page to the client.
+ * Nonzero to keep the connection.
  */
-int
-Http::raiseHTTPError (int ID)
+int Http::raiseHTTPError (int ID)
 {
   try
     {
@@ -1485,9 +1429,7 @@ Http::raiseHTTPError (int ID)
           ostringstream nURL;
           int isPortSpecified = 0;
           const char* hostStr = host ? host->value->c_str () : "";
-          /*!
-           *Change the URI to reflect the default file name.
-           */
+           /* Change the URI to reflect the default file name.  */
           nURL << protocolPrefix << hostStr;
           for (int i = 0; hostStr[i]; i++)
             {
@@ -1538,7 +1480,7 @@ Http::raiseHTTPError (int ID)
 
       HttpErrors::getErrorMessage (ID, errorMessage);
 
-      /*! Send only the header (and the body if specified). */
+      /* Send only the header (and the body if specified).  */
       {
         const char* value = td->securityToken.getHashedData ("http.error_body",
                                                              MYSERVER_VHOST_CONF |
@@ -1588,10 +1530,9 @@ Http::raiseHTTPError (int ID)
 }
 
 /*!
- *Send a hard wired 500 error when we have a system error
+ * Send a hard wired 500 error when we have a system error
  */
-int
-Http::sendHTTPhardError500 ()
+int Http::sendHTTPhardError500 ()
 {
   MemBuf tmp;
   char tmpStr[12];
@@ -1633,11 +1574,10 @@ Internal Server Error\n\
   getRFC822GMTTime (time, HTTP_RESPONSE_DATE_DIM);
   *td->secondaryBuffer << time;
   *td->secondaryBuffer << "\r\n\r\n";
-  /*! Send the header.  */
+
   if (td->connection->socket->send (td->secondaryBuffer->getBuffer (),
                                     (u_long) td->secondaryBuffer->getLength (), 0) != -1)
     {
-      /*! Send the body.  */
       if (!td->onlyHeader)
         td->connection->socket->send (hardHTML, (u_long) strlen (hardHTML), 0);
     }
@@ -1645,11 +1585,10 @@ Internal Server Error\n\
 }
 
 /*!
- *Returns the MIME type passing its extension.
- *Returns zero if the file is registered.
+ * Returns the MIME type passing its extension.
+ * Returns zero if the file is registered.
  */
-MimeRecord*
-Http::getMIME (string &filename)
+MimeRecord* Http::getMIME (string &filename)
 {
   if (staticHttp.allowVhostMime && td->connection->host->isMIME ())
     {
@@ -1660,16 +1599,12 @@ Http::getMIME (string &filename)
 }
 
 /*!
- *Map an URL to the machine file system. Return 200 on success.
- *Any other return value is the HTTP error.
+ * Map an URL to the machine file system. Return 200 on success.
+ * Any other return value is the HTTP error.
  */
-int
-Http::getPath (HttpThreadContext* td, string& filenamePath, const char *filename,
-               int systemrequest)
+int Http::getPath (HttpThreadContext* td, string& filenamePath,
+                   const char *filename, int systemrequest)
 {
-  /*
-   *If it is a system request, search the file in the system directory.
-   */
   if (systemrequest)
     {
       if (!strlen (td->getVhostSys ())
@@ -1682,26 +1617,23 @@ Http::getPath (HttpThreadContext* td, string& filenamePath, const char *filename
         filenamePath.append ("/");
       filenamePath.append (filename);
     }
-    /*
-     *Else the file is in the web directory.
-     */
   else
     {
       if (filename[0])
         {
           const char *root;
           /*
-           *uri starting with a /sys/ will use the system directory as
-           *the root path. Be sure to don't allow access to the system root
-           *but only to subdirectories.
+           * uri starting with a /sys/ will use the system directory as
+           * the root path. Be sure to don't allow access to the system root
+           * but only to subdirectories.
            */
           if (filename[0] == '/' && filename[1] == 's' && filename[2] == 'y'
               && filename[3] == 's' && filename[4] == '/')
             {
               root = td->getVhostSys ();
               /*
-               *Do not allow access to the system directory root but only
-               *to subdirectories.
+               * Do not allow access to the system directory root but only
+               * to subdirectories.
                */
               if (FilesUtility::getPathRecursionLevel (filename) < 2)
                 {
@@ -1730,25 +1662,23 @@ Http::getPath (HttpThreadContext* td, string& filenamePath, const char *filename
 }
 
 /*!
- *If a directory is accessed try in order:
+ * If a directory is accessed try in order:
  *
- *1) The default files in order.
- *2) The directory content.
- *3) An error.
+ * 1) The default files in order.
+ * 2) The directory content.
+ * 3) An error.
  *
- *\param uri The accessed URI.
- *\param permissions The permission mask for the client.
- *\param onlyHeader specify if the client requested only the header.
+ * \param uri The accessed URI.
+ * \param permissions The permission mask for the client.
+ * \param onlyHeader specify if the client requested only the header.
  */
-int
-Http::processDefaultFile (string& uri, int permissions, int onlyHeader)
+int Http::processDefaultFile (string& uri, int permissions, int onlyHeader)
 {
   int i;
   int ret;
   string key ("http.default_file");
   NodeTree<string> *node = td->securityToken.getNodeTree (key,
-                                                          MYSERVER_VHOST_CONF |
-                                                          MYSERVER_SERVER_CONF, NULL);
+                     MYSERVER_VHOST_CONF | MYSERVER_SERVER_CONF, NULL);
 
 
   if (node)
@@ -1756,8 +1686,7 @@ Http::processDefaultFile (string& uri, int permissions, int onlyHeader)
       list<NodeTree<string>*> *children = node->getChildren ();
 
       for (list<NodeTree<string>*>::iterator it = children->begin ();
-              it != children->end ();
-              it++)
+           it != children->end (); it++)
         {
           ostringstream defaultFileName;
           const string *file = (*it)->getValue ();
@@ -1787,7 +1716,7 @@ Http::processDefaultFile (string& uri, int permissions, int onlyHeader)
               if (td->request.uriOpts.length ())
                 nUrl << "?" << td->request.uriOpts;
 
-              /*! Send a redirect to the new location.  */
+              /* Send a redirect to the new location.  */
               if (sendHTTPRedirect (nUrl.str ().c_str ()))
                 ret = 1;
               else
@@ -1810,10 +1739,9 @@ Http::processDefaultFile (string& uri, int permissions, int onlyHeader)
 }
 
 /*!
- *Send a redirect message to the client.
+ * Send a redirect message to the client.
  */
-int
-Http::sendHTTPRedirect (const char *newURL)
+int Http::sendHTTPRedirect (const char *newURL)
 {
   string time;
   HttpRequestHeader::Entry *connection = td->request.other.get ("Connection");
@@ -1847,10 +1775,9 @@ Http::sendHTTPRedirect (const char *newURL)
 }
 
 /*!
- *Send a non-modified message to the client.
+ * Send a non-modified message to the client.
  */
-int
-Http::sendHTTPNonModified ()
+int Http::sendHTTPNonModified ()
 {
   string time;
   HttpRequestHeader::Entry *connection = td->request.other.get ("Connection");
@@ -1879,10 +1806,9 @@ Http::sendHTTPNonModified ()
 }
 
 /*!
- *Send a 401 error.
+ * Send a 401 error.
  */
-int
-Http::sendAuth ()
+int Http::sendAuth ()
 {
   if (td->connection->getnTries () > 2)
     {
@@ -1896,17 +1822,16 @@ Http::sendAuth ()
 }
 
 /*!
- *Load the HTTP protocol.
+ * Load the HTTP protocol.
  */
-int
-Http::loadProtocolStatic (XmlParser* languageParser)
+int Http::loadProtocolStatic (XmlParser* languageParser)
 {
   const char *data = NULL;
   string pluginsResource (Server::getInstance ()->getExternalPath ());
 
   /*
-   *Store defaults value.
-   *By default use GZIP with files bigger than a MB.
+   * Store defaults value.
+   * By default use GZIP with files bigger than a MB.
    */
   staticHttp.timeout = MYSERVER_SEC (15);
 
@@ -1941,10 +1866,9 @@ Http::loadProtocolStatic (XmlParser* languageParser)
 }
 
 /*!
- *Unload the HTTP protocol.
+ * Unload the HTTP protocol.
  */
-int
-Http::unLoadProtocolStatic (XmlParser* languageParser)
+int Http::unLoadProtocolStatic (XmlParser* languageParser)
 {
   /* Unload the errors.  */
   HttpErrors::unLoad ();
@@ -1955,11 +1879,10 @@ Http::unLoadProtocolStatic (XmlParser* languageParser)
 }
 
 /*!
- *Returns the name of the protocol. If an out buffer
- *is defined fullfill it with the name too.
+ * Returns the name of the protocol. If an out buffer
+ * is defined fullfill it with the name too.
  */
-char*
-Http::registerNameImpl (char* out, int len)
+char* Http::registerNameImpl (char* out, int len)
 {
   if (out)
     {
@@ -1969,7 +1892,7 @@ Http::registerNameImpl (char* out, int len)
 }
 
 /*!
- *Constructor for the class http.
+ * Constructor for the class http.
  */
 Http::Http ()
 {
@@ -1990,7 +1913,7 @@ Http::Http ()
 }
 
 /*!
- *Destructor for the http class.
+ * Destructor for the http class.
  */
 Http::~Http ()
 {
@@ -1998,10 +1921,9 @@ Http::~Http ()
 }
 
 /*!
- *Clean the used memory.
+ * Clean the used memory.
  */
-void
-Http::clean ()
+void Http::clean ()
 {
   td->filenamePath.assign ("");
   td->pathInfo.assign ("");
diff --git a/myserver/src/protocol/http/http_headers.cpp b/myserver/src/protocol/http/http_headers.cpp
index 37ee6af..8f6be37 100755
--- a/myserver/src/protocol/http/http_headers.cpp
+++ b/myserver/src/protocol/http/http_headers.cpp
@@ -39,19 +39,19 @@ extern "C"
 }
 
 /*!
- *Builds an HTTP header string starting from an HttpResponseHeader structure.
- *\param str The buffer where write the HTTP header.
- *\param response the HttpResponseHeader where the HTTP data is.
+ * Builds an HTTP header string starting from an HttpResponseHeader structure.
+ * \param str The buffer where write the HTTP header.
+ * \param response the HttpResponseHeader where the HTTP data is.
  *
- *\return The number of bytes written to STR.
+ * \return The number of bytes written to STR.
  */
-u_long HttpHeaders::buildHTTPResponseHeader (char *str, 
+u_long HttpHeaders::buildHTTPResponseHeader (char *str,
                                              HttpResponseHeader* response)
 {
   /*
-   *Here we build the HTTP response header.
-   *Passing a HttpResponseHeader struct this builds an header string.
-   *Every directive ends with a \r\n sequence.
+   * Here we build the HTTP response header.
+   * Passing a HttpResponseHeader struct this builds an header string.
+   * Every directive ends with a \r\n sequence.
    */
   char *pos = str;
   const int MAX = MYSERVER_KB (8);
@@ -62,12 +62,12 @@ u_long HttpHeaders::buildHTTPResponseHeader (char *str,
       HttpErrors::getErrorMessage (response->httpStatus, response->errorType);
     }
     pos += sprintf (str, "%s %i %s\r\nStatus: %s\r\n", response->ver.c_str (),
-                    response->httpStatus, response->errorType.c_str (), 
+                    response->httpStatus, response->errorType.c_str (),
                     response->errorType.c_str () );
   }
   else
     pos += sprintf (str,"%s 200 OK\r\n",response->ver.c_str ());
-  
+
   if (response->serverName.length ())
     {
       pos += myserver_strlcpy (pos, "Server: ", MAX-(long)(pos-str));
@@ -84,7 +84,7 @@ u_long HttpHeaders::buildHTTPResponseHeader (char *str,
   if (response->lastModified.length ())
     {
       pos += myserver_strlcpy (pos,"Last-Modified: ", MAX-(long)(pos-str));
-      pos += myserver_strlcpy (pos, response->lastModified.c_str (), 
+      pos += myserver_strlcpy (pos, response->lastModified.c_str (),
                                MAX-(long)(pos-str));
       pos += myserver_strlcpy (pos,"\r\n", MAX-(long)(pos-str));
     }
@@ -92,7 +92,7 @@ u_long HttpHeaders::buildHTTPResponseHeader (char *str,
   if (response->connection.length ())
     {
       pos += myserver_strlcpy (pos,"Connection: ", MAX-(long)(pos-str));
-      pos += myserver_strlcpy (pos, response->connection.c_str (), 
+      pos += myserver_strlcpy (pos, response->connection.c_str (),
                              MAX-(long)(pos-str));
       pos += myserver_strlcpy (pos, "\r\n", MAX-(long)(pos-str));
     }
@@ -104,8 +104,8 @@ u_long HttpHeaders::buildHTTPResponseHeader (char *str,
   if (response->contentLength.length ())
     {
       /*
-       *Do not specify the Content-Length field if it is used
-       *the chunked Transfer-Encoding.
+       * Do not specify the Content-Length field if it is used
+       * the chunked Transfer-Encoding.
        */
       HttpResponseHeader::Entry *e = response->other.get ("Transfer-Encoding");
 
@@ -129,8 +129,8 @@ u_long HttpHeaders::buildHTTPResponseHeader (char *str,
         break;
           cookie.assign ("Set-Cookie: ");
           cookie.append (token, len);
-          cookie.append ("\r\n");  
-          pos += myserver_strlcpy (pos, cookie.c_str (), MAX-(long)(pos-str));  
+          cookie.append ("\r\n");
+          pos += myserver_strlcpy (pos, cookie.c_str (), MAX-(long)(pos-str));
           token += len + 1;
         }
     }
@@ -173,14 +173,14 @@ u_long HttpHeaders::buildHTTPResponseHeader (char *str,
   if (response->location.length ())
     {
       pos += myserver_strlcpy (pos, "Location: ", MAX - (long)(pos - str));
-      pos += myserver_strlcpy (pos, response->location.c_str (), 
+      pos += myserver_strlcpy (pos, response->location.c_str (),
                                MAX - (long)(pos-str));
       pos += myserver_strlcpy (pos, "\r\n", MAX - (long)(pos - str));
     }
 
   if (response->other.size ())
     {
-      HashMap<string, HttpResponseHeader::Entry*>::Iterator it = 
+      HashMap<string, HttpResponseHeader::Entry*>::Iterator it =
         response->other.begin();
     for (; it != response->other.end(); it++)
       {
@@ -195,25 +195,19 @@ u_long HttpHeaders::buildHTTPResponseHeader (char *str,
       }
     }
 
-  /*
-   *MyServer supports the bytes range.
-   */
   pos += myserver_strlcpy (pos, "Accept-Ranges: bytes\r\n", MAX-(long)(pos-str));
-  
-  /*
-   *The HTTP header ends with a \r\n sequence.
-   */
+
   pos += myserver_strlcpy (pos, "\r\n", MAX-(long)(pos-str));
 
   return (pos - str);
 }
 
 /*!
- *Builds an HTTP header string starting from an HttpRequestHeader structure.
- *\param str The buffer where write the HTTP header.
- *\param request the HttpRequestHeader where the HTTP data is.
+ * Builds an HTTP header string starting from an HttpRequestHeader structure.
+ * \param str The buffer where write the HTTP header.
+ * \param request the HttpRequestHeader where the HTTP data is.
  *
- *\return The number of bytes written to STR.
+ * \return The number of bytes written to STR.
  */
 u_long HttpHeaders::buildHTTPRequestHeader (char * str,HttpRequestHeader* request)
 {
@@ -225,74 +219,68 @@ u_long HttpHeaders::buildHTTPRequestHeader (char * str,HttpRequestHeader* reques
   pos += myserver_strlcpy (pos, " ", MAX-(long)(pos-str));
   pos += myserver_strlcpy (pos, request->uri.c_str (), MAX-(long)(pos-str));
   pos += myserver_strlcpy (pos, " ", MAX-(long)(pos-str));
-
   if (request->uriOpts.length () > 0)
-  {
-    pos += myserver_strlcpy (pos, "?", MAX-(long)(pos-str));
-    pos += myserver_strlcpy (pos, request->uriOpts.c_str (), MAX-(long)(pos-str));
-    pos += myserver_strlcpy (pos, " ", MAX-(long)(pos-str));
-
-  }
+    {
+      pos += myserver_strlcpy (pos, "?", MAX-(long)(pos-str));
+      pos += myserver_strlcpy (pos, request->uriOpts.c_str (), MAX-(long)(pos-str));
+      pos += myserver_strlcpy (pos, " ", MAX-(long)(pos-str));
+    }
 
   pos += myserver_strlcpy (pos, request->ver.c_str (), MAX-(long)(pos-str));
   pos += myserver_strlcpy (pos, "\r\n", MAX-(long)(pos-str));
-  
-  /* Authorization.  */
+
   if (request->auth.length () > 0)
-  {
-    pos += myserver_strlcpy (pos, "Authorization: ", MAX-(long)(pos-str));
-    pos += myserver_strlcpy (pos, request->auth.c_str (), MAX-(long)(pos-str));
-    pos += myserver_strlcpy (pos, "\r\n", MAX-(long)(pos-str));
-  }
+    {
+      pos += myserver_strlcpy (pos, "Authorization: ", MAX-(long)(pos-str));
+      pos += myserver_strlcpy (pos, request->auth.c_str (), MAX-(long)(pos-str));
+      pos += myserver_strlcpy (pos, "\r\n", MAX-(long)(pos-str));
+    }
 
-  /* Content-Length.  */
   if (request->contentLength.length () > 0)
-  {
-    pos += myserver_strlcpy (pos, "Content-Length: ", MAX-(long)(pos-str));
-    pos += myserver_strlcpy (pos, request->contentLength.c_str (), MAX-(long)(pos-str));
-    pos += myserver_strlcpy (pos, "\r\n", MAX-(long)(pos-str));
-  }
-
-  /* Range.  */
-  if (request->rangeType.length () > 0)
-  {
-    char buffer[12];
-    pos += myserver_strlcpy (pos, "Range: ", MAX-(long)(pos-str));
-    pos += myserver_strlcpy (pos, request->rangeType.c_str (), MAX-(long)(pos-str));
-    pos += myserver_strlcpy (pos, " ", MAX-(long)(pos-str));
-
-    if (request->rangeByteBegin != (u_long)-1)
     {
-      sprintf(buffer, "%lu", request->rangeByteBegin);
-      pos += myserver_strlcpy (pos, buffer, MAX-(long)(pos-str));
+      pos += myserver_strlcpy (pos, "Content-Length: ", MAX-(long)(pos-str));
+      pos += myserver_strlcpy (pos, request->contentLength.c_str (), MAX-(long)(pos-str));
+      pos += myserver_strlcpy (pos, "\r\n", MAX-(long)(pos-str));
     }
 
-    pos += myserver_strlcpy (pos, "-", MAX-(long)(pos-str));
-
-    if (request->rangeByteEnd != (u_long)-1)
+  if (request->rangeType.length () > 0)
     {
-      sprintf(buffer, "%lu", request->rangeByteEnd);
-      pos += myserver_strlcpy (pos, buffer, MAX-(long)(pos-str));
-    }
+      char buffer[12];
+      pos += myserver_strlcpy (pos, "Range: ", MAX-(long)(pos-str));
+      pos += myserver_strlcpy (pos, request->rangeType.c_str (), MAX-(long)(pos-str));
+      pos += myserver_strlcpy (pos, " ", MAX-(long)(pos-str));
+
+      if (request->rangeByteBegin != (u_long)-1)
+        {
+          sprintf(buffer, "%lu", request->rangeByteBegin);
+          pos += myserver_strlcpy (pos, buffer, MAX-(long)(pos-str));
+        }
 
-    pos += myserver_strlcpy (pos, "\r\n", MAX-(long)(pos-str));
+      pos += myserver_strlcpy (pos, "-", MAX-(long)(pos-str));
+      if (request->rangeByteEnd != (u_long)-1)
+        {
+          sprintf(buffer, "%lu", request->rangeByteEnd);
+          pos += myserver_strlcpy (pos, buffer, MAX-(long)(pos-str));
+        }
+      pos += myserver_strlcpy (pos, "\r\n", MAX-(long)(pos-str));
   }
 
   if (request->other.size())
   {
-    HashMap<string, HttpRequestHeader::Entry*>::Iterator it = 
+    HashMap<string, HttpRequestHeader::Entry*>::Iterator it =
       request->other.begin();
+
     for(; it != request->other.end(); it++)
-    {
-      HttpRequestHeader::Entry *e = *it;
-      if (e)
       {
-        pos += myserver_strlcpy (pos, e->name->c_str (), MAX-(long)(pos-str));
-        pos += myserver_strlcpy (pos, ": ", MAX-(long)(pos-str));
-        pos += myserver_strlcpy (pos, e->value->c_str (), MAX-(long)(pos-str));
-        pos += myserver_strlcpy (pos, "\r\n", MAX-(long)(pos-str));
+        HttpRequestHeader::Entry *e = *it;
+        if (e)
+          {
+            pos += myserver_strlcpy (pos, e->name->c_str (), MAX-(long)(pos-str));
+            pos += myserver_strlcpy (pos, ": ", MAX-(long)(pos-str));
+            pos += myserver_strlcpy (pos, e->value->c_str (), MAX-(long)(pos-str));
+            pos += myserver_strlcpy (pos, "\r\n", MAX-(long)(pos-str));
+          }
       }
-    }
   }
   pos += myserver_strlcpy (pos, "\r\n", MAX-(long)(pos-str));
   return (pos - str);
@@ -300,51 +288,51 @@ u_long HttpHeaders::buildHTTPRequestHeader (char * str,HttpRequestHeader* reques
 
 
 /*!
- *Set the defaults value for a HttpResponseHeader structure.
- *\param response The HTTP response header structure to fullfill with
- *the default data.
+ * Set the defaults value for a HttpResponseHeader structure.
+ * \param response The HTTP response header structure to fullfill with
+ * the default data.
  */
 void HttpHeaders::buildDefaultHTTPResponseHeader(HttpResponseHeader* response)
 {
   string date;
   resetHTTPResponse(response);
   /*!
-   *By default use:
-   *-# the MIME type of the page equal to text/html.
-   *-# the version of the HTTP protocol to 1.1.
-   *-# the date of the page and the expire date to the current time.
-   *-# set the name of the server.
-   *-# set the page that it is not an error page.
+   * By default use:
+   * -# the MIME type of the page equal to text/html.
+   * -# the version of the HTTP protocol to 1.1.
+   * -# the date of the page and the expire date to the current time.
+   * -# set the name of the server.
+   * -# set the page that it is not an error page.
    */
-  response->contentType.assign("text/html");
-  response->ver.assign("HTTP/1.1");
+  response->contentType.assign ("text/html");
+  response->ver.assign ("HTTP/1.1");
   getRFC822GMTTime(date,HTTP_RESPONSE_DATE_DIM);
-  response->date.assign(date);
-  response->dateExp.assign(date);
-  response->serverName.assign("GNU MyServer ");
+  response->date.assign (date);
+  response->dateExp.assign (date);
+  response->serverName.assign ("GNU MyServer ");
   response->serverName.append(MYSERVER_VERSION);
 }
 
 /*!
- *Set the defaults value for a HttpResponseHeader structure.
- *\param request The HTTP response header structure to fullfill with
- *the default data.
+ * Set the defaults value for a HttpResponseHeader structure.
+ * \param request The HTTP response header structure to fullfill with
+ * the default data.
  */
 void HttpHeaders::buildDefaultHTTPRequestHeader(HttpRequestHeader* request)
 {
-  request->cmd.assign("GET");
-  request->ver.assign("HTTP/1.1");
-  request->uri.assign("/");
+  request->cmd.assign ("GET");
+  request->ver.assign ("HTTP/1.1");
+  request->uri.assign ("/");
 
   /* HTTP/1.1 MUST specify a host.  */
   request->setValue("Host", "localhost");
-  request->uriOpts.assign("");
+  request->uriOpts.assign ("");
   request->uriOptsPtr = 0;
 }
 
 /*!
- *Reset all the HTTP_REQUEST_HEADER structure members.
- *\param request the HTTP request header to free.
+ * Reset all the HTTP_REQUEST_HEADER structure members.
+ * \param request the HTTP request header to free.
  */
 void HttpHeaders::resetHTTPRequest(HttpRequestHeader *request)
 {
@@ -352,8 +340,8 @@ void HttpHeaders::resetHTTPRequest(HttpRequestHeader *request)
 }
 
 /*!
- *Reset all the HttpResponseHeader structure members.
- *\param response the HTTP response header to free.
+ * Reset all the HttpResponseHeader structure members.
+ * \param response the HTTP response header to free.
  */
 void HttpHeaders::resetHTTPResponse(HttpResponseHeader *response)
 {
@@ -361,11 +349,11 @@ void HttpHeaders::resetHTTPResponse(HttpResponseHeader *response)
 }
 
 /*!
- *Controls if the req string is a valid HTTP response header.
- *Returns 0 if req is an invalid header, a non-zero value if is a valid header.
- *\param res the buffer with the HTTP header.
- *\param nLinesptr is a value of the lines number in the HEADER.
- *\param ncharsptr is a value of the characters number in the HEADER.
+ * Controls if the req string is a valid HTTP response header.
+ * Returns 0 if req is an invalid header, a non-zero value if is a valid header.
+ * \param res the buffer with the HTTP header.
+ * \param nLinesptr is a value of the lines number in the HEADER.
+ * \param ncharsptr is a value of the characters number in the HEADER.
  */
 int HttpHeaders::validHTTPResponse(const char *res, u_long* nLinesptr, u_long* ncharsptr)
 {
@@ -376,75 +364,70 @@ int HttpHeaders::validHTTPResponse(const char *res, u_long* nLinesptr, u_long* n
   if (res == 0)
     return 0;
   /*
-   *Count the number of lines in the header.
+   * Count the number of lines in the header.
    */
   for(i = 0; res[i]; i++)
   {
     if (res[i]=='\n')
     {
-      if ((res[i+2] == '\n') || (res[i+1] == '\0') || (res[i+1] == '\n'))
+      if ((res[i+2] == '\n') || (res[i + 1] == '\0') || (res[i + 1] == '\n'))
         break;
       nLines++;
     }
     else
     {
       /*
-       *If a line contains more than 4160 characters we consider the 
-       *header invalid.
+       * If a line contains more than 4160 characters we consider the
+       * header invalid.
        */
       if (nLinechars >= 4160)
           return 0;
         nLinechars++;
     }
   }
-  
-  /*
-   *Set the output variables.
-   */
+
+  /* Set the output variables.  */
   *nLinesptr = nLines;
   *ncharsptr = i + 3;
 
   if (nLines == 0)
     return 0;
 
-  /*
-   *Return if is a valid request header.
-   */
+  /* Return if is a valid request header.  */
   return 1;
 }
 
 
 /*!
- *Build the HTTP REQUEST HEADER string.
- *If no input is setted the input is the main buffer of the 
- *HttpThreadContext structure.
- *Returns 200 if is a valid request.
- *Returns -1 if the request is incomplete.
- *Any other returned value is the HTTP error.
- *\param input buffer with the HTTP header.
- *\param inputSize Size of the buffer
- *\param nHeaderChars Real size of the header.
- *\param request HTTP request structure to fullfill with data.
- *\param connection The current connection.
+ * Build the HTTP REQUEST HEADER string.
+ * If no input is setted the input is the main buffer of the
+ * HttpThreadContext structure.
+ * Returns 200 if is a valid request.
+ * Returns -1 if the request is incomplete.
+ * Any other returned value is the HTTP error.
+ * \param input buffer with the HTTP header.
+ * \param inputSize Size of the buffer
+ * \param nHeaderChars Real size of the header.
+ * \param request HTTP request structure to fullfill with data.
+ * \param connection The current connection.
  */
 int HttpHeaders::buildHTTPRequestHeaderStruct(const char* input,
                                               u_long inputSize,
                                               u_long* nHeaderChars,
-                                              HttpRequestHeader *request, 
+                                              HttpRequestHeader *request,
                                               Connection* connection)
 {
-  /*!
+  /*
    *In this function there is the HTTP protocol parse.
    *The request is mapped into a HttpRequestHeader structure
    *And at the end of this each command is treated
    *differently. We use this mode to parse the HTTP
    *cause especially in the CGI is requested a continous
    *access to HTTP header data.
-   *Before mapping the header in the structure 
+   *Before mapping the header in the structure
    *control if this is a regular request.
    *The HTTP header ends with a \r\n\r\n sequence.
    */
-  
   u_long i = 0,j = 0;
   int max = 0;
   u_long nLines, maxTotchars;
@@ -460,8 +443,8 @@ int HttpHeaders::buildHTTPRequestHeaderStruct(const char* input,
   int lineControlled = 0;
 
   /*
-   *TokenOff is the length of the token starting from 
-   *the location token.  
+   *TokenOff is the length of the token starting from
+   *the location token.
    */
   int tokenOff;
 
@@ -479,270 +462,259 @@ int HttpHeaders::buildHTTPRequestHeaderStruct(const char* input,
     /* Keep trace of first line for logging. */
     tokenOff = getEndLine(input, HTTP_REQUEST_URI_DIM);
     if (tokenOff > 0)
-      request->uri.assign( input, min(HTTP_REQUEST_URI_DIM, tokenOff) );
+      request->uri.assign ( input, min(HTTP_REQUEST_URI_DIM, tokenOff) );
     else
-      request->uri.assign(input, HTTP_REQUEST_URI_DIM );
+      request->uri.assign (input, HTTP_REQUEST_URI_DIM );
     return validRequest;
   }
 
   /* Get the first token, this is the HTTP command.*/
   tokenOff = getCharInString(token, cmdSeps, HTTP_REQUEST_CMD_DIM);
-  
+
   if (tokenOff == -1)
-  {
-    /* Keep trace of first line for logging.  */
-    tokenOff = getEndLine(token, HTTP_REQUEST_URI_DIM);
-    if (tokenOff > 0)
-      request->uri.assign(input, min(HTTP_REQUEST_URI_DIM, tokenOff) );
-    else
-      request->uri.assign(input, HTTP_REQUEST_URI_DIM );
-  }
-  
-  do
-  {
-    if (tokenOff== -1 )
-      return 400;
-    
-    /* Copy the HTTP field(this is the command if we are on the first line).  */
-    myserver_strlcpy (command, token, min(commandSize, tokenOff + 1) );
-  
-    token += tokenOff;
-    
-    if (*token == ':')
-      token++;
-    while(*token == ' ')
-      token++;
-    nLineControlled++;
-    lineControlled = 0;
+    {
+      /* Keep trace of first line for logging.  */
+      tokenOff = getEndLine(token, HTTP_REQUEST_URI_DIM);
+      if (tokenOff > 0)
+        request->uri.assign (input, min(HTTP_REQUEST_URI_DIM, tokenOff) );
+      else
+        request->uri.assign (input, HTTP_REQUEST_URI_DIM );
+    }
 
-    if (nLineControlled == 1)
+  do
     {
-      int containOpts = 0;
-      u_long lenToken = tokenOff;
-      /*
-       *The first line has the form:
-       *GET /index.html HTTP/1.1
-       */
-      lineControlled = 1;
-      
-      /* Copy the method type.  */
-      request->cmd.assign(command, min(HTTP_REQUEST_CMD_DIM, tokenOff));
-      tokenOff = getEndLine(token, 
-                            HTTP_REQUEST_VER_DIM + HTTP_REQUEST_URI_DIM+10);
-      lenToken = tokenOff;
-      if (tokenOff == -1)
-      {
-        request->ver.clear();
-        request->cmd.clear();
-        tokenOff = getEndLine(input, HTTP_REQUEST_URI_DIM);
-        if (tokenOff > 0)
-          request->uri.assign(input, min(HTTP_REQUEST_URI_DIM, tokenOff) );
-        else
-          request->uri.assign(input, HTTP_REQUEST_URI_DIM );
+      if (tokenOff== -1 )
         return 400;
-      }
-      if (tokenOff > maxUri)
-      {
-        request->ver.clear();
-        request->cmd.clear();
-        tokenOff = getEndLine(input, HTTP_REQUEST_URI_DIM);
-        if (tokenOff > 0)
-          request->uri.assign(input, min(HTTP_REQUEST_URI_DIM, tokenOff) );
-        else
-          request->uri.assign(input, HTTP_REQUEST_URI_DIM );
-        return 400;
-      }
-      max=(int)tokenOff;
-      while((token[max] != ' ') && (lenToken - max < HTTP_REQUEST_VER_DIM))
-        max--;
-      for(i=0; ((int)i < max) && (i < HTTP_REQUEST_URI_DIM); i++)
-      {
-        if (token[i] == '?')
-        {
-          containOpts = 1;
-          break;
-        }
-        else if (token[i] == ' ')
-        {
-          break;
-        }
-      }
 
-      /*
-       *If a uri was specified store it. If it wasn't specified 
-       *return an invalid header value.
-       */
-      if (i)
-        request->uri.assign(token, i);
-      else
-      {
-        request->ver.clear();
-        request->cmd.clear();
-        tokenOff = getEndLine(input, HTTP_REQUEST_URI_DIM);
-        if (tokenOff > 0)
-          request->uri.assign(input, min(HTTP_REQUEST_URI_DIM, tokenOff) );
-        else
-          request->uri.assign(input, HTTP_REQUEST_URI_DIM );
-        return 400;
-      }  
+      /* Copy the HTTP field(this is the command if we are on the first line).  */
+      myserver_strlcpy (command, token, min(commandSize, tokenOff + 1) );
 
-      /* If the uri contains some query data determine how long it is. */
-      if (containOpts)
-      {
-        j = getEndLine(&token[i], HTTP_REQUEST_URI_DIM);
-        for(j = 0; ((int)(i+j+1)<max) && (j<HTTP_REQUEST_URI_OPTS_DIM-1);j++)
+      token += tokenOff;
+
+      if (*token == ':')
+        token++;
+      while(*token == ' ')
+        token++;
+      nLineControlled++;
+      lineControlled = 0;
+
+      if (nLineControlled == 1)
         {
-          ++j;
-        }
-      }
+          int containOpts = 0;
+          u_long lenToken = tokenOff;
+          /*
+           *The first line has the form:
+           *GET /index.html HTTP/1.1
+           */
+          lineControlled = 1;
+
+          /* Copy the method type.  */
+          request->cmd.assign (command, min(HTTP_REQUEST_CMD_DIM, tokenOff));
+          tokenOff = getEndLine(token, HTTP_REQUEST_VER_DIM
+                                + HTTP_REQUEST_URI_DIM + 10);
+          lenToken = tokenOff;
+          if (tokenOff == -1)
+            {
+              request->ver.clear ();
+              request->cmd.clear ();
+              tokenOff = getEndLine (input, HTTP_REQUEST_URI_DIM);
+              if (tokenOff > 0)
+                request->uri.assign (input, min (HTTP_REQUEST_URI_DIM, tokenOff));
+              else
+                request->uri.assign (input, HTTP_REQUEST_URI_DIM );
+              return 400;
+            }
+          if (tokenOff > maxUri)
+            {
+              request->ver.clear();
+              request->cmd.clear();
+              tokenOff = getEndLine(input, HTTP_REQUEST_URI_DIM);
+              if (tokenOff > 0)
+                request->uri.assign (input, min(HTTP_REQUEST_URI_DIM, tokenOff) );
+              else
+                request->uri.assign (input, HTTP_REQUEST_URI_DIM );
+              return 400;
+            }
+          max = (int)tokenOff;
+          while ((token[max] != ' ') && (lenToken - max < HTTP_REQUEST_VER_DIM))
+            max--;
 
-      /*
-       *Save the query data and seek the cursor at the end of it. Start copying
-       *from the second byte(do not store the  ? character).
-       */
-      request->uriOpts.assign(&token[i+1], j);
-      i+=j+1;
+          for (i = 0; ((int)i < max) && (i < HTTP_REQUEST_URI_DIM); i++)
+            {
+              if (token[i] == '?')
+                {
+                  containOpts = 1;
+                  break;
+                }
+              else if (token[i] == ' ')
+                break;
+            }
 
-      /*
-       *Seek the cursor at the end of the spaces. Do not allow more than 
-       *10 spaces character between the uri token and the HTTP version. 
-       */
-      for(j = 0; j < 10; j++)
-      {
-        if (token[i]==' ')
-          i++;
-        else 
-          break;
-      }
-      /*
-       *If there are more than 10 black spaces store the entire line 
-       *for logging then return an invalid header value.
-       */
-      if (j == 10)
-      {
-        request->ver.clear();
-        request->cmd.clear();
-        tokenOff = getEndLine(input, HTTP_REQUEST_URI_DIM);
-        if (tokenOff > 0)
-          request->uri.assign(input, min(HTTP_REQUEST_URI_DIM, tokenOff) );
-        else
-          request->uri.assign(input, HTTP_REQUEST_URI_DIM );
-        return 400;
-      }
+          /*
+           * If a uri was specified store it. If it wasn't specified
+           * return an invalid header value.
+           */
+          if (i)
+            request->uri.assign (token, i);
+          else
+            {
+              request->ver.clear ();
+              request->cmd.clear ();
+              tokenOff = getEndLine (input, HTTP_REQUEST_URI_DIM);
+              if (tokenOff > 0)
+                request->uri.assign (input, min (HTTP_REQUEST_URI_DIM, tokenOff));
+              else
+                request->uri.assign (input, HTTP_REQUEST_URI_DIM);
+              return 400;
+            }
 
-      /* Count how long the version token is. */
-      j=i;
-      while((i-j < HTTP_REQUEST_VER_DIM) && (token[i]!='\r') 
-            && (token[i]!='\n'))
-        i++;
+          /* If the uri contains some query data determine how long it is. */
+          if (containOpts)
+            {
+              j = getEndLine (&token[i], HTTP_REQUEST_URI_DIM);
+              for(j = 0; ((int)(i + j + 1) < max) && (j < HTTP_REQUEST_URI_OPTS_DIM-1); j++)
+                ++j;
+            }
 
-      /* Save the HTTP version. */
-      if (i-j)
-        request->ver.assign(&token[j], i-j);
+          /*
+           * Save the query data and seek the cursor at the end of it. Start copying
+           * from the second byte(do not store the  ? character).
+           */
+          request->uriOpts.assign (&token[i + 1], j);
+          i += j + 1;
+
+          /*
+           * Seek the cursor at the end of the spaces. Do not allow more than
+           * 10 spaces character between the uri token and the HTTP version.
+           */
+          for(j = 0; j < 10; j++)
+            {
+              if (token[i]==' ')
+                i++;
+              else
+                break;
+            }
+          /*
+           * If there are more than 10 black spaces store the entire line
+           * for logging then return an invalid header value.
+           */
+          if (j == 10)
+            {
+              request->ver.clear ();
+              request->cmd.clear ();
+              tokenOff = getEndLine (input, HTTP_REQUEST_URI_DIM);
+              if (tokenOff > 0)
+                request->uri.assign (input, min(HTTP_REQUEST_URI_DIM, tokenOff) );
+              else
+                request->uri.assign (input, HTTP_REQUEST_URI_DIM);
+              return 400;
+            }
 
-      /*
-       *If the version is not specified or it is too long store 
-       *some information for logging then return an invalid header value. 
-       */
-      if ((!j) || ( (i-j) == HTTP_REQUEST_VER_DIM ))
-      {
-        request->ver.clear();
-        request->cmd.clear();   
-        tokenOff = getEndLine(input, HTTP_REQUEST_URI_DIM);
-        if (tokenOff > 0)
-          request->uri.assign(input, min(HTTP_REQUEST_URI_DIM, tokenOff) );
-        else
-          request->uri.assign(input, HTTP_REQUEST_URI_DIM );
-        return 400;
-      }
-      
-      /* Store if the requested uri terminates with a slash character. */
-      request->uriEndsWithSlash = request->uri[(request->uri.length ())-1]=='/';
+          /* Count how long the version token is. */
+          j = i;
+          while ((i - j < HTTP_REQUEST_VER_DIM) && (token[i]!='\r')
+                 && (token[i]!='\n'))
+            i++;
+
+          /* Save the HTTP version. */
+          if (i - j)
+            request->ver.assign (&token[j], i - j);
+
+          /*
+           * If the version is not specified or it is too long store
+           * some information for logging then return an invalid header value.
+           */
+          if ((!j) || ( (i-j) == HTTP_REQUEST_VER_DIM ))
+            {
+              request->ver.clear ();
+              request->cmd.clear ();
+              tokenOff = getEndLine (input, HTTP_REQUEST_URI_DIM);
+              if (tokenOff > 0)
+                request->uri.assign (input, min (HTTP_REQUEST_URI_DIM, tokenOff) );
+              else
+                request->uri.assign (input, HTTP_REQUEST_URI_DIM );
+              return 400;
+            }
 
-      /*
-       *Do not maintain any slash character if the uri has them at 
-       *the begin or at the end.
-       */
-      request->uri=trimRight(request->uri, " /");
-      request->uriOpts=trim(request->uriOpts, " ");
+          /* Store if the requested uri terminates with a slash character. */
+          request->uriEndsWithSlash = request->uri[(request->uri.length ())-1] == '/';
 
-    }else
-    /* Authorization.  */
-    if (!strcmpi(command,"Authorization"))
-    {
-      int ret = readReqAuthLine (request, connection, token, &tokenOff);
-      if (ret)
-        return ret;
-      lineControlled = 1;
-    }else
-    /* Content-Length.  */
-    if (!strcmpi(command, (char*)"Content-Length"))
-    {
-      tokenOff = getEndLine(token, HTTP_REQUEST_CONTENT_LENGTH_DIM);
-      if (tokenOff==-1)
-        return 400;
-      lineControlled = 1;
-      request->contentLength.assign(token,tokenOff);
-    }else
-    /* Range.  */
-    if (!strcmpi(command, (char*)"Range"))
-    {
-      int ret = readReqRangeLine (request, connection, token, &tokenOff);
-      if (ret)
-        return ret;
-      lineControlled = 1;
-    }else
-    if (!lineControlled)
-    {
-      tokenOff = getEndLine(token, maxTotchars);
-      if (tokenOff==-1)
-        return 400;
-      
-      {
-        string cmdStr(command);
-        HttpRequestHeader::Entry *old = request->other.get(cmdStr);
-        if (old)
+          /*
+           * Do not maintain any slash character if the uri has them at
+           * the begin or at the end.
+           */
+          request->uri=trimRight (request->uri, " /");
+          request->uriOpts=trim (request->uriOpts, " ");
+        }
+      else if (!strcmpi (command,"Authorization"))
         {
-          old->value->append(", ");
-          old->value->append(token, 
-                             std::min(static_cast<int>(HTTP_RESPONSE_OTHER_DIM
-                                                       - old->value->length()),
-                                      static_cast<int>(tokenOff)));
+          int ret = readReqAuthLine (request, connection, token, &tokenOff);
+          if (ret)
+            return ret;
+          lineControlled = 1;
         }
-        else
+      else if (!strcmpi (command, (char*)"Content-Length"))
         {
-          HttpRequestHeader::Entry *e = new HttpRequestHeader::Entry(); 
-          if (e)
-          {
-            e->name->assign(command, HTTP_RESPONSE_OTHER_DIM);
-            e->value->assign(token, 
-                             std::min(HTTP_RESPONSE_OTHER_DIM, tokenOff));
-            request->other.put(cmdStr, e);
-          }
+          tokenOff = getEndLine(token, HTTP_REQUEST_CONTENT_LENGTH_DIM);
+          if (tokenOff == -1)
+            return 400;
+          lineControlled = 1;
+          request->contentLength.assign (token,tokenOff);
         }
-      }
+      else if (!strcmpi(command, (char*)"Range"))
+        {
+          int ret = readReqRangeLine (request, connection, token, &tokenOff);
+          if (ret)
+            return ret;
+          lineControlled = 1;
+        }
+      else if (!lineControlled)
+        {
+          tokenOff = getEndLine(token, maxTotchars);
+          if (tokenOff==-1)
+            return 400;
+
+          string cmdStr(command);
+          HttpRequestHeader::Entry *old = request->other.get(cmdStr);
+          if (old)
+            {
+              old->value->append(", ");
+              old->value->append(token,
+                                 std::min(static_cast<int>(HTTP_RESPONSE_OTHER_DIM
+                                                           - old->value->length()),
+                                          static_cast<int>(tokenOff)));
+            }
+          else
+            {
+              HttpRequestHeader::Entry *e = new HttpRequestHeader::Entry();
+              if (e)
+                {
+                  e->name->assign (command, HTTP_RESPONSE_OTHER_DIM);
+                  e->value->assign (token,
+                                   std::min(HTTP_RESPONSE_OTHER_DIM, tokenOff));
+                  request->other.put (cmdStr, e);
+                }
+            }
+        }
+      token += tokenOff + 2;
+      tokenOff = getCharInString(token, ":", maxTotchars);
     }
-    token+= tokenOff + 2;
-    tokenOff = getCharInString(token, ":", maxTotchars);
-  }while (((u_long)(token - input) < maxTotchars) && token[0] != '\r');
+  while (((u_long)(token - input) < maxTotchars) && token[0] != '\r');
 
-  /*
-   *END REQUEST STRUCTURE BUILD.
-   */
   *nHeaderChars = maxTotchars;
   return 200;
 }
 
 /*!
- *Parse the range line in a HTTP request.
- *\param request HttpRequest object to fill.
- *\param connection Pointer to a connection structure.
- *\param token Pointer to the beginning of the authorization line.
- *\param lenOut Pointer to an itneger to keep the line length.
- *\return 0 on success, any other value is the HTTP error.
+ * Parse the range line in a HTTP request.
+ * \param request HttpRequest object to fill.
+ * \param connection Pointer to a connection structure.
+ * \param token Pointer to the beginning of the authorization line.
+ * \param lenOut Pointer to an itneger to keep the line length.
+ * \return 0 on success, any other value is the HTTP error.
  */
-int HttpHeaders::readReqRangeLine (HttpRequestHeader *request, 
-                                   Connection *connection, 
+int HttpHeaders::readReqRangeLine (HttpRequestHeader *request,
+                                   Connection *connection,
                                    const char *token,
                                    int *lenOut)
 {
@@ -756,27 +728,27 @@ int HttpHeaders::readReqRangeLine (HttpRequestHeader *request,
   int tokenOff = getEndLine(token, HTTP_REQUEST_RANGE_TYPE_DIM + 30);
   if (tokenOff ==-1)
     return 400;
-  
+
   *lenOut = tokenOff;
 
   do
     {
       i++;
     }
-  while((*(++localToken) != '=') && (i < HTTP_REQUEST_RANGE_TYPE_DIM));
+  while ((*(++localToken) != '=') && (i < HTTP_REQUEST_RANGE_TYPE_DIM));
 
-  request->rangeType.assign(token, i);
+  request->rangeType.assign (token, i);
 
   i = 0;
   localToken++;
-  
+
   do
     {
       rangeByteBegin[i++] = *localToken;
       rangeByteBegin[i] = '\0';
     }
-  while((*(++localToken) != '-') && (i<12) && (*localToken != '\r'));
-  
+  while ((*(++localToken) != '-') && (i<12) && (*localToken != '\r'));
+
   i = 0;
   localToken++;
   do
@@ -784,32 +756,27 @@ int HttpHeaders::readReqRangeLine (HttpRequestHeader *request,
       rangeByteEnd[i++] = *localToken;
       rangeByteEnd[i] = '\0';
     }
-  while((*(++localToken) != '\r' )&&(i<12));
+  while ((*(++localToken) != '\r' )&&(i<12));
 
-  for(i=0;i < static_cast<int>(request->rangeType.length ()); i++)
+  for (i = 0; i < static_cast<int>(request->rangeType.length ()); i++)
     if (request->rangeType[i] == '=')
       request->rangeType[i] = '\0';
-  
+
   for(i = 0; i < static_cast<int>(strlen (rangeByteBegin)); i++)
     if (rangeByteBegin[i] == '=')
       rangeByteBegin[i] = '\0';
-  
+
   for(i = 0; i < static_cast<int>(strlen (rangeByteEnd)); i++)
     if (rangeByteEnd[i]== '=')
       rangeByteEnd[i]='\0';
-      
+
   if (rangeByteBegin[0] == 0)
-    {
-      request->rangeByteBegin=0;
-    }      
+    request->rangeByteBegin=0;
   else
-    {
-      request->rangeByteBegin = (u_long)atol(rangeByteBegin); 
-    }
+    request->rangeByteBegin = (u_long)atol(rangeByteBegin);
+
   if (rangeByteEnd[0] == '\r')
-    {
-      request->rangeByteEnd = 0;
-    }
+    request->rangeByteEnd = 0;
   else
     {
       request->rangeByteEnd = (u_long)atol(rangeByteEnd);
@@ -821,46 +788,46 @@ int HttpHeaders::readReqRangeLine (HttpRequestHeader *request,
 }
 
 /*!
- *Parse the authorization line in a HTTP request.
- *\param request HttpRequest object to fill.
- *\param connection Pointer to a connection structure.
- *\param token Pointer to the beginning of the authorization line.
- *\param lenOut Pointer to an itneger to keep the line length.
- *\return 0 on success, any other value is the HTTP error.
+ * Parse the authorization line in a HTTP request.
+ * \param request HttpRequest object to fill.
+ * \param connection Pointer to a connection structure.
+ * \param token Pointer to the beginning of the authorization line.
+ * \param lenOut Pointer to an itneger to keep the line length.
+ * \return 0 on success, any other value is the HTTP error.
  */
-int HttpHeaders::readReqAuthLine (HttpRequestHeader *request, 
+int HttpHeaders::readReqAuthLine (HttpRequestHeader *request,
                                   Connection *connection,
                                   const char *token,
                                   int *lenOut)
 {
-  while(*token==' ')
+  while (*token==' ')
     token++;
-  int tokenOff = getCharInString(token, " ", HTTP_REQUEST_AUTH_DIM);
-  
+  int tokenOff = getCharInString (token, " ", HTTP_REQUEST_AUTH_DIM);
+
   if (tokenOff==-1)
     return 400;
 
-  request->auth.assign(token, tokenOff);
-  connection->setLogin("");
-  connection->setPassword("");
+  request->auth.assign (token, tokenOff);
+  connection->setLogin ("");
+  connection->setPassword ("");
 
   if (!request->auth.compare("Basic"))
     {
       u_long i;
       const char *base64 = &token[6];
-      int len = getEndLine(base64, 64);
+      int len = getEndLine (base64, 64);
       const char *tmp = base64 + len - 1;
       const char* lsecondaryBuffer;
       const char* lsecondaryBufferOr;
       char login[32];
-      char password[32]; 
+      char password[32];
       CBase64Utils base64Utils;
-    
+
       if (len == -1)
-        return 400;    
-      
+        return 400;
+
       login[0] = password[0] = '\0';
-        
+
       while (len > 0 && (*tmp == '\r' || *tmp == '\n'))
         {
           tmp--;
@@ -868,152 +835,146 @@ int HttpHeaders::readReqAuthLine (HttpRequestHeader *request,
         }
       if (len <= 1)
         return 400;
-      
+
       lsecondaryBuffer = base64Utils.decode(base64, &len);
       lsecondaryBufferOr = lsecondaryBuffer;
-   
+
       for(i = 0; (*lsecondaryBuffer != ':') && (i < 32);i++)
-        {
-          login[i] = *lsecondaryBuffer++;
-        }
+        login[i] = *lsecondaryBuffer++;
+
       login[i] = '\0';
-      
+
       lsecondaryBuffer++;
       for(i = 0; (*lsecondaryBuffer) && (i < 31); i++)
-        {
-          password[i] = *lsecondaryBuffer++;
-        }
+        password[i] = *lsecondaryBuffer++;
+
       password[i] = '\0';
-      
-      connection->setLogin(login);
-      connection->setPassword(password);
+      connection->setLogin (login);
+      connection->setPassword (password);
       delete lsecondaryBufferOr;
-      *lenOut = tokenOff = getEndLine(token, 100);
+      *lenOut = tokenOff = getEndLine (token, 100);
     }
-  else if (!request->auth.compare("Digest"))
+  else if (!request->auth.compare ("Digest"))
     {
       char *digestBuff;
       char *digestToken;
       token += tokenOff;
-      
       while(*token == ' ')
         token++;
 
       *lenOut = tokenOff = getEndLine(token, 1024);
-
       if (tokenOff == -1)
-        return 400;    
-
-      digestBuff=new char[tokenOff+1];
+        return 400;
 
+      digestBuff = new char[tokenOff + 1];
       if (!digestBuff)
         return 400;
 
-      memcpy(digestBuff, token, tokenOff);
-      digestBuff[tokenOff]='\0';
-      digestToken = strtok( digestBuff, "=" );
+      memcpy (digestBuff, token, tokenOff);
+      digestBuff[tokenOff] = '\0';
+      digestToken = strtok (digestBuff, "=" );
       if (!digestToken)
         return 400;
       do
         {
-          StrTrim(digestToken, (char*)" ");
-          if (!strcmpi(digestToken, (char*)"nonce"))
+          StrTrim (digestToken, (char*)" ");
+          if (!strcmpi (digestToken, (char*)"nonce"))
             {
-              digestToken = strtok( NULL, (char*)"," );
+              digestToken = strtok (NULL, (char*)"," );
               if (digestToken)
                 {
-                  StrTrim(digestToken, (char*)"\" ");
-                  myserver_strlcpy (request->digestNonce,digestToken,48+1);
+                  StrTrim (digestToken, (char*)"\" ");
+                  myserver_strlcpy (request->digestNonce,digestToken,48 + 1);
                 }
             }
-          else if (!strcmpi(digestToken, (char*)"opaque"))
+          else if (!strcmpi (digestToken, (char*)"opaque"))
             {
-              digestToken = strtok( NULL, (char*)"," );
+              digestToken = strtok (NULL, (char*)"," );
               if (digestToken)
                 {
-                  StrTrim(digestToken, (char*)"\" ");
-                  myserver_strlcpy (request->digestOpaque,digestToken,48+1);
+                  StrTrim (digestToken, (char*)"\" ");
+                  myserver_strlcpy (request->digestOpaque,digestToken,48 + 1);
                 }
             }
           else if (!strcmpi(digestToken, (char*)"uri"))
             {
-              digestToken = strtok( NULL, (char*)"\r\n," );
+              digestToken = strtok (NULL, (char*)"\r\n," );
               if (digestToken)
                 {
-                  StrTrim(digestToken, (char*)"\" ");
-                  myserver_strlcpy (request->digestUri,digestToken,1024+1);
+                  StrTrim (digestToken, (char*)"\" ");
+                  myserver_strlcpy (request->digestUri,digestToken,1024 + 1);
                 }
             }
           else if (!strcmpi(digestToken, (char*)"method"))
             {
-              digestToken = strtok( NULL, (char*)"\r\n," );
+              digestToken = strtok (NULL, (char*)"\r\n," );
               if (digestToken)
                 {
-                  StrTrim(digestToken, (char*)"\" ");
-                  myserver_strlcpy (request->digestMethod,digestToken,16+1);
+                  StrTrim (digestToken, (char*)"\" ");
+                  myserver_strlcpy (request->digestMethod,digestToken,16 + 1);
                 }
-            }  
+            }
           else if (!strcmpi(digestToken, (char*)"qop"))
             {
-              digestToken = strtok( NULL, (char*)"\r\n," );
+              digestToken = strtok (NULL, (char*)"\r\n," );
               if (digestToken)
                 {
-                  StrTrim(digestToken,(char*)"\" ");
-                  myserver_strlcpy (request->digestQop,digestToken,16+1);
+                  StrTrim (digestToken,(char*)"\" ");
+                  myserver_strlcpy (request->digestQop,digestToken,16 + 1);
                 }
-            }          
-          else if (!strcmpi(digestToken, (char*)"realm"))
+            }
+          else if (!strcmpi (digestToken, (char*)"realm"))
             {
-              digestToken = strtok( NULL, (char*)"\r\n," );
+              digestToken = strtok (NULL, (char*)"\r\n," );
               if (digestToken)
                 {
-                  StrTrim(digestToken, (char*)"\" ");
-                  myserver_strlcpy (request->digestRealm,digestToken,48+1);
+                  StrTrim (digestToken, (char*)"\" ");
+                  myserver_strlcpy (request->digestRealm,digestToken,48 + 1);
                 }
             }
           else if (!strcmpi(digestToken, (char*)"cnonce"))
             {
-              digestToken = strtok( NULL, (char*)"\r\n," );
+              digestToken = strtok (NULL, (char*)"\r\n," );
               if (digestToken)
                 {
-                  StrTrim(digestToken, (char*)" \"");
-                  myserver_strlcpy (request->digestCnonce, digestToken, 48+1);
+                  StrTrim (digestToken, (char*)" \"");
+                  myserver_strlcpy (request->digestCnonce, digestToken, 48 + 1);
                 }
             }
-          else if (!strcmpi(digestToken, (char*)"username"))
+          else if (!strcmpi (digestToken, (char*)"username"))
             {
-              digestToken = strtok( NULL, (char*)"\r\n," );
+              digestToken = strtok (NULL, (char*)"\r\n," );
               if (digestToken)
                 {
-                  StrTrim(digestToken, (char*)"\" ");
-                  myserver_strlcpy (request->digestUsername, digestToken, 48+1);
-                  connection->setLogin(digestToken);
+                  StrTrim (digestToken, (char*)"\" ");
+                  myserver_strlcpy (request->digestUsername, digestToken, 48 + 1);
+                  connection->setLogin (digestToken);
                 }
             }
           else if (!strcmpi(digestToken, (char*)"response"))
             {
-              digestToken = strtok( NULL, "\r\n," );
+              digestToken = strtok (NULL, "\r\n," );
               if (digestToken)
                 {
-                  StrTrim(digestToken, (char*)"\" ");
-                  myserver_strlcpy (request->digestResponse,digestToken,48+1);
+                  StrTrim (digestToken, (char*)"\" ");
+                  myserver_strlcpy (request->digestResponse,digestToken,48 + 1);
                 }
             }
-          else if (!strcmpi(digestToken, (char*)"nc"))
+          else if (!strcmpi (digestToken, (char*)"nc"))
             {
-              digestToken = strtok( NULL, (char*)"\r\n," );
+              digestToken = strtok (NULL, (char*)"\r\n," );
               if (digestToken)
                 {
-                  StrTrim(digestToken, (char*)"\" ");
-                  myserver_strlcpy (request->digestNc,digestToken,10+1);
+                  StrTrim (digestToken, (char*)"\" ");
+                  myserver_strlcpy (request->digestNc, digestToken, 10 + 1);
                 }
             }
-          else 
+          else
             {
-              digestToken = strtok( NULL, (char*)"\r\n," );
+              digestToken = strtok (NULL, (char*)"\r\n," );
             }
           /* Update digestToken.  */
-          digestToken = strtok( NULL, (char*)"=" );
+          digestToken = strtok (NULL, (char*)"=" );
         }while(digestToken);
       delete  [] digestBuff;
     }
@@ -1022,7 +983,7 @@ int HttpHeaders::readReqAuthLine (HttpRequestHeader *request,
 
 /*!
  *Build the HTTP RESPONSE HEADER string.
- *If no input is specified the input is the main buffer of the 
+ *If no input is specified the input is the main buffer of the
  *HttpThreadContext structure.
  *Return 0 on invalid input or internal errors.
  *\param input The buffer with the HTTP header data.
@@ -1030,7 +991,7 @@ int HttpHeaders::readReqAuthLine (HttpRequestHeader *request,
  *\param nbtr Bytes of the header.
  */
 int HttpHeaders::buildHTTPResponseHeaderStruct(const char *input,
-                                               HttpResponseHeader *response, 
+                                               HttpResponseHeader *response,
                                                u_long *nbtr)
 {
   /*!
@@ -1041,7 +1002,7 @@ int HttpHeaders::buildHTTPResponseHeaderStruct(const char *input,
    *differently. We use this mode for parse the HTTP
    *cause especially in the CGI is requested a continous
    *HTTP header access.
-   *Before mapping the header in the structure 
+   *Before mapping the header in the structure
    *control if this is a regular response.
    */
   char *newInput;
@@ -1067,8 +1028,8 @@ int HttpHeaders::buildHTTPResponseHeaderStruct(const char *input,
     if (!newInput)
       return 0;
     /*
-     * FIXME: 
-     * Don't alloc new memory but simply use a no-destructive parsing.  
+     * FIXME:
+     * Don't alloc new memory but simply use a no-destructive parsing.
      */
     memcpy(newInput, input, maxTotchars);
     newInput[maxTotchars] = '\0';
@@ -1078,16 +1039,16 @@ int HttpHeaders::buildHTTPResponseHeaderStruct(const char *input,
     return 0;
 
   token = (char*) input;
-  
+
   /* Check if is specified the first line containing the HTTP status.  */
   if ((input[0] == 'H') && (input[1] == 'T') && (input[2] == 'T')
      &&(input[3] == 'P') && (input[4] == '/'))
   {
     containStatusLine = 1;
-    token = strtok( token, " " );
+    token = strtok ( token, " " );
   }
   else
-    token = strtok( token, ": ,\t\n\r" );
+    token = strtok ( token, ": ,\t\n\r" );
   do
   {
     if (!token)
@@ -1101,207 +1062,192 @@ int HttpHeaders::buildHTTPResponseHeaderStruct(const char *input,
      *Copy the HTTP command.
      */
     myserver_strlcpy (command, token, 96);
-    
+
     nLineControlled++;
     if ((nLineControlled == 1) && containStatusLine)
-    {
-      lineControlled = 1;
-      /* Copy the HTTP version.  */
-      response->ver.assign(command);
-    
-      token = strtok( NULL, " ,\t\n\r" );
-      if (token)
-        response->httpStatus = atoi(token);
-      
-      token = strtok( NULL, "\r\n\0" );
-      if (token)
-        response->errorType.assign(token);
-
-    }else
-    /* Server.  */
-    if (!strcmpi(command,"Server"))
-    {
-      token = strtok( NULL, "\r\n\0" );
-      lineControlled = 1;
+      {
+        lineControlled = 1;
+        /* Copy the HTTP version.  */
+        response->ver.assign (command);
 
-      while(token && *token == ' ')
-        token++;
+        token = strtok (NULL, " ,\t\n\r" );
+        if (token)
+          response->httpStatus = atoi(token);
 
-      if (token)
-        response->serverName.assign(token);
-    }else
-    /* Location  */
-    if (!strcmpi(command,"Location"))
-    {
-      token = strtok( NULL, "\r\n\0" );
-      lineControlled = 1;
+        token = strtok (NULL, "\r\n\0" );
+        if (token)
+          response->errorType.assign (token);
+      }
+    else if (!strcmpi(command,"Server"))
+      {
+        token = strtok (NULL, "\r\n\0" );
+        lineControlled = 1;
 
-      while(token && *token == ' ')
-        token++;
+        while (token && *token == ' ')
+          token++;
 
-      if (token)
-        response->location.assign(token);
-    }else
-    /* Last-Modified.  */
-    if (!strcmpi(command,"Last-Modified"))
-    {
-      token = strtok( NULL, "\r\n\0" );
-      lineControlled = 1;
+        if (token)
+          response->serverName.assign (token);
+      }
+    else if (!strcmpi(command,"Location"))
+      {
+        token = strtok (NULL, "\r\n\0" );
+        lineControlled = 1;
 
-      while(token && *token == ' ')
-        token++;
+        while (token && *token == ' ')
+          token++;
 
-      if (token)
-        response->lastModified.assign(token);
-    }else
-    /* Status.  */
-    if (!strcmpi(command,"Status"))
-    {
-      token = strtok( NULL, "\r\n\0" );
-      lineControlled = 1;
+        if (token)
+          response->location.assign (token);
+      }
+    else if (!strcmpi(command,"Last-Modified"))
+      {
+        token = strtok (NULL, "\r\n\0" );
+        lineControlled = 1;
 
-      while(token && *token == ' ')
-        token++;
+        while (token && *token == ' ')
+          token++;
 
-      /*! If the response status is different from 200 don't modify it. */
-      if (response->httpStatus == 200)
         if (token)
-          response->httpStatus = atoi(token);
-    }else
-    /* Date.  */
-    if (!strcmpi(command,"Date"))
-    {
-      token = strtok( NULL, "\r\n\0" );
-      lineControlled = 1;
+          response->lastModified.assign (token);
+    }
+    else if (!strcmpi(command,"Status"))
+      {
+        token = strtok (NULL, "\r\n\0" );
+        lineControlled = 1;
 
-      while(token && *token == ' ')
-        token++;
+        while (token && *token == ' ')
+          token++;
 
-      if (token)
-        response->date.assign(token);
-    }else
-    /* Content-Type.  */
-    if (!strcmpi(command,"Content-Type"))
-    {
-      token = strtok( NULL, "\r\n\0" );
-      lineControlled = 1;
+        /*! If the response status is different from 200 don't modify it. */
+        if (response->httpStatus == 200)
+          if (token)
+            response->httpStatus = atoi(token);
+      }
+    else if (!strcmpi(command,"Date"))
+      {
+        token = strtok (NULL, "\r\n\0" );
+        lineControlled = 1;
 
-      while(token && *token == ' ')
-        token++;
+        while (token && *token == ' ')
+          token++;
 
-      if (token)
-        response->contentType.assign(token);
-    }else
-    /* MIME-Version.  */
-    if (!strcmpi(command,"MIME-Version"))
-    {
-      token = strtok( NULL, "\r\n\0" );
-      lineControlled = 1;
+        if (token)
+          response->date.assign (token);
+      }
+    else if (!strcmpi(command,"Content-Type"))
+      {
+        token = strtok (NULL, "\r\n\0" );
+        lineControlled = 1;
 
-      while(token && *token == ' ')
-        token++;
+        while (token && *token == ' ')
+          token++;
 
-      if (token)
-        response->mimeVer.assign(token);
-    }else
-    /* Set-Cookie.  */
-    if (!strcmpi(command,"Set-Cookie"))
-    {
-      token = strtok( NULL, "\r\n\0" );
-      lineControlled = 1;
+        if (token)
+          response->contentType.assign (token);
+      }
+    else if (!strcmpi(command,"MIME-Version"))
+      {
+        token = strtok (NULL, "\r\n\0" );
+        lineControlled = 1;
 
-      while(token && *token == ' ')
-        token++;
+        while (token && *token == ' ')
+          token++;
 
-      if (token)
+        if (token)
+          response->mimeVer.assign (token);
+      }
+    else if (!strcmpi(command,"Set-Cookie"))
       {
-        /* Divide multiple cookies.  */
-        response->cookie.append(token );
-        response->cookie.append("\n");
+        token = strtok (NULL, "\r\n\0" );
+        lineControlled = 1;
+
+        while (token && *token == ' ')
+          token++;
+
+        if (token)
+          {
+            /* Divide multiple cookies.  */
+            response->cookie.append(token );
+            response->cookie.append("\n");
+          }
       }
-    }else
-    /* Content-Length.  */
-    if (!strcmpi(command,"Content-Length"))
-    {
-      token = strtok( NULL, "\r\n\0" );
-      lineControlled = 1;
+    else if (!strcmpi (command, "Content-Length"))
+      {
+        token = strtok (NULL, "\r\n\0" );
+        lineControlled = 1;
 
-      while(token && *token == ' ')
-        token++;
+        while (token && *token == ' ')
+          token++;
 
-      response->contentLength.assign(token);
-    }else
-    /* Connection.  */
-    if (!strcmpi(command,"Connection"))
-    {
-      token = strtok( NULL, "\r\n\0" );
-      lineControlled = 1;
-
-      if (token)
-        response->connection.assign(token);
-    }else
-    /* Expires.  */
-    if (!strcmpi(command,"Expires"))
-    {
-      token = strtok( NULL, "\r\n\0" );
-      lineControlled = 1;
-      if (token)
-        response->dateExp.assign(token);
-    }
+        response->contentLength.assign (token);
+      }
+    else if (!strcmpi (command, "Connection"))
+      {
+        token = strtok (NULL, "\r\n\0" );
+        lineControlled = 1;
+
+        if (token)
+          response->connection.assign (token);
+      }
+    else if (!strcmpi (command,"Expires"))
+      {
+        token = strtok (NULL, "\r\n\0" );
+        lineControlled = 1;
+        if (token)
+          response->dateExp.assign (token);
+      }
     /*
      *If the line is not controlled arrive with the token
      *at the end of the line.
      */
     if ( (!lineControlled) &&  ((!containStatusLine) || (nLineControlled != 1)))
-    {
-      token = strtok(NULL, "\r\n");
-
-      while(token && *token == ' ')
-        token++;
-
-      if (token)
       {
-        HttpResponseHeader::Entry *e;
-        if (strlen (command) > HTTP_RESPONSE_OTHER_DIM || 
-           strlen (token) > HTTP_RESPONSE_OTHER_DIM)
-          return 0;
+        token = strtok (NULL, "\r\n");
 
-        e = new HttpResponseHeader::Entry(); 
-        if (e)
-        {
-          e->name->assign(command);
-          e->value->assign(token);
+        while(token && *token == ' ')
+          token++;
+
+        if (token)
           {
-            HttpResponseHeader::Entry *old = 0;
-            string cmdString(command);
-            old = response->other.put(cmdString, e);
-            if (old)
-              delete old;
+            HttpResponseHeader::Entry *e;
+            if (strlen (command) > HTTP_RESPONSE_OTHER_DIM ||
+                strlen (token) > HTTP_RESPONSE_OTHER_DIM)
+              return 0;
+
+            e = new HttpResponseHeader::Entry();
+            if (e)
+              {
+                e->name->assign (command);
+                e->value->assign (token);
+                {
+                  HttpResponseHeader::Entry *old = 0;
+                  string cmdString (command);
+                  old = response->other.put (cmdString, e);
+                  if (old)
+                    delete old;
+                }
+              }
           }
-        }
       }
-    }
-    token = strtok(NULL, cmdSeps);
-
-  }while(token && ((u_long)(token - input) < maxTotchars));
+    token = strtok (NULL, cmdSeps);
+  }
+  while (token && ((u_long)(token - input) < maxTotchars));
 
-  /*
-   *END REQUEST STRUCTURE BUILD.
-   */
   *nbtr = maxTotchars;
   delete [] input;
   return validResponse;
 }
 
 /*!
- *Controls if the req string is a valid HTTP request header.
- *Returns 200 if is a valid request.
- *Returns -1 if the request is incomplete.
- *Any other returned value is the HTTP error.
- *\param req The buffer with the HTTP request.
- *\param size Size of the request buffer.
- *\param nLinesptr Lines in the header.
- *\param ncharsptr Characters in the header.
+ * Controls if the req string is a valid HTTP request header.
+ * Returns 200 if is a valid request.
+ * Returns -1 if the request is incomplete.
+ * Any other returned value is the HTTP error.
+ * \param req The buffer with the HTTP request.
+ * \param size Size of the request buffer.
+ * \param nLinesptr Lines in the header.
+ * \param ncharsptr Characters in the header.
  */
 int HttpHeaders::validHTTPRequest(const char *req, u_long size,
                                   u_long* nLinesptr, u_long* ncharsptr)
@@ -1310,10 +1256,10 @@ int HttpHeaders::validHTTPRequest(const char *req, u_long size,
   u_long nLinechars = 0;
   nLinechars = 0;
   u_long nLines = 0;
-  
+
   if (req == 0)
     return 400;
-  
+
   for(;i < MYSERVER_KB(8); i++)
   {
     if (req[i] == '\n')
@@ -1324,9 +1270,9 @@ int HttpHeaders::validHTTPRequest(const char *req, u_long size,
           return 400;
         break;
       }
-      /* 
-       *If the lines number is greater than 25 we consider 
-       *the header invalid.
+      /*
+       * If the lines number is greater than 25 we consider
+       * the header invalid.
       */
       if (nLines >= 25)
         return 400;
@@ -1337,7 +1283,8 @@ int HttpHeaders::validHTTPRequest(const char *req, u_long size,
       return -1;
 
     /*
-    *If a line contains more than 2048 characters then the header is considered invalid.
+    * If a line contains more than 2048 characters then the
+    * header is considered invalid.
     */
     if (nLinechars >= 2048)
     {
@@ -1352,7 +1299,7 @@ int HttpHeaders::validHTTPRequest(const char *req, u_long size,
   /* Set the output variables.  */
   *nLinesptr = nLines;
   *ncharsptr = i+3;
-  
+
   /* Return if is a valid request header.  */
   return 200;
 }

-----------------------------------------------------------------------

Summary of changes:
 myserver/include/base/string/securestr.h    |   11 +-
 myserver/include/base/string/stringutils.h  |  103 ++--
 myserver/src/base/find_data/find_data.cpp   |   56 +-
 myserver/src/base/home_dir/home_dir.cpp     |  208 +++---
 myserver/src/base/pipe/pipe.cpp             |   27 +-
 myserver/src/base/string/securestr.cpp      |  155 ++--
 myserver/src/base/string/stringutils.cpp    |  762 ++++++++---------
 myserver/src/protocol/http/http.cpp         |  452 ++++------
 myserver/src/protocol/http/http_headers.cpp | 1239 +++++++++++++--------------
 9 files changed, 1427 insertions(+), 1586 deletions(-)


hooks/post-receive
-- 
GNU MyServer



From MAILER-DAEMON Sun Aug 09 07:33:46 2009
Received: from mailman by lists.gnu.org with archive (Exim 4.43)
	id 1Ma6en-0001As-PB
	for mharc-myserver-commit@gnu.org; Sun, 09 Aug 2009 07:33:45 -0400
Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43)
	id 1Ma6el-0001AV-FS
	for myserver-commit@gnu.org; Sun, 09 Aug 2009 07:33:43 -0400
Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43)
	id 1Ma6ej-0001AJ-Hl
	for myserver-commit@gnu.org; Sun, 09 Aug 2009 07:33:43 -0400
Received: from [199.232.76.173] (port=44988 helo=monty-python.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43) id 1Ma6ej-0001AG-Bd
	for myserver-commit@gnu.org; Sun, 09 Aug 2009 07:33:41 -0400
Received: from savannah.gnu.org ([199.232.41.3]:54110 helo=sv.gnu.org)
	by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32)
	(Exim 4.60) (envelope-from <gscrivano@gnu.org>) id 1Ma6ei-0004xf-9o
	for myserver-commit@gnu.org; Sun, 09 Aug 2009 07:33:41 -0400
Received: from download.savannah.gnu.org ([199.232.41.75]
	helo=cvs.savannah.gnu.org) by sv.gnu.org with esmtp (Exim 4.69)
	(envelope-from <gscrivano@gnu.org>) id 1Ma6eh-000112-RZ
	for myserver-commit@gnu.org; Sun, 09 Aug 2009 11:33:39 +0000
Received: from gscrivano by cvs.savannah.gnu.org with local (Exim 4.69)
	(envelope-from <gscrivano@savannah.gnu.org>) id 1Ma6ef-00010V-CR
	for myserver-commit@gnu.org; Sun, 09 Aug 2009 11:33:39 +0000
To: myserver-commit@gnu.org
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: 40159f18d6d81acded8f0e875075105aa0a68b63
X-Git-Newrev: d7643643172ad3f5985c2a2d1a6cf9101a8b3617
Message-Id: <E1Ma6ef-00010V-CR@cvs.savannah.gnu.org>
From: Giuseppe Scrivano <gscrivano@gnu.org>
Date: Sun, 09 Aug 2009 11:33:38 +0000
X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2)
Subject: [myserver-commit] [SCM] GNU MyServer branch, master,
	updated. d7643643172ad3f5985c2a2d1a6cf9101a8b3617
X-BeenThere: myserver-commit@gnu.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: myserver-commit.gnu.org
List-Unsubscribe: <http://lists.gnu.org/mailman/listinfo/myserver-commit>,
	<mailto:myserver-commit-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/pipermail/myserver-commit>
List-Post: <mailto:myserver-commit@gnu.org>
List-Help: <mailto:myserver-commit-request@gnu.org?subject=help>
List-Subscribe: <http://lists.gnu.org/mailman/listinfo/myserver-commit>,
	<mailto:myserver-commit-request@gnu.org?subject=subscribe>
X-List-Received-Date: Sun, 09 Aug 2009 11:33:43 -0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU MyServer".

The branch, master has been updated
       via  d7643643172ad3f5985c2a2d1a6cf9101a8b3617 (commit)
       via  228016520d88c39710737474d5d7b235f9427dc4 (commit)
      from  40159f18d6d81acded8f0e875075105aa0a68b63 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------


commit d7643643172ad3f5985c2a2d1a6cf9101a8b3617
Author: Giuseppe Scrivano <gscrivano@gnu.org>
Date:   Sun Aug 9 13:30:35 2009 +0200

    MSCGI is used if (WIN32 | HAVE_DL), not when DO_NOT_USE_MSCGI is defined.

diff --git a/myserver/include/http_handler/mscgi/mscgi.h b/myserver/include/http_handler/mscgi/mscgi.h
index b8d4f2a..fb408ca 100644
--- a/myserver/include/http_handler/mscgi/mscgi.h
+++ b/myserver/include/http_handler/mscgi/mscgi.h
@@ -1,19 +1,19 @@
 /* -*- mode: c++ -*- */
 /*
-MyServer
-Copyright (C) 2002, 2003, 2004, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
-This program 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 3 of the License, or
-(at your option) any later version.
+  MyServer
+  Copyright (C) 2002, 2003, 2004, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
+  This program 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 3 of the License, or
+  (at your option) any later version.
 
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details.
+  This program is distributed in the hope that it will be useful,
+  but WITHOUT ANY WARRANTY; without even the implied warranty of
+  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+  GNU General Public License for more details.
 
-You should have received a copy of the GNU General Public License
-along with this program.  If not, see <http://www.gnu.org/licenses/>.
+  You should have received a copy of the GNU General Public License
+  along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
 
 #ifndef MSCGI_H
@@ -48,26 +48,21 @@ struct MsCgiData
 
 };
 
-typedef int (*CGIMAIN)(const char*, MsCgiData*); 
+typedef int (*CGIMAIN)(const char*, MsCgiData*);
 
 class MsCgi : public HttpDataHandler
 {
 public:
 	virtual int load();
 	virtual int unLoad();
-	/*!
-	*Use this to send a MSCGI file through the HTTP protocol.
-	*/
 	virtual int send(HttpThreadContext*, const char* exec,
                    const char* cmdLine = 0, bool execute = false,
                    bool onlyHeader = false);
 
 	int write(const char*, u_long, MsCgiData*);
 	int sendHeader(MsCgiData*);
+
 private:
-	/*!
-	 *Store the MSCGI library module handle.
-	 */
 	static DynamicLibrary mscgiModule;
 	MsCgiData data;
 };
diff --git a/myserver/src/http_handler/mscgi/mscgi.cpp b/myserver/src/http_handler/mscgi/mscgi.cpp
index 1177d54..e479b0b 100644
--- a/myserver/src/http_handler/mscgi/mscgi.cpp
+++ b/myserver/src/http_handler/mscgi/mscgi.cpp
@@ -1,18 +1,18 @@
 /*
-MyServer
-Copyright (C) 2002, 2003, 2004, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
-This program 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 3 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program.  If not, see <http://www.gnu.org/licenses/>.
+  MyServer
+  Copyright (C) 2002, 2003, 2004, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
+  This program 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 3 of the License, or
+  (at your option) any later version.
+
+  This program is distributed in the hope that it will be useful,
+  but WITHOUT ANY WARRANTY; without even the implied warranty of
+  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+  GNU General Public License for more details.
+
+  You should have received a copy of the GNU General Public License
+  along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
 
 #include "stdafx.h"
@@ -27,55 +27,47 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #include <include/base/utility.h>
 #include <include/filter/filters_chain.h>
 #include <sstream>
-using namespace std; 
+using namespace std;
 
 DynamicLibrary MsCgi::mscgiModule;
 
 /*!
- *Sends the MyServer CGI; differently from standard CGI this doesn't 
- *need a new process to run making it faster.
- *\param td The HTTP thread context.
- *\param exec The script path.
- *\param cmdLine The command line.
- *\param execute Specify if the script has to be executed.
- *\param onlyHeader Specify if send only the HTTP header.
+ * Entry-point for the MyServer CGI; differently from standard CGI this doesn't
+ * need a new process to run making it faster.
+ * \param td The HTTP thread context.
+ * \param exec The script path.
+ * \param cmdLine The command line.
+ * \param execute Specify if the script has to be executed.
+ * \param onlyHeader Specify if send only the HTTP header.
  */
-int MsCgi::send(HttpThreadContext* td, const char* exec, const char* cmdLine,
-                bool /*execute*/, bool onlyHeader)
-
+int MsCgi::send (HttpThreadContext* td, const char* exec, const char* cmdLine,
+                 bool /*execute*/, bool onlyHeader)
 {
   /*
-   *This is the code for manage a .mscgi file.
-   *This files differently from standard CGI don't need a new process to run
-   *but are allocated in the caller process virtual space.
-   *Usually these files are faster than standard CGI.
-   *Actually myServerCGI(.mscgi) is only at an alpha status.
+   * This is the code for manage a .mscgi file.
+   * This files differently from standard CGI don't need a new process to run
+   * but are allocated in the caller process virtual space.
+   * Usually these files are faster than standard CGI.
+   * Actually myServerCGI(.mscgi) is only at an alpha status.
    */
   ostringstream tmpStream;
   string outDataPath;
   FiltersChain chain;
   u_long nbw;
-#ifndef WIN32
-#ifdef DO_NOT_USE_MSCGI
-  /*!
-   *On the platforms where is not available the MSCGI support send a 
-   *non implemented error.
-   */
-  return td->http->raiseHTTPError(501);
-#endif
-#endif
-
-#ifndef DO_NOT_USE_MSCGI 
-  DynamicLibrary hinstLib; 
+  DynamicLibrary hinstLib;
   CGIMAIN ProcMain = 0;
   int ret = 0;
 
-   data.envString = td->request.uriOptsPtr ?
-                    td->request.uriOptsPtr : (char*) td->buffer->getBuffer();
-  
+#if !(WIN32 | HAVE_DL)
+  return td->http->raiseHTTPError (501);
+#endif
+
+  data.envString = td->request.uriOptsPtr ?
+    td->request.uriOptsPtr : (char*) td->buffer->getBuffer();
+
   data.td = td;
   data.errorPage = 0;
-  data.server = Server::getInstance();
+  data.server = Server::getInstance ();
   data.mscgi = this;
   data.useChunks = false;
   data.onlyHeader = onlyHeader ? true : false;
@@ -86,162 +78,156 @@ int MsCgi::send(HttpThreadContext* td, const char* exec, const char* cmdLine,
   data.useChunks = false;
 
   if (!(td->permissions & MYSERVER_PERMISSION_EXECUTE))
-    return td->http->sendAuth();
+    return td->http->sendAuth ();
 
-  td->scriptPath.assign(exec);
+  td->scriptPath.assign (exec);
 
   {
     string tmp;
-    tmp.assign(exec);
-    FilesUtility::splitPath(tmp, td->cgiRoot, td->cgiFile);
-    FilesUtility::splitPath(exec, td->scriptDir, td->scriptFile);
+    tmp.assign (exec);
+    FilesUtility::splitPath (tmp, td->cgiRoot, td->cgiFile);
+    FilesUtility::splitPath (exec, td->scriptDir, td->scriptFile);
   }
 
-  Env::buildEnvironmentString(td,data.envString);
-  
-  chain.setProtocol(td->http);
-  chain.setProtocolData(td);
-  chain.setStream(td->connection->socket);
-
-  if(td->mime && Server::getInstance()->getFiltersFactory()->chain(&chain, 
-                                                 td->mime->filters, 
-                                                 td->connection->socket, 
-                                                                   &nbw, 
-                                                                   1))
-  {
-    td->connection->host->warningsLogWrite("MSCGI: Error loading filters");
-    chain.clearAllFilters(); 
-    return td->http->raiseHTTPError(500);
-  }
+  Env::buildEnvironmentString (td,data.envString);
 
-  checkDataChunks(td, &(data.keepAlive), &(data.useChunks));
+  chain.setProtocol (td->http);
+  chain.setProtocolData (td);
+  chain.setStream (td->connection->socket);
 
-  ret = hinstLib.loadLibrary(exec, 0);
+  if (td->mime && Server::getInstance ()->getFiltersFactory ()->chain(&chain,
+                                                                      td->mime->filters,
+                                                                      td->connection->socket,
+                                                                      &nbw,
+                                                                      1))
+    {
+      td->connection->host->warningsLogWrite ("MSCGI: Error loading filters");
+      chain.clearAllFilters ();
+      return td->http->raiseHTTPError (500);
+    }
+
+  checkDataChunks (td, &(data.keepAlive), &(data.useChunks));
+
+  ret = hinstLib.loadLibrary (exec, 0);
 
   if (ret)
-  {
-    string msg;
-    msg.assign ("MSCGI: cannot load ");
-    msg.append (exec);
-    td->connection->host->warningsLogWrite (msg.c_str ());
-    chain.clearAllFilters ();
-
-    /* Internal server error.  */
-    return td->http->raiseHTTPError(500);
-  }
+    {
+      string msg;
+      msg.assign ("MSCGI: cannot load ");
+      msg.append (exec);
+      td->connection->host->warningsLogWrite (msg.c_str ());
+      chain.clearAllFilters ();
 
-  td->secondaryBuffer->getAt(0) = '\0';
+      /* Internal server error.  */
+      return td->http->raiseHTTPError (500);
+    }
+
+  td->secondaryBuffer->getAt (0) = '\0';
 
   ProcMain = (CGIMAIN) hinstLib.getProc( "myserver_main");
-  if(ProcMain)
+  if (ProcMain)
     (ProcMain)(td->request.uriOpts.c_str (), &data);
   else
     {
       string msg;
-      msg.assign("MSCGI: error accessing entrypoint for ");
-      msg.append(exec);
-      td->connection->host->warningsLogWrite(msg.c_str());
-      return td->http->raiseHTTPError(500);
+      msg.assign ("MSCGI: error accessing entrypoint for ");
+      msg.append (exec);
+      td->connection->host->warningsLogWrite (msg.c_str ());
+      return td->http->raiseHTTPError (500);
     }
-  hinstLib.close();
+  hinstLib.close ();
 
 
-  if(data.errorPage)
-  {
-    chain.clearAllFilters(); 
-    return td->http->raiseHTTPError(data.errorPage);
-  }
+  if (data.errorPage)
+    {
+      chain.clearAllFilters ();
+      return td->http->raiseHTTPError (data.errorPage);
+    }
 
-  if(!td->appendOutputs && data.useChunks && !data.error)
-  {
-    if(chain.getStream ()->write("0\r\n\r\n", 5, &nbw))
-      return 0;
-  }
+  if (!td->appendOutputs && data.useChunks && !data.error
+      && chain.getStream ()->write ("0\r\n\r\n", 5, &nbw))
+    return 0;
 
   if(!data.error)
     return 0;
 
-  {
-    ostringstream tmp;
-    tmp << td->sentData;
-    td->response.contentLength.assign(tmp.str()); 
-  }
-  chain.clearAllFilters(); 
-  return 1;
+  ostringstream tmp;
+  tmp << td->sentData;
+  td->response.contentLength.assign(tmp.str());
 
-#endif
+  chain.clearAllFilters ();
+  return 1;
 }
 
 /*!
- *Send a chunk of data to the client.
+ * Send a chunk of data to the client.
  */
-int MsCgi::write(const char* data, u_long len, MsCgiData* mcd)
+int MsCgi::write (const char* data, u_long len, MsCgiData* mcd)
 {
-  if(mcd->error)
+  if (mcd->error)
     return 1;
 
-  if(!mcd->headerSent)
-  {
-    if(sendHeader(mcd))
-       return 1;
-  }
+  if (!mcd->headerSent)
+    {
+      if (sendHeader (mcd))
+        return 1;
+    }
 
-  if(mcd->onlyHeader)
+  if (mcd->onlyHeader)
     return 0;
 
-  if(HttpDataHandler::appendDataToHTTPChannel(mcd->td, 
-                                              (char*) data,
-                                              len,
-                                              &(mcd->td->outputData), 
-                                              mcd->filtersChain,
-                                              mcd->td->appendOutputs, 
-                                              mcd->useChunks))
+  if (HttpDataHandler::appendDataToHTTPChannel (mcd->td,
+                                                (char*) data,
+                                                len,
+                                                &(mcd->td->outputData),
+                                                mcd->filtersChain,
+                                                mcd->td->appendOutputs,
+                                                mcd->useChunks))
     return 1;
 
   mcd->td->sentData +=len;
   return 0;
-
 }
 
 /*!
- *Send the HTTP header.
+ * Send the HTTP header.
  */
-int MsCgi::sendHeader(MsCgiData* mcd)
+int MsCgi::sendHeader (MsCgiData* mcd)
 {
-  if(mcd->error)
+  if (mcd->error)
     return 1;
 
-  if(mcd->headerSent)
+  if (mcd->headerSent)
     return 0;
 
-  if(!mcd->td->appendOutputs)
-  {
-    HttpThreadContext* td = mcd->td;
-    char *buffer = td->secondaryBuffer->getBuffer();
-    ConnectionPtr s = td->connection;
+  if (!mcd->td->appendOutputs)
+    {
+      HttpThreadContext* td = mcd->td;
+      char *buffer = td->secondaryBuffer->getBuffer();
+      ConnectionPtr s = td->connection;
 
-    u_long hdrLen = HttpHeaders::buildHTTPResponseHeader(buffer, &(td->response));
-    if(td->connection->socket->send(buffer, hdrLen, 0) == SOCKET_ERROR)
-      return 1;
-  }
+      u_long hdrLen = HttpHeaders::buildHTTPResponseHeader (buffer, &(td->response));
+      if(td->connection->socket->send (buffer, hdrLen, 0) == SOCKET_ERROR)
+        return 1;
+    }
 
   mcd->headerSent = true;
   return 0;
 }
 
 /*!
- *Map the library in the application address space.
- *\param confFile The xml parser with configuration.
+ * Map the library in the application address space.
+ * \param confFile The xml parser with configuration.
  */
-int MsCgi::load()
+int MsCgi::load ()
 {
   return 1;
 }
 
 /*!
- *Free the memory allocated by the MSCGI library.
+ * Free the memory allocated by the MSCGI library.
  */
-int MsCgi::unLoad()
- {
-  return mscgiModule.close();
+int MsCgi::unLoad ()
+{
+  return mscgiModule.close ();
 }



commit 228016520d88c39710737474d5d7b235f9427dc4
Author: Giuseppe Scrivano <gscrivano@gnu.org>
Date:   Sun Aug 9 13:20:37 2009 +0200

    Define HAVE_ZLIB when zlib is present instead of DO_NOT_USE_GZIP when it is not.

diff --git a/myserver/SConstruct b/myserver/SConstruct
index 828284e..bb7f16f 100644
--- a/myserver/SConstruct
+++ b/myserver/SConstruct
@@ -125,11 +125,11 @@ if  not env.GetOption('clean'):
         Exit(1)
 
     if not conf.CheckLib("ssl"):
-        conf.Define('DO_NOT_USE_SSL', 1)
-
+        print "gnutls is required by MyServer"
+        Exit(1)
 
-    if not conf.CheckLib("z"):
-        conf.Define('DO_NOT_USE_GZIP', 1)
+    if conf.CheckLib("z"):
+        conf.Define('HAVE_ZLIB', 1)
 
     conf.CheckLib("event")
         
diff --git a/myserver/configure.in b/myserver/configure.in
index 7f170d2..8120b75 100644
--- a/myserver/configure.in
+++ b/myserver/configure.in
@@ -225,17 +225,10 @@ fi
 
 dnl Looking for zlib
 AC_CHECK_LIB(z, uncompress, have_libz=yes)
-if test x$have_libz != xyes; then
-    AC_MSG_WARN([
-*** Cannot find Zlib (http://www.gzip.org/zlib/)
-*** gzip file transfer will not be enabled
-])
-    AC_DEFINE(DO_NOT_USE_GZIP, 1, [Zlib compression, define to 1 to disable])
-    ZLIB_LIB=""
-else
+if test x$have_libz = xyes; then
+   AC_DEFINE(HAVE_ZLIB, 1, [Define if the ZLIB library is present])
     ZLIB_LIB="-lz"
 
-
     dnl Be sure that it is a good vr
     AC_CHECK_LIB(z, compressBound, have_libz=yes)
     if test x$have_libz != xyes; then
@@ -244,8 +237,14 @@ else
 *** compressBound checking will not be enabled
 ])
     else
-        AC_DEFINE(GZIP_CHECK_BOUNDS, 1, [Memory checking for Zlib, not defined in older vrs])
+        AC_DEFINE(GZIP_COMPRESS_BOUNDS, 1, [Memory checking for Zlib, not defined in older vrs])
     fi
+else
+    AC_MSG_WARN([
+*** Cannot find Zlib (http://www.gzip.org/zlib/)
+*** gzip file transfer will not be enabled
+])
+    ZLIB_LIB=""
 fi
 
 AC_SUBST(ZLIB_LIB)
diff --git a/myserver/include/base/string/stringutils.h b/myserver/include/base/string/stringutils.h
index f5ece8a..8b777d0 100644
--- a/myserver/include/base/string/stringutils.h
+++ b/myserver/include/base/string/stringutils.h
@@ -58,8 +58,8 @@ int hexVal (char c);
 void translateEscapeString (char *TargetStr);
 void translateEscapeString (string& TargetStr);
 
-int hexToInt(const char *str);
-inline time_t hexToInt(string const& str){ return hexToInt(str.c_str ()); }
+int hexToInt (const char *str);
+inline time_t hexToInt (string const& str){ return hexToInt(str.c_str ()); }
 
 int getEndLine (const char* str, int max);
 inline int getEndLine (string const& str, int max)
@@ -67,7 +67,7 @@ inline int getEndLine (string const& str, int max)
 
 string trim (string const& s, string const&t = " ");
 string trimLeft ( string const &s , string const &t = " " );
-string trimRight ( string const &s , string const &t = " " );
+string trimRight (string const &s , string const &t = " " );
 
 int stringcmpi (string const &a, string const &b);
 int stringcmp (string const &a, string const &b);
@@ -78,7 +78,7 @@ int stringcmp (string const &a, const char* b);
 #ifndef WIN32
 extern "C"
 {
-char* strupr(char * string);
+char* strupr (char * string);
 # include <string.h>
 }
 #endif
diff --git a/myserver/include/filter/gzip/gzip.h b/myserver/include/filter/gzip/gzip.h
index 69c881e..6fbd377 100755
--- a/myserver/include/filter/gzip/gzip.h
+++ b/myserver/include/filter/gzip/gzip.h
@@ -1,19 +1,19 @@
 /* -*- mode: c++ -*- */
 /*
-MyServer
-Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc.
-This program 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 3 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program.  If not, see <http://www.gnu.org/licenses/>.
+  MyServer
+  Copyright (C) 2002, 2003, 2004, 2009 Free Software Foundation, Inc.
+  This program 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 3 of the License, or
+  (at your option) any later version.
+
+  This program is distributed in the hope that it will be useful,
+  but WITHOUT ANY WARRANTY; without even the implied warranty of
+  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+  GNU General Public License for more details.
+
+  You should have received a copy of the GNU General Public License
+  along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
 
 #ifndef GZIP_H
@@ -21,14 +21,10 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #include "stdafx.h"
 #include <include/filter/filter.h>
 
-/*! If is defined DO_NOT_USE_GZIP don't use the zlib library. */
-#ifndef DO_NOT_USE_GZIP	
-/*! Include the ZLIB library header file. */
-#include "zlib.h"		
-#endif
-
-#ifdef DO_NOT_USE_GZIP	
-#define z_stream (void*)
+#ifdef HAVE_ZLIB
+# include "zlib.h"
+#else
+# define z_stream (void*)
 #endif
 
 #define GZIP_HEADER_LENGTH		10
@@ -46,37 +42,35 @@ public:
 		u_long data_size;
 		u_long initialized;
 	};
-	
 
-#ifdef GZIP_CHECK_BOUNDS	
-	static u_long compressBound(int size);
-#endif
 
-  Gzip();
-  ~Gzip();
+	static u_long compressBound (int size);
+
+  Gzip ();
+  ~Gzip ();
+
+	static u_long headerSize ();
+	static u_long footerSize ();
 
-	static u_long headerSize();
-	static u_long footerSize();
+	u_long updateCRC (char* buffer,int size);
+	u_long getFooter (char *str,int size);
+	u_long initialize ();
+	u_long compress (const char* in, u_long sizeIn,
+                   char *out,u_long sizeOut);
+	u_long free ();
+	u_long flush (char *out,u_long sizeOut);
+	u_long getHeader (char *buffer,u_long buffersize);
 
-	u_long updateCRC(char* buffer,int size);
-	u_long getFooter(char *str,int size);
-	u_long initialize();
-	u_long compress(const char* in, u_long sizeIn, 
-                  char *out,u_long sizeOut);
-	u_long free();
-	u_long flush(char *out,u_long sizeOut);
-	u_long getHeader(char *buffer,u_long buffersize);
+  static Filter* factory (const char* name);
 
-  static Filter* factory(const char* name);
- 
   /*! From Filter*/
-  virtual int getHeader(char* buffer, u_long len, u_long* nbw);
-  virtual int getFooter(char* buffer, u_long len, u_long* nbw);
-  virtual int read(char* buffer, u_long len, u_long*);
-  virtual int write(const char* buffer, u_long len, u_long*);
-	virtual int flush(u_long*);
-	virtual int modifyData();
-  virtual const char* getName(char* name, u_long len);
+  virtual int getHeader (char* buffer, u_long len, u_long* nbw);
+  virtual int getFooter (char* buffer, u_long len, u_long* nbw);
+  virtual int read (char* buffer, u_long len, u_long*);
+  virtual int write (const char* buffer, u_long len, u_long*);
+	virtual int flush (u_long*);
+	virtual int modifyData ();
+  virtual const char* getName (char* name, u_long len);
 private:
 	int active;
 	GzipData data;
diff --git a/myserver/include/filter/gzip/gzip_decompress.h b/myserver/include/filter/gzip/gzip_decompress.h
index b34ef48..e6f2fbf 100755
--- a/myserver/include/filter/gzip/gzip_decompress.h
+++ b/myserver/include/filter/gzip/gzip_decompress.h
@@ -1,7 +1,7 @@
 /* -*- mode: c++ -*- */
 /*
 MyServer
-Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc.
+Copyright (C) 2002, 2003, 2004, 2009 Free Software Foundation, Inc.
 This program 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 3 of the License, or
@@ -18,18 +18,15 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 #ifndef GZIP_DECOMPRESS_H
 #define GZIP_DECOMPRESS_H
+
 #include "stdafx.h"
 #include <include/filter/filter.h>
 #include <include/filter/gzip/gzip.h>
 
-/*! If is defined DO_NOT_USE_GZIP don't use the zlib library. */
-#ifndef DO_NOT_USE_GZIP	
-/*! Include the ZLIB library header file. */
-#include "zlib.h"		
-#endif
-
-#ifdef DO_NOT_USE_GZIP	
-#define z_stream (void*)
+#ifdef HAVE_ZLIB
+# include "zlib.h"
+#else
+# define z_stream (void*)
 #endif
 
 
@@ -43,7 +40,7 @@ public:
 		u_long data_size;
 		u_long initialized;
 	};
-	
+
 
   GzipDecompress();
   ~GzipDecompress();
@@ -51,7 +48,7 @@ public:
 	u_long updateCRC(char* buffer,int size);
 	u_long getFooter(char *str,int size);
 	u_long initialize();
-	u_long decompress(const char* in, u_long sizeIn, 
+	u_long decompress(const char* in, u_long sizeIn,
 										char *out,u_long sizeOut);
 	u_long free();
 	u_long flush(char *out,u_long sizeOut);
@@ -61,7 +58,7 @@ public:
 
 	static u_long headerSize();
 	static u_long footerSize();
- 
+
   /*! From Filter*/
   virtual int getHeader(char* buffer, u_long len, u_long* nbw);
   virtual int getFooter(char* buffer, u_long len, u_long* nbw);
diff --git a/myserver/src/base/pipe/pipe.cpp b/myserver/src/base/pipe/pipe.cpp
index 3171019..5dc9180 100644
--- a/myserver/src/base/pipe/pipe.cpp
+++ b/myserver/src/base/pipe/pipe.cpp
@@ -1,18 +1,18 @@
 /*
-MyServer
-Copyright (C) 2002, 2003, 2004, 2005, 2008, 2009 Free Software Foundation, Inc.
-This program 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 3 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program.  If not, see <http://www.gnu.org/licenses/>.
+  MyServer
+  Copyright (C) 2002, 2003, 2004, 2005, 2008, 2009 Free Software Foundation, Inc.
+  This program 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 3 of the License, or
+  (at your option) any later version.
+
+  This program is distributed in the hope that it will be useful,
+  but WITHOUT ANY WARRANTY; without even the implied warranty of
+  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+  GNU General Public License for more details.
+
+  You should have received a copy of the GNU General Public License
+  along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
 
 
@@ -50,38 +50,38 @@ using namespace std;
  *\param len Buffer size.
  *\param nbr Get how many bytes were read.
  */
-int Pipe::read(char* buffer, u_long len, u_long *nbr)
+int Pipe::read (char* buffer, u_long len, u_long *nbr)
 {
   *nbr = 0;
 #ifndef WIN32
   int ret = ::read(handles[0], buffer, len);
   if(ret == -1)
-  {
-    terminated = true;
-    return 1;
-  }
+    {
+      terminated = true;
+      return 1;
+    }
   else if(!ret)
-  {
-    terminated = true;
-    return 0;
-  }
+    {
+      terminated = true;
+      return 0;
+    }
   else
-  {
-    *nbr = (u_long)ret;
-  }
+    {
+      *nbr = (u_long)ret;
+    }
   return 0;
 #else
   if( !ReadFile(readHandle, buffer, len, nbr, NULL) || !nbr)
-  {
-    *nbr = 0;
-    if(GetLastError() != ERROR_BROKEN_PIPE)
-      return 1;
-    else
     {
-      terminated = true;
-      return 0;
+      *nbr = 0;
+      if(GetLastError() != ERROR_BROKEN_PIPE)
+        return 1;
+      else
+        {
+          terminated = true;
+          return 0;
+        }
     }
-  }
   return 0;
 #endif
 
@@ -94,7 +94,7 @@ int Pipe::read(char* buffer, u_long len, u_long *nbr)
  *\param readPipe Specify if the current process uses it for read.  A false
  *value means the process uses it to write.
  */
-int Pipe::create(bool readPipe)
+int Pipe::create (bool readPipe)
 {
 #ifndef WIN32
 
@@ -110,33 +110,33 @@ int Pipe::create(bool readPipe)
   sa.nLength = sizeof(SECURITY_ATTRIBUTES);
   sa.bInheritHandle = TRUE;
   sa.lpSecurityDescriptor = NULL;
-  if(!CreatePipe(&readHandle, &writeHandle, &sa, 0))
+  if (!CreatePipe (&readHandle, &writeHandle, &sa, 0))
     return 1;
-    
-  if(readPipe)
-  {
-    if(!DuplicateHandle(GetCurrentProcess(), readHandle, 
-                        GetCurrentProcess(), &tmp, 0, 
-                        FALSE, DUPLICATE_SAME_ACCESS))
+
+  if (readPipe)
     {
-      close();
-      return 1;                    
+      if (!DuplicateHandle (GetCurrentProcess (), readHandle,
+                            GetCurrentProcess (), &tmp, 0,
+                            FALSE, DUPLICATE_SAME_ACCESS))
+        {
+          close ();
+          return 1;
+        }
+      CloseHandle (readHandle);
+      readHandle = tmp;
     }
-    CloseHandle(readHandle);
-    readHandle = tmp;
-  }
   else
-  {
-    if(!DuplicateHandle(GetCurrentProcess(), writeHandle, 
-                        GetCurrentProcess(), &tmp, 0, 
-                        FALSE, DUPLICATE_SAME_ACCESS))
     {
-      close();
-      return 1;                    
+      if (!DuplicateHandle (GetCurrentProcess (), writeHandle,
+                            GetCurrentProcess (), &tmp, 0,
+                            FALSE, DUPLICATE_SAME_ACCESS))
+        {
+          close ();
+          return 1;
+        }
+      CloseHandle (writeHandle);
+      writeHandle = tmp;
     }
-    CloseHandle(writeHandle);
-    writeHandle = tmp;
-  }
   return 0;
 #endif
 }
@@ -147,20 +147,20 @@ int Pipe::create(bool readPipe)
  *\param len Buffer size.
  *\param nbw Get how many bytes were written.
  */
-int Pipe::write(const char* buffer, u_long len, u_long *nbw)
+int Pipe::write (const char* buffer, u_long len, u_long *nbw)
 {
   *nbw = 0;
 #ifndef WIN32
-  int ret = ::write(handles[1], buffer, len);
-  if(ret == -1)
-  {
-    terminated = true;
-    return 1;
-  }
+  int ret = ::write (handles[1], buffer, len);
+  if (ret == -1)
+    {
+      terminated = true;
+      return 1;
+    }
   else
     *nbw = (u_long) ret;
 #else
-  return !WriteFile(writeHandle, buffer, len, nbw, NULL);
+  return !WriteFile (writeHandle, buffer, len, nbw, NULL);
 #endif
   return 0;
 }
@@ -168,7 +168,7 @@ int Pipe::write(const char* buffer, u_long len, u_long *nbw)
 /*!
  *Get the handle to use to read from the pipe.
  */
-long Pipe::getReadHandle()
+long Pipe::getReadHandle ()
 {
 #ifndef WIN32
   return handles[0];
@@ -180,7 +180,7 @@ long Pipe::getReadHandle()
 /*!
  *Get the handle used to write to the pipe.
  */
-long Pipe::getWriteHandle()
+long Pipe::getWriteHandle ()
 {
 #ifndef WIN32
   return handles[1];
@@ -193,31 +193,31 @@ long Pipe::getWriteHandle()
 /*!
  *Close the pipe.
  */
-int Pipe::close()
+int Pipe::close ()
 {
   terminated = true;
 #ifndef WIN32
-  if(handles[0])
-    ::close(handles[0]);
-  if(handles[1])
-    ::close(handles[1]);
+  if (handles[0])
+    ::close (handles[0]);
+  if (handles[1])
+    ::close (handles[1]);
   handles[0] = handles[1] = 0;
 #else
-  if(readHandle)
-    CloseHandle(readHandle);
-  if(writeHandle)
-    CloseHandle(writeHandle);
+  if (readHandle)
+    CloseHandle (readHandle);
+  if (writeHandle)
+    CloseHandle (writeHandle);
   readHandle = writeHandle = 0;
 #endif
   return 0;
 }
 
 /*!
- *Invert the current pipe on another instance of the class.
- *The input will be used as output and viceversa.
- *\param pipe The pipe where write.
+ * Invert the current pipe on another instance of the class.
+ * The input will be used as output and viceversa.
+ * \param pipe The pipe where write.
  */
-void Pipe::inverted(Pipe& pipe)
+void Pipe::inverted (Pipe& pipe)
 {
 #ifndef WIN32
   handles[0] = pipe.handles[1];
@@ -228,7 +228,7 @@ void Pipe::inverted(Pipe& pipe)
 #endif
 }
 
-Pipe::Pipe()
+Pipe::Pipe ()
 {
   terminated = false;
 #ifndef WIN32
@@ -241,43 +241,42 @@ Pipe::Pipe()
 /*!
  *Close the read stream of the pipe.
  */
-void Pipe::closeRead()
+void Pipe::closeRead ()
 {
   terminated = true;
 #ifndef WIN32
-  if(handles[0])
-    ::close(handles[0]);
+  if (handles[0])
+    ::close (handles[0]);
   handles[0] = 0;
 #else
   if(readHandle)
     CloseHandle(readHandle);
   readHandle = 0;
 #endif
-
 }
 
 /*!
- *Close the write stream of the pipe.
+ * Close the write stream of the pipe.
  */
-void Pipe::closeWrite()
+void Pipe::closeWrite ()
 {
   terminated = true;
 #ifndef WIN32
-  if(handles[1])
-    ::close(handles[1]);
+  if (handles[1])
+    ::close (handles[1]);
   handles[1] = 0;
 #else
-  if(writeHandle)
-    CloseHandle(writeHandle);
-    writeHandle = 0;
+  if (writeHandle)
+    CloseHandle (writeHandle);
+  writeHandle = 0;
 #endif
 }
 
 /*!
- *Wait until new data is ready.  Do not wait more 
- *than the specified timeout.
- *\param sec Seconds part of the timeout.
- *\param usec Micro seconds part of the timeout.
+ * Wait until new data is ready.  Do not wait more
+ * than the specified timeout.
+ * \param sec Seconds part of the timeout.
+ * \param usec Micro seconds part of the timeout.
  */
 int Pipe::waitForData (int sec, int usec)
 {
@@ -309,22 +308,19 @@ int Pipe::waitForData (int sec, int usec)
   tv.tv_sec = sec;
   tv.tv_usec = usec;
 
-  FD_ZERO(&readfds);
+  FD_ZERO (&readfds);
 
-  FD_SET(handles[0], &readfds);
+  FD_SET (handles[0], &readfds);
 
-  ret = ::select(handles[0] + 1, &readfds, NULL, NULL, &tv);
+  ret = ::select (handles[0] + 1, &readfds, NULL, NULL, &tv);
 
-  if(ret == -1 || ret == 0)
-  {
+  if (ret == -1 || ret == 0)
     return 0;
-  }
 
-  if (FD_ISSET(handles[0], &readfds))
+  if (FD_ISSET (handles[0], &readfds))
     return 1;
 
   return 0;
 #endif
-
   return 0;
 }
diff --git a/myserver/src/filter/gzip/gzip.cpp b/myserver/src/filter/gzip/gzip.cpp
index 503f160..ec524c8 100755
--- a/myserver/src/filter/gzip/gzip.cpp
+++ b/myserver/src/filter/gzip/gzip.cpp
@@ -19,45 +19,45 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #include <include/base/string/securestr.h>
 #include <include/protocol/http/http.h>
 
-extern "C" {
+extern "C"
+{
 #ifdef WIN32
-#include <direct.h>
-#include <errno.h>
+# include <direct.h>
+# include <errno.h>
 #endif
 #ifndef WIN32
-#include <string.h>
-#include <errno.h>
+# include <string.h>
+# include <errno.h>
 #endif
 }
+
 #ifdef WIN32
-#include <algorithm>
+# include <algorithm>
 #endif
 
-char GZIP_HEADER[] = {(char)0x1f, (char)0x8b, Z_DEFLATED, 
-                      0, 0, 0, 0, 0, 0, 0x03};
+char GZIP_HEADER[] = {(char)0x1f, (char)0x8b, Z_DEFLATED,
+                                 0, 0, 0, 0, 0, 0, 0x03};
 
 
 /*!
- *Initialize the gzip structure value.
+ * Initialize the gzip structure value.
  */
-u_long Gzip::initialize()
+u_long Gzip::initialize ()
 {
-#ifndef DO_NOT_USE_GZIP    
+#ifdef HAVE_ZLIB
   long level = Z_DEFAULT_COMPRESSION;
 
   if(protocol && protocolData)
-  {
-    if(!strstr(protocol->registerName(0,0), "HTTP"))
     {
-      HttpRequestHeader::Entry* e = ((HttpThreadContext*)protocolData)->request.other.get("Accept-Encoding");
-      if(e)
-      {
-        active &= (e->value->find("gzip") != string::npos);
-      }
-      else
-        active = false;
+      if(!strstr(protocol->registerName(0,0), "HTTP"))
+        {
+          HttpRequestHeader::Entry* e = ((HttpThreadContext*)protocolData)->request.other.get ("Accept-Encoding");
+          if (e)
+            active &= (e->value->find("gzip") != string::npos);
+          else
+            active = false;
+        }
     }
-  }
   data.initialized = 1;
   data.data_size = 0;
   data.crc = crc32(0L, Z_NULL, 0);
@@ -65,42 +65,41 @@ u_long Gzip::initialize()
   data.stream.zfree = Z_NULL;
   data.stream.opaque = Z_NULL;
   data.stream.data_type = Z_BINARY;
-  return deflateInit2(&(data.stream), level, Z_DEFLATED,-MAX_WBITS, MAX_MEM_LEVEL,0);
-#else 
+  return deflateInit2 (&(data.stream), level, Z_DEFLATED, -MAX_WBITS, MAX_MEM_LEVEL, 0);
+#else
   return 0;
 #endif
 
 }
 
-#ifdef GZIP_CHECK_BOUNDS  
-u_long Gzip::compressBound(int size)
+u_long Gzip::compressBound (int size)
 {
-#ifdef compressBound 
-  return compressBound(size);
+#ifdef GZIP_COMPRESS_BOUNDS
+# ifdef GZIP_CHECK_BOUNDS
+  return ::compressBound (size);
+# endif
 #else
-  return 0;
-#endif  
-}
+  return -1;
 #endif
+}
 
 /*!
- *Compress the in buffer to the out buffer using the gzip compression.
- *\param in Buffer to compress.
- *\param sizeIn The dimension of the buffer to compress.
- *\param out Buffer where compress.
- *\param sizeOut The dimension of the buffer where compress.
+ * Compress the in buffer to the out buffer using the gzip compression.
+ * \param in Buffer to compress.
+ * \param sizeIn The dimension of the buffer to compress.
+ * \param out Buffer where compress.
+ * \param sizeOut The dimension of the buffer where compress.
  */
-u_long Gzip::compress(const char* in, u_long sizeIn, 
-                      char *out, u_long sizeOut)
+u_long Gzip::compress (const char* in, u_long sizeIn,
+                       char *out, u_long sizeOut)
 {
-#ifndef DO_NOT_USE_GZIP
+#ifdef HAVE_ZLIB
   u_long old_total_out = data.stream.total_out;
   u_long ret;
 
-#ifdef GZIP_CHECK_BOUNDS
-  if(compressBound(sizeIn) > (u_long)sizeOut)
+  if (compressBound (sizeIn) > (u_long)sizeOut)
     return 0;
-#endif
+
   data.stream.data_type = Z_BINARY;
   data.stream.next_in = (Bytef*) in;
   data.stream.avail_in = sizeIn;
@@ -111,64 +110,60 @@ u_long Gzip::compress(const char* in, u_long sizeIn,
   data.data_size += data.stream.total_out - old_total_out;
   data.crc = crc32(data.crc, (const Bytef *) in, sizeIn);
   return data.stream.total_out - old_total_out;
-#else 
-  /*!
-   *If is specified DO_NOT_USE_GZIP copy the input buffer 
-   *to the output one as it is.
-   */
-  memcpy(out, in, std::min(sizeIn, sizeOut));
-  return std::min(sizeIn, sizeOut);
+#else
+  memcpy (out, in, std::min (sizeIn, sizeOut));
+  return std::min (sizeIn, sizeOut);
 #endif
 }
 
 /*!
- *Close the gzip compression.
+ * Close the gzip compression.
  */
-u_long Gzip::free()
+u_long Gzip::free ()
 {
   u_long ret = 0;
-#ifndef DO_NOT_USE_GZIP
-  
-  if(data.initialized == 0)
+#ifdef HAVE_ZLIB
+  if (!data.initialized)
     return 0;
+
   data.initialized = 0;
-  ret = deflateEnd(&(data.stream));
+  ret = deflateEnd (&(data.stream));
 #endif
   return ret;
 }
 
-/*! 
- *Inherited from Filter.
- *\param buffer Buffer where write.
- *\param len Buffer length.
- *\param nbw Numbers of written bytes.
+/*!
+ * Inherited from Filter.
+ * \param buffer Buffer where write.
+ * \param len Buffer length.
+ * \param nbw Numbers of written bytes.
  */
-int Gzip::getHeader(char* buffer, u_long len, u_long* nbw)
+int Gzip::getHeader (char* buffer, u_long len, u_long* nbw)
 {
-  *nbw = getHeader(buffer, len);
+  *nbw = getHeader (buffer, len);
   return !(*nbw);
 }
 
-/*! 
- *Inherited from Filter.
- *\param buffer Buffer where write.
- *\param len Buffer length.
- *\param nbw Numbers of written bytes.
+/*!
+ * Inherited from Filter.
+ * \param buffer Buffer where write.
+ * \param len Buffer length.
+ * \param nbw Numbers of written bytes.
  */
-int Gzip::getFooter(char* buffer, u_long len, u_long* nbw)
+int Gzip::getFooter (char* buffer, u_long len, u_long* nbw)
 {
-  if(len < GZIP_FOOTER_LENGTH)
+  if (len < GZIP_FOOTER_LENGTH)
     return -1;
-  getFooter(buffer, GZIP_FOOTER_LENGTH);
+  getFooter (buffer, GZIP_FOOTER_LENGTH);
   *nbw = GZIP_FOOTER_LENGTH;
   return 0;
 
 }
 
 /*!
- *The Gzip filter modifies the data. 
+ *The Gzip filter modifies the data.
  */
-int Gzip::modifyData()
+int Gzip::modifyData ()
 {
   return 1;
 }
@@ -178,9 +173,9 @@ int Gzip::modifyData()
  *\param out Buffer where write.
  *\param sizeOut Buffer length.
  */
-u_long Gzip::flush(char *out, u_long sizeOut)
+u_long Gzip::flush (char *out, u_long sizeOut)
 {
-#ifndef DO_NOT_USE_GZIP  
+#ifdef HAVE_ZLIB
   u_long old_total_out = data.stream.total_out;
   uLongf destLen = sizeOut;
 
@@ -189,42 +184,42 @@ u_long Gzip::flush(char *out, u_long sizeOut)
   data.stream.avail_in = 0;
   data.stream.next_out = (Bytef*) out;
   data.stream.avail_out = destLen;
-  deflate(&(data.stream), Z_FINISH);
+  deflate (&(data.stream), Z_FINISH);
 
   data.data_size += data.stream.total_out - old_total_out;
   return data.stream.total_out - old_total_out;
-#else 
+#else
   return 0;
 #endif
 }
 
-/*! 
- *Constructor for the class. 
+/*!
+ * Constructor for the class.
  */
-Gzip::Gzip()
+Gzip::Gzip ()
 {
   active = 1;
-  initialize();
+  initialize ();
 }
 
 /*!
- *Destructor for the class. 
+ * Destructor for the class.
  */
-Gzip::~Gzip()
+Gzip::~Gzip ()
 {
-  free();
+  free ();
 }
 
 /*!
- *Update the existent CRC.
- *\param buffer Buffer to look.
- *\param size Number of bytes to look.
+ * Update the existent CRC.
+ * \param buffer Buffer to look.
+ * \param size Number of bytes to look.
  */
-u_long Gzip::updateCRC(char* buffer, int size)
+u_long Gzip::updateCRC (char* buffer, int size)
 {
-#ifndef DO_NOT_USE_GZIP    
-  data.crc = crc32(data.crc, (const Bytef *) buffer, 
-                   (u_long)size);
+#ifdef HAVE_ZLIB
+  data.crc = crc32 (data.crc, (const Bytef *) buffer,
+                    (u_long)size);
   return data.crc;
 #else
   return 0;
@@ -236,9 +231,9 @@ u_long Gzip::updateCRC(char* buffer, int size)
  *\param footer Buffer where write.
  *\param size Buffer length.
  */
-u_long Gzip::getFooter(char *footer, int /*size*/)
+u_long Gzip::getFooter (char *footer, int /*size*/)
 {
-#ifndef DO_NOT_USE_GZIP    
+#ifdef HAVE_ZLIB
   footer[0] = (char) (data.crc) & 0xFF;
   footer[1] = (char) ((data.crc) >> 8) & 0xFF;
   footer[2] = (char) ((data.crc) >> 16) & 0xFF;
@@ -255,145 +250,144 @@ u_long Gzip::getFooter(char *footer, int /*size*/)
 }
 
 /*!
- *Copy the GZIP header in the buffer.
- *\param buffer Buffer where write.
- *\param buffersize Buffer length.
+ * Copy the GZIP header in the buffer.
+ * \param buffer Buffer where write.
+ * \param buffersize Buffer length.
  */
-u_long Gzip::getHeader(char *buffer,u_long buffersize)
+u_long Gzip::getHeader (char *buffer,u_long buffersize)
 {
-  if(buffersize < GZIP_HEADER_LENGTH)
+  if (buffersize < GZIP_HEADER_LENGTH)
     return 0;
-  memcpy(buffer, GZIP_HEADER, GZIP_HEADER_LENGTH);
+  memcpy (buffer, GZIP_HEADER, GZIP_HEADER_LENGTH);
   return GZIP_HEADER_LENGTH;
 }
 
-/*! 
+/*!
  *Inherited from Filter.
- *This function uses an internal buffer slowing it. 
+ *This function uses an internal buffer slowing it.
  *It is better to use directly the Gzip::compress routine where possible.
  *\param buffer Buffer where write.
  *\param len Buffer length.
  *\param nbr Number of read bytes.
  */
-int Gzip::read(char* buffer, u_long len, u_long *nbr)
+int Gzip::read (char* buffer, u_long len, u_long *nbr)
 {
   char *tmp_buff;
   int ret;
   u_long nbr_parent;
-  if(!parent)
+  if (!parent)
     return -1;
   tmp_buff = new char[len/2];
-  if(!tmp_buff)
-    return -1; 
-  
-  if(!active)
-    return parent->read(buffer, len, nbr);
+  if (!tmp_buff)
+    return -1;
 
-  ret = parent->read(tmp_buff, len/2, &nbr_parent);
+  if (!active)
+    return parent->read (buffer, len, nbr);
 
-  if(ret == -1)
-  {
-    delete [] tmp_buff;
-    return -1;
-  }
-  *nbr = compress(tmp_buff, nbr_parent, buffer, len);
+  ret = parent->read (tmp_buff, len/2, &nbr_parent);
+
+  if (ret == -1)
+    {
+      delete [] tmp_buff;
+      return -1;
+    }
+
+  *nbr = compress (tmp_buff, nbr_parent, buffer, len);
   delete [] tmp_buff;
   return 0;
 }
 
-/*! 
- *Inherited from Filter.
- *\param buffer Buffer where write.
- *\param len Buffer length.
- *\param nbw Number of written bytes.
+/*!
+ * Inherited from Filter.
+ * \param buffer Buffer where write.
+ * \param len Buffer length.
+ * \param nbw Number of written bytes.
  */
-int Gzip::write(const char* buffer, u_long len, u_long *nbw)
+int Gzip::write (const char* buffer, u_long len, u_long *nbw)
 {
   char tmpBuffer[1024];
   u_long written = 0;
   *nbw = 0;
 
-  /*! No stream to write to.  */
-  if(!parent)
+  /* No stream to write to.  */
+  if (!parent)
     return -1;
 
-  if(!active)
-    return parent->write(buffer, len, nbw);
+  if (!active)
+    return parent->write (buffer, len, nbw);
 
-  while(len)
-  {
-    u_long nbw_parent;
-    u_long size=std::min(len, 512UL);
-    u_long ret=compress(buffer, size, tmpBuffer, 1024);
+  while (len)
+    {
+      u_long nbw_parent;
+      u_long size=std::min (len, 512UL);
+      u_long ret=compress (buffer, size, tmpBuffer, 1024);
 
-    if(ret)
-      if(parent->write(tmpBuffer, ret, &nbw_parent) == -1 )
+      if(ret && parent->write(tmpBuffer, ret, &nbw_parent) == -1)
         return -1;
 
-    written += ret;
-    buffer += size;
-    len -= size;
-    *nbw += nbw_parent;
-  }
+      written += ret;
+      buffer += size;
+      len -= size;
+      *nbw += nbw_parent;
+    }
   return 0;
 }
 
-/*! 
- *Inherited from Filter.
- *\param nbw Number of flushed bytes.
+/*!
+ * Inherited from Filter.
+ * \param nbw Number of flushed bytes.
  */
-int Gzip::flush(u_long *nbw)
+int Gzip::flush (u_long *nbw)
 {
   char buffer[512];
 
-  if(!active)
+  if (!active)
     return 0;
 
-  *nbw = flush(buffer, 512);
-  if(*nbw)
-  {
-    u_long nbwParent;
-    u_long nbwParentFlush;
-    if(!parent)
-      return -1;
-    if(parent->write(buffer, *nbw, &nbwParent) != 0)
-      return -1;
-    if(parent->flush(&nbwParentFlush) != 0)
-      return -1;  
-    *nbw = nbwParentFlush + nbwParent;
-   }
+  *nbw = flush (buffer, 512);
+  if (*nbw)
+    {
+      u_long nbwParent;
+      u_long nbwParentFlush;
+      if (!parent)
+        return -1;
+      if (parent->write (buffer, *nbw, &nbwParent) != 0)
+        return -1;
+      if (parent->flush (&nbwParentFlush) != 0)
+        return -1;
+      *nbw = nbwParentFlush + nbwParent;
+    }
   return 0;
 }
 
 /*!
- *Returns a new Gzip object.
- *\param name Filter name.
+ * Returns a new Gzip object.
+ * \param name Filter name.
  */
-Filter* Gzip::factory(const char* name)
+Filter* Gzip::factory (const char* name)
 {
-  return new Gzip();
+  return new Gzip ();
 }
 
 /*!
- *Return a string with the filter name. 
- *If an external buffer is provided write the name there too.
- *\param name Buffer where write the filter name.
- *\param len Buffer size.
-*/
-const char* Gzip::getName(char* name, u_long len)
+ * Return a string with the filter name.
+ * If an external buffer is provided write the name there too.
+ * \param name Buffer where write the filter name.
+ * \param len Buffer size.
+ */
+const char* Gzip::getName (char* name, u_long len)
 {
   /*! No name by default. */
-  if(name)
-  {
-    myserver_strlcpy(name, "gzip", len);
-  }
+  if (name)
+    myserver_strlcpy (name, "gzip", len);
+
   return "gzip";
 }
 
 /*!
- *Get the GZIP header size.
+ * Get the GZIP header size.
  */
-u_long Gzip::headerSize()
+u_long Gzip::headerSize ()
 {
   return GZIP_HEADER_LENGTH;
 }
@@ -401,7 +395,7 @@ u_long Gzip::headerSize()
 /*!
  *Get the GZIP footer size.
  */
-u_long Gzip::footerSize()
+u_long Gzip::footerSize ()
 {
   return GZIP_FOOTER_LENGTH;
 }
diff --git a/myserver/src/filter/gzip/gzip_decompress.cpp b/myserver/src/filter/gzip/gzip_decompress.cpp
index 69cf25c..004766b 100755
--- a/myserver/src/filter/gzip/gzip_decompress.cpp
+++ b/myserver/src/filter/gzip/gzip_decompress.cpp
@@ -1,44 +1,43 @@
 /*
-MyServer
-Copyright (C) 2002, 2003, 2004, 2007, 2008, 2009 Free Software Foundation, Inc.
-This program 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 3 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program.  If not, see <http://www.gnu.org/licenses/>.
+  MyServer
+  Copyright (C) 2002, 2003, 2004, 2007, 2008, 2009 Free Software Foundation, Inc.
+  This program 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 3 of the License, or
+  (at your option) any later version.
+
+  This program is distributed in the hope that it will be useful,
+  but WITHOUT ANY WARRANTY; without even the implied warranty of
+  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+  GNU General Public License for more details.
+
+  You should have received a copy of the GNU General Public License
+  along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
 
 #include <include/filter/gzip/gzip_decompress.h>
 #include <include/base/string/securestr.h>
 
-extern "C" {
+extern "C"
+{
 #ifdef WIN32
-#include <direct.h>
-#include <errno.h>
-#endif
-#ifndef WIN32
-#include <string.h>
-#include <errno.h>
+# include <direct.h>
+# include <errno.h>
+#else
+# include <string.h>
+# include <errno.h>
 #endif
 }
 #ifdef WIN32
-#include <algorithm>
+# include <algorithm>
 #endif
 
 /*!
- *Initialize the gzip structure value.
+ * Initialize the gzip structure value.
  */
-u_long GzipDecompress::initialize()
+u_long GzipDecompress::initialize ()
 {
-#ifndef DO_NOT_USE_GZIP    
-
+#ifdef HAVE_ZLIB
   data.initialized = 1;
   data.data_size = 0;
   data.stream.zalloc = Z_NULL;
@@ -47,24 +46,24 @@ u_long GzipDecompress::initialize()
   data.stream.avail_in = 0;
   data.stream.next_in = Z_NULL;
 
-  return inflateInit2(&(data.stream), -MAX_WBITS);
-#else 
+  return inflateInit2 (&(data.stream), -MAX_WBITS);
+#else
   return 0;
 #endif
 
 }
 
 /*!
- *Decompress the in buffer to the out buffer using the gzip compression.
- *\param in Buffer to decompress.
- *\param sizeIn The dimension of the buffer to decompress.
- *\param out Buffer where decompress.
- *\param sizeOut The dimension of the buffer where decompress.
+ * Decompress the in buffer to the out buffer using the gzip compression.
+ * \param in Buffer to decompress.
+ * \param sizeIn The dimension of the buffer to decompress.
+ * \param out Buffer where decompress.
+ * \param sizeOut The dimension of the buffer where decompress.
  */
-u_long GzipDecompress::decompress(const char* in, u_long sizeIn, 
-                                  char *out, u_long sizeOut)
+u_long GzipDecompress::decompress (const char* in, u_long sizeIn,
+                                   char *out, u_long sizeOut)
 {
-#ifndef DO_NOT_USE_GZIP
+#ifdef HAVE_ZLIB
   u_long old_total_out = data.stream.total_out;
   u_long ret;
   data.stream.data_type = Z_BINARY;
@@ -77,25 +76,21 @@ u_long GzipDecompress::decompress(const char* in, u_long sizeIn,
 
   data.data_size += data.stream.total_out - old_total_out;
   return data.stream.total_out - old_total_out;
-#else 
-  /*!
-   *If is specified DO_NOT_USE_GZIP copy the input buffer 
-   *to the output one as it is.
-   */
-  memcpy(out, in, std::min(sizeIn, sizeOut));
-  return std::min(sizeIn, sizeOut);
+#else
+  memcpy (out, in, std::min (sizeIn, sizeOut));
+  return std::min (sizeIn, sizeOut);
 #endif
 }
 
 /*!
- *Close the gzip compression.
+ * Close the gzip compression.
  */
-u_long GzipDecompress::free()
+u_long GzipDecompress::free ()
 {
   u_long ret = 0;
-#ifndef DO_NOT_USE_GZIP
-  
-  if(data.initialized == 0)
+#ifdef HAVE_ZLIB
+
+  if (data.initialized == 0)
     return 0;
   data.initialized = 0;
   ret = inflateEnd(&(data.stream));
@@ -103,36 +98,35 @@ u_long GzipDecompress::free()
   return ret;
 }
 
-/*! 
- *Inherited from Filter.
- *\param buffer Buffer where write.
- *\param len Buffer length.
- *\param nbw Numbers of written bytes.
+/*!
+ * Inherited from Filter.
+ * \param buffer Buffer where write.
+ * \param len Buffer length.
+ * \param nbw Numbers of written bytes.
  */
-int GzipDecompress::getHeader(char* buffer, u_long len, u_long* nbw)
+int GzipDecompress::getHeader (char* buffer, u_long len, u_long* nbw)
 {
-  *nbw = getHeader(buffer, len);
+  *nbw = getHeader (buffer, len);
   return !(*nbw);
 }
 
-/*! 
- *Inherited from Filter.
- *\param buffer Buffer where write.
- *\param len Buffer length.
- *\param nbw Numbers of written bytes.
+/*!
+ * Inherited from Filter.
+ * \param buffer Buffer where write.
+ * \param len Buffer length.
+ * \param nbw Numbers of written bytes.
  */
-int GzipDecompress::getFooter(char* buffer, u_long len, u_long* nbw)
+int GzipDecompress::getFooter (char* buffer, u_long len, u_long* nbw)
 {
-  if(len < GZIP_FOOTER_LENGTH)
+  if (len < GZIP_FOOTER_LENGTH)
     return -1;
-  getFooter(buffer, GZIP_FOOTER_LENGTH);
+  getFooter (buffer, GZIP_FOOTER_LENGTH);
   *nbw = GZIP_FOOTER_LENGTH;
   return 0;
-
 }
 
 /*!
- *The GzipDecompress filter modifies the data. 
+ * The GzipDecompress filter modifies the data.
  */
 int GzipDecompress::modifyData()
 {
@@ -140,13 +134,13 @@ int GzipDecompress::modifyData()
 }
 
 /*!
- *Flush all the remaining data.
- *\param out Buffer where write.
- *\param sizeOut Buffer length.
+ * Flush all the remaining data.
+ * \param out Buffer where write.
+ * \param sizeOut Buffer length.
  */
-u_long GzipDecompress::flush(char *out, u_long sizeOut)
+u_long GzipDecompress::flush (char *out, u_long sizeOut)
 {
-#ifndef DO_NOT_USE_GZIP  
+#ifdef HAVE_ZLIB
   u_long old_total_out = data.stream.total_out;
   uLongf destLen = sizeOut;
 
@@ -159,22 +153,22 @@ u_long GzipDecompress::flush(char *out, u_long sizeOut)
 
   data.data_size += data.stream.total_out - old_total_out;
   return data.stream.total_out - old_total_out;
-#else 
+#else
   return 0;
 #endif
 }
 
-/*! 
- *Constructor for the class. 
+/*!
+ * Constructor for the class.
  */
-GzipDecompress::GzipDecompress()
+GzipDecompress::GzipDecompress ()
 {
   active = 1;
-  initialize();
+  initialize ();
 }
 
 /*!
- *Destructor for the class. 
+ * Destructor for the class.
  */
 GzipDecompress::~GzipDecompress()
 {
@@ -182,13 +176,13 @@ GzipDecompress::~GzipDecompress()
 }
 
 /*!
- *Get the GZIP footer.
- *\param str Buffer where write.
- *\param size Buffer length.
+ * Get the GZIP footer.
+ * \param str Buffer where write.
+ * \param size Buffer length.
  */
-u_long GzipDecompress::getFooter(char *str,int /*size*/)
+u_long GzipDecompress::getFooter(char *str, int /*size*/)
 {
-#ifndef DO_NOT_USE_GZIP    
+#ifdef HAVE_ZLIB
   return GZIP_FOOTER_LENGTH;
 #else
   return 0;
@@ -196,27 +190,27 @@ u_long GzipDecompress::getFooter(char *str,int /*size*/)
 }
 
 /*!
- *Copy the GZIP header in the buffer.
- *\param buffer Buffer where write.
- *\param buffersize Buffer length.
+ * Copy the GZIP header in the buffer.
+ * \param buffer Buffer where write.
+ * \param buffersize Buffer length.
  */
-u_long GzipDecompress::getHeader(char *buffer,u_long buffersize)
+u_long GzipDecompress::getHeader (char *buffer, u_long buffersize)
 {
-  if(buffersize < GZIP_HEADER_LENGTH)
+  if (buffersize < GZIP_HEADER_LENGTH)
     return 0;
-  memcpy(buffer, GZIP_HEADER, GZIP_HEADER_LENGTH);
+  memcpy (buffer, GZIP_HEADER, GZIP_HEADER_LENGTH);
   return GZIP_HEADER_LENGTH;
 }
 
-/*! 
- *Inherited from Filter.
- *This function uses an internal buffer slowing it. 
- *It is better to use directly the GzipDecompress::compress routine where possible.
- *\param buffer Buffer where write.
- *\param len Buffer length.
- *\param nbr Number of read bytes.
+/*!
+ * Inherited from Filter.
+ * This function uses an internal buffer slowing it.
+ * It is better to use directly the GzipDecompress::compress routine where possible.
+ * \param buffer Buffer where write.
+ * \param len Buffer length.
+ * \param nbr Number of read bytes.
  */
-int GzipDecompress::read(char* buffer, u_long len, u_long *nbr)
+int GzipDecompress::read (char* buffer, u_long len, u_long *nbr)
 {
   char *tmp_buff;
   int ret;
@@ -224,117 +218,115 @@ int GzipDecompress::read(char* buffer, u_long len, u_long *nbr)
   if(!parent)
     return -1;
   tmp_buff = new char[len/2];
-  if(!tmp_buff)
-    return -1; 
-  
-  if(!active)
-    return parent->read(buffer, len, nbr);
+  if (!tmp_buff)
+    return -1;
 
-  ret = parent->read(tmp_buff, len/2, &nbr_parent);
+  if (!active)
+    return parent->read (buffer, len, nbr);
 
-  if(ret == -1)
-  {
-    delete [] tmp_buff;
-    return -1;
-  }
+  ret = parent->read (tmp_buff, len/2, &nbr_parent);
+
+  if (ret == -1)
+    {
+      delete [] tmp_buff;
+      return -1;
+    }
 
-  *nbr = decompress(tmp_buff, nbr_parent, buffer, len);
+  *nbr = decompress (tmp_buff, nbr_parent, buffer, len);
 
   delete [] tmp_buff;
   return 0;
 }
 
-/*! 
- *Inherited from Filter.
- *\param buffer Buffer where write.
- *\param len Buffer length.
- *\param nbw Number of written bytes.
+/*!
+ * Inherited from Filter.
+ * \param buffer Buffer where write.
+ * \param len Buffer length.
+ * \param nbw Number of written bytes.
  */
-int GzipDecompress::write(const char* buffer, u_long len, u_long *nbw)
+int GzipDecompress::write (const char* buffer, u_long len, u_long *nbw)
 {
   char tmpBuffer[1024];
   u_long written = 0;
   *nbw = 0;
 
   /*! No stream to write to.  */
-  if(!parent)
+  if (!parent)
     return -1;
 
-  if(!active)
-    return parent->write(buffer, len, nbw);
+  if (!active)
+    return parent->write (buffer, len, nbw);
 
-  while(len)
-  {
-    u_long nbw_parent;
-    u_long size = std::min(len, 512UL);
-    u_long ret = decompress(buffer, size, tmpBuffer, 1024);
+  while (len)
+    {
+      u_long nbw_parent;
+      u_long size = std::min (len, 512UL);
+      u_long ret = decompress (buffer, size, tmpBuffer, 1024);
 
-    if(ret)
-      if(parent->write(tmpBuffer, ret, &nbw_parent) == -1 )
+      if (ret && parent->write (tmpBuffer, ret, &nbw_parent) == -1)
         return -1;
 
-    written += ret;
-    buffer += size;
-    len -= size;
-    *nbw += nbw_parent;
-  }
+      written += ret;
+      buffer += size;
+      len -= size;
+      *nbw += nbw_parent;
+    }
   return 0;
 }
 
-/*! 
- *Inherited from Filter.
- *\param nbw Number of flushed bytes.
+/*!
+ * Inherited from Filter.
+ * \param nbw Number of flushed bytes.
  */
-int GzipDecompress::flush(u_long *nbw)
+int GzipDecompress::flush (u_long *nbw)
 {
   char buffer[512];
 
   if(!active)
     return 0;
 
-  *nbw = flush(buffer, 512);
-  if(*nbw)
-  {
-    u_long nbwParent;
-    u_long nbwParentFlush;
-    if(!parent)
-      return -1;
-    if(parent->write(buffer, *nbw, &nbwParent) != 0)
-      return -1;
-    if(parent->flush(&nbwParentFlush) != 0)
-      return -1;  
-    *nbw = nbwParentFlush + nbwParent;
-   }
+  *nbw = flush (buffer, 512);
+  if (*nbw)
+    {
+      u_long nbwParent;
+      u_long nbwParentFlush;
+      if (!parent)
+        return -1;
+      if (parent->write (buffer, *nbw, &nbwParent) != 0)
+        return -1;
+      if (parent->flush (&nbwParentFlush) != 0)
+        return -1;
+      *nbw = nbwParentFlush + nbwParent;
+    }
   return 0;
 }
 
 /*!
- *Returns a new GzipDecompress object.
- *\param name Filter name.
+ * Returns a new GzipDecompress object.
+ * \param name Filter name.
  */
-Filter* GzipDecompress::factory(const char* name)
+Filter* GzipDecompress::factory (const char* name)
 {
-  return new GzipDecompress();
+  return new GzipDecompress ();
 }
 
 /*!
- *Return a string with the filter name. 
- *If an external buffer is provided write the name there too.
- *\param name Buffer where write the filter name.
- *\param len Buffer size.
-*/
-const char* GzipDecompress::getName(char* name, u_long len)
+ * Return a string with the filter name.
+ * If an external buffer is provided write the name there too.
+ * \param name Buffer where write the filter name.
+ * \param len Buffer size.
+ */
+const char* GzipDecompress::getName (char* name, u_long len)
 {
   /*! No name by default. */
-  if(name)
-  {
+  if (name)
     myserver_strlcpy(name, "gzip", len);
-  }
+
   return "gzip";
 }
 
 /*!
- *Get the GZIP header size.
+ * Get the GZIP header size.
  */
 u_long GzipDecompress::headerSize()
 {
@@ -342,7 +334,7 @@ u_long GzipDecompress::headerSize()
 }
 
 /*!
- *Get the GZIP footer size.
+ * Get the GZIP footer size.
  */
 u_long GzipDecompress::footerSize()
 {
diff --git a/myserver/src/http_handler/http_file/http_file.cpp b/myserver/src/http_handler/http_file/http_file.cpp
index 539d951..631f180 100644
--- a/myserver/src/http_handler/http_file/http_file.cpp
+++ b/myserver/src/http_handler/http_file/http_file.cpp
@@ -309,7 +309,7 @@ int HttpFile::send (HttpThreadContext* td,
 
     keepalive = td->request.isKeepAlive ();
 
-#ifndef DO_NOT_USEGZIP
+#ifdef HAVE_ZLIB
     /*
      * Be sure that the client accept GZIP compressed data.
      */
diff --git a/myserver/src/protocol/http/http_data_handler.cpp b/myserver/src/protocol/http/http_data_handler.cpp
index 8a5f534..dd05b5b 100644
--- a/myserver/src/protocol/http/http_data_handler.cpp
+++ b/myserver/src/protocol/http/http_data_handler.cpp
@@ -19,7 +19,7 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #include <include/protocol/http/http_data_handler.h>
 
 /*!
- *Send a file to the client using the HTTP protocol.
+ * Send a file to the client using the HTTP protocol.
  */
 int
 HttpDataHandler::send (HttpThreadContext* td,
@@ -31,77 +31,69 @@ HttpDataHandler::send (HttpThreadContext* td,
 }
 
 /*!
- *Constructor for the class.
+ * Constructor for the class.
  */
 HttpDataHandler::HttpDataHandler () { }
 
 /*!
- *Destroy the object.
+ * Destroy the object.
  */
 HttpDataHandler::~HttpDataHandler () { }
 
 /*!
- *Load the static elements.
+ * Load the static elements.
  */
-int
-HttpDataHandler::load ()
+int HttpDataHandler::load ()
 {
   return 0;
 }
 
 /*!
- *Unload the static elements.
+ * Unload the static elements.
  */
-int
-HttpDataHandler::unLoad ()
+int HttpDataHandler::unLoad ()
 {
   return 0;
 }
 
 /*!
- *Send data over the HTTP channel.  This method considers modifier filters.
- *in the filters chain.
- *\param td The HTTP thread context.
- *\param buffer Data to send.
- *\param size Size of the buffer.
- *\param appendFile The file where append if in append mode.
- *\param chain Where send data if not append.
- *\param append Append to the file?
- *\param useChunks Can we use HTTP chunks to send data?
- *\param realBufferSize The real dimension of the buffer that can be
- *used by this method.
- *\param tmpStream A support on memory read/write stream used
- *internally by the function.
+ * Send data over the HTTP channel.  This method considers modifier filters.
+ * in the filters chain.
+ * \param td The HTTP thread context.
+ * \param buffer Data to send.
+ * \param size Size of the buffer.
+ * \param appendFile The file where append if in append mode.
+ * \param chain Where send data if not append.
+ * \param append Append to the file?
+ * \param useChunks Can we use HTTP chunks to send data?
+ * \param realBufferSize The real dimension of the buffer that can be
+ * used by this method.
+ * \param tmpStream A support on memory read/write stream used
+ * internally by the function.
  */
-int
-HttpDataHandler::appendDataToHTTPChannel (HttpThreadContext* td,
-                                          char* buffer,
-                                          u_long size,
-                                          File* appendFile,
-                                          FiltersChain* chain,
-                                          bool append,
-                                          bool useChunks,
-                                          u_long realBufferSize,
-                                          MemoryStream *tmpStream)
+int HttpDataHandler::appendDataToHTTPChannel (HttpThreadContext* td,
+                                              char* buffer,
+                                              u_long size,
+                                              File* appendFile,
+                                              FiltersChain* chain,
+                                              bool append,
+                                              bool useChunks,
+                                              u_long realBufferSize,
+                                              MemoryStream *tmpStream)
 {
   u_long nbr, nbw;
   Stream *oldStream = chain->getStream ();
 
   if (!chain->hasModifiersFilters ())
-    return appendDataToHTTPChannel (td,
-                                    buffer,
-                                    size,
-                                    appendFile,
-                                    chain,
-                                    append,
+    return appendDataToHTTPChannel (td, buffer, size, appendFile, chain, append,
                                     useChunks);
 
   /*
-   *This function can't append directly to the chain because we can't
-   *know in advance the data chunk size.  Therefore we replace the
-   *final stream with a memory buffer and write there the final data
-   *chunk content, finally we read from it and send directly to the
-   *original stream.
+   * This function can't append directly to the chain because we can't
+   * know in advance the data chunk size.  Therefore we replace the
+   * final stream with a memory buffer and write there the final data
+   * chunk content, finally we read from it and send directly to the
+   * original stream.
    */
   chain->setStream (tmpStream);
 
@@ -124,25 +116,20 @@ HttpDataHandler::appendDataToHTTPChannel (HttpThreadContext* td,
    *Use of chain->getStream() is needed to write directly on the
    *final stream.
    */
-  return appendDataToHTTPChannel (td,
-                                  buffer,
-                                  nbr,
-                                  appendFile,
-                                  chain,
-                                  append,
+  return appendDataToHTTPChannel (td, buffer, nbr, appendFile, chain, append,
                                   useChunks);
 }
 
 /*!
- *Send raw data over the HTTP channel.  It doesn't consider modifier filters.
- *Return zero on success.
- *\param td The HTTP thread context.
- *\param buffer Data to send.
- *\param size Size of the buffer.
- *\param appendFile The file where append if in append mode.
- *\param chain Where send data if not append.
- *\param append Append to the file?
- *\param useChunks Can we use HTTP chunks to send data?
+ * Send raw data over the HTTP channel.  It doesn't consider modifier filters.
+ * Return zero on success.
+ * \param td The HTTP thread context.
+ * \param buffer Data to send.
+ * \param size Size of the buffer.
+ * \param appendFile The file where append if in append mode.
+ * \param chain Where send data if not append.
+ * \param append Append to the file?
+ * \param useChunks Can we use HTTP chunks to send data?
  */
 int
 HttpDataHandler::appendDataToHTTPChannel (HttpThreadContext* td,
@@ -203,8 +190,8 @@ HttpDataHandler::appendDataToHTTPChannel (HttpThreadContext* td,
 }
 
 /*!
- *Check if the server can use the chunked transfer encoding and if the client
- *supports keep-alive connections.
+ * Check if the server can use the chunked transfer encoding and if the client
+ * supports keep-alive connections.
  */
 void
 HttpDataHandler::checkDataChunks (HttpThreadContext* td, bool* keepalive,
diff --git a/myserver/src/protocol/http/http_errors.cpp b/myserver/src/protocol/http/http_errors.cpp
index cbea256..a685e6b 100644
--- a/myserver/src/protocol/http/http_errors.cpp
+++ b/myserver/src/protocol/http/http_errors.cpp
@@ -1,6 +1,6 @@
 /*
 MyServer
-Copyright (C) 2002, 2003, 2004, 2007, 2008 Free Software Foundation, Inc.
+Copyright (C) 2002, 2003, 2004, 2007, 2008, 2009 Free Software Foundation, Inc.
 This program 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 3 of the License, or
@@ -28,15 +28,15 @@ bool HttpErrors::loaded = false;
 
 
 /*!
- *Get an error page from its error code.
- *\param statusCode The HTTP error.
- *\param out Output string where write the error page name.
+ * Get an error page from its error code.
+ * \param statusCode The HTTP error.
+ * \param out Output string where write the error page name.
  */
-void HttpErrors::getErrorPage(int statusCode, string& out)
+void HttpErrors::getErrorPage (int statusCode, string& out)
 {
   ostringstream os;
   os << "/errors/" << statusCode << ".html";
-  out.assign(os.str());
+  out.assign (os.str ());
 }
 
 /*!
@@ -44,104 +44,103 @@ void HttpErrors::getErrorPage(int statusCode, string& out)
  *\param statusCode The HTTP error.
  *\param out Output string where write the error message.
  */
-void HttpErrors::getErrorMessage(int statusCode, string& out)
+void HttpErrors::getErrorMessage (int statusCode, string& out)
 {
-  const char* msg;
-  msg = messagesMap.get(statusCode);
-  
-  if(msg)
-    out.assign(msg);
+  const char* msg = messagesMap.get (statusCode);
+
+  if (msg)
+    out.assign (msg);
   else
-    out.assign("");
+    out.assign ("");
 }
 
 /*!
- *Unload the allocated resources.
+ * Unload the allocated resources.
  */
-void HttpErrors::unLoad()
+void HttpErrors::unLoad ()
 {
   messagesMap.clear();
 }
 
 /*!
- *Put a new message in the map.
- *\param id The HTTP error code.
- *\param msg The message associated to the error code.
+ * Put a new message in the map.
+ * \param id The HTTP error code.
+ * \param msg The message associated to the error code.
  */
-void HttpErrors::putMessage(int id, const char* msg)
+void HttpErrors::putMessage (int id, const char* msg)
 {
-  messagesMap.put(id, msg);
+  messagesMap.put (id, msg);
 }
 
 /*!
- *Load the HTTP errors.
+ * Load the HTTP errors.
  */
-void HttpErrors::load()
+void HttpErrors::load ()
 {
-  if(loaded)
+  if (loaded)
     return;
 
   loaded = true;
 
   /* INFORMATIONAL.  */
-  putMessage(100, "Continue");  
-  putMessage(101, "Switching Protocols");
-  putMessage(102, "Processing");
+  putMessage (100, "Continue");
+  putMessage (101, "Switching Protocols");
+  putMessage (102, "Processing");
 
   /* SUCCESS.  */
-  putMessage(200, "OK");
-  putMessage(201, "Created");
-  putMessage(202, "Accepted");
-  putMessage(203, "Non-Authoritative Information");
-  putMessage(204, "No Content");
-  putMessage(205, "Reset Content");
-  putMessage(206, "Partial Content");
-  putMessage(207, "Multi-Status");
+  putMessage (200, "OK");
+  putMessage (201, "Created");
+  putMessage (202, "Accepted");
+  putMessage (203, "Non-Authoritative Information");
+  putMessage (204, "No Content");
+  putMessage (205, "Reset Content");
+  putMessage (206, "Partial Content");
+  putMessage (207, "Multi-Status");
 
   /* REDIRECTION.  */
-  putMessage(300, "Multiple Choices");
-  putMessage(301, "Moved Permanently");
-  putMessage(302, "Found");
-  putMessage(303, "See Other");
-  putMessage(304, "Not Modified");
-  putMessage(305, "Use proxy");
-  putMessage(306, "Switch proxy");
-  putMessage(307, "Temporary redirect");
+  putMessage (300, "Multiple Choices");
+  putMessage (301, "Moved Permanently");
+  putMessage (302, "Found");
+  putMessage (303, "See Other");
+  putMessage (304, "Not Modified");
+  putMessage (305, "Use proxy");
+  putMessage (306, "Switch proxy");
+  putMessage (307, "Temporary redirect");
 
   /* CLIENT ERROR.  */
-  putMessage(400, "Bad Request");
-  putMessage(401, "Unauthorized");
-  putMessage(402, "Payment required");
-  putMessage(403, "Forbidden");
-  putMessage(404, "Not Found");
-  putMessage(405, "Method Not Allowed");
-  putMessage(406, "Not Acceptable");
-  putMessage(407, "Proxy Authentication Required");
-  putMessage(408, "Request timeout");
-  putMessage(409, "Conflict");
-  putMessage(411, "Length Required");
-  putMessage(412, "Precondition Failed");
-  putMessage(413, "Request Entity Too Large");
-  putMessage(414, "Request URI Too Long");
-  putMessage(415, "Unsupported Media Type");
-  putMessage(416, "Requested Range Not Satisfiable");
-  putMessage(417, "Expectation Failed");
-  putMessage(422, "Unprocessable Entity");
-  putMessage(423, "Locked");
-  putMessage(424, "Failed Dependency");
-  putMessage(425, "Unordered Collection");
-  putMessage(426, "Upgrade Required");
-  putMessage(412, "Precondition Failed");
+  putMessage (400, "Bad Request");
+  putMessage (401, "Unauthorized");
+  putMessage (402, "Payment required");
+  putMessage (403, "Forbidden");
+  putMessage (404, "Not Found");
+  putMessage (405, "Method Not Allowed");
+  putMessage (406, "Not Acceptable");
+  putMessage (407, "Proxy Authentication Required");
+  putMessage (408, "Request timeout");
+  putMessage (409, "Conflict");
+  putMessage (411, "Length Required");
+  putMessage (412, "Precondition Failed");
+  putMessage (413, "Request Entity Too Large");
+  putMessage (414, "Request URI Too Long");
+  putMessage (415, "Unsupported Media Type");
+  putMessage (416, "Requested Range Not Satisfiable");
+  putMessage (417, "Expectation Failed");
+  putMessage (422, "Unprocessable Entity");
+  putMessage (423, "Locked");
+  putMessage (424, "Failed Dependency");
+  putMessage (425, "Unordered Collection");
+  putMessage (426, "Upgrade Required");
+  putMessage (412, "Precondition Failed");
 
   /* SERVER ERROR.  */
-  putMessage(500, "Internal Server Error");
-  putMessage(501, "Not Implemented");
-  putMessage(502, "Bad Gateway");
-  putMessage(503, "Service Unavailable");
-  putMessage(504, "Gateway Timeout");
-  putMessage(505, "HTTP Version Not Supported");
-  putMessage(506, "Variant Also Negotiates");
-  putMessage(507, "Insufficient Storage");
-  putMessage(509, "Bandwidth Limit Exceeded");
-  putMessage(510, "Not Extended");
+  putMessage (500, "Internal Server Error");
+  putMessage (501, "Not Implemented");
+  putMessage (502, "Bad Gateway");
+  putMessage (503, "Service Unavailable");
+  putMessage (504, "Gateway Timeout");
+  putMessage (505, "HTTP Version Not Supported");
+  putMessage (506, "Variant Also Negotiates");
+  putMessage (507, "Insufficient Storage");
+  putMessage (509, "Bandwidth Limit Exceeded");
+  putMessage (510, "Not Extended");
 }
diff --git a/myserver/src/protocol/http/http_thread_context.cpp b/myserver/src/protocol/http/http_thread_context.cpp
index 36c6b81..6701d08 100755
--- a/myserver/src/protocol/http/http_thread_context.cpp
+++ b/myserver/src/protocol/http/http_thread_context.cpp
@@ -35,7 +35,7 @@ const char* HttpThreadContext::getHashedData (const char *name)
   if (ret)
     return ret->c_str ();
   else
-    return vh ? vh->getHashedData (name) : 0;
+    return vh ? vh->getHashedData (name) : NULL;
 }
 
 /*!
@@ -43,11 +43,11 @@ const char* HttpThreadContext::getHashedData (const char *name)
  */
 const char *HttpThreadContext::getVhostDir ()
 {
-  if(vhostDir.length() > 1)
-    return vhostDir.c_str();
+  if (vhostDir.length () > 1)
+    return vhostDir.c_str ();
 
-  if(connection && connection->host)
-    return connection->host->getDocumentRoot().c_str();
+  if (connection && connection->host)
+    return connection->host->getDocumentRoot ().c_str ();
 
   return "";
 }
@@ -55,13 +55,13 @@ const char *HttpThreadContext::getVhostDir ()
 /*!
  *Get the current vhost sys directory for the environvment.
  */
-const char *HttpThreadContext::getVhostSys()
+const char *HttpThreadContext::getVhostSys ()
 {
-  if(vhostSys.length() > 1)
-    return vhostSys.c_str();
+  if (vhostSys.length() > 1)
+    return vhostSys.c_str ();
 
-  if(connection && connection->host)
-    return connection->host->getSystemRoot().c_str();
+  if (connection && connection->host)
+    return connection->host->getSystemRoot ().c_str ();
 
   return "";
 }

-----------------------------------------------------------------------

Summary of changes:
 myserver/SConstruct                                |    8 +-
 myserver/configure.in                              |   19 +-
 myserver/include/base/string/stringutils.h         |    8 +-
 myserver/include/filter/gzip/gzip.h                |   88 +++---
 myserver/include/filter/gzip/gzip_decompress.h     |   21 +-
 myserver/include/http_handler/mscgi/mscgi.h        |   33 +--
 myserver/src/base/pipe/pipe.cpp                    |  202 ++++++------
 myserver/src/filter/gzip/gzip.cpp                  |  334 ++++++++++----------
 myserver/src/filter/gzip/gzip_decompress.cpp       |  312 +++++++++----------
 myserver/src/http_handler/http_file/http_file.cpp  |    2 +-
 myserver/src/http_handler/mscgi/mscgi.cpp          |  268 ++++++++--------
 myserver/src/protocol/http/http_data_handler.cpp   |  107 +++----
 myserver/src/protocol/http/http_errors.cpp         |  149 +++++-----
 myserver/src/protocol/http/http_thread_context.cpp |   20 +-
 14 files changed, 755 insertions(+), 816 deletions(-)


hooks/post-receive
-- 
GNU MyServer



From MAILER-DAEMON Sun Aug 09 13:55:38 2009
Received: from mailman by lists.gnu.org with archive (Exim 4.43)
	id 1MaCcM-0008Nw-5F
	for mharc-myserver-commit@gnu.org; Sun, 09 Aug 2009 13:55:38 -0400
Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43)
	id 1MaCcJ-0008NR-IK
	for myserver-commit@gnu.org; Sun, 09 Aug 2009 13:55:35 -0400
Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43)
	id 1MaCcH-0008NF-UY
	for myserver-commit@gnu.org; Sun, 09 Aug 2009 13:55:35 -0400
Received: from [199.232.76.173] (port=40243 helo=monty-python.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43) id 1MaCcH-0008NC-Nw
	for myserver-commit@gnu.org; Sun, 09 Aug 2009 13:55:33 -0400
Received: from savannah.gnu.org ([199.232.41.3]:49521 helo=sv.gnu.org)
	by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32)
	(Exim 4.60) (envelope-from <gscrivano@gnu.org>) id 1MaCcG-00043F-An
	for myserver-commit@gnu.org; Sun, 09 Aug 2009 13:55:33 -0400
Received: from download.savannah.gnu.org ([199.232.41.75]
	helo=cvs.savannah.gnu.org) by sv.gnu.org with esmtp (Exim 4.69)
	(envelope-from <gscrivano@gnu.org>) id 1MaCcF-0005og-F8
	for myserver-commit@gnu.org; Sun, 09 Aug 2009 17:55:31 +0000
Received: from gscrivano by cvs.savannah.gnu.org with local (Exim 4.69)
	(envelope-from <gscrivano@savannah.gnu.org>) id 1MaCcC-0005o7-Gr
	for myserver-commit@gnu.org; Sun, 09 Aug 2009 17:55:31 +0000
To: myserver-commit@gnu.org
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: d7643643172ad3f5985c2a2d1a6cf9101a8b3617
X-Git-Newrev: 4a135eca140c55ec140ec1cf408b1dc17d353fac
Message-Id: <E1MaCcC-0005o7-Gr@cvs.savannah.gnu.org>
From: Giuseppe Scrivano <gscrivano@gnu.org>
Date: Sun, 09 Aug 2009 17:55:29 +0000
X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2)
Subject: [myserver-commit] [SCM] GNU MyServer branch, master,
	updated. 4a135eca140c55ec140ec1cf408b1dc17d353fac
X-BeenThere: myserver-commit@gnu.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: myserver-commit.gnu.org
List-Unsubscribe: <http://lists.gnu.org/mailman/listinfo/myserver-commit>,
	<mailto:myserver-commit-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/pipermail/myserver-commit>
List-Post: <mailto:myserver-commit@gnu.org>
List-Help: <mailto:myserver-commit-request@gnu.org?subject=help>
List-Subscribe: <http://lists.gnu.org/mailman/listinfo/myserver-commit>,
	<mailto:myserver-commit-request@gnu.org?subject=subscribe>
X-List-Received-Date: Sun, 09 Aug 2009 17:55:36 -0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU MyServer".

The branch, master has been updated
       via  4a135eca140c55ec140ec1cf408b1dc17d353fac (commit)
       via  e6da2dd53e40276cc5ca2c806a724dffe5499e39 (commit)
       via  9b969b4b889ea80d9a4156e84a75802cd88d1bb4 (commit)
      from  d7643643172ad3f5985c2a2d1a6cf9101a8b3617 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------


commit 4a135eca140c55ec140ec1cf408b1dc17d353fac
Author: Giuseppe Scrivano <gscrivano@gnu.org>
Date:   Sun Aug 9 19:52:03 2009 +0200

    Add back links to default web pages.

diff --git a/myserver/binaries/web/cgi-bin/default.html b/myserver/binaries/web/cgi-bin/default.html
index 0c76471..4e35773 100644
--- a/myserver/binaries/web/cgi-bin/default.html
+++ b/myserver/binaries/web/cgi-bin/default.html
@@ -1,28 +1,30 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
-"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+          "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
-<head>
-<title>MyServer</title>
-<meta http-equiv="content-type" content="text/html;charset=UTF-8" />
-</head>
-<body style="color: #666699;">
-<div style="text-align: center;">
-<br />
-The MSCGI library is used exclusively by MyServer to write fast and efficient 
-modules running in the same web server process space.<br />
-These are some examples of the MSCGI library of MyServer:<br /><br />
-<a href="http://www.myserverproject.net"><img src="/logo.png" alt="" 
-style="border: 0px;" /></a><br /><br />
-Simple echo example (POST request).<a href="post.mscgi"><img src="/goto.png" 
-alt="" style="border: 0px;" /></a>
-<br />
-<br />
-A simple addition on the server, passing the addends through the URL (GET 
-request).
-<a href="math_sum.mscgi"><img src="/goto.png" alt="" style="border: 0px;" 
-/></a>
-<br />
+  <head>
+    <title>MyServer</title>
+    <meta http-equiv="content-type" content="text/html;charset=UTF-8" />
+  </head>
+  <body style="color: #666699;">
+    <div style="text-align: center;">
+      <br />
+      The MSCGI library is used exclusively by MyServer to write fast and efficient
+      modules running in the same web server process space.<br />
+      These are some examples of the MSCGI library of MyServer:<br /><br />
+      <a href="http://www.myserverproject.net"><img src="/logo.png" alt="" style="border: 0px;" /></a>
+      <br />
+      <br />
+      Simple echo example (POST request).<a href="post.mscgi"><img src="/goto.png" alt="" style="border: 0px;" /></a>
+      <br />
+      <br />
+      A simple addition on the server, passing the addends through the URL (GET request).
+      <a href="math_sum.mscgi"><img src="/goto.png" alt="" style="border: 0px;" /></a>
+      <br />
+      <br />
+      <br />
+      <br />
+      Back<a href=".."><img src="/goto.png" alt="" style="border: 0px;" /></a>
 </div>
 </body>
 </html>
diff --git a/myserver/binaries/web/link.html b/myserver/binaries/web/link.html
index 411d992..8e6b543 100644
--- a/myserver/binaries/web/link.html
+++ b/myserver/binaries/web/link.html
@@ -10,7 +10,7 @@
 
 <div style="text-align: center;">
   <br />
-  Here are some examples, to show how MyServer works:
+  Here are some examples pages:
   <br />
   <br />
   <a href="http://www.myserverproject.net">
@@ -25,6 +25,11 @@
   <br />
   Simulate a 404 error page (This file is not present on the file system)<a href="itisnthere.html">
     <img src="goto.png" alt="" style="border: 0px;" /></a>
+  <br />
+  <br />
+  <br />
+  <br />
+  Back<a href="default.html"><img src="goto.png" alt="" style="border: 0px;" /></a>
 </div>
 
 <br />



commit e6da2dd53e40276cc5ca2c806a724dffe5499e39
Author: Giuseppe Scrivano <gscrivano@gnu.org>
Date:   Sun Aug 9 19:31:58 2009 +0200

    Remove the downloads/ directory from the default installed web site.

diff --git a/misc/wingen/NSIS installer script.nsi b/misc/wingen/NSIS installer script.nsi
index f3c1f5c..39debaf 100644
--- a/misc/wingen/NSIS installer script.nsi	
+++ b/misc/wingen/NSIS installer script.nsi	
@@ -251,10 +251,6 @@ Section "Web examples" SecWebEx
 ;  File "web\cgi-src\math_sum\*.*"
 ;  SetOutPath "$INSTDIR\web\cgi-src\post"
 ;  File "web\cgi-src\post\*.*"
-  SetOutPath "$INSTDIR\web\downloads"
-  File /nonfatal "web\downloads\*.php"
-  File /nonfatal "web\downloads\*.txt"
-  File /nonfatal "web\downloads\*.sh"
 SectionEnd
 
 Section "Documentation" SecDocumentation
@@ -341,14 +337,12 @@ Section "Uninstall"
 ;  Delete "$INSTDIR\web\cgi-src\math_sum\*.*"
 ;  Delete "$INSTDIR\web\cgi-src\post\*.*"
 ;  Delete "$INSTDIR\web\cgi-src\*.*"
-;  Delete "$INSTDIR\web\downloads\*.*"
 ;  Delete "$INSTDIR\system\*.*"
 ;  RMDir "$INSTDIR\web\"  
 ;  RMDir "$INSTDIR\system"
 ;  RMDir "$INSTDIR\web\cgi-bin"
 ;  RMDir "$INSTDIR\web\cgi-src\post"
 ;  RMDir "$INSTDIR\web\cgi-src\math_sum"
-;  RMDir "$INSTDIR\web\downloads"
 ;  RMDir "$INSTDIR\web\cgi-src"
  
   RMDir "$INSTDIR\languages"
diff --git a/myserver/SConstruct b/myserver/SConstruct
index bb7f16f..d6fb827 100644
--- a/myserver/SConstruct
+++ b/myserver/SConstruct
@@ -299,9 +299,6 @@ if command == "install" or command == "package":
     env.Install(destdir + "/web/cgi-bin", glob.glob("binaries/web/cgi-bin/*.readme"))
     env.Install(destdir + "/web/cgi-bin", glob.glob("binaries/web/cgi-bin/*.mscgi"))
     env.Install(destdir + "/web/logs", glob.glob("binaries/web/cgi-bin/.keepme"))
-    env.Install(destdir + "/web/downloads", glob.glob("binaries/web/downloads/*.txt"))
-    env.Install(destdir + "/web/downloads", glob.glob("binaries/web/downloads/*.php"))
-    env.Install(destdir + "/web/downloads", glob.glob("binaries/web/downloads/*.sh"))
     env.Install(destdir + "/documentation/english", glob.glob("documentation/english/index.htm"))
     env.Install(destdir + "/documentation/english/texts", glob.glob("documentation/english/texts/*.htm"))
     env.Install(destdir + "/documentation/english/style", glob.glob("documentation/english/style/*.css"))
diff --git a/myserver/binaries/web/Makefile.am b/myserver/binaries/web/Makefile.am
index cf26f49..0e36859 100644
--- a/myserver/binaries/web/Makefile.am
+++ b/myserver/binaries/web/Makefile.am
@@ -1,9 +1,8 @@
-
 if BUILD_MSCGI
 CGI_SRC = cgi-src
 endif
 
-SUBDIRS = cgi-bin $(CGI_SRC) downloads
+SUBDIRS = cgi-bin $(CGI_SRC)
 
 myserverdatadir = $(DESTDIR)/var/web
 
diff --git a/myserver/binaries/web/default.html b/myserver/binaries/web/default.html
index 007c9bd..089d053 100644
--- a/myserver/binaries/web/default.html
+++ b/myserver/binaries/web/default.html
@@ -2,53 +2,53 @@
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
 "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
-<head>
-<title>MyServer</title>
-<meta http-equiv="content-type" content="text/html;charset=UTF-8" />
-</head>
-<body style="color: #666699;">
+  <head>
+    <title>MyServer</title>
+    <meta http-equiv="content-type" content="text/html;charset=UTF-8" />
+  </head>
+  <body style="color: #666699;">
 
-<div style="text-align: center;">
-<h1><big>Congratulations!</big></h1>
-If you see this page, the GNU MyServer web server is working.
-<br />
-<br />
-GNU MyServer is <a href="http://www.gnu.org/philosophy/free-sw.html">Free
-Software</a> and it is distributed under
-the <a href="http://www.gnu.org/licenses/gpl.html">GPLv3</a> license
-terms.
-<br />
-<br />
-<br />
-To modify your web, just overwrite the files in the web directory with your 
-own or modify the virtual host configuration.
-<br />
-<br />
-<br />
-<a href="http://www.myserverproject.net"><img src="logo.png" alt="" 
-																							style="border: 0px;" /></a>
-<br />
-<br />
-GNU MyServer examples. <a href="link.html"><img src="goto.png" alt="" 
-																						style="border: 0px;" /></a>
-<br /><br />
-GNU MyServer documentation. 
-<a href="documentation/index.html"><img src="goto.png" alt=""
-																			 style="border: 0px;" /></a>
-<br />
-<br />
-<br />
-Visit the official <a href="http://www.gnu.org/software/myserver/">MyServer site</a> 
-for more information.
-</div>
+    <div style="text-align: center;">
+      <h1><big>Congratulations!</big></h1>
+      If you see this page, the GNU MyServer web server is working.
+      <br />
+      <br />
+      GNU MyServer is <a href="http://www.gnu.org/philosophy/free-sw.html">Free
+        Software</a> and it is distributed under
+      the <a href="http://www.gnu.org/licenses/gpl.html">GPLv3</a> license
+      terms.
+      <br />
+      <br />
+      <br />
+      To modify your web, just overwrite the files in the web directory with your
+      own or modify the virtual host configuration.
+      <br />
+      <br />
+      <br />
+      <a href="http://www.myserverproject.net"><img src="logo.png" alt=""
+																							      style="border: 0px;" /></a>
+      <br />
+      <br />
+      GNU MyServer examples. <a href="link.html"><img src="goto.png" alt=""
+																						          style="border: 0px;" /></a>
+      <br /><br />
+      GNU MyServer documentation.
+      <a href="documentation/index.html"><img src="goto.png" alt=""
+																			        style="border: 0px;" /></a>
+      <br />
+      <br />
+      <br />
+      Visit the official <a href="http://www.gnu.org/software/myserver/">MyServer site</a>
+      for more information.
+    </div>
 
-<br /><br />
+    <br /><br />
 
-<div style="position: absolute; bottom: 30px; text-align: center; width:99%">
-Please report any problem you may encounter with GNU MyServer to
-the <a href="mailto:bug-myserver@gnu.org">bug-myserver@gnu.org</a>
-mailing list.
-</div>
-<br />
-</body>
+    <div style="position: absolute; bottom: 30px; text-align: center; width:99%">
+      Please report any problem you may encounter with GNU MyServer to
+      the <a href="mailto:bug-myserver@gnu.org">bug-myserver@gnu.org</a>
+      mailing list.
+    </div>
+    <br />
+  </body>
 </html>
diff --git a/myserver/binaries/web/downloads/Makefile.am b/myserver/binaries/web/downloads/Makefile.am
deleted file mode 100644
index f88e79d..0000000
--- a/myserver/binaries/web/downloads/Makefile.am
+++ /dev/null
@@ -1,4 +0,0 @@
-myserverdatadir = $(DESTDIR)/var/web/downloads
-
-dist_myserverdata_DATA = hello.php script.sh file1.txt file2.txt
-
diff --git a/myserver/binaries/web/downloads/file1.txt b/myserver/binaries/web/downloads/file1.txt
deleted file mode 100644
index e1923af..0000000
--- a/myserver/binaries/web/downloads/file1.txt
+++ /dev/null
@@ -1 +0,0 @@
-Hello world!!!
diff --git a/myserver/binaries/web/downloads/file2.txt b/myserver/binaries/web/downloads/file2.txt
deleted file mode 100644
index d7b629f..0000000
--- a/myserver/binaries/web/downloads/file2.txt
+++ /dev/null
@@ -1,678 +0,0 @@
-MyServer is released under the terms of the GNU General Public License (GPL)
-with the additional exception that compiling, linking and using OpenSSL is
-allowed.
-
-		    GNU GENERAL PUBLIC LICENSE
-		       Version 3, 29 June 2007
-
- Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.
-
-			    Preamble
-
-  The GNU General Public License is a free, copyleft license for
-software and other kinds of works.
-
-  The licenses for most software and other practical works are designed
-to take away your freedom to share and change the works.  By contrast,
-the GNU General Public License is intended to guarantee your freedom to
-share and change all versions of a program--to make sure it remains free
-software for all its users.  We, the Free Software Foundation, use the
-GNU General Public License for most of our software; it applies also to
-any other work released this way by its authors.  You can apply it to
-your programs, too.
-
-  When we speak of free software, we are referring to freedom, not
-price.  Our General Public Licenses are designed to make sure that you
-have the freedom to distribute copies of free software (and charge for
-them if you wish), that you receive source code or can get it if you
-want it, that you can change the software or use pieces of it in new
-free programs, and that you know you can do these things.
-
-  To protect your rights, we need to prevent others from denying you
-these rights or asking you to surrender the rights.  Therefore, you have
-certain responsibilities if you distribute copies of the software, or if
-you modify it: responsibilities to respect the freedom of others.
-
-  For example, if you distribute copies of such a program, whether
-gratis or for a fee, you must pass on to the recipients the same
-freedoms that you received.  You must make sure that they, too, receive
-or can get the source code.  And you must show them these terms so they
-know their rights.
-
-  Developers that use the GNU GPL protect your rights with two steps:
-(1) assert copyright on the software, and (2) offer you this License
-giving you legal permission to copy, distribute and/or modify it.
-
-  For the developers' and authors' protection, the GPL clearly explains
-that there is no warranty for this free software.  For both users' and
-authors' sake, the GPL requires that modified versions be marked as
-changed, so that their problems will not be attributed erroneously to
-authors of previous versions.
-
-  Some devices are designed to deny users access to install or run
-modified versions of the software inside them, although the manufacturer
-can do so.  This is fundamentally incompatible with the aim of
-protecting users' freedom to change the software.  The systematic
-pattern of such abuse occurs in the area of products for individuals to
-use, which is precisely where it is most unacceptable.  Therefore, we
-have designed this version of the GPL to prohibit the practice for those
-products.  If such problems arise substantially in other domains, we
-stand ready to extend this provision to those domains in future versions
-of the GPL, as needed to protect the freedom of users.
-
-  Finally, every program is threatened constantly by software patents.
-States should not allow patents to restrict development and use of
-software on general-purpose computers, but in those that do, we wish to
-avoid the special danger that patents applied to a free program could
-make it effectively proprietary.  To prevent this, the GPL assures that
-patents cannot be used to render the program non-free.
-
-  The precise terms and conditions for copying, distribution and
-modification follow.
-
-		       TERMS AND CONDITIONS
-
-  0. Definitions.
-
-  "This License" refers to version 3 of the GNU General Public License.
-
-  "Copyright" also means copyright-like laws that apply to other kinds of
-works, such as semiconductor masks.
- 
-  "The Program" refers to any copyrightable work licensed under this
-License.  Each licensee is addressed as "you".  "Licensees" and
-"recipients" may be individuals or organizations.
-
-  To "modify" a work means to copy from or adapt all or part of the work
-in a fashion requiring copyright permission, other than the making of an
-exact copy.  The resulting work is called a "modified version" of the
-earlier work or a work "based on" the earlier work.
-
-  A "covered work" means either the unmodified Program or a work based
-on the Program.
-
-  To "propagate" a work means to do anything with it that, without
-permission, would make you directly or secondarily liable for
-infringement under applicable copyright law, except executing it on a
-computer or modifying a private copy.  Propagation includes copying,
-distribution (with or without modification), making available to the
-public, and in some countries other activities as well.
-
-  To "convey" a work means any kind of propagation that enables other
-parties to make or receive copies.  Mere interaction with a user through
-a computer network, with no transfer of a copy, is not conveying.
-
-  An interactive user interface displays "Appropriate Legal Notices"
-to the extent that it includes a convenient and prominently visible
-feature that (1) displays an appropriate copyright notice, and (2)
-tells the user that there is no warranty for the work (except to the
-extent that warranties are provided), that licensees may convey the
-work under this License, and how to view a copy of this License.  If
-the interface presents a list of user commands or options, such as a
-menu, a prominent item in the list meets this criterion.
-
-  1. Source Code.
-
-  The "source code" for a work means the preferred form of the work
-for making modifications to it.  "Object code" means any non-source
-form of a work.
-
-  A "Standard Interface" means an interface that either is an official
-standard defined by a recognized standards body, or, in the case of
-interfaces specified for a particular programming language, one that
-is widely used among developers working in that language.
-
-  The "System Libraries" of an executable work include anything, other
-than the work as a whole, that (a) is included in the normal form of
-packaging a Major Component, but which is not part of that Major
-Component, and (b) serves only to enable use of the work with that
-Major Component, or to implement a Standard Interface for which an
-implementation is available to the public in source code form.  A
-"Major Component", in this context, means a major essential component
-(kernel, window system, and so on) of the specific operating system
-(if any) on which the executable work runs, or a compiler used to
-produce the work, or an object code interpreter used to run it.
-
-  The "Corresponding Source" for a work in object code form means all
-the source code needed to generate, install, and (for an executable
-work) run the object code and to modify the work, including scripts to
-control those activities.  However, it does not include the work's
-System Libraries, or general-purpose tools or generally available free
-programs which are used unmodified in performing those activities but
-which are not part of the work.  For example, Corresponding Source
-includes interface definition files associated with source files for
-the work, and the source code for shared libraries and dynamically
-linked subprograms that the work is specifically designed to require,
-such as by intimate data communication or control flow between those
-subprograms and other parts of the work.
-
-  The Corresponding Source need not include anything that users
-can regenerate automatically from other parts of the Corresponding
-Source.
-
-  The Corresponding Source for a work in source code form is that
-same work.
-
-  2. Basic Permissions.
-
-  All rights granted under this License are granted for the term of
-copyright on the Program, and are irrevocable provided the stated
-conditions are met.  This License explicitly affirms your unlimited
-permission to run the unmodified Program.  The output from running a
-covered work is covered by this License only if the output, given its
-content, constitutes a covered work.  This License acknowledges your
-rights of fair use or other equivalent, as provided by copyright law.
-
-  You may make, run and propagate covered works that you do not
-convey, without conditions so long as your license otherwise remains
-in force.  You may convey covered works to others for the sole purpose
-of having them make modifications exclusively for you, or provide you
-with facilities for running those works, provided that you comply with
-the terms of this License in conveying all material for which you do
-not control copyright.  Those thus making or running the covered works
-for you must do so exclusively on your behalf, under your direction
-and control, on terms that prohibit them from making any copies of
-your copyrighted material outside their relationship with you.
-
-  Conveying under any other circumstances is permitted solely under
-the conditions stated below.  Sublicensing is not allowed; section 10
-makes it unnecessary.
-
-  3. Protecting Users' Legal Rights From Anti-Circumvention Law.
-
-  No covered work shall be deemed part of an effective technological
-measure under any applicable law fulfilling obligations under article
-11 of the WIPO copyright treaty adopted on 20 December 1996, or
-similar laws prohibiting or restricting circumvention of such
-measures.
-
-  When you convey a covered work, you waive any legal power to forbid
-circumvention of technological measures to the extent such circumvention
-is effected by exercising rights under this License with respect to
-the covered work, and you disclaim any intention to limit operation or
-modification of the work as a means of enforcing, against the work's
-users, your or third parties' legal rights to forbid circumvention of
-technological measures.
-
-  4. Conveying Verbatim Copies.
-
-  You may convey verbatim copies of the Program's source code as you
-receive it, in any medium, provided that you conspicuously and
-appropriately publish on each copy an appropriate copyright notice;
-keep intact all notices stating that this License and any
-non-permissive terms added in accord with section 7 apply to the code;
-keep intact all notices of the absence of any warranty; and give all
-recipients a copy of this License along with the Program.
-
-  You may charge any price or no price for each copy that you convey,
-and you may offer support or warranty protection for a fee.
-
-  5. Conveying Modified Source Versions.
-
-  You may convey a work based on the Program, or the modifications to
-produce it from the Program, in the form of source code under the
-terms of section 4, provided that you also meet all of these conditions:
-
-    a) The work must carry prominent notices stating that you modified
-    it, and giving a relevant date.
-
-    b) The work must carry prominent notices stating that it is
-    released under this License and any conditions added under section
-    7.  This requirement modifies the requirement in section 4 to
-    "keep intact all notices".
-
-    c) You must license the entire work, as a whole, under this
-    License to anyone who comes into possession of a copy.  This
-    License will therefore apply, along with any applicable section 7
-    additional terms, to the whole of the work, and all its parts,
-    regardless of how they are packaged.  This License gives no
-    permission to license the work in any other way, but it does not
-    invalidate such permission if you have separately received it.
-
-    d) If the work has interactive user interfaces, each must display
-    Appropriate Legal Notices; however, if the Program has interactive
-    interfaces that do not display Appropriate Legal Notices, your
-    work need not make them do so.
-
-  A compilation of a covered work with other separate and independent
-works, which are not by their nature extensions of the covered work,
-and which are not combined with it such as to form a larger program,
-in or on a volume of a storage or distribution medium, is called an
-"aggregate" if the compilation and its resulting copyright are not
-used to limit the access or legal rights of the compilation's users
-beyond what the individual works permit.  Inclusion of a covered work
-in an aggregate does not cause this License to apply to the other
-parts of the aggregate.
-
-  6. Conveying Non-Source Forms.
-
-  You may convey a covered work in object code form under the terms
-of sections 4 and 5, provided that you also convey the
-machine-readable Corresponding Source under the terms of this License,
-in one of these ways:
-
-    a) Convey the object code in, or embodied in, a physical product
-    (including a physical distribution medium), accompanied by the
-    Corresponding Source fixed on a durable physical medium
-    customarily used for software interchange.
-
-    b) Convey the object code in, or embodied in, a physical product
-    (including a physical distribution medium), accompanied by a
-    written offer, valid for at least three years and valid for as
-    long as you offer spare parts or customer support for that product
-    model, to give anyone who possesses the object code either (1) a
-    copy of the Corresponding Source for all the software in the
-    product that is covered by this License, on a durable physical
-    medium customarily used for software interchange, for a price no
-    more than your reasonable cost of physically performing this
-    conveying of source, or (2) access to copy the
-    Corresponding Source from a network server at no charge.
-
-    c) Convey individual copies of the object code with a copy of the
-    written offer to provide the Corresponding Source.  This
-    alternative is allowed only occasionally and noncommercially, and
-    only if you received the object code with such an offer, in accord
-    with subsection 6b.
-
-    d) Convey the object code by offering access from a designated
-    place (gratis or for a charge), and offer equivalent access to the
-    Corresponding Source in the same way through the same place at no
-    further charge.  You need not require recipients to copy the
-    Corresponding Source along with the object code.  If the place to
-    copy the object code is a network server, the Corresponding Source
-    may be on a different server (operated by you or a third party)
-    that supports equivalent copying facilities, provided you maintain
-    clear directions next to the object code saying where to find the
-    Corresponding Source.  Regardless of what server hosts the
-    Corresponding Source, you remain obligated to ensure that it is
-    available for as long as needed to satisfy these requirements.
-
-    e) Convey the object code using peer-to-peer transmission, provided
-    you inform other peers where the object code and Corresponding
-    Source of the work are being offered to the general public at no
-    charge under subsection 6d.
-
-  A separable portion of the object code, whose source code is excluded
-from the Corresponding Source as a System Library, need not be
-included in conveying the object code work.
-
-  A "User Product" is either (1) a "consumer product", which means any
-tangible personal property which is normally used for personal, family,
-or household purposes, or (2) anything designed or sold for incorporation
-into a dwelling.  In determining whether a product is a consumer product,
-doubtful cases shall be resolved in favor of coverage.  For a particular
-product received by a particular user, "normally used" refers to a
-typical or common use of that class of product, regardless of the status
-of the particular user or of the way in which the particular user
-actually uses, or expects or is expected to use, the product.  A product
-is a consumer product regardless of whether the product has substantial
-commercial, industrial or non-consumer uses, unless such uses represent
-the only significant mode of use of the product.
-
-  "Installation Information" for a User Product means any methods,
-procedures, authorization keys, or other information required to install
-and execute modified versions of a covered work in that User Product from
-a modified version of its Corresponding Source.  The information must
-suffice to ensure that the continued functioning of the modified object
-code is in no case prevented or interfered with solely because
-modification has been made.
-
-  If you convey an object code work under this section in, or with, or
-specifically for use in, a User Product, and the conveying occurs as
-part of a transaction in which the right of possession and use of the
-User Product is transferred to the recipient in perpetuity or for a
-fixed term (regardless of how the transaction is characterized), the
-Corresponding Source conveyed under this section must be accompanied
-by the Installation Information.  But this requirement does not apply
-if neither you nor any third party retains the ability to install
-modified object code on the User Product (for example, the work has
-been installed in ROM).
-
-  The requirement to provide Installation Information does not include a
-requirement to continue to provide support service, warranty, or updates
-for a work that has been modified or installed by the recipient, or for
-the User Product in which it has been modified or installed.  Access to a
-network may be denied when the modification itself materially and
-adversely affects the operation of the network or violates the rules and
-protocols for communication across the network.
-
-  Corresponding Source conveyed, and Installation Information provided,
-in accord with this section must be in a format that is publicly
-documented (and with an implementation available to the public in
-source code form), and must require no special password or key for
-unpacking, reading or copying.
-
-  7. Additional Terms.
-
-  "Additional permissions" are terms that supplement the terms of this
-License by making exceptions from one or more of its conditions.
-Additional permissions that are applicable to the entire Program shall
-be treated as though they were included in this License, to the extent
-that they are valid under applicable law.  If additional permissions
-apply only to part of the Program, that part may be used separately
-under those permissions, but the entire Program remains governed by
-this License without regard to the additional permissions.
-
-  When you convey a copy of a covered work, you may at your option
-remove any additional permissions from that copy, or from any part of
-it.  (Additional permissions may be written to require their own
-removal in certain cases when you modify the work.)  You may place
-additional permissions on material, added by you to a covered work,
-for which you have or can give appropriate copyright permission.
-
-  Notwithstanding any other provision of this License, for material you
-add to a covered work, you may (if authorized by the copyright holders of
-that material) supplement the terms of this License with terms:
-
-    a) Disclaiming warranty or limiting liability differently from the
-    terms of sections 15 and 16 of this License; or
-
-    b) Requiring preservation of specified reasonable legal notices or
-    author attributions in that material or in the Appropriate Legal
-    Notices displayed by works containing it; or
-
-    c) Prohibiting misrepresentation of the origin of that material, or
-    requiring that modified versions of such material be marked in
-    reasonable ways as different from the original version; or
-
-    d) Limiting the use for publicity purposes of names of licensors or
-    authors of the material; or
-
-    e) Declining to grant rights under trademark law for use of some
-    trade names, trademarks, or service marks; or
-
-    f) Requiring indemnification of licensors and authors of that
-    material by anyone who conveys the material (or modified versions of
-    it) with contractual assumptions of liability to the recipient, for
-    any liability that these contractual assumptions directly impose on
-    those licensors and authors.
-
-  All other non-permissive additional terms are considered "further
-restrictions" within the meaning of section 10.  If the Program as you
-received it, or any part of it, contains a notice stating that it is
-governed by this License along with a term that is a further
-restriction, you may remove that term.  If a license document contains
-a further restriction but permits relicensing or conveying under this
-License, you may add to a covered work material governed by the terms
-of that license document, provided that the further restriction does
-not survive such relicensing or conveying.
-
-  If you add terms to a covered work in accord with this section, you
-must place, in the relevant source files, a statement of the
-additional terms that apply to those files, or a notice indicating
-where to find the applicable terms.
-
-  Additional terms, permissive or non-permissive, may be stated in the
-form of a separately written license, or stated as exceptions;
-the above requirements apply either way.
-
-  8. Termination.
-
-  You may not propagate or modify a covered work except as expressly
-provided under this License.  Any attempt otherwise to propagate or
-modify it is void, and will automatically terminate your rights under
-this License (including any patent licenses granted under the third
-paragraph of section 11).
-
-  However, if you cease all violation of this License, then your
-license from a particular copyright holder is reinstated (a)
-provisionally, unless and until the copyright holder explicitly and
-finally terminates your license, and (b) permanently, if the copyright
-holder fails to notify you of the violation by some reasonable means
-prior to 60 days after the cessation.
-
-  Moreover, your license from a particular copyright holder is
-reinstated permanently if the copyright holder notifies you of the
-violation by some reasonable means, this is the first time you have
-received notice of violation of this License (for any work) from that
-copyright holder, and you cure the violation prior to 30 days after
-your receipt of the notice.
-
-  Termination of your rights under this section does not terminate the
-licenses of parties who have received copies or rights from you under
-this License.  If your rights have been terminated and not permanently
-reinstated, you do not qualify to receive new licenses for the same
-material under section 10.
-
-  9. Acceptance Not Required for Having Copies.
-
-  You are not required to accept this License in order to receive or
-run a copy of the Program.  Ancillary propagation of a covered work
-occurring solely as a consequence of using peer-to-peer transmission
-to receive a copy likewise does not require acceptance.  However,
-nothing other than this License grants you permission to propagate or
-modify any covered work.  These actions infringe copyright if you do
-not accept this License.  Therefore, by modifying or propagating a
-covered work, you indicate your acceptance of this License to do so.
-
-  10. Automatic Licensing of Downstream Recipients.
-
-  Each time you convey a covered work, the recipient automatically
-receives a license from the original licensors, to run, modify and
-propagate that work, subject to this License.  You are not responsible
-for enforcing compliance by third parties with this License.
-
-  An "entity transaction" is a transaction transferring control of an
-organization, or substantially all assets of one, or subdividing an
-organization, or merging organizations.  If propagation of a covered
-work results from an entity transaction, each party to that
-transaction who receives a copy of the work also receives whatever
-licenses to the work the party's predecessor in interest had or could
-give under the previous paragraph, plus a right to possession of the
-Corresponding Source of the work from the predecessor in interest, if
-the predecessor has it or can get it with reasonable efforts.
-
-  You may not impose any further restrictions on the exercise of the
-rights granted or affirmed under this License.  For example, you may
-not impose a license fee, royalty, or other charge for exercise of
-rights granted under this License, and you may not initiate litigation
-(including a cross-claim or counterclaim in a lawsuit) alleging that
-any patent claim is infringed by making, using, selling, offering for
-sale, or importing the Program or any portion of it.
-
-  11. Patents.
-
-  A "contributor" is a copyright holder who authorizes use under this
-License of the Program or a work on which the Program is based.  The
-work thus licensed is called the contributor's "contributor version".
-
-  A contributor's "essential patent claims" are all patent claims
-owned or controlled by the contributor, whether already acquired or
-hereafter acquired, that would be infringed by some manner, permitted
-by this License, of making, using, or selling its contributor version,
-but do not include claims that would be infringed only as a
-consequence of further modification of the contributor version.  For
-purposes of this definition, "control" includes the right to grant
-patent sublicenses in a manner consistent with the requirements of
-this License.
-
-  Each contributor grants you a non-exclusive, worldwide, royalty-free
-patent license under the contributor's essential patent claims, to
-make, use, sell, offer for sale, import and otherwise run, modify and
-propagate the contents of its contributor version.
-
-  In the following three paragraphs, a "patent license" is any express
-agreement or commitment, however denominated, not to enforce a patent
-(such as an express permission to practice a patent or covenant not to
-sue for patent infringement).  To "grant" such a patent license to a
-party means to make such an agreement or commitment not to enforce a
-patent against the party.
-
-  If you convey a covered work, knowingly relying on a patent license,
-and the Corresponding Source of the work is not available for anyone
-to copy, free of charge and under the terms of this License, through a
-publicly available network server or other readily accessible means,
-then you must either (1) cause the Corresponding Source to be so
-available, or (2) arrange to deprive yourself of the benefit of the
-patent license for this particular work, or (3) arrange, in a manner
-consistent with the requirements of this License, to extend the patent
-license to downstream recipients.  "Knowingly relying" means you have
-actual knowledge that, but for the patent license, your conveying the
-covered work in a country, or your recipient's use of the covered work
-in a country, would infringe one or more identifiable patents in that
-country that you have reason to believe are valid.
-  
-  If, pursuant to or in connection with a single transaction or
-arrangement, you convey, or propagate by procuring conveyance of, a
-covered work, and grant a patent license to some of the parties
-receiving the covered work authorizing them to use, propagate, modify
-or convey a specific copy of the covered work, then the patent license
-you grant is automatically extended to all recipients of the covered
-work and works based on it.
-
-  A patent license is "discriminatory" if it does not include within
-the scope of its coverage, prohibits the exercise of, or is
-conditioned on the non-exercise of one or more of the rights that are
-specifically granted under this License.  You may not convey a covered
-work if you are a party to an arrangement with a third party that is
-in the business of distributing software, under which you make payment
-to the third party based on the extent of your activity of conveying
-the work, and under which the third party grants, to any of the
-parties who would receive the covered work from you, a discriminatory
-patent license (a) in connection with copies of the covered work
-conveyed by you (or copies made from those copies), or (b) primarily
-for and in connection with specific products or compilations that
-contain the covered work, unless you entered into that arrangement,
-or that patent license was granted, prior to 28 March 2007.
-
-  Nothing in this License shall be construed as excluding or limiting
-any implied license or other defenses to infringement that may
-otherwise be available to you under applicable patent law.
-
-  12. No Surrender of Others' Freedom.
-
-  If conditions are imposed on you (whether by court order, agreement or
-otherwise) that contradict the conditions of this License, they do not
-excuse you from the conditions of this License.  If you cannot convey a
-covered work so as to satisfy simultaneously your obligations under this
-License and any other pertinent obligations, then as a consequence you may
-not convey it at all.  For example, if you agree to terms that obligate you
-to collect a royalty for further conveying from those to whom you convey
-the Program, the only way you could satisfy both those terms and this
-License would be to refrain entirely from conveying the Program.
-
-  13. Use with the GNU Affero General Public License.
-
-  Notwithstanding any other provision of this License, you have
-permission to link or combine any covered work with a work licensed
-under version 3 of the GNU Affero General Public License into a single
-combined work, and to convey the resulting work.  The terms of this
-License will continue to apply to the part which is the covered work,
-but the special requirements of the GNU Affero General Public License,
-section 13, concerning interaction through a network will apply to the
-combination as such.
-
-  14. Revised Versions of this License.
-
-  The Free Software Foundation may publish revised and/or new versions of
-the GNU General Public License from time to time.  Such new versions will
-be similar in spirit to the present version, but may differ in detail to
-address new problems or concerns.
-
-  Each version is given a distinguishing version number.  If the
-Program specifies that a certain numbered version of the GNU General
-Public License "or any later version" applies to it, you have the
-option of following the terms and conditions either of that numbered
-version or of any later version published by the Free Software
-Foundation.  If the Program does not specify a version number of the
-GNU General Public License, you may choose any version ever published
-by the Free Software Foundation.
-
-  If the Program specifies that a proxy can decide which future
-versions of the GNU General Public License can be used, that proxy's
-public statement of acceptance of a version permanently authorizes you
-to choose that version for the Program.
-
-  Later license versions may give you additional or different
-permissions.  However, no additional obligations are imposed on any
-author or copyright holder as a result of your choosing to follow a
-later version.
-
-  15. Disclaimer of Warranty.
-
-  THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
-APPLICABLE LAW.  EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
-HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
-OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
-THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-PURPOSE.  THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
-IS WITH YOU.  SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
-ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
-
-  16. Limitation of Liability.
-
-  IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
-WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
-THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
-GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
-USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
-DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
-PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
-EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
-SUCH DAMAGES.
-
-  17. Interpretation of Sections 15 and 16.
-
-  If the disclaimer of warranty and limitation of liability provided
-above cannot be given local legal effect according to their terms,
-reviewing courts shall apply local law that most closely approximates
-an absolute waiver of all civil liability in connection with the
-Program, unless a warranty or assumption of liability accompanies a
-copy of the Program in return for a fee.
-
-		     END OF TERMS AND CONDITIONS
-
-	    How to Apply These Terms to Your New Programs
-
-  If you develop a new program, and you want it to be of the greatest
-possible use to the public, the best way to achieve this is to make it
-free software which everyone can redistribute and change under these terms.
-
-  To do so, attach the following notices to the program.  It is safest
-to attach them to the start of each source file to most effectively
-state the exclusion of warranty; and each file should have at least
-the "copyright" line and a pointer to where the full notice is found.
-
-    <one line to give the program's name and a brief idea of what it does.>
-    Copyright (C) <year>  <name of author>
-
-    This program 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 3 of the License, or
-    (at your option) any later version.
-
-    This program is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-    GNU General Public License for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with this program.  If not, see <http://www.gnu.org/licenses/>.
-
-Also add information on how to contact you by electronic and paper mail.
-
-  If the program does terminal interaction, make it output a short
-notice like this when it starts in an interactive mode:
-
-    <program>  Copyright (C) <year>  <name of author>
-    This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
-    This is free software, and you are welcome to redistribute it
-    under certain conditions; type `show c' for details.
-
-The hypothetical commands `show w' and `show c' should show the appropriate
-parts of the General Public License.  Of course, your program's commands
-might be different; for a GUI interface, you would use an "about box".
-
-  You should also get your employer (if you work as a programmer) or school,
-if any, to sign a "copyright disclaimer" for the program, if necessary.
-For more information on this, and how to apply and follow the GNU GPL, see
-<http://www.gnu.org/licenses/>.
-
-  The GNU General Public License does not permit incorporating your program
-into proprietary programs.  If your program is a subroutine library, you
-may consider it more useful to permit linking proprietary applications with
-the library.  If this is what you want to do, use the GNU Lesser General
-Public License instead of this License.  But first, please read
-<http://www.gnu.org/philosophy/why-not-lgpl.html>.
\ No newline at end of file
diff --git a/myserver/binaries/web/downloads/hello.php b/myserver/binaries/web/downloads/hello.php
deleted file mode 100644
index 675bf33..0000000
--- a/myserver/binaries/web/downloads/hello.php
+++ /dev/null
@@ -1,53 +0,0 @@
-<?php
-if(isset($_GET['showsource']))
-{
-	show_source(__FILE__);
-}
-else
-{
-print ('<?xml version="1.0" encoding="UTF-8" ?>');
-print ("\n".'<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"'."\n".'"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">'."\n");
-print ('<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
-<head>
-<title>MyServer - Hello World PHP Example</title>
-<meta http-equiv="content-type" content="text/html;charset=UTF-8" />
-<style type="text/css">
-body {font-family: verdana, arial, helvetica, tahoma, sans-serif;}
-a {color: #666699; text-decoration: none;}
-table{border: 1px solid #666699;}
-.center {text-align: center;}
-.right {text-align: right;}
-.italic {font-style: italic;}
-.bold {font-weight: bold;}
-</style>
-</head>
-<body style="color: #666699;">
-<div class="center">
-<big>MyServer - Hello World PHP Example</big>
-<br /><br />
-<a href="http://www.myserverproject.net"><img src="/icons/logo.png" alt="" style="border: 0px;" /></a>
-<div class="right">
-<small>
-<a href="?showsource">Show Source</a>
-</small>
-</div>
-<table width="100%" class="center">
-<tr>
-<td>');
-
-print('Hello world from a PHP page!');
-print ('<br /><br />'.getenv("SERVER_SOFTWARE").' on '.getenv("SERVER_NAME").' Port '.getenv("SERVER_PORT")."\n");
-print ('<br />Connected via <span class="italic">'.getenv("SERVER_PROTOCOL").'</span>');
-if(getenv("QUERY_STRING"))
-{
-	print('<br /><br />Query string: '.getenv("QUERY_STRING"));	
-}
-print("\r\n");
-
-print ('</td></tr>
-</table>
-</div>
-</body>
-</html>');
-}
-?>
\ No newline at end of file
diff --git a/myserver/binaries/web/downloads/listdirectory.php b/myserver/binaries/web/downloads/listdirectory.php
deleted file mode 100644
index b7a186b..0000000
--- a/myserver/binaries/web/downloads/listdirectory.php
+++ /dev/null
@@ -1,89 +0,0 @@
-<?php
-if(isset($_GET['showsource']))
-{
-	show_source(__FILE__);
-}
-else
-{
-print ('<?xml version="1.0" encoding="UTF-8" ?>');
-print ("\n".'<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"'."\n".'"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">'."\n");
-print ('<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
-<head>
-<title>MyServer - PHP Directory Listing Example</title>
-<meta http-equiv="content-type" content="text/html;charset=UTF-8" />
-<style type="text/css">
-body {font-family: verdana, arial, helvetica, tahoma, sans-serif;}
-a {color: #666699; text-decoration: none;}
-table{border: 1px solid #666699;}
-.center {text-align: center;}
-.right {text-align: right;}
-.italic {font-style: italic;}
-.bold {font-weight: bold;}
-</style>
-</head>
-<body style="color: #666699;">
-<div class="center">
-<big>MyServer - PHP Directory Listing Example</big>
-<br /><br />
-<a href="http://www.myserverproject.net"><img src="/icons/logo.png" alt="" style="border: 0px;" /></a>
-<br /><br />
-Contents of <span class="bold">downloads</span><br />
-<div class="right">
-<small>
-<a href="?showsource">Show Source</a>
-</small>
-</div>
-<table width="100%" class="center">
-<tr class="bold">
-<td>type</td>
-<td>name</td>
-<td>read</td>
-<td>write</td>
-<td>exec</td>
-<td><a href="http://www.php.net/fileatime">fileatime()</a></td>
-<td><a href="http://www.php.net/filemtime">filemtime()</a></td>
-<td><a href="http://www.php.net/filectime">filectime()</a></td>
-</tr>');
-
-$directory="./";
-$dh=opendir($directory);
-while(!is_bool($file=readdir($dh)))
-{
-	print "<tr>";
-
-	if(is_dir("$directory/$file"))
-		print "<td>[dir]</td>";
-	else print "<td></td>";
-
-	
-	print "<td><a href=\"$file\">$file</a></td>";
-
-	if(is_readable($file))		print "<td>r</td>";	else print "<td></td>";
-	if(is_writable($file))		print "<td>w</td>";	else print "<td></td>";
-  if(is_executable($file))	print "<td>x</td>";	else print "<td></td>";
-
-	print "<td>".date("D d M Y g:i A T",fileatime($file))."</td>";
-	print "<td>".date("D d M Y g:i A T",filemtime($file))."</td>";
-	print "<td>".date("D d M Y g:i A T",filectime($file))."</td>";
-	print "</tr>";
-}
-closedir($dh);
-
-print ('</table>
-<div class="right">
-<small>');
-
-$myserver=getenv("SERVER_SIGNATURE");
-preg_replace('@<address>.*?</address>@si','',$myserver);
-
-print ($myserver.'</small>
-</div>'."\n");
-
-print ('<br />'.getenv("SERVER_SOFTWARE").' on '.getenv("SERVER_NAME").' Port '.getenv("SERVER_PORT")."\n");
-print ('<br />Connected via <span class="italic">'.getenv("SERVER_PROTOCOL").'</span>');
-print ('
-</div>
-</body>
-</html>');
-}
-?>
diff --git a/myserver/binaries/web/downloads/phpinfo.php b/myserver/binaries/web/downloads/phpinfo.php
deleted file mode 100644
index cd5a076..0000000
--- a/myserver/binaries/web/downloads/phpinfo.php
+++ /dev/null
@@ -1,68 +0,0 @@
-<?php
-if(isset($_GET['showsource']))
-{
-	show_source(__FILE__);
-}
-else
-{
-	print ('<?xml version="1.0" encoding="UTF-8" ?>');
-	print ("\n".'<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"'."\n".'"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">'."\n");
-	print ('<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
-	<head>
-	<title>MyServer - phpinfo() PHP Example</title>
-	<meta http-equiv="content-type" content="text/html;charset=UTF-8" />
-	<style type="text/css">
-	body {background-color: #ffffff; color: #666699;}
-	body, td, th, h1, h2 {font-family: verdana,arial,helvetica,tahoma,sans-serif;}
-	pre {margin: 0px; font-family: monospace;}
-	a {color: #666699;}
-	a:link {color: #666699; text-decoration: none; background-color: #ffffff;}
-	a:hover {text-decoration: underline;}
-	table {border-collapse: collapse;}
-	.center {text-align: center;}
-	.center table {margin-left: auto; margin-right: auto; text-align: left;}
-	.center th {text-align: center !important;}
-	.right {text-align: right;}
-	td, th { border: 1px solid #666699; font-size: 75%; vertical-align: baseline;}
-	h1 {font-size: 150%;}
-	h2 {font-size: 125%;}
-	.p {text-align: left;}
-	.e {background-color: #666699; font-weight: bold; color: #ffffff;}
-	.h {background-color: #666699; font-weight: bold; color: #ffffff;}
-	.v {background-color: #ffffff; color: #666699;}
-	i {color: #ffffff; background-color: #666699;}
-	img {float: right; border: 0px;}
-	hr {width: 600px; background-color: #666699; border: 0px; height: 1px; color: #666699;}
-	</style>
-	<div class="center">');
-
-
-	if($_SERVER['REMOTE_ADDR'] == "127.0.0.1" || 
-		 $_SERVER['REMOTE_ADDR'] == "::1")
-	{
-		ob_start();
-		phpinfo();
-		$php_info = ob_get_contents();
-		ob_end_clean();
-		$php_info    = str_replace(" width=\"600\"", " width=\"600\"", $php_info);
-		$php_info    = str_replace("</body></html>", "", $php_info);
-		$offset      = strpos($php_info, "<table");
-		print('<div class="right">
-		<small>
-		<a href="?showsource" style="text-decoration: none;">Show Source</a>
-		</small>
-		</div>');
-		print substr($php_info, $offset);
-	}
-
-	else
-	{
-		print "This page is only accessible locally!";
-	}
-
-	print('
-	</div>
-	</body>
-	</html>');
-}
-?>
\ No newline at end of file
diff --git a/myserver/binaries/web/downloads/script.sh b/myserver/binaries/web/downloads/script.sh
deleted file mode 100755
index ffa6fdf..0000000
--- a/myserver/binaries/web/downloads/script.sh
+++ /dev/null
@@ -1,2 +0,0 @@
-#!/bin/sh
-echo Hello world from a sh UNIX script 
diff --git a/myserver/binaries/web/link.html b/myserver/binaries/web/link.html
index e821f3b..411d992 100644
--- a/myserver/binaries/web/link.html
+++ b/myserver/binaries/web/link.html
@@ -2,21 +2,31 @@
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
 "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
-<head>
-<title>MyServer</title>
-<meta http-equiv="content-type" content="text/html;charset=UTF-8" />
-</head>
-<body style="color: #666699;">
+  <head>
+    <title>MyServer</title>
+    <meta http-equiv="content-type" content="text/html;charset=UTF-8" />
+  </head>
+  <body style="color: #666699;">
+
 <div style="text-align: center;">
-<br />
-Here are some examples, to show how MyServer works:<br /><br />
-<a href="http://www.myserverproject.net"><img src="logo.png" alt="" style="border: 0px;" /></a><br /><br />
-MyServer CGI samples(MSCGI)<a href="cgi-bin/"><img src="goto.png" alt="" style="border: 0px;" /></a><br /><br />
-Browse a directory<a href="downloads/"><img src="goto.png" alt="" style="border: 0px;" /></a><br /><br />
-Browse Icons directory<a href="/sys/icons/"><img src="goto.png" alt="" style="border: 0px;" /></a><br /><br />
-Simulate a 404 error page (This file is not present on the file system)
-<a href="itisnthere.html"><img src="goto.png" alt="" style="border: 0px;" /></a>
+  <br />
+  Here are some examples, to show how MyServer works:
+  <br />
+  <br />
+  <a href="http://www.myserverproject.net">
+    <img src="logo.png" alt="" style="border: 0px;" /></a>
+  <br />
+  <br />
+  MyServer CGI samples(MSCGI)<a href="cgi-bin/"><img src="goto.png" alt="" style="border: 0px;" /></a>
+  <br />
+  <br />
+  Browse Icons directory<a href="/sys/icons/"><img src="goto.png" alt="" style="border: 0px;" /></a>
+  <br />
+  <br />
+  Simulate a 404 error page (This file is not present on the file system)<a href="itisnthere.html">
+    <img src="goto.png" alt="" style="border: 0px;" /></a>
 </div>
+
 <br />
 <br />
 <br />
@@ -24,13 +34,15 @@ Simulate a 404 error page (This file is not present on the file system)
 <br />
 <br />
 <br />
+
 <p>
-<div style="position: fixed; bottom: 10px; text-align: center; width:100%">
-If you are interested to write other examples for MyServer, 
-including PHP, Perl and any sort of script pages.<br />
-Please contact the MyServer Project developers and let us know 
-about your samples.
-</div>
+  <div style="position: fixed; bottom: 10px; text-align: center; width:100%">
+    If you are interested to write other examples for MyServer,
+    including PHP, Perl and any sort of script pages.<br />
+    Please contact the MyServer Project developers and let us know
+    about your samples.
+  </div>
 </p>
-</body>
+
+  </body>
 </html>
diff --git a/myserver/configure.in b/myserver/configure.in
index 8120b75..5d33249 100644
--- a/myserver/configure.in
+++ b/myserver/configure.in
@@ -331,7 +331,6 @@ AC_CONFIG_FILES([
     binaries/languages/Makefile
     binaries/languages/configure/Makefile
     binaries/web/Makefile
-    binaries/web/downloads/Makefile
     binaries/web/cgi-bin/Makefile
     binaries/web/cgi-src/Makefile
     binaries/web/cgi-src/post/Makefile



commit 9b969b4b889ea80d9a4156e84a75802cd88d1bb4
Author: Giuseppe Scrivano <gscrivano@gnu.org>
Date:   Sun Aug 9 19:24:02 2009 +0200

    The myserver-daemon script is an executable.

diff --git a/myserver/binaries/myserver-daemon b/myserver/binaries/myserver-daemon
old mode 100644
new mode 100755
index e1a8089..b558939
--- a/myserver/binaries/myserver-daemon
+++ b/myserver/binaries/myserver-daemon
@@ -19,8 +19,6 @@
 #
 # This file should be placed in /etc/init.d
 #
-# please do a chmod +x on the file
-#
 set -e
 
 PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin

-----------------------------------------------------------------------

Summary of changes:
 misc/wingen/NSIS installer script.nsi             |    6 -
 myserver/SConstruct                               |    3 -
 myserver/binaries/myserver-daemon                 |    2 -
 myserver/binaries/web/Makefile.am                 |    3 +-
 myserver/binaries/web/cgi-bin/default.html        |   46 +-
 myserver/binaries/web/default.html                |   92 ++--
 myserver/binaries/web/downloads/Makefile.am       |    4 -
 myserver/binaries/web/downloads/file1.txt         |    1 -
 myserver/binaries/web/downloads/file2.txt         |  678 ---------------------
 myserver/binaries/web/downloads/hello.php         |   53 --
 myserver/binaries/web/downloads/listdirectory.php |   89 ---
 myserver/binaries/web/downloads/phpinfo.php       |   68 --
 myserver/binaries/web/downloads/script.sh         |    2 -
 myserver/binaries/web/link.html                   |   57 ++-
 myserver/configure.in                             |    1 -
 15 files changed, 108 insertions(+), 997 deletions(-)
 mode change 100644 => 100755 myserver/binaries/myserver-daemon
 delete mode 100644 myserver/binaries/web/downloads/Makefile.am
 delete mode 100644 myserver/binaries/web/downloads/file1.txt
 delete mode 100644 myserver/binaries/web/downloads/file2.txt
 delete mode 100644 myserver/binaries/web/downloads/hello.php
 delete mode 100644 myserver/binaries/web/downloads/listdirectory.php
 delete mode 100644 myserver/binaries/web/downloads/phpinfo.php
 delete mode 100755 myserver/binaries/web/downloads/script.sh


hooks/post-receive
-- 
GNU MyServer



From MAILER-DAEMON Mon Aug 10 13:22:28 2009
Received: from mailman by lists.gnu.org with archive (Exim 4.43)
	id 1MaYZn-0007xX-V7
	for mharc-myserver-commit@gnu.org; Mon, 10 Aug 2009 13:22:28 -0400
Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43)
	id 1MaYZm-0007wE-5T
	for myserver-commit@gnu.org; Mon, 10 Aug 2009 13:22:26 -0400
Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43)
	id 1MaYZl-0007vs-J1
	for myserver-commit@gnu.org; Mon, 10 Aug 2009 13:22:25 -0400
Received: from [199.232.76.173] (port=52533 helo=monty-python.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43) id 1MaYZl-0007vo-Aa
	for myserver-commit@gnu.org; Mon, 10 Aug 2009 13:22:25 -0400
Received: from savannah.gnu.org ([199.232.41.3]:48470 helo=sv.gnu.org)
	by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32)
	(Exim 4.60) (envelope-from <gscrivano@gnu.org>) id 1MaYZk-00088h-TX
	for myserver-commit@gnu.org; Mon, 10 Aug 2009 13:22:25 -0400
Received: from download.savannah.gnu.org ([199.232.41.75]
	helo=cvs.savannah.gnu.org) by sv.gnu.org with esmtp (Exim 4.69)
	(envelope-from <gscrivano@gnu.org>) id 1MaYZk-0007M9-2m
	for myserver-commit@gnu.org; Mon, 10 Aug 2009 17:22:24 +0000
Received: from gscrivano by cvs.savannah.gnu.org with local (Exim 4.69)
	(envelope-from <gscrivano@savannah.gnu.org>) id 1MaYZg-0007Kg-I4
	for myserver-commit@gnu.org; Mon, 10 Aug 2009 17:22:23 +0000
To: myserver-commit@gnu.org
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: 4a135eca140c55ec140ec1cf408b1dc17d353fac
X-Git-Newrev: 60e8616f339d31bfffc23698b0233efc55556119
Message-Id: <E1MaYZg-0007Kg-I4@cvs.savannah.gnu.org>
From: Giuseppe Scrivano <gscrivano@gnu.org>
Date: Mon, 10 Aug 2009 17:22:22 +0000
X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2)
Subject: [myserver-commit] [SCM] GNU MyServer branch, master,
	updated. 60e8616f339d31bfffc23698b0233efc55556119
X-BeenThere: myserver-commit@gnu.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: myserver-commit.gnu.org
List-Unsubscribe: <http://lists.gnu.org/mailman/listinfo/myserver-commit>,
	<mailto:myserver-commit-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/pipermail/myserver-commit>
List-Post: <mailto:myserver-commit@gnu.org>
List-Help: <mailto:myserver-commit-request@gnu.org?subject=help>
List-Subscribe: <http://lists.gnu.org/mailman/listinfo/myserver-commit>,
	<mailto:myserver-commit-request@gnu.org?subject=subscribe>
X-List-Received-Date: Mon, 10 Aug 2009 17:22:26 -0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU MyServer".

The branch, master has been updated
       via  60e8616f339d31bfffc23698b0233efc55556119 (commit)
      from  4a135eca140c55ec140ec1cf408b1dc17d353fac (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------


commit 60e8616f339d31bfffc23698b0233efc55556119
Author: Giuseppe Scrivano <gscrivano@gnu.org>
Date:   Mon Aug 10 18:47:46 2009 +0200

    Bump version to 0.9.

diff --git a/misc/wingen/NSIS installer script.nsi b/misc/wingen/NSIS installer script.nsi
index 39debaf..d66e08c 100644
--- a/misc/wingen/NSIS installer script.nsi	
+++ b/misc/wingen/NSIS installer script.nsi	
@@ -5,7 +5,7 @@
 SetCompressor /SOLID lzma
 
 Name "MyServer"
-OutFile "MyServer-win32-0.9.0.exe"
+OutFile "MyServer-win32-0.9.exe"
 
 ; Versioning Information
 VIProductVersion "0.9.0.3"
diff --git a/myserver/version b/myserver/version
index 984acb4..9a7d84f 100644
--- a/myserver/version
+++ b/myserver/version
@@ -1 +1 @@
-0.9.0-rc2
\ No newline at end of file
+0.9
\ No newline at end of file

-----------------------------------------------------------------------

Summary of changes:
 misc/wingen/NSIS installer script.nsi |    2 +-
 myserver/version                      |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)


hooks/post-receive
-- 
GNU MyServer



From MAILER-DAEMON Mon Aug 10 14:06:09 2009
Received: from mailman by lists.gnu.org with archive (Exim 4.43)
	id 1MaZG5-0007Dv-Lh
	for mharc-myserver-commit@gnu.org; Mon, 10 Aug 2009 14:06:09 -0400
Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43)
	id 1MaZG2-0007BZ-Gv
	for myserver-commit@gnu.org; Mon, 10 Aug 2009 14:06:06 -0400
Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43)
	id 1MaZG1-0007AK-It
	for myserver-commit@gnu.org; Mon, 10 Aug 2009 14:06:05 -0400
Received: from [199.232.76.173] (port=48591 helo=monty-python.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43) id 1MaZG1-0007A9-Bh
	for myserver-commit@gnu.org; Mon, 10 Aug 2009 14:06:05 -0400
Received: from savannah.gnu.org ([199.232.41.3]:44419 helo=sv.gnu.org)
	by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32)
	(Exim 4.60) (envelope-from <imoryc@gmail.com>) id 1MaZG0-0003Y0-Ve
	for myserver-commit@gnu.org; Mon, 10 Aug 2009 14:06:05 -0400
Received: from download.savannah.gnu.org ([199.232.41.75]
	helo=cvs.savannah.gnu.org) by sv.gnu.org with esmtp (Exim 4.69)
	(envelope-from <imoryc@gmail.com>) id 1MaZFz-0002dz-Sg
	for myserver-commit@gnu.org; Mon, 10 Aug 2009 18:06:03 +0000
Received: from ignacy by cvs.savannah.gnu.org with local (Exim 4.69)
	(envelope-from <ignacy@savannah.gnu.org>) id 1MaZFz-0002dX-J1
	for myserver-commit@gnu.org; Mon, 10 Aug 2009 18:06:03 +0000
To: myserver-commit@gnu.org
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: 60e8616f339d31bfffc23698b0233efc55556119
X-Git-Newrev: 0c8caa002f89f149ddf39bedad45a180d804a44b
Message-Id: <E1MaZFz-0002dX-J1@cvs.savannah.gnu.org>
From: Ignacy Moryc <imoryc@gmail.com>
Date: Mon, 10 Aug 2009 18:06:03 +0000
X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2)
Subject: [myserver-commit] [SCM] GNU MyServer branch, master,
	updated. 0c8caa002f89f149ddf39bedad45a180d804a44b
X-BeenThere: myserver-commit@gnu.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: myserver-commit.gnu.org
List-Unsubscribe: <http://lists.gnu.org/mailman/listinfo/myserver-commit>,
	<mailto:myserver-commit-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/pipermail/myserver-commit>
List-Post: <mailto:myserver-commit@gnu.org>
List-Help: <mailto:myserver-commit-request@gnu.org?subject=help>
List-Subscribe: <http://lists.gnu.org/mailman/listinfo/myserver-commit>,
	<mailto:myserver-commit-request@gnu.org?subject=subscribe>
X-List-Received-Date: Mon, 10 Aug 2009 18:06:07 -0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU MyServer".

The branch, master has been updated
       via  0c8caa002f89f149ddf39bedad45a180d804a44b (commit)
      from  60e8616f339d31bfffc23698b0233efc55556119 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------


commit 0c8caa002f89f149ddf39bedad45a180d804a44b
Author: Ignacy Moryc <imoryc@gmail.com>
Date:   Mon Aug 10 20:06:03 2009 +0200

    Corrected typo in git URL

diff --git a/myserver/SConstruct b/myserver/SConstruct
index d6fb827..c6476ae 100644
--- a/myserver/SConstruct
+++ b/myserver/SConstruct
@@ -30,7 +30,7 @@ f = open('version','r')
 MYSERVER_VERSION = "GNU MyServer " + f.readline()
 f.close()
 
-GIT_LOCATION = "git clone git://git.savannah.gnu.org/myserver.git'
+GIT_LOCATION = "git clone git://git.savannah.gnu.org/myserver.git"
 HOMEPAGE = "http://www.gnu.org/software/myserver/"
 
 mode = ARGUMENTS.get('mode', "debug")

-----------------------------------------------------------------------

Summary of changes:
 myserver/SConstruct |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)


hooks/post-receive
-- 
GNU MyServer



From MAILER-DAEMON Tue Aug 11 17:07:33 2009
Received: from mailman by lists.gnu.org with archive (Exim 4.43)
	id 1MayZA-0008JZ-VW
	for mharc-myserver-commit@gnu.org; Tue, 11 Aug 2009 17:07:33 -0400
Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43)
	id 1MayZ8-0008Ii-Jy
	for myserver-commit@gnu.org; Tue, 11 Aug 2009 17:07:30 -0400
Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43)
	id 1MayZ6-0008I2-PM
	for myserver-commit@gnu.org; Tue, 11 Aug 2009 17:07:29 -0400
Received: from [199.232.76.173] (port=44896 helo=monty-python.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43) id 1MayZ6-0008Hw-Fr
	for myserver-commit@gnu.org; Tue, 11 Aug 2009 17:07:28 -0400
Received: from savannah.gnu.org ([199.232.41.3]:47765 helo=sv.gnu.org)
	by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32)
	(Exim 4.60) (envelope-from <gscrivano@gnu.org>) id 1MayZ5-00011D-Sz
	for myserver-commit@gnu.org; Tue, 11 Aug 2009 17:07:28 -0400
Received: from download.savannah.gnu.org ([199.232.41.75]
	helo=cvs.savannah.gnu.org) by sv.gnu.org with esmtp (Exim 4.69)
	(envelope-from <gscrivano@gnu.org>) id 1MayZ5-00062E-CY
	for myserver-commit@gnu.org; Tue, 11 Aug 2009 21:07:27 +0000
Received: from gscrivano by cvs.savannah.gnu.org with local (Exim 4.69)
	(envelope-from <gscrivano@savannah.gnu.org>) id 1MayZ2-00061R-1j
	for myserver-commit@gnu.org; Tue, 11 Aug 2009 21:07:27 +0000
To: myserver-commit@gnu.org
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: 0c8caa002f89f149ddf39bedad45a180d804a44b
X-Git-Newrev: b0c0c7ce4c8aa1211a95408dd94b8c619516ef0c
Message-Id: <E1MayZ2-00061R-1j@cvs.savannah.gnu.org>
From: Giuseppe Scrivano <gscrivano@gnu.org>
Date: Tue, 11 Aug 2009 21:07:25 +0000
X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2)
Subject: [myserver-commit] [SCM] GNU MyServer branch, master,
	updated. b0c0c7ce4c8aa1211a95408dd94b8c619516ef0c
X-BeenThere: myserver-commit@gnu.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: myserver-commit.gnu.org
List-Unsubscribe: <http://lists.gnu.org/mailman/listinfo/myserver-commit>,
	<mailto:myserver-commit-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/pipermail/myserver-commit>
List-Post: <mailto:myserver-commit@gnu.org>
List-Help: <mailto:myserver-commit-request@gnu.org?subject=help>
List-Subscribe: <http://lists.gnu.org/mailman/listinfo/myserver-commit>,
	<mailto:myserver-commit-request@gnu.org?subject=subscribe>
X-List-Received-Date: Tue, 11 Aug 2009 21:07:31 -0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU MyServer".

The branch, master has been updated
       via  b0c0c7ce4c8aa1211a95408dd94b8c619516ef0c (commit)
       via  a941416962a473e4eb7336c98b2c15c071a20675 (commit)
       via  398e844152397ca4d3cd45053037c66a1b4fd0c4 (commit)
      from  0c8caa002f89f149ddf39bedad45a180d804a44b (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------


commit b0c0c7ce4c8aa1211a95408dd94b8c619516ef0c
Author: Giuseppe Scrivano <gscrivano@gnu.org>
Date:   Tue Aug 11 23:05:28 2009 +0200

    New LogManager method that allows to log according to a format string.

diff --git a/myserver/include/log/log_manager.h b/myserver/include/log/log_manager.h
index 2381d8c..36a5820 100644
--- a/myserver/include/log/log_manager.h
+++ b/myserver/include/log/log_manager.h
@@ -35,15 +35,18 @@ class LogManager
 public:
   LogManager (FiltersFactory* ff, LoggingLevel level = MYSERVER_LOG_MSG_INFO);
   ~LogManager ();
-  int add (void* owner, string type, string location, 
+  int add (void* owner, string type, string location,
            list<string>& filters, u_long cycle);
   int remove (void* owner);
   int log (void* owner, string message, bool appendNL = false,
            LoggingLevel level = MYSERVER_LOG_MSG_INFO);
   int log (void* owner, string type, string message, bool appendNL = false,
            LoggingLevel level = MYSERVER_LOG_MSG_INFO);
-  int log (void* owner, string type, string location, string message, 
+  int log (void* owner, string type, string location, string message,
            bool appendNL = false, LoggingLevel level = MYSERVER_LOG_MSG_INFO);
+  int log (void* owner, string type, string location, LoggingLevel level,
+           bool appendNL, const char *fmt, ...);
+
   int close (void* owner);
   int close (void* owner, string type);
   int close (void* owner, string type, string location);
@@ -75,9 +78,9 @@ public:
   list<string> getLoggingLevelsByNames ();
   map<LoggingLevel, string>& getLoggingLevels () { return loggingLevels; }
 private:
-  int notify (void* owner, string type, string location, LogStreamEvent evt, 
+  int notify (void* owner, string type, string location, LogStreamEvent evt,
               void* msg = 0, void* reply = 0);
-  int notify (void* owner, string type, LogStreamEvent evt, void* msg = 0, 
+  int notify (void* owner, string type, LogStreamEvent evt, void* msg = 0,
               void* reply = 0);
   int notify (void* owner, LogStreamEvent evt, void* msg = 0, void* reply = 0);
   int add (void* owner);
@@ -98,7 +101,7 @@ private:
    * anyway it is possible to share the same LogStream between more owners.
    */
   map<string, LogStream*> logStreams;
-  
+
   /*!
    * For each LogStream, store the list of objects that use it.
    */
@@ -113,7 +116,7 @@ private:
    * Store the newline string for the host operating system.
    */
   string newline;
-  
+
   /*!
    * Associate each LoggingLevel with its string representation.
    */
diff --git a/myserver/src/log/log_manager.cpp b/myserver/src/log/log_manager.cpp
index c845a7b..8efb396 100644
--- a/myserver/src/log/log_manager.cpp
+++ b/myserver/src/log/log_manager.cpp
@@ -17,6 +17,7 @@
 
 #include <include/log/log_manager.h>
 #include <include/server/server.h>
+#include <cstdarg>
 
 /*!
  * The constructor.
@@ -428,9 +429,9 @@ int
 LogManager::log (void* owner, string message, bool appendNL,
                  LoggingLevel level)
 {
-  int failure = 1;
+  int failure = 0;
   if (level < this->level)
-    return failure;
+    return 1;
 
   mutex->lock ();
   try
@@ -474,9 +475,9 @@ int
 LogManager::log (void* owner, string type, string message, bool appendNL,
                  LoggingLevel level)
 {
-  int failure = 1;
+  int failure = 0;
   if (level < this->level)
-    return failure;
+    return 1;
 
   mutex->lock ();
   try
@@ -524,9 +525,9 @@ int
 LogManager::log (void* owner, string type, string location, string message,
                  bool appendNL, LoggingLevel level)
 {
-  int failure = 1;
+  int failure = 0;
   if (level < this->level)
-    return failure;
+    return 1;
 
   mutex->lock ();
 
@@ -555,6 +556,104 @@ LogManager::log (void* owner, string type, string location, string message,
   return failure;
 }
 
+
+/*!
+ * Write a message on a single LogStream specifying a formatting string.
+ *
+ * \param owner The object that owns the LogStream.
+ * \param type The log category where we want to write.
+ * \param location The target LogStream.
+ * \param message The message we want to write.
+ * \param level The level of logging of this message. If it is less than
+ * the LogManager's level of logging, the message will be discarded.
+ * \param appendNL a flag that, if set, tells the LogManager to append
+ * a new line sequence to the message, according to the host operating system
+ * convention.
+ * \param fmt Specify the message to log, accepting an additional parameters
+ * list, codes accepted are:
+ * %s An const char* string.
+ * %S A string*
+ * %% A '%'.
+ * %i An integer.
+ *
+ * \return 0 on success, 1 on error.
+ */
+int
+LogManager::log (void* owner, string type, string location, LoggingLevel level,
+                 bool appendNL, const char *fmt, ...)
+{
+  int failure = 0;
+
+  if (level < this->level)
+    return 1;
+
+  mutex->lock ();
+
+  ostringstream oss;
+  va_list argptr;
+
+  va_start (argptr, fmt);
+
+  try
+    {
+      while (*fmt)
+        {
+          if (*fmt != '%')
+            oss << *fmt;
+          else
+            {
+              fmt++;
+              switch (*fmt)
+                {
+                case 's':
+                  oss << static_cast<const char*> (va_arg (argptr, const char*));
+                  break;
+
+                case 'S':
+                  oss << static_cast<string*> (va_arg (argptr, string*));
+                  break;
+
+                case '%':
+                  oss << '%';
+                  break;
+
+                case 'i':
+                  oss << static_cast<int> (va_arg (argptr, int));
+                  break;
+
+                default:
+                  mutex->unlock ();
+                  return 1;
+                }
+
+            }
+
+          fmt++;
+        }
+
+      string message = oss.str ();
+
+      failure = notify (owner, type, location, MYSERVER_LOG_EVT_SET_MODE,
+                        static_cast<void*>(&level))
+        || notify (owner, type, location, MYSERVER_LOG_EVT_LOG,
+                   static_cast<void*>(&message));
+
+      if (appendNL)
+        failure |= notify (owner, MYSERVER_LOG_EVT_LOG,
+                           static_cast<void*>(&newline));
+    }
+  catch (...)
+    {
+      mutex->unlock ();
+    }
+
+  va_end (argptr);
+
+  mutex->unlock ();
+  return failure;
+}
+
+
 /*!
  * Close all the LogStream objects owned by `owner'.
  *



commit a941416962a473e4eb7336c98b2c15c071a20675
Author: Giuseppe Scrivano <gscrivano@gnu.org>
Date:   Tue Aug 11 21:15:47 2009 +0200

    Limit usage of the same LogManager to only a thread at time.

diff --git a/myserver/src/log/log_manager.cpp b/myserver/src/log/log_manager.cpp
index 0db6c34..c845a7b 100644
--- a/myserver/src/log/log_manager.cpp
+++ b/myserver/src/log/log_manager.cpp
@@ -88,7 +88,7 @@ LogManager::clear ()
  * Add a new LogStream element to the LogManager. The same LogStream can be
  * shared between different owner objects. This means that you can pass
  * multiple times the same string as `location' parameter, as well as `owner'
- * and `type', but you can't pass more than one time the same 
+ * and `type', but you can't pass more than one time the same
  * <owner, type, location> tuple.
  *
  * \param owner The object that will own the LogStream that is being added.
@@ -100,7 +100,7 @@ LogManager::clear ()
  * \return 0 on success, 1 on error.
  */
 int
-LogManager::add (void* owner, string type, string location, 
+LogManager::add (void* owner, string type, string location,
                  list<string>& filters, u_long cycle)
 {
   mutex->lock ();
@@ -119,11 +119,11 @@ LogManager::add (void* owner, string type, string location,
       int oldSize;
       int newSize;
       ostringstream oss;
-      
+
       oldSize = logStreamOwners[location].size ();
       if (!contains (owner))
         {
-          failure = add (owner) || add (owner, type) || 
+          failure = add (owner) || add (owner, type) ||
             add (owner, type, location, logStreams[location]);
         }
       else if (!contains (owner, type))
@@ -235,7 +235,7 @@ LogManager::add (void* owner, string type, string location, LogStream* ls)
  *
  * \return 0 on success, 1 on error.
  */
-int 
+int
 LogManager::remove (void* owner)
 {
   mutex->lock ();
@@ -283,7 +283,7 @@ LogManager::remove (void* owner)
  * \return 0 on success, 1 on error.
  */
 int
-LogManager::notify (void* owner, string type, string location, 
+LogManager::notify (void* owner, string type, string location,
                     LogStreamEvent evt, void* message, void* reply)
 {
   int failure = 1;
@@ -308,7 +308,7 @@ LogManager::notify (void* owner, string type, string location,
  * \return 0 on success, 1 on error.
  */
 int
-LogManager::notify (void* owner, string type, LogStreamEvent evt, 
+LogManager::notify (void* owner, string type, LogStreamEvent evt,
                     void* message, void* reply)
 {
   int failure = 1;
@@ -337,7 +337,7 @@ LogManager::notify (void* owner, string type, LogStreamEvent evt,
  * \return 0 on success, 1 on error.
  */
 int
-LogManager::notify (void* owner, LogStreamEvent evt, void* message, 
+LogManager::notify (void* owner, LogStreamEvent evt, void* message,
                     void* reply)
 {
   int failure = 1;
@@ -429,19 +429,30 @@ LogManager::log (void* owner, string message, bool appendNL,
                  LoggingLevel level)
 {
   int failure = 1;
-  if (level >= this->level)
+  if (level < this->level)
+    return failure;
+
+  mutex->lock ();
+  try
     {
-      failure = 
-        notify (owner, MYSERVER_LOG_EVT_SET_MODE, static_cast<void*>(&level)) ||
-        notify (owner, MYSERVER_LOG_EVT_LOG, static_cast<void*>(&message));
+      failure = notify (owner, MYSERVER_LOG_EVT_SET_MODE,
+                        static_cast<void*>(&level))
+        || notify (owner,MYSERVER_LOG_EVT_LOG, static_cast<void*>(&message));
       if (appendNL)
         {
           LoggingLevel l = MYSERVER_LOG_MSG_PLAIN;
-          failure |= 
-            (notify (owner, MYSERVER_LOG_EVT_SET_MODE, (static_cast<void*>(&l))) ||
-             notify (owner, MYSERVER_LOG_EVT_LOG, (static_cast<void*>(&newline))));
+          failure |= (notify (owner, MYSERVER_LOG_EVT_SET_MODE,
+                              (static_cast<void*>(&l)))
+                      || notify (owner, MYSERVER_LOG_EVT_LOG,
+                                 (static_cast<void*>(&newline))));
         }
     }
+  catch (...)
+    {
+      mutex->unlock ();
+    }
+  mutex->unlock ();
+
   return failure;
 }
 
@@ -464,19 +475,32 @@ LogManager::log (void* owner, string type, string message, bool appendNL,
                  LoggingLevel level)
 {
   int failure = 1;
-  if (level >= this->level)
+  if (level < this->level)
+    return failure;
+
+  mutex->lock ();
+  try
     {
-      failure = 
-        notify (owner, type, MYSERVER_LOG_EVT_SET_MODE, static_cast<void*>(&level)) ||
-        notify (owner, type, MYSERVER_LOG_EVT_LOG, static_cast<void*>(&message));
+      failure = notify (owner, type, MYSERVER_LOG_EVT_SET_MODE,
+                        static_cast<void*>(&level))
+        || notify (owner, type, MYSERVER_LOG_EVT_LOG,
+                   static_cast<void*>(&message));
+
       if (appendNL)
         {
           LoggingLevel l = MYSERVER_LOG_MSG_PLAIN;
-          failure |= 
-            (notify (owner, MYSERVER_LOG_EVT_SET_MODE, (static_cast<void*>(&l))) ||
-             notify (owner, MYSERVER_LOG_EVT_LOG, (static_cast<void*>(&newline))));
+          failure |= (notify (owner, MYSERVER_LOG_EVT_SET_MODE,
+                              (static_cast<void*>(&l)))
+                      || notify (owner, MYSERVER_LOG_EVT_LOG,
+                                 (static_cast<void*>(&newline))));
         }
     }
+  catch (...)
+    {
+      mutex->unlock ();
+    }
+  mutex->unlock ();
+
   return failure;
 }
 
@@ -497,23 +521,37 @@ LogManager::log (void* owner, string type, string message, bool appendNL,
  * \return 0 on success, 1 on error.
  */
 int
-LogManager::log (void* owner, string type, string location, string message, 
+LogManager::log (void* owner, string type, string location, string message,
                  bool appendNL, LoggingLevel level)
 {
   int failure = 1;
-  if (level >= this->level)
+  if (level < this->level)
+    return failure;
+
+  mutex->lock ();
+
+  try
     {
-      failure = 
-        notify (owner, type, location, MYSERVER_LOG_EVT_SET_MODE, static_cast<void*>(&level)) ||
-        notify (owner, type, location, MYSERVER_LOG_EVT_LOG, static_cast<void*>(&message));
+      failure = notify (owner, type, location, MYSERVER_LOG_EVT_SET_MODE,
+                        static_cast<void*>(&level))
+        || notify (owner, type, location, MYSERVER_LOG_EVT_LOG,
+                   static_cast<void*>(&message));
+
       if (appendNL)
         {
           LoggingLevel l = MYSERVER_LOG_MSG_PLAIN;
-          failure |=
-            (notify (owner, MYSERVER_LOG_EVT_SET_MODE, (static_cast<void*>(&l))) ||
-             notify (owner, MYSERVER_LOG_EVT_LOG, (static_cast<void*>(&newline))));
+          failure |= notify (owner, MYSERVER_LOG_EVT_SET_MODE,
+                             (static_cast<void*>(&l)))
+            || notify (owner, MYSERVER_LOG_EVT_LOG,
+                       static_cast<void*>(&newline));
         }
     }
+  catch (...)
+    {
+      mutex->unlock ();
+    }
+
+  mutex->unlock ();
   return failure;
 }
 
@@ -564,7 +602,7 @@ LogManager::close (void* owner, string type, string location)
 /*!
  * Set the cycle value for all the LogStream objects owned by `owner'.
  *
- * \param owner The object that wants to modify the cycle value for its 
+ * \param owner The object that wants to modify the cycle value for its
  * LogStream objects.
  * \param cycle The new cycle value.
  *
@@ -606,16 +644,16 @@ LogManager::setCycle (void* owner, string type, u_long cycle)
 int
 LogManager::setCycle (void* owner, string type, string location, u_long cycle)
 {
-  return notify (owner, type, location, MYSERVER_LOG_EVT_SET_CYCLE, 
+  return notify (owner, type, location, MYSERVER_LOG_EVT_SET_CYCLE,
                  static_cast<void*>(&cycle));
 }
 
 /*!
  * Return the cycle value for the `location' LogStream.
  *
- * \param location The LogStream about which we want to retrieve the cycle 
+ * \param location The LogStream about which we want to retrieve the cycle
  * value.
- * \param cycle On a successful method execution, the cycle value will be 
+ * \param cycle On a successful method execution, the cycle value will be
  * placed here.
  *
  * \return 0 on success, 1 on error.
@@ -784,7 +822,7 @@ LogManager::setFiltersFactory (FiltersFactory* ff)
  *
  * \return the FiltersFactory object used by the LogManager.
  */
-FiltersFactory* 
+FiltersFactory*
 LogManager::getFiltersFactory ()
 {
   return ff;
@@ -798,7 +836,7 @@ LogManager::getFiltersFactory ()
 bool
 LogManager::empty ()
 {
-  return 
+  return
     logStreams.size () == 0 &&
     owners.size () == 0 &&
     logStreamOwners.size () == 0;
@@ -816,7 +854,7 @@ LogManager::empty ()
 bool
 LogManager::contains (string location)
 {
-  return logStreams.count (location) > 0 && 
+  return logStreams.count (location) > 0 &&
     logStreamOwners[location].size ();
 }
 
@@ -864,7 +902,7 @@ bool
 LogManager::contains (void* owner, string type, string location)
 {
   return owners[owner][type].count (location) > 0 &&
-    (find (logStreamOwners[location].begin (), logStreamOwners[location].end (), owner) != 
+    (find (logStreamOwners[location].begin (), logStreamOwners[location].end (), owner) !=
      logStreamOwners[location].end ());
 }
 
@@ -877,7 +915,7 @@ LogManager::contains (void* owner, string type, string location)
  * \return The total number of LogStream objects belonging to all
  * its log categories.
  */
-int 
+int
 LogManager::count (void* owner)
 {
   int size = 0;
@@ -906,7 +944,7 @@ LogManager::count (void* owner, string type)
 }
 
 /*!
- * Given an owner object, one of its log categories and 
+ * Given an owner object, one of its log categories and
  * a location, returns the number of occurrences of `location'.
  *
  * \param owner A pointer to an object that may own `location'.
@@ -924,7 +962,7 @@ LogManager::count (void* owner, string type, string location)
 
 /*!
  * Retrieve a list of objects that are currently using `location'.
- * 
+ *
  * \param location We want to know which objects are using it.
  * \param l The location owners will be inserted here.
  *
@@ -966,7 +1004,7 @@ LogManager::logWriteln (string msg, LoggingLevel l)
 list<string>
 LogManager::getLoggingLevelsByNames ()
 {
-  list<string> l; 
+  list<string> l;
   for (map<LoggingLevel, string>::iterator it = loggingLevels.begin ();
        it != loggingLevels.end (); it++)
     {



commit 398e844152397ca4d3cd45053037c66a1b4fd0c4
Author: Giuseppe Scrivano <gscrivano@gnu.org>
Date:   Tue Aug 11 20:08:11 2009 +0200

    Removed MACRO defined constants.

diff --git a/myserver/include/connection/connection.h b/myserver/include/connection/connection.h
index 8b6cecd..6718786 100644
--- a/myserver/include/connection/connection.h
+++ b/myserver/include/connection/connection.h
@@ -36,15 +36,10 @@ class ClientsThread;
 
 using namespace std;
 
-/*! Remove the connection due a high server load.  */
-#define CONNECTION_REMOVE_OVERLOAD 1
-
-/*! Remove the connection if the administrator decided this.  */
-#define CONNECTION_USER_KILL        2
 
 
 class Connection;
-                                   
+
 typedef  Connection* ConnectionPtr;
 
 typedef int (*continuationPROC)(ConnectionPtr a, char *b1, char *b2,
@@ -54,6 +49,11 @@ typedef int (*continuationPROC)(ConnectionPtr a, char *b1, char *b2,
 class Connection
 {
 public:
+  enum
+    {
+      REMOVE_OVERLOAD = 1,
+      USER_KILL
+    };
   void init ();
   void destroy ();
 
@@ -69,7 +69,7 @@ public:
 
   u_short getPort ();
   void setPort (u_short);
-	
+
   u_short getLocalPort ();
   void setLocalPort (u_short);
 
@@ -94,15 +94,15 @@ public:
 
 	/*! Connection socket.  */
 	Socket *socket;
-	
+
 	/*! Pointer to an host structure.  */
 	Vhost *host;
-	
+
   int getToRemove ();
   void setToRemove (int);
 
   int isForceControl ();
-  void setForceControl (int);	
+  void setForceControl (int);
 
 	/*! Buffer for the connection struct. Used by protocols.  */
 	ProtocolBuffer *protocolBuffer;
@@ -134,7 +134,7 @@ public:
 
   MemBuf *getConnectionBuffer (){return connectionBuffer;}
 protected:
-	
+
 	/*! This buffer must be used only by the ClientsTHREAD class.  */
 	MemBuf *connectionBuffer;
 
@@ -154,7 +154,7 @@ protected:
 
 	/*! Login name.  */
 	string *login;
-	
+
 	/*! Password used to log in.  */
 	string *password;
 
@@ -163,7 +163,7 @@ protected:
 
 	/*! Remote IP address.  */
 	string *ipAddr;
-	
+
 	/*! Local IP used to connect to.  */
 	string *localIpAddr;
 
@@ -176,11 +176,11 @@ protected:
 	/*
    *!If nonzero the server is saying to the protocol to remove the connection.
    *Protocols can not consider this but is a good idea do it to avoid server
-   *overloads. 
-   *Reasons to remove the connection are defined at the begin of this file.  
+   *overloads.
+   *Reasons to remove the connection are defined at the begin of this file.
    */
 	int toRemove;
-	
+
 	/*! Force the connection to be parsed.  */
 	int forceControl;
 
diff --git a/myserver/src/protocol/control/control_protocol.cpp b/myserver/src/protocol/control/control_protocol.cpp
index 994da2c..623918c 100755
--- a/myserver/src/protocol/control/control_protocol.cpp
+++ b/myserver/src/protocol/control/control_protocol.cpp
@@ -232,21 +232,20 @@ int ControlProtocol::controlConnection (ConnectionPtr a, char *b1, char *b2,
 
   /* Is the specified command a know one? */
   int knownCommand;
-  if (a->getToRemove())
+  if (a->getToRemove ())
   {
-    switch(a->getToRemove())
+    switch (a->getToRemove ())
     {
       /* Remove the connection from the list. */
-      case CONNECTION_REMOVE_OVERLOAD:
-        sendResponse(b2, bs2, a, CONTROL_SERVER_BUSY, header, 0);
-        return 0;
-      default:
-        return 0;
+    case Connection::REMOVE_OVERLOAD:
+      sendResponse (b2, bs2, a, CONTROL_SERVER_BUSY, header, 0);
+      return 0;
+    default:
+      return 0;
     }
   }
 
-
-  ret = header.parse_header(b1, nbtr, &realHeaderLength);
+  ret = header.parse_header (b1, nbtr, &realHeaderLength);
 
   /*
    *On errors remove the connection from the connections list.
@@ -792,7 +791,7 @@ int ControlProtocol::visitConnection (ConnectionPtr con, void* argP)
     if (con->getID () == arg->id)
     {
       /* Define why the connection is killed.  */
-      con->setToRemove (CONNECTION_USER_KILL);
+      con->setToRemove (Connection::USER_KILL);
       return 1;
     }
   }
@@ -805,8 +804,8 @@ int ControlProtocol::visitConnection (ConnectionPtr con, void* argP)
 /*!
  *Return the requested file to the client.
  */
-int ControlProtocol::getFile (ConnectionPtr a, char* fn, File* in,
-                             File* out, char *b1,int bs1, ControlHeader& header )
+int ControlProtocol::getFile (ConnectionPtr a, char* fn, File* in, File* out,
+                              char *b1,int bs1, ControlHeader& header)
 {
   const char *filename = 0;
   File localfile;
diff --git a/myserver/src/protocol/ftp/ftp.cpp b/myserver/src/protocol/ftp/ftp.cpp
index 567e22b..2eb65cf 100755
--- a/myserver/src/protocol/ftp/ftp.cpp
+++ b/myserver/src/protocol/ftp/ftp.cpp
@@ -336,7 +336,7 @@ int Ftp::controlConnection (ConnectionPtr pConnection, char *b1, char *b2,
     return ClientsThread::DELETE_CONNECTION;
 
   // check if ftp is busy(return 120) or unavailable(return 421)
-  if (pConnection->getToRemove () == CONNECTION_REMOVE_OVERLOAD)
+  if (pConnection->getToRemove () == Connection::REMOVE_OVERLOAD)
     {
       pFtpuserData->m_nFtpstate = FtpuserData::BUISY;
       // TODO: really compute busy time interval
diff --git a/myserver/src/protocol/http/http.cpp b/myserver/src/protocol/http/http.cpp
index 917bffd..ac4e8fa 100644
--- a/myserver/src/protocol/http/http.cpp
+++ b/myserver/src/protocol/http/http.cpp
@@ -860,7 +860,7 @@ int Http::controlConnection (ConnectionPtr a, char* /*b1*/, char* /*b2*/,
           switch (td->connection->getToRemove ())
             {
               /* Remove the connection from the list.  */
-            case CONNECTION_REMOVE_OVERLOAD:
+            case Connection::REMOVE_OVERLOAD:
               retvalue = raiseHTTPError (503);
               logHTTPaccess ();
               return ClientsThread::DELETE_CONNECTION;
diff --git a/myserver/src/server/server.cpp b/myserver/src/server/server.cpp
index 5922a41..6585797 100644
--- a/myserver/src/server/server.cpp
+++ b/myserver/src/server/server.cpp
@@ -287,7 +287,7 @@ Server::~Server()
 
   if(ipAddresses)
     delete ipAddresses;
-  
+
   if (logManager)
     delete logManager;
 
@@ -400,12 +400,12 @@ int Server::postLoad()
    */
   memset(serverName, 0, HOST_NAME_MAX+1);
   Socket::gethostname(serverName, HOST_NAME_MAX);
-  
+
   buffer.assign(languageParser.getValue("MSG_GETNAME"));
   buffer.append(" ");
   buffer.append(serverName);
   logWriteln(buffer.c_str());
-  
+
   /*
    *Find the IP addresses of the local machine.
    */
@@ -415,7 +415,7 @@ int Server::postLoad()
   buffer.assign("Host: ");
   buffer.append(serverName);
   logWriteln(buffer.c_str() );
-  
+
   if(Socket::getLocalIPsList(*ipAddresses))
   {
     string msg;
@@ -439,7 +439,7 @@ int Server::postLoad()
     delete mimeManager;
 
   mimeManager = new MimeManager();
-  
+
   if(int nMIMEtypes = mimeManager->loadXML(mimeConfigurationFile->c_str()))
   {
     ostringstream stream;
@@ -452,26 +452,26 @@ int Server::postLoad()
   }
 
   nCPU << (u_int)getCPUCount();
-  
+
   strCPU.assign(languageParser.getValue("MSG_NUM_CPU"));
   strCPU.append(" ");
   strCPU.append(nCPU.str());
   logWriteln(strCPU.c_str());
-  
+
   connectionsScheduler.restart();
-  
+
   listenThreads.initialize(&languageParser);
-  
+
   if(vhostList)
     delete vhostList;
-  
+
   vhostList = new VhostManager(&listenThreads, logManager);
-  
+
   if(vhostList == NULL)
     return -1;
 
   getProcessServerManager()->load();
-    
+
   /* Load the home directories configuration.  */
   homeDir.load();
 
@@ -482,7 +482,7 @@ int Server::postLoad()
 
   if(path == 0)
     path = new string();
-  
+
   if(getdefaultwd(*path))
     return -1;
 
@@ -506,10 +506,10 @@ int Server::postLoad()
  */
 void Server::loadPlugins()
 {
-  string xml("xml"); 
+  string xml("xml");
   //FIXME: xmlV is never freed.
   XmlValidator *xmlV = new XmlValidator ();
-    
+
   validatorFactory.addValidator (xml, xmlV);
   authMethodFactory.addAuthMethod (xml, (AuthMethod*) xmlV);
 
@@ -536,7 +536,7 @@ void Server::loadPlugins()
   }
 
 
-  
+
   getPluginsManager()->preLoad(this, *externalPath);
   getPluginsManager()->load(this);
   getPluginsManager()->postLoad(this, &languageParser);
@@ -584,7 +584,7 @@ void Server::mainLoop()
         FilesUtility::getLastModTime(vhostConfigurationFile->c_str());
       time_t mimeConfNow =
         FilesUtility::getLastModTime(mimeConfigurationFile->c_str());
-      
+
       /* If a configuration file was modified reboot the server. */
       if(((mainConfTimeNow != -1) && (hostsConfTimeNow != -1)  &&
           (mimeConfNow != -1)) || toReboot)
@@ -646,7 +646,7 @@ void Server::mainLoop()
 
           connectionsScheduler.restart();
           listenThreads.initialize(&languageParser);
-            
+
           vhostList = new VhostManager(&listenThreads, logManager);
 
           if(vhostList == 0)
@@ -967,9 +967,9 @@ int Server::terminate ()
   nStaticThreads = 0;
   if (verbosity > 1)
     logWriteln ("MyServer is stopped");
-  
+
   logManager->clear ();
-  
+
   return 0;
 }
 
@@ -1471,11 +1471,11 @@ ConnectionPtr Server::addConnectionToList(Socket* s,
    *is bigger than it say to the protocol that will parse the connection
    *to remove it from the active connections list.
    */
-  if(maxConnections &&
-     ((u_long)connectionsScheduler.getConnectionsNumber() > maxConnections))
-    newConnection->setToRemove(CONNECTION_REMOVE_OVERLOAD);
+  if(maxConnections && ((u_long)connectionsScheduler.getConnectionsNumber ()
+                        > maxConnections))
+    newConnection->setToRemove (Connection::REMOVE_OVERLOAD);
 
-  connectionsScheduler.registerConnectionID(newConnection);
+  connectionsScheduler.registerConnectionID (newConnection);
 
   return newConnection;
 }
@@ -2028,7 +2028,7 @@ int Server::logWriteln(char const* str, LoggingLevel level)
 {
   if(!str)
     return 0;
-  
+
   /*
    *If the log receiver is not the console output a timestamp.
    */

-----------------------------------------------------------------------

Summary of changes:
 myserver/include/connection/connection.h           |   32 ++--
 myserver/include/log/log_manager.h                 |   15 +-
 myserver/src/log/log_manager.cpp                   |  227 ++++++++++++++++----
 myserver/src/protocol/control/control_protocol.cpp |   23 +-
 myserver/src/protocol/ftp/ftp.cpp                  |    2 +-
 myserver/src/protocol/http/http.cpp                |    2 +-
 myserver/src/server/server.cpp                     |   50 +++---
 7 files changed, 245 insertions(+), 106 deletions(-)


hooks/post-receive
-- 
GNU MyServer



From MAILER-DAEMON Tue Aug 11 17:38:39 2009
Received: from mailman by lists.gnu.org with archive (Exim 4.43)
	id 1Maz3H-0004Tf-5G
	for mharc-myserver-commit@gnu.org; Tue, 11 Aug 2009 17:38:39 -0400
Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43)
	id 1Maz3F-0004T0-PC
	for myserver-commit@gnu.org; Tue, 11 Aug 2009 17:38:37 -0400
Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43)
	id 1Maz3E-0004Rw-Au
	for myserver-commit@gnu.org; Tue, 11 Aug 2009 17:38:36 -0400
Received: from [199.232.76.173] (port=49787 helo=monty-python.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43) id 1Maz3E-0004Rt-6L
	for myserver-commit@gnu.org; Tue, 11 Aug 2009 17:38:36 -0400
Received: from savannah.gnu.org ([199.232.41.3]:42324 helo=sv.gnu.org)
	by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32)
	(Exim 4.60) (envelope-from <gscrivano@gnu.org>) id 1Maz3D-0004z4-T3
	for myserver-commit@gnu.org; Tue, 11 Aug 2009 17:38:36 -0400
Received: from download.savannah.gnu.org ([199.232.41.75]
	helo=cvs.savannah.gnu.org) by sv.gnu.org with esmtp (Exim 4.69)
	(envelope-from <gscrivano@gnu.org>) id 1Maz3D-0008C0-CY
	for myserver-commit@gnu.org; Tue, 11 Aug 2009 21:38:35 +0000
Received: from gscrivano by cvs.savannah.gnu.org with local (Exim 4.69)
	(envelope-from <gscrivano@savannah.gnu.org>) id 1Maz3D-0008BY-29
	for myserver-commit@gnu.org; Tue, 11 Aug 2009 21:38:35 +0000
To: myserver-commit@gnu.org
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: b0c0c7ce4c8aa1211a95408dd94b8c619516ef0c
X-Git-Newrev: 1e035ef322a4158bc570092a5d0d513c09163a55
Message-Id: <E1Maz3D-0008BY-29@cvs.savannah.gnu.org>
From: Giuseppe Scrivano <gscrivano@gnu.org>
Date: Tue, 11 Aug 2009 21:38:35 +0000
X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2)
Subject: [myserver-commit] [SCM] GNU MyServer branch, master,
	updated. 1e035ef322a4158bc570092a5d0d513c09163a55
X-BeenThere: myserver-commit@gnu.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: myserver-commit.gnu.org
List-Unsubscribe: <http://lists.gnu.org/mailman/listinfo/myserver-commit>,
	<mailto:myserver-commit-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/pipermail/myserver-commit>
List-Post: <mailto:myserver-commit@gnu.org>
List-Help: <mailto:myserver-commit-request@gnu.org?subject=help>
List-Subscribe: <http://lists.gnu.org/mailman/listinfo/myserver-commit>,
	<mailto:myserver-commit-request@gnu.org?subject=subscribe>
X-List-Received-Date: Tue, 11 Aug 2009 21:38:38 -0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU MyServer".

The branch, master has been updated
       via  1e035ef322a4158bc570092a5d0d513c09163a55 (commit)
      from  b0c0c7ce4c8aa1211a95408dd94b8c619516ef0c (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------


commit 1e035ef322a4158bc570092a5d0d513c09163a55
Author: Giuseppe Scrivano <gscrivano@gnu.org>
Date:   Tue Aug 11 23:37:07 2009 +0200

    Extract a method from LogManager::log (void*, string, string, LoggingLevel, bool, const char*, ...).

diff --git a/myserver/include/log/log_manager.h b/myserver/include/log/log_manager.h
index 36a5820..e01064d 100644
--- a/myserver/include/log/log_manager.h
+++ b/myserver/include/log/log_manager.h
@@ -27,6 +27,8 @@
 #include <include/filter/filters_factory.h>
 #include <include/log/stream/log_stream.h>
 #include <include/log/stream/log_stream_factory.h>
+#include <cstdarg>
+
 
 using namespace std;
 
@@ -46,6 +48,8 @@ public:
            bool appendNL = false, LoggingLevel level = MYSERVER_LOG_MSG_INFO);
   int log (void* owner, string type, string location, LoggingLevel level,
            bool appendNL, const char *fmt, ...);
+  int log (void* owner, string type, string location, LoggingLevel level,
+           bool appendNL, const char *fmt, va_list args);
 
   int close (void* owner);
   int close (void* owner, string type);
diff --git a/myserver/src/log/log_manager.cpp b/myserver/src/log/log_manager.cpp
index 8efb396..ba22a7f 100644
--- a/myserver/src/log/log_manager.cpp
+++ b/myserver/src/log/log_manager.cpp
@@ -17,7 +17,6 @@
 
 #include <include/log/log_manager.h>
 #include <include/server/server.h>
-#include <cstdarg>
 
 /*!
  * The constructor.
@@ -560,6 +559,32 @@ LogManager::log (void* owner, string type, string location, string message,
 /*!
  * Write a message on a single LogStream specifying a formatting string.
  *
+ * \see LogManager#log (void*, string, string, LoggingLeve, bool, va_list)
+ * \return 0 on success, 1 on error.
+ */
+int
+LogManager::log (void* owner, string type, string location, LoggingLevel level,
+                 bool appendNL, const char *fmt, ...)
+{
+  int failure = 0;
+
+  if (level < this->level)
+    return 1;
+
+  va_list argptr;
+
+  va_start (argptr, fmt);
+
+  failure = log (owner, type, location, level, appendNL, fmt, argptr);
+
+  va_end (argptr);
+
+  return failure;
+}
+
+/*!
+ * Write a message on a single LogStream specifying a formatting string.
+ *
  * \param owner The object that owns the LogStream.
  * \param type The log category where we want to write.
  * \param location The target LogStream.
@@ -575,12 +600,13 @@ LogManager::log (void* owner, string type, string location, string message,
  * %S A string*
  * %% A '%'.
  * %i An integer.
+ *\param args Additional args used by fmt.
  *
  * \return 0 on success, 1 on error.
  */
 int
 LogManager::log (void* owner, string type, string location, LoggingLevel level,
-                 bool appendNL, const char *fmt, ...)
+                 bool appendNL, const char *fmt, va_list args)
 {
   int failure = 0;
 
@@ -590,9 +616,6 @@ LogManager::log (void* owner, string type, string location, LoggingLevel level,
   mutex->lock ();
 
   ostringstream oss;
-  va_list argptr;
-
-  va_start (argptr, fmt);
 
   try
     {
@@ -606,11 +629,11 @@ LogManager::log (void* owner, string type, string location, LoggingLevel level,
               switch (*fmt)
                 {
                 case 's':
-                  oss << static_cast<const char*> (va_arg (argptr, const char*));
+                  oss << static_cast<const char*> (va_arg (args, const char*));
                   break;
 
                 case 'S':
-                  oss << static_cast<string*> (va_arg (argptr, string*));
+                  oss << static_cast<string*> (va_arg (args, string*));
                   break;
 
                 case '%':
@@ -618,16 +641,14 @@ LogManager::log (void* owner, string type, string location, LoggingLevel level,
                   break;
 
                 case 'i':
-                  oss << static_cast<int> (va_arg (argptr, int));
+                  oss << static_cast<int> (va_arg (args, int));
                   break;
 
                 default:
                   mutex->unlock ();
                   return 1;
                 }
-
             }
-
           fmt++;
         }
 
@@ -647,12 +668,10 @@ LogManager::log (void* owner, string type, string location, LoggingLevel level,
       mutex->unlock ();
     }
 
-  va_end (argptr);
-
   mutex->unlock ();
   return failure;
-}
 
+}
 
 /*!
  * Close all the LogStream objects owned by `owner'.

-----------------------------------------------------------------------

Summary of changes:
 myserver/include/log/log_manager.h |    4 +++
 myserver/src/log/log_manager.cpp   |   45 +++++++++++++++++++++++++----------
 2 files changed, 36 insertions(+), 13 deletions(-)


hooks/post-receive
-- 
GNU MyServer



From MAILER-DAEMON Wed Aug 12 14:02:05 2009
Received: from mailman by lists.gnu.org with archive (Exim 4.43)
	id 1MbI9F-0006fc-36
	for mharc-myserver-commit@gnu.org; Wed, 12 Aug 2009 14:02:05 -0400
Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43)
	id 1MbI9C-0006aM-QU
	for myserver-commit@gnu.org; Wed, 12 Aug 2009 14:02:03 -0400
Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43)
	id 1MbI9A-0006VB-Ii
	for myserver-commit@gnu.org; Wed, 12 Aug 2009 14:02:02 -0400
Received: from [199.232.76.173] (port=59199 helo=monty-python.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43) id 1MbI9A-0006V5-9c
	for myserver-commit@gnu.org; Wed, 12 Aug 2009 14:02:00 -0400
Received: from savannah.gnu.org ([199.232.41.3]:40394 helo=sv.gnu.org)
	by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32)
	(Exim 4.60) (envelope-from <gscrivano@gnu.org>) id 1MbI99-0003KR-99
	for myserver-commit@gnu.org; Wed, 12 Aug 2009 14:01:59 -0400
Received: from download.savannah.gnu.org ([199.232.41.75]
	helo=cvs.savannah.gnu.org) by sv.gnu.org with esmtp (Exim 4.69)
	(envelope-from <gscrivano@gnu.org>) id 1MbI99-0005tI-08
	for myserver-commit@gnu.org; Wed, 12 Aug 2009 18:01:59 +0000
Received: from gscrivano by cvs.savannah.gnu.org with local (Exim 4.69)
	(envelope-from <gscrivano@savannah.gnu.org>) id 1MbI96-0005sp-7m
	for myserver-commit@gnu.org; Wed, 12 Aug 2009 18:01:58 +0000
To: myserver-commit@gnu.org
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: 1e035ef322a4158bc570092a5d0d513c09163a55
X-Git-Newrev: 6004dab381a466346cc246592cde4be0cf800dfb
Message-Id: <E1MbI96-0005sp-7m@cvs.savannah.gnu.org>
From: Giuseppe Scrivano <gscrivano@gnu.org>
Date: Wed, 12 Aug 2009 18:01:57 +0000
X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2)
Subject: [myserver-commit] [SCM] GNU MyServer branch, master,
	updated. 6004dab381a466346cc246592cde4be0cf800dfb
X-BeenThere: myserver-commit@gnu.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: myserver-commit.gnu.org
List-Unsubscribe: <http://lists.gnu.org/mailman/listinfo/myserver-commit>,
	<mailto:myserver-commit-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/pipermail/myserver-commit>
List-Post: <mailto:myserver-commit@gnu.org>
List-Help: <mailto:myserver-commit-request@gnu.org?subject=help>
List-Subscribe: <http://lists.gnu.org/mailman/listinfo/myserver-commit>,
	<mailto:myserver-commit-request@gnu.org?subject=subscribe>
X-List-Received-Date: Wed, 12 Aug 2009 18:02:03 -0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU MyServer".

The branch, master has been updated
       via  6004dab381a466346cc246592cde4be0cf800dfb (commit)
      from  1e035ef322a4158bc570092a5d0d513c09163a55 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------


commit 6004dab381a466346cc246592cde4be0cf800dfb
Author: Giuseppe Scrivano <gscrivano@gnu.org>
Date:   Wed Aug 12 19:59:57 2009 +0200

    LogManager uses arguments by reference and not by copy for logging.

diff --git a/myserver/include/conf/vhost/vhost.h b/myserver/include/conf/vhost/vhost.h
index 8540c08..b841fc5 100644
--- a/myserver/include/conf/vhost/vhost.h
+++ b/myserver/include/conf/vhost/vhost.h
@@ -206,7 +206,11 @@ public:
   void setProtocolData(VhostProtocolData* data){protocolData = data;}
 
   MimeRecord* getLocationMime (string& loc){return locationsMime.get (loc);}
+
 private:
+  const static string accessLogType;
+  const static string warningLogType;
+
   VhostProtocolData*  protocolData;
 
   list<NodeTree<string>*> hashedDataTrees;
diff --git a/myserver/include/log/log_manager.h b/myserver/include/log/log_manager.h
index e01064d..22327e0 100644
--- a/myserver/include/log/log_manager.h
+++ b/myserver/include/log/log_manager.h
@@ -37,32 +37,34 @@ class LogManager
 public:
   LogManager (FiltersFactory* ff, LoggingLevel level = MYSERVER_LOG_MSG_INFO);
   ~LogManager ();
-  int add (void* owner, string type, string location,
+  int add (const void *owner, string type, string location,
            list<string>& filters, u_long cycle);
-  int remove (void* owner);
-  int log (void* owner, string message, bool appendNL = false,
-           LoggingLevel level = MYSERVER_LOG_MSG_INFO);
-  int log (void* owner, string type, string message, bool appendNL = false,
+  int remove (const void *owner);
+
+  int log (const void* owner, string & message, bool appendNL = false,
            LoggingLevel level = MYSERVER_LOG_MSG_INFO);
-  int log (void* owner, string type, string location, string message,
+  int log (const void* owner, const string & type, string & message,
            bool appendNL = false, LoggingLevel level = MYSERVER_LOG_MSG_INFO);
-  int log (void* owner, string type, string location, LoggingLevel level,
-           bool appendNL, const char *fmt, ...);
-  int log (void* owner, string type, string location, LoggingLevel level,
-           bool appendNL, const char *fmt, va_list args);
-
-  int close (void* owner);
-  int close (void* owner, string type);
-  int close (void* owner, string type, string location);
-  int chown (void* owner, string &uid, string &gid);
-  int chown (void* owner, string type, string &uid, string &gid);
-  int chown (void* owner, string type, string location, string &uid, string &gid);
-  int get (void* owner, list<string>* l);
-  int get (void* owner, string type, list<string>* l);
-  int get (void* owner, string type, string location, LogStream** ls);
-  int setCycle (void* owner, u_long cycle);
-  int setCycle (void* owner, string type, u_long cycle);
-  int setCycle (void* owner, string type, string location, u_long cycle);
+  int log (const void* owner, const string & type, const string & location,
+           string & message, bool appendNL = false,
+           LoggingLevel level = MYSERVER_LOG_MSG_INFO);
+  int log (const void* owner, const string & type, const string & location,
+           LoggingLevel level, bool appendNL, const char *fmt, ...);
+  int log (const void* owner, const string & type, const string & location,
+           LoggingLevel level, bool appendNL, const char *fmt, va_list args);
+
+  int close (const void *owner);
+  int close (const void *owner, string type);
+  int close (const void *owner, string type, string location);
+  int chown (const void *owner, string &uid, string &gid);
+  int chown (const void *owner, string type, string &uid, string &gid);
+  int chown (const void *owner, string type, string location, string &uid, string &gid);
+  int get (const void *owner, list<string>* l);
+  int get (const void *owner, string type, list<string>* l);
+  int get (const void *owner, string type, string location, LogStream** ls);
+  int setCycle (const void *owner, u_long cycle);
+  int setCycle (const void *owner, string type, u_long cycle);
+  int setCycle (const void *owner, string type, string location, u_long cycle);
   int getCycle (string location, u_long* cycle);
   int getFilters (string location, list<string>* l);
   LoggingLevel setLevel (LoggingLevel level);
@@ -70,29 +72,31 @@ public:
   void setFiltersFactory (FiltersFactory* ff);
   FiltersFactory* getFiltersFactory ();
   bool empty ();
-  bool contains (string location);
-  bool contains (void* owner);
-  bool contains (void* owner, string type);
-  bool contains (void* owner, string type, string location);
-  int count (void* owner);
-  int count (void* owner, string type);
-  int count (void* owner, string type, string location);
+  bool containsOwner (const void* owner);
+  bool contains (const string & location);
+  bool contains (const void* owner, const string & type);
+  bool contains (const void* owner, const string & type, const string &
+                 location);
+  int count (const void* owner);
+  int count (const void* owner, const string & type);
+  int count (const void* owner, const string & type, const string & location);
   int clear ();
-  int getOwnersList (string, list<void*>*);
+  int getOwnersList (string, list<const void*>*);
   list<string> getLoggingLevelsByNames ();
   map<LoggingLevel, string>& getLoggingLevels () { return loggingLevels; }
 private:
-  int notify (void* owner, string type, string location, LogStreamEvent evt,
-              void* msg = 0, void* reply = 0);
-  int notify (void* owner, string type, LogStreamEvent evt, void* msg = 0,
-              void* reply = 0);
-  int notify (void* owner, LogStreamEvent evt, void* msg = 0, void* reply = 0);
-  int add (void* owner);
-  int add (void* owner, string type);
-  int add (void* owner, string type, string location, LogStream* ls);
+  int notify (const void* owner, const string & type, const string & location,
+              LogStreamEvent evt, void* msg = NULL, void* reply = NULL);
+  int notify (const void* owner, const string & type, LogStreamEvent evt,
+              void* msg = NULL, void* reply = NULL);
+  int notify (const void* owner, LogStreamEvent evt, void* msg = 0,
+              void* reply = NULL);
+  int add (const void *owner);
+  int add (const void *owner, string type);
+  int add (const void *owner, string type, string location, LogStream* ls);
   int computeNewLine ();
   void associateLoggingLevelsWithNames ();
-  int logWriteln (string, LoggingLevel);
+  int logWriteln (const string &, LoggingLevel);
 
   LoggingLevel level;
   Mutex* mutex;
@@ -109,12 +113,12 @@ private:
   /*!
    * For each LogStream, store the list of objects that use it.
    */
-  map<string, list<void*> > logStreamOwners;
+  map<string, list<const void*> > logStreamOwners;
 
   /*!
    * For each owner, store the LogStream objects that it owns.
    */
-  map<void*, map<string, map<string, LogStream*> > > owners;
+  map<const void*, map<string, map<string, LogStream*> > > owners;
 
   /*!
    * Store the newline string for the host operating system.
diff --git a/myserver/include/log/stream/log_stream.h b/myserver/include/log/stream/log_stream.h
index fb1ccef..cf83313 100644
--- a/myserver/include/log/stream/log_stream.h
+++ b/myserver/include/log/stream/log_stream.h
@@ -1,7 +1,7 @@
 /* -*- mode: c++ -*- */
 /*
   MyServer
-  Copyright (C) 2006, 2008 Free Software Foundation, Inc.
+  Copyright (C) 2006, 2008, 2009 Free Software Foundation, Inc.
   This program 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 3 of the License, or
@@ -68,7 +68,7 @@ public:
   int setCycle (u_long cycle);
   int needToCycle ();
   list<string>& getCycledStreams ();
-  virtual int log (string message);
+  virtual int log (const string & message);
   virtual u_long streamSize ();
   virtual int chown (int uid, int gid);
   virtual int setMode (LoggingLevel level);
diff --git a/myserver/include/log/stream/socket_stream.h b/myserver/include/log/stream/socket_stream.h
index f212e95..4dddbff 100644
--- a/myserver/include/log/stream/socket_stream.h
+++ b/myserver/include/log/stream/socket_stream.h
@@ -1,7 +1,7 @@
 /* -*- mode: c++ -*- */
 /*
   MyServer
-  Copyright (C) 2006, 2008 Free Software Foundation, Inc.
+  Copyright (C) 2006, 2008, 2009 Free Software Foundation, Inc.
   This program 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 3 of the License, or
@@ -28,7 +28,6 @@
 class SocketStream : public LogStream
 {
 public:
-
   SocketStream (FiltersFactory* filtersFactory, 
                 u_long cycleLog,
                 Stream* outStream,
diff --git a/myserver/src/conf/vhost/vhost.cpp b/myserver/src/conf/vhost/vhost.cpp
index 05ff4d5..315aa23 100644
--- a/myserver/src/conf/vhost/vhost.cpp
+++ b/myserver/src/conf/vhost/vhost.cpp
@@ -32,6 +32,10 @@
 #endif
 
 
+const string Vhost::accessLogType ("ACCESSLOG");
+const string Vhost::warningLogType ("WARNINGLOG");
+
+
 /*!
  *vhost costructor
  */
@@ -162,36 +166,25 @@ void Vhost::clearIPList()
       it++;
     }
   ipListDeny.clear();
-
-  /*
-  list<StringRegex*>::iterator i = ipList.begin();
-  while(i != ipList.end())
-    {
-      StringRegex* sr = *i;
-      delete sr;
-      i++;
-    }
-  hostList.clear();
-  */
 }
 
 int
 Vhost::openAccessLog (string location, list<string>& filters, u_long cycle)
 {
-  return logManager->add (this, "ACCESSLOG", location, filters, cycle);
+  return logManager->add (this, accessLogType, location, filters, cycle);
 }
 
 int
 Vhost::openWarningLog (string location, list<string>& filters, u_long cycle)
 {
-  return logManager->add (this, "WARNINGLOG", location, filters, cycle);
+  return logManager->add (this, warningLogType, location, filters, cycle);
 }
 
 int
 Vhost::openLogFiles ()
 { 
-  return logManager->count (this, "ACCESSLOG") == 0 ||
-    logManager->count (this, "WARNINGLOG") == 0;
+  return logManager->count (this, accessLogType) == 0 ||
+    logManager->count (this, warningLogType) == 0;
 }
 
 /*!
@@ -199,12 +192,12 @@ Vhost::openLogFiles ()
  *\param ip The ip to add.
  *\param isRegex Specify if the ip is specified as a regex.
  */
-void Vhost::addIP(const char *ip, int isRegex)
+void Vhost::addIP (const char *ip, int isRegex)
 {
-  std::string sTempIp(ip);
-  IpRange *pNewRange = IpRange::RangeFactory(sTempIp);
+  std::string sTempIp (ip);
+  IpRange *pNewRange = IpRange::RangeFactory (sTempIp);
   if ( pNewRange != NULL )
-    ipListAllow.push_back(pNewRange);
+    ipListAllow.push_back (pNewRange);
 }
 
 /*!
@@ -430,7 +423,8 @@ void Vhost::addHost(const char *host, int isRegex)
 int 
 Vhost::accessesLogWrite (const char* str)
 {
-  return logManager->log (this, "ACCESSLOG", string (str));
+  string msg (str);
+  return logManager->log (this, accessLogType, msg);
 }
 
 /*!
@@ -444,7 +438,7 @@ Vhost::warningsLogWrite (const char* str)
   getLocalLogFormatDate (msg, 100);
   msg.append (" -- ");
   msg.append (str);
-  return logManager->log (this, "WARNINGLOG", msg, true);
+  return logManager->log (this, warningLogType, msg, true);
 }
 
 /*!
diff --git a/myserver/src/log/log_manager.cpp b/myserver/src/log/log_manager.cpp
index ba22a7f..fc07471 100644
--- a/myserver/src/log/log_manager.cpp
+++ b/myserver/src/log/log_manager.cpp
@@ -24,8 +24,7 @@
  * \param ff The FiltersFactory object.
  * \param level The default level of logging.
  */
-LogManager::LogManager (FiltersFactory* ff,
-                        LoggingLevel level) : level (level)
+LogManager::LogManager (FiltersFactory* ff,LoggingLevel level) : level (level)
 {
   this->ff = ff;
   lsf = new LogStreamFactory ();
@@ -100,7 +99,7 @@ LogManager::clear ()
  * \return 0 on success, 1 on error.
  */
 int
-LogManager::add (void* owner, string type, string location,
+LogManager::add (const void *owner, string type, string location,
                  list<string>& filters, u_long cycle)
 {
   mutex->lock ();
@@ -121,7 +120,7 @@ LogManager::add (void* owner, string type, string location,
       ostringstream oss;
 
       oldSize = logStreamOwners[location].size ();
-      if (!contains (owner))
+      if (!containsOwner (owner))
         {
           failure = add (owner) || add (owner, type) ||
             add (owner, type, location, logStreams[location]);
@@ -151,12 +150,12 @@ LogManager::add (void* owner, string type, string location,
  * \return 0 on success, 1 on error.
  */
 int
-LogManager::add (void* owner)
+LogManager::add (const void *owner)
 {
   int failure = 1;
   if (owner)
     {
-      if (!contains (owner))
+      if (!containsOwner (owner))
         {
           map<string, map<string, LogStream*> > type;
           owners[owner] = type;
@@ -175,7 +174,7 @@ LogManager::add (void* owner)
  * \return 0 on success, 1 on error.
  */
 int
-LogManager::add (void* owner, string type)
+LogManager::add (const void *owner, string type)
 {
   int failure = 1;
   if (type.size ())
@@ -202,25 +201,21 @@ LogManager::add (void* owner, string type)
  * \return 0 on success, 1 on error.
  */
 int
-LogManager::add (void* owner, string type, string location, LogStream* ls)
+LogManager::add (const void *owner, string type, string location, LogStream* ls)
 {
   if (!contains (location))
-    {
-      logStreams[location] = ls;
-    }
+    logStreams[location] = ls;
+
   if (!contains (owner, type, location))
-    {
-      owners[owner][type][location] = ls;
-    }
-  list<void*>* l = &logStreamOwners[location];
+    owners[owner][type][location] = ls;
+
+  list<const void*>* l = &logStreamOwners[location];
   if (find (l->begin (), l->end (), owner) == l->end ())
-    {
-      l->push_back (owner);
-    }
+    l->push_back (owner);
+
   if (contains (location) && contains (owner, type, location))
-    {
-      return 0;
-    }
+    return 0;
+
   return 1;
 }
 
@@ -236,34 +231,41 @@ LogManager::add (void* owner, string type, string location, LogStream* ls)
  * \return 0 on success, 1 on error.
  */
 int
-LogManager::remove (void* owner)
+LogManager::remove (const void *owner)
 {
-  mutex->lock ();
   int failure = 1;
-  if (contains (owner))
+
+
+  mutex->lock ();
+
+  if (!containsOwner (owner))
+    {
+      mutex->unlock ();
+      return 1;
+    }
+
+  map<string, map<string, LogStream*> >* m = &owners[owner];
+  map<string, map<string, LogStream*> >::iterator it_1;
+  for (it_1 = m->begin (); it_1 != m->end (); it_1++)
     {
-      map<string, map<string, LogStream*> >* m = &owners[owner];
-      map<string, map<string, LogStream*> >::iterator it_1;
-      for (it_1 = m->begin (); it_1 != m->end (); it_1++)
+      map<string, LogStream*> *t = &it_1->second;
+      map<string, LogStream*>::iterator it_2;
+      for (it_2 = t->begin (); it_2 != t->end (); it_2++)
         {
-          map<string, LogStream*> *t = &it_1->second;
-          map<string, LogStream*>::iterator it_2;
-          for (it_2 = t->begin (); it_2 != t->end (); it_2++)
+          logStreamOwners[it_2->first].remove (owner);
+          if (!logStreamOwners[it_2->first].size ())
             {
-              logStreamOwners[it_2->first].remove (owner);
-              if (!logStreamOwners[it_2->first].size ())
-                {
-                  delete it_2->second;
-                  logStreams.erase (it_2->first);
-                  logStreamOwners.erase (it_2->first);
-                }
+              delete it_2->second;
+              logStreams.erase (it_2->first);
+              logStreamOwners.erase (it_2->first);
             }
-          t->clear ();
         }
-      m->clear ();
-      owners.erase (owner);
-      failure = 0;
+      t->clear ();
     }
+  m->clear ();
+  owners.erase (owner);
+  failure = 0;
+
   mutex->unlock ();
   return failure;
 }
@@ -283,14 +285,14 @@ LogManager::remove (void* owner)
  * \return 0 on success, 1 on error.
  */
 int
-LogManager::notify (void* owner, string type, string location,
-                    LogStreamEvent evt, void* message, void* reply)
+LogManager::notify (const void* owner, const string & type, const string &
+                    location, LogStreamEvent evt, void* message, void* reply)
 {
   int failure = 1;
+
   if (contains (owner, type, location))
-    {
-      failure = owners[owner][type][location]->update (evt, message, reply);
-    }
+    failure = owners[owner][type][location]->update (evt, message, reply);
+
   return failure;
 }
 
@@ -308,7 +310,7 @@ LogManager::notify (void* owner, string type, string location,
  * \return 0 on success, 1 on error.
  */
 int
-LogManager::notify (void* owner, string type, LogStreamEvent evt,
+LogManager::notify (const void* owner, const string & type, LogStreamEvent evt,
                     void* message, void* reply)
 {
   int failure = 1;
@@ -318,9 +320,7 @@ LogManager::notify (void* owner, string type, LogStreamEvent evt,
       map<string, LogStream*> m = owners[owner][type];
       map<string, LogStream*>::iterator it;
       for (it = m.begin (); it != m.end (); it++)
-        {
-          failure |= notify (owner, type, it->first, evt, message, reply);
-        }
+        failure |= notify (owner, type, it->first, evt, message, reply);
     }
   return failure;
 }
@@ -337,19 +337,17 @@ LogManager::notify (void* owner, string type, LogStreamEvent evt,
  * \return 0 on success, 1 on error.
  */
 int
-LogManager::notify (void* owner, LogStreamEvent evt, void* message,
+LogManager::notify (const void* owner, LogStreamEvent evt, void* message,
                     void* reply)
 {
   int failure = 1;
-  if (contains (owner))
+  if (containsOwner (owner))
     {
       failure = 0;
       map<string, map<string, LogStream*> > m = owners[owner];
       map<string, map<string, LogStream*> >::iterator it;
       for (it = m.begin (); it != m.end (); it++)
-        {
-          failure |= notify (owner, it->first, evt, message, reply);
-        }
+        failure |= notify (owner, it->first, evt, message, reply);
     }
   return failure;
 }
@@ -364,7 +362,7 @@ LogManager::notify (void* owner, LogStreamEvent evt, void* message,
  * \return 0 on success, 1 on error.
  */
 int
-LogManager::chown (void* owner, string &uid, string &gid)
+LogManager::chown (const void *owner, string &uid, string &gid)
 {
   string message[2];
   message[0] = uid;
@@ -384,7 +382,7 @@ LogManager::chown (void* owner, string &uid, string &gid)
  * \return 0 on success, 1 on error.
  */
 int
-LogManager::chown (void* owner, string type, string &uid, string &gid)
+LogManager::chown (const void *owner, string type, string &uid, string &gid)
 {
   string message[2];
   message[0] = uid;
@@ -404,7 +402,7 @@ LogManager::chown (void* owner, string type, string &uid, string &gid)
  * \return 0 on success, 1 on error.
  */
 int
-LogManager::chown (void* owner, string type, string location, string &uid, string &gid)
+LogManager::chown (const void *owner, string type, string location, string &uid, string &gid)
 {
   string message[2];
   message[0] = uid;
@@ -425,7 +423,7 @@ LogManager::chown (void* owner, string type, string location, string &uid, strin
  * \return 0 on success, 1 on error.
  */
 int
-LogManager::log (void* owner, string message, bool appendNL,
+LogManager::log (const void* owner, string & message, bool appendNL,
                  LoggingLevel level)
 {
   int failure = 0;
@@ -437,7 +435,7 @@ LogManager::log (void* owner, string message, bool appendNL,
     {
       failure = notify (owner, MYSERVER_LOG_EVT_SET_MODE,
                         static_cast<void*>(&level))
-        || notify (owner,MYSERVER_LOG_EVT_LOG, static_cast<void*>(&message));
+        || notify (owner,MYSERVER_LOG_EVT_LOG, &message);
       if (appendNL)
         {
           LoggingLevel l = MYSERVER_LOG_MSG_PLAIN;
@@ -471,8 +469,8 @@ LogManager::log (void* owner, string message, bool appendNL,
  * \return 0 on success, 1 on error.
  */
 int
-LogManager::log (void* owner, string type, string message, bool appendNL,
-                 LoggingLevel level)
+LogManager::log (const void* owner, const string & type, string & message,
+                 bool appendNL, LoggingLevel level)
 {
   int failure = 0;
   if (level < this->level)
@@ -521,8 +519,8 @@ LogManager::log (void* owner, string type, string message, bool appendNL,
  * \return 0 on success, 1 on error.
  */
 int
-LogManager::log (void* owner, string type, string location, string message,
-                 bool appendNL, LoggingLevel level)
+LogManager::log (const void* owner, const string & type, const string & location,
+                 string & message, bool appendNL, LoggingLevel level)
 {
   int failure = 0;
   if (level < this->level)
@@ -533,9 +531,8 @@ LogManager::log (void* owner, string type, string location, string message,
   try
     {
       failure = notify (owner, type, location, MYSERVER_LOG_EVT_SET_MODE,
-                        static_cast<void*>(&level))
-        || notify (owner, type, location, MYSERVER_LOG_EVT_LOG,
-                   static_cast<void*>(&message));
+                        &level) || notify (owner, type, location,
+                                           MYSERVER_LOG_EVT_LOG, &message);
 
       if (appendNL)
         {
@@ -563,8 +560,8 @@ LogManager::log (void* owner, string type, string location, string message,
  * \return 0 on success, 1 on error.
  */
 int
-LogManager::log (void* owner, string type, string location, LoggingLevel level,
-                 bool appendNL, const char *fmt, ...)
+LogManager::log (const void* owner, const string & type, const string & location,
+                 LoggingLevel level, bool appendNL, const char *fmt, ...)
 {
   int failure = 0;
 
@@ -605,8 +602,9 @@ LogManager::log (void* owner, string type, string location, LoggingLevel level,
  * \return 0 on success, 1 on error.
  */
 int
-LogManager::log (void* owner, string type, string location, LoggingLevel level,
-                 bool appendNL, const char *fmt, va_list args)
+LogManager::log (const void* owner, const string & type, const string &
+                 location, LoggingLevel level, bool appendNL, const char *fmt,
+                 va_list args)
 {
   int failure = 0;
 
@@ -655,13 +653,11 @@ LogManager::log (void* owner, string type, string location, LoggingLevel level,
       string message = oss.str ();
 
       failure = notify (owner, type, location, MYSERVER_LOG_EVT_SET_MODE,
-                        static_cast<void*>(&level))
-        || notify (owner, type, location, MYSERVER_LOG_EVT_LOG,
-                   static_cast<void*>(&message));
+                        static_cast<void*>(&level)) || notify (owner, type,
+                                 location, MYSERVER_LOG_EVT_LOG, &message);
 
       if (appendNL)
-        failure |= notify (owner, MYSERVER_LOG_EVT_LOG,
-                           static_cast<void*>(&newline));
+        failure |= notify (owner, MYSERVER_LOG_EVT_LOG, &newline);
     }
   catch (...)
     {
@@ -682,7 +678,7 @@ LogManager::log (void* owner, string type, string location, LoggingLevel level,
  * \return 0 on success, 1 on error.
  */
 int
-LogManager::close (void* owner)
+LogManager::close (const void *owner)
 {
   return notify (owner, MYSERVER_LOG_EVT_CLOSE);
 }
@@ -697,7 +693,7 @@ LogManager::close (void* owner)
  * \return 0 on success, 1 on error.
  */
 int
-LogManager::close (void* owner, string type)
+LogManager::close (const void *owner, string type)
 {
   return notify (owner, type, MYSERVER_LOG_EVT_CLOSE);
 }
@@ -712,7 +708,7 @@ LogManager::close (void* owner, string type)
  * \return 0 on success, 1 on error.
  */
 int
-LogManager::close (void* owner, string type, string location)
+LogManager::close (const void *owner, string type, string location)
 {
   return notify (owner, type, location, MYSERVER_LOG_EVT_CLOSE);
 }
@@ -727,7 +723,7 @@ LogManager::close (void* owner, string type, string location)
  * \return 0 on success, 1 on error.
  */
 int
-LogManager::setCycle (void* owner, u_long cycle)
+LogManager::setCycle (const void *owner, u_long cycle)
 {
   return notify (owner, MYSERVER_LOG_EVT_SET_CYCLE, static_cast<void*>(&cycle));
 }
@@ -743,7 +739,7 @@ LogManager::setCycle (void* owner, u_long cycle)
  * \return 0 on success, 1 on error.
  */
 int
-LogManager::setCycle (void* owner, string type, u_long cycle)
+LogManager::setCycle (const void *owner, string type, u_long cycle)
 {
   return notify (owner, type, MYSERVER_LOG_EVT_SET_CYCLE, static_cast<void*>(&cycle));
 }
@@ -760,7 +756,7 @@ LogManager::setCycle (void* owner, string type, u_long cycle)
  * \return 0 on success, 1 on error.
  */
 int
-LogManager::setCycle (void* owner, string type, string location, u_long cycle)
+LogManager::setCycle (const void *owner, string type, string location, u_long cycle)
 {
   return notify (owner, type, location, MYSERVER_LOG_EVT_SET_CYCLE,
                  static_cast<void*>(&cycle));
@@ -798,9 +794,9 @@ LogManager::getCycle (string location, u_long* cycle)
  * \return 0 on success, 1 on error.
  */
 int
-LogManager::get (void* owner, list<string>* l)
+LogManager::get (const void *owner, list<string>* l)
 {
-  if (contains (owner))
+  if (containsOwner (owner))
     {
       l->clear ();
       map<string, map<string, LogStream*> > m = owners[owner];
@@ -830,7 +826,7 @@ LogManager::get (void* owner, list<string>* l)
  * \return 0 on success, 1 on error.
  */
 int
-LogManager::get (void* owner, string type, list<string>* l)
+LogManager::get (const void *owner, string type, list<string>* l)
 {
   if (contains (owner, type))
     {
@@ -860,7 +856,7 @@ LogManager::get (void* owner, string type, list<string>* l)
  * \return 0 on success, 1 on error.
  */
 int
-LogManager::get (void* owner, string type, string location, LogStream** ls)
+LogManager::get (const void *owner, string type, string location, LogStream** ls)
 {
   if (contains (owner, type, location))
     {
@@ -970,10 +966,10 @@ LogManager::empty ()
  * \return true if `location' is already present within the LogManager.
  */
 bool
-LogManager::contains (string location)
+LogManager::contains (const string & location)
 {
-  return logStreams.count (location) > 0 &&
-    logStreamOwners[location].size ();
+  return logStreams.count (location) > 0
+    && logStreamOwners[location].size ();
 }
 
 /*!
@@ -986,7 +982,7 @@ LogManager::contains (string location)
  * \return true if `owner' is actually present within the LogManager.
  */
 bool
-LogManager::contains (void* owner)
+LogManager::containsOwner (const void* owner)
 {
   return owners.count (owner) > 0;
 }
@@ -1001,7 +997,7 @@ LogManager::contains (void* owner)
  * \return true if the tupe <owner, type> exists.
  */
 bool
-LogManager::contains (void* owner, string type)
+LogManager::contains (const void* owner, const string & type)
 {
   return owners[owner].count (type) > 0;
 }
@@ -1017,7 +1013,8 @@ LogManager::contains (void* owner, string type)
  * \return true if the unique <owner, type, location> tuple exists.
  */
 bool
-LogManager::contains (void* owner, string type, string location)
+LogManager::contains (const void* owner, const string & type, const string &
+                      location)
 {
   return owners[owner][type].count (location) > 0 &&
     (find (logStreamOwners[location].begin (), logStreamOwners[location].end (), owner) !=
@@ -1034,7 +1031,7 @@ LogManager::contains (void* owner, string type, string location)
  * its log categories.
  */
 int
-LogManager::count (void* owner)
+LogManager::count (const void* owner)
 {
   int size = 0;
   map<string, map<string, LogStream*> > m = owners[owner];
@@ -1056,7 +1053,7 @@ LogManager::count (void* owner)
  * \return The number of LogStream objects that belong to `type'.
  */
 int
-LogManager::count (void* owner, string type)
+LogManager::count (const void* owner, const string & type)
 {
   return owners[owner][type].size ();
 }
@@ -1073,7 +1070,8 @@ LogManager::count (void* owner, string type)
  * be greater than 1, since the tuple <owner, type, location> is a key.
  */
 int
-LogManager::count (void* owner, string type, string location)
+LogManager::count (const void* owner, const string & type, const string &
+                   location)
 {
   return owners[owner][type].count (location);
 }
@@ -1087,7 +1085,7 @@ LogManager::count (void* owner, string type, string location)
  * \return 0 if location is owned at least by an object, 1 else.
  */
 int
-LogManager::getOwnersList (string location, list<void*>* l)
+LogManager::getOwnersList (string location, list<const void*>* l)
 {
   if (contains (location))
     {
@@ -1106,12 +1104,11 @@ LogManager::getOwnersList (string location, list<void*>* l)
  * \return 0 on success, 1 on error.
  */
 int
-LogManager::logWriteln (string msg, LoggingLevel l)
+LogManager::logWriteln (const string & msg, LoggingLevel l)
 {
   if (Server::getInstance ())
-    {
-      return Server::getInstance ()->logWriteln (msg.c_str (), l);
-    }
+    return Server::getInstance ()->logWriteln (msg.c_str (), l);
+
   return 1;
 }
 
diff --git a/myserver/src/log/stream/log_stream.cpp b/myserver/src/log/stream/log_stream.cpp
index 0245c2d..3faee99 100644
--- a/myserver/src/log/stream/log_stream.cpp
+++ b/myserver/src/log/stream/log_stream.cpp
@@ -1,6 +1,6 @@
 /*
   MyServer
-  Copyright (C) 2006, 2008 Free Software Foundation, Inc.
+  Copyright (C) 2006, 2008, 2009 Free Software Foundation, Inc.
   This program 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 3 of the License, or
@@ -46,7 +46,7 @@ LogStream::resetFilters ()
 }
 
 int
-LogStream::log (string message)
+LogStream::log (const string & message)
 {
   mutex->lock ();
   int success = 0;
@@ -127,38 +127,29 @@ LogStream::update (LogStreamEvent evt, void* message, void* reply)
   switch (evt)
     {
     case MYSERVER_LOG_EVT_SET_CYCLE:
-      {
-        return !isOpened || setCycle (*static_cast<u_long*>(message));
-      }
-      break;
+      return !isOpened || setCycle (*static_cast<u_long*>(message));
+
     case MYSERVER_LOG_EVT_LOG:
-      {
-        return !isOpened || log (*static_cast<string*>(message));
-      }
-      break;
+      return !isOpened || log (*static_cast<string*>(message));
+
     case MYSERVER_LOG_EVT_CLOSE:
-      {
-        return !isOpened || close ();
-      }
-      break;
+      return !isOpened || close ();
+
     case MYSERVER_LOG_EVT_ADD_FILTER:
-      {
-        return !isOpened || addFilter (static_cast<Filter*>(message));
-      }
-      break;
+      return !isOpened
+        || addFilter (static_cast<Filter*>(message));
+
     case MYSERVER_LOG_EVT_CHOWN:
-      {
-        return !isOpened || chown (static_cast<int*>(message)[0], 
+        return !isOpened || chown (static_cast<int*>(message)[0],
                                    static_cast<int*>(message)[1]);
-      }
-      break;
+
     case MYSERVER_LOG_EVT_SET_MODE:
-      {
-        return !isOpened || setMode (*static_cast<LoggingLevel*>(message));
-      }
-    default:
-      return 1;
+        return !isOpened
+          || setMode (*static_cast<LoggingLevel*>(message));
+
     }
+
+  return 1;
 }
 
 int
diff --git a/myserver/src/server/server.cpp b/myserver/src/server/server.cpp
index 6585797..451abfa 100644
--- a/myserver/src/server/server.cpp
+++ b/myserver/src/server/server.cpp
@@ -100,10 +100,9 @@ void
 Server::initLogManager ()
 {
   if (!logLocation.size ())
-    {
-      logLocation.assign ("console://stdout");
-    }
-  if (!logManager->contains (this))
+    logLocation.assign ("console://stdout");
+
+  if (!logManager->containsOwner (this))
     {
       list<string> filters;
       logManager->add (this, "MAINLOG", logLocation, filters, 0);
@@ -607,7 +606,8 @@ void Server::mainLoop()
           if (logLocation.find ("console://") != string::npos)
             {
               char beep[] = { static_cast<char>(0x7), '\0' };
-              logManager->log (this, "MAINLOG", logLocation, string (beep));
+              string beepStr (beep);
+              logManager->log (this, "MAINLOG", logLocation, beepStr);
             }
           logWriteln("Reloading MIMEtypes.xml");
 
@@ -627,7 +627,8 @@ void Server::mainLoop()
           if (logLocation.find ("console://") != string::npos)
             {
               char beep[] = { static_cast<char>(0x7), '\0' };
-              logManager->log (this, "MAINLOG", logLocation, string (beep));
+              string beepStr (beep);
+              logManager->log (this, "MAINLOG", logLocation, beepStr);
             }
 
           logWriteln("Rebooting...");
@@ -677,7 +678,9 @@ void Server::logWriteNTimes(string str, unsigned n)
 {
   while (n--)
     logManager->log (this, "MAINLOG", logLocation, str);
-  logManager->log(this, "MAINLOG", logLocation, string (""), true);
+
+  string msg("");
+  logManager->log (this, "MAINLOG", logLocation, msg, true);
 }
 
 /*!
@@ -732,7 +735,8 @@ void Server::displayBoot()
     {
       ostringstream err;
       err << "Error: " << e.what();
-      logManager->log (this, "MAINLOG", logLocation, err.str (), true);
+      string str = err.str ();
+      logManager->log (this, "MAINLOG", logLocation, str, true);
       return;
     }
     catch(...)
@@ -1741,7 +1745,8 @@ int Server::reboot()
   if (logLocation.find ("console://") != string::npos)
   {
     char beep[] = { static_cast<char>(0x7), '\0' };
-    logManager->log (this, "MAINLOG", logLocation, string (beep));
+    string beepStr (beep);
+    logManager->log (this, "MAINLOG", logLocation, beepStr);
   }
 
   logWriteln("Rebooting...");
@@ -2045,10 +2050,12 @@ int Server::logWriteln(char const* str, LoggingLevel level)
     time[len + 3] = '-';
     time[len + 4] = ' ';
     time[len + 5] = '\0';
-    if (logManager->log (this, "MAINLOG", logLocation, string (time), false, level))
+    string timestr (time);
+    if (logManager->log (this, "MAINLOG", logLocation, timestr, false, level))
       return 1;
   }
-  return logManager->log (this, "MAINLOG", logLocation, string (str), true, level);
+  string msg (str);
+  return logManager->log (this, "MAINLOG", logLocation, msg, true, level);
 }
 
 /*!
diff --git a/myserver/tests/test_log_manager.cpp b/myserver/tests/test_log_manager.cpp
index 6cdad40..a7ac8bc 100644
--- a/myserver/tests/test_log_manager.cpp
+++ b/myserver/tests/test_log_manager.cpp
@@ -5,12 +5,12 @@
   it under the terms of the GNU General Public License as published by
   the Free Software Foundation; either version 3 of the License, or
   (at your option) any later version.
- 
-  This program is distributed in the hope that it will be useful, 
+
+  This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   GNU General Public License for more details.
- 
+
   You should have received a copy of the GNU General Public License
   along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
@@ -78,7 +78,7 @@ class TestLogManager : public CppUnit::TestFixture
   CPPUNIT_TEST (testLogOnAClosedLogStream);
   CPPUNIT_TEST (testChown);
   CPPUNIT_TEST_SUITE_END ();
-  
+
   class AnObject
   {
   };
@@ -97,7 +97,7 @@ public:
   {
     CPPUNIT_ASSERT (lm->empty ());
   }
-  
+
   void testNotEmpty ()
   {
     list<string> filters;
@@ -115,10 +115,10 @@ public:
   void testContainsOwner ()
   {
     list<string> filters;
-    
+
     lm->add (this, "test", "file://foo", filters, 0);
 
-    CPPUNIT_ASSERT (lm->contains (this));
+    CPPUNIT_ASSERT (lm->containsOwner (this));
   }
 
   void testFileStreamAdd ()
@@ -140,7 +140,7 @@ public:
     lm->add (this, "test", "file://foo", filters, 0);
     lm->remove (this);
 
-    CPPUNIT_ASSERT (!lm->contains (this));
+    CPPUNIT_ASSERT (!lm->containsOwner (this));
   }
 
   void testFileStreamLog ()
@@ -162,7 +162,7 @@ public:
 
     CPPUNIT_ASSERT (!message.compare (buf));
   }
-  
+
   void testFileStreamClose ()
   {
     list<string> filters;
@@ -236,7 +236,8 @@ public:
     lm->add (this, "test", "file://foo", filters, 0);
     lm->setLevel (MYSERVER_LOG_MSG_WARNING);
 
-    CPPUNIT_ASSERT (!lm->log (this, "test", "a message", false, MYSERVER_LOG_MSG_ERROR));
+    string msg ("a message");
+    CPPUNIT_ASSERT (!lm->log (this, "test", msg, false, MYSERVER_LOG_MSG_ERROR));
   }
 
   void testMessageLevelLessThanLogManagerOne ()
@@ -247,7 +248,8 @@ public:
     lm->add (this, "test", "file://foo", filters, 0);
     lm->setLevel (MYSERVER_LOG_MSG_WARNING);
 
-    CPPUNIT_ASSERT (lm->log (this, "test", "a message", false, MYSERVER_LOG_MSG_INFO));
+    string msg ("a message");
+    CPPUNIT_ASSERT (lm->log (this, "test", msg, false, MYSERVER_LOG_MSG_INFO));
   }
 
   void testMessageLevelEqualToLogManagerOne ()
@@ -258,7 +260,8 @@ public:
     lm->add (this, "test", "file://foo", filters, 0);
     lm->setLevel (MYSERVER_LOG_MSG_WARNING);
 
-    CPPUNIT_ASSERT (!lm->log (this, "test", "a message", false, MYSERVER_LOG_MSG_WARNING));    
+    string msg ("a message");
+    CPPUNIT_ASSERT (!lm->log (this, "test", msg, false, MYSERVER_LOG_MSG_WARNING));
   }
 
   void testClear ()
@@ -273,7 +276,7 @@ public:
 
     CPPUNIT_ASSERT (lm->empty ());
   }
-  
+
   void testLogThroughGzip ()
   {
     list<string> filters;
@@ -293,7 +296,7 @@ public:
     f.openFile ("fooz", File::READ | File::OPEN_IF_EXISTS);
     f.read (gzipChainComp, 64, &nbr);
     f.close ();
-    gzdc.decompress (&gzipChainComp[gzdc.headerSize ()], 
+    gzdc.decompress (&gzipChainComp[gzdc.headerSize ()],
                      nbr - gzdc.headerSize (),
                      gzipChainDecomp, 64);
     gzipChainDecomp[message.size ()] = '\0';
@@ -320,7 +323,7 @@ public:
     list<string>::iterator it;
     LogStream* ls;
     FilesUtility::deleteFile ("fooc");
-    
+
     filters.push_back ("gzip");
     lm->add (this, "test", "file://fooc", filters, cycleLog);
     lm->log (this, "test", "file://fooc", message);
@@ -328,7 +331,7 @@ public:
     f.openFile ("fooc", File::READ | File::OPEN_IF_EXISTS);
     f.read (gzipComp, 128, &nbr);
     f.close ();
-    gzdc.decompress (&gzipComp[gzdc.headerSize ()], 
+    gzdc.decompress (&gzipComp[gzdc.headerSize ()],
                      nbr - gzdc.headerSize (),
                      gzipDecomp, 128);
     gzipDecomp[message1.size ()] = '\0';
@@ -340,7 +343,7 @@ public:
         f.openFile (*it, File::READ | File::OPEN_IF_EXISTS);
         f.read (gzipComp, 128, &nbr);
         f.close ();
-        gzdc.decompress (&gzipComp[gzdc.headerSize ()], 
+        gzdc.decompress (&gzipComp[gzdc.headerSize ()],
                          nbr - gzdc.headerSize (),
                          gzipDecomp, 128);
         gzipDecomp[message.size ()] = '\0';
@@ -389,7 +392,7 @@ public:
 
     CPPUNIT_ASSERT_EQUAL (lm->count (this), 3);
   }
-  
+
   void testGetWhenNotOwningAnyLogStream ()
   {
     list<string> l;
@@ -411,7 +414,7 @@ public:
     tmp.push_back ("console://stdout");
     tmp.push_back ("console://stderr");
     lm->get (this, &l);
-    tmp.sort (); 
+    tmp.sort ();
     l.sort ();
 
     CPPUNIT_ASSERT (tmp == l);
@@ -430,12 +433,12 @@ public:
     tmp.push_back ("file://foo");
     tmp.push_back ("console://stdout");
     lm->get (this, "test", &l);
-    tmp.sort (); 
+    tmp.sort ();
     l.sort ();
 
     CPPUNIT_ASSERT (tmp == l);
   }
-  
+
   void testGetASingleExistingLogStream ()
   {
     list<string> filters;
@@ -452,12 +455,12 @@ public:
     list<string> filters;
     LogStream* ls;
     FilesUtility::deleteFile ("foo");
-    
+
     lm->add (this, "test", "file://foo", filters, 0);
 
     CPPUNIT_ASSERT (lm->get (this, "test", "file://bar", &ls));
   }
-  
+
   void testReOpen ()
   {
     list<string> filters;
@@ -559,7 +562,7 @@ public:
   {
     list<string> filters;
     AnObject anObject;
-    list<void*> l;
+    list<const void*> l;
     LogStream* ls;
     LogStream* ls1;
     FilesUtility::deleteFile ("foo");
@@ -576,7 +579,7 @@ public:
   void testGetLogStreamSharedByTheSameObject ()
   {
     list<string> filters;
-    list<void*> l;
+    list<const void*> l;
     LogStream* ls;
     LogStream* ls1;
     FilesUtility::deleteFile ("foo");
@@ -595,7 +598,7 @@ public:
     list<string> filters;
     AnObject anObject;
     AnObject anotherObject;
-    list<void*> l;
+    list<const void*> l;
     FilesUtility::deleteFile ("foo");
 
     lm->add (this, "test", "file://foo", filters, 0);
@@ -612,15 +615,15 @@ public:
     list<string> filters;
     AnObject anObject;
     AnObject anotherObject;
-    list<void*> l;
-    
+    list<const void*> l;
+
     lm->add (this, "test", "file://foo", filters, 0);
     lm->add (&anObject, "test1", "file://foo", filters, 0);
     lm->add (&anotherObject, "test2", "file://foo", filters, 0);
     lm->remove (this);
     lm->remove (&anObject);
     lm->remove (&anotherObject);
-    
+
     CPPUNIT_ASSERT (!lm->contains ("file://foo"));
   }
 
@@ -631,8 +634,8 @@ public:
 
     lm->add (this, "test", "file://foo", filters, 0);
     lm->close (this, "test", "file://foo");
-
-    CPPUNIT_ASSERT (lm->log (this, "test", "file://foo", "message"));
+    string msg ("message");
+    CPPUNIT_ASSERT (lm->log (this, "test", "file://foo", msg));
   }
 
   void testChown ()

-----------------------------------------------------------------------

Summary of changes:
 myserver/include/conf/vhost/vhost.h         |    4 +
 myserver/include/log/log_manager.h          |   88 ++++++------
 myserver/include/log/stream/log_stream.h    |    4 +-
 myserver/include/log/stream/socket_stream.h |    3 +-
 myserver/src/conf/vhost/vhost.cpp           |   36 ++---
 myserver/src/log/log_manager.cpp            |  197 +++++++++++++--------------
 myserver/src/log/stream/log_stream.cpp      |   45 +++----
 myserver/src/server/server.cpp              |   29 +++--
 myserver/tests/test_log_manager.cpp         |   65 +++++----
 9 files changed, 235 insertions(+), 236 deletions(-)


hooks/post-receive
-- 
GNU MyServer



From MAILER-DAEMON Wed Aug 12 16:58:15 2009
Received: from mailman by lists.gnu.org with archive (Exim 4.43)
	id 1MbKti-00075x-Nq
	for mharc-myserver-commit@gnu.org; Wed, 12 Aug 2009 16:58:14 -0400
Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43)
	id 1MbKth-000754-8W
	for myserver-commit@gnu.org; Wed, 12 Aug 2009 16:58:13 -0400
Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43)
	id 1MbKte-00074M-CK
	for myserver-commit@gnu.org; Wed, 12 Aug 2009 16:58:11 -0400
Received: from [199.232.76.173] (port=48391 helo=monty-python.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43) id 1MbKte-00074J-64
	for myserver-commit@gnu.org; Wed, 12 Aug 2009 16:58:10 -0400
Received: from savannah.gnu.org ([199.232.41.3]:48423 helo=sv.gnu.org)
	by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32)
	(Exim 4.60) (envelope-from <gscrivano@gnu.org>) id 1MbKtc-00085a-Dv
	for myserver-commit@gnu.org; Wed, 12 Aug 2009 16:58:09 -0400
Received: from download.savannah.gnu.org ([199.232.41.75]
	helo=cvs.savannah.gnu.org) by sv.gnu.org with esmtp (Exim 4.69)
	(envelope-from <gscrivano@gnu.org>) id 1MbKtb-00083r-Sb
	for myserver-commit@gnu.org; Wed, 12 Aug 2009 20:58:08 +0000
Received: from gscrivano by cvs.savannah.gnu.org with local (Exim 4.69)
	(envelope-from <gscrivano@savannah.gnu.org>) id 1MbKtX-00083B-W6
	for myserver-commit@gnu.org; Wed, 12 Aug 2009 20:58:07 +0000
To: myserver-commit@gnu.org
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: 6004dab381a466346cc246592cde4be0cf800dfb
X-Git-Newrev: 6f9f8c5b6e38a19813f4408c6fad2edf5f24d065
Message-Id: <E1MbKtX-00083B-W6@cvs.savannah.gnu.org>
From: Giuseppe Scrivano <gscrivano@gnu.org>
Date: Wed, 12 Aug 2009 20:58:05 +0000
X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2)
Subject: [myserver-commit] [SCM] GNU MyServer branch, master,
	updated. 6f9f8c5b6e38a19813f4408c6fad2edf5f24d065
X-BeenThere: myserver-commit@gnu.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: myserver-commit.gnu.org
List-Unsubscribe: <http://lists.gnu.org/mailman/listinfo/myserver-commit>,
	<mailto:myserver-commit-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/pipermail/myserver-commit>
List-Post: <mailto:myserver-commit@gnu.org>
List-Help: <mailto:myserver-commit-request@gnu.org?subject=help>
List-Subscribe: <http://lists.gnu.org/mailman/listinfo/myserver-commit>,
	<mailto:myserver-commit-request@gnu.org?subject=subscribe>
X-List-Received-Date: Wed, 12 Aug 2009 20:58:13 -0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU MyServer".

The branch, master has been updated
       via  6f9f8c5b6e38a19813f4408c6fad2edf5f24d065 (commit)
       via  90cb83ecf65cced0e6479b8c94d991bcd3a1c807 (commit)
      from  6004dab381a466346cc246592cde4be0cf800dfb (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------


commit 6f9f8c5b6e38a19813f4408c6fad2edf5f24d065
Author: Giuseppe Scrivano <gscrivano@gnu.org>
Date:   Wed Aug 12 22:51:40 2009 +0200

    The server class logs using a formatting string.

diff --git a/myserver/include/server/server.h b/myserver/include/server/server.h
index e78299e..320bdc3 100644
--- a/myserver/include/server/server.h
+++ b/myserver/include/server/server.h
@@ -135,6 +135,7 @@ public:
   void stop();
   void finalCleanup();
   int terminate();
+  int logWriteln (LoggingLevel level, const char *fmt, ...);
   int logWriteln(char const*, LoggingLevel level = MYSERVER_LOG_MSG_INFO);
   int logWriteln(string const &str)
     {return logWriteln(str.c_str());};
diff --git a/myserver/src/conf/vhost/vhost.cpp b/myserver/src/conf/vhost/vhost.cpp
index 315aa23..9ca27cf 100644
--- a/myserver/src/conf/vhost/vhost.cpp
+++ b/myserver/src/conf/vhost/vhost.cpp
@@ -26,9 +26,9 @@
 #include <include/conf/vhost/ip.h>
 
 #ifdef HAVE_IDN
-#include <stringprep.h>
-#include <punycode.h>
-#include <idna.h>
+# include <stringprep.h>
+# include <punycode.h>
+# include <idna.h>
 #endif
 
 
@@ -37,7 +37,7 @@ const string Vhost::warningLogType ("WARNINGLOG");
 
 
 /*!
- *vhost costructor
+ * Vhost costructor
  */
 Vhost::Vhost(LogManager* lm)
 {
@@ -50,9 +50,9 @@ Vhost::Vhost(LogManager* lm)
   protocolData = 0;
 
   /*
-   *By default use a non specified value for the throttling rate. -1 means 
-   *that the throttling rate was not specified, while 0 means it was 
-   *specified but there is not a limit.
+   * By default use a non specified value for the throttling rate. -1 means
+   * that the throttling rate was not specified, while 0 means it was
+   * specified but there is not a limit.
    */
   throttlingRate = (u_long) -1;
   refCount = 0;
@@ -63,7 +63,7 @@ Vhost::Vhost(LogManager* lm)
 
 
 /*!
- *Destroy the vhost. 
+ * Destroy the vhost.
  */
 Vhost::~Vhost()
 {
@@ -90,9 +90,9 @@ Vhost::~Vhost()
   logManager->remove (this);
 }
 
-/*! 
- *Clear the data dictionary. 
- *Returns zero on success.
+/*!
+ * Clear the data dictionary.
+ * Returns zero on success.
  */
 int Vhost::freeHashedData()
 {
@@ -116,7 +116,7 @@ int Vhost::freeHashedData()
 }
 
 /*!
- *Check if a MIME type file is defined for the virtual host.
+ * Check if a MIME type file is defined for the virtual host.
  */
 int Vhost::isMIME()
 {
@@ -124,7 +124,7 @@ int Vhost::isMIME()
 }
 
 /*!
- *Get the MIME manager for the virtual host.
+ * Get the MIME manager for the virtual host.
  */
 MimeManager* Vhost::getMIME()
 {
@@ -132,7 +132,7 @@ MimeManager* Vhost::getMIME()
 }
 
 /*!
- *Clear the list of the hosts.
+ * Clear the list of the hosts.
  */
 void Vhost::clearHostList()
 {
@@ -147,7 +147,7 @@ void Vhost::clearHostList()
 }
 
 /*!
- *Clear the list of IPs.
+ * Clear the list of IPs.
  */
 void Vhost::clearIPList()
 {
@@ -182,15 +182,15 @@ Vhost::openWarningLog (string location, list<string>& filters, u_long cycle)
 
 int
 Vhost::openLogFiles ()
-{ 
+{
   return logManager->count (this, accessLogType) == 0 ||
     logManager->count (this, warningLogType) == 0;
 }
 
 /*!
- *Add an IP address to the list.
- *\param ip The ip to add.
- *\param isRegex Specify if the ip is specified as a regex.
+ * Add an IP address to the list.
+ * \param ip The ip to add.
+ * \param isRegex Specify if the ip is specified as a regex.
  */
 void Vhost::addIP (const char *ip, int isRegex)
 {
@@ -201,39 +201,20 @@ void Vhost::addIP (const char *ip, int isRegex)
 }
 
 /*!
- *Remove the IP address to the list.
- *\param ip The ip to remove.
+ * Remove the IP address to the list.
+ * \param ip The ip to remove.
  */
 void Vhost::removeIP(const char *ip)
 {
-  std::string sTempIp(ip);
-  ipListDeny.push_back(IpRange::RangeFactory(sTempIp));
-
-  /*
-  list<StringRegex*>::iterator i = ipList.begin();
-
-  while(i != ipList.end())
-    {
-      StringRegex* sr = *i;
-      / *
-       *If this is the virtual host with the right IP.
-       * /
-      if(!stringcmp(sr->name,ip))
-        {
-          ipList.erase(i);
-          return;
-        }
-    
-      i++;
-    }
-  */
+  std::string sTempIp (ip);
+  ipListDeny.push_back (IpRange::RangeFactory (sTempIp));
 }
 
 /*!
- *Remove the host address to the list.
- *\param host The hostname to remove.
+ * Remove the host address to the list.
+ * \param host The hostname to remove.
  */
-void Vhost::removeHost(const char *host)
+void Vhost::removeHost (const char *host)
 {
   list<StringRegex*>::iterator i = hostList.begin();
 
@@ -241,27 +222,27 @@ void Vhost::removeHost(const char *host)
     {
       StringRegex* sr = *i;
       /*
-       *If this is the virtual host with the right IP.
+       * If this is the virtual host with the right IP.
        */
       if(!stringcmp(sr->name, host))
         {
           hostList.erase(i);
           return;
         }
-    
+
       i++;
     }
 }
 /*!
- *Check if an host is allowed to the connection
- *\param host hostname to check.
+ * Check if an host is allowed to the connection
+ * \param host hostname to check.
  */
 int Vhost::isHostAllowed(const char* host)
 {
   /* If no hosts are specified then every host is allowed to connect here.  */
   if(!hostList.size() || !host)
     return 1;
-    
+
   list<StringRegex*>::iterator i = hostList.begin();
   while(i != hostList.end())
     {
@@ -274,17 +255,17 @@ int Vhost::isHostAllowed(const char* host)
               return 1;
             }
         }
-    
+
       if(!stringcmp(sr->name, host))
         return 1;
-      
+
       i++;
     }
   return 0;
 }
 
 /*!
- *Check if all the host are allowed to the connection.
+ * Check if all the host are allowed to the connection.
  */
 int Vhost::areAllHostAllowed()
 {
@@ -294,23 +275,19 @@ int Vhost::areAllHostAllowed()
 }
 
 /*!
- *Check if all the IPs are allowed to the connection.
+ * Check if all the IPs are allowed to the connection.
  */
 int Vhost::areAllIPAllowed()
 {
-  /*
-  if(ipList.size() == 0)
-    return 1;
-  */
   if ( ipListDeny.empty() && ipListAllow.empty() )
     return 1;
   return 0;
 }
 
 /*!
- *Check if the network is allowed to the connection(control the network 
- *by the local IP).
- *\param ip The IP to check.
+ * Check if the network is allowed to the connection(control the network
+ * by the local IP).
+ * \param ip The IP to check.
  */
 int Vhost::isIPAllowed(const char* ip)
 {
@@ -341,37 +318,12 @@ int Vhost::isIPAllowed(const char* ip)
     }
   delete pTempIp;
   return 0;
-  /*
-  / * If no IPs are specified then every host is allowed to connect here.  * /
-  if(!ipList.size() || !ip)
-    return 1;
-    
-  list<StringRegex*>::iterator i = ipList.begin();
-  while(i != ipList.end())
-    {
-      StringRegex* sr = *i;
-      regmatch_t pm;
-      if(sr->regex.isCompiled())
-        {
-          if (!sr->regex.exec(ip ,1, &pm, REG_NOTBOL))
-            {
-              return 1;
-            }
-        }
-    
-      if(!stringcmp(sr->name, ip))
-        return 1;
-      
-      i++;
-    }
-  */
-  return 0;
 }
 
 /*!
- *Add an host to the allowed host list.
- *\param host hostname to add.
- *\param isRegex Is the host a regex?
+ * Add an host to the allowed host list.
+ * \param host hostname to add.
+ * \param isRegex Is the host a regex?
  */
 void Vhost::addHost(const char *host, int isRegex)
 {
@@ -394,9 +346,9 @@ void Vhost::addHost(const char *host, int isRegex)
   ret = idna_to_ascii_4z (ucs4, &ascii, 0);
 
   free(ucs4);
-  
+
   if (ret != IDNA_SUCCESS)
-    {   
+    {
       delete hl;
       return;
     }
@@ -420,7 +372,7 @@ void Vhost::addHost(const char *host, int isRegex)
  * Write to the accesses log.
  * \param str The line to log.
  */
-int 
+int
 Vhost::accessesLogWrite (const char* str)
 {
   string msg (str);
@@ -442,9 +394,9 @@ Vhost::warningsLogWrite (const char* str)
 }
 
 /*!
- *Set the null reference callback function. It is called when the reference
- *counter for the virtual host is zero. 
- *\param cb The null references callback function.
+ * Set the null reference callback function. It is called when the reference
+ * counter for the virtual host is zero.
+ * \param cb The null references callback function.
  */
 void Vhost::setNullRefCB(NULL_REFERENCECB cb)
 {
@@ -452,15 +404,15 @@ void Vhost::setNullRefCB(NULL_REFERENCECB cb)
 }
 
 /*!
- *Get the null reference callback function used by the virtual host.
+ * Get the null reference callback function used by the virtual host.
  */
 NULL_REFERENCECB Vhost::getNullRefCB()
 {
-  return nullReferenceCb;               
+  return nullReferenceCb;
 }
 
 /*!
- *Increment current references counter by 1.
+ * Increment current references counter by 1.
  */
 void Vhost::addRef()
 {
@@ -470,15 +422,15 @@ void Vhost::addRef()
 }
 
 /*!
- *Decrement current references counter by 1.
+ * Decrement current references counter by 1.
  */
 void Vhost::removeRef()
 {
   refMutex.lock(0);
   refCount--;
-  /*! 
-   *If the reference count reaches zero and a callback 
-   *function is defined call it.
+  /*!
+   * If the reference count reaches zero and a callback
+   * function is defined call it.
    */
   if(refCount == 0 && nullReferenceCb)
     nullReferenceCb(this);
@@ -486,7 +438,7 @@ void Vhost::removeRef()
 }
 
 /*!
- *Get the references counter.
+ * Get the references counter.
  */
 int Vhost::getRef()
 {
@@ -494,17 +446,17 @@ int Vhost::getRef()
 }
 
 /*!
- *Set the reference counter for the virtual host.
- *\param n The new reference counter.
+ * Set the reference counter for the virtual host.
+ * \param n The new reference counter.
  */
 void Vhost::setRef(int n)
 {
   refCount = n;
 }
 
-/*! 
- *Get the value for name in the hash dictionary.
- *\param name The hashed entry key.
+/*!
+ * Get the value for name in the hash dictionary.
+ * \param name The hashed entry key.
  */
 const char* Vhost::getHashedData(const char* name)
 {
@@ -512,9 +464,9 @@ const char* Vhost::getHashedData(const char* name)
 
   return s ? s->getValue ()->c_str() : 0;
 }
-  
+
 /*!
- *Initialize SSL on the virtual host.
+ * Initialize SSL on the virtual host.
  */
 int Vhost::initializeSSL()
 {
@@ -523,16 +475,16 @@ int Vhost::initializeSSL()
   protocol = Server::getInstance()->getProtocol(protocolName.c_str());
   if(!protocol)
     return 0;
-    
+
   if(!(protocol->getProtocolOptions() & PROTOCOL_USES_SSL))
     return 0;
 
   return sslContext.initialize();
-}  
+}
 
 
 /*!
- *Get the SSL context.
+ * Get the SSL context.
  */
 SSL_CTX* Vhost::getSSLContext()
 {
@@ -541,7 +493,7 @@ SSL_CTX* Vhost::getSSLContext()
 
 
 /*!
- *Clean the memory used by the SSL context.
+ * Clean the memory used by the SSL context.
  */
 int Vhost::freeSSL()
 {
diff --git a/myserver/src/server/server.cpp b/myserver/src/server/server.cpp
index 451abfa..957cc8d 100644
--- a/myserver/src/server/server.cpp
+++ b/myserver/src/server/server.cpp
@@ -35,23 +35,25 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 #include <include/conf/xml_conf.h>
 
+#include <cstdarg>
+
 
 extern "C"
 {
 #ifdef WIN32
-#include <direct.h>
+# include <direct.h>
 #else
-#include <unistd.h>
-#include <string.h>
-#include <signal.h>
-#include <stdlib.h>
-#include <sys/socket.h>
-#include <netinet/in.h>
-#include <arpa/inet.h>
-
-#ifdef HAVE_PTHREAD
-#include <pthread.h>
-#endif
+# include <unistd.h>
+# include <string.h>
+# include <signal.h>
+# include <stdlib.h>
+# include <sys/socket.h>
+# include <netinet/in.h>
+# include <arpa/inet.h>
+
+# ifdef HAVE_PTHREAD
+#  include <pthread.h>
+# endif
 
 #endif
 }
@@ -66,7 +68,7 @@ const struct in6_addr in6addr_any = IN6ADDR_ANY_INIT;
  */
 Server* Server::instance = 0;
 
-Server::Server() : connectionsScheduler (this),
+Server::Server () : connectionsScheduler (this),
                    listenThreads (&connectionsScheduler, this),
                    authMethodFactory (),
                    validatorFactory (),
@@ -113,34 +115,34 @@ Server::initLogManager ()
  *Reinitialize the configuration paths, setting them to the specified ones.
  *Returns false on error.
  */
-bool Server::resetConfigurationPaths(string &mainConf, string &mimeConf,
+bool Server::resetConfigurationPaths (string &mainConf, string &mimeConf,
 				     string &vhostConf, string &externPath,
 				     string &langPath)
 {
   if (!mainConfigurationFile)
-    mainConfigurationFile = new string(mainConf);
+    mainConfigurationFile = new string (mainConf);
   else
-    mainConfigurationFile->assign(mainConf);
+    mainConfigurationFile->assign (mainConf);
 
   if (!mimeConfigurationFile)
-    mimeConfigurationFile = new string(mimeConf);
+    mimeConfigurationFile = new string (mimeConf);
   else
-    mimeConfigurationFile->assign(mimeConf);
+    mimeConfigurationFile->assign (mimeConf);
 
   if (!vhostConfigurationFile)
-    vhostConfigurationFile = new string(vhostConf);
+    vhostConfigurationFile = new string (vhostConf);
   else
-    vhostConfigurationFile->assign(vhostConf);
+    vhostConfigurationFile->assign (vhostConf);
 
   if (!externalPath)
-    externalPath = new string(externPath);
+    externalPath = new string (externPath);
   else
-    externalPath->assign(externPath);
+    externalPath->assign (externPath);
 
   if (!languagesPath)
-    languagesPath = new string(langPath);
+    languagesPath = new string (langPath);
   else
-    languagesPath->assign(langPath);
+    languagesPath->assign (langPath);
 
   return true;
 }
@@ -150,37 +152,37 @@ bool Server::resetConfigurationPaths(string &mainConf, string &mimeConf,
  *the default ones.
  *Returns nonzero on error.
  */
-int Server::checkConfigurationPaths()
+int Server::checkConfigurationPaths ()
 {
   if (mainConfigurationFile->length() == 0)
   {
-    mainConfigurationFile->assign("myserver.xml");
+    mainConfigurationFile->assign ("myserver.xml");
 
-    if (copyConfigurationFromDefault("myserver.xml"))
+    if (copyConfigurationFromDefault ("myserver.xml"))
     {
-      logWriteln("Error loading configuration file", MYSERVER_LOG_MSG_ERROR);
+      logWriteln (MYSERVER_LOG_MSG_ERROR, _("Error loading configuration file"));
       return -1;
     }
   }
 
   if (mimeConfigurationFile->length() == 0)
   {
-    mimeConfigurationFile->assign("MIMEtypes.xml");
+    mimeConfigurationFile->assign ("MIMEtypes.xml");
 
-    if (copyConfigurationFromDefault("MIMEtypes.xml"))
+    if (copyConfigurationFromDefault ("MIMEtypes.xml"))
     {
-      logWriteln(languageParser.getValue("ERR_LOADMIME"), MYSERVER_LOG_MSG_ERROR);
+      logWriteln (MYSERVER_LOG_MSG_ERROR, _("Error loading MIME configuration file"));
       return -1;
     }
   }
 
   if (vhostConfigurationFile->length() == 0)
   {
-    vhostConfigurationFile->assign("virtualhosts.xml");
+    vhostConfigurationFile->assign ("virtualhosts.xml");
 
-    if (copyConfigurationFromDefault("virtualhosts.xml") != 0)
+    if (copyConfigurationFromDefault ("virtualhosts.xml") != 0)
     {
-      logWriteln(languageParser.getValue("ERR_LOADVHOSTS"), MYSERVER_LOG_MSG_ERROR);
+      logWriteln (MYSERVER_LOG_MSG_ERROR, _("Error loading virtual hosts configuration file"));
       return -1;
     }
   }
@@ -192,7 +194,7 @@ int Server::checkConfigurationPaths()
  *Copy a configuration file from the default one.
  *Return nonzero on errors.
  */
-int Server::copyConfigurationFromDefault(const char *fileName)
+int Server::copyConfigurationFromDefault (const char *fileName)
 {
   File inputF;
   File outputF;
@@ -228,26 +230,21 @@ int Server::copyConfigurationFromDefault(const char *fileName)
 /*!
  *Load here all the libraries.
  */
-int Server::loadLibraries()
+int Server::loadLibraries ()
 {
-  Process::initialize();
+  Process::initialize ();
 
   XmlParser::startXML();
-  myserver_safetime_init();
+  myserver_safetime_init ();
 
   gnutls_global_init ();
 
-  /* Startup the socket library.  */
-  logWriteln(languageParser.getValue("MSG_ISOCK") );
-
-  if(Socket::startupSocketLib() != 0)
+  if (Socket::startupSocketLib () != 0)
   {
-    logWriteln( languageParser.getValue ("MSG_SERVER_CONF"), MYSERVER_LOG_MSG_ERROR);
+    logWriteln (MYSERVER_LOG_MSG_ERROR, _("Error loading the socket library"));
     return 1;
   }
 
-  logWriteln(languageParser.getValue("MSG_SOCKSTART") );
-
   return 0;
 }
 
@@ -255,16 +252,16 @@ int Server::loadLibraries()
 /*!
  *Destroy the object.
  */
-Server::~Server()
+Server::~Server ()
 {
-  if(languagesPath)
+  if (languagesPath)
     delete languagesPath;
   languagesPath = 0;
 
-  if(languageFile)
+  if (languageFile)
     delete languageFile;
   languageFile = 0;
-  if(vhostList)
+  if (vhostList)
     delete vhostList;
 
   delete vhostConfigurationFile;
@@ -276,15 +273,15 @@ Server::~Server()
   delete mimeConfigurationFile;
   mimeConfigurationFile = 0;
 
-  if(externalPath)
+  if (externalPath)
     delete externalPath;
   externalPath = 0;
 
-  if(path)
+  if (path)
     delete path;
   path = 0;
 
-  if(ipAddresses)
+  if (ipAddresses)
     delete ipAddresses;
 
   if (logManager)
@@ -296,7 +293,7 @@ Server::~Server()
 /*!
  *Start the server.
  */
-void Server::start(string &mainConf, string &mimeConf, string &vhostConf,
+void Server::start (string &mainConf, string &mimeConf, string &vhostConf,
 		   string &externPath, string &langPath)
 {
   int err = 0;
@@ -305,197 +302,157 @@ void Server::start(string &mainConf, string &mimeConf, string &vhostConf,
   INPUT_RECORD irInBuf[128];
 #endif
 
-  displayBoot();
+  displayBoot ();
 
   try
   {
-    if(loadLibraries())
+    if (loadLibraries ())
       return;
 
     /*
-     *Setup the server configuration.
+     * Setup the server configuration.
      */
-    logWriteln("Initializing server configuration...");
+    logWriteln (MYSERVER_LOG_MSG_INFO, _("Initializing server configuration..."));
 
-    if (!resetConfigurationPaths(mainConf, mimeConf, vhostConf, externPath, langPath))
+    if (!resetConfigurationPaths (mainConf, mimeConf, vhostConf, externPath, langPath))
       return;
 
-    err = checkConfigurationPaths();
+    err = checkConfigurationPaths ();
     if (err)
       return;
 
-    err = initialize();
-    if(err)
+    err = initialize ();
+    if (err)
       return;
 
     /* Initialize the SSL library.  */
     initializeSSL();
 
-    logWriteln( languageParser.getValue("MSG_SERVER_CONF") );
+    logWriteln (MYSERVER_LOG_MSG_INFO, _("Loading server configuration..."));
 
-    if(postLoad())
+    if (postLoad ())
       return;
 
-    setProcessPermissions();
+    setProcessPermissions ();
 
     if (getGid ()[0])
-    {
-      ostringstream out;
-      out << "gid: " << gid;
-      logWriteln(out.str().c_str());
-    }
+      logWriteln (MYSERVER_LOG_MSG_INFO, _("Using gid: %s"), gid.c_str ());
 
     if (getUid ()[0])
-    {
-      ostringstream out;
-      out << "uid: " << uid;
-      logWriteln(out.str().c_str());
-    }
+      logWriteln (MYSERVER_LOG_MSG_INFO, _("Using uid: %s"), uid.c_str ());
 
-    logWriteln(languageParser.getValue("MSG_READY"));
+    logWriteln (MYSERVER_LOG_MSG_INFO, _("Server is ready!"));
 
     if (logLocation.find ("console://") != string::npos)
-      {
-        logWriteln (languageParser.getValue ("MSG_BREAK"));
-      }
+      logWriteln (MYSERVER_LOG_MSG_INFO, _("Press Ctrl-C to terminate its execution"));
 
     serverReady = true;
 
     /* Finally we can give control to the main loop.  */
-    mainLoop();
+    mainLoop ();
 
   }
   catch(bad_alloc &ba)
-  {
-    ostringstream s;
-    s << "Bad alloc: " << ba.what();
-    logWriteln(s.str().c_str());
-  }
+    {
+      logWriteln (MYSERVER_LOG_MSG_ERROR, _("Bad alloc: %s"), ba.what ());
+    }
   catch(exception &e)
-  {
-    ostringstream s;
-    s << "Error: " << e.what();
-    logWriteln(s.str().c_str());
-  };
-  this->terminate();
-  finalCleanup();
+    {
+      logWriteln (MYSERVER_LOG_MSG_ERROR, _("Error: %s"), e.what ());
+    };
+  this->terminate ();
+  finalCleanup ();
 
 #ifdef WIN32
-  WSACleanup();
-#endif// WIN32
+  WSACleanup ();
+#endif
 }
 
 /*!
- *Complete the loading phase.
+ * Complete the loading phase.
  */
-int Server::postLoad()
+int Server::postLoad ()
 {
-  ostringstream nCPU;
   string strCPU;
   string buffer;
 
-  /*
-   *Get the name of the local machine.
-   */
-  memset(serverName, 0, HOST_NAME_MAX+1);
-  Socket::gethostname(serverName, HOST_NAME_MAX);
+  /* Get the name of the local machine.  */
+  memset (serverName, 0, HOST_NAME_MAX+1);
+  Socket::gethostname (serverName, HOST_NAME_MAX);
 
-  buffer.assign(languageParser.getValue("MSG_GETNAME"));
-  buffer.append(" ");
-  buffer.append(serverName);
-  logWriteln(buffer.c_str());
+  logWriteln (MYSERVER_LOG_MSG_INFO, _("Host name: %s"), serverName);
 
-  /*
-   *Find the IP addresses of the local machine.
-   */
-  if(ipAddresses)
+  /* Find the IP addresses of the local machine.  */
+  if (ipAddresses)
     delete ipAddresses;
-  ipAddresses = new string();
-  buffer.assign("Host: ");
-  buffer.append(serverName);
-  logWriteln(buffer.c_str() );
+  ipAddresses = new string ();
 
-  if(Socket::getLocalIPsList(*ipAddresses))
-  {
-    string msg;
-    msg.assign(languageParser.getValue("ERR_ERROR"));
-    msg.append(" : Reading IP list");
-    logWriteln(msg.c_str(), MYSERVER_LOG_MSG_ERROR);
-    return -1;
-  }
-  else
-  {
-    string msg;
-    msg.assign("IP: ");
-    msg.append(*ipAddresses);
-    logWriteln(msg.c_str());
-  }
+  if (Socket::getLocalIPsList (*ipAddresses))
+    {
+      logWriteln (MYSERVER_LOG_MSG_ERROR, _("Error reading IP list"));
+      return -1;
+    }
+
+  logWriteln (MYSERVER_LOG_MSG_INFO, _("IP: %s"), ipAddresses->c_str ());
 
   /* Load the MIME types.  */
-  logWriteln(languageParser.getValue("MSG_LOADMIME"));
+  logWriteln (MYSERVER_LOG_MSG_INFO, _("Loading MIME types..."));
 
-  if(mimeManager)
+  if (mimeManager)
     delete mimeManager;
 
-  mimeManager = new MimeManager();
+  mimeManager = new MimeManager ();
 
-  if(int nMIMEtypes = mimeManager->loadXML(mimeConfigurationFile->c_str()))
-  {
-    ostringstream stream;
-    stream << languageParser.getValue("MSG_MIMERUN") << ": " << nMIMEtypes;
-    logWriteln(stream.str().c_str());
-  }
+  if (int nMIMEtypes = mimeManager->loadXML(mimeConfigurationFile->c_str ()))
+    logWriteln (MYSERVER_LOG_MSG_INFO, _("Using %i MIME types"), nMIMEtypes);
   else
-  {
-    logWriteln(languageParser.getValue("ERR_LOADMIME"), MYSERVER_LOG_MSG_ERROR);
-  }
-
-  nCPU << (u_int)getCPUCount();
+    logWriteln (MYSERVER_LOG_MSG_ERROR, _("Error while loading MIME types"));
 
-  strCPU.assign(languageParser.getValue("MSG_NUM_CPU"));
-  strCPU.append(" ");
-  strCPU.append(nCPU.str());
-  logWriteln(strCPU.c_str());
+  logWriteln (MYSERVER_LOG_MSG_INFO, _("Detected %i CPUs"), (int) getCPUCount ());
 
-  connectionsScheduler.restart();
+  connectionsScheduler.restart ();
 
-  listenThreads.initialize(&languageParser);
+  listenThreads.initialize (&languageParser);
 
-  if(vhostList)
+  if (vhostList)
     delete vhostList;
 
-  vhostList = new VhostManager(&listenThreads, logManager);
+  vhostList = new VhostManager (&listenThreads, logManager);
 
-  if(vhostList == NULL)
+  if (vhostList == NULL)
     return -1;
 
-  getProcessServerManager()->load();
+  getProcessServerManager ()->load ();
 
   /* Load the home directories configuration.  */
-  homeDir.load();
+  homeDir.load ();
 
-  loadPlugins();
+  loadPlugins ();
 
   /* Load the virtual hosts configuration from the xml file.  */
-  vhostList->loadXMLConfigurationFile(vhostConfigurationFile->c_str());
+  vhostList->loadXMLConfigurationFile (vhostConfigurationFile->c_str ());
 
-  if(path == 0)
-    path = new string();
+  if (path == 0)
+    path = new string ();
 
-  if(getdefaultwd(*path))
+  if (getdefaultwd (*path))
     return -1;
 
-  for(u_long i = 0; i < nStaticThreads; i++)
-  {
-    logWriteln(languageParser.getValue("MSG_CREATET"));
-    if(addThread(true))
-      return -1;
+  for (u_long i = 0; i < nStaticThreads; i++)
+    {
+      logWriteln (MYSERVER_LOG_MSG_INFO, _("Creating thread %i..."), (int) (i + 1));
 
-    logWriteln(languageParser.getValue("MSG_THREADR"));
-  }
+      if (addThread (true))
+        {
+          logWriteln (MYSERVER_LOG_MSG_ERROR, _("Error while creating thread"));
+          return -1;
+        }
+
+      logWriteln (MYSERVER_LOG_MSG_INFO, _("Thread %i created"),  (int)(i + 1));
+    }
 
 
-  configurationFileManager.close();
+  configurationFileManager.close ();
 
   return 0;
 }
@@ -503,21 +460,17 @@ int Server::postLoad()
 /*!
  *Load the plugins.
  */
-void Server::loadPlugins()
+void Server::loadPlugins ()
 {
-  string xml("xml");
+  string xml ("xml");
   //FIXME: xmlV is never freed.
   XmlValidator *xmlV = new XmlValidator ();
 
   validatorFactory.addValidator (xml, xmlV);
   authMethodFactory.addAuthMethod (xml, (AuthMethod*) xmlV);
 
-  if(filtersFactory.insert("gzip", Gzip::factory))
-  {
-    ostringstream stream;
-    stream <<  languageParser.getValue("ERR_ERROR") << ": Gzip Filter";
-    logWriteln(stream.str().c_str(), MYSERVER_LOG_MSG_ERROR);
-  }
+  if (filtersFactory.insert ("gzip", Gzip::factory))
+    logWriteln (MYSERVER_LOG_MSG_ERROR, _("Error while loading plugins"));
 
   Protocol *protocolsSet[] = {new HttpProtocol(),
                               new HttpsProtocol(),
@@ -526,23 +479,21 @@ void Server::loadPlugins()
                               0};
 
   for (int j = 0; protocolsSet[j]; j++)
-  {
-    char protocolName[32];
-    Protocol *protocol = protocolsSet[j];
-    protocol->loadProtocol(&languageParser);
-    protocol->registerName(protocolName, 32);
-    getProtocolsManager()->addProtocol(protocolName, protocol);
-  }
-
-
+    {
+      char protocolName[32];
+      Protocol *protocol = protocolsSet[j];
+      protocol->loadProtocol (&languageParser);
+      protocol->registerName (protocolName, 32);
+      getProtocolsManager ()->addProtocol (protocolName, protocol);
+    }
 
-  getPluginsManager()->preLoad(this, *externalPath);
-  getPluginsManager()->load(this);
-  getPluginsManager()->postLoad(this, &languageParser);
+  getPluginsManager ()->preLoad (this, *externalPath);
+  getPluginsManager ()->load (this);
+  getPluginsManager ()->postLoad (this, &languageParser);
 }
 
 /*!
- *Server main loop.
+ * Server main loop.
  */
 void Server::mainLoop()
 {
@@ -552,198 +503,183 @@ void Server::mainLoop()
 
   u_long purgeThreadsCounter = 0;
 
-  mainConfTime =
-    FilesUtility::getLastModTime(mainConfigurationFile->c_str());
+  mainConfTime = FilesUtility::getLastModTime (mainConfigurationFile->c_str ());
   hostsConfTime =
-    FilesUtility::getLastModTime(vhostConfigurationFile->c_str());
-  mimeConfTime =
-    FilesUtility::getLastModTime(mimeConfigurationFile->c_str());
+    FilesUtility::getLastModTime (vhostConfigurationFile->c_str ());
+  mimeConfTime = FilesUtility::getLastModTime (mimeConfigurationFile->c_str ());
 
   /*
-   *Keep thread alive.
-   *When the endServer flag is set to True exit
-   *from the loop and terminate the server execution.
+   * Keep thread alive.
+   * When the endServer flag is set to True exit
+   * from the loop and terminate the server execution.
    */
-  while(!endServer)
-  {
-    Thread::wait(1000000);
-
-    /* Check threads.  */
-    if(purgeThreadsCounter++ >= 10)
+  while (!endServer)
     {
-      purgeThreadsCounter = 0;
-      purgeThreads();
-    }
+      Thread::wait (1000000);
 
-    if(autoRebootEnabled)
-    {
-      time_t mainConfTimeNow =
-        FilesUtility::getLastModTime(mainConfigurationFile->c_str());
-      time_t hostsConfTimeNow =
-        FilesUtility::getLastModTime(vhostConfigurationFile->c_str());
-      time_t mimeConfNow =
-        FilesUtility::getLastModTime(mimeConfigurationFile->c_str());
-
-      /* If a configuration file was modified reboot the server. */
-      if(((mainConfTimeNow != -1) && (hostsConfTimeNow != -1)  &&
-          (mimeConfNow != -1)) || toReboot)
-      {
-        if( (mainConfTimeNow  != mainConfTime) || toReboot)
+      /* Check threads.  */
+      if (purgeThreadsCounter++ >= 10)
         {
-          string msg("main-conf-changed");
-          notifyMulticast(msg, 0);
-
-          reboot();
-          /* Store new mtime values.  */
-          mainConfTime = mainConfTimeNow;
-          mimeConfTime = mimeConfNow;
+          purgeThreadsCounter = 0;
+          purgeThreads ();
         }
-        else if(mimeConfNow != mimeConfTime)
-        {
-          string msg("mime-conf-changed");
-          notifyMulticast(msg, 0);
 
-          if (logLocation.find ("console://") != string::npos)
+      if (autoRebootEnabled)
+        {
+          time_t mainConfTimeNow =
+            FilesUtility::getLastModTime (mainConfigurationFile->c_str ());
+          time_t hostsConfTimeNow =
+            FilesUtility::getLastModTime (vhostConfigurationFile->c_str ());
+          time_t mimeConfNow =
+            FilesUtility::getLastModTime (mimeConfigurationFile->c_str ());
+
+          /* If a configuration file was modified reboot the server. */
+          if (((mainConfTimeNow != -1) && (hostsConfTimeNow != -1)  &&
+               (mimeConfNow != -1)) || toReboot)
             {
-              char beep[] = { static_cast<char>(0x7), '\0' };
-              string beepStr (beep);
-              logManager->log (this, "MAINLOG", logLocation, beepStr);
-            }
-          logWriteln("Reloading MIMEtypes.xml");
+              if ( (mainConfTimeNow  != mainConfTime) || toReboot)
+                {
+                  string msg ("main-conf-changed");
+                  notifyMulticast (msg, 0);
 
-          getMimeManager()->loadXML(getMIMEConfFile());
+                  reboot ();
+                  /* Store new mtime values.  */
+                  mainConfTime = mainConfTimeNow;
+                  mimeConfTime = mimeConfNow;
+                }
+              else if (mimeConfNow != mimeConfTime)
+                {
+                  string msg ("mime-conf-changed");
+                  notifyMulticast (msg, 0);
 
-          logWriteln("Reloaded");
+                  if (logLocation.find ("console://") != string::npos)
+                    {
+                      char beep[] = { static_cast<char>(0x7), '\0' };
+                      string beepStr (beep);
+                      logManager->log (this, "MAINLOG", logLocation, beepStr);
+                    }
+                  logWriteln (MYSERVER_LOG_MSG_INFO, _("Reloading MIME types"));
 
-          mimeConfTime = mimeConfNow;
-        }
-        else if(hostsConfTimeNow != hostsConfTime)
-        {
-          VhostManager* oldvhost = vhostList;
-          string msg("vhosts-conf-changed");
-          notifyMulticast(msg, 0);
+                  getMimeManager ()->loadXML (getMIMEConfFile ());
 
-          /* Do a beep if outputting to console.  */
-          if (logLocation.find ("console://") != string::npos)
-            {
-              char beep[] = { static_cast<char>(0x7), '\0' };
-              string beepStr (beep);
-              logManager->log (this, "MAINLOG", logLocation, beepStr);
-            }
+                  logWriteln (MYSERVER_LOG_MSG_INFO, _("Reloaded"));
 
-          logWriteln("Rebooting...");
+                  mimeConfTime = mimeConfNow;
+                }
+              else if (hostsConfTimeNow != hostsConfTime)
+                {
+                  VhostManager* oldvhost = vhostList;
+                  string msg ("vhosts-conf-changed");
+                  notifyMulticast (msg, 0);
 
-          Socket::stopBlockingOperations(true);
+                  /* Do a beep if outputting to console.  */
+                  if (logLocation.find ("console://") != string::npos)
+                    {
+                      char beep[] = { static_cast<char>(0x7), '\0' };
+                      string beepStr (beep);
+                      logManager->log (this, "MAINLOG", logLocation, beepStr);
+                    }
 
-          connectionsScheduler.release();
+                  logWriteln (MYSERVER_LOG_MSG_INFO, _("Rebooting..."));
 
-          listenThreads.beginFastReboot();
+                  Socket::stopBlockingOperations (true);
 
-          listenThreads.terminate();
+                  connectionsScheduler.release ();
 
-          clearAllConnections();
+                  listenThreads.beginFastReboot ();
 
-          Socket::stopBlockingOperations(false);
+                  listenThreads.terminate ();
 
-          connectionsScheduler.restart();
-          listenThreads.initialize(&languageParser);
+                  clearAllConnections ();
 
-          vhostList = new VhostManager(&listenThreads, logManager);
+                  Socket::stopBlockingOperations (false);
 
-          if(vhostList == 0)
-            continue;
+                  connectionsScheduler.restart ();
+                  listenThreads.initialize (&languageParser);
 
-          delete oldvhost;
+                  vhostList = new VhostManager (&listenThreads, logManager);
 
-            /* Load the virtual hosts configuration from the xml file.  */
-          if(vhostList->loadXMLConfigurationFile(vhostConfigurationFile->c_str()))
-          {
-            listenThreads.rollbackFastReboot();
-          }
-          else
-          {
-            listenThreads.commitFastReboot();
-          }
+                  if (!vhostList)
+                    continue;
 
-          hostsConfTime = hostsConfTimeNow;
-          logWriteln("Reloaded");
-        }
-      }
-    }//end  if(autoRebootEnabled)
+                  delete oldvhost;
 
-  }
+                  /* Load the virtual hosts configuration from the xml file.  */
+                  if (vhostList->loadXMLConfigurationFile (vhostConfigurationFile->c_str ()))
+                    listenThreads.rollbackFastReboot ();
+                  else
+                    listenThreads.commitFastReboot ();
+
+                  hostsConfTime = hostsConfTimeNow;
+                  logWriteln (MYSERVER_LOG_MSG_INFO, _("Reloaded"));
+                }
+            }
+        }//end  if (autoRebootEnabled)
+
+    }
 }
 
-void Server::logWriteNTimes(string str, unsigned n)
+void Server::logWriteNTimes (string str, unsigned n)
 {
   while (n--)
     logManager->log (this, "MAINLOG", logLocation, str);
 
-  string msg("");
+  string msg ("");
   logManager->log (this, "MAINLOG", logLocation, msg, true);
 }
 
 /*!
  *Display the MyServer boot.
  */
-void Server::displayBoot()
+void Server::displayBoot ()
 {
 
 #ifdef CLEAR_BOOT_SCREEN
 
   if (logLocation.find ("console://") != string::npos)
-  {
+    {
 #ifdef WIN32
-
-    /*
-     *Under the windows platform use the cls operating-system
-     *command to clear the screen.
-     */
-    _flushall();
-    system("cls");
+      _flushall();
+      system ("cls");
 #else
-  /*
-   *Under an UNIX environment, clearing the screen
-   *can be done in a similar method
-   */
-    sync();
-    system("clear");
+      sync ();
+      system ("clear");
 #endif
-  }
+    }
 
 #endif /* CLEAR_BOOT_SCREEN.  */
 
   /*
    *Print the MyServer signature only if the log writes to the console.
    */
-  if(logLocation.find ("console://") != string::npos)
-  {
-    try
-    {
-      size_t length;
-      string softwareSignature;
-      softwareSignature.assign("************ GNU MyServer ");
-      softwareSignature.append(MYSERVER_VERSION);
-      softwareSignature.append(" ************");
-      length = softwareSignature.length();
-
-      logWriteNTimes("*", length);
-      logManager->log (this, "MAINLOG", logLocation, softwareSignature, true);
-      logWriteNTimes("*", length);
-    }
-    catch(exception& e)
+  if (logLocation.find ("console://") != string::npos)
     {
-      ostringstream err;
-      err << "Error: " << e.what();
-      string str = err.str ();
-      logManager->log (this, "MAINLOG", logLocation, str, true);
-      return;
+      try
+        {
+          size_t length;
+          string softwareSignature;
+          softwareSignature.assign ("************ GNU MyServer ");
+          softwareSignature.append (MYSERVER_VERSION);
+          softwareSignature.append (" ************");
+          length = softwareSignature.length();
+
+          logWriteNTimes ("*", length);
+          logManager->log (this, "MAINLOG", logLocation, softwareSignature, true);
+          logWriteNTimes ("*", length);
+        }
+      catch(exception& e)
+        {
+          ostringstream err;
+          err << "Error: " << e.what ();
+          string str = err.str ();
+          logManager->log (this, "MAINLOG", logLocation, str, true);
+          return;
+        }
+      catch(...)
+        {
+          return;
+        };
     }
-    catch(...)
-    {
-      return;
-    };
-  }
 
 }
 
@@ -761,42 +697,42 @@ int Server::purgeThreads ()
   threadsMutex->lock ();
   for (list<ClientsThread*>::iterator it = threads.begin ();
        it != threads.end ();)
-  {
-    ClientsThread* thread = *it;
+    {
+      ClientsThread* thread = *it;
 
 
-    /*
-     *Shutdown all threads that can be destroyed.
-     */
-    if (thread->isStopped ())
-      {
-        ClientsThread* thread = *it;
-        list<ClientsThread*>::iterator next = it;
-        next++;
-
-        thread->join ();
-        threads.erase (it);
-        delete thread;
-
-        destroyed++;
-        it = next;
-      }
-    else if (thread->isToDestroy ())
-      {
-        if (destroyed < purgeThreadsThreshold)
-          thread->stop ();
-
-        it++;
-      }
-    else
-      {
-        if (!thread->isStatic ())
-          if (ticks - thread->getTimeout () > MYSERVER_SEC (15))
-            thread->setToDestroy (1);
-
-        it++;
-      }
-  }
+      /*
+       *Shutdown all threads that can be destroyed.
+       */
+      if (thread->isStopped ())
+        {
+          ClientsThread* thread = *it;
+          list<ClientsThread*>::iterator next = it;
+          next++;
+
+          thread->join ();
+          threads.erase (it);
+          delete thread;
+
+          destroyed++;
+          it = next;
+        }
+      else if (thread->isToDestroy ())
+        {
+          if (destroyed < purgeThreadsThreshold)
+            thread->stop ();
+
+          it++;
+        }
+      else
+        {
+          if (!thread->isStatic ())
+            if (ticks - thread->getTimeout () > MYSERVER_SEC (15))
+              thread->setToDestroy (1);
+
+          it++;
+        }
+    }
   threadsMutex->unlock ();
 
   return threads.size ();
@@ -841,7 +777,7 @@ XmlParser* Server::getLanguageParser ()
  */
 u_long Server::getNumConnections ()
 {
-  return connectionsScheduler.getConnectionsNumber();
+  return connectionsScheduler.getConnectionsNumber ();
 }
 
 /*!
@@ -890,8 +826,7 @@ void Server::stop ()
  */
 int Server::terminate ()
 {
-  if (verbosity > 1)
-    logWriteln(languageParser.getValue ("MSG_STOPT"));
+  logWriteln (MYSERVER_LOG_MSG_INFO, _("Stopping threads"));
 
   listenThreads.terminate ();
 
@@ -918,12 +853,9 @@ int Server::terminate ()
   /* Clear the home directories data.  */
   homeDir.clear ();
 
-  if (verbosity > 1)
-    logWriteln (languageParser.getValue ("MSG_TSTOPPED"));
-
+  logWriteln (MYSERVER_LOG_MSG_INFO, _("Threads stopped"));
 
-  if (verbosity > 1)
-    logWriteln (languageParser.getValue ("MSG_MEMCLEAN"));
+  logWriteln (MYSERVER_LOG_MSG_INFO, _("Cleaning memory"));
 
   freeHashedData ();
 
@@ -969,8 +901,8 @@ int Server::terminate ()
   delete threadsMutex;
 
   nStaticThreads = 0;
-  if (verbosity > 1)
-    logWriteln ("MyServer is stopped");
+
+  logWriteln (MYSERVER_LOG_MSG_INFO, _("MyServer has stopped"));
 
   logManager->clear ();
 
@@ -1020,7 +952,7 @@ int Server::initialize ()
   if (configurationFileManager.open (mainConfigurationFile->c_str ()))
     return -1;
 
-  readHashedData (xmlDocGetRootElement(configurationFileManager.getDoc ())->xmlChildrenNode);
+  readHashedData (xmlDocGetRootElement (configurationFileManager.getDoc ())->xmlChildrenNode);
 
   /*
    * Process console colors information.
@@ -1035,158 +967,132 @@ int Server::initialize ()
       string fullBg ("log_color." + *it + "_bg");
       data = getHashedData (fullFg.c_str ());
       if (data)
-        {
-          consoleColors[fg] = string (data);
-        }
+        consoleColors[fg] = string (data);
 
       data = getHashedData (fullBg.c_str ());
       if (data)
-        {
-          consoleColors[bg] = string (data);
-        }
+        consoleColors[bg] = string (data);
     }
 
   initLogManager ();
 
   data = getHashedData ("server.language");
-  if(languageFile)
+  if (languageFile)
     delete languageFile;
-  languageFile = new string();
-  if(data)
-  {
-    languageFile->assign(*languagesPath);
-    languageFile->append("/");
-    languageFile->append(data);
-  }
+  languageFile = new string ();
+  if (data)
+    {
+      languageFile->assign (*languagesPath);
+      languageFile->append ("/");
+      languageFile->append (data);
+    }
   else
-  {
-    languageFile->assign("languages/english.xml");
-  }
+    languageFile->assign ("languages/english.xml");
 
-  if(languageParser.open(languageFile->c_str()))
-  {
-    string err;
-    err.assign("Error loading: ");
-    logWriteln(err.c_str(), MYSERVER_LOG_MSG_ERROR);
-    return -1;
-  }
-  logWriteln(languageParser.getValue("MSG_LANGUAGE"));
+
+  /* XXX: IT IS NOT USED, AT LEAST IN THIS CLASS.  */
+  if (languageParser.open (languageFile->c_str ()))
+    {
+      logWriteln (MYSERVER_LOG_MSG_ERROR, _("Error loading language file"));
+      return -1;
+    }
+  logWriteln (MYSERVER_LOG_MSG_INFO, _("Using %s"),
+              languageParser.getValue ("MSG_LANGUAGE"));
 
   data = getHashedData ("server.verbosity");
-  if(data)
-  {
+  if (data)
     verbosity = (u_long)atoi(data);
-  }
 
   data = getHashedData ("server.buffer_size");
-  if(data)
-  {
-    buffersize=secondaryBufferSize= (atol(data) > 81920) ?  atol(data) :  81920 ;
-  }
+  if (data)
+    buffersize = secondaryBufferSize= (atol(data) > 81920) ?  atol(data) :  81920 ;
 
   data = getHashedData ("server.connection_timeout");
-  if(data)
-  {
-    connectionTimeout = MYSERVER_SEC((u_long)atol(data));
-  }
+  if (data)
+    connectionTimeout = MYSERVER_SEC ((u_long)atol(data));
 
   data = getHashedData ("server.static_threads");
-  if(data)
-  {
+  if (data)
     nStaticThreads = atoi(data);
-  }
 
   data = getHashedData ("server.max_threads");
-  if(data)
-  {
+  if (data)
     nMaxThreads = atoi(data);
-  }
 
   /* Get the max connections number to allow.  */
   data = getHashedData ("server.max_connections");
-  if(data)
-  {
+  if (data)
     maxConnections = atoi(data);
-  }
 
   /* Get the max connections number to accept.  */
   data = getHashedData ("server.max_accepted_connections");
-  if(data)
-  {
+  if (data)
     maxConnectionsToAccept = atoi(data);
-  }
 
   data = getHashedData ("server.connections_pool.size");
-  if(data)
-  {
+  if (data)
     connectionsPool.init (atoi (data));
-  }
 
   /* Get the default throttling rate to use on connections.  */
   data = getHashedData ("connection.throttling");
-  if(data)
-  {
+  if (data)
     throttlingRate = (u_long)atoi(data);
-  }
-
 
   data = getHashedData ("server.max_log_size");
-  if(data)
-  {
+  if (data)
     maxLogFileSize=(u_long)atol(data);
-  }
 
-  data = configurationFileManager.getValue("server.max_files_cache");
-  if(data)
-  {
-    u_long maxSize = (u_long)atol(data);
-    cachedFiles.initialize(maxSize);
-  }
+  data = configurationFileManager.getValue ("server.max_files_cache");
+  if (data)
+    {
+      u_long maxSize = (u_long)atol(data);
+      cachedFiles.initialize (maxSize);
+    }
   else
-    cachedFiles.initialize(1 << 23);
+    cachedFiles.initialize (1 << 23);
 
   data = getHashedData ("server.temp_directory");
   if (data)
-  {
-    string tmpPath (data);
-    FilesUtility::completePath (tmpPath);
-    FilesUtility::setTmpPath (tmpPath);
-  }
+    {
+      string tmpPath (data);
+      FilesUtility::completePath (tmpPath);
+      FilesUtility::setTmpPath (tmpPath);
+    }
   else
     FilesUtility::resetTmpPath ();
 
   data = getHashedData ("server.max_file_cache");
-  if(data)
-  {
-    u_long maxSize = (u_long)atol(data);
-    cachedFiles.setMaxSize(maxSize);
-  }
+  if (data)
+    {
+      u_long maxSize = (u_long)atol(data);
+      cachedFiles.setMaxSize (maxSize);
+    }
 
   data = getHashedData ("server.min_file_cache");
-  if(data)
-  {
-    u_long minSize = (u_long)atol(data);
-    cachedFiles.setMinSize(minSize);
-  }
+  if (data)
+    {
+      u_long minSize = (u_long)atol(data);
+      cachedFiles.setMinSize (minSize);
+    }
 
   data = getHashedData ("server.uid");
-  if(data)
+  if (data)
     uid.assign (data);
   else
     uid.assign ("");
 
   data = getHashedData ("server.gid");
-  if(data)
+  if (data)
     gid.assign (data);
   else
     gid.assign ("");
 
   data = getHashedData ("server.max_servers");
-  if(data)
-  {
-    int maxServersProcesses = atoi(data);
-    getProcessServerManager()->setMaxServers(maxServersProcesses);
-  }
+  if (data)
+    {
+      int maxServersProcesses = atoi(data);
+      getProcessServerManager ()->setMaxServers (maxServersProcesses);
+    }
 
   return 0;
 }
@@ -1206,24 +1112,24 @@ void Server::readHashedData (xmlNodePtr lcur)
  *Check if there are free threads to handle a new request.  If there
  *are not enough threads create a new one.
  */
-void Server::checkThreadsNumber()
+void Server::checkThreadsNumber ()
 {
-  threadsMutex->lock();
+  threadsMutex->lock ();
 
   /*
    *Create a new thread if there are not available threads and
    *we did not reach the limit.
    */
-  if((threads.size() < nMaxThreads) && (freeThreads < 1))
-    addThread(false);
+  if ((threads.size () < nMaxThreads) && (freeThreads < 1))
+    addThread (false);
 
-  threadsMutex->unlock();
+  threadsMutex->unlock ();
 }
 
 /*!
  *Get the default throttling rate to use with connections to the server.
  */
-u_long Server::getThrottlingRate()
+u_long Server::getThrottlingRate ()
 {
   return throttlingRate;
 }
@@ -1232,7 +1138,7 @@ u_long Server::getThrottlingRate()
  *This function returns the max size of the logs file as defined in the
  *configuration file.
  */
-int Server::getMaxLogFileSize()
+int Server::getMaxLogFileSize ()
 {
   return maxLogFileSize;
 }
@@ -1240,7 +1146,7 @@ int Server::getMaxLogFileSize()
 /*!
  *Returns the connection timeout.
  */
-u_long Server::getTimeout()
+u_long Server::getTimeout ()
 {
   return connectionTimeout;
 }
@@ -1248,7 +1154,7 @@ u_long Server::getTimeout()
 /*!
  *This function add a new connection to the list.
  */
-int Server::addConnection(Socket s, MYSERVER_SOCKADDRIN *asockIn)
+int Server::addConnection (Socket s, MYSERVER_SOCKADDRIN *asockIn)
 {
 
   int ret = 0;
@@ -1272,91 +1178,91 @@ int Server::addConnection(Socket s, MYSERVER_SOCKADDRIN *asockIn)
        (asockIn->ss_family != AF_INET && asockIn->ss_family != AF_INET6))
     return 0;
 
-  memset(ip, 0, MAX_IP_STRING_LEN);
-  memset(localIp, 0, MAX_IP_STRING_LEN);
+  memset (ip, 0, MAX_IP_STRING_LEN);
+  memset (localIp, 0, MAX_IP_STRING_LEN);
 
-  if( s.getHandle() == 0 )
+  if ( s.getHandle () == 0 )
     return 0;
 
   /*
    *Do not accept this connection if a MAX_CONNECTIONS_TO_ACCEPT limit is
    *defined.
    */
-  if(maxConnectionsToAccept &&
-     ((u_long)connectionsScheduler.getConnectionsNumber() >= maxConnectionsToAccept))
+  if (maxConnectionsToAccept &&
+      ((u_long)connectionsScheduler.getConnectionsNumber () >= maxConnectionsToAccept))
     return 0;
 
 #if ( HAVE_IPV6 )
   if ( asockIn->ss_family == AF_INET )
-    ret = getnameinfo(reinterpret_cast<const sockaddr *>(asockIn),
-                      sizeof(sockaddr_in),
-                      ip, MAX_IP_STRING_LEN, NULL, 0, NI_NUMERICHOST);
+    ret = getnameinfo (reinterpret_cast<const sockaddr *>(asockIn),
+                       sizeof(sockaddr_in),
+                       ip, MAX_IP_STRING_LEN, NULL, 0, NI_NUMERICHOST);
   else
-    ret = getnameinfo(reinterpret_cast<const sockaddr *>(asockIn),
-                      sizeof(sockaddr_in6),  ip, MAX_IP_STRING_LEN,
-                      NULL, 0, NI_NUMERICHOST);
-  if(ret)
-     return 0;
+    ret = getnameinfo (reinterpret_cast<const sockaddr *>(asockIn),
+                       sizeof(sockaddr_in6),  ip, MAX_IP_STRING_LEN,
+                       NULL, 0, NI_NUMERICHOST);
+  if (ret)
+    return 0;
 
   if ( asockIn->ss_family == AF_INET )
     dim = sizeof(sockaddr_in);
   else
     dim = sizeof(sockaddr_in6);
-  s.getsockname((MYSERVER_SOCKADDR*)&localSockIn, &dim);
+  s.getsockname ((MYSERVER_SOCKADDR*)&localSockIn, &dim);
 
   if ( asockIn->ss_family == AF_INET )
-    ret = getnameinfo(reinterpret_cast<const sockaddr *>(&localSockIn),
-                      sizeof(sockaddr_in), localIp, MAX_IP_STRING_LEN,
-                      NULL, 0, NI_NUMERICHOST);
+    ret = getnameinfo (reinterpret_cast<const sockaddr *>(&localSockIn),
+                       sizeof(sockaddr_in), localIp, MAX_IP_STRING_LEN,
+                       NULL, 0, NI_NUMERICHOST);
   else// AF_INET6
-    ret = getnameinfo(reinterpret_cast<const sockaddr *>(&localSockIn),
-                      sizeof(sockaddr_in6), localIp, MAX_IP_STRING_LEN,
-                      NULL, 0, NI_NUMERICHOST);
-  if(ret)
-     return 0;
+    ret = getnameinfo (reinterpret_cast<const sockaddr *>(&localSockIn),
+                       sizeof(sockaddr_in6), localIp, MAX_IP_STRING_LEN,
+                       NULL, 0, NI_NUMERICHOST);
+  if (ret)
+    return 0;
 #else// !HAVE_IPV6
   dim = sizeof(localSockIn);
-  s.getsockname((MYSERVER_SOCKADDR*)&localSockIn, &dim);
-  strncpy(ip,  inet_ntoa(((sockaddr_in *)asockIn)->sin_addr),
-          MAX_IP_STRING_LEN);
-  strncpy(localIp,  inet_ntoa(((sockaddr_in *)&localSockIn)->sin_addr),
-          MAX_IP_STRING_LEN);
+  s.getsockname ((MYSERVER_SOCKADDR*)&localSockIn, &dim);
+  strncpy (ip,  inet_ntoa (((sockaddr_in *)asockIn)->sin_addr),
+           MAX_IP_STRING_LEN);
+  strncpy (localIp,  inet_ntoa (((sockaddr_in *)&localSockIn)->sin_addr),
+           MAX_IP_STRING_LEN);
 #endif//HAVE_IPV6
 
   /* Port used by the client.  */
-    if ( asockIn->ss_family == AF_INET )
-      port = ntohs(((sockaddr_in *)(asockIn))->sin_port);
+  if ( asockIn->ss_family == AF_INET )
+    port = ntohs (((sockaddr_in *)(asockIn))->sin_port);
 #if HAVE_IPV6
   else
-    port = ntohs(((sockaddr_in6 *)(asockIn))->sin6_port);
+    port = ntohs (((sockaddr_in6 *)(asockIn))->sin6_port);
 #endif
 
   /* Port used by the server. */
   if ( localSockIn.ss_family == AF_INET )
-      myPort = ntohs(((sockaddr_in *)(&localSockIn))->sin_port);
+    myPort = ntohs (((sockaddr_in *)(&localSockIn))->sin_port);
 #if HAVE_IPV6
   else
-    myPort = ntohs(((sockaddr_in6 *)(&localSockIn))->sin6_port);
+    myPort = ntohs (((sockaddr_in6 *)(&localSockIn))->sin6_port);
 #endif
 
-  if(!addConnectionToList(&s, asockIn, &ip[0], &localIp[0], port, myPort, 1))
-  {
-    /* If we report error to add the connection to the thread.  */
-    ret = 0;
+  if (!addConnectionToList (&s, asockIn, &ip[0], &localIp[0], port, myPort, 1))
+    {
+      /* If we report error to add the connection to the thread.  */
+      ret = 0;
 
-    /* Shutdown the socket both on receive that on send.  */
-    s.shutdown(2);
+      /* Shutdown the socket both on receive that on send.  */
+      s.shutdown (2);
 
-    /* Then close it.  */
-    s.close();
-  }
+      /* Then close it.  */
+      s.close ();
+    }
   return ret;
 }
 
 /*!
  *Return the max number of threads that the server can start.
  */
-int Server::getMaxThreads()
+int Server::getMaxThreads ()
 {
   return nMaxThreads;
 }
@@ -1365,11 +1271,11 @@ int Server::getMaxThreads()
  *Add a new connection.
  *A connection is defined using a connection struct.
  */
-ConnectionPtr Server::addConnectionToList(Socket* s,
-                                          MYSERVER_SOCKADDRIN* /*asockIn*/,
-                                          char *ipAddr, char *localIpAddr,
-                                          u_short port, u_short localPort,
-                                          int /*id*/)
+ConnectionPtr Server::addConnectionToList (Socket* s,
+                                           MYSERVER_SOCKADDRIN* /*asockIn*/,
+                                           char *ipAddr, char *localIpAddr,
+                                           u_short port, u_short localPort,
+                                           int /*id*/)
 {
   int doSSLhandshake = 0;
   int doFastCheck = 0;
@@ -1382,101 +1288,98 @@ ConnectionPtr Server::addConnectionToList(Socket* s,
   newConnection = connectionsPool.forcedGet ();
   connectionsPoolLock.unlock ();
 
-  if(!newConnection)
+  if (!newConnection)
     return NULL;
   else
     newConnection->init ();
 
-  newConnection->setPort(port);
-  newConnection->setTimeout( getTicks() );
-  newConnection->setLocalPort(localPort);
-  newConnection->setIpAddr(ipAddr);
-  newConnection->setLocalIpAddr(localIpAddr);
-  newConnection->host = vhostList->getVHost(0,
-                                            localIpAddr,
-                                            localPort);
+  newConnection->setPort (port);
+  newConnection->setTimeout ( getTicks () );
+  newConnection->setLocalPort (localPort);
+  newConnection->setIpAddr (ipAddr);
+  newConnection->setLocalIpAddr (localIpAddr);
+  newConnection->host = vhostList->getVHost (0,
+                                             localIpAddr,
+                                             localPort);
 
   /* No vhost for the connection so bail.  */
-  if(newConnection->host == 0)
-  {
-    connectionsPoolLock.lock ();
-    connectionsPool.put (newConnection);
-    connectionsPoolLock.unlock ();
-    return 0;
-  }
+  if (newConnection->host == 0)
+    {
+      connectionsPoolLock.lock ();
+      connectionsPool.put (newConnection);
+      connectionsPoolLock.unlock ();
+      return 0;
+    }
 
-  protocol = getProtocol(newConnection->host->getProtocolName());
+  protocol = getProtocol(newConnection->host->getProtocolName ());
 
-  if(protocol)
-    opts = protocol->getProtocolOptions();
+  if (protocol)
+    opts = protocol->getProtocolOptions ();
 
-  if(opts & PROTOCOL_USES_SSL)
+  if (opts & PROTOCOL_USES_SSL)
     doSSLhandshake = 1;
 
-  if(opts & PROTOCOL_FAST_CHECK)
+  if (opts & PROTOCOL_FAST_CHECK)
     doFastCheck = 1;
 
 
-  {
-    string msg("new-connection");
 
-    handlers = getHandlers(msg);
+  string msg ("new-connection");
+
+  handlers = getHandlers (msg);
+
+  if (handlers)
+    {
+      for (size_t i = 0; i < handlers->size (); i++)
+        if ((*handlers)[i]->updateMulticast (this, msg, newConnection) == 1)
+          {
+            connectionsPoolLock.lock ();
+            connectionsPool.put (newConnection);
+            connectionsPoolLock.unlock ();
+            return 0;
+          }
+    }
 
-    if(handlers)
+  /* Do the SSL handshake if required.  */
+  if (doSSLhandshake)
     {
-      for(size_t i = 0; i < handlers->size(); i++)
-        if((*handlers)[i]->updateMulticast(this, msg, newConnection) == 1)
+      int ret = 0;
+      SSL_CTX* ctx = newConnection->host->getSSLContext ();
+      SslSocket *sslSocket = new SslSocket (s);
+
+      sslSocket->setSSLContext (ctx);
+      ret = sslSocket->sslAccept ();
+
+      if (ret < 0)
         {
           connectionsPoolLock.lock ();
           connectionsPool.put (newConnection);
           connectionsPoolLock.unlock ();
+          delete sslSocket;
           return 0;
         }
+      newConnection->socket = sslSocket;
     }
-  }
-
-  /* Do the SSL handshake if required.  */
-  if(doSSLhandshake)
-  {
-    int ret = 0;
-    SSL_CTX* ctx = newConnection->host->getSSLContext();
-    SslSocket *sslSocket = new SslSocket(s);
-
-    sslSocket->setSSLContext(ctx);
-    ret = sslSocket->sslAccept();
+  else
+    newConnection->socket = new Socket (s);
 
-    if(ret < 0)
+  if (doFastCheck)
     {
-      connectionsPoolLock.lock ();
-      connectionsPool.put (newConnection);
-      connectionsPoolLock.unlock ();
-      delete sslSocket;
-      return 0;
+      newConnection->setScheduled (1);
+      newConnection->setForceControl (1);
+      newConnection->socket->setNonBlocking (1);
+      connectionsScheduler.addNewReadyConnection (newConnection);
     }
-    newConnection->socket = sslSocket;
-  }
-  else
-  {
-    newConnection->socket = new Socket(s);
-  }
-
-  if ( doFastCheck )
-  {
-    newConnection->setScheduled(1);
-    newConnection->setForceControl(1);
-    newConnection->socket->setNonBlocking (1);
-    connectionsScheduler.addNewReadyConnection(newConnection);
-  }
   else
-    connectionsScheduler.addNewWaitingConnection(newConnection);
+    connectionsScheduler.addNewWaitingConnection (newConnection);
 
   /*
-   *If defined maxConnections and the number of active connections
-   *is bigger than it say to the protocol that will parse the connection
-   *to remove it from the active connections list.
+   * If defined maxConnections and the number of active connections
+   * is bigger than it say to the protocol that will parse the connection
+   * to remove it from the active connections list.
    */
-  if(maxConnections && ((u_long)connectionsScheduler.getConnectionsNumber ()
-                        > maxConnections))
+  if (maxConnections && ((u_long)connectionsScheduler.getConnectionsNumber ()
+                         > maxConnections))
     newConnection->setToRemove (Connection::REMOVE_OVERLOAD);
 
   connectionsScheduler.registerConnectionID (newConnection);
@@ -1484,14 +1387,12 @@ ConnectionPtr Server::addConnectionToList(Socket* s,
   return newConnection;
 }
 
-
-
 /*!
- *Delete a connection.
+ * Delete a connection.
  */
-int Server::deleteConnection(ConnectionPtr s)
+int Server::deleteConnection (ConnectionPtr s)
 {
-  notifyDeleteConnection(s);
+  notifyDeleteConnection (s);
   connectionsScheduler.removeConnection (s);
 
   s->destroy ();
@@ -1504,232 +1405,219 @@ int Server::deleteConnection(ConnectionPtr s)
 }
 
 /*!
- *Get notified when a connection is closed.
+ * Get notified when a connection is closed.
  */
-int Server::notifyDeleteConnection(ConnectionPtr s)
+int Server::notifyDeleteConnection (ConnectionPtr s)
 {
-  string msg("remove-connection");
+  string msg ("remove-connection");
   vector<Multicast<string, void*, int>*>* handlers;
 
-  handlers = getHandlers(msg);
+  handlers = getHandlers (msg);
+
+  if (handlers)
+    for (size_t i = 0; i < handlers->size (); i++)
+      (*handlers)[i]->updateMulticast (this, msg, s);
 
-  if(handlers)
-  {
-    for(size_t i = 0; i < handlers->size(); i++)
-    {
-      (*handlers)[i]->updateMulticast(this, msg, s);
-    }
-  }
   return 0;
 }
 
 /*!
- *Get a connection to parse.
+ * Get a connection to parse.
  */
-ConnectionPtr Server::getConnection(int /*id*/)
+ConnectionPtr Server::getConnection (int /*id*/)
 {
-  return connectionsScheduler.getConnection();
+  return connectionsScheduler.getConnection ();
 }
 
 /*!
- *Delete all the active connections.
+ * Delete all the active connections.
  */
-void Server::clearAllConnections()
+void Server::clearAllConnections ()
 {
   list<ConnectionPtr> connections;
   list<ConnectionPtr>::iterator it;
 
-  connectionsScheduler.getConnections(connections);
+  connectionsScheduler.getConnections (connections);
 
   try
-  {
-    for(it = connections.begin(); it != connections.end(); it++)
     {
-      deleteConnection(*it);
+      for (it = connections.begin (); it != connections.end (); it++)
+        deleteConnection (*it);
     }
-  }
   catch(...)
-  {
-    throw;
-  };
+    {
+      throw;
+    };
 }
 
 
 /*!
- *Returns the full path of the binaries directory.
- *The directory where the file myserver(.exe) is.
+ * Returns the full path of the binaries directory.
+ * The directory where the file myserver (.exe) is.
  */
-const char *Server::getPath()
+const char *Server::getPath ()
 {
-  return path ? path->c_str() : "";
+  return path ? path->c_str () : "";
 }
 
 /*!
- *Add a free thread.
+ * Add a free thread.
  */
-void Server::increaseFreeThread()
+void Server::increaseFreeThread ()
 {
-  threadsMutex->lock();
+  threadsMutex->lock ();
   freeThreads++;
-  threadsMutex->unlock();
+  threadsMutex->unlock ();
 }
 
 /*!
- *Remove a free thread.
+ * Remove a free thread.
  */
-void Server::decreaseFreeThread()
+void Server::decreaseFreeThread ()
 {
-  threadsMutex->lock();
+  threadsMutex->lock ();
   freeThreads--;
-  threadsMutex->unlock();
+  threadsMutex->unlock ();
 }
 
 
 /*!
- *Returns the name of the server(the name of the current PC).
+ * Returns the name of the server (the name of the current PC).
  */
-const char *Server::getServerName()
+const char *Server::getServerName ()
 {
   return serverName;
 }
 
 /*!
- *Gets the number of threads.
+ * Gets the number of threads.
  */
-u_long Server::getNumThreads()
+u_long Server::getNumThreads ()
 {
   u_long ret;
-  threadsMutex->lock();
-  ret = threads.size();
-  threadsMutex->unlock();
+  threadsMutex->lock ();
+  ret = threads.size ();
+  threadsMutex->unlock ();
   return ret;
 }
 
 /*!
- *Returns a comma-separated local machine IPs list.
- *For example: 192.168.0.1, 61.62.63.64, 65.66.67.68.69
+ * Returns a comma-separated local machine IPs list.
+ * For example: 192.168.0.1, 61.62.63.64, 65.66.67.68.69
  */
-const char *Server::getAddresses()
+const char *Server::getAddresses ()
 {
-  return ipAddresses ? ipAddresses->c_str() : "";
+  return ipAddresses ? ipAddresses->c_str () : "";
 }
 
 /*!
- *Clear the data dictionary.
- *Returns zero on success.
+ * Clear the data dictionary.
+ * Returns zero on success.
  */
-int Server::freeHashedData()
+int Server::freeHashedData ()
 {
   try
-  {
-    list<NodeTree<string>*>::iterator it = hashedDataTrees.begin ();
-    while (it != hashedDataTrees.end ())
-      {
-        delete *it;
-        it++;
-      }
-
-    hashedDataTrees.clear ();
-    hashedData.clear();
-  }
+    {
+      list<NodeTree<string>*>::iterator it = hashedDataTrees.begin ();
+      while (it != hashedDataTrees.end ())
+        {
+          delete *it;
+          it++;
+        }
+
+      hashedDataTrees.clear ();
+      hashedData.clear ();
+    }
   catch(...)
-  {
-    return 1;
-  }
+    {
+      return 1;
+    }
   return 0;
 }
 
 /*!
- *Get the value for name in the hash dictionary.
+ * Get the value for name in the hash dictionary.
  */
-const char* Server::getHashedData(const char* name)
+const char* Server::getHashedData (const char* name)
 {
-  NodeTree<string> *s = hashedData.get(name);
+  NodeTree<string> *s = hashedData.get (name);
 
-  return s ? s->getValue ()->c_str() : 0;
+  return s ? s->getValue ()->c_str () : 0;
 }
 
 /*!
- *Get the specified protocol.
+ * Get the specified protocol.
  */
-Protocol* Server::getProtocol(const char *protocolName)
+Protocol* Server::getProtocol (const char *protocolName)
 {
-  string protocol(protocolName);
+  string protocol (protocolName);
 
-  return protocols.getProtocol(protocol);
+  return protocols.getProtocol (protocol);
 }
 
 /*!
- *Get where external protocols are.
+ * Get where external protocols are.
  */
-const char* Server::getExternalPath()
+const char* Server::getExternalPath ()
 {
-  return externalPath ? externalPath->c_str() : "";
+  return externalPath ? externalPath->c_str () : "";
 }
 
 
 /*!
- *If specified set the uid/gid for the process.
+ * If specified set the uid/gid for the process.
  */
-void Server::setProcessPermissions()
+void Server::setProcessPermissions ()
 {
-    /*
-     *If the configuration specify a group id, change the current group for
-     *the process.
-     */
-  if(gid.length ())
+  /*
+   * If the configuration specify a group id, change the current group for
+   * the process.
+   */
+  if (gid.length ())
     {
       ostringstream out;
 
       if (Process::setAdditionalGroups (0, 0))
-        {
-          out << languageParser.getValue("ERR_ERROR")
-              << ": setAdditionalGroups";
-          logWriteln(out.str().c_str(), MYSERVER_LOG_MSG_ERROR);
-        }
+        logWriteln (MYSERVER_LOG_MSG_ERROR, _("Error setting additional groups"));
 
       if (Process::setgid (gid.c_str ()))
-        {
-          out << languageParser.getValue("ERR_ERROR") << ": setgid " << gid;
-          logWriteln(out.str().c_str(), MYSERVER_LOG_MSG_ERROR);
-        }
+        logWriteln (MYSERVER_LOG_MSG_ERROR, _("Error setting gid"));
+
       autoRebootEnabled = false;
     }
 
-    /*
-     *If the configuration file provides a user identifier, change the
-     *current user for the process. Disable the reboot when this feature
-     *is used.
-     */
-  if(uid.length ())
+  /*
+   * If the configuration file provides a user identifier, change the
+   * current user for the process. Disable the reboot when this feature
+   * is used.
+   */
+  if (uid.length ())
     {
       ostringstream out;
       if (Process::setuid (uid.c_str ()))
-        {
-          out << languageParser.getValue("ERR_ERROR") << ": setuid " << uid;
-          logWriteln(out.str().c_str(), MYSERVER_LOG_MSG_ERROR);
-        }
+        logWriteln (MYSERVER_LOG_MSG_ERROR, _("Error setting uid"));
+
       autoRebootEnabled = false;
     }
 }
 
 /*!
- *Reboot the server.
- *Returns non zero on errors.
+ * Reboot the server.
+ * Returns non zero on errors.
  */
-int Server::reboot()
+int Server::reboot ()
 {
   int ret;
-  string msg("reboot-server");
+  string msg ("reboot-server");
   vector<Multicast<string, void*, int>*>* handlers;
 
-  handlers = getHandlers(msg);
+  handlers = getHandlers (msg);
 
-  if(handlers)
-  {
-    for(size_t i = 0; i < handlers->size(); i++)
-      (*handlers)[i]->updateMulticast(this, msg, 0);
-  }
+  if (handlers)
+    {
+      for (size_t i = 0; i < handlers->size (); i++)
+        (*handlers)[i]->updateMulticast (this, msg, 0);
+    }
 
   serverReady = false;
   /* Reset the toReboot flag.  */
@@ -1738,25 +1626,26 @@ int Server::reboot()
   rebooting = true;
 
   /* Do nothing if the reboot is disabled.  */
-  if(!autoRebootEnabled)
+  if (!autoRebootEnabled)
     return 0;
 
   /* Do a beep if outputting to console.  */
   if (logLocation.find ("console://") != string::npos)
-  {
-    char beep[] = { static_cast<char>(0x7), '\0' };
-    string beepStr (beep);
-    logManager->log (this, "MAINLOG", logLocation, beepStr);
-  }
+    {
+      char beep[] = { static_cast<char>(0x7), '\0' };
+      string beepStr (beep);
+      logManager->log (this, "MAINLOG", logLocation, beepStr);
+    }
 
-  logWriteln("Rebooting...");
-  if(mustEndServer)
+  logWriteln (MYSERVER_LOG_MSG_INFO, _("Rebooting"));
+
+  if (mustEndServer)
     return 0;
 
   mustEndServer = true;
 
-  ret = terminate();
-  if(ret)
+  ret = terminate ();
+  if (ret)
     return ret;
 
   mustEndServer = false;
@@ -1764,30 +1653,30 @@ int Server::reboot()
 
   rebooting = false;
 
-  ret = initialize() || postLoad();
+  ret = initialize () || postLoad ();
 
-  if(ret)
+  if (ret)
     return ret;
 
   serverReady = true;
 
-  logWriteln("Rebooted");
+  logWriteln (MYSERVER_LOG_MSG_INFO, _("Restarted"));
 
   return 0;
 }
 
 /*!
- *Returns if the server is ready.
+ * Returns if the server is ready.
  */
-bool Server::isServerReady()
+bool Server::isServerReady ()
 {
   return serverReady;
 }
 
 /*!
- *Reboot the server on the next loop.
+ * Reboot the server on the next loop.
  */
-void Server::rebootOnNextLoop()
+void Server::rebootOnNextLoop ()
 {
   serverReady = false;
   toReboot = true;
@@ -1795,161 +1684,157 @@ void Server::rebootOnNextLoop()
 
 
 /*!
- *Return the factory object to create cached files.
+ * Return the factory object to create cached files.
  */
-CachedFileFactory* Server::getCachedFiles()
+CachedFileFactory* Server::getCachedFiles ()
 {
   return &cachedFiles;
 }
 
 /*!
- *Return the path to the mail configuration file.
+ * Return the path to the mail configuration file.
  */
-const char *Server::getMainConfFile()
+const char *Server::getMainConfFile ()
 {
   return mainConfigurationFile
-    ? mainConfigurationFile->c_str() : 0;
+    ? mainConfigurationFile->c_str () : 0;
 }
 
 /*!
- *Return the path to the mail configuration file.
+ * Return the path to the mail configuration file.
  */
-const char *Server::getVhostConfFile()
+const char *Server::getVhostConfFile ()
 {
-  return vhostConfigurationFile ? vhostConfigurationFile->c_str() : 0;
+  return vhostConfigurationFile ? vhostConfigurationFile->c_str () : NULL;
 }
 
 /*!
- *Return the path to the mail configuration file.
+ * Return the path to the mail configuration file.
  */
-const char *Server::getMIMEConfFile()
+const char *Server::getMIMEConfFile ()
 {
-  return mimeConfigurationFile ? mimeConfigurationFile->c_str() : "";
+  return mimeConfigurationFile ? mimeConfigurationFile->c_str () : "";
 }
 
 /*!
- *Get a list with all the alive connections.
+ * Get a list with all the alive connections.
  */
-void Server::getConnections(list<ConnectionPtr>& out)
+void Server::getConnections (list<ConnectionPtr>& out)
 {
-  connectionsScheduler.getConnections(out);
+  connectionsScheduler.getConnections (out);
 }
 
 /*!
- *Disable the autoreboot.
+ * Disable the autoreboot.
  */
-void Server::disableAutoReboot()
+void Server::disableAutoReboot ()
 {
   autoRebootEnabled = false;
 }
 
 /*!
- *Enable the autoreboot
+ * Enable the autoreboot
  */
-void Server::enableAutoReboot()
+void Server::enableAutoReboot ()
 {
   autoRebootEnabled = true;
 }
 
-
 /*!
- *Return the ProtocolManager object.
+ * Return the ProtocolManager object.
  */
-ProtocolsManager *Server::getProtocolsManager()
+ProtocolsManager *Server::getProtocolsManager ()
 {
   return &protocols;
 }
 
 /*!
- *Get the path to the directory containing all the language files.
+ * Get the path to the directory containing all the language files.
  */
-const char *Server::getLanguagesPath()
+const char *Server::getLanguagesPath ()
 {
-  return languagesPath ? languagesPath->c_str() : "";
+  return languagesPath ? languagesPath->c_str () : "";
 }
 
 /*!
- *Get the current language file.
+ * Get the current language file.
  */
-const char *Server::getLanguageFile()
+const char *Server::getLanguageFile ()
 {
-  return languageFile ? languageFile->c_str() : "";
+  return languageFile ? languageFile->c_str () : "";
 }
 
 /*!
- *Return nonzero if the autoreboot is enabled.
+ * Return nonzero if the autoreboot is enabled.
  */
-bool Server::isAutorebootEnabled()
+bool Server::isAutorebootEnabled ()
 {
   return autoRebootEnabled;
 }
 
 /*!
- *Create a new thread.
+ * Create a new thread.
  */
-int Server::addThread(bool staticThread)
+int Server::addThread (bool staticThread)
 {
   int ret;
-  string msg("new-thread");
+  string msg ("new-thread");
   ClientsThread* newThread = 0;
   vector<Multicast<string, void*, int>*>* handlers;
 
   purgeThreadsThreshold = 1;
 
-  if(isRebooting())
+  if (isRebooting ())
     return -1;
 
-  if(!staticThread)
-  {
-    bool restored = false;
-
-    for(list<ClientsThread*>::iterator it = threads.begin(); it != threads.end(); it++)
+  if (!staticThread)
     {
-      ClientsThread* thread = *it;
+      bool restored = false;
+
+      for (list<ClientsThread*>::iterator it = threads.begin (); it
+             != threads.end (); it++)
+        {
+          ClientsThread* thread = *it;
 
-      if(thread->isToDestroy())
-      {
-        thread->setToDestroy(0);
-        restored = true;
-        break;
-      }
+          if (thread->isToDestroy ())
+            {
+              thread->setToDestroy (0);
+              restored = true;
+              break;
+            }
+        }
+      if (restored)
+        return 0;
     }
-    if(restored)
-      return 0;
-  }
 
-  newThread = new ClientsThread(this);
+  newThread = new ClientsThread (this);
 
-  if(newThread == 0)
+  if (newThread == 0)
     return -1;
 
-  handlers = getHandlers(msg);
+  handlers = getHandlers (msg);
 
-  if(handlers)
-  {
-    for(size_t i = 0; i < handlers->size(); i++)
+  if (handlers)
     {
-      (*handlers)[i]->updateMulticast(this, msg, newThread);
+      for (size_t i = 0; i < handlers->size (); i++)
+        {
+          (*handlers)[i]->updateMulticast (this, msg, newThread);
+        }
     }
-  }
 
-  newThread->setStatic(staticThread);
+  newThread->setStatic (staticThread);
 
   newThread->id = (u_long)(++currentThreadID);
 
-  ret = newThread->run();
+  ret = newThread->run ();
 
-  if(ret)
-  {
-    string str;
-    delete newThread;
-    str.assign(languageParser.getValue("ERR_ERROR"));
-    str.append(": Threads creation" );
-    logWriteln(str.c_str(), MYSERVER_LOG_MSG_ERROR);
-    return -1;
-  }
+  if (ret)
+    {
+      logWriteln (MYSERVER_LOG_MSG_ERROR, _("Error creating thread"));
+      return -1;
+    }
 
-  threads.push_back(newThread);
+  threads.push_back (newThread);
   return 0;
 }
 
@@ -1957,36 +1842,36 @@ int Server::addThread(bool staticThread)
  *Remove a thread.
  *Return zero if a thread was removed.
  */
-int Server::removeThread(u_long ID)
+int Server::removeThread (u_long ID)
 {
   int ret = 1;
-  string msg("remove-thread");
+  string msg ("remove-thread");
   vector<Multicast<string, void*, int>*>* handlers;
 
 
-  handlers = getHandlers(msg);
+  handlers = getHandlers (msg);
 
-  threadsMutex->lock();
+  threadsMutex->lock ();
 
-  if(handlers)
-  {
-    for(size_t i = 0; i < handlers->size(); i++)
+  if (handlers)
     {
-      (*handlers)[i]->updateMulticast(this, msg, &ID);
+      for (size_t i = 0; i < handlers->size (); i++)
+        {
+          (*handlers)[i]->updateMulticast (this, msg, &ID);
+        }
     }
-  }
 
-  for(list<ClientsThread*>::iterator it = threads.begin(); it != threads.end(); it++)
-  {
-    if((*it)->id == ID)
+  for (list<ClientsThread*>::iterator it = threads.begin (); it != threads.end (); it++)
     {
-      (*it)->stop();
-      ret = 0;
-      threads.erase(it);
-      break;
+      if ((*it)->id == ID)
+        {
+          (*it)->stop();
+          ret = 0;
+          threads.erase (it);
+          break;
+        }
     }
-  }
-  threadsMutex->unlock();
+  threadsMutex->unlock ();
   return ret;
 
 }
@@ -1996,16 +1881,16 @@ int Server::removeThread(u_long ID)
  *the Server class.  The instance is not created in
  *getInstance to have a faster inline function.
  */
-void Server::createInstance()
+void Server::createInstance ()
 {
-  if(instance == 0)
-    instance = new Server();
+  if (instance == 0)
+    instance = new Server ();
 }
 
 /*!
  *Get a pointer to a filters factory object.
  */
-FiltersFactory* Server::getFiltersFactory()
+FiltersFactory* Server::getFiltersFactory ()
 {
   return &filtersFactory;
 }
@@ -2013,49 +1898,52 @@ FiltersFactory* Server::getFiltersFactory()
 /*!
  *Check how many threads are not working.
  */
-int Server::countAvailableThreads()
+int Server::countAvailableThreads ()
 {
- int count = 0;
+  int count = 0;
 
-  threadsMutex->lock();
+  threadsMutex->lock ();
 
   count = freeThreads;
 
-  threadsMutex->unlock();
+  threadsMutex->unlock ();
 
   return count;
 }
 
 /*!
- *Write a string to the log file and terminate the line.
+ * Write a message on a single LogStream specifying a formatting string.
+ *
+ * \see LogManager#log (void*, string, string, LoggingLeve, bool, va_list)
+ * \return 0 on success, 1 on error.
  */
-int Server::logWriteln(char const* str, LoggingLevel level)
+int Server::logWriteln (LoggingLevel level, const char *fmt, ...)
 {
-  if(!str)
+  int failure = 0;
+
+  va_list argptr;
+
+  va_start (argptr, fmt);
+
+  if (!fmt)
     return 0;
 
-  /*
-   *If the log receiver is not the console output a timestamp.
-   */
-  if (logLocation.find ("console://") == string::npos)
-  {
-    char time[38];
-    int len;
-    time[0] = '[';
-    getRFC822GMTTime(&time[1], 32);
-    len = strlen(time);
-    time[len + 0] = ']';
-    time[len + 1] = ' ';
-    time[len + 2] = '-';
-    time[len + 3] = '-';
-    time[len + 4] = ' ';
-    time[len + 5] = '\0';
-    string timestr (time);
-    if (logManager->log (this, "MAINLOG", logLocation, timestr, false, level))
-      return 1;
-  }
-  string msg (str);
-  return logManager->log (this, "MAINLOG", logLocation, msg, true, level);
+  bool ts = (logLocation.find ("console://") == string::npos);
+
+  failure = logManager->log (this, "MAINLOG", logLocation, level, ts, true, fmt,
+                             argptr);
+
+  va_end (argptr);
+
+  return failure;
+}
+
+/*!
+ * Write a string to the log file and terminate the line.
+ */
+int Server::logWriteln (char const* str, LoggingLevel level)
+{
+  return logWriteln (level, "%s", str);
 }
 
 /*!
@@ -2077,7 +1965,7 @@ Server::setLogLocation (string location)
 /*!
  *Get the size for the first buffer.
  */
-u_long Server::getBuffersize()
+u_long Server::getBuffersize ()
 {
   return buffersize;
 }
@@ -2085,7 +1973,7 @@ u_long Server::getBuffersize()
 /*!
  *Get the size for the second buffer.
  */
-u_long Server::getBuffersize2()
+u_long Server::getBuffersize2 ()
 {
   return secondaryBufferSize;
 }
@@ -2093,17 +1981,17 @@ u_long Server::getBuffersize2()
 /*!
  *Set a global descriptor.
  */
-void Server::setGlobalData(const char* name, void* data)
+void Server::setGlobalData (const char* name, void* data)
 {
-  string str(name);
-  globalData.put(str, data);
+  string str (name);
+  globalData.put (str, data);
 }
 
 /*!
  *Get a global descriptor.
  */
-void* Server::getGlobalData(const char* name)
+void* Server::getGlobalData (const char* name)
 {
-  string str(name);
-  return globalData.get(str);
+  string str (name);
+  return globalData.get (str);
 }
diff --git a/myserver/stdafx.h b/myserver/stdafx.h
index 5344d6c..1c28adf 100644
--- a/myserver/stdafx.h
+++ b/myserver/stdafx.h
@@ -20,28 +20,29 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 #define STDAFX_H
 
 #ifndef WIN32
-#include "config.h"
+# include "config.h"
 #endif
 
 #ifdef HAVE_CONFIG_H
-#include <config.h>
+# include <config.h>
 #endif
 
 #ifdef HAVE_PTHREAD
-#include <pthread.h>
+# include <pthread.h>
 #endif
 
 #ifdef WIN32
 extern "C"
 {
-#include <winsock2.h>
-#include <tchar.h>
-#include <process.h>
+# include <winsock2.h>
+# include <tchar.h>
+# include <process.h>
 }
 #endif
 
 
-extern "C" {
+extern "C"
+{
 #include <stdlib.h>
 #include <stdio.h>
 #include <fcntl.h>
@@ -49,22 +50,22 @@ extern "C" {
 #include <time.h>
 
 #ifndef WIN32
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <limits.h>
+# include <sys/types.h>
+# include <sys/stat.h>
+# include <limits.h>
 #endif
 }
 
 #ifndef MAX_PATH
-#ifdef PATH_MAX
-#define MAX_PATH PATH_MAX
-#else
-#define MAX_PATH 255
-#endif
+# ifdef PATH_MAX
+#  define MAX_PATH PATH_MAX
+# else
+#  define MAX_PATH 255
+# endif
 #endif
 
 #ifndef HOST_NAME_MAX
-#define HOST_NAME_MAX 255
+# define HOST_NAME_MAX 255
 #endif
 
 #define USE_NEW
@@ -78,11 +79,14 @@ typedef unsigned char u_char;
 typedef void* HANDLE;
 
 #ifndef SOCKET_ERROR
-#define SOCKET_ERROR -1
+# define SOCKET_ERROR -1
 #endif
 
 #ifndef INVALID_SOCKET
-#define INVALID_SOCKET -1
+# define INVALID_SOCKET -1
 #endif
 
 #endif
+
+
+#define _(X) X



commit 90cb83ecf65cced0e6479b8c94d991bcd3a1c807
Author: Giuseppe Scrivano <gscrivano@gnu.org>
Date:   Wed Aug 12 21:30:28 2009 +0200

    Log can add a timestamp before the message body

diff --git a/myserver/include/log/log_manager.h b/myserver/include/log/log_manager.h
index 22327e0..f90f336 100644
--- a/myserver/include/log/log_manager.h
+++ b/myserver/include/log/log_manager.h
@@ -49,9 +49,10 @@ public:
            string & message, bool appendNL = false,
            LoggingLevel level = MYSERVER_LOG_MSG_INFO);
   int log (const void* owner, const string & type, const string & location,
-           LoggingLevel level, bool appendNL, const char *fmt, ...);
+           LoggingLevel level, bool ts, bool appendNL, const char *fmt, ...);
   int log (const void* owner, const string & type, const string & location,
-           LoggingLevel level, bool appendNL, const char *fmt, va_list args);
+           LoggingLevel level, bool ts, bool appendNL, const char *fmt,
+           va_list args);
 
   int close (const void *owner);
   int close (const void *owner, string type);
diff --git a/myserver/src/log/log_manager.cpp b/myserver/src/log/log_manager.cpp
index fc07471..c6ba1bf 100644
--- a/myserver/src/log/log_manager.cpp
+++ b/myserver/src/log/log_manager.cpp
@@ -18,6 +18,8 @@
 #include <include/log/log_manager.h>
 #include <include/server/server.h>
 
+#include <cstdarg>
+
 /*!
  * The constructor.
  *
@@ -556,12 +558,14 @@ LogManager::log (const void* owner, const string & type, const string & location
 /*!
  * Write a message on a single LogStream specifying a formatting string.
  *
- * \see LogManager#log (void*, string, string, LoggingLeve, bool, va_list)
+ * \see LogManager#log (void*, string, string, LoggingLevel, bool, bool,
+ * va_list)
  * \return 0 on success, 1 on error.
  */
 int
 LogManager::log (const void* owner, const string & type, const string & location,
-                 LoggingLevel level, bool appendNL, const char *fmt, ...)
+                 LoggingLevel level, bool ts, bool appendNL, const char *fmt,
+                 ...)
 {
   int failure = 0;
 
@@ -572,7 +576,7 @@ LogManager::log (const void* owner, const string & type, const string & location
 
   va_start (argptr, fmt);
 
-  failure = log (owner, type, location, level, appendNL, fmt, argptr);
+  failure = log (owner, type, location, level, ts, appendNL, fmt, argptr);
 
   va_end (argptr);
 
@@ -588,6 +592,7 @@ LogManager::log (const void* owner, const string & type, const string & location
  * \param message The message we want to write.
  * \param level The level of logging of this message. If it is less than
  * the LogManager's level of logging, the message will be discarded.
+ * \param ts Specify if a timestamp should be added before the message.
  * \param appendNL a flag that, if set, tells the LogManager to append
  * a new line sequence to the message, according to the host operating system
  * convention.
@@ -603,8 +608,8 @@ LogManager::log (const void* owner, const string & type, const string & location
  */
 int
 LogManager::log (const void* owner, const string & type, const string &
-                 location, LoggingLevel level, bool appendNL, const char *fmt,
-                 va_list args)
+                 location, LoggingLevel level, bool ts, bool appendNL,
+                 const char *fmt, va_list args)
 {
   int failure = 0;
 
@@ -617,6 +622,23 @@ LogManager::log (const void* owner, const string & type, const string &
 
   try
     {
+      if (ts)
+        {
+          char time[38];
+          int len;
+          time[0] = '[';
+          getRFC822GMTTime(&time[1], 32);
+          len = strlen(time);
+          time[len + 0] = ']';
+          time[len + 1] = ' ';
+          time[len + 2] = '-';
+          time[len + 3] = '-';
+          time[len + 4] = ' ';
+          time[len + 5] = '\0';
+          string timestr (time);
+          failure |= notify (owner, MYSERVER_LOG_EVT_LOG, &timestr);
+        }
+
       while (*fmt)
         {
           if (*fmt != '%')

-----------------------------------------------------------------------

Summary of changes:
 myserver/include/log/log_manager.h |    5 +-
 myserver/include/server/server.h   |    1 +
 myserver/src/conf/vhost/vhost.cpp  |  180 ++---
 myserver/src/log/log_manager.cpp   |   32 +-
 myserver/src/server/server.cpp     | 1558 +++++++++++++++++-------------------
 myserver/stdafx.h                  |   40 +-
 6 files changed, 842 insertions(+), 974 deletions(-)


hooks/post-receive
-- 
GNU MyServer



From MAILER-DAEMON Thu Aug 13 17:22:35 2009
Received: from mailman by lists.gnu.org with archive (Exim 4.43)
	id 1Mbhkp-0007iT-N8
	for mharc-myserver-commit@gnu.org; Thu, 13 Aug 2009 17:22:35 -0400
Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43)
	id 1Mbhkn-0007gp-VR
	for myserver-commit@gnu.org; Thu, 13 Aug 2009 17:22:34 -0400
Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43)
	id 1Mbhkm-0007fz-3Z
	for myserver-commit@gnu.org; Thu, 13 Aug 2009 17:22:33 -0400
Received: from [199.232.76.173] (port=55087 helo=monty-python.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43) id 1Mbhkl-0007fo-P0
	for myserver-commit@gnu.org; Thu, 13 Aug 2009 17:22:31 -0400
Received: from savannah.gnu.org ([199.232.41.3]:57819 helo=sv.gnu.org)
	by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32)
	(Exim 4.60) (envelope-from <gscrivano@gnu.org>) id 1Mbhkk-00064D-KZ
	for myserver-commit@gnu.org; Thu, 13 Aug 2009 17:22:31 -0400
Received: from download.savannah.gnu.org ([199.232.41.75]
	helo=cvs.savannah.gnu.org) by sv.gnu.org with esmtp (Exim 4.69)
	(envelope-from <gscrivano@gnu.org>) id 1Mbhkj-0005Ox-NN
	for myserver-commit@gnu.org; Thu, 13 Aug 2009 21:22:29 +0000
Received: from gscrivano by cvs.savannah.gnu.org with local (Exim 4.69)
	(envelope-from <gscrivano@savannah.gnu.org>) id 1Mbhkg-0005OL-1F
	for myserver-commit@gnu.org; Thu, 13 Aug 2009 21:22:29 +0000
To: myserver-commit@gnu.org
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: 6f9f8c5b6e38a19813f4408c6fad2edf5f24d065
X-Git-Newrev: cc275508841c4d8c3195e6ee7ec1d521fd1c63fd
Message-Id: <E1Mbhkg-0005OL-1F@cvs.savannah.gnu.org>
From: Giuseppe Scrivano <gscrivano@gnu.org>
Date: Thu, 13 Aug 2009 21:22:27 +0000
X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2)
Subject: [myserver-commit] [SCM] GNU MyServer branch, master,
	updated. cc275508841c4d8c3195e6ee7ec1d521fd1c63fd
X-BeenThere: myserver-commit@gnu.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: myserver-commit.gnu.org
List-Unsubscribe: <http://lists.gnu.org/mailman/listinfo/myserver-commit>,
	<mailto:myserver-commit-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/pipermail/myserver-commit>
List-Post: <mailto:myserver-commit@gnu.org>
List-Help: <mailto:myserver-commit-request@gnu.org?subject=help>
List-Subscribe: <http://lists.gnu.org/mailman/listinfo/myserver-commit>,
	<mailto:myserver-commit-request@gnu.org?subject=subscribe>
X-List-Received-Date: Thu, 13 Aug 2009 21:22:34 -0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU MyServer".

The branch, master has been updated
       via  cc275508841c4d8c3195e6ee7ec1d521fd1c63fd (commit)
      from  6f9f8c5b6e38a19813f4408c6fad2edf5f24d065 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------


commit cc275508841c4d8c3195e6ee7ec1d521fd1c63fd
Author: Giuseppe Scrivano <gscrivano@gnu.org>
Date:   Thu Aug 13 23:21:00 2009 +0200

    Use the new Server logging functionality.

diff --git a/myserver/src/connections_scheduler/connections_scheduler.cpp b/myserver/src/connections_scheduler/connections_scheduler.cpp
index 853b327..b15cde0 100644
--- a/myserver/src/connections_scheduler/connections_scheduler.cpp
+++ b/myserver/src/connections_scheduler/connections_scheduler.cpp
@@ -22,52 +22,49 @@ static DEFINE_THREAD(dispatcher, p)
 {
   ConnectionsScheduler::DispatcherArg *da = (ConnectionsScheduler::DispatcherArg*)p;
 
-  if(da == NULL)
+  if (da == NULL)
     return NULL;
 
-  da->mutex->lock();
-  if(!da->terminated)
-  {
-    da->mutex->unlock();
-    return 0;
-  }
+  da->mutex->lock ();
+  if (!da->terminated)
+    {
+      da->mutex->unlock ();
+      return 0;
+    }
 
   da->terminated = false;
 
-  da->mutex->unlock();
+  da->mutex->unlock ();
 
-  while(!da->terminate)
-  {    
-    int res;
+  while (!da->terminate)
+    {
+      int res;
 
-    da->mutex->lock();
-    res = event_loop(EVLOOP_ONCE);
-    da->mutex->unlock();
+      da->mutex->lock ();
+      res = event_loop (EVLOOP_ONCE);
+      da->mutex->unlock ();
 
-    if(res == 1)
-    {
-      Thread::wait(10);
+      if (res == 1)
+        Thread::wait (10);
     }
 
-  }
-  
-  da->mutex->lock();
+  da->mutex->lock ();
   da->terminated = true;
-  da->mutex->unlock();
+  da->mutex->unlock ();
 
   return NULL;
 }
 
-static void newDataHandler(int fd, short event, void *param)
+static void newDataHandler (int fd, short event, void *param)
 {
   ConnectionsScheduler::DispatcherArg* arg = (ConnectionsScheduler::DispatcherArg*) param;
 
-  if(!arg->terminate && arg->scheduler)
-    arg->scheduler->newData(event, fd);
+  if (!arg->terminate && arg->scheduler)
+    arg->scheduler->newData (event, fd);
 }
 
 
-void ConnectionsScheduler::newData(short event, SocketHandle handle)
+void ConnectionsScheduler::newData (short event, SocketHandle handle)
 {
   ConnectionPtr connection = NULL;
 
@@ -76,25 +73,23 @@ void ConnectionsScheduler::newData(short event, SocketHandle handle)
   connectionsMutex.unlock();
 
 
-  if(connection == NULL || server == NULL)
+  if (connection == NULL || server == NULL)
     return;
 
-  if(event == EV_TIMEOUT)
-  {
-    if(!connection->allowDelete())
-      return;
+  if (event == EV_READ)
+    addReadyConnection (connection);
+  else if (event == EV_TIMEOUT)
+    {
+      if (!connection->allowDelete())
+        return;
 
-    server->notifyDeleteConnection(connection);
+      server->notifyDeleteConnection (connection);
 
-    removeConnection(connection);
-  }
-  else if(event == EV_READ)
-  {
-    addReadyConnection(connection);
-  }
+      removeConnection (connection);
+    }
 }
 
-static void eventLoopHandler(int fd, short event, void *arg)
+static void eventLoopHandler (int fd, short event, void *arg)
 {
   ConnectionsScheduler::DispatcherArg *da = (ConnectionsScheduler::DispatcherArg*)arg;
   u_long nbr;
@@ -109,11 +104,11 @@ static void eventLoopHandler(int fd, short event, void *arg)
       if (cmd == 'c')
       {
         /*
-         *Schedule a new connection.
-         *The 'c' command is followed by:
-         *SocketHandle  -> Socket to monitor for new data.
-         *ConnectionPtr -> Related Connection.
-         *timeval       -> Timeout.
+         * Schedule a new connection.
+         * The 'c' command is followed by:
+         * SocketHandle  -> Socket to monitor for new data.
+         * ConnectionPtr -> Related Connection.
+         * timeval       -> Timeout.
          */
         SocketHandle handle;
         ConnectionPtr c;
@@ -158,17 +153,17 @@ static void listenerHandler (int fd, short event, void *arg)
 }
 
 /*!
- *Add a listener socket to the event queue.
- *This is used to renew the event after the listener thread is notified.
+ * Add a listener socket to the event queue.
+ * This is used to renew the event after the listener thread is notified.
  *
- *\param la Structure containing an Event to be notified on new data.
+ * \param la Structure containing an Event to be notified on new data.
  */
-void ConnectionsScheduler::listener(ConnectionsScheduler::ListenerArg *la)
+void ConnectionsScheduler::listener (ConnectionsScheduler::ListenerArg *la)
 {
   ConnectionsScheduler::ListenerArg *arg = new ConnectionsScheduler::ListenerArg(la);
   static timeval tv = {3, 0};
 
-  event_set(&(arg->ev), (int) la->serverSocket->getHandle(), EV_READ | EV_TIMEOUT, 
+  event_set(&(arg->ev), (int) la->serverSocket->getHandle(), EV_READ | EV_TIMEOUT,
             listenerHandler, arg);
 
   arg->terminate = &dispatcherArg.terminate;
@@ -184,14 +179,14 @@ void ConnectionsScheduler::listener(ConnectionsScheduler::ListenerArg *la)
   Socket sock (dispatcherArg.socketPair.getSecondHandle ());
 
   eventsSocketMutex.lock();
-  sock.write("l", 1, &nbw);  
+  sock.write("l", 1, &nbw);
   eventsSocketMutex.unlock();
 }
 
 /*!
- *Remove a listener thread from the list.
+ * Remove a listener thread from the list.
  */
-void ConnectionsScheduler::removeListener(ConnectionsScheduler::ListenerArg* la)
+void ConnectionsScheduler::removeListener (ConnectionsScheduler::ListenerArg* la)
 {
   eventsMutex.lock();
   event_del(&(la->ev));
@@ -200,9 +195,9 @@ void ConnectionsScheduler::removeListener(ConnectionsScheduler::ListenerArg* la)
 }
 
 /*!
- *C'tor.
+ * C'tor.
  */
-ConnectionsScheduler::ConnectionsScheduler(Server* server)
+ConnectionsScheduler::ConnectionsScheduler (Server* server)
 {
   readyMutex.init();
   eventsMutex.init();
@@ -217,55 +212,55 @@ ConnectionsScheduler::ConnectionsScheduler(Server* server)
 }
 
 /*!
- *Get the number of all connections made to the server.
+ * Get the number of all connections made to the server.
  */
-u_long ConnectionsScheduler::getNumTotalConnections()
+u_long ConnectionsScheduler::getNumTotalConnections ()
 {
   return nTotalConnections;
 }
 
 
 /*!
- *Register the connection with a new ID.
- *\param connection The connection to register.
+ * Register the connection with a new ID.
+ * \param connection The connection to register.
  */
-void ConnectionsScheduler::registerConnectionID(ConnectionPtr connection)
+void ConnectionsScheduler::registerConnectionID (ConnectionPtr connection)
 {
-  connectionsMutex.lock();
-  connection->setID(nTotalConnections++);
-  connectionsMutex.unlock();
+  connectionsMutex.lock ();
+  connection->setID (nTotalConnections++);
+  connectionsMutex.unlock ();
 }
 
 /*!
- *Restart the scheduler.
+ * Restart the scheduler.
  */
-void ConnectionsScheduler::restart()
+void ConnectionsScheduler::restart ()
 {
-  readyMutex.init();
-  connectionsMutex.init();
-  eventsMutex.init();
-  listeners.clear();
+  readyMutex.init ();
+  connectionsMutex.init ();
+  eventsMutex.init ();
+  listeners.clear ();
 
-  if(readySemaphore)
+  if (readySemaphore)
     delete readySemaphore;
 
-  readySemaphore = new Semaphore(0);
+  readySemaphore = new Semaphore (0);
 
-  initialize();
+  initialize ();
 }
 
 /*!
- *Static initialization.
+ * Static initialization.
  */
-void ConnectionsScheduler::initialize()
+void ConnectionsScheduler::initialize ()
 {
   static int initialized = 0;
 
   if (!initialized)
-  {
-    event_init();
-    initialized = 1;
-  }
+    {
+      event_init ();
+      initialized = 1;
+    }
 
   dispatcherArg.terminated = true;
   dispatcherArg.terminate = false;
@@ -278,35 +273,33 @@ void ConnectionsScheduler::initialize()
   int err = dispatcherArg.socketPair.create ();
 
   if (err == -1)
-  {
-    if(server)
     {
-      server->logWriteln("Error initializing socket pair.", MYSERVER_LOG_MSG_ERROR);
+      if (server)
+        server->logWriteln (MYSERVER_LOG_MSG_ERROR, _("Error initializing socket pair"));
+      return;
     }
-    return;
-  }
 
   event_set (&(dispatcherArg.loopEvent), dispatcherArg.socketPair.getFirstHandle (), EV_READ | EV_TIMEOUT,
-            eventLoopHandler, &dispatcherArg);
+             eventLoopHandler, &dispatcherArg);
 
   event_add (&(dispatcherArg.loopEvent), NULL);
 
   if (Thread::create (&dispatchedThreadId, dispatcher, &dispatcherArg))
-  {
-    if (server)
     {
-      server->logWriteln ("Error initializing dispatcher thread.", MYSERVER_LOG_MSG_ERROR);
+      if (server)
+        server->logWriteln (MYSERVER_LOG_MSG_ERROR,
+                            _("Error while initializing the dispatcher thread"));
+
+      dispatchedThreadId = 0;
     }
-    dispatchedThreadId = 0;
-  }
-  
+
   releasing = false;
 }
 
 /*!
- *D'tor.
+ * D'tor.
  */
-ConnectionsScheduler::~ConnectionsScheduler()
+ConnectionsScheduler::~ConnectionsScheduler ()
 {
   readyMutex.destroy();
   eventsMutex.destroy();
@@ -318,151 +311,149 @@ ConnectionsScheduler::~ConnectionsScheduler()
 
 
 /*!
- *Add an existent connection to ready connections queue.
+ * Add an existent connection to ready connections queue.
  */
-void ConnectionsScheduler::addReadyConnection(ConnectionPtr c)
+void ConnectionsScheduler::addReadyConnection (ConnectionPtr c)
 {
-  addReadyConnectionImpl(c);
+  addReadyConnectionImpl (c);
 }
 
 /*!
- *Add a new connection to ready connections queue.
+ * Add a new connection to ready connections queue.
  */
-void ConnectionsScheduler::addNewReadyConnection(ConnectionPtr c)
+void ConnectionsScheduler::addNewReadyConnection (ConnectionPtr c)
 {
-  addReadyConnectionImpl(c);
+  addReadyConnectionImpl (c);
 }
 
 
 /*!
- *Add a connection to ready connections queue.
+ * Add a connection to ready connections queue.
  */
-void ConnectionsScheduler::addReadyConnectionImpl(ConnectionPtr c)
+void ConnectionsScheduler::addReadyConnectionImpl (ConnectionPtr c)
 {
-  int priority = c->getPriority();
+  int priority = c->getPriority ();
 
-  if(priority == -1 && c->host)
-    priority = c->host->getDefaultPriority();
-    
-  priority = std::max(0, priority);
-  priority = std::min(PRIORITY_CLASSES - 1, priority);
+  if (priority == -1 && c->host)
+    priority = c->host->getDefaultPriority ();
 
-  c->setScheduled(1);
+  priority = std::max (0, priority);
+  priority = std::min (PRIORITY_CLASSES - 1, priority);
 
-  readyMutex.lock();
-  ready[priority].push(c);
-  readyMutex.unlock();
+  c->setScheduled (1);
 
-  if(server)
-    server->checkThreadsNumber();
+  readyMutex.lock ();
+  ready[priority].push (c);
+  readyMutex.unlock ();
 
-  readySemaphore->unlock();
+  if (server)
+    server->checkThreadsNumber ();
+
+  readySemaphore->unlock ();
 }
 
 /*!
- *Add a new connection to the scheduler.
+ * Add a new connection to the scheduler.
  */
-void ConnectionsScheduler::addNewWaitingConnection(ConnectionPtr c)
+void ConnectionsScheduler::addNewWaitingConnection (ConnectionPtr c)
 {
-  addWaitingConnectionImpl(c, 0);
+  addWaitingConnectionImpl (c, 0);
 }
 
 /*!
- *Reschedule a connection in the scheduler.
+ * Reschedule a connection in the scheduler.
  */
-void ConnectionsScheduler::addWaitingConnection(ConnectionPtr c)
+void ConnectionsScheduler::addWaitingConnection (ConnectionPtr c)
 {
-  addWaitingConnectionImpl(c, 1);
+  addWaitingConnectionImpl (c, 1);
 }
 
 /*!
- *Implementation to add a connection to waiting connections queue.
+ * Implementation to add a connection to waiting connections queue.
  */
-void ConnectionsScheduler::addWaitingConnectionImpl(ConnectionPtr c, int lock)
+void ConnectionsScheduler::addWaitingConnectionImpl (ConnectionPtr c, int lock)
 {
   static timeval tv = {10, 0};
-  SocketHandle handle = c->socket ? (SocketHandle) c->socket->getHandle() : NULL;
+  SocketHandle handle = c->socket ? (SocketHandle) c->socket->getHandle () : NULL;
 
   if(server)
-    tv.tv_sec = server->getTimeout() / 1000;
+    tv.tv_sec = server->getTimeout () / 1000;
   else
     tv.tv_sec = 30;
 
-  c->setScheduled(0);
+  c->setScheduled (0);
 
-  connectionsMutex.lock();
-  connections.put(handle, c);
-  connectionsMutex.unlock();
+  connectionsMutex.lock ();
+  connections.put (handle, c);
+  connectionsMutex.unlock ();
 
   /*
-   *If there is need to obtain the events lock don't block the current
-   *thread but send the 'c' message to the eventLoopHandler function,
-   *it will reschedule the connection from its thread context while it
-   *owns the lock.
+   * If there is need to obtain the events lock don't block the current
+   * thread but send the 'c' message to the eventLoopHandler function,
+   * it will reschedule the connection from its thread context while it
+   * owns the lock.
    */
-  if(lock)
-  {
-    u_long nbw;
-    Socket sock (dispatcherArg.socketPair.getSecondHandle ());
-
-    eventsSocketMutex.lock();
-    sock.write("c", 1, &nbw);
-    sock.write((char*)&handle, sizeof(SocketHandle), &nbw);
-    sock.write((char*)&c, sizeof(ConnectionPtr), &nbw);
-    sock.write((char*)&tv, sizeof(timeval), &nbw);
-    eventsSocketMutex.unlock();
-  }
+  if (lock)
+    {
+      u_long nbw;
+      Socket sock (dispatcherArg.socketPair.getSecondHandle ());
+
+      eventsSocketMutex.lock ();
+      sock.write ("c", 1, &nbw);
+      sock.write ((char*)&handle, sizeof(SocketHandle), &nbw);
+      sock.write ((char*)&c, sizeof(ConnectionPtr), &nbw);
+      sock.write ((char*)&tv, sizeof(timeval), &nbw);
+      eventsSocketMutex.unlock ();
+    }
   else
-  {
-    event_once((int)handle, EV_READ | EV_TIMEOUT, newDataHandler, &dispatcherArg, &tv);
-  }
+    event_once ((int)handle, EV_READ | EV_TIMEOUT, newDataHandler,
+                &dispatcherArg, &tv);
 }
 
 /*!
- *Get a connection from the active connections queue.
+ * Get a connection from the active connections queue.
  */
-ConnectionPtr ConnectionsScheduler::getConnection()
+ConnectionPtr ConnectionsScheduler::getConnection ()
 {
   ConnectionPtr ret = 0;
 
-  if(releasing)
+  if (releasing)
     return NULL;
 
-  readySemaphore->lock();
+  readySemaphore->lock ();
 
-  if(releasing)
+  if (releasing)
     return NULL;
 
-  readyMutex.lock();
+  readyMutex.lock ();
 
-  for(int i = 0; i < PRIORITY_CLASSES; i++)
-  {
-    if(currentPriorityDone > currentPriority ||
-       !ready[currentPriority].size())
+  for (int i = 0; i < PRIORITY_CLASSES; i++)
     {
-      currentPriority = (currentPriority + 1) % PRIORITY_CLASSES;
-      currentPriorityDone = 0;
+      if (currentPriorityDone > currentPriority ||
+          !ready[currentPriority].size())
+        {
+          currentPriority = (currentPriority + 1) % PRIORITY_CLASSES;
+          currentPriorityDone = 0;
+        }
+
+      if (ready[currentPriority].size ())
+        {
+          ret = ready[currentPriority].front ();
+          ret->setScheduled (0);
+          ready[currentPriority].pop ();
+          currentPriorityDone++;
+          break;
+        }
     }
 
-    if(ready[currentPriority].size())
-    {
-      ret = ready[currentPriority].front();
-      ret->setScheduled(0);
-      ready[currentPriority].pop();
-      currentPriorityDone++;
-      break;
-    }
-  }
-
-  readyMutex.unlock();
-
+  readyMutex.unlock ();
   return ret;
 }
 
 /*!
- *Release all the blocking calls.
+ * Release all the blocking calls.
  */
-void ConnectionsScheduler::release()
+void ConnectionsScheduler::release ()
 {
   u_long nbw;
   u_long max = 0;
@@ -470,146 +461,142 @@ void ConnectionsScheduler::release()
   dispatcherArg.terminate = true;
 
   if (server)
-    max = server->getNumThreads() * 2;
+    max = server->getNumThreads () * 2;
 
   for (u_long i = 0; i < max; i++)
-  {
-    readySemaphore->unlock();
-  }
+    {
+      readySemaphore->unlock ();
+    }
 
   Socket sockR (dispatcherArg.socketPair.getFirstHandle ());
   Socket sockW (dispatcherArg.socketPair.getSecondHandle ());
 
-  eventsSocketMutex.lock();
-  sockW.write("r", 1, &nbw);
-  eventsSocketMutex.unlock();
-  
-  if(dispatchedThreadId)
-    Thread::join(dispatchedThreadId);
+  eventsSocketMutex.lock ();
+  sockW.write ("r", 1, &nbw);
+  eventsSocketMutex.unlock ();
 
-  terminateConnections();
+  if (dispatchedThreadId)
+    Thread::join (dispatchedThreadId);
 
-  eventsMutex.lock();
+  terminateConnections ();
 
-  event_del(&(dispatcherArg.loopEvent));
+  eventsMutex.lock ();
 
-  list<ListenerArg*>::iterator it = listeners.begin();
+  event_del (&(dispatcherArg.loopEvent));
 
-  while(it != listeners.end())
-  {
-    event_del(&((*it)->ev));
-    delete (*it);
-    it++;
-  }
+  list<ListenerArg*>::iterator it = listeners.begin ();
 
-  listeners.clear();
-  
-  eventsMutex.unlock();
+  while (it != listeners.end ())
+    {
+      event_del (&((*it)->ev));
+      delete *it;
+      it++;
+    }
+
+  listeners.clear ();
+
+  eventsMutex.unlock ();
 
   dispatcherArg.socketPair.close ();
 }
 
 /*!
- *Fill a list with all the alive connections.
- *\param out A list that will receive all the connections alive on the
- *server.
+ * Fill a list with all the alive connections.
+ * \param out A list that will receive all the connections alive on the
+ * server.
  */
-void ConnectionsScheduler::getConnections(list<ConnectionPtr> &out)
+void ConnectionsScheduler::getConnections (list<ConnectionPtr> &out)
 {
-  out.clear();
+  out.clear ();
 
-  connectionsMutex.lock();
+  connectionsMutex.lock ();
 
-  HashMap<SocketHandle, ConnectionPtr>::Iterator it = connections.begin();
-  for(; it != connections.end(); it++)
-    out.push_back(*it);
+  HashMap<SocketHandle, ConnectionPtr>::Iterator it = connections.begin ();
+  for(; it != connections.end (); it++)
+    out.push_back (*it);
 
-  connectionsMutex.unlock();
+  connectionsMutex.unlock ();
 }
 
 /*!
- *Get the alive connections number.
+ * Get the alive connections number.
  */
-u_long ConnectionsScheduler::getConnectionsNumber()
+u_long ConnectionsScheduler::getConnectionsNumber ()
 {
-  return connections.size();
+  return connections.size ();
 }
 
 /*!
- *Remove a connection from the connections set.
+ * Remove a connection from the connections set.
  */
-void ConnectionsScheduler::removeConnection(ConnectionPtr connection)
+void ConnectionsScheduler::removeConnection (ConnectionPtr connection)
 {
-  connectionsMutex.lock();
-  if(connection->socket)
-    connections.remove((SocketHandle)connection->socket->getHandle());
-  connectionsMutex.unlock();
+  connectionsMutex.lock ();
+  if (connection->socket)
+    connections.remove ((SocketHandle)connection->socket->getHandle ());
+  connectionsMutex.unlock ();
 }
 
 /*!
- *Terminate any active connection.
+ * Terminate any active connection.
  */
-void ConnectionsScheduler::terminateConnections()
+void ConnectionsScheduler::terminateConnections ()
 {
   int i;
 
   try
-  {
-    connectionsMutex.lock();
-
-    HashMap<SocketHandle, ConnectionPtr>::Iterator it = connections.begin();
-    for(; it != connections.end(); it++)
     {
-      ConnectionPtr c = *it;
-      if (c->allowDelete(true) && c->socket)
-        c->socket->close();
+      connectionsMutex.lock();
+
+      HashMap<SocketHandle, ConnectionPtr>::Iterator it = connections.begin ();
+      for (; it != connections.end (); it++)
+        {
+          ConnectionPtr c = *it;
+          if (c->allowDelete (true) && c->socket)
+            c->socket->close ();
+        }
     }
-  }
-  catch(...)
-  {
-    connectionsMutex.unlock();
-    throw;
-  };
+  catch (...)
+    {
+      connectionsMutex.unlock ();
+      throw;
+    };
 
-  connections.clear();
+  connections.clear ();
 
-  connectionsMutex.unlock();
+  connectionsMutex.unlock ();
 
-  readyMutex.lock();
+  readyMutex.lock ();
 
-  for(i = 0; i < PRIORITY_CLASSES; i++)
-    while(ready[i].size())
-      ready[i].pop();
+  for (i = 0; i < PRIORITY_CLASSES; i++)
+    while (ready[i].size())
+      ready[i].pop ();
 
-  readyMutex.unlock();
+  readyMutex.unlock ();
 }
 
 /*!
- *Accept a visitor on the connections.
+ * Accept a visitor on the connections.
  */
-int ConnectionsScheduler::accept(ConnectionsSchedulerVisitor* visitor, void* args)
+int ConnectionsScheduler::accept (ConnectionsSchedulerVisitor* visitor, void* args)
 {
   int ret = 0;
-  connectionsMutex.lock();
+  connectionsMutex.lock ();
 
   try
-  {
+    {
 
-    for(HashMap<SocketHandle, ConnectionPtr>::Iterator it = connections.begin(); 
-        it != connections.end()  && !ret; 
-        it++)
+      for (HashMap<SocketHandle, ConnectionPtr>::Iterator it =
+             connections.begin (); it != connections.end()  && !ret; it++)
+        visitor->visitConnection(*it, args);
+    }
+  catch (...)
     {
-      visitor->visitConnection(*it, args);
+      connectionsMutex.unlock ();
+      return 1;
     }
-  }
-  catch(...)
-  {
-    connectionsMutex.unlock();
-    return 1;
-  }
 
-  connectionsMutex.unlock();
+  connectionsMutex.unlock ();
 
   return ret;
-
 }
diff --git a/myserver/src/connections_scheduler/listen_threads.cpp b/myserver/src/connections_scheduler/listen_threads.cpp
index 4198857..b81263e 100644
--- a/myserver/src/connections_scheduler/listen_threads.cpp
+++ b/myserver/src/connections_scheduler/listen_threads.cpp
@@ -23,22 +23,19 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 extern "C"
 {
 #ifdef WIN32
-  //#include <Ws2tcpip.h>
-#include <direct.h>
+# include <direct.h>
 #endif
 #ifndef WIN32
-#include <unistd.h>
-#include <string.h>
-#include <signal.h>
-#include <stdlib.h>
-#include <sys/socket.h>
-#include <netinet/in.h>
-#include <arpa/inet.h>
-
-#ifdef HAVE_PTHREAD
-#include <pthread.h>
-#endif
-
+# include <unistd.h>
+# include <string.h>
+# include <signal.h>
+# include <stdlib.h>
+# include <sys/socket.h>
+# include <netinet/in.h>
+# include <arpa/inet.h>
+# ifdef HAVE_PTHREAD
+#  include <pthread.h>
+# endif
 #endif
 }
 
@@ -49,7 +46,7 @@ extern "C"
 using namespace std;
 
 /*!
- *c'tor.
+ * C'tor.
  */
 ListenThreads::ListenThreads(ConnectionsScheduler* scheduler, Server* server)
 {
@@ -60,24 +57,23 @@ ListenThreads::ListenThreads(ConnectionsScheduler* scheduler, Server* server)
 }
 
 /*!
- *This function is used to create a socket server and a thread listener
- *for a port.
+ * This function is used to create a socket server and a thread listener
+ * for a port.
  */
 int ListenThreads::createServerAndListener(u_short port)
 {
   int optvalReuseAddr = 1;
-  ostringstream portBuff;
   string listenPortMsg;
 
-  if(fastRebooting)
-  {
-    frPortsToAdd.push_back(port);
-    return 0;
-  }
+  if (fastRebooting)
+    {
+      frPortsToAdd.push_back (port);
+      return 0;
+    }
 
   /*
-   *Create the server sockets:
-   *one server socket for IPv4 and another one for IPv6
+   * Create the server sockets:
+   * one server socket for IPv4 and another one for IPv6
    */
   Socket *serverSocketIPv4 = new Socket();
   Socket *serverSocketIPv6 = NULL;
@@ -86,233 +82,211 @@ int ListenThreads::createServerAndListener(u_short port)
   si->port = port;
 
   /*
-   *Create the server socket.
+   * Create the server socket.
    */
   try
-  {
-    if ( serverSocketIPv4 != NULL )
     {
-      server->logWriteln(languageParser->getValue("MSG_SSOCKCREATE"));
-      serverSocketIPv4->socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);
-      if (serverSocketIPv4->getHandle() == (Handle)INVALID_SOCKET)
-      {
-        server->logWriteln(languageParser->getValue("ERR_OPENP"), MYSERVER_LOG_MSG_ERROR);
-        delete serverSocketIPv4;
-        serverSocketIPv4 = NULL;
-      }
-      else
-      {
-        MYSERVER_SOCKADDR_STORAGE sockServerSocketIPv4 = { 0 };
-        server->logWriteln(languageParser->getValue("MSG_SSOCKRUN"));
-        ((sockaddr_in*)(&sockServerSocketIPv4))->sin_family = AF_INET;
-        ((sockaddr_in*)(&sockServerSocketIPv4))->sin_addr.s_addr = 
-          htonl(INADDR_ANY);
-        ((sockaddr_in*)(&sockServerSocketIPv4))->sin_port =
-          htons((u_short)port);
+      if ( serverSocketIPv4 != NULL )
+        {
+          serverSocketIPv4->socket (AF_INET, SOCK_STREAM, IPPROTO_TCP);
+          if (serverSocketIPv4->getHandle() == (Handle)INVALID_SOCKET)
+            {
+              server->logWriteln (MYSERVER_LOG_MSG_ERROR,
+                            _("Error while creating the server socket"));
+              delete serverSocketIPv4;
+              serverSocketIPv4 = NULL;
+            }
+          else
+            {
+              MYSERVER_SOCKADDR_STORAGE sockServerSocketIPv4 = { 0 };
+              ((sockaddr_in*)(&sockServerSocketIPv4))->sin_family = AF_INET;
+              ((sockaddr_in*)(&sockServerSocketIPv4))->sin_addr.s_addr =
+                htonl (INADDR_ANY);
+              ((sockaddr_in*)(&sockServerSocketIPv4))->sin_port =
+                htons ((u_short)port);
 
 #ifndef WIN32
-        /*
-         *Under the unix environment the application needs some time before
-         * create a new socket for the same address.
-         *To avoid this behavior we use the current code.
-         */
-        if(serverSocketIPv4->setsockopt(SOL_SOCKET, SO_REUSEADDR,
-                                        (const char *)&optvalReuseAddr,
-                                        sizeof(optvalReuseAddr)) < 0)
-        {
-          server->logWriteln(languageParser->getValue("ERR_ERROR"), MYSERVER_LOG_MSG_ERROR);
-          delete serverSocketIPv4;
-          serverSocketIPv4 = NULL;
-          //return 0; allow IPv6
-        }
+              if (serverSocketIPv4->setsockopt (SOL_SOCKET, SO_REUSEADDR,
+                                                (const char *)&optvalReuseAddr,
+                                                sizeof(optvalReuseAddr)) < 0)
+                {
+                  server->logWriteln (MYSERVER_LOG_MSG_ERROR,
+                                 _("Error while creating the server socket"));
+
+                  delete serverSocketIPv4;
+                  serverSocketIPv4 = NULL;
+                }
 #endif
-        if( serverSocketIPv4 != NULL )
+              if (serverSocketIPv4)
+                {
+                  server->logWriteln (MYSERVER_LOG_MSG_INFO,
+                                      _("Binding the port"));
+
+                  if (!serverSocketIPv4->bind (&sockServerSocketIPv4,
+                                              sizeof(sockaddr_in)))
+                    server->logWriteln (MYSERVER_LOG_MSG_INFO, _("Port was bound"));
+                  else
+                    {
+                      server->logWriteln (MYSERVER_LOG_MSG_ERROR,
+                                          _("Error while creating the server socket"));
+                      delete serverSocketIPv4;
+                      serverSocketIPv4 = NULL;
+                    }
+
+                }
+            }
+        }
+
+#if HAVE_IPV6
+      serverSocketIPv6 = new Socket();
+
+      if (serverSocketIPv6 != NULL)
         {
-          /*
-           *Bind the port.
-           */
-          server->logWriteln(languageParser->getValue("MSG_BIND_PORT"));
-          
-          if (serverSocketIPv4->bind(&sockServerSocketIPv4,
-                                     sizeof(sockaddr_in)) != 0)
-          {
-            server->logWriteln(languageParser->getValue("ERR_BIND"), MYSERVER_LOG_MSG_ERROR);
-            delete serverSocketIPv4;
-            serverSocketIPv4 = NULL;
-          }
+          serverSocketIPv6->socket (AF_INET6, SOCK_STREAM, IPPROTO_TCP);
+          if ( serverSocketIPv6->getHandle () == (FileHandle)INVALID_SOCKET)
+            {
+              server->logWriteln (MYSERVER_LOG_MSG_ERROR,
+                                 _("Error while creating the server socket"));
+              delete serverSocketIPv6;
+              serverSocketIPv6 = NULL;
+            }
           else
-            server->logWriteln(languageParser->getValue("MSG_PORT_BOUND"));
+            {
+              MYSERVER_SOCKADDR_STORAGE sockServerSocketIPv6 = { 0 };
+              ((sockaddr_in6*)(&sockServerSocketIPv6))->sin6_family = AF_INET6;
+              ((sockaddr_in6*)(&sockServerSocketIPv6))->sin6_addr = in6addr_any;
+              ((sockaddr_in6*)(&sockServerSocketIPv6))->sin6_port =
+                htons((u_short)port);
+# ifndef WIN32
+              if (serverSocketIPv6->setsockopt (SOL_SOCKET, SO_REUSEADDR,
+                                                (const char *)&optvalReuseAddr,
+                                                sizeof(optvalReuseAddr)) < 0)
+                {
+                  server->logWriteln (MYSERVER_LOG_MSG_ERROR,
+                                 _("Error while creating the server socket"));
+                  delete serverSocketIPv6;
+                  serverSocketIPv6 = NULL;
+                }
+
+              if(serverSocketIPv6->setsockopt (IPPROTO_IPV6, IPV6_V6ONLY,
+                                              (const char *)&optvalReuseAddr,
+                                              sizeof(optvalReuseAddr)) < 0)
+                {
+                  server->logWriteln (MYSERVER_LOG_MSG_ERROR,
+                                 _("Error while creating the server socket"));
+                  delete serverSocketIPv6;
+                  serverSocketIPv6 = NULL;
+                }
+# endif
+              if (serverSocketIPv6)
+                {
+                  server->logWriteln (MYSERVER_LOG_MSG_INFO,
+                                      _("Binding the port"));
+
+                  if (!serverSocketIPv6->bind (&sockServerSocketIPv6,
+                                               sizeof(sockaddr_in6)))
+                    server->logWriteln (MYSERVER_LOG_MSG_INFO,
+                                        _("Port was bound"));
+                  else
+                    {
+                      server->logWriteln (MYSERVER_LOG_MSG_ERROR,
+                                 _("Error while creating the server socket"));
+                      delete serverSocketIPv6;
+                      serverSocketIPv6 = NULL;
+                    }
+                }
+            }
         }
-      }
-    }
+#endif // HAVE_IPV6
 
-#if ( HAVE_IPV6 )
-    serverSocketIPv6 = new Socket();
+      if (serverSocketIPv4 == NULL && serverSocketIPv6 == NULL)
+        {
+          delete si;
+          return 1;
+        }
 
-    if (serverSocketIPv6 != NULL)
-    {
-      server->logWriteln(languageParser->getValue("MSG_SSOCKCREATE"));
-      serverSocketIPv6->socket(AF_INET6, SOCK_STREAM, IPPROTO_TCP);
-      if ( serverSocketIPv6->getHandle() == (FileHandle)INVALID_SOCKET )
-      {
-        server->logWriteln(languageParser->getValue("ERR_OPENP"), MYSERVER_LOG_MSG_ERROR);
-        delete serverSocketIPv6;
-        serverSocketIPv6 = NULL;
-      }
-      else
-      {
-        MYSERVER_SOCKADDR_STORAGE sockServerSocketIPv6 = { 0 };
-        server->logWriteln(languageParser->getValue("MSG_SSOCKRUN"));
-        ((sockaddr_in6*)(&sockServerSocketIPv6))->sin6_family = AF_INET6;
-        ((sockaddr_in6*)(&sockServerSocketIPv6))->sin6_addr = in6addr_any;
-        ((sockaddr_in6*)(&sockServerSocketIPv6))->sin6_port = 
-          htons((u_short)port);
-#ifndef WIN32
-        /*
-         *Under the unix environment the application needs some time before
-         * create a new socket for the same address.
-         *To avoid this behavior we use the current code.
-         */
-        if(serverSocketIPv6->setsockopt(SOL_SOCKET, SO_REUSEADDR,
-                                        (const char *)&optvalReuseAddr,
-                                        sizeof(optvalReuseAddr))<0)
+      if (serverSocketIPv4 != NULL && serverSocketIPv4->listen (SOMAXCONN))
         {
-          server->logWriteln(languageParser->getValue("ERR_ERROR"), MYSERVER_LOG_MSG_ERROR);
-          delete serverSocketIPv6;
-          serverSocketIPv6 = NULL;
-          //return 0;allow IPv6
+          server->logWriteln (MYSERVER_LOG_MSG_ERROR,
+                             _("Error while creating the server socket"));
+          delete serverSocketIPv4;
+          serverSocketIPv4 = NULL;
         }
 
-        if(serverSocketIPv6->setsockopt(IPPROTO_IPV6, IPV6_V6ONLY,
-                                        (const char *)&optvalReuseAddr,
-                                        sizeof(optvalReuseAddr)) < 0)
+      if (serverSocketIPv6 != NULL && serverSocketIPv6->listen (SOMAXCONN))
         {
-          server->logWriteln(languageParser->getValue("ERR_ERROR"), MYSERVER_LOG_MSG_ERROR);
+          server->logWriteln (MYSERVER_LOG_MSG_ERROR,
+                             _("Error while creating the server socket"));
           delete serverSocketIPv6;
           serverSocketIPv6 = NULL;
-          //return 0;allow IPv6
         }
-#endif
-        if(serverSocketIPv6 != NULL )
-        {
-          /*
-           *Bind the port.
-           */
-          server->logWriteln(languageParser->getValue("MSG_BIND_PORT"));
-          
-          if ( serverSocketIPv6->bind(&sockServerSocketIPv6,
-                                      sizeof(sockaddr_in6)) != 0)
-          {
-            server->logWriteln(languageParser->getValue("ERR_BIND"), MYSERVER_LOG_MSG_ERROR);
-            delete serverSocketIPv6;
-            serverSocketIPv6 = NULL;
-          }
-          else
-            server->logWriteln(languageParser->getValue("MSG_PORT_BOUND"));
 
+      if ( serverSocketIPv4 == NULL && serverSocketIPv6 == NULL )
+        {
+          delete si;
+          return 1;
         }
-      }
-    }
-#endif // HAVE_IPV6
-    
-    if ( serverSocketIPv4 == NULL && serverSocketIPv6 == NULL )
-    {
-      delete si;
-      return 1;
-    }
-
-    /*
-     *Set connections listen queque to max allowable.
-     */
-    server->logWriteln(languageParser->getValue("MSG_SLISTEN"));
-    if (serverSocketIPv4 != NULL && serverSocketIPv4->listen(SOMAXCONN))
-    {
-      server->logWriteln(languageParser->getValue("ERR_LISTEN"), MYSERVER_LOG_MSG_ERROR);
-      delete serverSocketIPv4;
-      serverSocketIPv4 = NULL;
-    }
 
-    if (serverSocketIPv6 != NULL && serverSocketIPv6->listen(SOMAXCONN))
-    {
-      server->logWriteln(languageParser->getValue("ERR_LISTEN"), MYSERVER_LOG_MSG_ERROR);
-      delete serverSocketIPv6;
-      serverSocketIPv6 = NULL;
-    }
-
-    if ( serverSocketIPv4 == NULL && serverSocketIPv6 == NULL )
-    {
-      delete si;
-      return 1;
-    }
+      server->logWriteln (MYSERVER_LOG_MSG_INFO,
+                          _("Listening on the port: %i"), port);
 
-    portBuff << (u_int)port;
+      si->ipv4 = serverSocketIPv4;
+      si->ipv6 = serverSocketIPv6;
 
-    listenPortMsg.assign(languageParser->getValue("MSG_LISTEN"));
-    listenPortMsg.append(": ");
-    listenPortMsg.append(portBuff.str());
-  
-    server->logWriteln(listenPortMsg.c_str());
+      usedPorts.put (port, si);
 
-    si->ipv4 = serverSocketIPv4;
-    si->ipv6 = serverSocketIPv6;
+      registerListener (si);
 
-    usedPorts.put(port, si);
-    
-    registerListener(si);
-
-    return 0;
-  }
+      return 0;
+    }
   catch( bad_alloc &ba)
-  {
-    ostringstream s;
-    s << "Error: Bad allocation " << ba.what();
-    server->logWriteln(s.str().c_str());
-  }
+    {
+      server->logWriteln (MYSERVER_LOG_MSG_ERROR, _("Bad alloc: %s"),
+                          ba.what ());
+    }
   catch( exception &e)
-  {
-    ostringstream s;
-    s << "Error :" << e.what();
-    server->logWriteln(s.str().c_str());
-  };
+    {
+      server->logWriteln (MYSERVER_LOG_MSG_ERROR, _("Error: %s"),
+                          e.what ());
+    };
   return 1;
 }
 
 /*!
- *Register the sockets on the events listener.
+ * Register the sockets on the events listener.
  */
-void ListenThreads::registerListener(SocketInformation* si)
+void ListenThreads::registerListener (SocketInformation* si)
 {
-
-    if(si->ipv4)
+  if (si->ipv4)
     {
-      si->laIpv4.reset(si->ipv4, si->port, server);
-      scheduler->listener(&(si->laIpv4));
+      si->laIpv4.reset (si->ipv4, si->port, server);
+      scheduler->listener (&(si->laIpv4));
     }
 
-    if(si->ipv6)
-    {
-      si->laIpv6.reset(si->ipv6, si->port, server);
-      scheduler->listener(&(si->laIpv6));
-    }
+    if (si->ipv6)
+      {
+        si->laIpv6.reset (si->ipv6, si->port, server);
+        scheduler->listener (&(si->laIpv6));
+      }
 }
 
 /*!
- *Add a listening thread on a specific port.
- *\param port Port to listen on.
+ * Add a listening thread on a specific port.
+ * \param port Port to listen on.
  */
-void ListenThreads::addListeningThread(u_short port)
+void ListenThreads::addListeningThread (u_short port)
 {
-  if(!(fastRebooting || committingFastReboot))
-    if(usedPorts.get(port))
+  if (!(fastRebooting || committingFastReboot))
+    if (usedPorts.get (port))
       return;
-  createServerAndListener(port);
+  createServerAndListener (port);
 }
 
 /*!
- *Initialize the listen threads manager.
- *\param parser Xml data to use for error messages.
+ * Initialize the listen threads manager.
+ * \param parser Xml data to use for error messages.
  */
-int ListenThreads::initialize(XmlParser* parser)
+int ListenThreads::initialize (XmlParser* parser)
 {
   languageParser = parser;
   shutdownStatus = false;
@@ -320,9 +294,9 @@ int ListenThreads::initialize(XmlParser* parser)
 }
 
 /*!
- *Complete the fast reboot.
+ * Complete the fast reboot.
  */
-void ListenThreads::commitFastReboot()
+void ListenThreads::commitFastReboot ()
 {
   /* Contains already present ports.  */
   set<u_short> presentPorts;
@@ -342,94 +316,88 @@ void ListenThreads::commitFastReboot()
   fastRebooting = false;
   committingFastReboot = true;
 
-  for(HashMap<u_short, SocketInformation*>::Iterator it = usedPorts.begin(); 
-      it != usedPorts.end(); it++)
-  {
-    presentPorts.insert((*it)->port);
-  }
+  for (HashMap<u_short, SocketInformation*>::Iterator it = usedPorts.begin ();
+      it != usedPorts.end (); it++)
+    presentPorts.insert ((*it)->port);
 
-  for(list<u_short>::iterator it = frPortsToAdd.begin(); it != frPortsToAdd.end(); it++)
-  {
-    newPorts.insert(*it);
-  }
+  for(list<u_short>::iterator it = frPortsToAdd.begin ();
+      it != frPortsToAdd.end (); it++)
+    newPorts.insert (*it);
 
-  /* intersection = intersection(presentsPorts, newPorts).  */
-  set_intersection(presentPorts.begin(), presentPorts.end(), newPorts.begin(), newPorts.end(),
-                   insert_iterator<set<u_short> >(intersection, intersection.begin()));
+  /* intersection = intersection (presentsPorts, newPorts).  */
+  set_intersection (presentPorts.begin (), presentPorts.end (),
+                    newPorts.begin (), newPorts.end (),
+                    insert_iterator<set<u_short> >(intersection,
+                                                   intersection.begin ()));
 
 
   /* toRemove = presentsPorts - newPorts.  */
-  set_difference(presentPorts.begin(), presentPorts.end(), newPorts.begin(), newPorts.end(),
-                 insert_iterator<set<u_short> >(toRemove, toRemove.begin()));
+  set_difference (presentPorts.begin (), presentPorts.end (),
+                  newPorts.begin (), newPorts.end (),
+                  insert_iterator<set<u_short> >(toRemove, toRemove.begin ()));
 
 
   /* toAdd = newPorts - presentsPorts.  */
-  set_difference(newPorts.begin(), newPorts.end(), presentPorts.begin(), presentPorts.end(),
-                 insert_iterator<set<u_short> >(toAdd, toAdd.begin()));
+  set_difference (newPorts.begin (), newPorts.end (), presentPorts.begin (),
+    presentPorts.end (), insert_iterator<set<u_short> >(toAdd, toAdd.begin ()));
 
 
 
   /* Ports in intersections need only to be registered on the event listener.  */
-  for(set<u_short>::iterator it = intersection.begin(); it != intersection.end(); it++)
-  {
-    registerListener(usedPorts.get(*it));
-  }
+  for (set<u_short>::iterator it = intersection.begin ();
+       it != intersection.end (); it++)
+    registerListener (usedPorts.get (*it));
 
   /* Create here the new ports.  */
-  for(set<u_short>::iterator it = toAdd.begin(); it != toAdd.end(); it++)
-   {
-    createServerAndListener(*it);
-  }
+  for (set<u_short>::iterator it = toAdd.begin (); it != toAdd.end (); it++)
+    createServerAndListener (*it);
 
   /* Enqueue connections to remove to frPortsToRemove and destroy them with terminate.  */
-  for(set<u_short>::iterator it = toRemove.begin(); it != toRemove.end(); it++)
-  {
-    SocketInformation* si;
-    si = usedPorts.get(*it);
-    frPortsToRemove.push_back(si);
-    usedPorts.remove(si->port);
-  }
+  for (set<u_short>::iterator it = toRemove.begin (); it != toRemove.end (); it++)
+    {
+      SocketInformation* si;
+      si = usedPorts.get (*it);
+      frPortsToRemove.push_back (si);
+      usedPorts.remove (si->port);
+    }
 
-  terminate();
+  terminate ();
 
-  frPortsToAdd.clear();
-  frPortsToRemove.clear();
+  frPortsToAdd.clear ();
+  frPortsToRemove.clear ();
 
   committingFastReboot = false;
 }
 
 
 /*!
- *Restore the previous situation without do anything.
+ * Restore the previous situation without do anything.
  */
-void ListenThreads::rollbackFastReboot()
+void ListenThreads::rollbackFastReboot ()
 {
   fastRebooting = false;
   committingFastReboot = false;
-  
-  for(HashMap<u_short, SocketInformation*>::Iterator it = usedPorts.begin(); 
-      it != usedPorts.end(); it++)
-  {
-    registerListener(*it);
-  }
-
-  frPortsToAdd.clear();
-  frPortsToRemove.clear();
+
+  for (HashMap<u_short, SocketInformation*>::Iterator it = usedPorts.begin ();
+      it != usedPorts.end (); it++)
+    registerListener (*it);
+
+  frPortsToAdd.clear ();
+  frPortsToRemove.clear ();
 }
 
 /*!
- *Prepare the listen threads manager for a fast reboot.
+ * Prepare the listen threads manager for a fast reboot.
  */
-void ListenThreads::beginFastReboot()
+void ListenThreads::beginFastReboot ()
 {
   fastRebooting = true;
 }
 
-
 /*!
- *Unload the listen threads manager.
+ * Unload the listen threads manager.
  */
-int ListenThreads::terminate()
+int ListenThreads::terminate ()
 {
   char buffer[256];
 
@@ -438,59 +406,54 @@ int ListenThreads::terminate()
   list <SocketInformation*>::iterator it;
   list <SocketInformation*>::iterator end;
 
-  if(fastRebooting)
-  {
+  if (fastRebooting)
     return 0;
-  }
-  else if(committingFastReboot)
-  {
-    it = frPortsToRemove.begin();
-    end = frPortsToRemove.end();
-  }
+  else if (committingFastReboot)
+    {
+      it = frPortsToRemove.begin ();
+      end = frPortsToRemove.end ();
+    }
   else
-  {
-    for(HashMap<u_short, SocketInformation*>::Iterator i = usedPorts.begin(); 
-        i != usedPorts.end(); i++)
-      sockets.push_front(*i);
+    {
+      for (HashMap<u_short, SocketInformation*>::Iterator i = usedPorts.begin();
+           i != usedPorts.end (); i++)
+      sockets.push_front (*i);
+      it = sockets.begin ();
+      end = sockets.end ();
+      shutdown ();
+    }
 
-    it = sockets.begin();
-    end = sockets.end();
+  while (it != end)
+    {
+      for (int t = 0; t < 2; t++)
+        {
+          Socket* serverSocket;
+          int err;
 
-    shutdown();
-  }
+          if (t == 0)
+            serverSocket = (*it)->ipv4;
+          else
+            serverSocket = (*it)->ipv6;
 
-  while(it != end)
-  {
-    for(int t = 0; t < 2; t++)
-    {
-      Socket* serverSocket;
-      int err;
-
-      if(t == 0)
-        serverSocket = (*it)->ipv4;
-      else
-        serverSocket = (*it)->ipv6;
-      
-      if(!serverSocket)
-        continue;
-
-      serverSocket->shutdown(SD_BOTH);
-      do
-      {
-        err = serverSocket->recv(buffer, 256, 0);
-      }while(err != -1);
+          if (!serverSocket)
+            continue;
+
+          serverSocket->shutdown (SD_BOTH);
+          do
+            {
+              err = serverSocket->recv (buffer, 256, 0);
+            }while (err != -1);
 
-      serverSocket->close();
-      delete serverSocket;
+          serverSocket->close ();
+          delete serverSocket;
+        }
+      delete (*it);
+      it++;
     }
-    delete (*it);
-    it++;
-  }
 
   /* If it is not a fast reboot then clear everything.  */
-  if(!(fastRebooting || committingFastReboot))
-  {
-    usedPorts.clear();
-  }
+  if (!(fastRebooting || committingFastReboot))
+    usedPorts.clear ();
+
   return 0;
 }
diff --git a/myserver/src/plugin/plugins_manager.cpp b/myserver/src/plugin/plugins_manager.cpp
index 7e238bb..632364d 100755
--- a/myserver/src/plugin/plugins_manager.cpp
+++ b/myserver/src/plugin/plugins_manager.cpp
@@ -36,18 +36,18 @@ extern "C"
 using namespace std;
 
 /*!
- *Default constructor.
+ * Default constructor.
  */
 PluginsManager::PluginsManager () { }
 
 /*!
- *Destroy the object.
+ * Destroy the object.
  */
 PluginsManager::~PluginsManager () { }
 
 /*!
- *Get a plugin trough  its name plugin.
- *\param name The plugin name.
+ * Get a plugin trough  its name plugin.
+ * \param name The plugin name.
  */
 Plugin*
 PluginsManager::getPlugin (string& name)
@@ -59,9 +59,8 @@ PluginsManager::getPlugin (string& name)
 }
 
 /*!
- *Load the plugin options.
- *\param server The server object to use.
- *messages.
+ * Load the plugin options.
+ * \param server The server object to use.
  */
 int
 PluginsManager::loadOptions (Server *server)
@@ -111,9 +110,8 @@ PluginsManager::loadOptions (Server *server)
         addPluginInfo (plugin, new PluginInfo (plugin, enabled, global));
       else
         {
-          string error;
-          error.assign ("Invalid plugin name in PLUGIN block.");
-          server->logWriteln (error.c_str (), MYSERVER_LOG_MSG_WARNING);
+          server->logWriteln (MYSERVER_LOG_MSG_WARNING,
+                              _("Invalid plugin name in PLUGIN block."));
           ret = -1;
         }
     }
@@ -122,13 +120,12 @@ PluginsManager::loadOptions (Server *server)
 }
 
 /*!
- *Preload sequence, called when all the plugins are not yet loaded.
- *\param server The server object to use.
- *implementation it is a directory name.
+ * Preload sequence, called when all the plugins are not yet loaded.
+ * \param server The server object to use.
+ * implementation it is a directory name.
  */
 int
-PluginsManager::preLoad (Server* server,
-                         string& resource)
+PluginsManager::preLoad (Server* server, string& resource)
 {
   FindData fdir;
   FindData flib;
@@ -146,7 +143,8 @@ PluginsManager::preLoad (Server* server,
 
   if (ret == -1)
     {
-      server->logWriteln ("Invalid plugins source.", MYSERVER_LOG_MSG_ERROR);
+      server->logWriteln (MYSERVER_LOG_MSG_ERROR,
+                          _("Invalid plugins source"));
       return ret;
     }
 
@@ -210,15 +208,13 @@ PluginsManager::preLoad (Server* server,
 #endif
           if (pinfo->isEnabled ())
             {
-              Plugin* plugin = preLoadPlugin (libname, server, pinfo->isGlobal ());
+              Plugin* plugin = preLoadPlugin (libname, server,
+                                              pinfo->isGlobal ());
               if (!plugin)
                 {
                   ret |= 1;
-                  string error;
-                  error.append ("Unable to enable plugin ");
-                  error.append (name);
-                  error.append (".");
-                  server->logWriteln (error.c_str (), MYSERVER_LOG_MSG_ERROR);
+                  server->logWriteln (MYSERVER_LOG_MSG_ERROR,
+                                   _("Error loading plugin %s"), name.c_str ());
                 }
               else
                 pinfo->setPlugin (plugin);
@@ -264,11 +260,8 @@ PluginsManager::loadInfo (Server* server, string& name, string& path)
 
   if (xml.open (path, true))
     {
-      string error;
-      error.append ("Unable to load plugin ");
-      error.append (name);
-      error.append (" info.");
-      server->logWriteln (error.c_str (), MYSERVER_LOG_MSG_ERROR);
+      server->logWriteln (MYSERVER_LOG_MSG_ERROR,
+                          _("Error loading plugin %s"), name.c_str ());
       return NULL;
     }
 
@@ -281,11 +274,9 @@ PluginsManager::loadInfo (Server* server, string& name, string& path)
 
   if (size != 1)
     {
-      string error;
-      error.append ("Unable to load plugin ");
-      error.append (name);
-      error.append (", bad plugin.xml format.");
-      server->logWriteln (error.c_str (), MYSERVER_LOG_MSG_ERROR);
+      server->logWriteln (MYSERVER_LOG_MSG_ERROR,
+                          _("Error loading plugin %s, invalid plugin.xml"),
+                          name.c_str ());
       return NULL;
     }
 
@@ -300,11 +291,9 @@ PluginsManager::loadInfo (Server* server, string& name, string& path)
     }
   else
     {
-      string error;
-      error.append ("Unable to load plugin ");
-      error.append (name);
-      error.append (", bad plugin.xml format.");
-      server->logWriteln (error.c_str (), MYSERVER_LOG_MSG_ERROR);
+      server->logWriteln (MYSERVER_LOG_MSG_ERROR,
+                          _("Error loading plugin %s, invalid plugin.xml"),
+                          name.c_str ());
       return NULL;
     }
 
@@ -321,11 +310,9 @@ PluginsManager::loadInfo (Server* server, string& name, string& path)
     }
   else
     {
-      string error;
-      error.append ("Unable to load plugin ");
-      error.append (name);
-      error.append (", bad plugin.xml format.");
-      server->logWriteln (error.c_str (), MYSERVER_LOG_MSG_ERROR);
+      server->logWriteln (MYSERVER_LOG_MSG_ERROR,
+                          _("Error loading plugin %s, invalid plugin.xml"),
+                          name.c_str ());
       delete xpathRes;
       return NULL;
     }
@@ -338,11 +325,9 @@ PluginsManager::loadInfo (Server* server, string& name, string& path)
 
   if (size != 1)
     {
-      string error;
-      error.append ("Unable to load plugin ");
-      error.append (name);
-      error.append (", bad plugin.xml format.");
-      server->logWriteln (error.c_str (), MYSERVER_LOG_MSG_ERROR);
+      server->logWriteln (MYSERVER_LOG_MSG_ERROR,
+                          _("Error loading plugin %s, invalid plugin.xml"),
+                          name.c_str ());
       delete xpathRes;
       return NULL;
     }
@@ -364,27 +349,23 @@ PluginsManager::loadInfo (Server* server, string& name, string& path)
 
   if (size != 1)
     {
-      string error;
-      error.append ("Unable to load plugin ");
-      error.append (name);
-      error.append (", bad plugin.xml format.");
-      server->logWriteln (error.c_str (), MYSERVER_LOG_MSG_ERROR);
+      server->logWriteln (MYSERVER_LOG_MSG_ERROR,
+                          _("Error loading plugin %s, invalid plugin.xml"),
+                          name.c_str ());
       delete xpathRes;
       return NULL;
     }
 
+  string verStr((char*) nodes->nodeTab[0]->content);
+  int version = PluginInfo::convertVersion (&verStr);
 
-  int version = PluginInfo::convertVersion (new string ((char*) nodes->nodeTab[0]->content));
-
-  if (version!=-1)
+  if (version != -1)
     pinfo->setVersion (version);
   else
     {
-      string error;
-      error.append ("Unable to load plugin ");
-      error.append (name);
-      error.append (", bad plugin.xml format.");
-      server->logWriteln (error.c_str (), MYSERVER_LOG_MSG_ERROR);
+      server->logWriteln (MYSERVER_LOG_MSG_ERROR,
+                          _("Error loading plugin %s, invalid plugin.xml"),
+                          name.c_str ());
       delete xpathRes;
       return NULL;
     }
@@ -405,27 +386,26 @@ PluginsManager::loadInfo (Server* server, string& name, string& path)
       if (!xmlHasProp (nodes->nodeTab[i], (const xmlChar*) "min-version") ||
           !xmlHasProp (nodes->nodeTab[i], (const xmlChar*) "max-version"))
         {
-          string error;
-          error.append ("Unable to load plugin ");
-          error.append (name);
-          error.append (", bad plugin.xml format.");
-          server->logWriteln (error.c_str (), MYSERVER_LOG_MSG_ERROR);
+          server->logWriteln (MYSERVER_LOG_MSG_ERROR,
+                              _("Error loading plugin %s, invalid plugin.xml"),
+                              name.c_str ());
+          delete xpathRes;
           return NULL;
         }
 
-      int minVersion = PluginInfo::convertVersion (new string ((char*) xmlGetProp (nodes->nodeTab[i],
-                                                                                   (const xmlChar*) "min-version")));
+      string minVerStr = ((char*) xmlGetProp (nodes->nodeTab[i],
+                                              (const xmlChar*) "min-version"));
+      string maxVerStr = ((char*) xmlGetProp (nodes->nodeTab[i],
+                                              (const xmlChar*) "max-version"));
 
-      int maxVersion = PluginInfo::convertVersion (new string ((char*) xmlGetProp (nodes->nodeTab[i],
-                                                                                   (const xmlChar*) "max-version")));
+      int minVersion = PluginInfo::convertVersion (&minVerStr);
+      int maxVersion = PluginInfo::convertVersion (&maxVerStr);
 
       if (minVersion == -1 || maxVersion == -1)
         {
-          string error;
-          error.append ("Unable to load plugin ");
-          error.append (name);
-          error.append (", bad plugin.xml format.");
-          server->logWriteln (error.c_str (), MYSERVER_LOG_MSG_ERROR);
+          server->logWriteln (MYSERVER_LOG_MSG_ERROR,
+                              _("Error loading plugin %s, invalid plugin.xml"),
+                              name.c_str ());
           delete xpathRes;
           return NULL;
         }
@@ -439,12 +419,12 @@ PluginsManager::loadInfo (Server* server, string& name, string& path)
 }
 
 /*!
- *Add a plugin.
- *\param file The plugin file name.
- *\param server The server object to use.
- *\param languageFile The language file to use to retrieve warnings/errors 
- *messages.
- *\param global Specify if the library should be loaded globally.
+ * Add a plugin.
+ * \param file The plugin file name.
+ * \param server The server object to use.
+ * \param languageFile The language file to use to retrieve warnings/errors
+ * messages.
+ * \param global Specify if the library should be loaded globally.
  */
 Plugin*
 PluginsManager::preLoadPlugin (string& file, Server* server, bool global)
@@ -456,11 +436,9 @@ PluginsManager::preLoadPlugin (string& file, Server* server, bool global)
 
   if (plugin->preLoad (file, global))
     {
-      string error;
-      error.append ("Unable to pre-load plugin ");
-      error.append (name);
-      error.append (".");
-      server->logWriteln (error.c_str (), MYSERVER_LOG_MSG_ERROR);
+      server->logWriteln (MYSERVER_LOG_MSG_ERROR,
+                          _("Error pre-loading plugin %s, invalid plugin.xml"),
+                          name.c_str ());
       delete plugin;
       return NULL;
     }
@@ -470,11 +448,9 @@ PluginsManager::preLoadPlugin (string& file, Server* server, bool global)
     name.assign (namePtr);
   else
     {
-      string error;
-      error.append ("Unable to pre-load plugin ");
-      error.append (name);
-      error.append (".");
-      server->logWriteln (error.c_str (), MYSERVER_LOG_MSG_ERROR);
+      server->logWriteln (MYSERVER_LOG_MSG_ERROR,
+                          _("Error pre-loading plugin %s, invalid plugin.xml"),
+                          name.c_str ());
       delete plugin;
       return NULL;
     }
@@ -483,7 +459,9 @@ PluginsManager::preLoadPlugin (string& file, Server* server, bool global)
 }
 
 void
-PluginsManager::recursiveDependencesFallDown (Server* server, string &name, HashMap<string, bool> &remove, HashMap<string, list<string>*> &dependsOn)
+PluginsManager::recursiveDependencesFallDown (Server* server, string &name,
+                                  HashMap<string, bool> &remove,
+                                  HashMap<string, list<string>*> &dependsOn)
 {
   remove.put (name, true);
   list<string>* dependsList = dependsOn.get (name);
@@ -494,21 +472,18 @@ PluginsManager::recursiveDependencesFallDown (Server* server, string &name, Hash
 
   for (; lit != dependsList->end (); lit++)
     {
-
-      string logBuf;
-      logBuf.append ("Missing plugin dependence: ");
-      logBuf.append (*lit);
-      logBuf.append (" --> ");
-      logBuf.append (name);
       recursiveDependencesFallDown (server, *lit, remove, dependsOn);
-      server->logWriteln (logBuf.c_str (), MYSERVER_LOG_MSG_WARNING);
+
+      server->logWriteln (MYSERVER_LOG_MSG_WARNING,
+                          _("Missing plugin dependence %s --> %s"),
+                          name.c_str (), (*lit).c_str ());
     }
 
 }
 
 /*!
- *Load the plugins.
- *\param server The server object to use.
+ * Load the plugins.
+ * \param server The server object to use.
  */
 int
 PluginsManager::load (Server *server)
@@ -521,14 +496,8 @@ PluginsManager::load (Server *server)
   HashMap<string, bool> remove;
   while (it != pluginsInfos.end ())
     {
-
-
       string name (it.getKey ());
-
-
       PluginInfo* pinfo = *it;
-
-
       HashMap<string, pair<int, int>* >::Iterator depIt = pinfo->begin ();
 
       string msversion (MYSERVER_VERSION);
@@ -537,17 +506,14 @@ PluginsManager::load (Server *server)
         msversion = msversion.substr (0, i);
 
       int msVersion = PluginInfo::convertVersion (&msversion);
-      if (msVersion < pinfo->getMyServerMinVersion () || msVersion > pinfo->getMyServerMaxVersion ())
-        {
-          string logBuf;
-          logBuf.append ("Plugin ");
-          logBuf.append (name);
-          logBuf.append (" not compatible with this myserver version! ");
-          server->logWriteln (logBuf.c_str (), MYSERVER_LOG_MSG_WARNING);
-          toRemove.push_front (&name);
-        }
+      if (msVersion < pinfo->getMyServerMinVersion ()
+          || msVersion > pinfo->getMyServerMaxVersion ())
+        server->logWriteln (MYSERVER_LOG_MSG_WARNING,
+                            _("Plugin %s not compatible with this version"),
+                            name.c_str ());
       else
         remove.put (name, false);
+
       for (; depIt != pinfo->end (); depIt++)
         {
           string dname = depIt.getKey ();
@@ -604,25 +570,22 @@ PluginsManager::load (Server *server)
           PluginInfo* dep = getPluginInfo (depN);
           if (!dep || remove.get (depN))
             {
-              logBuf.append ("Missing plugin dependence: ");
-              logBuf.append (dname);
-              logBuf.append (" --> ");
-              logBuf.append (depN);
+              server->logWriteln (MYSERVER_LOG_MSG_WARNING,
+                                  _("Missing plugin dependence %s --> %s"),
+                                  dname.c_str (), depN.c_str ());
               recursiveDependencesFallDown (server, dname, remove, dependsOn);
-              server->logWriteln (logBuf.c_str (), MYSERVER_LOG_MSG_WARNING);
               break;
             }
 
 
           pair<int, int>* pdep = *lit;
-          if (dep->getVersion () < pdep->first || dep->getVersion () > pdep->second)
+          if (dep->getVersion () < pdep->first
+              || dep->getVersion () > pdep->second)
             {
-              logBuf.append ("Plugin version not compatible: ");
-              logBuf.append (dname);
-              logBuf.append (" --> ");
-              logBuf.append (depN);
               recursiveDependencesFallDown (server, dname, remove, dependsOn);
-              server->logWriteln (logBuf.c_str (), MYSERVER_LOG_MSG_WARNING);
+              server->logWriteln (MYSERVER_LOG_MSG_WARNING,
+                            _("Plugin %s not compatible with this version"),
+                            dname.c_str ());
               break;
             }
         }
@@ -641,10 +604,10 @@ PluginsManager::load (Server *server)
 }
 
 /*!
- *PostLoad functions, called once all the plugins are loaded.
- *\param server The server object to use.
- *\param languageFile The language file to use to get errors and warnings 
- *messages.
+ * PostLoad functions, called once all the plugins are loaded.
+ * \param server The server object to use.
+ * \param languageFile The language file to use to get errors and warnings
+ * messages.
  */
 int
 PluginsManager::postLoad (Server *server, XmlParser* languageFile)
@@ -656,11 +619,9 @@ PluginsManager::postLoad (Server *server, XmlParser* languageFile)
       if (plugin)
         {
           plugin->postLoad (server, languageFile);
-          string logBuf;
-          logBuf.append ("Plugin ");
-          logBuf.append ((*it)->getName ());
-          logBuf.append (" loaded! ");
-          server->logWriteln (logBuf.c_str (), MYSERVER_LOG_MSG_INFO);
+          server->logWriteln (MYSERVER_LOG_MSG_INFO,
+                              _("Plugin %s loaded"),
+                              (*it)->getName ().c_str ());
         }
       it++;
     }
@@ -668,8 +629,8 @@ PluginsManager::postLoad (Server *server, XmlParser* languageFile)
 }
 
 /*!
- *Unload the plugins.
- *messages.
+ * Unload the plugins.
+ * messages.
  */
 int
 PluginsManager::unLoad ()
@@ -688,8 +649,8 @@ PluginsManager::unLoad ()
 }
 
 /*!
- *Remove a plugin  without clean it.
- *\param name The plugin to remove.
+ * Remove a plugin  without clean it.
+ * \param name The plugin to remove.
  */
 void
 PluginsManager::removePlugin (string& name)
@@ -700,9 +661,9 @@ PluginsManager::removePlugin (string& name)
 }
 
 /*!
- *Add a plugin option structure.
- *\param plugin The plugin name.
- *\param pi The options for the plugin.
+ * Add a plugin option structure.
+ * \param plugin The plugin name.
+ * \param pi The options for the plugin.
  */
 int
 PluginsManager::addPluginInfo (string& plugin, PluginInfo* pi)
@@ -716,8 +677,8 @@ PluginsManager::addPluginInfo (string& plugin, PluginInfo* pi)
 }
 
 /*!
- *Return a pluginOption.
- *\param plugin The plugin name.
+ * Return a pluginOption.
+ * \param plugin The plugin name.
  */
 PluginInfo*
 PluginsManager::getPluginInfo (string& plugin)
diff --git a/myserver/src/server/clients_thread.cpp b/myserver/src/server/clients_thread.cpp
index e32fb3b..0629f37 100644
--- a/myserver/src/server/clients_thread.cpp
+++ b/myserver/src/server/clients_thread.cpp
@@ -6,7 +6,7 @@ it under the terms of the GNU General Public License as published by
 the Free Software Foundation; either version 3 of the License, or
 (at your option) any later version.
 
-This program is distributed in the hope that it will be useful, 
+This program is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 GNU General Public License for more details.
@@ -30,7 +30,7 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #include <include/protocol/ftp/ftp.h>
 
 #ifndef WIN32
-extern "C" 
+extern "C"
 {
 # include <sys/socket.h>
 # include <netinet/in.h>
@@ -48,7 +48,7 @@ extern "C"
 #endif
 
 /*!
- *Construct the object.
+ * Construct the object.
  */
 ClientsThread::ClientsThread (Server* server)
 {
@@ -92,7 +92,7 @@ ClientsThread::~ClientsThread()
 }
 
 /*!
- *Get the timeout value.
+ * Get the timeout value.
  */
 int ClientsThread::getTimeout ()
 {
@@ -100,8 +100,8 @@ int ClientsThread::getTimeout ()
 }
 
 /*!
- *Set the timeout value for the thread.
- *\param newTimeout The new timeout value.
+ * Set the timeout value for the thread.
+ * \param newTimeout The new timeout value.
  */
 void ClientsThread::setTimeout (int newTimeout)
 {
@@ -109,9 +109,9 @@ void ClientsThread::setTimeout (int newTimeout)
 }
 
 /*!
- *This function starts a new thread controlled by a ClientsThread 
- *class instance.
- *\param pParam Params to pass to the new thread.
+ * This function starts a new thread controlled by a ClientsThread
+ * class instance.
+ * \param pParam Params to pass to the new thread.
  */
 DEFINE_THREAD(clients_thread, pParam)
 {
@@ -139,7 +139,7 @@ DEFINE_THREAD(clients_thread, pParam)
   ct->threadIsStopped = false;
   ct->buffersize = ct->server->getBuffersize ();
   ct->secondaryBufferSize = ct->server->getBuffersize2 ();
-  
+
   ct->buffer.setLength (ct->buffersize);
   ct->buffer.m_nSizeLimit = ct->buffersize;
   ct->secondaryBuffer.setLength (ct->secondaryBufferSize);
@@ -184,16 +184,13 @@ DEFINE_THREAD(clients_thread, pParam)
         }
       catch (bad_alloc &ba)
         {
-          ostringstream s;
-          s << "Bad alloc: " << ba.what();
-
-          ct->server->logWriteln  (s.str ().c_str (), MYSERVER_LOG_MSG_ERROR);
+          ct->server->logWriteln (MYSERVER_LOG_MSG_ERROR, _("Bad alloc: %s"),
+                                  ba.what ());
         }
       catch (exception &e)
         {
-          ostringstream s;
-          s << "Error: " << e.what ();
-          ct->server->logWriteln (s.str ().c_str (), MYSERVER_LOG_MSG_ERROR);
+          ct->server->logWriteln (MYSERVER_LOG_MSG_ERROR, _("Error : %s"),
+                                  e.what ());
         };
   }
 
@@ -205,8 +202,7 @@ DEFINE_THREAD(clients_thread, pParam)
 }
 
 /*!
- *Join the thread.
- *
+ * Join the thread.
  */
 int ClientsThread::join ()
 {
@@ -215,7 +211,7 @@ int ClientsThread::join ()
 
 
 /*!
- *Create the new thread.
+ * Create the new thread.
  */
 int ClientsThread::run ()
 {
@@ -225,7 +221,7 @@ int ClientsThread::run ()
 }
 
 /*!
- *Returns if the thread can be destroyed.
+ * Returns if the thread can be destroyed.
  */
 bool ClientsThread::isToDestroy()
 {
@@ -233,7 +229,7 @@ bool ClientsThread::isToDestroy()
 }
 
 /*!
- *Check if the thread is a static one.
+ * Check if the thread is a static one.
  */
 bool ClientsThread::isStatic()
 {
@@ -241,8 +237,8 @@ bool ClientsThread::isStatic()
 }
 
 /*!
- *Set the thread to be static.
- *\param value The new static value.
+ * Set the thread to be static.
+ * \param value The new static value.
  */
 void ClientsThread::setStatic (bool value)
 {
@@ -250,8 +246,8 @@ void ClientsThread::setStatic (bool value)
 }
 
 /*!
- *Set if the thread can be destroyed.
- *\param value The new destroy value.
+ * Set if the thread can be destroyed.
+ * \param value The new destroy value.
  */
 void ClientsThread::setToDestroy(bool value)
 {
@@ -259,18 +255,16 @@ void ClientsThread::setToDestroy(bool value)
 }
 
 /*!
- *This is the main loop of the thread.
- *Here are controlled all the connections that belongs to the 
- *ClientsThread class instance.
- *Every connection is controlled by its protocol.
- *Return 1 if no connections to serve are available.
- *Return 0 in all other cases.
+ * This is the main loop of the thread.
+ * Here are controlled all the connections that belongs to the
+ * ClientsThread class instance.
+ * Every connection is controlled by its protocol.
+ *\return 1 if no connections to serve are available.
+ *\return 0 in all other cases.
  */
 int ClientsThread::controlConnections ()
 {
-  /*
-   *Control the protocol used by the connection.
-   */
+  /* Control the protocol used by the connection.  */
   int retcode = 0;
   int err = 0;
   ConnectionPtr c;
@@ -281,9 +275,6 @@ int ClientsThread::controlConnections ()
 
   server->decreaseFreeThread ();
 
-  /*
-   *Check if c is a valid connection structure.
-   */
   if (!c)
     return 1;
 
@@ -322,10 +313,10 @@ int ClientsThread::controlConnections ()
   {
     if (c->hasContinuation ())
       {
-        retcode = c->getContinuation ()(c, (char*)buffer.getBuffer(), 
-                                   (char*)secondaryBuffer.getBuffer(), 
-                                   buffer.getRealLength(), 
-                                   secondaryBuffer.getRealLength(), 
+        retcode = c->getContinuation ()(c, (char*)buffer.getBuffer(),
+                                   (char*)secondaryBuffer.getBuffer(),
+                                   buffer.getRealLength(),
+                                   secondaryBuffer.getRealLength(),
                                    nBytesToRead, id);
         c->setContinuation (NULL);
       }
@@ -333,13 +324,11 @@ int ClientsThread::controlConnections ()
       {
         protocol = server->getProtocol (c->host->getProtocolName ());
         if (protocol)
-          {
-            retcode = protocol->controlConnection (c, (char*)buffer.getBuffer(),
-                                             (char*)secondaryBuffer.getBuffer(), 
-                                              buffer.getRealLength(), 
-                                             secondaryBuffer.getRealLength(), 
-                                             nBytesToRead, id);
-          }
+          retcode = protocol->controlConnection (c, (char*)buffer.getBuffer(),
+                                           (char*)secondaryBuffer.getBuffer(),
+                                           buffer.getRealLength(),
+                                           secondaryBuffer.getRealLength(),
+                                           nBytesToRead, id);
         else
           retcode = DELETE_CONNECTION;
       }
@@ -367,9 +356,9 @@ int ClientsThread::controlConnections ()
   else if (retcode == INCOMPLETE_REQUEST)
     {
       /*
-       *If the header is incomplete save the current received
-       *data in the connection buffer.
-       *Save the header in the connection buffer.
+       * If the header is incomplete save the current received
+       * data in the connection buffer.
+       * Save the header in the connection buffer.
        */
       c->getConnectionBuffer ()->setBuffer (buffer.getBuffer (), nBytesToRead);
       server->getConnectionsScheduler ()->addWaitingConnection (c);

-----------------------------------------------------------------------

Summary of changes:
 .../connections_scheduler.cpp                      |  489 ++++++++---------
 .../src/connections_scheduler/listen_threads.cpp   |  569 +++++++++-----------
 myserver/src/plugin/plugins_manager.cpp            |  249 ++++-----
 myserver/src/server/clients_thread.cpp             |   93 ++--
 4 files changed, 650 insertions(+), 750 deletions(-)


hooks/post-receive
-- 
GNU MyServer



From MAILER-DAEMON Fri Aug 14 16:33:12 2009
Received: from mailman by lists.gnu.org with archive (Exim 4.43)
	id 1Mc3Sa-000145-Ai
	for mharc-myserver-commit@gnu.org; Fri, 14 Aug 2009 16:33:12 -0400
Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43)
	id 1Mc3SY-00013b-Nb
	for myserver-commit@gnu.org; Fri, 14 Aug 2009 16:33:10 -0400
Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43)
	id 1Mc3SO-0000zh-Ql
	for myserver-commit@gnu.org; Fri, 14 Aug 2009 16:33:08 -0400
Received: from [199.232.76.173] (port=50898 helo=monty-python.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43) id 1Mc3SO-0000zd-Jj
	for myserver-commit@gnu.org; Fri, 14 Aug 2009 16:33:00 -0400
Received: from savannah.gnu.org ([199.232.41.3]:47026 helo=sv.gnu.org)
	by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32)
	(Exim 4.60) (envelope-from <gscrivano@gnu.org>) id 1Mc3SK-00015G-Ob
	for myserver-commit@gnu.org; Fri, 14 Aug 2009 16:33:00 -0400
Received: from download.savannah.gnu.org ([199.232.41.75]
	helo=cvs.savannah.gnu.org) by sv.gnu.org with esmtp (Exim 4.69)
	(envelope-from <gscrivano@gnu.org>) id 1Mc3SH-0005Gy-FK
	for myserver-commit@gnu.org; Fri, 14 Aug 2009 20:32:53 +0000
Received: from gscrivano by cvs.savannah.gnu.org with local (Exim 4.69)
	(envelope-from <gscrivano@savannah.gnu.org>) id 1Mc3SE-0005GT-Aj
	for myserver-commit@gnu.org; Fri, 14 Aug 2009 20:32:53 +0000
To: myserver-commit@gnu.org
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: cc275508841c4d8c3195e6ee7ec1d521fd1c63fd
X-Git-Newrev: ab546da121d89d2fb8f74727080cd5dfeb4b7b84
Message-Id: <E1Mc3SE-0005GT-Aj@cvs.savannah.gnu.org>
From: Giuseppe Scrivano <gscrivano@gnu.org>
Date: Fri, 14 Aug 2009 20:32:51 +0000
X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2)
Subject: [myserver-commit] [SCM] GNU MyServer branch, master,
	updated. ab546da121d89d2fb8f74727080cd5dfeb4b7b84
X-BeenThere: myserver-commit@gnu.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: myserver-commit.gnu.org
List-Unsubscribe: <http://lists.gnu.org/mailman/listinfo/myserver-commit>,
	<mailto:myserver-commit-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/pipermail/myserver-commit>
List-Post: <mailto:myserver-commit@gnu.org>
List-Help: <mailto:myserver-commit-request@gnu.org?subject=help>
List-Subscribe: <http://lists.gnu.org/mailman/listinfo/myserver-commit>,
	<mailto:myserver-commit-request@gnu.org?subject=subscribe>
X-List-Received-Date: Fri, 14 Aug 2009 20:33:11 -0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU MyServer".

The branch, master has been updated
       via  ab546da121d89d2fb8f74727080cd5dfeb4b7b84 (commit)
       via  2eb4cb4c7413a9e4006d49899fe2fefde02d2f20 (commit)
      from  cc275508841c4d8c3195e6ee7ec1d521fd1c63fd (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------


commit ab546da121d89d2fb8f74727080cd5dfeb4b7b84
Author: Giuseppe Scrivano <gscrivano@gnu.org>
Date:   Fri Aug 14 22:12:47 2009 +0200

    Log virtual hosts accesses and warnings using a formatting string.

diff --git a/myserver/include/conf/vhost/vhost.h b/myserver/include/conf/vhost/vhost.h
index b841fc5..95b8ac2 100644
--- a/myserver/include/conf/vhost/vhost.h
+++ b/myserver/include/conf/vhost/vhost.h
@@ -38,74 +38,74 @@
 #include <include/conf/nodetree.h>
 
 using namespace std;
-typedef int (*NULL_REFERENCECB)(class Vhost*); 
+typedef int (*NULL_REFERENCECB)(class Vhost*);
 
 class VhostProtocolData
 {
 public:
-  VhostProtocolData(){}
-  virtual ~VhostProtocolData(){}
+  VhostProtocolData (){}
+  virtual ~VhostProtocolData (){}
 };
 
 class Vhost
 {
 public:
   friend class VhostManager;
-  
+
   struct StringRegex
   {
     string name;
     Regex regex;
-    StringRegex() : regex()
+    StringRegex () : regex ()
     {}
-    ~StringRegex()
+    ~StringRegex ()
     {}
   };
-	
+
   /*! Get the host name. */
-  const char* getName()
-  {return name.c_str();}
-  
+  const char* getName ()
+  {return name.c_str ();}
+
   /*! Set the host name. */
-  void setName(const char* c)
-  {name.assign(c);}
-  
+  void setName (const char* c)
+  {name.assign (c);}
+
   /*! Get the system root. */
-  const string& getSystemRoot()
+  const string& getSystemRoot ()
   {return systemRoot;}
 
   /*! Set the system root. */
-  void setSystemRoot(const char* n)
+  void setSystemRoot (const char* n)
   {systemRoot.assign(n);}
 
   /*! Get the document root. */
-  const string& getDocumentRoot()
+  const string& getDocumentRoot ()
   {return documentRoot;}
 
   /*! Set the document root. */
-  void setDocumentRoot(const char* n)
-  {documentRoot.assign(n);}
+  void setDocumentRoot (const char* n)
+  {documentRoot.assign (n);}
 
   /*! Get a pointer to the vhost SSL context. */
-  SslContext *getVhostSSLContext()
+  SslContext *getVhostSSLContext ()
   {return &sslContext;}
 
   /*! Initialize SSL things. */
-  int initializeSSL();
-	
+  int initializeSSL ();
+
   /*! Clear SSL things. */
-  int freeSSL();
+  int freeSSL ();
 
   /*! Clear the data dictionary. */
   int freeHashedData();
-	
+
   /*! Generate the RSA key for the SSL context. */
-  void generateRsaKey();
+  void generateRsaKey ();
 
   SSL_CTX* getSSLContext();
 
   /*! Get the list of hosts allowed.*/
-  list<StringRegex*>* getHostList()
+  list<StringRegex*>* getHostList ()
   {return &hostList;}
 
   //TODO: remove
@@ -114,63 +114,61 @@ public:
   //{return &ipList;}
 
   /*! Return the port used by the host. */
-  u_short getPort()
+  u_short getPort ()
   {return port;}
 
   /*! Set the port used by the host. */
-  void setPort(u_short p)
+  void setPort (u_short p)
   {port = p;}
 
   /*! Get the protocol name for the virtual host. */
-  const char* getProtocolName()
-  {return protocolName.c_str();}
+  const char* getProtocolName ()
+  {return protocolName.c_str ();}
 
   /*! Set the protocol name for the virtual host. */
-  void setProtocolName(const char *name)
-  {protocolName.assign(name);}
+  void setProtocolName (const char *name)
+  {protocolName.assign (name);}
 
   /*! Get the throttling rate for the virtual host. */
-  u_long getThrottlingRate()
+  u_long getThrottlingRate ()
   {return throttlingRate;}
 
   /*! Set the throttling rate for the virtual host. */
-  void setThrottlingRate(u_long tr)
+  void setThrottlingRate (u_long tr)
   {throttlingRate = tr;}
 
   Vhost(LogManager* lm);
   ~Vhost();
 
-  const char* getHashedData(const char* name);
+  const char* getHashedData (const char* name);
 
   NodeTree<string>* getNodeTree (string& key)
   {
     return hashedData.get (key);
   }
 
-  void addHost(const char *, int);
-  void removeHost(const char *);
-  int areAllHostAllowed();
-  void addRef();
-  void removeRef();
-  int getRef();
-  void setRef(int);
-  void clearHostList();
-  int isHostAllowed(const char*);
-  int isMIME();
-  int getDefaultPriority(){return defaultPriority;}
-  void setDefaultPriority(int priority){defaultPriority = priority;}
-  void setNullRefCB(NULL_REFERENCECB);
-  NULL_REFERENCECB getNullRefCB();
-
-  ////////////////////
-  //IP related members
-  void addIP(const char *, int);
-  void removeIP(const char *);
-  void clearIPList();
-  int areAllIPAllowed();
-  int isIPAllowed(const char*);//used
-
-  MimeManager* getMIME();
+  void addHost (const char *, int);
+  void removeHost (const char *);
+  int areAllHostAllowed ();
+  void addRef ();
+  void removeRef ();
+  int getRef ();
+  void setRef (int);
+  void clearHostList ();
+  int isHostAllowed (const char*);
+  int isMIME ();
+  int getDefaultPriority (){return defaultPriority;}
+  void setDefaultPriority (int priority){defaultPriority = priority;}
+  void setNullRefCB (NULL_REFERENCECB);
+  NULL_REFERENCECB getNullRefCB ();
+
+  void addIP (const char *, int);
+  void removeIP (const char *);
+  void clearIPList ();
+  int areAllIPAllowed ();
+  int isIPAllowed (const char*);
+
+  MimeManager* getMIME ();
 
   /*!
    * \return 0 if the LogManager contains at least one valid entry where
@@ -183,7 +181,7 @@ public:
 
   /*! Set the access log options. */
   void setAccessLogOpt (const char* c) { accessLogOpt.assign (c); }
-  
+
   /*! Set the warnings log options. */
   void setWarningLogOpt (const char* c)  { warningLogOpt.assign (c); }
 
@@ -194,16 +192,16 @@ public:
   const char* getWarningLogOpt () { return warningLogOpt.c_str (); }
 
   /*! Write a message on the accesses log. */
-  int accessesLogWrite (const char*);
-  
+  int accessesLogWrite (const char* fmt, ...);
+
   /*! Write a message on the warnings log. */
-  int warningsLogWrite (const char*);
+  int warningsLogWrite (const char* fmt, ...);
 
   /*! Get the protocol data. */
-  VhostProtocolData* getProtocolData(){return protocolData;}
+  VhostProtocolData* getProtocolData (){return protocolData;}
 
   /*! Set the protocol data. */
-  void setProtocolData(VhostProtocolData* data){protocolData = data;}
+  void setProtocolData (VhostProtocolData* data){protocolData = data;}
 
   MimeRecord* getLocationMime (string& loc){return locationsMime.get (loc);}
 
@@ -253,10 +251,10 @@ private:
 
   /*! Path to the document root. */
   string documentRoot;
-	
+
   /*! Path to the system root. */
   string systemRoot;
-	
+
   /*! Description or name of the virtual host. */
   string name;
 
diff --git a/myserver/include/conf/vhost/vhost_manager.h b/myserver/include/conf/vhost/vhost_manager.h
index ccf646a..947148b 100644
--- a/myserver/include/conf/vhost/vhost_manager.h
+++ b/myserver/include/conf/vhost/vhost_manager.h
@@ -1,7 +1,7 @@
 /* -*- mode: c++ -*- */
 /*
   MyServer
-  Copyright (C) 2007 Free Software Foundation, Inc.
+  Copyright (C) 2007, 2009 Free Software Foundation, Inc.
   This program 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 3 of the License, or
@@ -26,14 +26,14 @@
 class VhostSource
 {
 public:
-  VhostSource();
-  ~VhostSource();
-  int load();
-  int save();
-  int free();
-  Vhost* getVHost(const char*, const char*, u_short);
-  Vhost* getVHostByNumber(int n);
-  int addVHost(Vhost*);
+  VhostSource ();
+  ~VhostSource ();
+  int load ();
+  int save ();
+  int free ();
+  Vhost* getVHost (const char*, const char*, u_short);
+  Vhost* getVHostByNumber (int n);
+  int addVHost (Vhost*);
 private:
   list<Vhost*> *hostList;
 };
@@ -41,25 +41,25 @@ private:
 class VhostManager
 {
 public:
-  void setExternalSource(VhostSource* extSource);
-  VhostManager(ListenThreads* lt, LogManager* lm);
-  ~VhostManager();
-  int getHostsNumber();
-  Vhost* getVHostByNumber(int n);
-  void clean();
-  int removeVHost(int n);
-  int switchVhosts(int n1,int n2);
-  list<Vhost*>* getVHostList();
-	
+  void setExternalSource (VhostSource* extSource);
+  VhostManager (ListenThreads* lt, LogManager* lm);
+  ~VhostManager ();
+  int getHostsNumber ();
+  Vhost* getVHostByNumber (int n);
+  void clean ();
+  int removeVHost (int n);
+  int switchVhosts (int n1,int n2);
+  list<Vhost*>* getVHostList ();
+
   /*! Get a pointer to a vhost.  */
-  Vhost* getVHost(const char*,const char*,u_short);
-	
+  Vhost* getVHost (const char*,const char*,u_short);
+
   /*! Add an element to the vhost list.  */
-  int addVHost(Vhost*);
-	
+  int addVHost (Vhost*);
+
   /*! Load the virtual hosts list from a xml configuration file.  */
-  int loadXMLConfigurationFile(const char *);
-	
+  int loadXMLConfigurationFile (const char *);
+
   /*! Set the right owner for the log locations.  */
   void changeLocationsOwner ();
 private:
@@ -73,5 +73,4 @@ private:
   LogManager* logManager;
 };
 
-
 #endif
diff --git a/myserver/include/protocol/control/control_protocol.h b/myserver/include/protocol/control/control_protocol.h
index bb87302..feefa39 100755
--- a/myserver/include/protocol/control/control_protocol.h
+++ b/myserver/include/protocol/control/control_protocol.h
@@ -1,7 +1,7 @@
 /* -*- mode: c++ -*- */
 /*
 MyServer
-Copyright (C) 2004, 2005, 2008 Free Software Foundation, Inc.
+Copyright (C) 2004, 2005, 2008, 2009 Free Software Foundation, Inc.
 This program 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 3 of the License, or
@@ -55,12 +55,7 @@ protected:
   int putFile(ConnectionPtr,char*, File* in, File* out, 
               char *b1,int bs1, ControlHeader&);
   int getVersion(ConnectionPtr,File* out, char *b1,int bs1, ControlHeader&);
-  int addToErrorLog(ConnectionPtr con, const char *b1, int bs1, ControlHeader&);
   int addToLog(int retCode, ConnectionPtr con, char *b1, int bs1, ControlHeader&);
-  int addToErrorLog(ConnectionPtr con, string& m, ControlHeader& header)
-  {
-    return addToErrorLog(con, m.c_str(), m.size(), header);
-  }
 };
 
 #endif
diff --git a/myserver/src/conf/vhost/vhost.cpp b/myserver/src/conf/vhost/vhost.cpp
index 9ca27cf..083cc9f 100644
--- a/myserver/src/conf/vhost/vhost.cpp
+++ b/myserver/src/conf/vhost/vhost.cpp
@@ -31,6 +31,7 @@
 # include <idna.h>
 #endif
 
+#include <cstdarg>
 
 const string Vhost::accessLogType ("ACCESSLOG");
 const string Vhost::warningLogType ("WARNINGLOG");
@@ -39,14 +40,13 @@ const string Vhost::warningLogType ("WARNINGLOG");
 /*!
  * Vhost costructor
  */
-Vhost::Vhost(LogManager* lm)
+Vhost::Vhost (LogManager* lm)
 {
-  //ipList.clear();
-  hostList.clear();
-  refMutex.init();
-  documentRoot.assign("");
-  systemRoot.assign("");
-  hashedData.clear();
+  hostList.clear ();
+  refMutex.init ();
+  documentRoot.assign ("");
+  systemRoot.assign ("");
+  hashedData.clear ();
   protocolData = 0;
 
   /*
@@ -65,14 +65,14 @@ Vhost::Vhost(LogManager* lm)
 /*!
  * Destroy the vhost.
  */
-Vhost::~Vhost()
+Vhost::~Vhost ()
 {
-  if(protocolData)
+  if (protocolData)
     delete protocolData;
-  clearHostList();
-  clearIPList();
-  freeSSL();
-  freeHashedData();
+  clearHostList ();
+  clearIPList ();
+  freeSSL ();
+  freeHashedData ();
 
   HashMap<string, MimeRecord*>::Iterator it = locationsMime.begin ();
 
@@ -82,10 +82,7 @@ Vhost::~Vhost()
       it++;
     }
 
-
-  refMutex.destroy();
-  documentRoot.assign("");
-  systemRoot.assign("");
+  refMutex.destroy ();
   mimeManager.clean();
   logManager->remove (this);
 }
@@ -118,15 +115,15 @@ int Vhost::freeHashedData()
 /*!
  * Check if a MIME type file is defined for the virtual host.
  */
-int Vhost::isMIME()
+int Vhost::isMIME ()
 {
-  return mimeManager.isLoaded();
+  return mimeManager.isLoaded ();
 }
 
 /*!
  * Get the MIME manager for the virtual host.
  */
-MimeManager* Vhost::getMIME()
+MimeManager* Vhost::getMIME ()
 {
   return &mimeManager;
 }
@@ -134,38 +131,38 @@ MimeManager* Vhost::getMIME()
 /*!
  * Clear the list of the hosts.
  */
-void Vhost::clearHostList()
+void Vhost::clearHostList ()
 {
-  list<StringRegex*>::iterator i = hostList.begin();
-  while(i != hostList.end())
+  list<StringRegex*>::iterator i = hostList.begin ();
+  while (i != hostList.end ())
     {
       StringRegex* sr = *i;
       delete sr;
       i++;
     }
-  hostList.clear();
+  hostList.clear ();
 }
 
 /*!
  * Clear the list of IPs.
  */
-void Vhost::clearIPList()
+void Vhost::clearIPList ()
 {
-  list<IpRange *>::iterator it = ipListAllow.begin();
-  while(it != ipListAllow.end())
+  list<IpRange *>::iterator it = ipListAllow.begin ();
+  while (it != ipListAllow.end ())
     {
       delete (*it);
       it++;
     }
-  ipListAllow.clear();
+  ipListAllow.clear ();
 
-  it = ipListDeny.begin();
-  while(it != ipListDeny.end())
+  it = ipListDeny.begin ();
+  while (it != ipListDeny.end ())
     {
       delete (*it);
       it++;
     }
-  ipListDeny.clear();
+  ipListDeny.clear ();
 }
 
 int
@@ -204,7 +201,7 @@ void Vhost::addIP (const char *ip, int isRegex)
  * Remove the IP address to the list.
  * \param ip The ip to remove.
  */
-void Vhost::removeIP(const char *ip)
+void Vhost::removeIP (const char *ip)
 {
   std::string sTempIp (ip);
   ipListDeny.push_back (IpRange::RangeFactory (sTempIp));
@@ -216,20 +213,19 @@ void Vhost::removeIP(const char *ip)
  */
 void Vhost::removeHost (const char *host)
 {
-  list<StringRegex*>::iterator i = hostList.begin();
+  list<StringRegex*>::iterator i = hostList.begin ();
 
-  while(i != hostList.end())
+  while (i != hostList.end ())
     {
       StringRegex* sr = *i;
       /*
        * If this is the virtual host with the right IP.
        */
-      if(!stringcmp(sr->name, host))
+      if (!stringcmp (sr->name, host))
         {
-          hostList.erase(i);
+          hostList.erase (i);
           return;
         }
-
       i++;
     }
 }
@@ -237,26 +233,21 @@ void Vhost::removeHost (const char *host)
  * Check if an host is allowed to the connection
  * \param host hostname to check.
  */
-int Vhost::isHostAllowed(const char* host)
+int Vhost::isHostAllowed (const char* host)
 {
   /* If no hosts are specified then every host is allowed to connect here.  */
-  if(!hostList.size() || !host)
+  if (!hostList.size () || !host)
     return 1;
 
-  list<StringRegex*>::iterator i = hostList.begin();
-  while(i != hostList.end())
+  list<StringRegex*>::iterator i = hostList.begin ();
+  while (i != hostList.end ())
     {
       StringRegex* sr = *i;
       regmatch_t pm;
-      if(sr->regex.isCompiled())
-        {
-          if (!sr->regex.exec(host, 1, &pm, REG_NOTBOL))
-            {
-              return 1;
-            }
-        }
+      if (sr->regex.isCompiled () &&!sr->regex.exec (host, 1, &pm, REG_NOTBOL))
+        return 1;
 
-      if(!stringcmp(sr->name, host))
+      if (!stringcmp (sr->name, host))
         return 1;
 
       i++;
@@ -267,9 +258,9 @@ int Vhost::isHostAllowed(const char* host)
 /*!
  * Check if all the host are allowed to the connection.
  */
-int Vhost::areAllHostAllowed()
+int Vhost::areAllHostAllowed ()
 {
-  if(hostList.size() == 0)
+  if (hostList.size () == 0)
     return 1;
   return 0;
 }
@@ -279,9 +270,7 @@ int Vhost::areAllHostAllowed()
  */
 int Vhost::areAllIPAllowed()
 {
-  if ( ipListDeny.empty() && ipListAllow.empty() )
-    return 1;
-  return 0;
+  return ipListDeny.empty () && ipListAllow.empty () ? 1 : 0;
 }
 
 /*!
@@ -289,31 +278,31 @@ int Vhost::areAllIPAllowed()
  * by the local IP).
  * \param ip The IP to check.
  */
-int Vhost::isIPAllowed(const char* ip)
+int Vhost::isIPAllowed (const char* ip)
 {
-  if ( areAllIPAllowed() )
+  if (areAllIPAllowed ())
     return 1;
 
-  std::string sTempIp(ip);
-  IpRange *pTempIp = IpRange::RangeFactory(sTempIp);
-  list<IpRange *>::const_iterator it = ipListDeny.begin();
-  while ( it != ipListDeny.end() )
+  std::string sTempIp (ip);
+  IpRange *pTempIp = IpRange::RangeFactory (sTempIp);
+  list<IpRange *>::const_iterator it = ipListDeny.begin ();
+  while (it != ipListDeny.end ())
     {
-      if ( (*it)->InRange(pTempIp) )
-	{
-	  delete pTempIp;
-	  return 0;
-	}
+      if ((*it)->InRange (pTempIp) )
+        {
+          delete pTempIp;
+          return 0;
+        }
       it++;
     }
-  it = ipListAllow.begin();
-  while ( it != ipListAllow.end() )
+  it = ipListAllow.begin ();
+  while (it != ipListAllow.end () )
     {
-      if ( (*it)->InRange(pTempIp) )
-	{
-	  delete pTempIp;
-	  return 1;
-	}
+      if ((*it)->InRange (pTempIp))
+        {
+          delete pTempIp;
+          return 1;
+        }
       it++;
     }
   delete pTempIp;
@@ -325,10 +314,10 @@ int Vhost::isIPAllowed(const char* ip)
  * \param host hostname to add.
  * \param isRegex Is the host a regex?
  */
-void Vhost::addHost(const char *host, int isRegex)
+void Vhost::addHost (const char *host, int isRegex)
 {
-  StringRegex* hl = new StringRegex();
-  if(hl == 0)
+  StringRegex* hl = new StringRegex ();
+  if (hl == 0)
     return;
 
 #ifdef HAVE_IDN
@@ -345,7 +334,7 @@ void Vhost::addHost(const char *host, int isRegex)
 
   ret = idna_to_ascii_4z (ucs4, &ascii, 0);
 
-  free(ucs4);
+  free (ucs4);
 
   if (ret != IDNA_SUCCESS)
     {
@@ -356,41 +345,48 @@ void Vhost::addHost(const char *host, int isRegex)
   host = ascii;
 #endif
 
-  hl->name.assign(host);
+  hl->name.assign (host);
 
-  if(isRegex)
-    hl->regex.compile(host, REG_EXTENDED);
-  hostList.push_back(hl);
+  if (isRegex)
+    hl->regex.compile (host, REG_EXTENDED);
+  hostList.push_back (hl);
 
 #ifdef HAVE_IDN
-  free(ascii);
+  free (ascii);
 #endif
 
 }
 
 /*!
  * Write to the accesses log.
- * \param str The line to log.
+ * \param fmt The log format string.
+ * \param ... Arguments.
  */
 int
-Vhost::accessesLogWrite (const char* str)
+Vhost::accessesLogWrite (const char* fmt, ...)
 {
-  string msg (str);
-  return logManager->log (this, accessLogType, msg);
+  va_list argptr;
+  va_start (argptr, fmt);
+  int ret = logManager->log (this, accessLogType, MYSERVER_LOG_MSG_INFO, false,
+                             false, fmt, argptr);
+  va_end (argptr);
+  return ret;
 }
 
 /*!
  * Write a line to the warnings log.
- * \param str The line to log.
+ * \param fmt The log format string.
+ * \param ... Arguments.
  */
 int
-Vhost::warningsLogWrite (const char* str)
+Vhost::warningsLogWrite (const char* fmt, ...)
 {
-  string msg;
-  getLocalLogFormatDate (msg, 100);
-  msg.append (" -- ");
-  msg.append (str);
-  return logManager->log (this, warningLogType, msg, true);
+  va_list argptr;
+  va_start (argptr, fmt);
+  int ret = logManager->log (this, warningLogType, MYSERVER_LOG_MSG_INFO, true,
+                             false, fmt, argptr);
+  va_end (argptr);
+  return ret;
 }
 
 /*!
@@ -398,7 +394,7 @@ Vhost::warningsLogWrite (const char* str)
  * counter for the virtual host is zero.
  * \param cb The null references callback function.
  */
-void Vhost::setNullRefCB(NULL_REFERENCECB cb)
+void Vhost::setNullRefCB (NULL_REFERENCECB cb)
 {
   nullReferenceCb = cb;
 }
@@ -406,7 +402,7 @@ void Vhost::setNullRefCB(NULL_REFERENCECB cb)
 /*!
  * Get the null reference callback function used by the virtual host.
  */
-NULL_REFERENCECB Vhost::getNullRefCB()
+NULL_REFERENCECB Vhost::getNullRefCB ()
 {
   return nullReferenceCb;
 }
@@ -414,7 +410,7 @@ NULL_REFERENCECB Vhost::getNullRefCB()
 /*!
  * Increment current references counter by 1.
  */
-void Vhost::addRef()
+void Vhost::addRef ()
 {
   refMutex.lock(0);
   refCount++;
@@ -424,7 +420,7 @@ void Vhost::addRef()
 /*!
  * Decrement current references counter by 1.
  */
-void Vhost::removeRef()
+void Vhost::removeRef ()
 {
   refMutex.lock(0);
   refCount--;
@@ -432,7 +428,7 @@ void Vhost::removeRef()
    * If the reference count reaches zero and a callback
    * function is defined call it.
    */
-  if(refCount == 0 && nullReferenceCb)
+  if (refCount == 0 && nullReferenceCb)
     nullReferenceCb(this);
   refMutex.unlock(0);
 }
@@ -440,7 +436,7 @@ void Vhost::removeRef()
 /*!
  * Get the references counter.
  */
-int Vhost::getRef()
+int Vhost::getRef ()
 {
   return refCount;
 }
@@ -449,7 +445,7 @@ int Vhost::getRef()
  * Set the reference counter for the virtual host.
  * \param n The new reference counter.
  */
-void Vhost::setRef(int n)
+void Vhost::setRef (int n)
 {
   refCount = n;
 }
@@ -458,7 +454,7 @@ void Vhost::setRef(int n)
  * Get the value for name in the hash dictionary.
  * \param name The hashed entry key.
  */
-const char* Vhost::getHashedData(const char* name)
+const char* Vhost::getHashedData (const char* name)
 {
   NodeTree<string> *s = hashedData.get(name);
 
@@ -468,34 +464,32 @@ const char* Vhost::getHashedData(const char* name)
 /*!
  * Initialize SSL on the virtual host.
  */
-int Vhost::initializeSSL()
+int Vhost::initializeSSL ()
 {
   Protocol* protocol;
 
-  protocol = Server::getInstance()->getProtocol(protocolName.c_str());
-  if(!protocol)
+  protocol = Server::getInstance ()->getProtocol (protocolName.c_str ());
+  if (!protocol)
     return 0;
 
-  if(!(protocol->getProtocolOptions() & PROTOCOL_USES_SSL))
+  if (!(protocol->getProtocolOptions () & PROTOCOL_USES_SSL))
     return 0;
 
-  return sslContext.initialize();
+  return sslContext.initialize ();
 }
 
-
 /*!
  * Get the SSL context.
  */
-SSL_CTX* Vhost::getSSLContext()
+SSL_CTX* Vhost::getSSLContext ()
 {
-  return sslContext.getContext();
+  return sslContext.getContext ();
 }
 
-
 /*!
  * Clean the memory used by the SSL context.
  */
-int Vhost::freeSSL()
+int Vhost::freeSSL ()
 {
-  return sslContext.free();
+  return sslContext.free ();
 }
diff --git a/myserver/src/conf/vhost/vhost_manager.cpp b/myserver/src/conf/vhost/vhost_manager.cpp
index 46dcc36..acd5790 100644
--- a/myserver/src/conf/vhost/vhost_manager.cpp
+++ b/myserver/src/conf/vhost/vhost_manager.cpp
@@ -29,34 +29,33 @@
 int VhostManager::addVHost(Vhost* vh)
 {
   list<Vhost*>::iterator it;
-  
+
   mutex.lock();
 
   /* Be sure there is a listening thread on the specified port.  */
   listenThreads->addListeningThread(vh->getPort());
-  
-  if(extSource)
+
+  if (extSource)
     {
-      int ret = extSource->addVHost(vh);
-      mutex.unlock();
+      int ret = extSource->addVHost (vh);
+      mutex.unlock ();
       return ret;
     }
 
-  it = hostList.begin();
+  it = hostList.begin ();
 
   try
     {
-      if(!vh->getProtocolName())
+      if (!vh->getProtocolName ())
         {
-          string error;
-          error.assign("Warning: protocol not defined for virtual host: " );
-          error.append(vh->getName());
-          error.append(", using HTTP by default");
           vh->setProtocolName("http");
-          Server::getInstance()->logWriteln(error.c_str(), MYSERVER_LOG_MSG_ERROR);
+          Server::getInstance()->logWriteln (MYSERVER_LOG_MSG_WARNING,
+                 _("Protocol not defined for vhost: %s, using HTTP by default"),
+                                             vh->getName ());
         }
-      hostList.push_back(vh);
-      mutex.unlock();
+
+      hostList.push_back (vh);
+      mutex.unlock ();
       return 0;
     }
   catch(...)
@@ -68,7 +67,7 @@ int VhostManager::addVHost(Vhost* vh)
 
 /*!
  *Get the vhost for the connection. A return value of 0 means that
- *a valid host was not found. 
+ *a valid host was not found.
  *\param host Hostname for the virtual host.
  *\param ip IP address for the virtual host.
  *\param port The port used by the client to connect to the server.
@@ -90,8 +89,8 @@ Vhost* VhostManager::getVHost(const char* host, const char* ip, u_short port)
 
       it = hostList.begin();
 
-      /*Do a linear search here. We have to use the first full-matching 
-       *virtual host. 
+      /*Do a linear search here. We have to use the first full-matching
+       *virtual host.
        */
       for(; it != hostList.end(); it++)
         {
@@ -117,7 +116,7 @@ Vhost* VhostManager::getVHost(const char* host, const char* ip, u_short port)
   catch(...)
     {
       mutex.unlock();
-      return 0;   
+      return 0;
     };
 }
 
@@ -144,21 +143,21 @@ void VhostManager::clean()
 
   mutex.lock();
 
-  it = hostList.begin();  
-  
+  it = hostList.begin();
+
   try
     {
       for(;it != hostList.end(); it++)
         delete *it;
-      
+
       hostList.clear();
-    
+
       mutex.unlock();
     }
   catch(...)
     {
       mutex.unlock();
-      return;  
+      return;
     };
 }
 
@@ -202,17 +201,13 @@ void VhostManager::changeLocationsOwner ()
           /* Chown the log files.  */
           err = logManager->chown (vh, "ACCESSLOG", uid, gid);
           if(err)
-            {
-              string str ("Error changing owner for accesses log locations");
-              Server::getInstance()->logWriteln(str.c_str (), MYSERVER_LOG_MSG_ERROR);
-            }
+            Server::getInstance()->logWriteln (MYSERVER_LOG_MSG_ERROR,
+                    _("Error while changing accesses log locations owner"));
 
           err = logManager->chown (vh, "WARNINGLOG", uid, gid);
           if(err)
-            {
-              string str ("Error changing owner for errors log locations");
-              Server::getInstance()->logWriteln(str.c_str (), MYSERVER_LOG_MSG_ERROR);
-            }
+            Server::getInstance()->logWriteln (MYSERVER_LOG_MSG_ERROR,
+                    _("Error while changing log locations owner"));
         }
     }
 }
@@ -289,18 +284,21 @@ VhostManager::loadXMLlogData (string name, Vhost* vh, xmlNode* lcur)
             {
               err = vh->openAccessLog (location, filters, cycle);
               vh->setAccessLogOpt (opt.c_str ());
-              str.assign ("Error opening accesses log location " + location);
+              if (err)
+                Server::getInstance()->logWriteln (MYSERVER_LOG_MSG_ERROR,
+                                                   _("Error opening %s"), location.c_str ());
             }
           else if (!name.compare ("WARNINGLOG"))
             {
               err = vh->openWarningLog (location, filters, cycle);
               vh->setWarningLogOpt (opt.c_str ());
-              str.assign ("Error opening warnings log location " + location);
-            }
-          if (err)
-            {
-              Server::getInstance ()->logWriteln (str.c_str (), MYSERVER_LOG_MSG_ERROR);
+              if (err)
+                Server::getInstance()->logWriteln (MYSERVER_LOG_MSG_ERROR,
+                                                   _("Error opening %s"), location.c_str ());
             }
+          else
+            Server::getInstance()->logWriteln (MYSERVER_LOG_MSG_ERROR,
+                                               _(" Unrecognized log type"));
         }
     }
 }
@@ -315,12 +313,10 @@ int VhostManager::loadXMLConfigurationFile(const char *filename)
   XmlParser parser;
   xmlDocPtr doc;
   xmlNodePtr node;
-  string errMsg;
   if(parser.open(filename))
     {
-      errMsg.assign("Error opening: ");
-      errMsg.append(filename);
-      Server::getInstance()->logWriteln(errMsg.c_str(), MYSERVER_LOG_MSG_ERROR);
+      Server::getInstance()->logWriteln (MYSERVER_LOG_MSG_ERROR,
+                                         _("Error opening %s"), filename);
       return -1;
     }
   doc = parser.getDoc();
@@ -338,8 +334,8 @@ int VhostManager::loadXMLConfigurationFile(const char *filename)
         {
           parser.close();
           clean();
-          errMsg.assign("Error: allocating memory");
-          Server::getInstance()->logWriteln(errMsg.c_str(), MYSERVER_LOG_MSG_ERROR);
+          Server::getInstance()->logWriteln (MYSERVER_LOG_MSG_ERROR,
+                                             _("internal error"), filename);
           return -1;
         }
 
@@ -415,8 +411,8 @@ int VhostManager::loadXMLConfigurationFile(const char *filename)
                 {
                   if (!xmlStrcmp(attrs->name, (const xmlChar *)"isRegex"))
                     {
-                      if (attrs->children && attrs->children->content && 
-                          (!xmlStrcmp(attrs->children->content, 
+                      if (attrs->children && attrs->children->content &&
+                          (!xmlStrcmp(attrs->children->content,
                                       (const xmlChar *)"YES")))
                         useRegex = 1;
                     }
@@ -428,12 +424,8 @@ int VhostManager::loadXMLConfigurationFile(const char *filename)
             {
               int val = atoi ((char*)lcur->children->content);
               if (val > (1 << 16) || strlen ((const char*)lcur->children->content) > 6)
-                {
-                  errMsg.assign ("Error: specified port greater than 65536 or invalid: ");
-                  errMsg.append ((char*)lcur->children->content);
-                  Server::getInstance()->logWriteln (errMsg.c_str(),
-                                                     MYSERVER_LOG_MSG_ERROR);
-                }
+                Server::getInstance()->logWriteln (MYSERVER_LOG_MSG_ERROR,
+                       _("Specified invalid port %s"), lcur->children->content);
               vh->setPort ((u_short)val);
             }
           else if (!xmlStrcmp (lcur->name, (const xmlChar *)"PROTOCOL"))
@@ -499,11 +491,11 @@ int VhostManager::loadXMLConfigurationFile(const char *filename)
 
           lcur = lcur->next;
         }// while(lcur)
-      
+
       if (vh->openLogFiles ())
         {
-          errMsg.assign ("Error: opening log files");
-          Server::getInstance ()->logWriteln (errMsg.c_str (), MYSERVER_LOG_MSG_ERROR);
+          Server::getInstance()->logWriteln (MYSERVER_LOG_MSG_ERROR,
+                                             _("Error opening log files"));
           delete vh;
           vh = 0;
           continue;
@@ -511,11 +503,9 @@ int VhostManager::loadXMLConfigurationFile(const char *filename)
 
       if (vh->initializeSSL () < 0)
         {
-          errMsg.assign ("Error: initializing vhost \"");
-          errMsg.append (vh->getName ());
-          errMsg.append ("\"");
-          Server::getInstance ()->logWriteln (errMsg.c_str (),
-                                              MYSERVER_LOG_MSG_ERROR);
+          Server::getInstance()->logWriteln (MYSERVER_LOG_MSG_ERROR,
+                                             _("Error initializing SSL for %s"),
+                                             vh->getName ());
           delete vh;
           vh = 0;
           continue;
@@ -523,11 +513,8 @@ int VhostManager::loadXMLConfigurationFile(const char *filename)
 
       if (addVHost (vh))
         {
-          errMsg.assign ("Error: adding vhost \"");
-          errMsg.append (vh->getName ());
-          errMsg.append ("\"");
-          Server::getInstance ()->logWriteln (errMsg.c_str (),
-                                              MYSERVER_LOG_MSG_ERROR);
+          Server::getInstance()->logWriteln (MYSERVER_LOG_MSG_ERROR,
+                                             _("Internal error"));
           delete vh;
           vh = 0;
           continue;
@@ -558,7 +545,7 @@ Vhost* VhostManager::getVHostByNumber(int n)
           mutex.unlock();
           return ret;
         }
-    
+
       for( ; i != hostList.end(); i++)
         {
           if(!(n--))
@@ -569,7 +556,7 @@ Vhost* VhostManager::getVHostByNumber(int n)
             }
         }
       mutex.unlock();
-    
+
       return ret;
     }
   catch(...)
@@ -590,7 +577,7 @@ int VhostManager::removeVHost(int n)
   try
     {
       list<Vhost*>::iterator i = hostList.begin();
-    
+
       for( ;i != hostList.end(); i++)
         {
           if(!(n--))
@@ -606,7 +593,7 @@ int VhostManager::removeVHost(int n)
   catch(...)
     {
       mutex.unlock();
-      return 0;   
+      return 0;
     };
 }
 
diff --git a/myserver/src/connections_scheduler/listen_threads.cpp b/myserver/src/connections_scheduler/listen_threads.cpp
index b81263e..2d0797e 100644
--- a/myserver/src/connections_scheduler/listen_threads.cpp
+++ b/myserver/src/connections_scheduler/listen_threads.cpp
@@ -86,7 +86,7 @@ int ListenThreads::createServerAndListener(u_short port)
    */
   try
     {
-      if ( serverSocketIPv4 != NULL )
+      if (serverSocketIPv4 != NULL)
         {
           serverSocketIPv4->socket (AF_INET, SOCK_STREAM, IPPROTO_TCP);
           if (serverSocketIPv4->getHandle() == (Handle)INVALID_SOCKET)
@@ -143,7 +143,7 @@ int ListenThreads::createServerAndListener(u_short port)
       if (serverSocketIPv6 != NULL)
         {
           serverSocketIPv6->socket (AF_INET6, SOCK_STREAM, IPPROTO_TCP);
-          if ( serverSocketIPv6->getHandle () == (FileHandle)INVALID_SOCKET)
+          if (serverSocketIPv6->getHandle () == (FileHandle)INVALID_SOCKET)
             {
               server->logWriteln (MYSERVER_LOG_MSG_ERROR,
                                  _("Error while creating the server socket"));
@@ -221,7 +221,7 @@ int ListenThreads::createServerAndListener(u_short port)
           serverSocketIPv6 = NULL;
         }
 
-      if ( serverSocketIPv4 == NULL && serverSocketIPv6 == NULL )
+      if (serverSocketIPv4 == NULL && serverSocketIPv6 == NULL)
         {
           delete si;
           return 1;
@@ -239,12 +239,12 @@ int ListenThreads::createServerAndListener(u_short port)
 
       return 0;
     }
-  catch( bad_alloc &ba)
+  catch(bad_alloc &ba)
     {
       server->logWriteln (MYSERVER_LOG_MSG_ERROR, _("Bad alloc: %s"),
                           ba.what ());
     }
-  catch( exception &e)
+  catch(exception &e)
     {
       server->logWriteln (MYSERVER_LOG_MSG_ERROR, _("Error: %s"),
                           e.what ());
diff --git a/myserver/src/http_handler/cgi/cgi.cpp b/myserver/src/http_handler/cgi/cgi.cpp
index fd9dafa..7b24ae3 100644
--- a/myserver/src/http_handler/cgi/cgi.cpp
+++ b/myserver/src/http_handler/cgi/cgi.cpp
@@ -35,9 +35,10 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #include <string>
 #include <sstream>
 
-extern "C" {
+extern "C"
+{
 #ifdef WIN32
-#include <direct.h>
+# include <direct.h>
 #endif
 #include <string.h>
 }
@@ -177,18 +178,11 @@ int Cgi::send (HttpThreadContext* td, const char* scriptpath,
       if (!FilesUtility::fileExists (tmpCgiPath.c_str ()))
         {
           if (tmpCgiPath.length() > 0)
-            {
-              string msg;
-              msg.assign ("Cgi: Cannot find the ");
-              msg.append (tmpCgiPath);
-              msg.append (" executable");
-              td->connection->host->warningsLogWrite (msg.c_str ());
-            }
+            td->connection->host->warningsLogWrite (_("Cgi: cannot find the %s file")),
+              tmpCgiPath.c_str ();
           else
-            {
-              td->connection->host->warningsLogWrite(
-                             "Cgi: Executable file not specified");
-            }
+            td->connection->host->warningsLogWrite (_("Cgi: Executable file not specified"));
+
           td->scriptPath.assign ("");
           td->scriptFile.assign ("");
           td->scriptDir.assign ("");
@@ -220,8 +214,7 @@ int Cgi::send (HttpThreadContext* td, const char* scriptpath,
    */
   if (stdOutFile.create())
     {
-      td->connection->host->warningsLogWrite
-        ("Cgi: Cannot create CGI stdout file");
+      td->connection->host->warningsLogWrite (_("Cgi: internal error"));
       chain.clearAllFilters ();
       return td->http->raiseHTTPError (500);
     }
@@ -230,7 +223,7 @@ int Cgi::send (HttpThreadContext* td, const char* scriptpath,
   if (stdInFile.openFile(td->inputDataPath,
                          File::READ | File::FILE_OPEN_ALWAYS))
     {
-      td->connection->host->warningsLogWrite ("Cgi: Cannot open CGI stdin file.");
+      td->connection->host->warningsLogWrite (_("Cgi: internal error"));
       stdOutFile.close ();
       chain.clearAllFilters ();
       return td->http->raiseHTTPError (500);
@@ -263,12 +256,12 @@ int Cgi::send (HttpThreadContext* td, const char* scriptpath,
   if (spi.stdError == (FileHandle) -1 ||
       spi.stdIn == (FileHandle) -1 ||
       spi.stdOut == (FileHandle) -1)
-  {
-    td->connection->host->warningsLogWrite ("Cgi: Invalid file handler.");
-    stdOutFile.close ();
-    chain.clearAllFilters ();
-    return td->http->raiseHTTPError (500);
-  }
+    {
+      td->connection->host->warningsLogWrite (_("Cgi: internal error"));
+      stdOutFile.close ();
+      chain.clearAllFilters ();
+      return td->http->raiseHTTPError (500);
+    }
 
   /* Execute the CGI process. */
   {
@@ -293,8 +286,7 @@ int Cgi::send (HttpThreadContext* td, const char* scriptpath,
     {
       stdInFile.close();
       stdOutFile.close();
-      td->connection->host->warningsLogWrite
-                                       ("Cgi: Error in the CGI execution");
+      td->connection->host->warningsLogWrite (_("Cgi: internal error"));
       chain.clearAllFilters ();
       return td->http->raiseHTTPError (500);
       }
@@ -353,7 +345,7 @@ int Cgi::sendData (HttpThreadContext* td, Pipe &stdOutFile, FiltersChain& chain,
                                                                     &nbw,
                                                                     1))
     {
-      td->connection->host->warningsLogWrite("Cgi: Error loading filters");
+      td->connection->host->warningsLogWrite (_("Cgi: internal error"));
       return td->http->raiseHTTPError(500);
     }
 
@@ -369,9 +361,7 @@ int Cgi::sendData (HttpThreadContext* td, Pipe &stdOutFile, FiltersChain& chain,
       if (ticks >= timeout ||
           stdOutFile.waitForData ((timeout - ticks) / 1000, (timeout - ticks) % 1000) == 0)
         {
-          ostringstream msg;
-          msg << "Cgi: timeout for process " << cgiProc.getPid();
-          td->connection->host->warningsLogWrite (msg.str ().c_str ());
+          td->connection->host->warningsLogWrite (_("Cgi: process %i timeout"), cgiProc.getPid ());
           break;
         }
 
@@ -440,9 +430,7 @@ int Cgi::sendHeader (HttpThreadContext* td, Pipe &stdOutFile, FiltersChain& chai
     if (!term && 
         stdOutFile.waitForData ((timeout - ticks) / 1000, (timeout - ticks) % 1000) == 0)
     {
-      ostringstream msg;
-      msg << "Cgi: timeout for process " << cgiProc.getPid ();
-      td->connection->host->warningsLogWrite (msg.str ().c_str ());    
+      td->connection->host->warningsLogWrite (_("Cgi: process %i timeout"), cgiProc.getPid ());
       break;
     }
 
diff --git a/myserver/src/http_handler/fastcgi/fastcgi.cpp b/myserver/src/http_handler/fastcgi/fastcgi.cpp
index bbd4710..12aef47 100644
--- a/myserver/src/http_handler/fastcgi/fastcgi.cpp
+++ b/myserver/src/http_handler/fastcgi/fastcgi.cpp
@@ -16,7 +16,7 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
 
 /*
- *To get more info about the FastCGI protocol please visit the official 
+ *To get more info about the FastCGI protocol please visit the official
  *FastCGI site at: http://www.fastcgi.com.
  *On that site you can find samples and all the supported languages.
  */
@@ -100,14 +100,14 @@ int FastCgi::send(HttpThreadContext* td, const char* scriptpath,
   chain.setProtocol(td->http);
   chain.setProtocolData(td);
   chain.setStream(td->connection->socket);
- 
+
   if(td->mime && Server::getInstance()->getFiltersFactory()->chain(&chain,
                                                                    td->mime->filters,
                                                                    td->connection->socket,
-                                                                   &nbw, 
+                                                                   &nbw,
                                                                    1))
   {
-    td->connection->host->warningsLogWrite("FastCGI: Error loading filters");
+    td->connection->host->warningsLogWrite (_("FastCGI: internal error"));
     chain.clearAllFilters();
     return td->http->raiseHTTPError(500);
   }
@@ -169,7 +169,7 @@ int FastCgi::send(HttpThreadContext* td, const char* scriptpath,
         int len = strlen(cgipath);
         int subString = cgipath[0] == '"';
 
-        cmdLine << "\"" << td->cgiRoot << "/" << td->cgiFile << "\" " 
+        cmdLine << "\"" << td->cgiRoot << "/" << td->cgiFile << "\" "
                 << moreArg << " \"" <<  td->filenamePath << "\"";
       }
 #else
@@ -192,16 +192,12 @@ int FastCgi::send(HttpThreadContext* td, const char* scriptpath,
   }
 
   td->inputData.close();
-  if(td->inputData.openFile(td->inputDataPath, File::READ | 
+  if(td->inputData.openFile(td->inputDataPath, File::READ |
                             File::FILE_OPEN_ALWAYS |
                             File::NO_INHERIT))
   {
     td->buffer->setLength(0);
-    if(Server::getInstance()->getVerbosity() > 2)
-    {
-      *td->buffer << "FastCGI: Error opening stdin file" << '\0';
-      td->connection->host->warningsLogWrite(td->buffer->getBuffer());
-    }
+    td->connection->host->warningsLogWrite (_("FastCGI: internal error"));
     chain.clearAllFilters();
     return td->http->raiseHTTPError(500);
   }
@@ -211,12 +207,8 @@ int FastCgi::send(HttpThreadContext* td, const char* scriptpath,
   if (server == 0)
   {
     td->buffer->setLength (0);
-    if(Server::getInstance ()->getVerbosity () > 2)
-    {
-      *td->buffer << "FastCGI: Error connecting to FastCGI "
-                  << cmdLine.str().c_str() << " process" << '\0';
-      td->connection->host->warningsLogWrite(td->buffer->getBuffer());
-    }
+    td->connection->host->warningsLogWrite (_("FastCGI: cannot connect to the %s process"),
+                                            cmdLine.str ().c_str ());
     chain.clearAllFilters();
     return td->http->raiseHTTPError(500);
   }
@@ -224,9 +216,7 @@ int FastCgi::send(HttpThreadContext* td, const char* scriptpath,
   id = td->id + 1;
 
   if (fastCgiRequest (&con, id))
-  {
     return td->http->raiseHTTPError(500);
-  }
 
   /*! Now read the output. This flag is used by the external loop.  */
   exit = 0;
@@ -242,7 +232,7 @@ int FastCgi::send(HttpThreadContext* td, const char* scriptpath,
   do
   {
     u_long dim;
-    
+
     if (readHeader (&con, &header, initialTicks, timeout, id))
     {
       exit = 1;
@@ -278,7 +268,7 @@ int FastCgi::send(HttpThreadContext* td, const char* scriptpath,
           break;
         case FCGISTDOUT:
           headerCompleted = false;
-          ret = sendData (&con, dim, static_cast<u_long>(timeout), &chain, 
+          ret = sendData (&con, dim, static_cast<u_long>(timeout), &chain,
                           &headerCompleted, onlyHeader);
 
           if (ret)
@@ -311,7 +301,7 @@ int FastCgi::send(HttpThreadContext* td, const char* scriptpath,
       while (toPad)
       {
         nbr = con.sock.recv(td->buffer->getBuffer(),
-                            std::min(toPad, (u_long)td->buffer->getRealLength()), 0, 
+                            std::min(toPad, (u_long)td->buffer->getRealLength()), 0,
                             static_cast<u_long>(timeout));
         if (nbr == (u_long)-1)
         {
@@ -325,13 +315,13 @@ int FastCgi::send(HttpThreadContext* td, const char* scriptpath,
   }while (!exit);
 
   /* Send the last null chunk if needed.  */
-  if(con.useChunks && 
+  if(con.useChunks &&
      (td->response.getStatusType () == HttpResponseHeader::SUCCESSFUL))
     chain.getStream ()->write("0\r\n\r\n", 5, &nbw);
 
   chain.clearAllFilters();
   con.sock.close();
- 
+
   return ret;
 }
 
@@ -505,10 +495,10 @@ FastCgiServer* FastCgi::connect(FcgiContext* con, const char* path)
 
 /*!
  *Run the FastCGI server.
- *If the path starts with a @ character, the path is handled as a 
+ *If the path starts with a @ character, the path is handled as a
  *remote server.
  */
-FastCgiServer* FastCgi::runFcgiServer(FcgiContext* context, 
+FastCgiServer* FastCgi::runFcgiServer(FcgiContext* context,
                                       const char* path)
 {
   /* This method needs a better home (and maybe better code).
@@ -538,8 +528,8 @@ FastCgiServer* FastCgi::runFcgiServer(FcgiContext* context,
     myserver_strlcpy(host, &path[1], min(128, i));
 
     myserver_strlcpy(port, &path[i + 1], 6);
-    
-    return processServerManager->addRemoteServer(SERVERS_DOMAIN, path, 
+
+    return processServerManager->addRemoteServer(SERVERS_DOMAIN, path,
                                                  host, atoi(port));
   }
 
@@ -584,11 +574,7 @@ int FastCgi::fastCgiRequest (FcgiContext* con, int id)
   if(sizeEnvString == -1)
   {
     td->buffer->setLength(0);
-    if(Server::getInstance()->getVerbosity() > 2)
-    {
-      *td->buffer << "FastCGI: Error to build env string" << '\0';
-      td->connection->host->warningsLogWrite(td->buffer->getBuffer());
-    }
+    td->connection->host->warningsLogWrite (_("FastCGI: internal error"));
     return 1;
   }
 
@@ -601,11 +587,7 @@ int FastCgi::fastCgiRequest (FcgiContext* con, int id)
   if(sendFcgiBody(con, (char*)&tBody, sizeof(tBody), FCGIBEGIN_REQUEST, id))
   {
     td->buffer->setLength(0);
-    if(Server::getInstance()->getVerbosity() > 2)
-    {
-      *td->buffer<< "FastCGI: Error beginning the request" << '\0';
-      td->connection->host->warningsLogWrite(td->buffer->getBuffer());
-    }
+    td->connection->host->warningsLogWrite (_("FastCGI: internal error"));
     return 1;
   }
 
@@ -613,22 +595,14 @@ int FastCgi::fastCgiRequest (FcgiContext* con, int id)
                   FCGIPARAMS, id))
   {
     td->buffer->setLength(0);
-    if(Server::getInstance()->getVerbosity() > 2)
-    {
-      *td->buffer << "FastCGI: Error sending params" << '\0';
-      td->connection->host->warningsLogWrite(td->buffer->getBuffer());
-    }
+    td->connection->host->warningsLogWrite (_("FastCGI: internal error"));
     return 1;
   }
 
   if(sendFcgiBody(con, 0, 0, FCGIPARAMS, id))
   {
     td->buffer->setLength(0);
-    if(Server::getInstance()->getVerbosity() > 2)
-    {
-      *td->buffer << "FastCGI: Error sending params" << '\0';
-      td->connection->host->warningsLogWrite(td->buffer->getBuffer());
-    }
+    td->connection->host->warningsLogWrite (_("FastCGI: internal error"));
     return 1;
   }
 
@@ -638,10 +612,9 @@ int FastCgi::fastCgiRequest (FcgiContext* con, int id)
 
 
     if(td->inputData.seek (0))
-      if(Server::getInstance()->getVerbosity() > 2)
       {
-        *td->buffer << "FastCGI: Error sending POST data" << '\0';
-        td->connection->host->warningsLogWrite(td->buffer->getBuffer());
+        td->connection->host->warningsLogWrite (_("FastCGI: internal error"));
+        return 1;
       }
 
     /*! Send the STDIN data.  */
@@ -651,48 +624,34 @@ int FastCgi::fastCgiRequest (FcgiContext* con, int id)
                                     maxStdinChunk, &nbr))
       {
         td->buffer->setLength(0);
-        if(Server::getInstance()->getVerbosity() > 2)
-        {
-          *td->buffer << "FastCGI: Error reading from file" << '\0';
-          td->connection->host->warningsLogWrite(td->buffer->getBuffer());
-        }
+        td->connection->host->warningsLogWrite (_("FastCGI: internal error"));
         return 1;
       }
 
       if(!nbr)
         break;
 
-      generateFcgiHeader( header, FCGISTDIN, id, nbr);
-      if(con->sock.send((char*)&header, sizeof(header), 0) == -1)
-      {
+      generateFcgiHeader (header, FCGISTDIN, id, nbr);
+      if (con->sock.send ((char*)&header, sizeof(header), 0) == -1)
         return 1;
-      }
 
-      if(con->sock.send(td->buffer->getBuffer(),nbr,0) == -1)
-      {
-        td->buffer->setLength(0);
-        if(Server::getInstance()->getVerbosity() > 2)
+      if (con->sock.send (td->buffer->getBuffer (), nbr, 0) == -1)
         {
-          *td->buffer << "FastCGI: Error sending data" << '\0';
-          td->connection->host->warningsLogWrite(td->buffer->getBuffer());
+          td->buffer->setLength(0);
+          td->connection->host->warningsLogWrite (_("FastCGI: internal error"));
+          return 1;
         }
-        return 1;
-      }
-    }while(nbr == maxStdinChunk);
+    }
+    while (nbr == maxStdinChunk);
   }
 
   /*! Final stdin chunk.  */
-  if(sendFcgiBody(con, 0, 0, FCGISTDIN, id))
-  {
-    td->buffer->setLength(0);
-    if(Server::getInstance()->getVerbosity() > 2)
+  if (sendFcgiBody (con, 0, 0, FCGISTDIN, id))
     {
-      *td->buffer << "FastCGI: Error sending POST data" << '\0';
-      td->connection->host->warningsLogWrite(td->buffer->getBuffer());
-
+      td->buffer->setLength(0);
+      td->connection->host->warningsLogWrite (_("FastCGI: internal error"));
+      return 1;
     }
-    return 1;
-  }
 
   return 0;
 }
@@ -709,7 +668,7 @@ int FastCgi::fastCgiRequest (FcgiContext* con, int id)
  *\param onlyHeader Send only the HTTP header.
  *\return 0 on success.
  */
-int FastCgi::sendData (FcgiContext* con, u_long dim, u_long timeout, FiltersChain* chain, 
+int FastCgi::sendData (FcgiContext* con, u_long dim, u_long timeout, FiltersChain* chain,
                        bool *responseCompleted, int onlyHeader)
 {
   u_long dataRead = 0;
@@ -729,7 +688,7 @@ int FastCgi::sendData (FcgiContext* con, u_long dim, u_long timeout, FiltersChai
 
     u_long nbr = con->sock.recv (td->buffer->getBuffer () + td->buffer->getLength (),
                                  std::min ((u_long)td->buffer->getRealLength (),
-                                           dim - td->buffer->getLength ()), 
+                                           dim - td->buffer->getLength ()),
                                  0, timeout);
     if (nbr == (u_long)-1 || nbr == 0)
     {
@@ -749,7 +708,7 @@ int FastCgi::sendData (FcgiContext* con, u_long dim, u_long timeout, FiltersChai
   if (onlyHeader || con->td->response.getStatusType () != HttpResponseHeader::SUCCESSFUL)
     return 0;
 
-  if(HttpDataHandler::appendDataToHTTPChannel(con->td, 
+  if(HttpDataHandler::appendDataToHTTPChannel(con->td,
                                               con->td->buffer->getBuffer (),
                                               con->td->buffer->getLength (),
                                               &(con->td->outputData),
@@ -757,7 +716,7 @@ int FastCgi::sendData (FcgiContext* con, u_long dim, u_long timeout, FiltersChai
                                               con->td->appendOutputs,
                                               con->useChunks))
     return 1;
-  
+
   con->td->sentData += con->td->buffer->getLength ();
 
   return 0;
@@ -787,7 +746,7 @@ int FastCgi::handleHeader (FcgiContext* con, FiltersChain* chain, bool* response
   }
 
   HttpHeaders::buildHTTPResponseHeaderStruct(con->td->buffer->getBuffer(),
-                                             &con->td->response, 
+                                             &con->td->response,
                                              &(con->td->nBytesToRead));
 
   if(!con->td->appendOutputs)
@@ -808,18 +767,18 @@ int FastCgi::handleHeader (FcgiContext* con, FiltersChain* chain, bool* response
     {
       *responseCompleted = true;
       return 1;
-    }  
+    }
 
   }
-  
+
   con->headerSent = true;
 
   /* Flush the buffer if remaining data is present.  */
-  if (con->td->response.getStatusType () == HttpResponseHeader::SUCCESSFUL && 
+  if (con->td->response.getStatusType () == HttpResponseHeader::SUCCESSFUL &&
       size - headerSize)
   {
-    if(HttpDataHandler::appendDataToHTTPChannel(con->td, 
-                                                con->td->buffer->getBuffer() + headerSize, 
+    if(HttpDataHandler::appendDataToHTTPChannel(con->td,
+                                                con->td->buffer->getBuffer() + headerSize,
                                                 size - headerSize,
                                                 &(con->td->outputData),
                                                 chain,
@@ -854,16 +813,14 @@ int FastCgi::readHeader (FcgiContext *con, FcgiHeader* header, u_long started, u
     u_long ticks = getTicks ();
 
     if (ticks - started > timeout)
-    {
-      td->buffer->setLength(0);
-      *td->buffer << "FastCGI: server timeout" << '\0';
-      td->connection->host->warningsLogWrite(td->buffer->getBuffer());
-      sendFcgiBody(con, 0, 0, FCGIABORT_REQUEST, id);
-      return 1;
-    }
+      {
+        td->connection->host->warningsLogWrite (_("FastCGI: server timeout"));
+        sendFcgiBody (con, 0, 0, FCGIABORT_REQUEST, id);
+        return 1;
+      }
 
-    nbr = con->sock.recv(buffer + readData, sizeof(FcgiHeader) - readData, 0, 
-                         timeout - (ticks - started));
+    nbr = con->sock.recv (buffer + readData, sizeof(FcgiHeader) - readData, 0,
+                          timeout - (ticks - started));
 
     if (nbr == static_cast<u_long>(-1) || nbr == 0)
       return 1;
@@ -875,9 +832,7 @@ int FastCgi::readHeader (FcgiContext *con, FcgiHeader* header, u_long started, u
 
     if (readData > sizeof (FcgiHeader))
     {
-      td->buffer->setLength(0);
-      *td->buffer << "FastCGI: Error reading data" << '\0';
-      td->connection->host->warningsLogWrite(td->buffer->getBuffer());
+      td->connection->host->warningsLogWrite (_("FastCGI: internal error"));
       sendFcgiBody(con, 0, 0, FCGIABORT_REQUEST, id);
       return 1;
     }
diff --git a/myserver/src/http_handler/http_dir/http_dir.cpp b/myserver/src/http_handler/http_dir/http_dir.cpp
index 9d2d919..5c12254 100644
--- a/myserver/src/http_handler/http_dir/http_dir.cpp
+++ b/myserver/src/http_handler/http_dir/http_dir.cpp
@@ -6,7 +6,7 @@ it under the terms of the GNU General Public License as published by
 the Free Software Foundation; either version 3 of the License, or
 (at your option) any later version.
 
-This program is distributed in the hope that it will be useful, 
+This program is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 GNU General Public License for more details.
@@ -23,7 +23,7 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #include <include/filter/filters_chain.h>
 #include <include/base/file/files_utility.h>
 
-extern "C" 
+extern "C"
 {
 #include <errno.h>
 
@@ -36,8 +36,6 @@ extern "C"
 
 #include <include/base/find_data/find_data.h>
 #include <include/base/string/stringutils.h>
-#ifndef WIN32
-#endif
 
 #include <string>
 #include <sstream>
@@ -132,7 +130,7 @@ double HttpDir::formatBytes (u_long bytes, u_int power)
 /*!
  * Fullfill the string out with a formatted representation for bytes.
  * \param bytes Size to format.
- * \param out Out string. 
+ * \param out Out string.
  */
 void HttpDir::getFormattedSize (u_long bytes, string & out)
 {
@@ -159,7 +157,7 @@ void HttpDir::getFormattedSize (u_long bytes, string & out)
     osstr << std::fixed << setprecision(0) << result << " " << symbols[i];
   else
     osstr << std::fixed << setprecision(2) << result << " " << symbols[i];
-  
+
   out = osstr.str();
 }
 
@@ -221,8 +219,8 @@ void HttpDir::generateHeader (MemBuf &out, char sortType, bool sortReverse,
  * \param linkPrefix Prefix to use for the generated links.
  * \param formatString Specify which element show.
  */
-void HttpDir::generateElement (MemBuf &out, 
-                               FileStruct &file, 
+void HttpDir::generateElement (MemBuf &out,
+                               FileStruct &file,
                                string &linkPrefix,
                                const char *formatString)
 {
@@ -232,7 +230,7 @@ void HttpDir::generateElement (MemBuf &out,
   formatHtml (file.name, name);
 
   out << "<tr>\r\n";
-  
+
   const char* cur = formatString;
 
   for (;;)
@@ -291,7 +289,7 @@ void HttpDir::generateElement (MemBuf &out,
  * \param onlyHeader Specify if send only the HTTP header.
 */
 int HttpDir::send(HttpThreadContext* td,
-                  const char* directory, const char* cgi, 
+                  const char* directory, const char* cgi,
                   bool execute, bool onlyHeader)
 {
   u_long nbw;
@@ -310,7 +308,7 @@ int HttpDir::send(HttpThreadContext* td,
   char sortType = 0;
   bool sortReverse = false;
   string linkPrefix;
-  const char *formatString = td->securityToken.getHashedData ("http.dir.format", 
+  const char *formatString = td->securityToken.getHashedData ("http.dir.format",
                                                               MYSERVER_SECURITY_CONF |
                                                               MYSERVER_VHOST_CONF |
                                                               MYSERVER_SERVER_CONF, "%f%t%s");
@@ -326,12 +324,12 @@ int HttpDir::send(HttpThreadContext* td,
   if ( !(td->permissions & MYSERVER_PERMISSION_BROWSE))
     return td->http->sendAuth ();
 
-  if(td->mime && Server::getInstance()->getFiltersFactory()->chain(&chain, 
-                                                        td->mime->filters, 
+  if(td->mime && Server::getInstance()->getFiltersFactory()->chain(&chain,
+                                                        td->mime->filters,
                                              td->connection->socket, &nbw, 1))
   {
-    td->connection->host->warningsLogWrite("HttpDir: Error loading filters");
-    chain.clearAllFilters(); 
+    td->connection->host->warningsLogWrite (_("HttpDir: internal error"));
+    chain.clearAllFilters();
     return td->http->raiseHTTPError(500);
   }
 
@@ -344,17 +342,17 @@ int HttpDir::send(HttpThreadContext* td,
   if(!td->appendOutputs)
   {
 
-    HttpHeaders::buildHTTPResponseHeader(td->buffer->getBuffer(), 
+    HttpHeaders::buildHTTPResponseHeader(td->buffer->getBuffer(),
                                          &(td->response));
 
-    if(td->connection->socket->send(td->buffer->getBuffer(), 
-                       (u_long)strlen(td->buffer->getBuffer()), 0) 
+    if(td->connection->socket->send(td->buffer->getBuffer(),
+                       (u_long)strlen(td->buffer->getBuffer()), 0)
        == SOCKET_ERROR)
     {
       /* Remove the connection.  */
       return 0;
-    }  
-  }    
+    }
+  }
 
   if(onlyHeader)
     return 1;
@@ -401,17 +399,17 @@ int HttpDir::send(HttpThreadContext* td,
   *td->secondaryBuffer << "</title>\r\n";
 
   /*
-   *If it is defined a CSS file for the graphic layout of 
-   *the browse directory insert it in the page.  
+   *If it is defined a CSS file for the graphic layout of
+   *the browse directory insert it in the page.
    */
   if(browseDirCSSpath)
   {
     *td->secondaryBuffer << "<link rel=\"stylesheet\" href=\""
-                 << browseDirCSSpath 
+                 << browseDirCSSpath
                  << "\" type=\"text/css\" media=\"all\"/>\r\n";
   }
 
-  *td->secondaryBuffer << "</head>\r\n"; 
+  *td->secondaryBuffer << "</head>\r\n";
 
   ret = appendDataToHTTPChannel(td, td->secondaryBuffer->getBuffer(),
                                 td->secondaryBuffer->getLength(),
@@ -421,12 +419,12 @@ int HttpDir::send(HttpThreadContext* td,
   {
     /* Return an internal server error. */
     td->outputData.close();
-    chain.clearAllFilters(); 
+    chain.clearAllFilters();
     return td->http->raiseHTTPError(500);
   }
 
   sentData = td->secondaryBuffer->getLength();
-              
+
   filename = directory;
   td->secondaryBuffer->setLength(0);
   *td->secondaryBuffer << "<body>\r\n<h1>Contents of directory ";
@@ -450,7 +448,7 @@ int HttpDir::send(HttpThreadContext* td,
 
   if(ret == -1)
   {
-    chain.clearAllFilters(); 
+    chain.clearAllFilters();
     return td->http->raiseHTTPError(404);
   }
 
@@ -471,7 +469,7 @@ int HttpDir::send(HttpThreadContext* td,
   if(ret)
   {
     td->outputData.close();
-    chain.clearAllFilters(); 
+    chain.clearAllFilters();
     /* Return an internal server error.  */
     return td->http->raiseHTTPError(500);
   }
@@ -486,14 +484,14 @@ int HttpDir::send(HttpThreadContext* td,
     string file;
     file.assign(td->request.uri);
     file.append("/../");
-    
+
     *td->secondaryBuffer << "<tr>\r\n";
 
     for (;;)
     {
       while (*cur && ((*cur == '%' ) || (*cur == ' ' )))
         cur++;
-      
+
       if (!(*cur))
         break;
 
@@ -509,7 +507,7 @@ int HttpDir::send(HttpThreadContext* td,
     }
 
     *td->secondaryBuffer << "</tr>\r\n";
-    
+
     ret = appendDataToHTTPChannel(td, td->secondaryBuffer->getBuffer(),
                                   td->secondaryBuffer->getLength(),
                                   &(td->outputData), &chain,
@@ -518,7 +516,7 @@ int HttpDir::send(HttpThreadContext* td,
     {
       fd.findclose();
       td->outputData.close();
-      chain.clearAllFilters(); 
+      chain.clearAllFilters();
       /* Return an internal server error.  */
       return td->http->raiseHTTPError(500);
     }
@@ -570,7 +568,7 @@ int HttpDir::send(HttpThreadContext* td,
   /* Build the files table and send it.  */
   for(vector<FileStruct>::iterator it = files.begin();
       it != files.end(); it++)
-  {  
+  {
     FileStruct& file = *it;
 
     td->secondaryBuffer->setLength(0);
@@ -584,7 +582,7 @@ int HttpDir::send(HttpThreadContext* td,
     if(ret)
     {
       td->outputData.close();
-      chain.clearAllFilters(); 
+      chain.clearAllFilters();
       /* Return an internal server error.  */
       return td->http->raiseHTTPError(500);
     }
@@ -596,9 +594,9 @@ int HttpDir::send(HttpThreadContext* td,
   td->secondaryBuffer->setLength(0);
   *td->secondaryBuffer << "</table>\r\n<hr />\r\n<address>"
                << MYSERVER_VERSION;
-              
+
   if(host && host->value->length())
-  {    
+  {
     ostringstream portBuff;
     size_t portSeparator = host->value->find(':');
     *td->secondaryBuffer << " on ";
@@ -606,7 +604,7 @@ int HttpDir::send(HttpThreadContext* td,
       *td->secondaryBuffer << host->value->substr(0, portSeparator).c_str() ;
     else
       *td->secondaryBuffer << host->value->c_str() ;
-    
+
     *td->secondaryBuffer << " Port ";
     portBuff << td->connection->getLocalPort();
     *td->secondaryBuffer << portBuff.str();
@@ -622,7 +620,7 @@ int HttpDir::send(HttpThreadContext* td,
     td->outputData.close();
     /* Return an internal server error.  */
     return td->http->raiseHTTPError(500);
-  }  
+  }
   sentData += td->secondaryBuffer->getLength();
 
   *td->secondaryBuffer << end_str;
@@ -638,10 +636,10 @@ int HttpDir::send(HttpThreadContext* td,
       return 1;
   }
 
-  /* For logging activity.  */  
+  /* For logging activity.  */
   td->sentData += sentData;
 
-  chain.clearAllFilters(); 
+  chain.clearAllFilters();
   return 1;
 
 }
@@ -661,13 +659,13 @@ void HttpDir::formatHtml(string& in, string& out)
    */
   for(pos = 0; out[pos] != '\0'; pos++)
   {
-    if(((u_char)out[pos] >= 32 && 
+    if(((u_char)out[pos] >= 32 &&
         (u_char)out[pos] <= 65)   ||
-       ((u_char)out[pos] >= 91 && 
+       ((u_char)out[pos] >= 91 &&
         (u_char)out[pos] <= 96)   ||
-       ((u_char)out[pos] >= 123 && 
+       ((u_char)out[pos] >= 123 &&
         (u_char)out[pos] <= 126) ||
-       ((u_char)out[pos] >= 160 && 
+       ((u_char)out[pos] >= 160 &&
         (u_char)out[pos] < 255))
     {
       ostringstream os;
diff --git a/myserver/src/http_handler/http_file/http_file.cpp b/myserver/src/http_handler/http_file/http_file.cpp
index 631f180..ae8856b 100644
--- a/myserver/src/http_handler/http_file/http_file.cpp
+++ b/myserver/src/http_handler/http_file/http_file.cpp
@@ -622,22 +622,14 @@ int HttpFile::send (HttpThreadContext* td,
     file->close ();
     delete file;
   }
-  catch (bad_alloc &ba)
-    {
-      file->close ();
-      delete file;
-      td->connection->host->warningsLogWrite ("HttpFile: Error allocating memory");
-      chain.clearAllFilters ();
-      return td->http->raiseHTTPError (500);
-    }
   catch (...)
     {
       file->close ();
       delete file;
-      td->connection->host->warningsLogWrite ("HttpFile: Internal error");
+      td->connection->host->warningsLogWrite (_("HttpFile: internal error"));
       chain.clearAllFilters ();
       return td->http->raiseHTTPError (500);
-    };
+    }
 
   /* For logging activity.  */
   td->sentData += dataSent;
diff --git a/myserver/src/http_handler/isapi/isapi.cpp b/myserver/src/http_handler/isapi/isapi.cpp
index 349840d..3ff1119 100644
--- a/myserver/src/http_handler/isapi/isapi.cpp
+++ b/myserver/src/http_handler/isapi/isapi.cpp
@@ -15,7 +15,7 @@ You should have received a copy of the GNU General Public License
 along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
 
- 
+
 #include <include/http_handler/isapi/isapi.h>
 #include <include/protocol/http/http.h>
 #include <include/server/server.h>
@@ -39,25 +39,25 @@ ConnTableRecord *Isapi::connTable = 0;
 
 
 BOOL WINAPI ISAPI_ServerSupportFunctionExport(HCONN hConn, DWORD dwHSERRequest,
-                                              LPVOID lpvBuffer, LPDWORD lpdwSize, 
-                                              LPDWORD lpdwDataType) 
+                                              LPVOID lpvBuffer, LPDWORD lpdwSize,
+                                              LPDWORD lpdwDataType)
 {
   string tmp;
   ConnTableRecord *ConnInfo;
   int ret;
-  char *buffer = 0;  
-  char uri[MAX_PATH];/*! Under windows use MAX_PATH. */  
+  char *buffer = 0;
+  char uri[MAX_PATH];/*! Under windows use MAX_PATH. */
   Isapi::isapiMutex->lock();
   ConnInfo = Isapi::HConnRecord(hConn);
   Isapi::isapiMutex->unlock();
-  if (ConnInfo == NULL) 
-  {
-    Server::getInstance()->logWriteln("isapi::ServerSupportFunctionExport: invalid hConn");
-    return 0;
-  }
+  if (ConnInfo == NULL)
+    {
+      Server::getInstance()->logWriteln("isapi::ServerSupportFunctionExport: invalid hConn");
+      return 0;
+    }
 
-  switch (dwHSERRequest) 
-  {
+  switch (dwHSERRequest)
+    {
     case HSE_REQ_MAP_URL_TO_PATH_EX:
       HSE_URL_MAPEX_INFO  *mapInfo;
       mapInfo=(HSE_URL_MAPEX_INFO*)lpdwDataType;
@@ -66,20 +66,20 @@ BOOL WINAPI ISAPI_ServerSupportFunctionExport(HCONN hConn, DWORD dwHSERRequest,
       ret=ConnInfo->td->http->getPath(tmp,(char*)lpvBuffer, 0);
       if(ret != 200)
         return 1;
-      
+
       mapInfo->cchMatchingURL=(DWORD)strlen((char*)lpvBuffer);
       mapInfo->cchMatchingPath=(DWORD)strlen(mapInfo->lpszPath);
       delete [] mapInfo->lpszPath;
       mapInfo->lpszPath = new char[tmp.length() + 1];
       if(mapInfo->lpszPath == 0)
         if(buffer==0)
-        {
-          SetLastError(ERROR_INSUFFICIENT_BUFFER);
-          return 0;            
-        }
+          {
+            SetLastError(ERROR_INSUFFICIENT_BUFFER);
+            return 0;
+          }
       strcpy(mapInfo->lpszPath, tmp.c_str());
-      mapInfo->dwFlags = HSE_URL_FLAGS_WRITE | HSE_URL_FLAGS_SCRIPT 
-                                             | HSE_URL_FLAGS_EXECUTE;
+      mapInfo->dwFlags = HSE_URL_FLAGS_WRITE | HSE_URL_FLAGS_SCRIPT
+        | HSE_URL_FLAGS_EXECUTE;
       break;
     case HSE_REQ_MAP_URL_TO_PATH:
       if(((char*)lpvBuffer)[0])
@@ -89,78 +89,76 @@ BOOL WINAPI ISAPI_ServerSupportFunctionExport(HCONN hConn, DWORD dwHSERRequest,
                  (int)ConnInfo->td->request.uri.length()-ConnInfo->td->pathInfo.length() +1);
       ret = ConnInfo->td->http->getPath(tmp ,uri,0);
       if(ret!=200)
-      {
-        if(buffer)
-          delete [] buffer;
-        return 1;
-      }
-      
+        {
+          if(buffer)
+            delete [] buffer;
+          return 1;
+        }
+
       if(tmp.length() >= *lpdwSize)
-      {
-        SetLastError(ERROR_INSUFFICIENT_BUFFER);
-        return 0;
-      }    
+        {
+          SetLastError(ERROR_INSUFFICIENT_BUFFER);
+          return 0;
+        }
       strcpy((char*)lpvBuffer, tmp.c_str());
       if(FilesUtility::completePath((char**)&lpvBuffer,(int*)lpdwSize,  1))
-      {
-        SetLastError(ERROR_INSUFFICIENT_BUFFER);
-        return 0;
-      }
+        {
+          SetLastError(ERROR_INSUFFICIENT_BUFFER);
+          return 0;
+        }
       *lpdwSize=(DWORD)strlen((char*)lpvBuffer);
       break;
-  case HSE_REQ_SEND_URL_REDIRECT_RESP:
-    return ((Isapi*)ConnInfo->isapi)->Redirect(ConnInfo->td,
-                              ConnInfo->connection,(char *)lpvBuffer);
-    break;
-  case HSE_REQ_SEND_URL:
-    return ((Isapi*)ConnInfo->isapi)->Senduri(ConnInfo->td,
-                                           ConnInfo->connection,(char *)lpvBuffer);
-    break;
-  case HSE_REQ_SEND_RESPONSE_HEADER:
-    return ((Isapi*)ConnInfo->isapi)->SendHeader(ConnInfo->td,
-                                           ConnInfo->connection,(char *)lpvBuffer);
-    break;
-  case HSE_REQ_DONE_WITH_SESSION:
-    ConnInfo->td->response.httpStatus=*(DWORD*)lpvBuffer;
-    SetEvent(ConnInfo->ISAPIDoneEvent);
-    break;
-  case HSE_REQ_IS_KEEP_CONN:
-    if(ConnInfo->td->request.isKeepAlive())
-      *((BOOL*)lpvBuffer)=1;
-    else
-      *((BOOL*)lpvBuffer)=0;
-    break;
-  default:
-    return 0;
-  }
+    case HSE_REQ_SEND_URL_REDIRECT_RESP:
+      return ((Isapi*)ConnInfo->isapi)->Redirect(ConnInfo->td,
+                                                 ConnInfo->connection,(char *)lpvBuffer);
+      break;
+    case HSE_REQ_SEND_URL:
+      return ((Isapi*)ConnInfo->isapi)->Senduri(ConnInfo->td,
+                                                ConnInfo->connection,(char *)lpvBuffer);
+      break;
+    case HSE_REQ_SEND_RESPONSE_HEADER:
+      return ((Isapi*)ConnInfo->isapi)->SendHeader(ConnInfo->td,
+                                                   ConnInfo->connection,(char *)lpvBuffer);
+      break;
+    case HSE_REQ_DONE_WITH_SESSION:
+      ConnInfo->td->response.httpStatus=*(DWORD*)lpvBuffer;
+      SetEvent(ConnInfo->ISAPIDoneEvent);
+      break;
+    case HSE_REQ_IS_KEEP_CONN:
+      if(ConnInfo->td->request.isKeepAlive())
+        *((BOOL*)lpvBuffer)=1;
+      else
+        *((BOOL*)lpvBuffer)=0;
+      break;
+    default:
+      return 0;
+    }
   return 1;
 }
 
 /*!
- *Add a connection to the table.
+ * Add a connection to the table.
  */
-ConnTableRecord *Isapi::HConnRecord(HCONN hConn) 
+ConnTableRecord *Isapi::HConnRecord (HCONN hConn)
 {
   u_long connIndex;
 
   connIndex =((u_long) hConn) - 1;
   ConnTableRecord *ConnInfo;
-  if ((connIndex < 0) || (connIndex >= maxConnections)) 
-  {
+  if ((connIndex < 0) || (connIndex >= maxConnections))
     return NULL;
-  }
+
   ConnInfo = &(connTable[connIndex]);
-  if (ConnInfo->Allocated == 0) 
-  {
+  if (ConnInfo->Allocated == 0)
     return NULL;
-  }
+
   return ConnInfo;
 }
 
 /*!
  *Send an HTTP redirect.
  */
-int Isapi::Redirect(HttpThreadContext* td, ConnectionPtr a, char *URL) 
+int Isapi::Redirect(HttpThreadContext* td, ConnectionPtr a, char *URL)
 {
   return td->http->sendHTTPRedirect(URL);
 }
@@ -181,7 +179,7 @@ int Isapi::Senduri(HttpThreadContext* td, ConnectionPtr a, char *URL)
 int Isapi::SendHeader(HttpThreadContext* td,ConnectionPtr a,char *data)
 {
   HttpHeaders::buildHTTPResponseHeaderStruct(data,
-                                             &td->response, 
+                                             &td->response,
                                              &(td->nBytesToRead));
   return 1;
 }
@@ -189,7 +187,7 @@ int Isapi::SendHeader(HttpThreadContext* td,ConnectionPtr a,char *data)
 /*!
  *Write directly to the output.
  */
-BOOL WINAPI ISAPI_WriteClientExport(HCONN hConn, LPVOID Buffer, LPDWORD lpdwBytes, 
+BOOL WINAPI ISAPI_WriteClientExport(HCONN hConn, LPVOID Buffer, LPDWORD lpdwBytes,
                                     DWORD /*!dwReserved*/)
 {
   int keepalive;
@@ -200,20 +198,19 @@ BOOL WINAPI ISAPI_WriteClientExport(HCONN hConn, LPVOID Buffer, LPDWORD lpdwByte
 
   if(*lpdwBytes == 0)
     return 1;
-  
+
   Isapi::isapiMutex->lock();
   ConnInfo = Isapi::HConnRecord(hConn);
   Isapi::isapiMutex->unlock();
-  
+
   if(ConnInfo == NULL)
     return 1;
   buffer=(char*)ConnInfo->td->buffer->getBuffer();
   HttpRequestHeader::Entry *connection = ConnInfo->td->request.other.get("Connection");
 
-  if (ConnInfo == NULL) 
+  if (ConnInfo == NULL)
   {
-    ((Vhost*)(ConnInfo->td->connection->host))->warningsLogWrite(
-                                        "ISAPI: WriteClientExport: invalid hConn");
+    ((Vhost*)(ConnInfo->td->connection->host))->warningsLogWrite(_("ISAPI: internal error"));
     return 0;
   }
   keepalive =connection && (!stringcmpi(connection->value->c_str(), "keep-alive")) ;
@@ -253,7 +250,7 @@ BOOL WINAPI ISAPI_WriteClientExport(HCONN hConn, LPVOID Buffer, LPDWORD lpdwByte
           }
         }
       }
-    } 
+    }
     /*!
      *Handle the HTTP header if exists.
      */
@@ -262,7 +259,7 @@ BOOL WINAPI ISAPI_WriteClientExport(HCONN hConn, LPVOID Buffer, LPDWORD lpdwByte
       int len = ConnInfo->headerSize-headerSize;
 
       HttpHeaders::buildHTTPResponseHeaderStruct(ConnInfo->td->buffer->getBuffer(),
-                                                 &ConnInfo->td->response, 
+                                                 &ConnInfo->td->response,
                                                  &(ConnInfo->td->nBytesToRead));
 
 
@@ -284,17 +281,17 @@ BOOL WINAPI ISAPI_WriteClientExport(HCONN hConn, LPVOID Buffer, LPDWORD lpdwByte
         }
         else
           ConnInfo->td->response.connection.assign("Close");
-        
+
         u_long hdrLen = HttpHeaders::buildHTTPResponseHeader ((char*)ConnInfo->td->secondaryBuffer->getBuffer(),
                                                               &(ConnInfo->td->response));
-  
+
         if(ConnInfo->connection->socket->send(
                      (char*)ConnInfo->td->secondaryBuffer->getBuffer(), hdrLen, 0)==-1)
           return 0;
       }
       /*! Save the headerSent status. */
       ConnInfo->headerSent=1;
-      
+
       /*! If only the header was requested return. */
       if(ConnInfo->headerSent && ConnInfo->onlyHeader || ConnInfo->td->response.getStatusType () == HttpResponseHeader::SUCCESSFUL)
         return 0;
@@ -310,7 +307,7 @@ BOOL WINAPI ISAPI_WriteClientExport(HCONN hConn, LPVOID Buffer, LPDWORD lpdwByte
                                                  (int)strlen(chunkSize), &nbw))
             return 0;
         }
-        
+
         if(ConnInfo->td->appendOutputs)
         {
           if(ConnInfo->td->outputData.writeToFile((char*)(buffer + headerSize),
@@ -344,7 +341,7 @@ BOOL WINAPI ISAPI_WriteClientExport(HCONN hConn, LPVOID Buffer, LPDWORD lpdwByte
     if(keepalive  && (!ConnInfo->td->appendOutputs))
     {
       sprintf (chunkSize, "%x\r\n", *lpdwBytes);
-      nbw = ConnInfo->connection->socket->send (chunkSize, 
+      nbw = ConnInfo->connection->socket->send (chunkSize,
                                                 (int)strlen(chunkSize), 0);
       if((nbw == (u_long)-1) || (!nbw))
         return 0;
@@ -381,30 +378,29 @@ BOOL WINAPI ISAPI_WriteClientExport(HCONN hConn, LPVOID Buffer, LPDWORD lpdwByte
 /*!
  *Read directly from the client.
  */
-BOOL WINAPI ISAPI_ReadClientExport(HCONN hConn, LPVOID lpvBuffer, 
-                                   LPDWORD lpdwSize ) 
+BOOL WINAPI ISAPI_ReadClientExport(HCONN hConn, LPVOID lpvBuffer,
+                                   LPDWORD lpdwSize )
 {
   ConnTableRecord *ConnInfo;
   u_long NumRead;
-  
+
   Isapi::isapiMutex->lock();
   ConnInfo = Isapi::HConnRecord(hConn);
   Isapi::isapiMutex->unlock();
-  if (ConnInfo == NULL) 
+  if (ConnInfo == NULL)
   {
-    ((Vhost*)(ConnInfo->td->connection->host))->warningsLogWrite(
-                                    "ISAPI: ReadClientExport: invalid hConn");
+    ((Vhost*)(ConnInfo->td->connection->host))->warningsLogWrite(_("ISAPI: internal error"));
     return 0;
   }
 
   ConnInfo->td->inputData.read((char*)lpvBuffer, *lpdwSize, &NumRead);
 
-  if (NumRead == -1) 
+  if (NumRead == -1)
   {
     *lpdwSize = 0;
     return 0;
   }
-  else 
+  else
   {
     *lpdwSize = (DWORD)NumRead;
     return 1;
@@ -414,36 +410,36 @@ BOOL WINAPI ISAPI_ReadClientExport(HCONN hConn, LPVOID lpvBuffer,
 /*!
  *Get server environment variable.
  */
-BOOL WINAPI ISAPI_GetServerVariableExport(HCONN hConn, 
-                                          LPSTR lpszVariableName, 
-                                          LPVOID lpvBuffer, 
-                                          LPDWORD lpdwSize) 
+BOOL WINAPI ISAPI_GetServerVariableExport(HCONN hConn,
+                                          LPSTR lpszVariableName,
+                                          LPVOID lpvBuffer,
+                                          LPDWORD lpdwSize)
 {
   ConnTableRecord *ConnInfo;
   BOOL ret =1;
   Isapi::isapiMutex->lock();
   ConnInfo = Isapi::HConnRecord(hConn);
   Isapi::isapiMutex->unlock();
-  if (ConnInfo == NULL) 
+  if (ConnInfo == NULL)
   {
     Server::getInstance()->logWriteln(
                        "Isapi::GetServerVariableExport: invalid hConn");
     return 0;
   }
 
-  if (!strcmp(lpszVariableName, "ALL_HTTP")) 
+  if (!strcmp(lpszVariableName, "ALL_HTTP"))
   {
 
         if(Isapi::buildAllHttpHeaders(ConnInfo->td,ConnInfo->connection, lpvBuffer, lpdwSize))
       ret=1;
-    
+
         else
     {
       SetLastError(ERROR_INSUFFICIENT_BUFFER);
       ret=0;
     }
-      
-  }else if(!strcmp(lpszVariableName, "ALL_RAW")) 
+
+  }else if(!strcmp(lpszVariableName, "ALL_RAW"))
   {
     if(Isapi::buildAllRawHeaders(ConnInfo->td,ConnInfo->connection,
                                  lpvBuffer, lpdwSize))
@@ -453,12 +449,12 @@ BOOL WINAPI ISAPI_GetServerVariableExport(HCONN hConn,
       SetLastError(ERROR_INSUFFICIENT_BUFFER);
       ret = 0;
     }
-      
+
   }
   else
   {
     /*!
-     *find in ConnInfo->envString the value lpszVariableName 
+     *find in ConnInfo->envString the value lpszVariableName
      *and copy next string in lpvBuffer.
      */
     char *localEnv;
@@ -471,7 +467,7 @@ BOOL WINAPI ISAPI_GetServerVariableExport(HCONN hConn,
       if(((localEnv[i + variableNameLen]) == '=') &&
          (!strncmp(&localEnv[i], lpszVariableName, variableNameLen)))
       {
-        strncpy((char*)lpvBuffer, &localEnv[i + variableNameLen + 1], 
+        strncpy((char*)lpvBuffer, &localEnv[i + variableNameLen + 1],
                 *lpdwSize);
         break;
       }
@@ -500,16 +496,16 @@ BOOL Isapi::buildAllHttpHeaders(HttpThreadContext* td, ConnectionPtr /*!a*/,
   if(accept && accept->value->length() && (valLen+30<maxLen))
     valLen += sprintf(&ValStr[valLen],"HTTP_ACCEPT:%s\n",
                     accept->value->c_str());
-  else if(valLen + 30 < maxLen) 
+  else if(valLen + 30 < maxLen)
     return 0;
 
   if(cache && cache->value->length() && (valLen+30<maxLen))
-    valLen += sprintf(&ValStr[valLen], "HTTP_CACHE_CONTROL:%s\n", 
+    valLen += sprintf(&ValStr[valLen], "HTTP_CACHE_CONTROL:%s\n",
                     cache->value->c_str());
-  else if(valLen + 30 < maxLen) 
+  else if(valLen + 30 < maxLen)
     return 0;
 
-  if((td->request.rangeByteBegin || td->request.rangeByteEnd) && 
+  if((td->request.rangeByteBegin || td->request.rangeByteEnd) &&
      (valLen + 30 < maxLen))
   {
     ostringstream rangeBuffer;
@@ -522,7 +518,7 @@ BOOL Isapi::buildAllHttpHeaders(HttpThreadContext* td, ConnectionPtr /*!a*/,
     if(td->request.rangeByteEnd)
     {
       rangeBuffer << td->request.rangeByteEnd;
-     }   
+     }
     valLen += sprintf(&ValStr[valLen], "%s\n", rangeBuffer.str().c_str());
   }
 
@@ -531,7 +527,7 @@ BOOL Isapi::buildAllHttpHeaders(HttpThreadContext* td, ConnectionPtr /*!a*/,
     if(e && (valLen + 30 < maxLen))
       valLen += sprintf(&ValStr[valLen], "HTTP_ACCEPT_ENCODING:%s\n",
                         e->value->c_str());
-    else if(valLen + 30 < maxLen) 
+    else if(valLen + 30 < maxLen)
       return 0;
   }
 
@@ -541,7 +537,7 @@ BOOL Isapi::buildAllHttpHeaders(HttpThreadContext* td, ConnectionPtr /*!a*/,
     if(e && (valLen + 30 < maxLen))
       valLen += sprintf(&ValStr[valLen],"HTTP_ACCEPT_LANGUAGE:%s\n",
                       e->value->c_str());
-    else if(valLen + 30 < maxLen) 
+    else if(valLen + 30 < maxLen)
       return 0;
   }
 
@@ -551,7 +547,7 @@ BOOL Isapi::buildAllHttpHeaders(HttpThreadContext* td, ConnectionPtr /*!a*/,
     if(e && (valLen + 30 < maxLen))
       valLen += sprintf(&ValStr[valLen],"HTTP_ACCEPT_CHARSET:%s\n",
                       e->value->c_str());
-    else if(valLen + 30 < maxLen) 
+    else if(valLen + 30 < maxLen)
       return 0;
   }
 
@@ -560,7 +556,7 @@ BOOL Isapi::buildAllHttpHeaders(HttpThreadContext* td, ConnectionPtr /*!a*/,
     if(e && (valLen + 30 < maxLen))
       valLen += sprintf(&ValStr[valLen],"HTTP_PRAGMA:%s\n",
                       e->value->c_str());
-    else if(valLen + 30 < maxLen) 
+    else if(valLen + 30 < maxLen)
       return 0;
   }
 
@@ -569,7 +565,7 @@ BOOL Isapi::buildAllHttpHeaders(HttpThreadContext* td, ConnectionPtr /*!a*/,
     if(e && (valLen + 30< maxLen))
       valLen += sprintf(&ValStr[valLen],"HTTP_CONNECTION:%s\n",
                       e->value->c_str());
-    else if(valLen + 30 < maxLen) 
+    else if(valLen + 30 < maxLen)
       return 0;
   }
 
@@ -578,7 +574,7 @@ BOOL Isapi::buildAllHttpHeaders(HttpThreadContext* td, ConnectionPtr /*!a*/,
     if(e && (valLen + 30 < maxLen))
       valLen += sprintf(&ValStr[valLen],"HTTP_COOKIE:%s\n",
                       e->value->c_str());
-    else if(valLen + 30 < maxLen) 
+    else if(valLen + 30 < maxLen)
       return 0;
   }
 
@@ -587,7 +583,7 @@ BOOL Isapi::buildAllHttpHeaders(HttpThreadContext* td, ConnectionPtr /*!a*/,
     if(e && (valLen + 30 < maxLen))
       valLen += sprintf(&ValStr[valLen],"HTTP_HOST:%s\n",
                       e->value->c_str());
-    else if(valLen + 30 < maxLen) 
+    else if(valLen + 30 < maxLen)
       return 0;
   }
 
@@ -596,7 +592,7 @@ BOOL Isapi::buildAllHttpHeaders(HttpThreadContext* td, ConnectionPtr /*!a*/,
     if(e && (valLen + 30 < maxLen))
       valLen += sprintf(&ValStr[valLen],"HTTP_DATE:%s\n",
                       e->value->c_str());
-    else if(valLen + 30 < maxLen) 
+    else if(valLen + 30 < maxLen)
       return 0;
   }
 
@@ -605,7 +601,7 @@ BOOL Isapi::buildAllHttpHeaders(HttpThreadContext* td, ConnectionPtr /*!a*/,
     if(e && (valLen + 30 < maxLen))
       valLen += sprintf(&ValStr[valLen],"HTTP_IF_MODIFIED_SINCE:%s\n",
                       e->value->c_str());
-    else if(valLen + 30 < maxLen) 
+    else if(valLen + 30 < maxLen)
       return 0;
   }
 
@@ -614,7 +610,7 @@ BOOL Isapi::buildAllHttpHeaders(HttpThreadContext* td, ConnectionPtr /*!a*/,
     if(e && (valLen + 30 < maxLen))
       valLen += sprintf(&ValStr[valLen],"HTTP_REFERER:%s\n",
                       e->value->c_str());
-    else if(valLen + 30 < maxLen) 
+    else if(valLen + 30 < maxLen)
       return 0;
   }
 
@@ -623,7 +619,7 @@ BOOL Isapi::buildAllHttpHeaders(HttpThreadContext* td, ConnectionPtr /*!a*/,
     if(e && (valLen + 30 < maxLen))
       valLen += sprintf(&ValStr[valLen],"HTTP_USER_AGENT:%s\n",
                       e->value->c_str());
-    else if(valLen + 30 < maxLen) 
+    else if(valLen + 30 < maxLen)
       return 0;
   }
 
@@ -632,7 +628,7 @@ BOOL Isapi::buildAllHttpHeaders(HttpThreadContext* td, ConnectionPtr /*!a*/,
     if(e && (valLen + 30 < maxLen))
       valLen += sprintf(&ValStr[valLen],"HTTP_FROM:%s\n",
                       e->value->c_str());
-    else if(valLen + 30 < maxLen) 
+    else if(valLen + 30 < maxLen)
       return 0;
   }
 
@@ -655,63 +651,63 @@ BOOL Isapi::buildAllRawHeaders(HttpThreadContext* td,ConnectionPtr a,
   if(td->pathInfo.length() && (valLen + 30 < maxLen))
     valLen += sprintf(&ValStr[valLen], "PATH_INFO:%s\n",
                       td->pathInfo.c_str());
-  else if(valLen + 30 < maxLen) 
+  else if(valLen + 30 < maxLen)
     return 0;
-  
+
   if(td->pathTranslated.length() && (valLen + 30 < maxLen))
     valLen += sprintf(&ValStr[valLen], "PATH_INFO:%s\n",
                       td->pathTranslated.c_str());
-  else if(valLen + 30 < maxLen) 
+  else if(valLen + 30 < maxLen)
     return 0;
 
   if(td->request.uriOpts[0] && (valLen + 30 < maxLen))
     valLen += sprintf(&ValStr[valLen], "QUERY_STRING:%s\n",
                       td->request.uriOpts[0]);
-  else if(valLen + 30 < maxLen) 
+  else if(valLen + 30 < maxLen)
     return 0;
 
   if(td->request.cmd[0] && (valLen + 30 < maxLen))
     valLen += sprintf(&ValStr[valLen], "REQUEST_METHOD:%s\n",
                       td->request.cmd[0]);
-  else if(valLen + 30 < maxLen) 
+  else if(valLen + 30 < maxLen)
     return 0;
 
   if(td->filenamePath.length() && (valLen + 30 < maxLen))
-    valLen += sprintf(&ValStr[valLen], "SCRIPT_FILENAME:%s\n", 
+    valLen += sprintf(&ValStr[valLen], "SCRIPT_FILENAME:%s\n",
                       td->filenamePath[0]);
-  else if(valLen + 30 < maxLen) 
+  else if(valLen + 30 < maxLen)
     return 0;
 
   if(valLen + 30 < maxLen)
-    valLen += sprintf(&ValStr[valLen], "SERVER_PORT:%u\n", 
+    valLen += sprintf(&ValStr[valLen], "SERVER_PORT:%u\n",
                       td->connection->getLocalPort());
-  else if(valLen + 30 < maxLen) 
+  else if(valLen + 30 < maxLen)
     return 0;
 
   if(valLen + 30 < maxLen)
-    valLen += sprintf(&ValStr[valLen], 
+    valLen += sprintf(&ValStr[valLen],
                       "SERVER_SIGNATURE:<address>%s</address>\n",
                       MYSERVER_VERSION);
-  else if(valLen + 30 < maxLen) 
+  else if(valLen + 30 < maxLen)
     return 0;
 
   if(td->connection->getIpAddr()[0] && valLen + 30 < maxLen)
     valLen += sprintf(&ValStr[valLen], "REMOTE_ADDR:\n",
                       td->connection->getIpAddr());
-  else if(valLen + 30 < maxLen) 
+  else if(valLen + 30 < maxLen)
     return 0;
 
   if(td->connection->getPort() && valLen + 30 < maxLen)
     valLen += sprintf(&ValStr[valLen], "REMOTE_PORT:%u\n",
                       td->connection->getPort());
-  else if(valLen + 30 < maxLen) 
+  else if(valLen + 30 < maxLen)
     return 0;
 
   if(valLen + 30 < maxLen)
-    valLen += sprintf(&ValStr[valLen], "SERVER_ADMIN:%s\n", 
+    valLen += sprintf(&ValStr[valLen], "SERVER_ADMIN:%s\n",
                       td->securityToken.getHashedData ("server.admin", MYSERVER_VHOST_CONF |
                                                        MYSERVER_SERVER_CONF, ""));
-  else if(valLen + 30 < maxLen) 
+  else if(valLen + 30 < maxLen)
     return 0;
 
   if(valLen + MAX_PATH < maxLen)
@@ -722,7 +718,7 @@ BOOL Isapi::buildAllRawHeaders(HttpThreadContext* td,ConnectionPtr a,
     valLen += (DWORD)td->request.uri.length()-td->pathInfo.length() + 1;
     valLen += (DWORD)sprintf(&ValStr[valLen],"\n");
   }
-  else if(valLen + 30 < maxLen) 
+  else if(valLen + 30 < maxLen)
     return 0;
   return 1;
 }
@@ -733,7 +729,7 @@ BOOL Isapi::buildAllRawHeaders(HttpThreadContext* td,ConnectionPtr a,
  *Main procedure to call an ISAPI module.
  */
 int Isapi::send(HttpThreadContext* td,
-                const char* scriptpath, const char *cgipath, 
+                const char* scriptpath, const char *cgipath,
                 bool execute, bool onlyHeader)
 {
 /*!
@@ -750,18 +746,18 @@ int Isapi::send(HttpThreadContext* td,
   const char *loadLib;
   int retvalue = 0;
   /*! Under windows there is MAX_PATH then we can use it. */
-  char fullpath[MAX_PATH * 2];
+  char fullpath[MAX_PATH * 2 + 5];
 
-  if(!execute)
+  if (!execute)
   {
-    if(cgipath && strlen(cgipath))
-      sprintf(fullpath, "%s \"%s\"", cgipath, td->filenamePath.c_str());
+    if (cgipath && strlen(cgipath))
+      sprintf (fullpath, "%s \"%s\"", cgipath, td->filenamePath.c_str());
     else
-      sprintf(fullpath, "%s", td->filenamePath.c_str());
+      sprintf (fullpath, "%s", td->filenamePath.c_str());
   }
   else
   {
-    sprintf(fullpath, "%s", cgipath);
+    sprintf (fullpath, "%s", cgipath);
   }
 
   if (!(td->permissions & MYSERVER_PERMISSION_EXECUTE))
@@ -772,19 +768,18 @@ int Isapi::send(HttpThreadContext* td,
   EnterCriticalSection(&GetTableEntryCritSec);
   connIndex = 0;
   Isapi::isapiMutex->lock();
-  while ((connTable[connIndex].Allocated != 0) && 
-         (connIndex < maxConnections)) 
+  while ((connTable[connIndex].Allocated != 0) &&
+         (connIndex < maxConnections))
   {
     connIndex++;
   }
   Isapi::isapiMutex->unlock();
   LeaveCriticalSection(&GetTableEntryCritSec);
 
-  if (connIndex == maxConnections) 
+  if (connIndex == maxConnections)
   {
-    td->connection->host->warningsLogWrite(
-                                            "ISAPI: Error max connections");
-    return td->http->raiseHTTPError(503);
+    td->connection->host->warningsLogWrite (_("ISAPI: max connections"));
+    return td->http->raiseHTTPError (503);
   }
   if(execute)
     loadLib = scriptpath;
@@ -794,13 +789,10 @@ int Isapi::send(HttpThreadContext* td,
   Ret = appHnd.loadLibrary(loadLib);
 
   if(Ret)
-  {
-    string msg;
-    msg.assign("ISAPI: Cannot load library ");
-    msg.append(loadLib);
-    td->connection->host->warningsLogWrite(msg.c_str());
-    return td->http->raiseHTTPError(500);
-  }
+    {
+      td->connection->host->warningsLogWrite (_("ISAPI: cannot load %s"), loadLib);
+      return td->http->raiseHTTPError(500);
+    }
 
   connTable[connIndex].chain.setProtocol(td->http);
   connTable[connIndex].chain.setProtocolData(td);
@@ -808,14 +800,14 @@ int Isapi::send(HttpThreadContext* td,
   if(td->mime)
   {
     u_long nbw;
-    if(td->mime && Server::getInstance()->getFiltersFactory()->chain(
+    if(td->mime && Server::getInstance()->getFiltersFactory()->chain (
                                           &(connTable[connIndex].chain),
-                                          td->mime->filters, 
-                                          td->connection->socket, 
+                                          td->mime->filters,
+                                          td->connection->socket,
                                           &nbw, 1))
       {
-        td->connection->host->warningsLogWrite("Error loading filters");
-        connTable[connIndex].chain.clearAllFilters(); 
+        td->connection->host->warningsLogWrite (_("ISAPI: internal error"));
+        connTable[connIndex].chain.clearAllFilters();
         return td->http->raiseHTTPError(500);
       }
   }
@@ -828,76 +820,51 @@ int Isapi::send(HttpThreadContext* td,
   connTable[connIndex].dataSent = 0;
   connTable[connIndex].Allocated = 1;
   connTable[connIndex].isapi = this;
-  connTable[connIndex].ISAPIDoneEvent = CreateEvent(NULL, 1, 0, NULL);
-  
-  GetExtensionVersion = (PFN_GETEXTENSIONVERSION)appHnd.getProc("GetExtensionVersion");
+  connTable[connIndex].ISAPIDoneEvent = CreateEvent (NULL, 1, 0, NULL);
 
-  if (GetExtensionVersion == NULL) 
+  GetExtensionVersion = (PFN_GETEXTENSIONVERSION)appHnd.getProc ("GetExtensionVersion");
+
+  if (GetExtensionVersion == NULL)
   {
-    td->connection->host->warningsLogWrite(
-           "ISAPI: Failed to get pointer to GetExtensionVersion() in ISAPI application");
-    if(!appHnd.close())
-    {
-      string msg;
-      msg.assign("ISAPI: Failed to freeLibrary in ISAPI module: ");
-      msg.append(cgipath);
-      msg.append("\r\n");
-      td->connection->host->warningsLogWrite(msg.c_str());
-    }
-    connTable[connIndex].chain.clearAllFilters(); 
-    return td->http->raiseHTTPError(500);
+    td->connection->host->warningsLogWrite (_("ISAPI: internal error"));
+    appHnd.close ();
+    connTable[connIndex].chain.clearAllFilters ();
+    return td->http->raiseHTTPError (500);
   }
-  if(!GetExtensionVersion(&Ver)) 
+  if (!GetExtensionVersion (&Ver))
   {
-    td->connection->host->warningsLogWrite(
-                             "ISAPI: GetExtensionVersion() returned FALSE");
-
-    if(!appHnd.close())
-    {
-      string msg;
-      msg.assign("ISAPI: Failed to freeLibrary in ISAPI module: ");
-      msg.append(cgipath);
-      td->connection->host->warningsLogWrite(msg.c_str());
-    }
-    connTable[connIndex].chain.clearAllFilters(); 
+    td->connection->host->warningsLogWrite (_("ISAPI: internal error"));
+    appHnd.close ();
+    connTable[connIndex].chain.clearAllFilters ();
     return td->http->raiseHTTPError(500);
   }
-  if (Ver.dwExtensionVersion > MAKELONG(HSE_VERSION_MINOR, 
-                                        HSE_VERSION_MAJOR)) 
+  if (Ver.dwExtensionVersion > MAKELONG(HSE_VERSION_MINOR,
+                                        HSE_VERSION_MAJOR))
   {
-    td->connection->host->warningsLogWrite(
-                                       "ISAPI: version not supported");
-
-    if(!appHnd.close())
-    {
-      string msg;
-      msg.assign("ISAPI: Failed to freeLibrary in ISAPI module: ");
-      msg.append(cgipath);
-      td->connection->host->warningsLogWrite(msg.c_str());
-    }
-    connTable[connIndex].chain.clearAllFilters(); 
-    return td->http->raiseHTTPError(500);
+    td->connection->host->warningsLogWrite (_("ISAPI: version not supported"));
+    appHnd.close ();
+    connTable[connIndex].chain.clearAllFilters ();
+    return td->http->raiseHTTPError (500);
   }
   /*!
    *Store the environment string in the secondaryBuffer.
    */
   connTable[connIndex].envString=td->secondaryBuffer->getBuffer();
-  
+
   /*!
    *Build the environment string.
    */
   td->scriptPath.assign(scriptpath);
 
-  {
-    string tmp;
-    tmp.assign(cgipath);
-    FilesUtility::splitPath(tmp, td->cgiRoot, td->cgiFile);
-    tmp.assign(scriptpath);
-    FilesUtility::splitPath(tmp, td->scriptDir, td->scriptFile);
-  }
+  string tmp;
+  tmp.assign (cgipath);
+  FilesUtility::splitPath (tmp, td->cgiRoot, td->cgiFile);
+  tmp.assign (scriptpath);
+  FilesUtility::splitPath (tmp, td->scriptDir, td->scriptFile);
+
   connTable[connIndex].envString[0]='\0';
   Env::buildEnvironmentString(td,connTable[connIndex].envString);
-  
+
   ZeroMemory(&ExtCtrlBlk, sizeof(ExtCtrlBlk));
   ExtCtrlBlk.cbSize = sizeof(ExtCtrlBlk);
   ExtCtrlBlk.dwVersion = MAKELONG(HSE_VERSION_MINOR, HSE_VERSION_MAJOR);
@@ -919,23 +886,20 @@ int Isapi::send(HttpThreadContext* td,
   ExtCtrlBlk.cbAvailable = 0;
   ExtCtrlBlk.lpbData = 0;
   {
-    HttpRequestHeader::Entry *content = 
+    HttpRequestHeader::Entry *content =
       td->request.other.get("Content-Type");
-    ExtCtrlBlk.lpszContentType = content ? (char*)content->value->c_str() 
+    ExtCtrlBlk.lpszContentType = content ? (char*)content->value->c_str()
                                          : 0;
   }
 
   connTable[connIndex].td->buffer->setLength(0);
   connTable[connIndex].td->buffer->getAt(0)='\0';
   HttpExtensionProc = (PFN_HTTPEXTENSIONPROC)appHnd.getProc("HttpExtensionProc");
-  if (HttpExtensionProc == NULL) 
+  if (HttpExtensionProc == NULL)
   {
-    td->connection->host->warningsLogWrite(
-                     "ISAPI: Failed to get pointer to HttpExtensionProc() \
-in ISAPI application module");
-
+    td->connection->host->warningsLogWrite(_("ISAPI: internal error"));
     appHnd.close();
-    connTable[connIndex].chain.clearAllFilters(); 
+    connTable[connIndex].chain.clearAllFilters();
     return td->http->raiseHTTPError(500);
   }
 
@@ -944,7 +908,7 @@ in ISAPI application module");
   {
     WaitForSingleObject(connTable[connIndex].ISAPIDoneEvent, td->http->getTimeout ());
   }
-  
+
   {
     u_long nbw = 0;
     HttpRequestHeader::Entry *connection = connTable[connIndex].td->request.other.get("Connection");
@@ -952,8 +916,8 @@ in ISAPI application module");
     if(connection && !stringcmpi(connection->value->c_str(), "keep-alive"))
       Ret = connTable[connIndex].chain.getStream ()->write("0\r\n\r\n", 5, &nbw);
   }
-  
-  switch(Ret) 
+
+  switch(Ret)
   {
     case HSE_STATUS_SUCCESS_AND_KEEP_CONN:
       retvalue = 1;
@@ -966,43 +930,34 @@ in ISAPI application module");
       break;
   }
 
-  if(!appHnd.close())
-  {
-    string msg;
-    msg.assign("ISAPI: Failed to unLoad module "); 
-    msg.append(cgipath);
-    td->connection->host->warningsLogWrite(msg.c_str());
-  }
+  appHnd.close();
 
-  {
-    ostringstream tmp;
-    tmp <<  connTable[connIndex].dataSent;
-    connTable[connIndex].td->response.contentLength.assign(tmp.str()); 
-  }                                      
-  connTable[connIndex].chain.clearAllFilters(); 
+  ostringstream tmp;
+  tmp <<  connTable[connIndex].dataSent;
+  connTable[connIndex].td->response.contentLength.assign (tmp.str ());
+  connTable[connIndex].chain.clearAllFilters();
   connTable[connIndex].Allocated = 0;
   return retvalue;
 #else
-  /*!
-   *On other archs returns a non implemented error. 
+  /*
+   * On other archs returns a non implemented error.
    */
-  td->connection->host->warningsLogWrite(
-                                   "ISAPI: Not implemented");
+  td->connection->host->warningsLogWrite (_("ISAPI: Not implemented"));
   return td->http->raiseHTTPError(501);
-#endif  
+#endif
 }
 
 /*!
-*Constructor for the ISAPI class.
-*/
+ * Constructor for the ISAPI class.
+ */
 Isapi::Isapi()
 {
 
 }
 
 /*!
-*Initialize the ISAPI engine under WIN32.
-*/
+ * Initialize the ISAPI engine under WIN32.
+ */
 int Isapi::load ()
 {
 #ifdef WIN32
@@ -1012,10 +967,10 @@ int Isapi::load ()
 
   isapiMutex = new Mutex;
   maxConnections = nThreads ? nThreads : 20 ;
-  
+
   if(connTable)
     free(connTable);
-    
+
   connTable = new ConnTableRecord[maxConnections];
   for(int i=0;i<maxConnections; i++)
   {
@@ -1028,16 +983,16 @@ int Isapi::load ()
     connTable[i].envString=0;
     connTable[i].connection=0;
     connTable[i].ISAPIDoneEvent=0;
-    connTable[i].isapi=0;         
+    connTable[i].isapi=0;
   }
-  InitializeCriticalSection(&GetTableEntryCritSec);  
+  InitializeCriticalSection(&GetTableEntryCritSec);
   initialized=1;
 #endif
   return 0;
 }
 
 /*!
- *Cleanup the memory used by ISAPI.
+ * Cleanup the memory used by ISAPI.
  */
 int Isapi::unLoad()
 {
diff --git a/myserver/src/http_handler/mscgi/mscgi.cpp b/myserver/src/http_handler/mscgi/mscgi.cpp
index e479b0b..c51ba45 100644
--- a/myserver/src/http_handler/mscgi/mscgi.cpp
+++ b/myserver/src/http_handler/mscgi/mscgi.cpp
@@ -101,7 +101,7 @@ int MsCgi::send (HttpThreadContext* td, const char* exec, const char* cmdLine,
                                                                       &nbw,
                                                                       1))
     {
-      td->connection->host->warningsLogWrite ("MSCGI: Error loading filters");
+      td->connection->host->warningsLogWrite (_("MSCGI: internal error"));
       chain.clearAllFilters ();
       return td->http->raiseHTTPError (500);
     }
@@ -112,12 +112,8 @@ int MsCgi::send (HttpThreadContext* td, const char* exec, const char* cmdLine,
 
   if (ret)
     {
-      string msg;
-      msg.assign ("MSCGI: cannot load ");
-      msg.append (exec);
-      td->connection->host->warningsLogWrite (msg.c_str ());
+      td->connection->host->warningsLogWrite (_("MSCGI: cannot load %s"), exec);
       chain.clearAllFilters ();
-
       /* Internal server error.  */
       return td->http->raiseHTTPError (500);
     }
@@ -129,10 +125,7 @@ int MsCgi::send (HttpThreadContext* td, const char* exec, const char* cmdLine,
     (ProcMain)(td->request.uriOpts.c_str (), &data);
   else
     {
-      string msg;
-      msg.assign ("MSCGI: error accessing entrypoint for ");
-      msg.append (exec);
-      td->connection->host->warningsLogWrite (msg.c_str ());
+      td->connection->host->warningsLogWrite (_("MSCGI: cannot find entry-point for %s"), exec);
       return td->http->raiseHTTPError (500);
     }
   hinstLib.close ();
diff --git a/myserver/src/http_handler/proxy/proxy.cpp b/myserver/src/http_handler/proxy/proxy.cpp
index 6ea0968..64256de 100644
--- a/myserver/src/http_handler/proxy/proxy.cpp
+++ b/myserver/src/http_handler/proxy/proxy.cpp
@@ -62,9 +62,7 @@ int Proxy::send (HttpThreadContext *td,
 
   if (destUrl.getProtocol ().compare ("http") && destUrl.getProtocol ().compare ("HTTP"))
     {
-      ostringstream msg;
-      msg << "Proxy: " << destUrl.getProtocol () << " is not a known protocol.";
-      td->connection->host->warningsLogWrite (msg.str ().c_str ());
+      td->connection->host->warningsLogWrite ("Proxy: %s is not a known protocol", destUrl.getProtocol ());
       return 0;
     }
 
diff --git a/myserver/src/http_handler/scgi/scgi.cpp b/myserver/src/http_handler/scgi/scgi.cpp
index 28e944c..216e962 100644
--- a/myserver/src/http_handler/scgi/scgi.cpp
+++ b/myserver/src/http_handler/scgi/scgi.cpp
@@ -71,18 +71,18 @@ int Scgi::send(HttpThreadContext* td, const char* scriptpath,
   chain.setProtocol(td->http);
   chain.setProtocolData(td);
   chain.setStream(td->connection->socket);
-  if(td->mime)
+  if (td->mime)
   {
     u_long nbw;
-    if(td->mime && Server::getInstance()->getFiltersFactory()->chain(&chain,
+    if (td->mime && Server::getInstance()->getFiltersFactory ()->chain(&chain,
                                                     td->mime->filters,
                                                     td->connection->socket,
-                                                    &nbw, 
+                                                    &nbw,
                                                     1))
     {
-      td->connection->host->warningsLogWrite("SCGI: Error loading filters");
+      td->connection->host->warningsLogWrite(_("SCGI: internal error"));
       chain.clearAllFilters();
-      return td->http->raiseHTTPError(500);
+      return td->http->raiseHTTPError (500);
     }
   }
 
@@ -95,11 +95,11 @@ int Scgi::send(HttpThreadContext* td, const char* scriptpath,
     int subString = cgipath[0] == '"';
     int len = strlen(cgipath);
     string tmpCgiPath;
-    for(i = 1; i < len; i++)
+    for (i = 1; i < len; i++)
     {
-      if(!subString && cgipath[i]==' ')
+      if (!subString && cgipath[i]==' ')
         break;
-      if(cgipath[i] == '"' && cgipath[i - 1] != '\\')
+      if (cgipath[i] == '"' && cgipath[i - 1] != '\\')
         subString = !subString;
     }
     /*!
@@ -108,15 +108,15 @@ int Scgi::send(HttpThreadContext* td, const char* scriptpath,
      *If the cgipath is enclosed between " and " do not consider them
      *when splitting directory and file name.
      */
-    if(len)
+    if (len)
     {
-      if(i < len)
+      if (i < len)
       {
         string tmpString(cgipath);
         int begin = tmpString[0]=='"' ? 1: 0;
         int end = tmpString[i] == '"' ? i - 1: i;
-        tmpCgiPath.assign(tmpString.substr(begin, end - begin));
-        moreArg.assign(tmpString.substr(i, len - 1));
+        tmpCgiPath.assign(tmpString.substr (begin, end - begin));
+        moreArg.assign(tmpString.substr (i, len - 1));
       }
       else
       {
@@ -131,9 +131,9 @@ int Scgi::send(HttpThreadContext* td, const char* scriptpath,
     FilesUtility::splitPath(tmpCgiPath, td->scriptDir, td->scriptFile);
   }
 
-  if(execute)
+  if (execute)
   {
-    if(cgipath && strlen(cgipath))
+    if (cgipath && strlen(cgipath))
     {
 #ifdef WIN32
       {
@@ -142,13 +142,13 @@ int Scgi::send(HttpThreadContext* td, const char* scriptpath,
         int len = strlen(cgipath);
         int subString = cgipath[0] == '"';
 
-        cmdLine << "\"" << td->cgiRoot << "/" << td->cgiFile << "\" " 
+        cmdLine << "\"" << td->cgiRoot << "/" << td->cgiFile << "\" "
                 << moreArg << " \"" <<  td->filenamePath << "\"";
       }
 #else
        cmdLine << cgipath << " " << td->filenamePath;
 #endif
-    }/*if(execute).  */
+    }/*if (execute).  */
     else
     {
       cmdLine << scriptpath;
@@ -164,61 +164,46 @@ int Scgi::send(HttpThreadContext* td, const char* scriptpath,
 #endif
   }
 
-  Env::buildEnvironmentString(td, td->buffer->getBuffer());
-  sizeEnvString = buildScgiEnvironmentString(td,td->buffer->getBuffer(),
-                                             td->secondaryBuffer->getBuffer());
-  if(sizeEnvString == -1)
+  Env::buildEnvironmentString(td, td->buffer->getBuffer ());
+  sizeEnvString = buildScgiEnvironmentString(td,td->buffer->getBuffer (),
+                                             td->secondaryBuffer->getBuffer ());
+  if (sizeEnvString == -1)
   {
-    td->buffer->setLength(0);
-    if(Server::getInstance()->getVerbosity() > 2)
-    {
-      *td->buffer << "SCGI: Error to build env string" << '\0';
-      td->connection->host->warningsLogWrite(td->buffer->getBuffer());
-    }
+    td->connection->host->warningsLogWrite(_("SCGI: internal error"));
     chain.clearAllFilters();
-    return td->http->raiseHTTPError(500);
+    return td->http->raiseHTTPError (500);
   }
   td->inputData.close();
-  if(td->inputData.openFile(td->inputDataPath, File::READ | 
+  if (td->inputData.openFile(td->inputDataPath, File::READ |
                             File::FILE_OPEN_ALWAYS |
                             File::NO_INHERIT))
   {
-    td->buffer->setLength(0);
-    if(Server::getInstance()->getVerbosity() > 2)
-    {
-      *td->buffer << "SCGI: Error opening stdin file" << '\0';
-      td->connection->host->warningsLogWrite(td->buffer->getBuffer());
-    }
+    td->connection->host->warningsLogWrite(_("SCGI: internal error"));
     chain.clearAllFilters();
-    return td->http->raiseHTTPError(500);
+    return td->http->raiseHTTPError (500);
   }
 
-  server = connect(&con, cmdLine.str().c_str());
+  server = connect(&con, cmdLine.str ().c_str ());
 
-  if(server == 0)
+  if (server == 0)
   {
-    td->buffer->setLength(0);
-    if(Server::getInstance()->getVerbosity() > 2)
-    {
-      *td->buffer << "SCGI: Error connecting to SCGI "
-                  << cmdLine.str().c_str() << " process" << '\0';
-      td->connection->host->warningsLogWrite(td->buffer->getBuffer());
-    }
+    td->connection->host->warningsLogWrite(_("SCGI: error connecting to the process %s"),
+                                           cmdLine.str ().c_str ());
     chain.clearAllFilters();
-    return td->http->raiseHTTPError(500);
+    return td->http->raiseHTTPError (500);
   }
-  ret = sendNetString(&con, td->secondaryBuffer->getBuffer(), sizeEnvString);
-  
-  if(td->request.contentLength.size() && 
+  ret = sendNetString(&con, td->secondaryBuffer->getBuffer (), sizeEnvString);
+
+  if (td->request.contentLength.size() &&
      !td->request.contentLength.compare("0"))
   {
-    if(sendPostData(&con))
+    if (sendPostData(&con))
      {
       chain.clearAllFilters();
-      return td->http->raiseHTTPError(500);
+      return td->http->raiseHTTPError (500);
     }
   }
-  
+
   ret = !sendResponse(&con, onlyHeader, &chain);
 
 
@@ -247,96 +232,96 @@ int Scgi::sendResponse(ScgiContext* ctx, int onlyHeader, FiltersChain* chain)
 
   checkDataChunks(td, &keepalive, &useChunks);
 
-  for(;;)
+  for (;;)
   {
     while(!ctx->sock.bytesToRead())
     {
-      if((clock_t)(getTicks() - initialTicks) > td->http->getTimeout ())
+      if ((clock_t)(getTicks() - initialTicks) > td->http->getTimeout ())
         break;
       Thread::wait(1);
     }
 
-    if(!ctx->sock.bytesToRead())
+    if (!ctx->sock.bytesToRead())
       return -1;
 
-    nbr = ctx->sock.recv(td->secondaryBuffer->getBuffer() + read,
+    nbr = ctx->sock.recv(td->secondaryBuffer->getBuffer () + read,
                         td->secondaryBuffer->getRealLength() - read,
                          td->http->getTimeout ());
 
     read += nbr;
 
 
-    for(tmpHeaderSize = (tmpHeaderSize > 3) 
+    for (tmpHeaderSize = (tmpHeaderSize > 3)
           ? tmpHeaderSize - 4 : tmpHeaderSize;
         tmpHeaderSize < read - 4; tmpHeaderSize++)
-      if((td->secondaryBuffer->getBuffer()[tmpHeaderSize] == '\r') &&
-         (td->secondaryBuffer->getBuffer()[tmpHeaderSize + 1] == '\n') &&
-         (td->secondaryBuffer->getBuffer()[tmpHeaderSize + 2] == '\r') &&
-         (td->secondaryBuffer->getBuffer()[tmpHeaderSize + 3] == '\n'))
+      if ((td->secondaryBuffer->getBuffer ()[tmpHeaderSize] == '\r') &&
+         (td->secondaryBuffer->getBuffer ()[tmpHeaderSize + 1] == '\n') &&
+         (td->secondaryBuffer->getBuffer ()[tmpHeaderSize + 2] == '\r') &&
+         (td->secondaryBuffer->getBuffer ()[tmpHeaderSize + 3] == '\n'))
       {
         headerSize = tmpHeaderSize + 4;
         break;
       }
-    if(headerSize)
+    if (headerSize)
       break;
   }
 
 
-  if(!td->appendOutputs)
+  if (!td->appendOutputs)
   {
-    if(headerSize)
+    if (headerSize)
     {
-      HttpHeaders::buildHTTPResponseHeaderStruct(td->secondaryBuffer->getBuffer(),
-                                                 &td->response, 
+      HttpHeaders::buildHTTPResponseHeaderStruct(td->secondaryBuffer->getBuffer (),
+                                                 &td->response,
                                                  &(td->nBytesToRead));
     }
-    u_long hdrLen = HttpHeaders::buildHTTPResponseHeader(td->buffer->getBuffer(),
+    u_long hdrLen = HttpHeaders::buildHTTPResponseHeader (td->buffer->getBuffer (),
                                                          &td->response);
-    
-    if(chain->write(td->buffer->getBuffer(), hdrLen, &nbw))
+
+    if (chain->write(td->buffer->getBuffer (), hdrLen, &nbw))
       return -1;
   }
 
-  if(read - headerSize)
-    if(appendDataToHTTPChannel(td, td->secondaryBuffer->getBuffer() + headerSize,
+  if (read - headerSize)
+    if (appendDataToHTTPChannel(td, td->secondaryBuffer->getBuffer () + headerSize,
                                read - headerSize,
-                               &(td->outputData), 
+                               &(td->outputData),
                                chain,
-                               td->appendOutputs, 
+                               td->appendOutputs,
                                useChunks))
      return -1;
-  
+
   sentData += read - headerSize;
 
   if (td->response.getStatusType () == HttpResponseHeader::SUCCESSFUL)
   {
-    for(;;)
+    for (;;)
     {
-      nbr = ctx->sock.recv(td->secondaryBuffer->getBuffer(),
+      nbr = ctx->sock.recv(td->secondaryBuffer->getBuffer (),
                            td->secondaryBuffer->getRealLength(),
                            0);
-      
-      if(!nbr || (nbr == (u_long)-1))
+
+      if (!nbr || (nbr == (u_long)-1))
         break;
 
-      if(appendDataToHTTPChannel(td, td->secondaryBuffer->getBuffer(),
+      if (appendDataToHTTPChannel(td, td->secondaryBuffer->getBuffer (),
                                  nbr,
-                                 &(td->outputData), 
+                                 &(td->outputData),
                                  chain,
-                                 td->appendOutputs, 
+                                 td->appendOutputs,
                                  useChunks))
         return -1;
-      
+
       sentData += nbr;
     }
-    
-    if(!td->appendOutputs && useChunks)
+
+    if (!td->appendOutputs && useChunks)
     {
-      if(chain->getStream ()->write("0\r\n\r\n", 5, &nbw))
+      if (chain->getStream ()->write("0\r\n\r\n", 5, &nbw))
         return -1;
     }
   }
-  /* For logging activity.  */  
+  /* For logging activity.  */
   td->sentData += sentData;
 
   return 0;
@@ -348,15 +333,15 @@ int Scgi::sendResponse(ScgiContext* ctx, int onlyHeader, FiltersChain* chain)
 int Scgi::sendNetString(ScgiContext* ctx, const char* data, int len)
 {
   char header[7];
-  int headerLen = sprintf(header, "%i:", len);
+  int headerLen = sprintf (header, "%i:", len);
 
-  if(ctx->sock.send(header, headerLen, 0) == -1)
+  if (ctx->sock.send(header, headerLen, 0) == -1)
     return -1;
 
-  if(ctx->sock.send(data, len, 0) == -1)
+  if (ctx->sock.send(data, len, 0) == -1)
     return -1;
 
-  if(ctx->sock.send(",", 1, 0) == -1)
+  if (ctx->sock.send(",", 1, 0) == -1)
     return -1;
 
   return 0;
@@ -370,15 +355,15 @@ int Scgi::sendPostData(ScgiContext* ctx)
     u_long nbr;
     do
     {
-      if(ctx->td->inputData.read(ctx->td->secondaryBuffer->getBuffer(),
-                                         ctx->td->secondaryBuffer->getRealLength(), 
+      if (ctx->td->inputData.read(ctx->td->secondaryBuffer->getBuffer (),
+                                         ctx->td->secondaryBuffer->getRealLength(),
                                          &nbr))
       {
         return -1;
       }
 
-      if(nbr && (ctx->sock.send(ctx->td->secondaryBuffer->getBuffer(), nbr, 0) == -1))
-      { 
+      if (nbr && (ctx->sock.send(ctx->td->secondaryBuffer->getBuffer (), nbr, 0) == -1))
+      {
         return -1;
       }
     }
@@ -397,25 +382,25 @@ int Scgi::buildScgiEnvironmentString(HttpThreadContext* td, char* src,
   char *sptr = src;
   char varName[100];
   char varValue[2500];
-  
-  ptr += myserver_strlcpy(ptr, "CONTENT_LENGTH", 15);
+
+  ptr += myserver_strlcpy (ptr, "CONTENT_LENGTH", 15);
   *ptr++ = '\0';
 
-  if( td->request.contentLength.size())
-    ptr += myserver_strlcpy(ptr, td->request.contentLength.c_str(),  
+  if ( td->request.contentLength.size())
+    ptr += myserver_strlcpy (ptr, td->request.contentLength.c_str (),
                             td->request.contentLength.size() + 1);
   else
     *ptr++ = '0';
-    
+
   *ptr++ = '\0';
 
-  ptr += myserver_strlcpy(ptr, "SCGI", 5);
+  ptr += myserver_strlcpy (ptr, "SCGI", 5);
   *ptr++ = '\0';
 
-  ptr += myserver_strlcpy(ptr, "1", 2);
+  ptr += myserver_strlcpy (ptr, "1", 2);
   *ptr++ = '\0';
 
-  for(;;)
+  for (;;)
   {
     int i;
     int max = 100;
@@ -434,7 +419,7 @@ int Scgi::buildScgiEnvironmentString(HttpThreadContext* td, char* src,
       varName[varNameLen++] = *sptr++;
       varName[varNameLen] = '\0';
     }
-    if(max == 0)
+    if (max == 0)
       return -1;
     sptr++;
     max = 2500;
@@ -444,22 +429,22 @@ int Scgi::buildScgiEnvironmentString(HttpThreadContext* td, char* src,
       varValue[varValueLen] = '\0';
     }
 
-    if(max == 0)
+    if (max == 0)
       return -1;
 
-    if(!strcmpi(varName, "CONTENT_LENGTH") || !strcmpi(varName, "SCGI") ||
+    if (!strcmpi(varName, "CONTENT_LENGTH") || !strcmpi(varName, "SCGI") ||
        !varNameLen || !varValueLen)
       continue;
 
-    for(i = 0; i < varNameLen; i++)
+    for (i = 0; i < varNameLen; i++)
       *ptr++ = varName[i];
     *ptr++ = '\0';
 
-    for(i = 0; i < varValueLen; i++)
+    for (i = 0; i < varValueLen; i++)
       *ptr++ = varValue[i];
     *ptr++ = '\0';
 
-    if(*(++sptr) == '\0')
+    if (*(++sptr) == '\0')
       break;
   }
   return static_cast<int>(ptr - dest);
@@ -478,10 +463,10 @@ Scgi::Scgi()
  */
 int Scgi::load ()
 {
-  if(initialized)
+  if (initialized)
     return 1;
   initialized = 1;
-  processServerManager = Server::getInstance()->getProcessServerManager();
+  processServerManager = Server::getInstance()->getProcessServerManager ();
   processServerManager->createDomain(SERVERS_DOMAIN);
   return 0;
 }
@@ -501,7 +486,7 @@ int Scgi::unLoad()
  */
 ScgiServer* Scgi::isScgiServerRunning(const char* path)
 {
-  return processServerManager->getServer(SERVERS_DOMAIN, path);
+  return processServerManager->getServer (SERVERS_DOMAIN, path);
 }
 
 
@@ -510,15 +495,15 @@ ScgiServer* Scgi::isScgiServerRunning(const char* path)
  */
 ScgiServer* Scgi::connect(ScgiContext* con, const char* path)
 {
-  ScgiServer* server = runScgiServer(con, path);
+  ScgiServer* server = runScgiServer (con, path);
   /*!
    *If we find a valid server try the connection to it.
    */
-  if(server)
+  if (server)
   {
     int ret = processServerManager->connect(&(con->sock), server);
 
-    if(ret == -1)
+    if (ret == -1)
       return 0;
   }
   return server;
@@ -526,27 +511,27 @@ ScgiServer* Scgi::connect(ScgiContext* con, const char* path)
 
 /*!
  *Run the SCGI server.
- *If the path starts with a @ character, the path is handled as a 
+ *If the path starts with a @ character, the path is handled as a
  *remote server.
  */
-ScgiServer* Scgi::runScgiServer(ScgiContext* context, 
+ScgiServer* Scgi::runScgiServer (ScgiContext* context,
                                 const char* path)
 {
   /* This method needs a better home (and maybe better code).
    * Compute a simple hash from the IP address.  */
-  const char *ip = context->td->connection->getIpAddr();
+  const char *ip = context->td->connection->getIpAddr ();
   int seed = 13;
   for (const char *c = ip; *c; c++)
     seed = *c * 21 + seed;
 
-  ScgiServer* server =  processServerManager->getServer(SERVERS_DOMAIN, 
+  ScgiServer* server =  processServerManager->getServer (SERVERS_DOMAIN,
                                                         path,
                                                         seed);
-  if(server)
+  if (server)
     return server;
 
   /* If the path starts with @ then the server is remote.  */
-  if(path[0] == '@')
+  if (path[0] == '@')
   {
     int i = 1;
     char host[128];
@@ -555,13 +540,13 @@ ScgiServer* Scgi::runScgiServer(ScgiContext* context,
     while(path[i] && path[i] != ':')
       i++;
 
-    myserver_strlcpy(host, &path[1], min(128, i));
+    myserver_strlcpy (host, &path[1], min(128, i));
+
+    myserver_strlcpy (port, &path[i + 1], 6);
 
-    myserver_strlcpy(port, &path[i + 1], 6);
-    
-    return processServerManager->addRemoteServer(SERVERS_DOMAIN, path, 
+    return processServerManager->addRemoteServer (SERVERS_DOMAIN, path,
                                                  host, atoi(port));
   }
 
-  return processServerManager->runAndAddServer(SERVERS_DOMAIN, path);
+  return processServerManager->runAndAddServer (SERVERS_DOMAIN, path);
 }
diff --git a/myserver/src/http_handler/wincgi/wincgi.cpp b/myserver/src/http_handler/wincgi/wincgi.cpp
index 99f192f..970c2da 100644
--- a/myserver/src/http_handler/wincgi/wincgi.cpp
+++ b/myserver/src/http_handler/wincgi/wincgi.cpp
@@ -28,10 +28,10 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #include <include/filter/filters_chain.h>
 #include <include/base/safetime/safetime.h>
 
-extern "C" 
+extern "C"
 {
 #ifdef WIN32
-#include <direct.h>
+# include <direct.h>
 #endif
 #include <string.h>
 }
@@ -42,26 +42,26 @@ using namespace std;
 
 
 /*!
- *Constructor for the wincgi class.
+ * Constructor for the wincgi class.
  */
-WinCgi::WinCgi()
+WinCgi::WinCgi ()
 {
 
 }
 
 /*!
- *Destructor for the wincgi class.
+ * Destructor for the wincgi class.
  */
-WinCgi::~WinCgi()
+WinCgi::~WinCgi ()
 {
 
 }
 
 /*!
- *Send the WinCGI data.
+ * Send the WinCGI data.
  */
-int WinCgi::send(HttpThreadContext* td, const char* scriptpath,
-                 const char *cgipath, bool /*execute*/, bool onlyHeader)
+int WinCgi::send (HttpThreadContext* td, const char* scriptpath,
+                  const char *cgipath, bool /*execute*/, bool onlyHeader)
 {
 #ifdef WIN32
   FiltersChain chain;
@@ -75,7 +75,7 @@ int WinCgi::send(HttpThreadContext* td, const char* scriptpath,
   time_t ltime = 100;
   int gmhour;
   int bias;
-  
+
   int ret;
   char execname[MAX_PATH];/*! Use MAX_PATH under windows. */
   char pathname[MAX_PATH];/*! Use MAX_PATH under windows. */
@@ -86,163 +86,163 @@ int WinCgi::send(HttpThreadContext* td, const char* scriptpath,
   ostringstream stream;
 
   if (!(td->permissions & MYSERVER_PERMISSION_EXECUTE))
-    return td->http->sendAuth();
+    return td->http->sendAuth ();
 
-  if(!FilesUtility::fileExists(scriptpath))
-    return td->http->raiseHTTPError(404);
+  if (!FilesUtility::fileExists (scriptpath))
+    return td->http->raiseHTTPError (404);
 
   FilesUtility::splitPath(scriptpath, pathname, execname);
-  
+
   getdefaultwd(dataFilePath,MAX_PATH);
-  GetShortPathName(dataFilePath,dataFilePath,MAX_PATH);
-  sprintf(&dataFilePath[strlen(dataFilePath)],"/data_%u.ini",td->id);
-  
-  strcpy(outFilePath,td->outputDataPath.c_str());
+  GetShortPathName (dataFilePath,dataFilePath,MAX_PATH);
+  sprintf (&dataFilePath[strlen(dataFilePath)],"/data_%u.ini",td->id);
+
+  strcpy (outFilePath,td->outputDataPath.c_str ());
   strcat(outFilePath,"WC");
   td->inputData.seek (0);
 
   chain.setProtocol(td->http);
   chain.setProtocolData(td);
   chain.setStream(td->connection->socket);
-  if(td->mime)
-  {
-    u_long nbw2;
-    if(td->mime && Server::getInstance()->getFiltersFactory()->chain(&chain, 
-                                                 td->mime->filters, 
-                                                 td->connection->socket, &nbw2, 1))
-      {
-        td->connection->host->warningsLogWrite("WinCGI: Error loading filters");
-        chain.clearAllFilters(); 
-        return td->http->raiseHTTPError(500);
-      }
-  }
-  
+  if (td->mime)
+    {
+      u_long nbw2;
+      if (td->mime && Server::getInstance ()->getFiltersFactory ()->chain(&chain,
+                                                                         td->mime->filters,
+                                                                         td->connection->socket, &nbw2, 1))
+        {
+          td->connection->host->warningsLogWrite (_("WinCGI: internal error"));
+          chain.clearAllFilters();
+          return td->http->raiseHTTPError (500);
+        }
+    }
+
 
   /*!
    *The WinCGI protocol uses a .ini file to send data to the new process.
    */
-  ret=DataFileHandle.openFile(dataFilePath,
-                     File::FILE_CREATE_ALWAYS|File::WRITE);
-  if ( ret ) 
-  {
-    td->connection->host->warningsLogWrite("WinCGI: Error creating .ini");
-    return td->http->raiseHTTPError(500);
-  }
+  ret = DataFileHandle.openFile (dataFilePath, File::FILE_CREATE_ALWAYS
+                                 | File::WRITE);
+  if (ret)
+    {
+      td->connection->host->warningsLogWrite (_("WinCGI: internal error"));
+      return td->http->raiseHTTPError (500);
+    }
 
   td->secondaryBuffer->setLength(0);
-  buffer=td->secondaryBuffer->getBuffer();
+  buffer = td->secondaryBuffer->getBuffer ();
 
-  strcpy(buffer, "[CGI]\r\n");
-  DataFileHandle.writeToFile(buffer,7,&nbr);
+  strcpy (buffer, "[CGI]\r\n");
+  DataFileHandle.writeToFile (buffer,7,&nbr);
 
-  strcpy(buffer, "CGI Version=CGI/1.3a WIN\r\n");
-  DataFileHandle.writeToFile(buffer,26,&nbr);
+  strcpy (buffer, "CGI Version=CGI/1.3a WIN\r\n");
+  DataFileHandle.writeToFile (buffer,26,&nbr);
 
-  *td->secondaryBuffer << "Server Admin=" << 
+  *td->secondaryBuffer << "Server Admin=" <<
     td->securityToken.getHashedData ("server.admin", MYSERVER_VHOST_CONF |
                                      MYSERVER_SERVER_CONF, "")<< "\r\n";
-  DataFileHandle.writeToFile(buffer,td->secondaryBuffer->getLength(),&nbr);
+  DataFileHandle.writeToFile (buffer,td->secondaryBuffer->getLength(),&nbr);
 
   {
-    if(td->request.isKeepAlive())
-    {
-      strcpy(buffer,"Request Keep-Alive=No\r\n");
-      DataFileHandle.writeToFile(buffer, 23, &nbr);
-    }
+    if (td->request.isKeepAlive ())
+      {
+        strcpy (buffer,"Request Keep-Alive=No\r\n");
+        DataFileHandle.writeToFile (buffer, 23, &nbr);
+      }
     else
-    {
-      strcpy(buffer,"Request Keep-Alive=Yes\r\n");
-      DataFileHandle.writeToFile(buffer, 24, &nbr);
-    }
+      {
+        strcpy (buffer,"Request Keep-Alive=Yes\r\n");
+        DataFileHandle.writeToFile (buffer, 24, &nbr);
+      }
   }
 
   td->secondaryBuffer->setLength(0);
   *td->secondaryBuffer << "Request Method=" << td->request.cmd << "\r\n";
-  DataFileHandle.writeToFile(buffer, td->secondaryBuffer->getLength(), &nbr);
+  DataFileHandle.writeToFile (buffer, td->secondaryBuffer->getLength(), &nbr);
 
   td->secondaryBuffer->setLength(0);
   *td->secondaryBuffer << "Request Protocol=HTTP/" << td->request.ver << "\r\n";
-  DataFileHandle.writeToFile(buffer, td->secondaryBuffer->getLength(), &nbr);
+  DataFileHandle.writeToFile (buffer, td->secondaryBuffer->getLength(), &nbr);
 
-   td->secondaryBuffer->setLength(0);  
+  td->secondaryBuffer->setLength(0);
   *td->secondaryBuffer << "Executable Path=" << execname << "\r\n";
-  DataFileHandle.writeToFile(buffer,td->secondaryBuffer->getLength(),&nbr);
+  DataFileHandle.writeToFile (buffer,td->secondaryBuffer->getLength(),&nbr);
 
-  if(td->request.uriOpts[0])
-  {
-    sprintf(buffer, "Query String=%s\r\n", td->request.uriOpts.c_str());
-    DataFileHandle.writeToFile(buffer,(u_long)strlen(buffer), &nbr);
-  }
+  if (td->request.uriOpts[0])
+    {
+      sprintf (buffer, "Query String=%s\r\n", td->request.uriOpts.c_str ());
+      DataFileHandle.writeToFile (buffer,(u_long)strlen(buffer), &nbr);
+    }
 
   {
     HttpRequestHeader::Entry *referer = td->request.other.get("Referer");
 
-    if(referer && referer->value->length())
-    {
-      sprintf(buffer,"Referer=%s\r\n", referer->value->c_str());
-      DataFileHandle.writeToFile(buffer,(u_long)strlen(buffer),&nbr);
-    }
+    if (referer && referer->value->length())
+      {
+        sprintf (buffer,"Referer=%s\r\n", referer->value->c_str ());
+        DataFileHandle.writeToFile (buffer,(u_long)strlen(buffer),&nbr);
+      }
   }
 
   {
     HttpRequestHeader::Entry *contentType = td->request.other.get("Content-Type");
 
-    if(contentType && contentType->value->length())
-    {
-      sprintf(buffer, "Content Type=%s\r\n", contentType->value->c_str());
-      DataFileHandle.writeToFile(buffer, (u_long)strlen(buffer), &nbr);
-    }
+    if (contentType && contentType->value->length())
+      {
+        sprintf (buffer, "Content Type=%s\r\n", contentType->value->c_str ());
+        DataFileHandle.writeToFile (buffer, (u_long)strlen(buffer), &nbr);
+      }
   }
 
   {
     HttpRequestHeader::Entry *userAgent = td->request.other.get("User-Agent");
-    
-    if(userAgent && userAgent->value->length())
-    {
-      sprintf(buffer,"User Agent=%s\r\n", userAgent->value->c_str());
-      DataFileHandle.writeToFile(buffer, (u_long)strlen(buffer), &nbr);
-    }
+
+    if (userAgent && userAgent->value->length())
+      {
+        sprintf (buffer,"User Agent=%s\r\n", userAgent->value->c_str ());
+        DataFileHandle.writeToFile (buffer, (u_long)strlen(buffer), &nbr);
+      }
   }
 
-  sprintf(buffer,"Content File=%s\r\n", td->inputData.getFilename());
-  DataFileHandle.writeToFile(buffer, (u_long)strlen(buffer), &nbr);
+  sprintf (buffer,"Content File=%s\r\n", td->inputData.getFilename ());
+  DataFileHandle.writeToFile (buffer, (u_long)strlen(buffer), &nbr);
 
-  if(td->request.contentLength[0])
-  {
-    sprintf(buffer, "Content Length=%s\r\n", 
-            td->request.contentLength.c_str());
-    DataFileHandle.writeToFile(buffer, (u_long)strlen(buffer), &nbr);
-  }
+  if (td->request.contentLength[0])
+    {
+      sprintf (buffer, "Content Length=%s\r\n",
+              td->request.contentLength.c_str ());
+      DataFileHandle.writeToFile (buffer, (u_long)strlen(buffer), &nbr);
+    }
   else
-  {
-    strcpy(buffer, "Content Length=0\r\n");
-    DataFileHandle.writeToFile(buffer, 18, &nbr);  
-  }
+    {
+      strcpy (buffer, "Content Length=0\r\n");
+      DataFileHandle.writeToFile (buffer, 18, &nbr);
+    }
+
+  strcpy (buffer,"Server Software=MyServer\r\n");
+  DataFileHandle.writeToFile (buffer, 26, &nbr);
 
-  strcpy(buffer,"Server Software=MyServer\r\n");
-  DataFileHandle.writeToFile(buffer, 26, &nbr);
+  sprintf (buffer, "Remote Address=%s\r\n", td->connection->getIpAddr ());
+  DataFileHandle.writeToFile (buffer, (u_long)strlen(buffer), &nbr);
 
-  sprintf(buffer, "Remote Address=%s\r\n", td->connection->getIpAddr());
-  DataFileHandle.writeToFile(buffer, (u_long)strlen(buffer), &nbr);
+  sprintf (buffer, "Server Port=%u\r\n", td->connection->getLocalPort());
+  DataFileHandle.writeToFile (buffer, (u_long)strlen(buffer), &nbr);
 
-  sprintf(buffer, "Server Port=%u\r\n", td->connection->getLocalPort());
-  DataFileHandle.writeToFile(buffer, (u_long)strlen(buffer), &nbr);
-  
   {
     HttpRequestHeader::Entry *host = td->request.other.get("Host");
-    if(host)
-      sprintf(buffer, "Server Name=%s\r\n", host->value->c_str());
-    DataFileHandle.writeToFile(buffer, (u_long)strlen(buffer), &nbr);
+    if (host)
+      sprintf (buffer, "Server Name=%s\r\n", host->value->c_str ());
+    DataFileHandle.writeToFile (buffer, (u_long)strlen(buffer), &nbr);
   }
 
-  strcpy(buffer, "[System]\r\n");
-  DataFileHandle.writeToFile(buffer, 10, &nbr);
+  strcpy (buffer, "[System]\r\n");
+  DataFileHandle.writeToFile (buffer, 10, &nbr);
 
-  sprintf(buffer, "Output File=%s\r\n", outFilePath);
-  DataFileHandle.writeToFile(buffer, (u_long)strlen(buffer), &nbr);
+  sprintf (buffer, "Output File=%s\r\n", outFilePath);
+  DataFileHandle.writeToFile (buffer, (u_long)strlen(buffer), &nbr);
 
-  sprintf(buffer,"Content File=%s\r\n", td->inputData.getFilename());
-  DataFileHandle.writeToFile(buffer, (u_long)strlen(buffer), &nbr);
+  sprintf (buffer,"Content File=%s\r\n", td->inputData.getFilename ());
+  DataFileHandle.writeToFile (buffer, (u_long)strlen(buffer), &nbr);
 
   /*
    *Compute the local offset from the GMT time
@@ -250,35 +250,34 @@ int WinCgi::send(HttpThreadContext* td, const char* scriptpath,
   {
     tm tmpTm;
     ltime = 100;
-    gmhour = myserver_gmtime( &ltime, &tmpTm)->tm_hour;
-    bias = myserver_localtime(&ltime, &tmpTm)->tm_hour - gmhour;
+    gmhour = myserver_gmtime ( &ltime, &tmpTm)->tm_hour;
+    bias = myserver_localtime (&ltime, &tmpTm)->tm_hour - gmhour;
   }
-  sprintf(buffer, "GMT Offset=%i\r\n", bias);
-  DataFileHandle.writeToFile(buffer, (u_long)strlen(buffer), &nbr);
+  sprintf (buffer, "GMT Offset=%i\r\n", bias);
+  DataFileHandle.writeToFile (buffer, (u_long)strlen(buffer), &nbr);
 
-  sprintf(buffer, "Debug Mode=No\r\n", bias);
-  DataFileHandle.writeToFile(buffer, 15, &nbr);
+  sprintf (buffer, "Debug Mode=No\r\n", bias);
+  DataFileHandle.writeToFile (buffer, 15, &nbr);
 
-  DataFileHandle.close();
+  DataFileHandle.close ();
 
   /*
    *Create the out file.
    */
-  if(!FilesUtility::fileExists(outFilePath))
-  {
-    ret = OutFileHandle.openFile(outFilePath, File::FILE_CREATE_ALWAYS);
-    if (ret)
+  if (!FilesUtility::fileExists(outFilePath))
     {
-      td->connection->host->warningsLogWrite(
-                                      "WinCGI: Error creating output file");
-      DataFileHandle.close();
-      FilesUtility::deleteFile(outFilePath);
-      FilesUtility::deleteFile(dataFilePath);
-      chain.clearAllFilters(); 
-      return td->http->raiseHTTPError(500);
+      ret = OutFileHandle.openFile (outFilePath, File::FILE_CREATE_ALWAYS);
+      if (ret)
+        {
+          td->connection->host->warningsLogWrite (_("WinCGI: internal error"));
+          DataFileHandle.close ();
+          FilesUtility::deleteFile (outFilePath);
+          FilesUtility::deleteFile (dataFilePath);
+          chain.clearAllFilters();
+          return td->http->raiseHTTPError (500);
+        }
     }
-  }
-  OutFileHandle.close();
+  OutFileHandle.close ();
   spi.cmdLine.assign("cmd /c \"");
   spi.cmdLine.append(scriptpath);
   spi.cmdLine.append("\" ");
@@ -286,57 +285,55 @@ int WinCgi::send(HttpThreadContext* td, const char* scriptpath,
   spi.cwd.assign(pathname);
   spi.envString = 0;
   if (proc.exec (&spi, true))
-  {
-    ostringstream msg;
-    msg << "WinCGI: Error executing process " << scriptpath;
-    td->connection->host->warningsLogWrite(msg.str().c_str());
-
-    FilesUtility::deleteFile(outFilePath);
-    FilesUtility::deleteFile(dataFilePath);
-    chain.clearAllFilters();
-    return td->http->raiseHTTPError(500);
-  }
+    {
+      td->connection->host->warningsLogWrite (_("WinCGI: error executing %s"), scriptpath);
 
-  ret=OutFileHandle.openFile(outFilePath, File::FILE_OPEN_ALWAYS|
-                             File::READ);
+      FilesUtility::deleteFile (outFilePath);
+      FilesUtility::deleteFile (dataFilePath);
+      chain.clearAllFilters();
+      return td->http->raiseHTTPError (500);
+    }
+
+  ret=OutFileHandle.openFile (outFilePath, File::FILE_OPEN_ALWAYS|
+                              File::READ);
   if (ret)
-  {
-    ostringstream msg;
-    msg << "WinCGI: Error opening output file " << outFilePath;
-    td->connection->host->warningsLogWrite(msg.str().c_str());
-    chain.clearAllFilters();
-    return td->http->raiseHTTPError(500);
-  }
+    {
+      ostringstream msg;
+      msg << "WinCGI: Error opening output file " << outFilePath;
+      td->connection->host->warningsLogWrite (msg.str ().c_str ());
+      chain.clearAllFilters();
+      return td->http->raiseHTTPError (500);
+    }
   OutFileHandle.read(buffer,td->secondaryBuffer->getRealLength(),&nBytesRead);
-  if(!nBytesRead)
-  {
-    ostringstream msg;
-    msg << "WinCGI: Error zero bytes read from the WinCGI output file " 
-        << outFilePath;
-    td->connection->host->warningsLogWrite(msg.str().c_str());
-    OutFileHandle.close();
-    FilesUtility::deleteFile(outFilePath);
-    FilesUtility::deleteFile(dataFilePath);
-    chain.clearAllFilters();
-    return td->http->raiseHTTPError(500);
-  }
+  if (!nBytesRead)
+    {
+      ostringstream msg;
+      msg << "WinCGI: Error zero bytes read from the WinCGI output file "
+          << outFilePath;
+      td->connection->host->warningsLogWrite (msg.str ().c_str ());
+      OutFileHandle.close ();
+      FilesUtility::deleteFile (outFilePath);
+      FilesUtility::deleteFile (dataFilePath);
+      chain.clearAllFilters();
+      return td->http->raiseHTTPError (500);
+    }
 
-  for(u_long i = 0; i < nBytesRead; i++)
-  {
-    if((buffer[i] == '\r') && (buffer[i+1] == '\n')
-       &&(buffer[i+2] == '\r') && (buffer[i+3] == '\n'))
+  for (u_long i = 0; i < nBytesRead; i++)
     {
-      /*
-       *The HTTP header ends with a \r\n\r\n sequence so
-       *determinate where it ends and set the header size
-       *to i + 4.
-       */
-      headerSize = i + 4;
-      break;
+      if ((buffer[i] == '\r') && (buffer[i+1] == '\n')
+         &&(buffer[i+2] == '\r') && (buffer[i+3] == '\n'))
+        {
+          /*
+           *The HTTP header ends with a \r\n\r\n sequence so
+           *determinate where it ends and set the header size
+           *to i + 4.
+           */
+          headerSize = i + 4;
+          break;
+        }
     }
-  }
 
-  if(td->request.isKeepAlive())
+  if (td->request.isKeepAlive ())
     td->response.connection.assign("keep-alive");
 
   HttpHeaders::buildHTTPResponseHeaderStruct(buffer, &td->response, &(td->nBytesToRead));
@@ -344,115 +341,114 @@ int WinCgi::send(HttpThreadContext* td, const char* scriptpath,
   /*
    *Always specify the size of the HTTP contents.
    */
-  stream << OutFileHandle.getFileSize() - headerSize;
-  td->response.contentLength.assign(stream.str());
-  if(!td->appendOutputs)
-  {
-    u_long nbw2;
-    /*!
-     *Send the header if it is not appending.
-     */
-    u_long hdrLen = HttpHeaders::buildHTTPResponseHeader(td->buffer->getBuffer(),
-                                                         &td->response);
-    if(chain.getStream ()->write((const char*)td->buffer->getBuffer(),
-                                 hdrLen,
-                                 &nbw2))
-    {
-      OutFileHandle.close();
-      FilesUtility::deleteFile(outFilePath);
-      FilesUtility::deleteFile(dataFilePath);
-      chain.clearAllFilters();
-      return 0;
-    }
-      
-    if(onlyHeader)
+  stream << OutFileHandle.getFileSize () - headerSize;
+  td->response.contentLength.assign(stream.str ());
+  if (!td->appendOutputs)
     {
-      OutFileHandle.close();
-      FilesUtility::deleteFile(outFilePath);
-      FilesUtility::deleteFile(dataFilePath);
-      chain.clearAllFilters();
-      return 1;
+      u_long nbw2;
+      /*!
+       *Send the header if it is not appending.
+       */
+      u_long hdrLen = HttpHeaders::buildHTTPResponseHeader (td->buffer->getBuffer (),
+                                                            &td->response);
+      if (chain.getStream ()->write ((const char*)td->buffer->getBuffer (),
+                                    hdrLen,
+                                    &nbw2))
+        {
+          OutFileHandle.close ();
+          FilesUtility::deleteFile (outFilePath);
+          FilesUtility::deleteFile (dataFilePath);
+          chain.clearAllFilters();
+          return 0;
+        }
+
+      if (onlyHeader)
+        {
+          OutFileHandle.close ();
+          FilesUtility::deleteFile (outFilePath);
+          FilesUtility::deleteFile (dataFilePath);
+          chain.clearAllFilters();
+          return 1;
+        }
+      /*!
+       *Send other data in the buffer.
+       */
+      chain.write ((char*)(buffer + headerSize), nBytesRead - headerSize,
+                   &nbw2);
+      nbw += nbw2;
     }
-    /*!
-     *Send other data in the buffer.
-     */
-    chain.write((char*)(buffer + headerSize), nBytesRead - headerSize, 
-                &nbw2);
-    nbw += nbw2;
-  }
   else
-  {
-    u_long nbw2;
-    HttpHeaders::buildHTTPResponseHeader(td->buffer->getBuffer(),
-                                         &td->response);
-    if(onlyHeader)
     {
-      chain.clearAllFilters();
-      return 1;
-    }
+      u_long nbw2;
+      HttpHeaders::buildHTTPResponseHeader (td->buffer->getBuffer (),
+                                            &td->response);
+      if (onlyHeader)
+        {
+          chain.clearAllFilters();
+          return 1;
+        }
 
-    td->outputData.writeToFile((char*)(buffer + headerSize),
-                               nBytesRead - headerSize,
-                               &nbw2);
-    nbw += nbw2;
-  }
+      td->outputData.writeToFile ((char*)(buffer + headerSize),
+                                  nBytesRead - headerSize,
+                                  &nbw2);
+      nbw += nbw2;
+    }
 
   if (td->response.getStatusType () == HttpResponseHeader::SUCCESSFUL)
-  {
-    /* Flush the rest of the file.  */
-    do
     {
-      OutFileHandle.read(buffer, td->secondaryBuffer->getLength(), 
-                                 &nBytesRead);
-      if(nBytesRead)
-      {
-        int ret;
-        if(td->appendOutputs)
+      /* Flush the rest of the file.  */
+      do
         {
-          ret = td->outputData.writeToFile(buffer, nBytesRead, &nbw);
-          if(ret)
-          {
-            OutFileHandle.close();
-            FilesUtility::deleteFile(outFilePath);
-            FilesUtility::deleteFile(dataFilePath);
-            chain.clearAllFilters();
-            return 0;
-          }
-        }      
-        else
-        {
-          u_long nbw2;
-          ret = chain.write((char*)buffer, nBytesRead, &nbw2);
-          if(ret == -1)
-          {
-            OutFileHandle.close();
-            FilesUtility::deleteFile(outFilePath);
-            FilesUtility::deleteFile(dataFilePath);
-            chain.clearAllFilters();
-            return 0;
-          }
-        }
-      }
-      else
-        break;
-      
-    }while(nBytesRead);
-  }
+          OutFileHandle.read(buffer, td->secondaryBuffer->getLength(),
+                             &nBytesRead);
+          if (nBytesRead)
+            {
+              int ret;
+              if (td->appendOutputs)
+                {
+                  ret = td->outputData.writeToFile (buffer, nBytesRead, &nbw);
+                  if (ret)
+                    {
+                      OutFileHandle.close ();
+                      FilesUtility::deleteFile (outFilePath);
+                      FilesUtility::deleteFile (dataFilePath);
+                      chain.clearAllFilters();
+                      return 0;
+                    }
+                }
+              else
+                {
+                  u_long nbw2;
+                  ret = chain.write ((char*)buffer, nBytesRead, &nbw2);
+                  if (ret == -1)
+                    {
+                      OutFileHandle.close ();
+                      FilesUtility::deleteFile (outFilePath);
+                      FilesUtility::deleteFile (dataFilePath);
+                      chain.clearAllFilters();
+                      return 0;
+                    }
+                }
+            }
+          else
+            break;
+
+        }while (nBytesRead);
+    }
   td->sentData += nbw;
 
-  chain.clearAllFilters();  
-  OutFileHandle.close();
-  FilesUtility::deleteFile(outFilePath);
-  FilesUtility::deleteFile(dataFilePath);
+  chain.clearAllFilters();
+  OutFileHandle.close ();
+  FilesUtility::deleteFile (outFilePath);
+  FilesUtility::deleteFile (dataFilePath);
   return 1;
 #else
   /*
-   *WinCGI is available only under windows. Raise the right error 
-   *when it is used under another architecture.
+   * WinCGI is available only under windows. Raise the right error
+   * when it is used under another architecture.
    */
-  td->buffer->setLength(0);
-  *td->buffer << "WinCGI: Not implemented";
-  td->connection->host->warningsLogWrite(td->buffer->getBuffer());
-  return td->http->raiseHTTPError(501);
+  td->connection->host->warningsLogWrite(_("WinCGI: not implemented"));
+
+  return td->http->raiseHTTPError (501);
 #endif
 }
diff --git a/myserver/src/protocol/control/control_protocol.cpp b/myserver/src/protocol/control/control_protocol.cpp
index 623918c..3f1204d 100755
--- a/myserver/src/protocol/control/control_protocol.cpp
+++ b/myserver/src/protocol/control/control_protocol.cpp
@@ -27,15 +27,14 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #include <include/base/file/files_utility.h>
 #include <string.h>
 
-extern "C" 
+extern "C"
 {
 #ifdef WIN32
-#include <direct.h>
-#include <errno.h>
-#endif
-#ifndef WIN32
-#include <string.h>
-#include <errno.h>
+# include <direct.h>
+# include <errno.h>
+#else
+# include <string.h>
+# include <errno.h>
 #endif
 }
 #include <string>
@@ -63,15 +62,14 @@ struct ControlProtocolVisitorArg
 };
 
 /*!
- *Returns the name of the protocol. If an out buffer is defined 
+ *Returns the name of the protocol. If an out buffer is defined
  *fullfill it with the name too.
  */
 char* ControlProtocol::registerName (char* out,int len)
 {
   if (out)
-  {
-    strncpy (out,"CONTROL",len);
-  }
+    strncpy (out, "CONTROL", len);
+
   return (char*)"CONTROL";
 }
 
@@ -115,7 +113,7 @@ int ControlProtocol::loadProtocol (XmlParser* languageParser)
   if (data && (!strcmpi (data, "YES")))
   {
     controlEnabled = 1;
-  }  
+  }
   else
   {
     controlEnabled = 0;
@@ -125,27 +123,27 @@ int ControlProtocol::loadProtocol (XmlParser* languageParser)
   if (data)
   {
     strncpy (tmpName, data, 64);
-  }  
+  }
 
   data = Server::getInstance ()->getHashedData ("control.password");
   if (data)
   {
     strncpy (tmpPassword, data, 64);
-  }  
+  }
 
   data = Server::getInstance ()->getHashedData ("control.admin.md5");
   if (data)
   {
     if (strcmpi (data, "YES") == 0)
       adminNameMD5ized = 1;
-  }  
+  }
 
   data = Server::getInstance ()->getHashedData ("control.password.md5");
   if (data)
   {
     if (strcmpi (data, "YES") == 0)
       adminPasswordMD5ized = 1;
-  }  
+  }
 
   if (adminNameMD5ized)
   {
@@ -263,340 +261,288 @@ int ControlProtocol::controlConnection (ConnectionPtr a, char *b1, char *b2,
     sendResponse(b2, bs2, a, ret, header, 0);
     return 0;
   }
-  specifiedLength = header.getLength();
-  version = header.getVersion();
+  specifiedLength = header.getLength ();
+  version = header.getVersion ();
   timeout=getTicks();
   if (specifiedLength)
   {
     inFile = new File ();
     if (inFile == 0)
     {
-      strncpy (b2,"Control: Error allocating memory",strlen (b2));
-      addToErrorLog (a,b2, strlen (b2), header);
-      sendResponse(b2, bs2, a, CONTROL_INTERNAL, header, 0);
-      return 0;                                   
+      a->host->warningsLogWrite (_("Control: internal error"));
+      return 0;
     }
 
     inFilePath << getdefaultwd(0,0) << "/ControlInput_" << (u_int) id;
-  
+
     ret = inFile->createTemporaryFile (inFilePath.str().c_str());
     if (ret)
-    {
-      strcpy (b2,"Control: Error in the temporary file creation");
-      addToErrorLog (a,b2, strlen (b2), header);
-      sendResponse(b2, bs2, a, CONTROL_INTERNAL, header, 0);
-      inFile->close ();
-      FilesUtility::deleteFile (inFilePath.str().c_str());
-      delete inFile;
-      return 0;
-    }
-    if (nbtr - realHeaderLength)
-    {
-      ret = inFile->writeToFile (b1 + realHeaderLength, nbtr - realHeaderLength,
-                               &nbw);
-      dataWritten += nbw;
-      if (ret)
       {
-        strcpy (b2,"Control: Error writing to temporary file");
-        addToErrorLog (a,b2, strlen (b2), header);
-        sendResponse(b2, bs2, a, CONTROL_INTERNAL, header, 0);
+        a->host->warningsLogWrite (_("Control: internal error"));
+        sendResponse (b2, bs2, a, CONTROL_INTERNAL, header, 0);
         inFile->close ();
         FilesUtility::deleteFile (inFilePath.str().c_str());
         delete inFile;
-        inFile=0;
         return 0;
       }
-    }
+    if (nbtr - realHeaderLength)
+      {
+        ret = inFile->writeToFile (b1 + realHeaderLength, nbtr - realHeaderLength,
+                                   &nbw);
+        dataWritten += nbw;
+        if (ret)
+          {
+            a->host->warningsLogWrite (_("Control: internal error"));
+            sendResponse(b2, bs2, a, CONTROL_INTERNAL, header, 0);
+            inFile->close ();
+            FilesUtility::deleteFile (inFilePath.str().c_str());
+            delete inFile;
+            inFile=0;
+            return 0;
+          }
+      }
   }
 
   /* Check if there are other bytes waiting to be read. */
   if (specifiedLength && (specifiedLength != static_cast<int>(nbtr - realHeaderLength) ))
-  {
-    /* Check if we can read all the specified data. */
-    while (specifiedLength != static_cast<int>(nbtr - realHeaderLength))
     {
-      if (a->socket->bytesToRead())
-      {
-        ret = a->socket->recv(b2, bs2, 0);
-        if (ret == -1)
+      /* Check if we can read all the specified data. */
+      while (specifiedLength != static_cast<int>(nbtr - realHeaderLength))
         {
-          strcpy (b2,"Control: Error in communication");
-          addToErrorLog (a,b2, strlen (b2), header);
-          sendResponse (b2, bs2, a, CONTROL_INTERNAL, header, 0);
-          inFile->close ();
-          FilesUtility::deleteFile (inFilePath.str().c_str());
-          delete inFile;
-          inFile=0;
-          return -1;
+          if (a->socket->bytesToRead())
+            {
+              ret = a->socket->recv(b2, bs2, 0);
+              if (ret == -1)
+                {
+                  a->host->warningsLogWrite (_("Control: internal error"));
+                  sendResponse (b2, bs2, a, CONTROL_INTERNAL, header, 0);
+                  inFile->close ();
+                  FilesUtility::deleteFile (inFilePath.str().c_str());
+                  delete inFile;
+                  inFile=0;
+                  return -1;
+                }
+              ret = inFile->writeToFile (b2, ret, &nbw);
+              dataWritten += nbw;
+              if (ret)
+                {
+                  a->host->warningsLogWrite (_("Control: internal error"));
+                  sendResponse (b2, bs2, a, CONTROL_INTERNAL, header, 0);
+                  inFile->close ();
+                  FilesUtility::deleteFile (inFilePath.str().c_str());
+                  delete inFile;
+                  inFile=0;
+                }
+
+              if (dataWritten >=  specifiedLength)
+                break;
+              timeout = getTicks();
+            }
+          else if (getTicks() - timeout > MYSERVER_SEC(5))
+            {
+              sendResponse (b2, bs2, a, CONTROL_BAD_LEN, header, 0);
+              inFile->close ();
+              FilesUtility::deleteFile (inFilePath.str().c_str());
+              delete inFile;
+              inFile=0;
+              return 0;
+            }
+          else
+            {
+              /* Wait a bit.  */
+              Thread::wait (2);
+            }
         }
-        ret = inFile->writeToFile (b2, ret, &nbw);
-        dataWritten += nbw;
-        if (ret)
+    }
+  if (inFile)
+    {
+      inFile->seek (0);
+    }
+
+  if (strcmpi (version, "CONTROL/1.0"))
+    {
+      a->host->warningsLogWrite (_("Control: specified version not supported"));
+      if (inFile)
         {
-          strcpy (b2,"Control: Error trying to write on the temporary file");
-          addToErrorLog (a,b2, strlen (b2), header);
-          sendResponse (b2, bs2, a, CONTROL_INTERNAL, header, 0);
           inFile->close ();
           FilesUtility::deleteFile (inFilePath.str().c_str());
           delete inFile;
-          inFile=0;
+          inFile = 0;
         }
-      
-        if (dataWritten >=  specifiedLength)
-          break;
-        timeout = getTicks();
-      }
-      else if (getTicks() - timeout > MYSERVER_SEC(5))
-      {
-        strcpy (b2,"Control: Bad content length specified");
-        addToErrorLog (a,b2, strlen (b2), header);
-        sendResponse (b2, bs2, a, CONTROL_BAD_LEN, header, 0);
-        inFile->close ();
-        FilesUtility::deleteFile (inFilePath.str().c_str());
-        delete inFile;
-        inFile=0;
-        return 0;
-      }
-      else
-      {
-        /* Wait a bit.  */
-        Thread::wait (2);
-      }
+      sendResponse(b2, bs2, a, CONTROL_BAD_VERSION, header, 0);
+      return 0;
     }
-  }
-  if (inFile)
-  {
-    inFile->seek (0);
-  }
 
-  if (strcmpi (version, "CONTROL/1.0"))
-  {
-    strcpy (b2,"Control: Bad version specified");
-    addToErrorLog (a,b2, strlen (b2), header);
-    if (inFile)
-    {
-      inFile->close ();
-      FilesUtility::deleteFile (inFilePath.str().c_str());
-      delete inFile;
-      inFile=0;
-    }
-    sendResponse(b2, bs2, a, CONTROL_BAD_VERSION, header, 0);
-    return 0;
-  }
-     
   authorized = checkAuth(header);
 
-  /* 
+  /*
    *If the client is not authorized remove the connection.
    */
   if (authorized == 0)
-  {
-    strcpy (b2,"Control: Bad authorization");
-    addToErrorLog (a,b2, strlen (b2), header);
-    if (inFile)
     {
-      inFile->close ();
-      FilesUtility::deleteFile (inFilePath.str().c_str());
-      delete inFile;
-      inFile=0;
+      if (inFile)
+        {
+          inFile->close ();
+          FilesUtility::deleteFile (inFilePath.str().c_str());
+          delete inFile;
+          inFile=0;
+        }
+      sendResponse(b2, bs2, a, CONTROL_AUTH, header, 0);
+      return 0;
     }
-    sendResponse(b2, bs2, a, CONTROL_AUTH, header, 0);
-    return 0;
-  }
   /*
-   *If the specified length is different from the length that the 
+   *If the specified length is different from the length that the
    *server can read, remove the connection.
    */
   if (dataWritten != specifiedLength)
-  {
-    strcpy (b2,"Control: Bad content length specified");
-    addToErrorLog (a,b2, strlen (b2), header);
-    if (inFile)
     {
-      inFile->close ();
-      FilesUtility::deleteFile (inFilePath.str().c_str());
-      delete inFile;
-      inFile=0;
+      if (inFile)
+        {
+          inFile->close ();
+          FilesUtility::deleteFile (inFilePath.str().c_str());
+          delete inFile;
+          inFile = 0;
+        }
+      sendResponse(b2, bs2, a, CONTROL_BAD_LEN, header, 0);
+      return 0;
     }
-    sendResponse(b2, bs2, a, CONTROL_BAD_LEN, header, 0);
-    return 0;
-  }
 
   command = header.getCommand();
   opt     = header.getOptions();
 
   knownCommand = 0;
 
-  /* 
+  /*
    *Create an out file. This can be used by commands that
    *needs it.
    */
   outFile = new File ();
-  if (outFile == 0)
-  {
-    strcpy (b2,"Control: Error in allocating memory");
-    addToErrorLog (a,b2, strlen (b2), header);
-    sendResponse (b2, bs2, a, CONTROL_INTERNAL, header, 0);
-    inFile->close ();
-    FilesUtility::deleteFile (inFilePath.str().c_str());
-    delete inFile;
-    inFile=0;
-    return 0;                                   
-  }
+  outFilePath << getdefaultwd (0, 0) << "/ControlOutput_" << (u_int) id;
 
-  outFilePath << getdefaultwd(0, 0) << "/ControlOutput_" << (u_int) id;
-  
   ret = outFile->createTemporaryFile (outFilePath.str().c_str());
   if (ret)
-  {
-    strcpy (b2,"Control: Error creating temporary file");
-    addToErrorLog (a,b2, strlen (b2), header);
-    sendResponse (b2, bs2, a, CONTROL_INTERNAL, header, 0);
-    delete outFile;
-    inFile->close ();
-    delete inFile;
-
-    FilesUtility::deleteFile (inFilePath.str().c_str());
-    FilesUtility::deleteFile (outFilePath.str().c_str());
-
-    inFile=0;
-    outFile=0;
-    return 0;
-  }
+    {
+      a->host->warningsLogWrite (_("Control: internal error"));
+      sendResponse (b2, bs2, a, CONTROL_INTERNAL, header, 0);
+      delete outFile;
+      inFile->close ();
+      delete inFile;
+
+      FilesUtility::deleteFile (inFilePath.str().c_str());
+      FilesUtility::deleteFile (outFilePath.str().c_str());
+
+      inFile=0;
+      outFile=0;
+      return 0;
+    }
   if (!strcmp(command, "SHOWCONNECTIONS"))
-  {
-    knownCommand = 1;
-    ret = showConnections(a, outFile, b1, bs1, header);
-  }
+    {
+      knownCommand = 1;
+      ret = showConnections(a, outFile, b1, bs1, header);
+    }
   else if (!strcmp (command, "KILLCONNECTION"))
-  {
-    char buff[11];
-    u_long id;
-    knownCommand = 1;
-    strncpy (buff, header.getOptions (), 10 );
-    buff[10] = '\0';
-    id = header.getOptions () ? atol (buff) : 0;
-    ret = killConnection(a, id, outFile, b1, bs1, header);
-  }
+    {
+      char buff[11];
+      u_long id;
+      knownCommand = 1;
+      strncpy (buff, header.getOptions (), 10 );
+      buff[10] = '\0';
+      id = header.getOptions () ? atol (buff) : 0;
+      ret = killConnection(a, id, outFile, b1, bs1, header);
+    }
   else if (!strcmp(command, "REBOOT"))
-  {
-    knownCommand = 1;
-    Server::getInstance ()->rebootOnNextLoop ();
-    ret = 0;
-  }
+    {
+      knownCommand = 1;
+      Server::getInstance ()->rebootOnNextLoop ();
+      ret = 0;
+    }
   else if (!strcmp(command, "GETFILE"))
-  {
-    knownCommand = 1;
-    ret = getFile (a,header.getOptions (), inFile, outFile, b1, bs1, header);
-  }
+    {
+      knownCommand = 1;
+      ret = getFile (a,header.getOptions (), inFile, outFile, b1, bs1, header);
+    }
   else if (!strcmp(command, "PUTFILE"))
-  {
-    knownCommand = 1;
-    ret = putFile (a,header.getOptions (), inFile, outFile, b1, bs1, header);
-  }
+    {
+      knownCommand = 1;
+      ret = putFile (a,header.getOptions (), inFile, outFile, b1, bs1, header);
+    }
   else if (!strcmp(command, "DISABLEREBOOT"))
-  {
-    Server::getInstance ()->disableAutoReboot ();
-    knownCommand = 1;
+    {
+      Server::getInstance ()->disableAutoReboot ();
+      knownCommand = 1;
 
-  }
+    }
   else if (!strcmp(command, "ENABLEREBOOT"))
-  {
-    Server::getInstance ()->enableAutoReboot();
-    knownCommand = 1;
+    {
+      Server::getInstance ()->enableAutoReboot();
+      knownCommand = 1;
 
-  }
+    }
   else if (!strcmp(command, "SHOWLANGUAGEFILES"))
-  {
-    knownCommand = 1;
-    ret = showLanguageFiles(a, outFile, b1, bs1, header);
-  }
-  else if (!strcmp(command, "VERSION"))
-  {
-    knownCommand = 1;
-    ret = getVersion(a, outFile, b1, bs1, header);
-  }
-
-  if (knownCommand)
-  {
-    char *connection;
-    outFile->seek (0);
-    if (ret)
     {
-      sendResponse(b2, bs2, a, CONTROL_INTERNAL, header, 0);
+      knownCommand = 1;
+      ret = showLanguageFiles(a, outFile, b1, bs1, header);
     }
-    else
-      sendResponse(b2, bs2, a, CONTROL_OK, header, outFile);
-    if (inFile)
+  else if (!strcmp(command, "VERSION"))
     {
-      inFile->close ();
-      delete inFile;
-      inFile=0;
+      knownCommand = 1;
+      ret = getVersion(a, outFile, b1, bs1, header);
     }
-    if (outFile)
-    {
-      outFile->close ();
-      delete outFile;
-      outFile=0;
-    }
-    FilesUtility::deleteFile (inFilePath.str().c_str());
-    FilesUtility::deleteFile (outFilePath.str().c_str());
-    connection = header.getConnection();
-    /* 
-     *If the Keep-Alive was specified keep the connection in the
-     *active connections list.
-     */
-    if (!strcmpi (connection,"keep-alive"))
-      return 1;
-    else 
-      return 0;
-  }
-  else
-  {
-    strcpy (b2,"Control: Command unknown");
-    addToErrorLog (a,b2, strlen (b2), header);
-    sendResponse(b2, bs2, a, CONTROL_CMD_NOT_FOUND, header, 0);
 
-    if (inFile)
+  if (knownCommand)
     {
-      inFile->close ();
-      delete inFile;
-      inFile = NULL;
+      char *connection;
+      outFile->seek (0);
+      if (ret)
+        {
+          sendResponse(b2, bs2, a, CONTROL_INTERNAL, header, 0);
+        }
+      else
+        sendResponse(b2, bs2, a, CONTROL_OK, header, outFile);
+      if (inFile)
+        {
+          inFile->close ();
+          delete inFile;
+          inFile=0;
+        }
+      if (outFile)
+        {
+          outFile->close ();
+          delete outFile;
+          outFile=0;
+        }
+      FilesUtility::deleteFile (inFilePath.str().c_str());
+      FilesUtility::deleteFile (outFilePath.str().c_str());
+      connection = header.getConnection();
+      /*
+       *If the Keep-Alive was specified keep the connection in the
+       *active connections list.
+       */
+      if (!strcmpi (connection,"keep-alive"))
+        return 1;
+      else
+        return 0;
     }
-    if (outFile)
+  else
     {
-      outFile->close ();
-      delete outFile;
-      outFile = NULL;
-    }
-    FilesUtility::deleteFile (inFilePath.str().c_str());
-    FilesUtility::deleteFile (outFilePath.str().c_str());
-    return 0;
-  }
-}
-
-/*!
- *Add the entry to the error log file.
- */
-int ControlProtocol::addToErrorLog (ConnectionPtr con, const char *b1, int bs1,
-                                   ControlHeader& header)
-{
-  string time;
-  ostringstream out;
-  /*
-   *Check that the verbosity is at least 1.
-   */
-  if (Server::getInstance ()->getVerbosity() < 1)
-    return 0;
-
-  getRFC822GMTTime (time, 32);
-  
-  getRFC822GMTTime (time, 32);
-
-  out << con->getIpAddr() << " [" << time.c_str() << "] " << b1;
-  ((Vhost*)(con->host))->warningsLogWrite (out.str ().c_str ());
+      sendResponse(b2, bs2, a, CONTROL_CMD_NOT_FOUND, header, 0);
 
-  return 0;
+      if (inFile)
+        {
+          inFile->close ();
+          delete inFile;
+          inFile = NULL;
+        }
+      if (outFile)
+        {
+          outFile->close ();
+          delete outFile;
+          outFile = NULL;
+        }
+      FilesUtility::deleteFile (inFilePath.str().c_str());
+      FilesUtility::deleteFile (outFilePath.str().c_str());
+      return 0;
+    }
 }
 
 /*!
@@ -613,11 +559,10 @@ int ControlProtocol::addToLog (int retCode, ConnectionPtr con, char *b1,
 #else
   sprintf(b1,
 #endif
-          "%s [%s] %s:%s:%s - %s  - %i\r\n", con->getIpAddr (), time.c_str (), 
-          header.getCommand (),  header.getVersion (), header.getOptions (), 
-          header.getAuthLogin () , retCode);
-
-           ((Vhost*)(con->host))->accessesLogWrite (b1);
+  "%s [%s] %s:%s:%s - %s  - %i\r\n", con->getIpAddr (), time.c_str (),
+  header.getCommand (),  header.getVersion (), header.getOptions (),
+  header.getAuthLogin () , retCode);
+  con->host->accessesLogWrite ("%s", b1);
   return 0;
 }
 
@@ -625,19 +570,16 @@ int ControlProtocol::addToLog (int retCode, ConnectionPtr con, char *b1,
  *Send the response with status=errID and the data contained in the outFile.
  *Return nonzero on errors.
  */
-int ControlProtocol::sendResponse (char *buffer, int buffersize, 
-                                   ConnectionPtr conn, int errID, 
+int ControlProtocol::sendResponse (char *buffer, int buffersize,
+                                   ConnectionPtr a, int errID,
                                    ControlHeader& header, File* outFile)
 {
   u_long dataLength = 0;
   int err;
-  err = addToLog (errID, conn, buffer, buffersize, header);
+  err = addToLog (errID, a, buffer, buffersize, header);
   if (err)
-  {
-    strcpy (buffer,"Control: Error registering the connection to the log");
-    addToErrorLog (conn,buffer, strlen (buffer), header);
     return err;
-  }
+
   if (outFile)
     dataLength = outFile->getFileSize ();
   /* Build and send the first line.  */
@@ -646,13 +588,12 @@ int ControlProtocol::sendResponse (char *buffer, int buffersize,
 #else
   sprintf (buffer,
 #endif
-           "/%i\r\n", errID);
+          "/%i\r\n", errID);
 
-  err = conn->socket->send (buffer, strlen (buffer), 0);
+  err = a->socket->send (buffer, strlen (buffer), 0);
   if (err == -1)
   {
-    strcpy (buffer,"Control: Error sending data");
-    addToErrorLog (conn,buffer, strlen (buffer), header);
+    a->host->warningsLogWrite (_("Control: socket error"));
     return -1;
   }
 
@@ -660,24 +601,22 @@ int ControlProtocol::sendResponse (char *buffer, int buffersize,
 #ifdef HAVE_SNPRINTF
   snprintf(buffer, buffersize,
 #else
-  sprintf(buffer, 
-#endif 
+  sprintf(buffer,
+#endif
           "/LEN %u\r\n", (u_int)dataLength);
- 
-  err = conn->socket->send (buffer, strlen (buffer), 0);
-  if (err == -1)
+
+  err = a->socket->send (buffer, strlen (buffer), 0);
+           if (err == -1)
   {
-    strcpy (buffer,"Control: Error sending data");
-    addToErrorLog (conn,buffer, strlen (buffer), header);
+    a->host->warningsLogWrite (_("Control: socket error"));
     return -1;
   }
 
   /* Send the end of the header.  */
-  err = conn->socket->send ("\r\n", 2, 0);
+  err = a->socket->send ("\r\n", 2, 0);
   if (err == -1)
   {
-    strcpy (buffer,"Control: Error sending data");
-    addToErrorLog (conn,buffer, strlen (buffer), header);
+    a->host->warningsLogWrite (_("Control: socket error"));
     return -1;
   }
 
@@ -691,24 +630,22 @@ int ControlProtocol::sendResponse (char *buffer, int buffersize,
       err = outFile->read(buffer, min (dataToSend, buffersize), &nbr);
       if (err)
       {
-        strcpy (buffer,"Control: Error reading from temporary file");
-        addToErrorLog (conn, buffer, strlen (buffer), header);
+        a->host->warningsLogWrite (_("Control: internal error"));
         return -1;
       }
       dataToSend -= nbr;
-      err = conn->socket->send (buffer, nbr, 0);
+      err = a->socket->send (buffer, nbr, 0);
       if (dataToSend == 0)
         break;
       if (err == -1)
       {
-        strcpy (buffer,"Control: Error sending data");
-        addToErrorLog (conn,buffer, strlen (buffer), header);
+        a->host->warningsLogWrite (_("Control: socket error"));
         return -1;
       }
     }
   }
 
-  return 0; 
+  return 0;
 }
 
 /*!
@@ -724,20 +661,19 @@ int  ControlProtocol::showConnections (ConnectionPtr a,File* out, char *b1,
   args.b1 = b1;
   args.bs1 = bs1;
   args.header = &header;
-  
+
   return Server::getInstance ()->getConnectionsScheduler ()->accept (this, &args);
 }
 
 /*!
  *Kill a connection by its ID.
  */
-int ControlProtocol::killConnection(ConnectionPtr a, u_long id, File* out, 
+int ControlProtocol::killConnection(ConnectionPtr a, u_long id, File* out,
                                     char *b1, int bs1, ControlHeader& header)
 {
   if (id == 0)
     return -1;
 
-
   ControlProtocolVisitorArg args;
   args.command = ControlProtocolVisitorArg::KILL_CONNECTION;
   args.connection = a;
@@ -751,10 +687,10 @@ int ControlProtocol::killConnection(ConnectionPtr a, u_long id, File* out,
 
   return 0;
 }
-           
+
 /*!
  *Visitor.
- */ 
+ */
 int ControlProtocol::visitConnection (ConnectionPtr con, void* argP)
 {
   int ret = 0;
@@ -765,36 +701,35 @@ int ControlProtocol::visitConnection (ConnectionPtr con, void* argP)
   {
 #ifdef HAVE_SNPRINTF
     snprintf (arg->b1, arg->bs1, "%i - %s - %i - %s - %i - %s - %s\r\n",
-             static_cast<int>(con->getID()),  con->getIpAddr(), 
-             static_cast<int>(con->getPort()), 
-             con->getLocalIpAddr(),  static_cast<int>(con->getLocalPort()), 
+             static_cast<int>(con->getID()),  con->getIpAddr(),
+             static_cast<int>(con->getPort()),
+             con->getLocalIpAddr(),  static_cast<int>(con->getLocalPort()),
              con->getLogin(), con->getPassword());
 #else
     sprintf (arg->b1, "%i - %s - %i - %s - %i - %s - %s\r\n",
-            static_cast<int>(con->getID()),  con->getIpAddr(), 
-            static_cast<int>(con->getPort()), 
-            con->getLocalIpAddr(),  static_cast<int>(con->getLocalPort()), 
+            static_cast<int>(con->getID()),  con->getIpAddr(),
+            static_cast<int>(con->getPort()),
+            con->getLocalIpAddr(),  static_cast<int>(con->getLocalPort()),
             con->getLogin(), con->getPassword());
 #endif
-           
+
     ret = arg->out->writeToFile (arg->b1, strlen (arg->b1), &nbw);
 
     if (ret)
-    {
-      strcpy (arg->b1,"Control: Error while writing to file");
-      addToErrorLog (arg->connection, arg->b1, strlen (arg->b1), *arg->header);
-      return ret;
-    }
+      {
+        con->host->warningsLogWrite (_("Control: internal error"));
+        return ret;
+      }
   }
   else if (arg->command == ControlProtocolVisitorArg::KILL_CONNECTION)
-  {
-    if (con->getID () == arg->id)
     {
-      /* Define why the connection is killed.  */
-      con->setToRemove (Connection::USER_KILL);
-      return 1;
+      if (con->getID () == arg->id)
+        {
+          /* Define why the connection is killed.  */
+          con->setToRemove (Connection::USER_KILL);
+          return 1;
+        }
     }
-  }
 
   return 0;
 }
@@ -802,7 +737,7 @@ int ControlProtocol::visitConnection (ConnectionPtr con, void* argP)
 
 
 /*!
- *Return the requested file to the client.
+ * Return the requested file to the client.
  */
 int ControlProtocol::getFile (ConnectionPtr a, char* fn, File* in, File* out,
                               char *b1,int bs1, ControlHeader& header)
@@ -824,65 +759,47 @@ int ControlProtocol::getFile (ConnectionPtr a, char* fn, File* in, File* out,
   else if (!strcmpi (fn, "virtualhosts.xml"))
     filename = Server::getInstance ()->getVhostConfFile ();
   else if (!FilesUtility::fileExists (fn))
-  {
-    /* If we cannot find the file send the right error ID.  */
-    string msg;
-    msg.assign ("Control: Requested file doesn't exist ");
-    msg.append (fn);
-    addToErrorLog (a, msg, header);
     return CONTROL_FILE_NOT_FOUND;
-  }
   else
-  {
-    filename = fn;    
-  }
-  
+    filename = fn;
+
   ret = localfile.openFile (filename, File::READ | File::OPEN_IF_EXISTS);
 
   /* An internal server error happens.  */
   if (ret)
-  {
-    string msg;
-    msg.assign ("Control: Error while opening the file ");
-    msg.append (filename);
-    addToErrorLog (a, msg, header);
+    {
+    a->host->warningsLogWrite (_("Control: internal error"));
     return CONTROL_INTERNAL;
-  }
+    }
   for(;;)
-  {
+    {
     ret = localfile.read(b1, bs1, &nbr);
     if (ret)
-    {
-      string msg;
-      msg.assign ("Control: Error while reading from file ");
-      msg.append (filename);
-      addToErrorLog (a, msg, header);
-      return CONTROL_INTERNAL;
-    }
+      {
+        a->host->warningsLogWrite (_("Control: internal error"));
+        return CONTROL_INTERNAL;
+      }
 
     /* Break the loop when we can't read no more data.  */
     if (!nbr)
       break;
-    
+
     ret = out->writeToFile (b1, nbr, &nbw);
 
     if (ret)
-    {
-      string msg;
-      msg.assign ("Control: Error while writing to file ");
-      msg.append (filename);
-      addToErrorLog (a, msg, header);
-      return CONTROL_INTERNAL;
-    }
+      {
+        a->host->warningsLogWrite (_("Control: internal error"));
+        return CONTROL_INTERNAL;
+      }
 
-  }
+    }
 
   localfile.close ();
   return 0;
 }
 
 /*!
- *Save the file on the local FS.
+ * Save the file on the local FS.
  */
 int ControlProtocol::putFile (ConnectionPtr a, char* fn, File* in,
                               File* out, char *b1,int bs1, ControlHeader& header)
@@ -904,74 +821,62 @@ int ControlProtocol::putFile (ConnectionPtr a, char* fn, File* in,
   else if (!strcmpi (fn, "virtualhosts.xml"))
     filename = Server::getInstance ()->getVhostConfFile ();
   else
-    filename = fn;    
+    filename = fn;
 
   /* Remove the file before create it.  */
   ret = FilesUtility::deleteFile (filename);
 
   /* An internal server error happens.  */
   if (ret)
-  {
-    strcpy (b1,"Control: Error deleting the file");
-    addToErrorLog (a, b1, strlen (b1), header);
-    return CONTROL_INTERNAL;
-  }
+    {
+      a->host->warningsLogWrite (_("Control: internal error"));
+      return CONTROL_INTERNAL;
+    }
 
   ret = localfile.openFile (filename, File::WRITE | File::FILE_OPEN_ALWAYS);
 
   /* An internal server error happens.  */
   if (ret)
-  {
-    string msg;
-    msg.assign ("Control: Error while opening the file ");
-    msg.append (filename);
-    addToErrorLog (a, msg, header);
-    return CONTROL_INTERNAL;
-  }
+    {
+      a->host->warningsLogWrite (_("Control: internal error"));
+      return CONTROL_INTERNAL;
+    }
 
   if (in == NULL)
-  {
-    string msg;
-    msg.assign ("Control: invalid input file ");
-    msg.append (filename);
-    addToErrorLog (a, msg, header);
-    return CONTROL_INTERNAL;
-  }
-
-  for(;;)
-  {
-    ret = in->read(b1, bs1, &nbr);
-    if (ret)
     {
-      string msg;
-      msg.assign ("Control: Error while reading to file ");
-      msg.append (filename);
-      addToErrorLog (a, msg, header);
+      a->host->warningsLogWrite (_("Control: internal error"));
       return CONTROL_INTERNAL;
     }
 
-    /* Break the loop when we can't read no more data.  */
-    if (!nbr)
-      break;
-    
-    ret = localfile.writeToFile (b1, nbr, &nbw);
-
-    if (ret)
+  for(;;)
     {
-      string msg;
-      msg.assign ("Control: Error while writing to file ");
-      msg.append (filename);
-      addToErrorLog (a, msg, header);
-      return CONTROL_INTERNAL;
+      ret = in->read(b1, bs1, &nbr);
+
+      if (ret)
+        {
+          a->host->warningsLogWrite (_("Control: internal error"));
+          return CONTROL_INTERNAL;
+        }
+
+      /* Break the loop when we can't read no more data.  */
+      if (!nbr)
+        break;
+
+      ret = localfile.writeToFile (b1, nbr, &nbw);
+
+      if (ret)
+        {
+          a->host->warningsLogWrite (_("Control: internal error"));
+          return CONTROL_INTERNAL;
+        }
     }
-  }
   localfile.close ();
 
   return 0;
 }
 
 /*!
- *Show all the language files that the server can use.
+ * Show all the language files that the server can use.
  */
 int ControlProtocol::showLanguageFiles (ConnectionPtr a, File* out,
                                         char *b1,int bs1, ControlHeader& header)
@@ -981,50 +886,45 @@ int ControlProtocol::showLanguageFiles (ConnectionPtr a, File* out,
   FindData fd;
   int ret = 0;
   if (path == 0)
-  {
-    strcpy (b1,"Control: Error retrieving the language files path");
-    addToErrorLog (a,b1, strlen (b1), header);
-    return CONTROL_INTERNAL;
-  }
+    {
+      a->host->warningsLogWrite (_("Control: internal error"));
+      return CONTROL_INTERNAL;
+    }
   searchPath.assign (path);
-  
+
 #ifdef WIN32
   searchPath.append ("*.xml");
 #endif
   ret=fd.findfirst (searchPath.c_str ());
   if (ret == -1)
-  {
-    strcpy (b1, "Control: Error in directory lookup");
-    addToErrorLog (a, b1, strlen (b1), header);
-    return CONTROL_INTERNAL;
-  }
-  do
-  {
-    string filename;
-    string ext;
-    u_long nbw = 0;
-    /* Do not show files starting with a dot.  */
-    if (fd.name[0]=='.')
-      continue;
- 
-    filename.assign (fd.name);
-    FilesUtility::getFileExt (ext, filename);
-    if (stringcmpi (ext, "xml") == 0)
     {
-      ret = out->writeToFile (filename.c_str(), filename.length(), &nbw);
-      if (ret == 0)
-        ret = out->writeToFile ("\r\n", 2, &nbw);
+      a->host->warningsLogWrite (_("Control: internal error"));
+      return CONTROL_INTERNAL;
     }
-
-    if (ret)
+  do
     {
-      string outMsg;
-      outMsg.assign ("Control: Error while writing to temporary file ");
-      outMsg.append (filename);
-      addToErrorLog (a,outMsg, header);
-      return CONTROL_INTERNAL;
+      string filename;
+      string ext;
+      u_long nbw = 0;
+      /* Do not show files starting with a dot.  */
+      if (fd.name[0]=='.')
+        continue;
+
+      filename.assign (fd.name);
+      FilesUtility::getFileExt (ext, filename);
+      if (stringcmpi (ext, "xml") == 0)
+        {
+          ret = out->writeToFile (filename.c_str(), filename.length(), &nbw);
+          if (ret == 0)
+            ret = out->writeToFile ("\r\n", 2, &nbw);
+        }
+
+      if (ret)
+        {
+          a->host->warningsLogWrite (_("Control: internal error"));
+          return CONTROL_INTERNAL;
+        }
     }
-  }
   while (!fd.findnext ());
   fd.findclose ();
   return 0;
@@ -1037,8 +937,8 @@ int ControlProtocol::getVersion (ConnectionPtr a, File* out, char *b1, int bs1,
                                  ControlHeader& header)
 {
   u_long nbw;
-  
+
   myserver_strlcpy (b1, MYSERVER_VERSION, bs1);
- 
+
   return out->writeToFile (b1, strlen (b1), &nbw);
 }
diff --git a/myserver/src/protocol/ftp/ftp.cpp b/myserver/src/protocol/ftp/ftp.cpp
index 2eb65cf..f090a21 100755
--- a/myserver/src/protocol/ftp/ftp.cpp
+++ b/myserver/src/protocol/ftp/ftp.cpp
@@ -462,7 +462,7 @@ void Ftp::logAccess (int nReplyCode, const std::string & sCustomText)
 #endif
 
   if (td.pConnection->host)
-    td.pConnection->host->accessesLogWrite (td.secondaryBuffer->getBuffer ());
+    td.pConnection->host->accessesLogWrite ("%s", td.secondaryBuffer->getBuffer ());
 }
 
 int Ftp::closeDataConnection ()
@@ -475,17 +475,7 @@ int Ftp::closeDataConnection ()
 
 int Ftp::printError (const char *msg)
 {
-  /* Log the reply.  */
-  string time;
-  getLocalLogFormatDate (time, 32);
-
-  td.secondaryBuffer->setLength (0);
-  *td.secondaryBuffer << td.pConnection->getIpAddr ();
-  *td.secondaryBuffer << " " << time << " " << msg;
-
-  if (td.pConnection->host)
-    td.pConnection->host->warningsLogWrite (td.secondaryBuffer->getBuffer ());
-
+  td.pConnection->host->warningsLogWrite ("%s", msg);
   return 1;
 }
 
@@ -1365,7 +1355,7 @@ DEFINE_THREAD (ReceiveImageFile, pParam)
 #endif
         }
     }
-  
+
   if (pFtpuserData->m_pDataConnection == NULL ||
       pFtpuserData->m_pDataConnection->socket == NULL)
     {
@@ -1562,7 +1552,7 @@ Ftp::OpenDataConnection ()
   if (pFtpuserData->m_nFtpstate == FtpuserData::DATA_CONNECTION_UP)
     return 1;
 
-  int nRet = pFtpuserData->m_bPassiveSrv ? openDataPassive () 
+  int nRet = pFtpuserData->m_bPassiveSrv ? openDataPassive ()
                                          : openDataActive ();
   if (nRet != 0)
     pFtpuserData->m_nFtpstate = FtpuserData::DATA_CONNECTION_UP;
diff --git a/myserver/src/protocol/http/http.cpp b/myserver/src/protocol/http/http.cpp
index ac4e8fa..9562fee 100644
--- a/myserver/src/protocol/http/http.cpp
+++ b/myserver/src/protocol/http/http.cpp
@@ -117,18 +117,14 @@ int Http::optionsHTTPRESOURCE (string& filename, int yetmapped)
                                           (u_long) td->secondaryBuffer->getLength (), 0);
       if (ret == SOCKET_ERROR)
         {
-          string error;
-          error.assign ("HTTP<SOCKET ERROR>: unable to send ");
-          error.append (filename);
-          error.append (".");
-          td->connection->host->warningsLogWrite (error.c_str ());
+          td->connection->host->warningsLogWrite (_("HTTP: socket error"));
           return 0;
         }
       return 1;
     }
   catch (...)
     {
-      td->connection->host->warningsLogWrite ("HTTP<ERROR>: unable to build a response for an OPTION request.");
+      td->connection->host->warningsLogWrite (_("HTTP: internal error"));
       return raiseHTTPError (500);
     };
 }
@@ -172,11 +168,7 @@ int Http::traceHTTPRESOURCE (string& filename, int yetmapped)
                                           (u_long) td->secondaryBuffer->getLength (), 0);
       if (ret == SOCKET_ERROR)
         {
-          string error;
-          error.assign ("HTTP<SOCKET ERROR>: unable to send ");
-          error.append (filename);
-          error.append (".");
-          td->connection->host->warningsLogWrite (error.c_str ());
+          td->connection->host->warningsLogWrite (_("HTTP: socket error"));
           return 0;
         }
 
@@ -185,18 +177,14 @@ int Http::traceHTTPRESOURCE (string& filename, int yetmapped)
                                           contentLength, 0);
       if (ret == SOCKET_ERROR)
         {
-          string error;
-          error.assign ("HTTP<SOCKET ERROR>: unable to send ");
-          error.append (filename);
-          error.append (".");
-          td->connection->host->warningsLogWrite (error.c_str ());
+          td->connection->host->warningsLogWrite (_("HTTP: socket error"));
           return 0;
         }
       return 1;
     }
   catch (...)
     {
-      td->connection->host->warningsLogWrite ("HTTP<ERROR>: Unable to handle the HTTP TRACE command.");
+      td->connection->host->warningsLogWrite (_("HTTP: internal error"));
       return raiseHTTPError (500);
     };
 }
@@ -309,7 +297,7 @@ int Http::getFilePermissions (string& filename, string& directory, string& file,
           td->connection->protocolBuffer = new HttpUserData;
           if (!td->connection->protocolBuffer)
             {
-              td->connection->host->warningsLogWrite ("HTTP<ERROR>: Unable to access protocol buffer.");
+              td->connection->host->warningsLogWrite (_("HTTP: internal error"));
               return 500;
             }
           ((HttpUserData*) (td->connection->protocolBuffer))->reset ();
@@ -332,7 +320,7 @@ int Http::getFilePermissions (string& filename, string& directory, string& file,
       if (*permissions == -1)
         {
           td->connection->host->warningsLogWrite (
-                                   "HTTP<ERROR>: Error reading security file.");
+                                 _("HTTP: error accessing the security file"));
           return 500;
         }
 
@@ -383,11 +371,9 @@ int Http::getFilePermissions (string& filename, string& directory, string& file,
     }
   catch (...)
     {
-      string error;
-      error.assign ("HTTP<ERROR>: unable to get file permission: ");
-      error.append (filename);
-      error.append (".");
-      td->connection->host->warningsLogWrite (error.c_str ());
+      td->connection->host->warningsLogWrite (
+                                 _("HTTP: cannot get permissions for %s"),
+                                 filename.c_str ());
       return 500;
     }
 
@@ -429,7 +415,6 @@ int Http::preprocessHttpRequest (string& filename, int yetmapped, int* permissio
 
       ret = getFilePermissions (filename, directory, file,
                                 td->filenamePath, yetmapped, permissions);
-
       if (ret != 200)
         return ret;
 
@@ -513,11 +498,7 @@ int Http::preprocessHttpRequest (string& filename, int yetmapped, int* permissio
     }
   catch (...)
     {
-      string error;
-      error.assign ("HTTP<ERROR>: unable to preprocess HTTP request on file:  ");
-      error.append (filename);
-      error.append (".");
-      td->connection->host->warningsLogWrite (error.c_str ());
+      td->connection->host->warningsLogWrite (_("HTTP: internal error"));
       return 500;
     }
 
@@ -688,24 +669,14 @@ Http::sendHTTPResource (string& uri, int systemrequest, int onlyHeader,
 
       if (!manager)
         {
-          string error;
-          error.assign ("HTTP<ERROR>: unable to get SEND Http Manager on sending ");
-          error.append (uri);
-          error.append (".");
-          td->connection->host->warningsLogWrite (error.c_str ());
+          td->connection->host->warningsLogWrite (_("HTTP: internal error"));
           return raiseHTTPError (500);
         }
-
-
       return manager->send (td, td->filenamePath.c_str (), 0, onlyHeader);
     }
   catch (...)
     {
-      string error;
-      error.assign ("HTTP<ERROR>: unable to send ");
-      error.append (uri);
-      error.append (".");
-      td->connection->host->warningsLogWrite (error.c_str ());
+      td->connection->host->warningsLogWrite (_("HTTP: internal error"));
       return raiseHTTPError (500);
     };
 
@@ -788,9 +759,8 @@ int Http::logHTTPaccess ()
        * Request the access to the log file then append the message.
        */
       if (td->connection->host)
-        {
-          td->connection->host->accessesLogWrite (td->secondaryBuffer->getBuffer ());
-        }
+        td->connection->host->accessesLogWrite ("%s", td->secondaryBuffer->getBuffer ());
+
       td->secondaryBuffer->setLength (0);
     }
   catch (...)
@@ -1252,7 +1222,7 @@ int Http::controlConnection (ConnectionPtr a, char* /*b1*/, char* /*b2*/,
   catch (...)
     {
 
-      td->connection->host->warningsLogWrite ("HTTP<ERROR>: unable to handle the HTTP Request.");
+      td->connection->host->warningsLogWrite (_("HTTP: internal error"));
       return raiseHTTPError (500);
       logHTTPaccess ();
       return ClientsThread::DELETE_CONNECTION;
@@ -1365,7 +1335,7 @@ int Http::requestAuthorization ()
   if (td->connection->socket->send (td->secondaryBuffer->getBuffer (),
                                     td->secondaryBuffer->getLength (), 0) == -1)
     {
-      td->connection->host->warningsLogWrite ("HTTP<SOCKET ERROR>: unable to send the authorization request.");
+      td->connection->host->warningsLogWrite (_("HTTP: socket error"));
       return 0;
     }
   return 1;
@@ -1401,7 +1371,7 @@ int Http::raiseHTTPError (int ID)
 
       if (td->lastError)
         {
-          td->connection->host->warningsLogWrite ("HTTP<ERROR>: recursive error.");
+          td->connection->host->warningsLogWrite (_("HTTP: recursive error"));
           return sendHTTPhardError500 ();
         }
 
@@ -1472,10 +1442,9 @@ int Http::raiseHTTPError (int ID)
               return sendHTTPResource (errorFileStr, 1, td->onlyHeader);
             }
           else
-            {
-              string error = "HTTP<ERROR>: The specified error page " + errorFile.str () + " does not exist";
-              td->connection->host->warningsLogWrite (error.c_str ());
-            }
+            td->connection->host->warningsLogWrite (_("HTTP: The specified error page: %s does not exist"),
+                                                    errorFile.str ().c_str ());
+
         }
 
       HttpErrors::getErrorMessage (ID, errorMessage);
@@ -1510,23 +1479,18 @@ int Http::raiseHTTPError (int ID)
                                                             errorBodyLength, 0)
                               == -1))
         {
-          td->connection->host->warningsLogWrite ("HTTP<ERROR>: unable to raise HTTP Error.");
+          td->connection->host->warningsLogWrite (_("HTTP: socket error"));
           return 0;
         }
 
 
       return 1;
     }
-  catch (bad_alloc &ba)
-    {
-      td->connection->host->warningsLogWrite ("HTTP<ERROR>: unable to raise HTTP Error.");
-      return 0;
-    }
   catch (...)
     {
-      td->connection->host->warningsLogWrite ("HTTP<ERROR>: unable to raise HTTP Error.");
+      td->connection->host->warningsLogWrite (_("HTTP: internal error"));
       return 0;
-    };
+    }
 }
 
 /*!
@@ -1731,7 +1695,7 @@ int Http::processDefaultFile (string& uri, int permissions, int onlyHeader)
 
   if (!handler)
     {
-      td->connection->host->warningsLogWrite ("HTTP<ERROR>: cannot find a valid handler.");
+      td->connection->host->warningsLogWrite (_("HTTP: internal error"));
       return raiseHTTPError (500);
     }
 
@@ -1766,7 +1730,7 @@ int Http::sendHTTPRedirect (const char *newURL)
   if (td->connection->socket->send (td->secondaryBuffer->getBuffer (),
                                     (int) td->secondaryBuffer->getLength (), 0) == -1)
     {
-      td->connection->host->warningsLogWrite ("HTTP<SOCKET ERROR>: unable to send a redirect message.");
+      td->connection->host->warningsLogWrite (_("HTTP: socket error"));
       return 0;
     }
 
@@ -1799,7 +1763,7 @@ int Http::sendHTTPNonModified ()
   if (td->connection->socket->send (td->secondaryBuffer->getBuffer (),
                                     (int) td->secondaryBuffer->getLength (), 0) == -1)
     {
-      td->connection->host->warningsLogWrite ("HTTP<SOCKET ERROR>: unable to send a non-modified message.");
+      td->connection->host->warningsLogWrite (_("HTTP: socket error"));
       return 0;
     }
   return 1;
diff --git a/myserver/src/protocol/http/http_data_handler.cpp b/myserver/src/protocol/http/http_data_handler.cpp
index dd05b5b..97daa19 100644
--- a/myserver/src/protocol/http/http_data_handler.cpp
+++ b/myserver/src/protocol/http/http_data_handler.cpp
@@ -26,7 +26,7 @@ HttpDataHandler::send (HttpThreadContext* td,
                        const char* /*filenamePath*/, const char* /*exec*/,
                        bool /*execute*/, bool /*onlyHeader*/)
 {
-  td->connection->host->warningsLogWrite ("HttpDataHandler: using the base interface!");
+  td->connection->host->warningsLogWrite (_("HttpDataHandler: using the base interface!"));
   return td->http->raiseHTTPError (500);
 }
 
@@ -99,14 +99,14 @@ int HttpDataHandler::appendDataToHTTPChannel (HttpThreadContext* td,
 
   if (chain->write (buffer, size, &nbw))
     {
-      td->connection->host->warningsLogWrite ("HTTP<DATA HANDLER ERROR>: unable to write data in the buffer.");
+      td->connection->host->warningsLogWrite (_("Http: internal error"));
       return 1;
     }
 
 
   if (tmpStream->read (buffer, realBufferSize, &nbr))
     {
-      td->connection->host->warningsLogWrite ("HTTP<DATA HANDLER ERROR>: unable to read data from the buffer.");
+      td->connection->host->warningsLogWrite (_("Http: internal error"));
       return 1;
     }
 
@@ -132,19 +132,15 @@ int HttpDataHandler::appendDataToHTTPChannel (HttpThreadContext* td,
  * \param useChunks Can we use HTTP chunks to send data?
  */
 int
-HttpDataHandler::appendDataToHTTPChannel (HttpThreadContext* td,
-                                          char* buffer,
-                                          u_long size,
-                                          File* appendFile,
-                                          FiltersChain* chain,
-                                          bool append,
-                                          bool useChunks)
+HttpDataHandler::appendDataToHTTPChannel (HttpThreadContext* td, char* buffer,
+                           u_long size, File* appendFile, FiltersChain* chain,
+                                          bool append, bool useChunks)
 {
   u_long nbw;
 
   if (chain->hasModifiersFilters ())
     {
-      td->connection->host->warningsLogWrite ("HTTP<DATA HANDLER ERROR>: Filter chain has modifiers filters.");
+      td->connection->host->warningsLogWrite (_("Http: internal error"));
       return 1;
     }
 
@@ -160,27 +156,27 @@ HttpDataHandler::appendDataToHTTPChannel (HttpThreadContext* td,
 
           if (chain->flush (&flushNbw))
             {
-              td->connection->host->warningsLogWrite ("HTTP<DATA HANDLER ERROR>: unable to flush data.");
+              td->connection->host->warningsLogWrite (_("Http: internal error"));
               return 1;
             }
 
           if (chain->getStream ()->write (chunkHeader.str ().c_str (),
                                           chunkHeader.str ().length (), &nbw))
             {
-              td->connection->host->warningsLogWrite ("HTTP<DATA HANDLER ERROR>: unable to write data in the filters chain.");
+              td->connection->host->warningsLogWrite (_("Http: internal error"));
               return 1;
             }
         }
 
       if (size && chain->write (buffer, size, &nbw))
         {
-          td->connection->host->warningsLogWrite ("HTTP<DATA HANDLER ERROR>: unable to write data in the filters chain.");
+          td->connection->host->warningsLogWrite (_("Http: internal error"));
           return 1;
         }
 
       if (useChunks && chain->getStream ()->write ("\r\n", 2, &nbw))
         {
-          td->connection->host->warningsLogWrite ("HTTP<DATA HANDLER ERROR>: unable to write data in the filters chain.");
+          td->connection->host->warningsLogWrite (_("Http: internal error"));
           return 1;
         }
 



commit 2eb4cb4c7413a9e4006d49899fe2fefde02d2f20
Author: Giuseppe Scrivano <gscrivano@gnu.org>
Date:   Fri Aug 14 21:09:42 2009 +0200

    Don't specify the log location when a format string is used.

diff --git a/myserver/include/log/log_manager.h b/myserver/include/log/log_manager.h
index f90f336..b5250b7 100644
--- a/myserver/include/log/log_manager.h
+++ b/myserver/include/log/log_manager.h
@@ -48,11 +48,10 @@ public:
   int log (const void* owner, const string & type, const string & location,
            string & message, bool appendNL = false,
            LoggingLevel level = MYSERVER_LOG_MSG_INFO);
-  int log (const void* owner, const string & type, const string & location,
-           LoggingLevel level, bool ts, bool appendNL, const char *fmt, ...);
-  int log (const void* owner, const string & type, const string & location,
-           LoggingLevel level, bool ts, bool appendNL, const char *fmt,
-           va_list args);
+  int log (const void* owner, const string & type, LoggingLevel level,
+           bool ts, bool appendNL, const char *fmt, ...);
+  int log (const void* owner, const string & type, LoggingLevel level,
+           bool ts, bool appendNL, const char *fmt, va_list args);
 
   int close (const void *owner);
   int close (const void *owner, string type);
diff --git a/myserver/src/log/log_manager.cpp b/myserver/src/log/log_manager.cpp
index c6ba1bf..ceb0dca 100644
--- a/myserver/src/log/log_manager.cpp
+++ b/myserver/src/log/log_manager.cpp
@@ -532,9 +532,8 @@ LogManager::log (const void* owner, const string & type, const string & location
 
   try
     {
-      failure = notify (owner, type, location, MYSERVER_LOG_EVT_SET_MODE,
-                        &level) || notify (owner, type, location,
-                                           MYSERVER_LOG_EVT_LOG, &message);
+      failure = notify (owner, type, MYSERVER_LOG_EVT_SET_MODE, &level)
+        || notify (owner, type, MYSERVER_LOG_EVT_LOG, &message);
 
       if (appendNL)
         {
@@ -558,14 +557,12 @@ LogManager::log (const void* owner, const string & type, const string & location
 /*!
  * Write a message on a single LogStream specifying a formatting string.
  *
- * \see LogManager#log (void*, string, string, LoggingLevel, bool, bool,
- * va_list)
+ * \see LogManager#log (void*, string, LoggingLevel, bool, bool, va_list)
  * \return 0 on success, 1 on error.
  */
 int
-LogManager::log (const void* owner, const string & type, const string & location,
-                 LoggingLevel level, bool ts, bool appendNL, const char *fmt,
-                 ...)
+LogManager::log (const void* owner, const string & type, LoggingLevel level,
+                 bool ts, bool appendNL, const char *fmt, ...)
 {
   int failure = 0;
 
@@ -576,7 +573,7 @@ LogManager::log (const void* owner, const string & type, const string & location
 
   va_start (argptr, fmt);
 
-  failure = log (owner, type, location, level, ts, appendNL, fmt, argptr);
+  failure = log (owner, type, level, ts, appendNL, fmt, argptr);
 
   va_end (argptr);
 
@@ -588,7 +585,6 @@ LogManager::log (const void* owner, const string & type, const string & location
  *
  * \param owner The object that owns the LogStream.
  * \param type The log category where we want to write.
- * \param location The target LogStream.
  * \param message The message we want to write.
  * \param level The level of logging of this message. If it is less than
  * the LogManager's level of logging, the message will be discarded.
@@ -607,9 +603,8 @@ LogManager::log (const void* owner, const string & type, const string & location
  * \return 0 on success, 1 on error.
  */
 int
-LogManager::log (const void* owner, const string & type, const string &
-                 location, LoggingLevel level, bool ts, bool appendNL,
-                 const char *fmt, va_list args)
+LogManager::log (const void* owner, const string & type, LoggingLevel level,
+                 bool ts, bool appendNL, const char *fmt, va_list args)
 {
   int failure = 0;
 
@@ -627,7 +622,7 @@ LogManager::log (const void* owner, const string & type, const string &
           char time[38];
           int len;
           time[0] = '[';
-          getRFC822GMTTime(&time[1], 32);
+          getRFC822GMTTime (&time[1], 32);
           len = strlen(time);
           time[len + 0] = ']';
           time[len + 1] = ' ';
@@ -674,9 +669,9 @@ LogManager::log (const void* owner, const string & type, const string &
 
       string message = oss.str ();
 
-      failure = notify (owner, type, location, MYSERVER_LOG_EVT_SET_MODE,
-                        static_cast<void*>(&level)) || notify (owner, type,
-                                 location, MYSERVER_LOG_EVT_LOG, &message);
+      failure = notify (owner, type, MYSERVER_LOG_EVT_SET_MODE,
+                        static_cast<void*>(&level))
+             || notify (owner, type, MYSERVER_LOG_EVT_LOG, &message);
 
       if (appendNL)
         failure |= notify (owner, MYSERVER_LOG_EVT_LOG, &newline);
diff --git a/myserver/src/server/server.cpp b/myserver/src/server/server.cpp
index 957cc8d..99f1f96 100644
--- a/myserver/src/server/server.cpp
+++ b/myserver/src/server/server.cpp
@@ -1930,8 +1930,7 @@ int Server::logWriteln (LoggingLevel level, const char *fmt, ...)
 
   bool ts = (logLocation.find ("console://") == string::npos);
 
-  failure = logManager->log (this, "MAINLOG", logLocation, level, ts, true, fmt,
-                             argptr);
+  failure = logManager->log (this, "MAINLOG", level, ts, true, fmt, argptr);
 
   va_end (argptr);
 

-----------------------------------------------------------------------

Summary of changes:
 myserver/include/conf/vhost/vhost.h                |  130 ++--
 myserver/include/conf/vhost/vhost_manager.h        |   51 +-
 myserver/include/log/log_manager.h                 |    9 +-
 .../include/protocol/control/control_protocol.h    |    7 +-
 myserver/src/conf/vhost/vhost.cpp                  |  216 +++---
 myserver/src/conf/vhost/vhost_manager.cpp          |  123 ++--
 .../src/connections_scheduler/listen_threads.cpp   |   10 +-
 myserver/src/http_handler/cgi/cgi.cpp              |   50 +-
 myserver/src/http_handler/fastcgi/fastcgi.cpp      |  155 ++---
 myserver/src/http_handler/http_dir/http_dir.cpp    |   86 +--
 myserver/src/http_handler/http_file/http_file.cpp  |   12 +-
 myserver/src/http_handler/isapi/isapi.cpp          |  451 +++++------
 myserver/src/http_handler/mscgi/mscgi.cpp          |   13 +-
 myserver/src/http_handler/proxy/proxy.cpp          |    4 +-
 myserver/src/http_handler/scgi/scgi.cpp            |  233 +++---
 myserver/src/http_handler/wincgi/wincgi.cpp        |  528 +++++++-------
 myserver/src/log/log_manager.cpp                   |   29 +-
 myserver/src/protocol/control/control_protocol.cpp |  788 +++++++++-----------
 myserver/src/protocol/ftp/ftp.cpp                  |   18 +-
 myserver/src/protocol/http/http.cpp                |   90 +--
 myserver/src/protocol/http/http_data_handler.cpp   |   26 +-
 myserver/src/server/server.cpp                     |    3 +-
 22 files changed, 1354 insertions(+), 1678 deletions(-)


hooks/post-receive
-- 
GNU MyServer



From MAILER-DAEMON Tue Aug 18 18:12:01 2009
Received: from mailman by lists.gnu.org with archive (Exim 4.43)
	id 1MdWuP-0001dS-RP
	for mharc-myserver-commit@gnu.org; Tue, 18 Aug 2009 18:12:01 -0400
Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43)
	id 1MdWuO-0001aq-55
	for myserver-commit@gnu.org; Tue, 18 Aug 2009 18:12:00 -0400
Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43)
	id 1MdWuN-0001ae-Fe
	for myserver-commit@gnu.org; Tue, 18 Aug 2009 18:11:59 -0400
Received: from [199.232.76.173] (port=43289 helo=monty-python.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43) id 1MdWuN-0001ab-DT
	for myserver-commit@gnu.org; Tue, 18 Aug 2009 18:11:59 -0400
Received: from savannah.gnu.org ([199.232.41.3]:34040 helo=sv.gnu.org)
	by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32)
	(Exim 4.60) (envelope-from <gscrivano@gnu.org>) id 1MdWuN-00079Z-3A
	for myserver-commit@gnu.org; Tue, 18 Aug 2009 18:11:59 -0400
Received: from download.savannah.gnu.org ([199.232.41.75]
	helo=cvs.savannah.gnu.org) by sv.gnu.org with esmtp (Exim 4.69)
	(envelope-from <gscrivano@gnu.org>) id 1MdWuM-0000gL-Le
	for myserver-commit@gnu.org; Tue, 18 Aug 2009 22:11:58 +0000
Received: from gscrivano by cvs.savannah.gnu.org with local (Exim 4.69)
	(envelope-from <gscrivano@savannah.gnu.org>) id 1MdWuJ-0000fX-G5
	for myserver-commit@gnu.org; Tue, 18 Aug 2009 22:11:58 +0000
To: myserver-commit@gnu.org
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: ab546da121d89d2fb8f74727080cd5dfeb4b7b84
X-Git-Newrev: d045b54be1eabae67ba544470c2bd7ae583e6233
Message-Id: <E1MdWuJ-0000fX-G5@cvs.savannah.gnu.org>
From: Giuseppe Scrivano <gscrivano@gnu.org>
Date: Tue, 18 Aug 2009 22:11:57 +0000
X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2)
Subject: [myserver-commit] [SCM] GNU MyServer branch, master,
	updated. d045b54be1eabae67ba544470c2bd7ae583e6233
X-BeenThere: myserver-commit@gnu.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: myserver-commit.gnu.org
List-Unsubscribe: <http://lists.gnu.org/mailman/listinfo/myserver-commit>,
	<mailto:myserver-commit-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/pipermail/myserver-commit>
List-Post: <mailto:myserver-commit@gnu.org>
List-Help: <mailto:myserver-commit-request@gnu.org?subject=help>
List-Subscribe: <http://lists.gnu.org/mailman/listinfo/myserver-commit>,
	<mailto:myserver-commit-request@gnu.org?subject=subscribe>
X-List-Received-Date: Tue, 18 Aug 2009 22:12:00 -0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU MyServer".

The branch, master has been updated
       via  d045b54be1eabae67ba544470c2bd7ae583e6233 (commit)
      from  ab546da121d89d2fb8f74727080cd5dfeb4b7b84 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------


commit d045b54be1eabae67ba544470c2bd7ae583e6233
Author: Giuseppe Scrivano <gscrivano@gnu.org>
Date:   Wed Aug 19 00:10:24 2009 +0200

    Check for the array dimension used by Process::generateEnvString before access it.

diff --git a/myserver/include/base/process/process.h b/myserver/include/base/process/process.h
index e50ba79..db0ea34 100755
--- a/myserver/include/base/process/process.h
+++ b/myserver/include/base/process/process.h
@@ -40,17 +40,17 @@ struct StartProcInfo
   }
 
 	/*! STDIN file for new process.  */
-	FileHandle stdIn;	
-	
+	FileHandle stdIn;
+
 	/*! STDOUT file for new process.  */
 	FileHandle stdOut;
-	
+
 	/*! STDERR file for new process.  */
 	FileHandle stdError;
-	
+
 	string cmdLine;
 	string cwd;
-	
+
 	/*! added for unix support.  */
 	string cmd;
 	string arg;
@@ -63,9 +63,9 @@ struct StartProcInfo
 
 	void *envString;
 
-  /*! Pointer to a NULL terminated array of 
+  /*! Pointer to a NULL terminated array of
    *  file pointers to close.  */
-  FileHandle *handlesToClose; 
+  FileHandle *handlesToClose;
 };
 
 class Process
@@ -96,8 +96,10 @@ public:
   static uid_t getUid (const char *user);
   static gid_t getGid (const char *group);
 
-  static int generateEnvString (const char **envp, char *envString);
-  static int generateArgList (const char **args, const char *proc, string &additionalArgs);
+  static int generateEnvString (const char **envp, size_t size,
+                                char *envString);
+  static int generateArgList (const char **args, size_t size, const char *proc,
+                              string &additionalArgs);
 
   static ForkServer *getForkServer (){return &forkServer;}
 private:
diff --git a/myserver/src/base/process/process.cpp b/myserver/src/base/process/process.cpp
index db6a2f5..e10f544 100755
--- a/myserver/src/base/process/process.cpp
+++ b/myserver/src/base/process/process.cpp
@@ -19,25 +19,26 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #include "stdafx.h"
 #include <include/base/utility.h>
 
-extern "C" {
+extern "C"
+{
 #include <errno.h>
 #include <string.h>
 #include <stdlib.h>
 #include <stdio.h>
 
 #ifndef WIN32
-#include <unistd.h>
-#include <signal.h>
-#include <sys/types.h>
-#include <sys/wait.h>
+# include <unistd.h>
+# include <signal.h>
+# include <sys/types.h>
+# include <sys/wait.h>
 
-#ifdef GETPWNAM
-#include <pwd.h>
-#endif
+# ifdef GETPWNAM
+#  include <pwd.h>
+# endif
 
-#ifdef GRP
-#include <grp.h>
-#endif
+# ifdef GRP
+#  include <grp.h>
+# endif
 
 #endif
 }
@@ -69,15 +70,17 @@ Mutex Process::forkMutex;
 ForkServer Process::forkServer;
 
 /*!
- *Generate the arguments vector for execve.
- *\param args The output arguments vector to fill.
- *\param proc The executable.
- *\param additionalArgs additional arguments.
+ * Generate the arguments vector for execve.
+ * \param args The output arguments vector to fill.
+ * \param size Size of the args vector.
+ * \param proc The executable.
+ * \param additionalArgs additional arguments.
  */
-int Process::generateArgList (const char **args, const char *proc, string &additionalArgs)
+int Process::generateArgList (const char **args, size_t size, const char *proc,
+                              string &additionalArgs)
 {
   args[0] = proc;
-  
+
   const char *arg = additionalArgs.c_str ();
   int count = 1;
   int len = additionalArgs.length ();
@@ -95,7 +98,7 @@ int Process::generateArgList (const char **args, const char *proc, string &addit
           if (i == len)
             exit(1);
 
-          if (count < 100)
+          if (count < size)
             {
               args[count++] = &(additionalArgs[start + 1]);
               start = i + 1;
@@ -108,7 +111,7 @@ int Process::generateArgList (const char **args, const char *proc, string &addit
         {
           if (i - start <= 1)
             continue;
-          if (count < 100)
+          if (count < size)
             {
               args[count++] = &(additionalArgs[start]);
               additionalArgs[i] = '\0';
@@ -122,7 +125,7 @@ int Process::generateArgList (const char **args, const char *proc, string &addit
             break;
         }
     }
-  if (count < 100 && len != start)
+  if (count < size && len != start)
     {
       args[count++] = &(additionalArgs[start]);
     }
@@ -134,15 +137,15 @@ int Process::generateArgList (const char **args, const char *proc, string &addit
 
 
 /*!
- *Generate the env array for execve.
- *\param envp Enviroment variables array.
- *\param envString Enviroment values separed by the NULL character.
+ * Generate the env array for execve.
+ * \param envp Enviroment variables array.
+ * \param size Size of the args vector.
+ * \param envString Enviroment values separed by the NULL character.
  */
-int Process::generateEnvString (const char **envp, char *envString)
+int Process::generateEnvString (const char **envp, size_t size, char *envString)
 {
   int i = 0;
-  int index = 0;
- 
+  size_t index = 0;
 
   if (envString != NULL)
     {
@@ -150,8 +153,11 @@ int Process::generateEnvString (const char **envp, char *envString)
         {
           envp[index] = envString + i;
           index++;
-          
-          while(*(envString + i++) != '\0');
+
+          if (index == size)
+            return 1;
+
+          while (*(envString + i++) != '\0');
         }
       envp[index] = NULL;
     }
@@ -160,18 +166,16 @@ int Process::generateEnvString (const char **envp, char *envString)
   return 0;
 }
 
-
-
 /*!
- *Spawn a new process.
+ * Spawn a new process.
  *
- *\param spi new process information.
- *\param waitEnd Specify if wait until the process finishes.
+ * \param spi new process information.
+ * \param waitEnd Specify if wait until the process finishes.
  *
- *\return -1 on failure.
- *\return the new process identifier on success.
+ * \return -1 on failure.
+ * \return the new process identifier on success.
  */
-int Process::exec(StartProcInfo* spi, bool waitEnd)
+int Process::exec (StartProcInfo* spi, bool waitEnd)
 {
   pid = 0;
 #ifdef WIN32
@@ -201,9 +205,6 @@ int Process::exec(StartProcInfo* spi, bool waitEnd)
 
   if (waitEnd)
     {
-      /*
-       *Wait until the process stops its execution.
-       */
       ret = WaitForSingleObject (pi.hProcess, INFINITE);
 
       if (ret == WAIT_FAILED)
@@ -222,14 +223,14 @@ int Process::exec(StartProcInfo* spi, bool waitEnd)
 #ifndef WIN32
   pid = fork ();
 
-  if (pid < 0) // a bad thing happened
+  if (pid < 0)
     return 0;
 
-  if (pid == 0) // child
+  if (pid == 0)
     {
-      // Set env vars
-      const char *envp[100];
-      const char *args[100];
+      const size_t size = 100;
+      const char *envp[size];
+      const char *args[size];
 
       if (spi->gid.length ())
         Process::setgid (spi->gid.c_str ());
@@ -237,19 +238,16 @@ int Process::exec(StartProcInfo* spi, bool waitEnd)
       if (spi->uid.length ())
         Process::setuid (spi->uid.c_str ());
 
-      if (generateArgList (args, spi->cmd.c_str (), spi->arg))
+      if (generateArgList (args, size, spi->cmd.c_str (), spi->arg))
         exit (1);
 
-      if (generateEnvString (envp, (char*) spi->envString))
+      if (generateEnvString (envp, size, (char*) spi->envString))
         exit (1);
-      
-      // change to working dir
-      if (spi->cwd.length ())
-        {
-          if (chdir ((const char*)(spi->cwd.c_str())) == -1)
-            exit (1);
-        }
- 
+
+      if (spi->cwd.length ()
+          && chdir ((const char*)(spi->cwd.c_str())) == -1)
+        exit (1);
+
       if ((long)spi->stdOut == -1)
         spi->stdOut = (FileHandle)open ("/dev/null", O_WRONLY);
 
@@ -275,7 +273,7 @@ int Process::exec(StartProcInfo* spi, bool waitEnd)
 
       if (dup2 (spi->stdError, 2) == -1)
         exit (1);
-      
+
       if (spi->handlesToClose)
         {
           FileHandle* h = spi->handlesToClose;
@@ -286,7 +284,7 @@ int Process::exec(StartProcInfo* spi, bool waitEnd)
             }
         }
 
-      execve ((const char*)args[0], 
+      execve ((const char*)args[0],
               (char* const*)args, (char* const*) envp);
 
     exit (1);
@@ -294,9 +292,7 @@ int Process::exec(StartProcInfo* spi, bool waitEnd)
   }
 
   if (waitEnd)
-    {
-      return waitpid(pid, NULL, 0);
-    }
+    return waitpid (pid, NULL, 0);
   else
     return pid;
 
@@ -306,8 +302,8 @@ int Process::exec(StartProcInfo* spi, bool waitEnd)
 }
 
 /*!
- *Get an uid given a username.
- *\param the user name to convert.
+ * Get an uid given a username.
+ * \param the user name to convert.
  */
 uid_t Process::getUid (const char *user)
 {
@@ -333,8 +329,8 @@ uid_t Process::getUid (const char *user)
 }
 
 /*!
- *Get an uid given a username.
- *\param the user name to convert.
+ * Get an uid given a username.
+ * \param the user name to convert.
  */
 gid_t Process::getGid (const char *grp)
 {
@@ -359,8 +355,8 @@ gid_t Process::getGid (const char *grp)
 }
 
 /*!
- *Return a nonzero value if the process is still alive. A return value of zero
- *means the process is a zombie.
+ * Return a nonzero value if the process is still alive. A return value of zero
+ * means the process is a zombie.
  */
 int Process::isProcessAlive ()
 {
@@ -389,7 +385,7 @@ int Process::isProcessAlive ()
     return 1;
   return 0;
 #else
-  /*! Send the pseudo-signal 0 to check if the process is alive.  */
+  /* Send the pseudo-signal 0 to check if the process is alive.  */
   int ret;
   do
   {
@@ -399,7 +395,7 @@ int Process::isProcessAlive ()
   if (ret == 0)
     return 1;
 
-  /*! Waitpid it to free the resource.  */
+  /* Waitpid it to free the resource.  */
   waitpid (pid, &status, WNOHANG | WUNTRACED);
 
   return 0;
@@ -412,7 +408,7 @@ int Process::isProcessAlive ()
 #ifdef HAVE_PTHREAD
 
 /*!
- *Called in the parent before do a fork.
+ * Called in the parent before do a fork.
  */
 void Process::forkPrepare ()
 {
@@ -420,7 +416,7 @@ void Process::forkPrepare ()
 }
 
 /*!
- *Called in the parent after the fork.
+ * Called in the parent after the fork.
  */
 void Process::forkParent ()
 {
@@ -428,16 +424,16 @@ void Process::forkParent ()
 }
 
 /*!
- *Called in the child process after the fork.
+ * Called in the child process after the fork.
  */
 void Process::forkChild ()
 {
-  forkMutex.unlock ();  
+  forkMutex.unlock ();
 }
 #endif
 
 /*!
- *Initialize the static process data.
+ * Initialize the static process data.
  */
 void Process::initialize ()
 {
@@ -448,7 +444,7 @@ void Process::initialize ()
 }
 
 /*!
- *Create the object.
+ * Create the object.
  */
 Process::Process ()
 {
@@ -456,7 +452,7 @@ Process::Process ()
 }
 
 /*!
- *Destroy the object.
+ * Destroy the object.
  */
 Process::~Process ()
 {
@@ -464,9 +460,9 @@ Process::~Process ()
 }
 
 /*!
- *Terminate a process.
- *Return 0 on success.
- *Return nonzero on fails.
+ * Terminate a process.
+ * Return 0 on success.
+ * Return nonzero on fails.
  */
 int Process::terminateProcess ()
 {
@@ -486,7 +482,7 @@ int Process::terminateProcess ()
 }
 
 /*!
- *Set the user identity for the process. Returns 0 on success.
+ * Set the user identity for the process. Returns 0 on success.
  */
 int Process::setuid (const char *uid)
 {
@@ -498,7 +494,7 @@ int Process::setuid (const char *uid)
 }
 
 /*!
- *Set the group identity for the process. Returns 0 on success.
+ * Set the group identity for the process. Returns 0 on success.
  */
 int Process::setgid (const char *gid)
 {
@@ -510,7 +506,7 @@ int Process::setgid (const char *gid)
 }
 
 /*!
- *Set the additional groups list for the process.
+ * Set the additional groups list for the process.
  */
 int Process::setAdditionalGroups (u_long len, u_long *groups)
 {
@@ -520,7 +516,7 @@ int Process::setAdditionalGroups (u_long len, u_long *groups)
   u_long i;
   int ret;
   gid_t *gids = new gid_t[len];
-  
+
   for (i = 0; i < len; i++)
     if (groups)
       gids[i] = (gid_t)groups[i];
diff --git a/myserver/src/base/thread/thread.cpp b/myserver/src/base/thread/thread.cpp
index b3416ef..4ccf80c 100755
--- a/myserver/src/base/thread/thread.cpp
+++ b/myserver/src/base/thread/thread.cpp
@@ -41,11 +41,11 @@ extern "C"
 #include <sys/types.h>
 
 #ifdef WIN32
-#include <direct.h>
+# include <direct.h>
 #endif
 
 /*!
- *Sleep the caller thread for [TIME] microseconds.
+ * Sleep the caller thread for [TIME] microseconds.
  */
 void Thread::wait (u_long time)
 {

-----------------------------------------------------------------------

Summary of changes:
 myserver/include/base/process/process.h |   20 ++--
 myserver/src/base/process/process.cpp   |  158 +++++++++++++++----------------
 myserver/src/base/thread/thread.cpp     |    4 +-
 3 files changed, 90 insertions(+), 92 deletions(-)


hooks/post-receive
-- 
GNU MyServer



From MAILER-DAEMON Wed Aug 19 12:31:54 2009
Received: from mailman by lists.gnu.org with archive (Exim 4.43)
	id 1Mdo4o-0005GL-FG
	for mharc-myserver-commit@gnu.org; Wed, 19 Aug 2009 12:31:54 -0400
Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43)
	id 1Mdo4n-0005F5-33
	for myserver-commit@gnu.org; Wed, 19 Aug 2009 12:31:53 -0400
Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43)
	id 1Mdo4l-0005Da-SA
	for myserver-commit@gnu.org; Wed, 19 Aug 2009 12:31:52 -0400
Received: from [199.232.76.173] (port=38575 helo=monty-python.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43) id 1Mdo4l-0005Co-9Z
	for myserver-commit@gnu.org; Wed, 19 Aug 2009 12:31:51 -0400
Received: from savannah.gnu.org ([199.232.41.3]:38710 helo=sv.gnu.org)
	by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32)
	(Exim 4.60) (envelope-from <gscrivano@gnu.org>) id 1Mdo4f-0004ks-Q8
	for myserver-commit@gnu.org; Wed, 19 Aug 2009 12:31:50 -0400
Received: from download.savannah.gnu.org ([199.232.41.75]
	helo=cvs.savannah.gnu.org) by sv.gnu.org with esmtp (Exim 4.69)
	(envelope-from <gscrivano@gnu.org>) id 1Mdo4f-0006jV-4v
	for myserver-commit@gnu.org; Wed, 19 Aug 2009 16:31:45 +0000
Received: from gscrivano by cvs.savannah.gnu.org with local (Exim 4.69)
	(envelope-from <gscrivano@savannah.gnu.org>) id 1Mdo4b-0006ik-8z
	for myserver-commit@gnu.org; Wed, 19 Aug 2009 16:31:44 +0000
To: myserver-commit@gnu.org
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: d045b54be1eabae67ba544470c2bd7ae583e6233
X-Git-Newrev: 4a01ae79028f9363e111210e2d267b5e4fa86ce6
Message-Id: <E1Mdo4b-0006ik-8z@cvs.savannah.gnu.org>
From: Giuseppe Scrivano <gscrivano@gnu.org>
Date: Wed, 19 Aug 2009 16:31:43 +0000
X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2)
Subject: [myserver-commit] [SCM] GNU MyServer branch, master,
	updated. 4a01ae79028f9363e111210e2d267b5e4fa86ce6
X-BeenThere: myserver-commit@gnu.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: myserver-commit.gnu.org
List-Unsubscribe: <http://lists.gnu.org/mailman/listinfo/myserver-commit>,
	<mailto:myserver-commit-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/pipermail/myserver-commit>
List-Post: <mailto:myserver-commit@gnu.org>
List-Help: <mailto:myserver-commit-request@gnu.org?subject=help>
List-Subscribe: <http://lists.gnu.org/mailman/listinfo/myserver-commit>,
	<mailto:myserver-commit-request@gnu.org?subject=subscribe>
X-List-Received-Date: Wed, 19 Aug 2009 16:31:53 -0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU MyServer".

The branch, master has been updated
       via  4a01ae79028f9363e111210e2d267b5e4fa86ce6 (commit)
       via  d91d2fcbb16433de15a2a91dee7d140d6c7d7e6f (commit)
      from  d045b54be1eabae67ba544470c2bd7ae583e6233 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------


commit 4a01ae79028f9363e111210e2d267b5e4fa86ce6
Author: Giuseppe Scrivano <gscrivano@gnu.org>
Date:   Wed Aug 19 18:30:08 2009 +0200

    Fix the `make check' command.  Now it executes the `tests_suite' program when it is available.

diff --git a/myserver/Makefile.am b/myserver/Makefile.am
index ba6a32c..11fcb07 100644
--- a/myserver/Makefile.am
+++ b/myserver/Makefile.am
@@ -1,8 +1,6 @@
-# Makefile : Builds myserver, math_sum, and post
-#
-
 if BUILD_TESTS
-TESTS = tests
+TESTS_DIR = tests
+TESTS = tests/tests_suite$(EXEEXT)
 endif
 
 if BUILD_DOC
@@ -14,7 +12,6 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/gnome-pthread-check.m4 \
         $(top_srcdir)/m4/libxml.m4 $(top_srcdir)/m4/cppunit.m4 \
         $(top_srcdir)/configure.in
 
-
-SUBDIRS = src include $(CONTROL) $(CGI_LIB) binaries $(DOCS) $(TESTS)
+SUBDIRS = src include $(CONTROL) $(CGI_LIB) binaries $(DOCS) $(TESTS_DIR)
 
 EXTRA_DIST = stdafx.h stdafx.cpp doxygen SConstruct



commit d91d2fcbb16433de15a2a91dee7d140d6c7d7e6f
Author: Giuseppe Scrivano <gscrivano@gnu.org>
Date:   Wed Aug 19 18:23:43 2009 +0200

    Fix a race.

diff --git a/myserver/tests/test_filter_chain.cpp b/myserver/tests/test_filter_chain.cpp
index 6551c6d..c69afb0 100644
--- a/myserver/tests/test_filter_chain.cpp
+++ b/myserver/tests/test_filter_chain.cpp
@@ -1,6 +1,6 @@
 /*
  MyServer
- Copyright (C) 2008 Free Software Foundation, Inc.
+ Copyright (C) 2008, 2009 Free Software Foundation, Inc.
  This program 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 3 of the License, or
@@ -74,12 +74,12 @@ public:
 
     char *pBuff = szExpected;
     int i = nLength;
-    while ( !fc->read(szTemp, 64, &nbw) && i > 0 )
-    {
-      strncpy(pBuff, szTemp, (int)nbw > i ? i : nbw);
-      pBuff += nbw;
-      i -= nbw;
-    }
+    while ( !fc->read(szTemp, 64, &nbw) && nbw > 0 && i > 0 )
+      {
+        strncpy (pBuff, szTemp, (int)nbw > i ? i : nbw);
+        pBuff += nbw;
+        i -= nbw;
+      }
     szExpected[nLength] = '\0';
     fc->clearAllFilters();
 

-----------------------------------------------------------------------

Summary of changes:
 myserver/Makefile.am                 |    9 +++------
 myserver/tests/test_filter_chain.cpp |   14 +++++++-------
 2 files changed, 10 insertions(+), 13 deletions(-)


hooks/post-receive
-- 
GNU MyServer



From MAILER-DAEMON Wed Aug 19 18:03:46 2009
Received: from mailman by lists.gnu.org with archive (Exim 4.43)
	id 1MdtFy-0002c1-9M
	for mharc-myserver-commit@gnu.org; Wed, 19 Aug 2009 18:03:46 -0400
Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43)
	id 1MdtFv-0002X9-Sv
	for myserver-commit@gnu.org; Wed, 19 Aug 2009 18:03:43 -0400
Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43)
	id 1MdtFn-0002GK-9g
	for myserver-commit@gnu.org; Wed, 19 Aug 2009 18:03:43 -0400
Received: from [199.232.76.173] (port=43601 helo=monty-python.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43) id 1MdtFn-0002E4-4V
	for myserver-commit@gnu.org; Wed, 19 Aug 2009 18:03:35 -0400
Received: from savannah.gnu.org ([199.232.41.3]:59149 helo=sv.gnu.org)
	by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32)
	(Exim 4.60) (envelope-from <gscrivano@gnu.org>) id 1MdtFj-0004U2-K0
	for myserver-commit@gnu.org; Wed, 19 Aug 2009 18:03:33 -0400
Received: from download.savannah.gnu.org ([199.232.41.75]
	helo=cvs.savannah.gnu.org) by sv.gnu.org with esmtp (Exim 4.69)
	(envelope-from <gscrivano@gnu.org>) id 1MdtFi-0008Qt-SN
	for myserver-commit@gnu.org; Wed, 19 Aug 2009 22:03:31 +0000
Received: from gscrivano by cvs.savannah.gnu.org with local (Exim 4.69)
	(envelope-from <gscrivano@savannah.gnu.org>) id 1MdtFf-0008QN-76
	for myserver-commit@gnu.org; Wed, 19 Aug 2009 22:03:30 +0000
To: myserver-commit@gnu.org
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: 4a01ae79028f9363e111210e2d267b5e4fa86ce6
X-Git-Newrev: 0d6db12ec98f18e5e7b9621b8f5e25280d8ad734
Message-Id: <E1MdtFf-0008QN-76@cvs.savannah.gnu.org>
From: Giuseppe Scrivano <gscrivano@gnu.org>
Date: Wed, 19 Aug 2009 22:03:28 +0000
X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2)
Subject: [myserver-commit] [SCM] GNU MyServer branch, master,
	updated. 0d6db12ec98f18e5e7b9621b8f5e25280d8ad734
X-BeenThere: myserver-commit@gnu.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: myserver-commit.gnu.org
List-Unsubscribe: <http://lists.gnu.org/mailman/listinfo/myserver-commit>,
	<mailto:myserver-commit-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/pipermail/myserver-commit>
List-Post: <mailto:myserver-commit@gnu.org>
List-Help: <mailto:myserver-commit-request@gnu.org?subject=help>
List-Subscribe: <http://lists.gnu.org/mailman/listinfo/myserver-commit>,
	<mailto:myserver-commit-request@gnu.org?subject=subscribe>
X-List-Received-Date: Wed, 19 Aug 2009 22:03:44 -0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU MyServer".

The branch, master has been updated
       via  0d6db12ec98f18e5e7b9621b8f5e25280d8ad734 (commit)
      from  4a01ae79028f9363e111210e2d267b5e4fa86ce6 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------


commit 0d6db12ec98f18e5e7b9621b8f5e25280d8ad734
Author: Giuseppe Scrivano <gscrivano@gnu.org>
Date:   Wed Aug 19 23:58:22 2009 +0200

    Localize messages using the GNU gettext package

diff --git a/myserver/Makefile.am b/myserver/Makefile.am
index 11fcb07..1d37779 100644
--- a/myserver/Makefile.am
+++ b/myserver/Makefile.am
@@ -12,6 +12,15 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/gnome-pthread-check.m4 \
         $(top_srcdir)/m4/libxml.m4 $(top_srcdir)/m4/cppunit.m4 \
         $(top_srcdir)/configure.in
 
-SUBDIRS = src include $(CONTROL) $(CGI_LIB) binaries $(DOCS) $(TESTS_DIR)
+SUBDIRS = po src include $(CONTROL) $(CGI_LIB) binaries $(DOCS) $(TESTS_DIR)
 
 EXTRA_DIST = stdafx.h stdafx.cpp doxygen SConstruct
+
+ACLOCAL_AMFLAGS = -I m4
+
+
+localedir.h: Makefile
+	echo '#define LOCALEDIR "$(localedir)"' >$@
+
+all: localedir.h
+# Generate the localedir.h file before any other rule.
diff --git a/myserver/binaries/Makefile.am b/myserver/binaries/Makefile.am
index f4603c6..7e15cc3 100644
--- a/myserver/binaries/Makefile.am
+++ b/myserver/binaries/Makefile.am
@@ -1,4 +1,4 @@
-SUBDIRS = languages logs system web certificates plugins
+SUBDIRS = logs system web certificates plugins
 
 EXTRA_DIST = myserver-daemon MIMEtypes.default.xml myserver.default.xml \
 						 virtualhosts.default.xml
diff --git a/myserver/binaries/languages/Makefile.am b/myserver/binaries/languages/Makefile.am
deleted file mode 100644
index 97c3d3b..0000000
--- a/myserver/binaries/languages/Makefile.am
+++ /dev/null
@@ -1,7 +0,0 @@
-
-SUBDIRS = configure
-
-myserverdatadir = $(datadir)/myserver/languages
-  
-dist_myserverdata_DATA = brazilian.xml french.xml italiano.xml russian_koi8r.xml english.xml german.xml russian.xml spanish.xml
-
diff --git a/myserver/binaries/languages/brazilian.xml b/myserver/binaries/languages/brazilian.xml
deleted file mode 100644
index 323881d..0000000
--- a/myserver/binaries/languages/brazilian.xml
+++ /dev/null
@@ -1,45 +0,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<!--MYSERVER SUPPORT FOR PORTUGUESE (br) LANGUAGE-->
-<!--COPYRIGHT 2002 MyServer Team-->
-<MYSERVER_LANGUAGE_FILE>
-<MSG_LANGUAGE>Usando português (brasileiro)</MSG_LANGUAGE>
-<MSG_SERVER_CONF>Configuração do servidor terminada</MSG_SERVER_CONF>
-<AL_NO_SECURITY>Não está sendo usada segurança no acesso, o conteúdo da 
-pasta web é acessível por todo mundo</AL_NO_SECURITY>
-<MSG_ISOCK>Inicializando biblioteca de socket...</MSG_ISOCK>
-<ERR_ISOCK>Erro inicializando biblioteca de socket</ERR_ISOCK>
-<MSG_SOCKSTART>Biblioteca de socket inicializada</MSG_SOCKSTART>
-<MSG_SSOCKCREATE>Criando socket do servidor...</MSG_SSOCKCREATE>
-<MSG_SSOCKRUN>Socket do servidor criado</MSG_SSOCKRUN>
-<ERR_OPENP>Erro ao abrir a porta, ela pode estar sendo usada por outra 
-aplicação</ERR_OPENP>
-<MSG_BIND_PORT>Tentando dar bind na porta...</MSG_BIND_PORT>
-<ERR_BIND>Erro de binding na porta, ela pode estar sendo usada por 
-outra aplicação</ERR_BIND>
-<MSG_PORT_BOUND>Está feito o binding na porta</MSG_PORT_BOUND>
-<MSG_SLISTEN>Tentando ouvir na porta...</MSG_SLISTEN>
-<ERR_LISTEN>Erro ao ouvir na porta</ERR_LISTEN>
-<MSG_LISTEN>Ouvindo na porta</MSG_LISTEN>
-<MSG_LOADMIME>Carregando MIME types...</MSG_LOADMIME>
-<MSG_GETNAME>O nome do computador é</MSG_GETNAME>
-<MSG_LOADED>Carregado</MSG_LOADED>
-<ERR_LOADED>Erro ao carregar</ERR_LOADED>
-<MSG_MIMERUN>MIME types carregados com sucesso</MSG_MIMERUN>
-<MSG_ADDRESS>Endereço IP</MSG_ADDRESS>
-<ERR_LOADMIME>MIME types não podem ser carregados</ERR_LOADMIME>
-<ERR_ERROR>Erro genérico</ERR_ERROR>
-<MSG_NUM_CPU>Número de processadores:</MSG_NUM_CPU>
-<MSG_CREATET>Criando thread</MSG_CREATET>
-<MSG_THREADR>Thread criada</MSG_THREADR>
-<MSG_LISTENT>Criando thread de escuta...</MSG_LISTENT>
-<MSG_LISTENTR>Thread de escuta criada</MSG_LISTENTR>
-<MSG_READY>MyServer está pronto para aceitar conexões agora</MSG_READY>
-<MSG_BREAK>Use o Ctrl+C para abortar a execução</MSG_BREAK>
-<MSG_STOPT>Terminando threads...</MSG_STOPT>
-<MSG_TSTOPPED>Threads terminadas</MSG_TSTOPPED>
-<MSG_MEMCLEAN>Limpando a memória...</MSG_MEMCLEAN>
-<MSG_SERVICESTOP>Serviço parando...</MSG_SERVICESTOP>
-<MSG_LOADMSCGI>MSCGI-LIB carregada com sucesso</MSG_LOADMSCGI>
-<ERR_LOADMSCGI>MSCGI-LIB não pode ser carregada</ERR_LOADMSCGI>
-
-</MYSERVER_LANGUAGE_FILE>
diff --git a/myserver/binaries/languages/configure/Makefile.am b/myserver/binaries/languages/configure/Makefile.am
deleted file mode 100644
index 3568df9..0000000
--- a/myserver/binaries/languages/configure/Makefile.am
+++ /dev/null
@@ -1,3 +0,0 @@
-myserverdatadir = $(datadir)/myserver/languages/configure
-
-dist_myserverdata_DATA = english.xml italiano.xml spanish.xml
diff --git a/myserver/binaries/languages/configure/english.xml b/myserver/binaries/languages/configure/english.xml
deleted file mode 100644
index 24e9929..0000000
--- a/myserver/binaries/languages/configure/english.xml
+++ /dev/null
@@ -1,136 +0,0 @@
-<?xml version="1.0"?>
-<MYSERVER_LANGUAGE_FILE>
-<_ABOUT35>&amp;About</_ABOUT35>
-<_FILE167>&amp;File</_FILE167>
-<_HELP176>&amp;Help</_HELP176>
-<_OPEN___68>&amp;Open...</_OPEN___68>
-<_QUIT202>&amp;Quit</_QUIT202>
-<_REVERT160>&amp;Revert</_REVERT160>
-<_SAVE___65>&amp;Save...</_SAVE___65>
-<ABOUT252>About</ABOUT252>
-<ACCESSES_LOG_FILE_140>Accesses log file:</ACCESSES_LOG_FILE_140>
-<ACTION_154>Action:</ACTION_154>
-<ADD___148>Add...</ADD___148>
-<ADMINISTRATOR102>Administrator</ADMINISTRATOR102>
-<ADMINISTRATOR_E_MAIL247>Administrator e-mail:</ADMINISTRATOR_E_MAIL247>
-<ALWAYS_ACTIVE_THREAD90>Always active threads:</ALWAYS_ACTIVE_THREAD90>
-<ARPA133>Arpa</ARPA133>
-<BROWSE___254>Browse...</BROWSE___254>
-<CANCEL72>Cancel</CANCEL72>
-<CHOSE_LOCATION80>Chose Location</CHOSE_LOCATION80>
-<CHOSE_CONFIGURATION_10>Chose configuration file location:</CHOSE_CONFIGURATION_10>
-<CONFIGURATION_FILES_197>Configuration files located in /etc/myserver</CONFIGURATION_FILES_197>
-<CONFIGURATION_FILES_168>Configuration files located in current directory</CONFIGURATION_FILES_168>
-<CONFIGURATION_FILES_6>Configuration files located in ~/.myserver</CONFIGURATION_FILES_6>
-<CONNECTION_TIME_OUT_75>Connection time-out (in sec):</CONNECTION_TIME_OUT_75>
-<CONSOLE213>Console</CONSOLE213>
-<DEFAULT_FILE_NAMES_249>Default file names:</DEFAULT_FILE_NAMES_249>
-<DEFAULT_FILE_TO_SEND62>Default file to send in a directory when none is specified</DEFAULT_FILE_TO_SEND62>
-<DIRECTORIES129>Directories</DIRECTORIES129>
-<DOCUMENT_ROOT_98>Document root:</DOCUMENT_ROOT_98>
-<EXECUTE213>Execute</EXECUTE213>
-<EXECUTE_AS_AN_ISAPI_250>Execute as an ISAPI module</EXECUTE_AS_AN_ISAPI_250>
-<EXECUTE_SELF_CONTAIN253>Execute self contained FastCGI</EXECUTE_SELF_CONTAIN253>
-<EXTENSION_250>Extension:</EXTENSION_250>
-<FTP234>FTP</FTP234>
-<GLOBAL83>Global</GLOBAL83>
-<GZIP_COMPRESSION_THR48>Gzip compression threshold (in bytes):</GZIP_COMPRESSION_THR48>
-<HTTP65>HTTP</HTTP65>
-<HTTPS148>HTTPS</HTTPS148>
-<HIGHER89>Higher</HIGHER89>
-<HIGHEST206>Highest</HIGHEST206>
-<HOST159>Host</HOST159>
-<HOSTS19>Hosts</HOSTS19>
-<IP153>IP</IP153>
-<INSTALL_SERVICE205>Install Service</INSTALL_SERVICE205>
-<LANGUAGE_97>Language:</LANGUAGE_97>
-<LOCAL236>Local</LOCAL236>
-<LOGS150>Logs</LOGS150>
-<MIME41>MIME</MIME41>
-<MIME_TYPE_39>MIME Type:</MIME_TYPE_39>
-<MANAGER_247>Manager:</MANAGER_247>
-<MAX_CONNECTIONS_41>Max connections:</MAX_CONNECTIONS_41>
-<MAXIMUM_NUMBER_OF_TH202>Maximum number of threads:</MAXIMUM_NUMBER_OF_TH202>
-<MAX_LOG_FILE_SIZE__I245>Max log file size (in bytes):</MAX_LOG_FILE_SIZE__I245>
-<MEMORY_BUFFER__IN_BY228>Memory buffer (in bytes):</MEMORY_BUFFER__IN_BY228>
-<MYSERVER_CONFIGURE6>MyServer Configure</MYSERVER_CONFIGURE6>
-<NAME_188>Name:</NAME_188>
-<NONE145>None</NONE145>
-<NORMAL107>Normal</NORMAL107>
-<OK154>OK</OK154>
-<PORT_224>Port:</PORT_224>
-<PERSONALIZED_ERROR_P173>Personalized error pages:</PERSONALIZED_ERROR_P173>
-<PROTOCOL85>Protocol</PROTOCOL85>
-<PROTOCOL_143>Protocol:</PROTOCOL_143>
-<REMOVE112>Remove</REMOVE112>
-<REMOVE_SERVICE100>Remove Service</REMOVE_SERVICE100>
-<RUN54>Run</RUN54>
-<RUN_AS_CGI31>Run as CGI</RUN_AS_CGI31>
-<RUN_AS_FASTCGI174>Run as FastCGI</RUN_AS_FASTCGI174>
-<RUN_AS_ISAPI194>Run as ISAPI</RUN_AS_ISAPI194>
-<RUN_AS_MSCGI191>Run as MSCGI</RUN_AS_MSCGI191>
-<RUN_AS_WINCGI14>Run as WINCGI</RUN_AS_WINCGI14>
-<SSL_CERTIFICATE_212>SSL certificate:</SSL_CERTIFICATE_212>
-<SSL_PASSWORD_195>SSL password:</SSL_PASSWORD_195>
-<SSL_PRIVATE_KEY_181>SSL private key:</SSL_PRIVATE_KEY_181>
-<SEND_THE_FILE175>Send the file</SEND_THE_FILE175>
-<SER_VICE249>Ser&amp;vice</SER_VICE249>
-<SERVER121>Server</SERVER121>
-<SERVICE211>Service</SERVICE211>
-<STOP167>Stop</STOP167>
-<STYLESHEET_104>Stylesheet:</STYLESHEET_104>
-<SYSTEM135>System</SYSTEM135>
-<SYSTEM_FOLDER_96>System folder:</SYSTEM_FOLDER_96>
-<URL_LINK195>URL link</URL_LINK195>
-<USER160>User</USER160>
-<VERBOSITY_LEVEL_63>Verbosity level:</VERBOSITY_LEVEL_63>
-<WARNING_LOG_FILE_56>Warning log file:</WARNING_LOG_FILE_56>
-<AS_CONSOLE202>as Console</AS_CONSOLE202>
-<AS_SERVICE200>as Service</AS_SERVICE200>
-<CONTROL35>CONTROL</CONTROL35>
-<RE_MOTE148>Re&amp;mote</RE_MOTE148>
-<LOGIN___133>Login...</LOGIN___133>
-<LOGOUT124>Logout</LOGOUT124>
-<GET_CONFIG153>Get Config</GET_CONFIG153>
-<SEND_CONFIG4>Send Config...</SEND_CONFIG4>
-<CONNECTIONS___18>Connections...</CONNECTIONS___18>
-<REBOOT___247>Reboot...</REBOOT___247>
-<REMOTE_LOGIN137>Remote Login</REMOTE_LOGIN137>
-<ADDRESS_3>Address:</ADDRESS_3>
-<LOGIN_NAME_247>Login name:</LOGIN_NAME_247>
-<LOGIN_PASSWORD_203>Login password:</LOGIN_PASSWORD_203>
-<STATUS134>Status</STATUS134>
-<CONNECTIONS135>Connections</CONNECTIONS135>
-<SERVER_179>Server:</SERVER_179>
-<CONNECTIONS__ID___IP90>Connections (ID - IP - Port - LocalIP - LocalPort - Login - PWord)</CONNECTIONS__ID___IP90>
-<UPDATE_RATE_109>Update rate:</UPDATE_RATE_109>
-<KILL_CONNECTION225>Kill connection</KILL_CONNECTION225>
-<DONE135>Done</DONE135>
-<ADMINISTRATOR_USER_N68>Administrator user name:</ADMINISTRATOR_USER_N68>
-<ADMINISTRATOR_PASSWO55>Administrator password:</ADMINISTRATOR_PASSWO55>
-<ENABLE_CONTROL_PROTO61>Enable control protocol:</ENABLE_CONTROL_PROTO61>
-<ABOUT_TEXT>MyServer Configure (FLTK)
-Copyright (C) 2002, 2003, 2004
-Free Software Foundation, Inc.
-This program is licensed under the GPL</ABOUT_TEXT>
-<LAST_CHANGE>Last change not saved.  Continue anyways?</LAST_CHANGE>
-<NOT_FOUND>Config files not found.</NOT_FOUND>
-<RELOAD_PREV>Reload prevous values?</RELOAD_PREV>
-<ENTER_DEFAULT>Please enter a default file name:</ENTER_DEFAULT>
-<ENTER_EXTENSION>Enter new extension (Example: html):</ENTER_EXTENSION>
-<ENTER_MIME>Enter new MIME type (Example: text/html):</ENTER_MIME>
-<ENTER_NAME>Enter a new name:</ENTER_NAME>
-<ENTER_HOST>Enter a new host name:</ENTER_HOST>
-<ENTER_IP>Enter a new IP:</ENTER_IP>
-<DOWNLAD_CONFIG>Downloading config files:</DOWNLAD_CONFIG>
-<DOWNLAD_FAILED>Download failed.  Code: </DOWNLAD_FAILED>
-<KILL_ALL>This will kill all connections.  Are you sure?</KILL_ALL>
-<SEND_CONFIG>Sending config files:</SEND_CONFIG>
-<UPLOAD_FAILED>Upload failed.  Code: </UPLOAD_FAILED>
-<NOT_SAVE>Could not save.</NOT_SAVE>
-<REBOOT_FAILED>Reboot failed.</REBOOT_FAILED>
-<CONNECT_SERVER>Connecting to server:</CONNECT_SERVER>
-<LOGIN_FAILED>Login failed.  Code: </LOGIN_FAILED>
-<CANNOT_CONNECT>Could not connect to server.</CANNOT_CONNECT>
-<SERVER_CLOSED>Server closed connection.  Code: </SERVER_CLOSED>
-</MYSERVER_LANGUAGE_FILE>
diff --git a/myserver/binaries/languages/configure/italiano.xml b/myserver/binaries/languages/configure/italiano.xml
deleted file mode 100644
index 354b54a..0000000
--- a/myserver/binaries/languages/configure/italiano.xml
+++ /dev/null
@@ -1,103 +0,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<MYSERVER_LANGUAGE_FILE>
-<_ABOUT35>&amp;About</_ABOUT35>
-<_FILE167>&amp;File</_FILE167>
-<_HELP176>&amp;Aiuto</_HELP176>
-<_OPEN___68>&amp;Apri...</_OPEN___68>
-<_QUIT202>&amp;Esci</_QUIT202>
-<_REVERT160>&amp;Ricarica</_REVERT160>
-<_SAVE___65>&amp;Salva...</_SAVE___65>
-<ABOUT252>About</ABOUT252>
-<ACCESSES_LOG_FILE_140>File di log degli accessi:</ACCESSES_LOG_FILE_140>
-<ACTION_154>Azione:</ACTION_154>
-<ADD___148>Aggiungi...</ADD___148>
-<ADMINISTRATOR102>Amministratore</ADMINISTRATOR102>
-<ADMINISTRATOR_E_MAIL247>E-mail dell'amministratore:</ADMINISTRATOR_E_MAIL247>
-<ALWAYS_ACTIVE_THREAD90>Threads sempre attivi:</ALWAYS_ACTIVE_THREAD90>
-<ARPA133>Arpa</ARPA133>
-<BROWSE___254>Sfoglia...</BROWSE___254>
-<CANCEL72>Annulla</CANCEL72>
-<CHOSE_LOCATION80>Scegli la posizione</CHOSE_LOCATION80>
-<CHOSE_CONFIGURATION_10>Scegli la posizione del file di configurazione:</CHOSE_CONFIGURATION_10>
-<CONFIGURATION_FILES_197>File di configurazione situato in /etc/myserver</CONFIGURATION_FILES_197>
-<CONFIGURATION_FILES_168>File di configurazione posizionato nella directory corrente</CONFIGURATION_FILES_168>
-<CONFIGURATION_FILES_6>File di configurazione posizionato in ~/.myserver</CONFIGURATION_FILES_6>
-<CONNECTION_TIME_OUT_75>Time-out della connessione (in sec):</CONNECTION_TIME_OUT_75>
-<CONSOLE213>Console</CONSOLE213>
-<DEFAULT_FILE_NAMES_249>Nome dei files di default :</DEFAULT_FILE_NAMES_249>
-<DEFAULT_FILE_TO_SEND62>File da mandare al posto del browsing</DEFAULT_FILE_TO_SEND62>
-<DIRECTORIES129>Directories</DIRECTORIES129>
-<DOCUMENT_ROOT_98>Radice dei documenti:</DOCUMENT_ROOT_98>
-<EXECUTE213>Esegui</EXECUTE213>
-<EXECUTE_AS_AN_ISAPI_250>Esegui come modulo ISAPI</EXECUTE_AS_AN_ISAPI_250>
-<EXECUTE_SELF_CONTAIN253>Esegui come server FastCGI</EXECUTE_SELF_CONTAIN253>
-<EXTENSION_250>Estensione:</EXTENSION_250>
-<FTP234>FTP</FTP234>
-<GLOBAL83>Globale</GLOBAL83>
-<GZIP_COMPRESSION_THR48>Soglia della compressione gzip (in bytes):</GZIP_COMPRESSION_THR48>
-<HTTP65>HTTP</HTTP65>
-<HTTPS148>HTTPS</HTTPS148>
-<HIGHER89>Alto</HIGHER89>
-<HIGHEST206>Altissimo</HIGHEST206>
-<HOST159>Host</HOST159>
-<HOSTS19>Hosts</HOSTS19>
-<IP153>IP</IP153>
-<INSTALL_SERVICE205>Installa come servizio</INSTALL_SERVICE205>
-<LANGUAGE_97>Linguaggio:</LANGUAGE_97>
-<LOCAL236>Locale</LOCAL236>
-<LOGS150>Logs</LOGS150>
-<MIME41>MIME</MIME41>
-<MIME_TYPE_39>MIME Type:</MIME_TYPE_39>
-<MANAGER_247>Manager:</MANAGER_247>
-<MAX_CONNECTIONS_41>Connessioni massime al server:</MAX_CONNECTIONS_41>
-<MAX_LOG_FILE_SIZE__I245>Dimensione massima del file di log (in bytes):</MAX_LOG_FILE_SIZE__I245>
-<MEMORY_BUFFER__IN_BY228>Buffer di memoria(in bytes):</MEMORY_BUFFER__IN_BY228>
-<MYSERVER_CONFIGURE6>Configura MyServer</MYSERVER_CONFIGURE6>
-<NAME_188>Nome:</NAME_188>
-<NONE145>Nessuno</NONE145>
-<NORMAL107>Normale</NORMAL107>
-<OK154>OK</OK154>
-<PORT_224>Porta:</PORT_224>
-<PERSONALIZED_ERROR_P173>Pagine di errore personalizzate:</PERSONALIZED_ERROR_P173>
-<PROTOCOL85>Protocollo</PROTOCOL85>
-<PROTOCOL_143>Protocollo:</PROTOCOL_143>
-<REMOVE112>Rimuovi</REMOVE112>
-<REMOVE_SERVICE100>Rimuovi il servizio</REMOVE_SERVICE100>
-<RUN54>Esegui</RUN54>
-<RUN_AS_CGI31>Esegui la CGI</RUN_AS_CGI31>
-<RUN_AS_FASTCGI174>Usa la FastCGI</RUN_AS_FASTCGI174>
-<RUN_AS_ISAPI194>Usa la ISAPI</RUN_AS_ISAPI194>
-<RUN_AS_MSCGI191>Usa la MSCGI</RUN_AS_MSCGI191>
-<RUN_AS_WINCGI14>Usa la WINCGI</RUN_AS_WINCGI14>
-<SSL_CERTIFICATE_212>Certificato SSL:</SSL_CERTIFICATE_212>
-<SSL_PASSWORD_195>Password per SSL:</SSL_PASSWORD_195>
-<SSL_PRIVATE_KEY_181>Chiave privata SSL:</SSL_PRIVATE_KEY_181>
-<SEND_THE_FILE175>Invia il file</SEND_THE_FILE175>
-<SER_VICE249>Ser&amp;vizio</SER_VICE249>
-<SERVER121>Server</SERVER121>
-<SERVICE211>Servizio</SERVICE211>
-<STOP167>Ferma</STOP167>
-<STYLESHEET_104>Stylesheet:</STYLESHEET_104>
-<SYSTEM135>Sistema</SYSTEM135>
-<SYSTEM_FOLDER_96>Directory di sistema:</SYSTEM_FOLDER_96>
-<URL_LINK195>URL link</URL_LINK195>
-<USER160>User</USER160>
-<VERBOSITY_LEVEL_63>Livello di verbosità sul log:</VERBOSITY_LEVEL_63>
-<WARNING_LOG_FILE_56>Warning log file:</WARNING_LOG_FILE_56>
-<AS_CONSOLE202>come Console</AS_CONSOLE202>
-<AS_SERVICE200>come Service</AS_SERVICE200>
-<ABOUT_TEXT>MyServer Configure (FLTK)
-Copyright (C) 2002, 2003, 2004
-Free Software Foundation, Inc.
-Questo programma viene distribuito sotto i termini della licenza GPL</ABOUT_TEXT>
-<LAST_CHANGE>Cambiamenti non salvati. Continuare lo stesso?</LAST_CHANGE>
-<NOT_FOUND>File di configurazione non trovato.</NOT_FOUND>
-<RELOAD_PREV>Ricarico i valori precedenti?</RELOAD_PREV>
-<ENTER_DEFAULT>Inserisci un file di default:</ENTER_DEFAULT>
-<ENTER_EXTENSION>Inserisci una nuova estensione (Es: html):</ENTER_EXTENSION>
-<ENTER_MIME>Inserisci un nuovo tipo MIME (Es: text/html):</ENTER_MIME>
-<ENTER_NAME>Inserisci un nuovo nome:</ENTER_NAME>
-<ENTER_HOST>Inserisci un nuovo host:</ENTER_HOST>
-<ENTER_IP>Inserisci un nuovo IP:</ENTER_IP>
-<MAXIMUM_NUMBER_OF_TH202>Numero massimo di threads:</MAXIMUM_NUMBER_OF_TH202>
-</MYSERVER_LANGUAGE_FILE>
diff --git a/myserver/binaries/languages/configure/spanish.xml b/myserver/binaries/languages/configure/spanish.xml
deleted file mode 100644
index bdab79d..0000000
--- a/myserver/binaries/languages/configure/spanish.xml
+++ /dev/null
@@ -1,135 +0,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<MYSERVER_LANGUAGE_FILE>
-<_ABOUT35>&amp;Sobre</_ABOUT35>
-<_FILE167>&amp;Archivo</_FILE167>
-<_HELP176>&amp;Ayuda</_HELP176>
-<_OPEN___68>&amp;Abrir...</_OPEN___68>
-<_QUIT202>&amp;Salir</_QUIT202>
-<_REVERT160>&amp;Invertir</_REVERT160>
-<_SAVE___65>&amp;Grabar...</_SAVE___65>
-<ABOUT252>Sobre</ABOUT252>
-<ACCESSES_LOG_FILE_140>Acceso al fichero diario:</ACCESSES_LOG_FILE_140>
-<ACTION_154>Accion:</ACTION_154>
-<ADD___148>Añadir...</ADD___148>
-<ADMINISTRATOR102>Administrador</ADMINISTRATOR102>
-<ADMINISTRATOR_E_MAIL247>Administrador e-mail:</ADMINISTRATOR_E_MAIL247>
-<ALWAYS_ACTIVE_THREAD90>Siempre activar threads:</ALWAYS_ACTIVE_THREAD90>
-<ARPA133>Arpa</ARPA133>
-<BROWSE___254>Buscar...</BROWSE___254>
-<CANCEL72>Cancelar</CANCEL72>
-<CHOSE_LOCATION80>Elija Localizacion</CHOSE_LOCATION80>
-<CHOSE_CONFIGURATION_10>Elija configuracion de Archivo localizado:</CHOSE_CONFIGURATION_10>
-<CONFIGURATION_FILES_197>Elija Archivo localizado en /etc/myserver</CONFIGURATION_FILES_197>
-<CONFIGURATION_FILES_168>Configuracion de Archivo localizado en directorio</CONFIGURATION_FILES_168>
-<CONFIGURATION_FILES_6>Configuracion de Archivo localizado en ~/.myserver</CONFIGURATION_FILES_6>
-<CONNECTION_TIME_OUT_75>Conexion time-out (en segundos):</CONNECTION_TIME_OUT_75>
-<CONSOLE213>Consola</CONSOLE213>
-<DEFAULT_FILE_NAMES_249>Nombre del Archivo:</DEFAULT_FILE_NAMES_249>
-<DEFAULT_FILE_TO_SEND62>Archivo para enviar en un directorio cuando no se especifica ninguno</DEFAULT_FILE_TO_SEND62>
-<DIRECTORIES129>Directorios</DIRECTORIES129>
-<DOCUMENT_ROOT_98>Documento root:</DOCUMENT_ROOT_98>
-<EXECUTE213>Ejecutar</EXECUTE213>
-<EXECUTE_AS_AN_ISAPI_250>Ejecutar como  ISAPI modulo</EXECUTE_AS_AN_ISAPI_250>
-<EXECUTE_SELF_CONTAIN253>Ejectuar propio contenido FastCGI</EXECUTE_SELF_CONTAIN253>
-<EXTENSION_250>Extension:</EXTENSION_250>
-<FTP234>FTP</FTP234>
-<GLOBAL83>Global</GLOBAL83>
-<GZIP_COMPRESSION_THR48>Gzip compresion en su limite (en bytes):</GZIP_COMPRESSION_THR48>
-<HTTP65>HTTP</HTTP65>
-<HTTPS148>HTTPS</HTTPS148>
-<HIGHER89>Higher</HIGHER89>
-<HIGHEST206>Highest</HIGHEST206>
-<HOST159>Host</HOST159>
-<HOSTS19>Hosts</HOSTS19>
-<IP153>IP</IP153>
-<INSTALL_SERVICE205>Instalar Servicio</INSTALL_SERVICE205>
-<LANGUAGE_97>Lenguaje:</LANGUAGE_97>
-<LOCAL236>Local</LOCAL236>
-<LOGS150>Logs</LOGS150>
-<MIME41>MIME</MIME41>
-<MIME_TYPE_39>MIME Tipo:</MIME_TYPE_39>
-<MANAGER_247>Manager:</MANAGER_247>
-<MAX_CONNECTIONS_41>Max conexiones:</MAX_CONNECTIONS_41>
-<MAX_LOG_FILE_SIZE__I245>Max log Archivo (en bytes):</MAX_LOG_FILE_SIZE__I245>
-<MEMORY_BUFFER__IN_BY228>Memory buffer (en bytes):</MEMORY_BUFFER__IN_BY228>
-<MYSERVER_CONFIGURE6>MyServer Configuracion</MYSERVER_CONFIGURE6>
-<NAME_188>Nombre:</NAME_188>
-<NONE145>Ninguno</NONE145>
-<NORMAL107>Normal</NORMAL107>
-<OK154>OK</OK154>
-<PORT_224>Puerto:</PORT_224>
-<PERSONALIZED_ERROR_P173>Personalisar paginas de error:</PERSONALIZED_ERROR_P173>
-<PROTOCOL85>Protocolo</PROTOCOL85>
-<PROTOCOL_143>Protocolo:</PROTOCOL_143>
-<REMOVE112>Remover</REMOVE112>
-<REMOVE_SERVICE100>Remover Servicio</REMOVE_SERVICE100>
-<RUN54>funcionamiento</RUN54>
-<RUN_AS_CGI31>Funcionamiento como CGI</RUN_AS_CGI31>
-<RUN_AS_FASTCGI174>Funcionamiento como FastCGI</RUN_AS_FASTCGI174>
-<RUN_AS_ISAPI194>Funcionamiento como ISAPI</RUN_AS_ISAPI194>
-<RUN_AS_MSCGI191>Funcionamiento como MSCGI</RUN_AS_MSCGI191>
-<RUN_AS_WINCGI14>Funcionamiento como WINCGI</RUN_AS_WINCGI14>
-<SSL_CERTIFICATE_212>SSL certificado:</SSL_CERTIFICATE_212>
-<SSL_PASSWORD_195>SSL clave:</SSL_PASSWORD_195>
-<SSL_PRIVATE_KEY_181>SSL privado key:</SSL_PRIVATE_KEY_181>
-<SEND_THE_FILE175>Enviar el archivo</SEND_THE_FILE175>
-<SER_VICE249>Ser&amp;vicio</SER_VICE249>
-<SERVER121>Server</SERVER121>
-<SERVICE211>Servicio</SERVICE211>
-<STOP167>Parar</STOP167>
-<STYLESHEET_104>Stylesheet:</STYLESHEET_104>
-<SYSTEM135>Systema</SYSTEM135>
-<SYSTEM_FOLDER_96>Carpeta de Systema:</SYSTEM_FOLDER_96>
-<URL_LINK195>URL link</URL_LINK195>
-<USER160>Usuario</USER160>
-<VERBOSITY_LEVEL_63>Verbosity level:</VERBOSITY_LEVEL_63>
-<WARNING_LOG_FILE_56>Peligro de log Archivo:</WARNING_LOG_FILE_56>
-<AS_CONSOLE202>Como Consola</AS_CONSOLE202>
-<AS_SERVICE200>Como Servicio</AS_SERVICE200>
-<CONTROL35>CONTROL</CONTROL35>
-<RE_MOTE148>Re&amp;moto</RE_MOTE148>
-<LOGIN___133>Conexion...</LOGIN___133>
-<LOGOUT124>Salir</LOGOUT124>
-<GET_CONFIG153>Tener Config</GET_CONFIG153>
-<SEND_CONFIG4>Enviar Config...</SEND_CONFIG4>
-<CONNECTIONS___18>Connectar...</CONNECTIONS___18>
-<REBOOT___247>Reboot...</REBOOT___247>
-<REMOTE_LOGIN137>Remota Conexion</REMOTE_LOGIN137>
-<ADDRESS_3>Direccion:</ADDRESS_3>
-<LOGIN_NAME_247>Nombre de Conexion:</LOGIN_NAME_247>
-<LOGIN_PASSWORD_203>Clave de Conexion:</LOGIN_PASSWORD_203>
-<STATUS134>Status</STATUS134>
-<CONNECTIONS135>Conexiones</CONNECTIONS135>
-<SERVER_179>Server:</SERVER_179>
-<CONNECTIONS__ID___IP90>Conexiones (ID - IP - Port - LocalIP - LocalPort - Login - PWord)</CONNECTIONS__ID___IP90>
-<UPDATE_RATE_109>Tarifa de la actualización:</UPDATE_RATE_109>
-<KILL_CONNECTION225>Matar Conexion</KILL_CONNECTION225>
-<DONE135>Terminar</DONE135>
-<ADMINISTRATOR_USER_N68>Administrador nombre:</ADMINISTRATOR_USER_N68>
-<ADMINISTRATOR_PASSWO55>Administrador clave:</ADMINISTRATOR_PASSWO55>
-<ENABLE_CONTROL_PROTO61>Permita el protocolo del control:</ENABLE_CONTROL_PROTO61>
-<ABOUT_TEXT>MyServer Configuracion (FLTK)
-Copyright (C) 2002, 2003, 2004
-Licencian al equipo de MyServer este programa bajo GLP</ABOUT_TEXT>
-<LAST_CHANGE>Cambio pasado no ahorrado.  ¿Continúe de todos modos?</LAST_CHANGE>
-<NOT_FOUND>Config de archivo no encontrada.</NOT_FOUND>
-<RELOAD_PREV>Valores previous de la recarga?</RELOAD_PREV>
-<ENTER_DEFAULT>Incorpore por favor un nombre del archivo del defecto:</ENTER_DEFAULT>
-<ENTER_EXTENSION>Entrar una nueva extension (Ejemplo: html):</ENTER_EXTENSION>
-<ENTER_MIME>Entrar una nueva MIME tipo (Example: text/html):</ENTER_MIME>
-<ENTER_NAME>Entrar un nuevo nombre:</ENTER_NAME>
-<ENTER_HOST>Entrar un nuevo host nombre:</ENTER_HOST>
-<ENTER_IP>Entrar un nuevo IP:</ENTER_IP>
-<DOWNLAD_CONFIG>Descargar config Archivo:</DOWNLAD_CONFIG>
-<DOWNLAD_FAILED>Descarga codigo fallado: </DOWNLAD_FAILED>
-<KILL_ALL>Vas a matar/desconectar todo.  Estas seguro?</KILL_ALL>
-<SEND_CONFIG>Enviando config Archivos:</SEND_CONFIG>
-<UPLOAD_FAILED>Upload codigo fallado: </UPLOAD_FAILED>
-<NOT_SAVE>No se pudo guardar.</NOT_SAVE>
-<REBOOT_FAILED>Reboot falla.</REBOOT_FAILED>
-<CONNECT_SERVER>Conneccion al server:</CONNECT_SERVER>
-<LOGIN_FAILED>Conexion failed.  Code: </LOGIN_FAILED>
-<CANNOT_CONNECT>No se pudo conectar al server.</CANNOT_CONNECT>
-<SERVER_CLOSED>Server cerrando.  Code: </SERVER_CLOSED>
-</MYSERVER_LANGUAGE_FILE>
-
diff --git a/myserver/binaries/languages/english.xml b/myserver/binaries/languages/english.xml
deleted file mode 100644
index 408ce81..0000000
--- a/myserver/binaries/languages/english.xml
+++ /dev/null
@@ -1,43 +0,0 @@
-<!--MYSERVER SUPPORT FOR ENGLISH LANGUAGE-->
-<!--COPYRIGHT 2002 MyServer Team-->
-<MYSERVER_LANGUAGE_FILE>
-
-<MSG_LANGUAGE>Using english language</MSG_LANGUAGE>
-<MSG_SERVER_CONF>Server configuration terminated</MSG_SERVER_CONF>
-<AL_NO_SECURITY>Security access is not used, the web directory contents is accessible to anyone</AL_NO_SECURITY>
-<MSG_ISOCK>Initializing socket library...</MSG_ISOCK>
-<ERR_ISOCK>Error initializing socket library</ERR_ISOCK>
-<MSG_SOCKSTART>Socket library was initialized</MSG_SOCKSTART>
-<MSG_SSOCKCREATE>Creating server socket...</MSG_SSOCKCREATE>
-<MSG_SSOCKRUN>Server socket created</MSG_SSOCKRUN>
-<ERR_OPENP>Error opening port, port can be used by another application</ERR_OPENP>
-<MSG_BIND_PORT>Trying to bind port...</MSG_BIND_PORT>
-<ERR_BIND>Error binding port, port can be used by another application</ERR_BIND>
-<MSG_PORT_BOUND>Port was bound</MSG_PORT_BOUND>
-<MSG_SLISTEN>Trying to listen on port...</MSG_SLISTEN>
-<ERR_LISTEN>Error listening</ERR_LISTEN>
-<MSG_LISTEN>Listen on port</MSG_LISTEN>
-<MSG_LOADMIME>Loading MIME types...</MSG_LOADMIME>
-<MSG_GETNAME>Computer name is</MSG_GETNAME>
-<MSG_LOADED>Loaded</MSG_LOADED>
-<ERR_LOADED>Error Loading</ERR_LOADED>
-<MSG_MIMERUN>MIME types loaded successfully</MSG_MIMERUN>
-<MSG_ADDRESS>IP Address</MSG_ADDRESS>
-<ERR_LOADMIME>MIME types cannot be loaded</ERR_LOADMIME>
-<ERR_ERROR>Generic error</ERR_ERROR>
-<MSG_NUM_CPU>Number of processors:</MSG_NUM_CPU>
-<MSG_CREATET>Creating thread...</MSG_CREATET>
-<MSG_THREADR>Thread created</MSG_THREADR>
-<MSG_LISTENT>Creating listen thread...</MSG_LISTENT>
-<MSG_LISTENTR>Listen thread is created</MSG_LISTENTR>
-<MSG_READY>MyServer is now ready to accept connections</MSG_READY>
-<MSG_BREAK>Press Ctrl+C to break execution</MSG_BREAK>
-<MSG_STOPT>Terminating threads...</MSG_STOPT>
-<MSG_TSTOPPED>Threads terminated</MSG_TSTOPPED>
-<MSG_MEMCLEAN>Cleaning memory...</MSG_MEMCLEAN>
-<ERR_LOADVHOSTS>Error loading virtual hosts</ERR_LOADVHOSTS>
-<MSG_SERVICESTOP>Service is stopping...</MSG_SERVICESTOP>
-<MSG_LOADMSCGI>MSCGI-LIB loaded successfully</MSG_LOADMSCGI>
-<ERR_LOADMSCGI>MSCGI-LIB cannot be loaded</ERR_LOADMSCGI>
-
-</MYSERVER_LANGUAGE_FILE>
diff --git a/myserver/binaries/languages/french.xml b/myserver/binaries/languages/french.xml
deleted file mode 100644
index d3e6792..0000000
--- a/myserver/binaries/languages/french.xml
+++ /dev/null
@@ -1,42 +0,0 @@
-<!--MYSERVER SUPPORT FOR FRENCH LANGUAGE-->
-<!--COPYRIGHT 2002 MyServer Team-->
-<MYSERVER_LANGUAGE_FILE>
-<MSG_LANGUAGE>Utilisation de la langue française...</MSG_LANGUAGE>
-<MSG_SERVER_CONF>Configuration du serveur terminée</MSG_SERVER_CONF>
-<AL_NO_SECURITY>L'accès sécurisé n'est pas utilisé, les répertoires web sont accessibles par tout le monde</AL_NO_SECURITY>
-<MSG_ISOCK>Initalisation de la librairie socket...</MSG_ISOCK>
-<ERR_ISOCK>Erreur lors d" l'initialisation de la librairie socket</ERR_ISOCK>
-<MSG_SOCKSTART>La libraire socket est initialisée...</MSG_SOCKSTART>
-<MSG_SSOCKCREATE>Création de la socket du serveur...</MSG_SSOCKCREATE>
-<MSG_SSOCKRUN>Socket du serveur créée.</MSG_SSOCKRUN>
-<ERR_OPENP>Erreur lors de l'ouverture du port, le port est déjà peut-être utilisé par un autre application</ERR_OPENP>
-<MSG_BIND_PORT>Binding du port...</MSG_BIND_PORT>
-<ERR_BIND>Erreur pendant le binding du port, le port est déjà peut-être utilisé par un autre application</ERR_BIND>
-<MSG_PORT_BOUND>Le port est bindé</MSG_PORT_BOUND>
-<MSG_SLISTEN>Tentative d'écoute du port...</MSG_SLISTEN>
-<ERR_LISTEN>Erreur lors de l'écoute du port</ERR_LISTEN>
-<MSG_LISTEN>Le serveur écoute le port</MSG_LISTEN>
-<MSG_LOADMIME>Chargement des types MIME...</MSG_LOADMIME>
-<MSG_GETNAME>Le nom de l'ordinateur est</MSG_GETNAME>
-<MSG_LOADED>Ouvert</MSG_LOADED>
-<ERR_LOADED>Erreur pendant l'ouverture</ERR_LOADED>
-<MSG_MIMERUN>Les types MIME ouvert avec succès</MSG_MIMERUN>
-<MSG_ADDRESS>Adresse IP</MSG_ADDRESS>
-<ERR_LOADMIME>Les types MIME ne peuvent être chargé</ERR_LOADMIME>
-<ERR_ERROR>Erreur générale</ERR_ERROR>
-<MSG_NUM_CPU>Nombre de processeurs :</MSG_NUM_CPU>
-<MSG_CREATET>Creation du thread</MSG_CREATET>
-<MSG_THREADR>Thread crée</MSG_THREADR>
-<MSG_LISTENT>Création du thread écouteur...</MSG_LISTENT>
-<MSG_LISTENTR>Le thread écouteur est crée</MSG_LISTENTR>
-<MSG_READY>MyServer est maintenant près à accepter des connections</MSG_READY>
-<MSG_BREAK>Appuyer sur Ctrl+C pour arréter le serveur</MSG_BREAK>
-<MSG_STOPT>Extinction des threads...</MSG_STOPT>
-<MSG_TSTOPPED>Threads terminés</MSG_TSTOPPED>
-<MSG_MEMCLEAN>Libération de la mémoire...</MSG_MEMCLEAN>
-<ERR_LOADVHOSTS>Erreur pendant l'ouverture des hosts virtuels</ERR_LOADVHOSTS>
-<MSG_SERVICESTOP>Le service est en train de s'arréter...</MSG_SERVICESTOP>
-<MSG_LOADMSCGI>MSCGI-LIB chargéé avec succès</MSG_LOADMSCGI>
-<ERR_LOADMSCGI>MSCGI-LIB n'a pas pu être ouvert</ERR_LOADMSCGI>
-
-</MYSERVER_LANGUAGE_FILE>
diff --git a/myserver/binaries/languages/german.xml b/myserver/binaries/languages/german.xml
deleted file mode 100644
index 13ac219..0000000
--- a/myserver/binaries/languages/german.xml
+++ /dev/null
@@ -1,43 +0,0 @@
-<!--MYSERVER SUPPORT FOR GERMAN LANGUAGE-->
-<!--COPYRIGHT 2002 MyServer Team-->
-<!--TRANSLATED BY BINARIX-->
-<MYSERVER_LANGUAGE_FILE>
-<MSG_LANGUAGE>Benutze Deutsche Sprache</MSG_LANGUAGE>
-<MSG_SERVER_CONF>Server Konfiguration beendet</MSG_SERVER_CONF>
-<AL_NO_SECURITY>Sicherheitszugriff wird nicht genutzt, der Inhalt des Webordners ist zugaenglich fuer jeden</AL_NO_SECURITY>
-<MSG_ISOCK>Initialisiere Socket Library...</MSG_ISOCK>
-<ERR_ISOCK>Fehler beim Initialisieren der Socket Library</ERR_ISOCK>
-<MSG_SOCKSTART>Socket Library wurde initialisiert</MSG_SOCKSTART>
-<MSG_SSOCKCREATE>Erstelle server socket...</MSG_SSOCKCREATE>
-<MSG_SSOCKRUN>Server socket wurde erstellt</MSG_SSOCKRUN>
-<ERR_OPENP>Fehler beim Oeffnen des Ports, Port kann bereits von einer anderen Applikation benutzt werden</ERR_OPENP>
-<MSG_BIND_PORT>Versuche Port zu binden...</MSG_BIND_PORT>
-<ERR_BIND>Fehler beim Binden des Ports, Port kann bereits von einer anderen Applikation bentutz werden</ERR_BIND>
-<MSG_PORT_BOUND>Port wurde gebunden</MSG_PORT_BOUND>
-<MSG_SLISTEN>Versuche auf Port zu hoeren...</MSG_SLISTEN>
-<ERR_LISTEN>Fehler beim Hoeren</ERR_LISTEN>
-<MSG_LISTEN>Hoere auf Port</MSG_LISTEN>
-<MSG_LOADMIME>Lade MIME types...</MSG_LOADMIME>
-<MSG_GETNAME>Computer Name ist</MSG_GETNAME>
-<MSG_LOADED>Geladen</MSG_LOADED>
-<ERR_LOADED>Fehler beim Laden</ERR_LOADED>
-<MSG_MIMERUN>MIME types erfolgreich geladen</MSG_MIMERUN>
-<MSG_ADDRESS>IP Adresse</MSG_ADDRESS>
-<ERR_LOADMIME>MIME types konnten nicht geladen werden</ERR_LOADMIME>
-<ERR_ERROR>Allgemeiner Fehler</ERR_ERROR>
-<ERR_LOADVHOSTS>Fehler beim Laden der virtuellen Hosts</ERR_LOADVHOSTS>
-<MSG_NUM_CPU>Nummer des Prozessors:</MSG_NUM_CPU>
-<MSG_CREATET>Erstelle Thread</MSG_CREATET>
-<MSG_THREADR>Thread erstellt</MSG_THREADR>
-<MSG_LISTENT>Erstelle hoerenden Thread...</MSG_LISTENT>
-<MSG_LISTENTR>Hoerender Thread wurde erstellt</MSG_LISTENTR>
-<MSG_READY>MyServer kann jetzt Verbindungen akzeptieren</MSG_READY>
-<MSG_BREAK>Druecke Strg+C um die Anwendung abzubrechen</MSG_BREAK>
-<MSG_STOPT>Beende Threads...</MSG_STOPT>
-<MSG_TSTOPPED>Threads beendet</MSG_TSTOPPED>
-<MSG_MEMCLEAN>Loesche Speicher...</MSG_MEMCLEAN>
-<MSG_SERVICESTOP>Stoppe Service...</MSG_SERVICESTOP>
-<MSG_LOADMSCGI>MSCGI-LIB erfolgreich geladen</MSG_LOADMSCGI>
-<ERR_LOADMSCGI>MSCGI-LIB konnten nicht geladen werden</ERR_LOADMSCGI>
-
-</MYSERVER_LANGUAGE_FILE>
\ No newline at end of file
diff --git a/myserver/binaries/languages/italiano.xml b/myserver/binaries/languages/italiano.xml
deleted file mode 100644
index 7a15e67..0000000
--- a/myserver/binaries/languages/italiano.xml
+++ /dev/null
@@ -1,41 +0,0 @@
-<!--MYSERVER SUPPORTO PER LA LINGUA ITALIANA-->
-<!--COPYRIGHT 2002 MyServer Team-->
-<MYSERVER_LANGUAGE_FILE>
-<MSG_LANGUAGE>Uso della lingua italiana</MSG_LANGUAGE>
-<MSG_SERVER_CONF>Configurazione Server terminata</MSG_SERVER_CONF>
-<AL_NO_SECURITY>Non viene usata nessuna sicurezza, tutti possono accedere alla cartella web</AL_NO_SECURITY>
-<MSG_ISOCK>Inizializzazione della libreria socket...</MSG_ISOCK>
-<ERR_ISOCK>Errore nella inizializzazione della libreria socket</ERR_ISOCK>
-<MSG_SOCKSTART>Libreria socket inizializzata con successo</MSG_SOCKSTART>
-<MSG_SSOCKCREATE>Creazione del socket server...</MSG_SSOCKCREATE>
-<MSG_SSOCKRUN>Socket Server creato</MSG_SSOCKRUN>
-<ERR_OPENP>Errore nell'apertura della porta</ERR_OPENP>
-<MSG_BIND_PORT>Binding della porta...</MSG_BIND_PORT>
-<ERR_BIND>Errore nel binding della porta</ERR_BIND>
-<MSG_PORT_BOUND>Bind della porta avvenuto</MSG_PORT_BOUND>
-<MSG_SLISTEN>Tentativo di ascolto sulla porta...</MSG_SLISTEN>
-<ERR_LISTEN>Errore nell'ascoltare sulla porta</ERR_LISTEN>
-<MSG_LISTEN>Il server ascolta sulla porta</MSG_LISTEN>
-<MSG_LOADMIME>Caricamento tipi MIME...</MSG_LOADMIME>
-<MSG_GETNAME>Nome del Computer </MSG_GETNAME>
-<MSG_MIMERUN>Tipi Mime caricati con successo</MSG_MIMERUN>
-<MSG_ADDRESS>Indirizzo IP</MSG_ADDRESS>
-<ERR_LOADMIME>I tipi MIME non sono stati caricati correttamente</ERR_LOADMIME>
-<ERR_ERROR>Errore generico</ERR_ERROR>
-<MSG_NUM_CPU>Numero di processori:</MSG_NUM_CPU>
-<MSG_CREATET>Creazione del thread</MSG_CREATET>
-<MSG_THREADR>Thread creato</MSG_THREADR>
-<MSG_LISTENT>Creazione del thread di ascolto...</MSG_LISTENT>
-<MSG_LISTENTR>Thread di ascolto creato con successo</MSG_LISTENTR>
-<MSG_READY>MyServer pronto ad accettare connessioni</MSG_READY>
-<MSG_BREAK>Premere Ctrl+C per terminare l'esecuzione</MSG_BREAK>
-<MSG_STOPT>Chiusura threads in corso...</MSG_STOPT>
-<MSG_TSTOPPED>Threads chiusi con successo</MSG_TSTOPPED>
-<MSG_MEMCLEAN>Disallocazione memoria in corso...</MSG_MEMCLEAN>
-<MSG_SERVICESTOP>Arresto del servizio in corso...</MSG_SERVICESTOP>
-<MSG_LOADED>Caricata</MSG_LOADED>
-<ERR_LOADED>Errore nel caricare</ERR_LOADED>
-<ERR_LOADVHOSTS>Errore nel caricare i virtual hosts</ERR_LOADVHOSTS>
-<MSG_LOADMSCGI>MSCGI-LIB caricata con successo</MSG_LOADMSCGI>
-<ERR_LOADMSCGI>Errore nel caricare MSCGI-LIB</ERR_LOADMSCGI> 
-</MYSERVER_LANGUAGE_FILE>
\ No newline at end of file
diff --git a/myserver/binaries/languages/romana.xml b/myserver/binaries/languages/romana.xml
deleted file mode 100644
index 21bf033..0000000
--- a/myserver/binaries/languages/romana.xml
+++ /dev/null
@@ -1,43 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--PORTUL MYSERVER PENTRU LIMBA ROMÃ‚NÄ‚-->
-<!--COPYRIGHT 2002 MyServer Team-->
-<MYSERVER_LANGUAGE_FILE>
-<MSG_LANGUAGE>Utilizarea limbii romÃ¢ne</MSG_LANGUAGE>
-<MSG_SERVER_CONF>Configurarea serverului s-a terminat</MSG_SERVER_CONF>
-<AL_NO_SECURITY>Accesul securizat nu este utilizat, conÅ£inutul directoarelor web este accesibil tuturor</AL_NO_SECURITY>
-<MSG_ISOCK>IniÅ£ializarea bibliotecii sockeÅ£ilor...</MSG_ISOCK>
-<ERR_ISOCK>Eroare la iniÅ£ializarea bibliotecii sockeÅ£ilor</ERR_ISOCK>
-<MSG_SOCKSTART>Biblioteca sockeÅ£ilor a fost iniÅ£ializatÄƒ</MSG_SOCKSTART>
-<MSG_SSOCKCREATE>Crearea socketului serverului...</MSG_SSOCKCREATE>
-<MSG_SSOCKRUN>Socketul serverului a fost creat</MSG_SSOCKRUN>
-<ERR_OPENP>Eroare la deschiderea portului, portul ar putea fi utilizat de cÄƒtre o altÄƒ aplicaÅ£ie</ERR_OPENP>
-<MSG_BIND_PORT>ÃŽncercare de legare(engl. bind) a portul...</MSG_BIND_PORT>
-<ERR_BIND>Eroare la legarea portului, portul ar putea fi utilizat de cÄƒtre o altÄƒ aplicaÅ£ie</ERR_BIND>
-<MSG_PORT_BOUND>Portul a fost legat</MSG_PORT_BOUND>
-<MSG_SLISTEN>ÃŽncercare de a asculta portul...</MSG_SLISTEN>
-<ERR_LISTEN>Eroare la ascultare</ERR_LISTEN>
-<MSG_LISTEN>Ascult pe portul</MSG_LISTEN>
-<MSG_LOADMIME>ÃŽncarc tipurile MIME ...</MSG_LOADMIME>
-<MSG_GETNAME>Numele calculatorului este</MSG_GETNAME>
-<MSG_LOADED>ÃŽncÄƒrcÄƒt</MSG_LOADED>
-<ERR_LOADED>Eroare Ã®ncÄƒrcÃ¢nd</ERR_LOADED>
-<MSG_MIMERUN>Tipurile MIME au fost Ã®ncÄƒrcate cu succes</MSG_MIMERUN>
-<MSG_ADDRESS>Adresa IP</MSG_ADDRESS>
-<ERR_LOADMIME>Tipurile MIME nu pot fi Ã®ncÄƒrcate</ERR_LOADMIME>
-<ERR_ERROR>Eroare genericÄƒ</ERR_ERROR>
-<MSG_NUM_CPU>NumÄƒrul de procesoare:</MSG_NUM_CPU>
-<MSG_CREATET>Crearea firului de execuÅ£ie(engl. thread)...</MSG_CREATET>
-<MSG_THREADR>Firul de execuÅ£ie a fost creat</MSG_THREADR>
-<MSG_LISTENT>Crearea firului de execuÅ£ie care ascultÄƒ...</MSG_LISTENT>
-<MSG_LISTENTR>Firul de execuÅ£ie care ascultÄƒ a fost creat</MSG_LISTENTR>
-<MSG_READY>MyServer este pregÄƒtit sÄƒ accepte conexiuni</MSG_READY>
-<MSG_BREAK>ApÄƒsaÅ£i Ctrl+C pentru a opri execuÅ£ia</MSG_BREAK>
-<MSG_STOPT>Terminarea firelor de execuÅ£ie...</MSG_STOPT>
-<MSG_TSTOPPED>Firele de excuÅ£ie au fost terminate</MSG_TSTOPPED>
-<MSG_MEMCLEAN>Eliberarea memoriei...</MSG_MEMCLEAN>
-<ERR_LOADVHOSTS>Eroare la Ã®ncÄƒrcarea gazdelor virtuale(engl.virtual hosts)</ERR_LOADVHOSTS>
-<MSG_SERVICESTOP>Serviciul se opreÅŸte...</MSG_SERVICESTOP>
-<MSG_LOADMSCGI>MSCGI-LIB a fost Ã®ncÄƒrcatÄƒ cu succes</MSG_LOADMSCGI>
-<ERR_LOADMSCGI>MSCGI-LIB nu poate fi Ã®ncÄƒrcatÄƒ</ERR_LOADMSCGI>
-
-</MYSERVER_LANGUAGE_FILE>
diff --git a/myserver/binaries/languages/russian.xml b/myserver/binaries/languages/russian.xml
deleted file mode 100644
index de32273..0000000
--- a/myserver/binaries/languages/russian.xml
+++ /dev/null
@@ -1,52 +0,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<!--MYSERVER SUPPORT FOR RUSSIAN LANGUAGE-->
-<!--COPYRIGHT 2002 Rocky_10_Balboa-->
-<MYSERVER_LANGUAGE_FILE>
-<MSG_LANGUAGE>Èñïîëüçóåòñÿ ðóññêèé ÿçûê</MSG_LANGUAGE>
-<MSG_SERVER_CONF>Êîíôèãóðàöèÿ ñåðâåðà ïðåðâàíà</MSG_SERVER_CONF>
-<AL_NO_SECURITY>Íå èñïîëüçóåòñÿ äîñòóï ñ çàùèòîé, ñîäåðæàíèå web ïàïêè äîñòóïíî âñåì</AL_NO_SECURITY>
-<MSG_ISOCK>Èíèöèàëèçàöèÿ áèáëèîòåêè ñîêåòà...</MSG_ISOCK>
-<ERR_ISOCK>Îøèáêà èíèöèàëèçàöèè áèáëèîòåêè ñîêåòà</ERR_ISOCK>
-<MSG_SOCKSTART>Áèáëèîòåêà ñîêåòà íå èíèöèàëèçèðîâàíà</MSG_SOCKSTART>
-<MSG_SSOCKCREATE>Ñîçäàíèå ñîêåòà ñåðâåðà</MSG_SSOCKCREATE>
-<MSG_SSOCKRUN>Ñîêåò ñåðâåðà ñîçäàí</MSG_SSOCKRUN>
-<ERR_OPENP>Îøèáêà îòêðûòèÿ ïîðòà, âîçìîæíî, ïîðò èñïîëüçóåòñÿ äðóãèì ïðèëîæåíèåì</ERR_OPENP>
-<MSG_BIND_PORT>Ïîïûòêà ñâÿçè ñ ïîðòîì</MSG_BIND_PORT>
-<ERR_BIND>Îøèáêà ïðè ïîïûòêå ñâÿçè ñ ïîðòîì, âîçìîæíî, ïîðò èñïîëüçóåòñÿ äðóãèì ïðèëîæåíèåì</ERR_BIND>
-<MSG_PORT_BOUND>Ñâÿçü ñ ïîðòîì óñòàíîâëåíà</MSG_PORT_BOUND>
-<MSG_SLISTEN>Ïîïûòêà ïðîñëóøèâàíèÿ ïîðòà...</MSG_SLISTEN>
-<ERR_LISTEN>Îøèáêà ïðîñëóøèâàíèÿ</ERR_LISTEN>
-<MSG_LISTEN>Ïðîñëóøèâàíèå ïîðòà</MSG_LISTEN>
-<MSG_LOADMIME>Çàãðóçêà MIME òèïîâ</MSG_LOADMIME>
-<MSG_GETNAME>Èìÿ êîìïüþòåðà: </MSG_GETNAME>
-<MSG_LOADED>Çàãðóæåíî</MSG_LOADED>
-<ERR_LOADED>Îøèáêà çàãðóçêè</ERR_LOADED>
-<MSG_MIMERUN>MIME òèïû áëàãîïîëó÷íî çàãðóæåíû</MSG_MIMERUN>
-<MSG_ADDRESS>IP àäðåñ</MSG_ADDRESS>
-<ERR_LOADMIME>MIME òèïû íå ìîãóò áûòü çàãðóæåíû</ERR_LOADMIME>
-<ERR_ERROR>Îøèáêà</ERR_ERROR>
-<MSG_NUM_CPU>×èñëî ïðîöåññîðîâ: </MSG_NUM_CPU>
-<MSG_CREATET>Ñîçäàíèå ïîäïðîöåññà</MSG_CREATET>
-<MSG_THREADR>Ïîäïðîöåññ ñîçäàí</MSG_THREADR>
-<MSG_LISTENT>Ñîçäàþ ïîäïðîöåññ ïðîñëóøèâàíèÿ...</MSG_LISTENT>
-<MSG_LISTENTR>Ïîäïðîöåññ ïðîñëóøèâàíèÿ ñîçäàí</MSG_LISTENTR>
-<MSG_READY>myServer ãîòîâ ê ñîåäèíåíèþ</MSG_READY>
-<MSG_BREAK>Íàæìèòå Ctrl+C äëÿ ïðåðûâàíèÿ âûïîëíåíèÿ êîìàíäû</MSG_BREAK>
-<MSG_STOPT>Îáðûâ ïîäïðîöåññîâ</MSG_STOPT>
-<MSG_TSTOPPED>Ïîäïðîöåññû îáîðâàíû</MSG_TSTOPPED>
-<MSG_MEMCLEAN>Î÷èñòêà ïàìÿòè</MSG_MEMCLEAN>
-<MSG_SERVICESTOP>Ñåðâèñ îñòàíîâëåí...</MSG_SERVICESTOP>
-<MSG_LOADMSCGI>MSCGI-LIB òèïû áëàãîïîëó÷íî çàãðóæåíû</MSG_LOADMSCGI>
-<ERR_LOADMSCGI>MSCGI-LIB òèïû íå ìîãóò áûòü çàãðóæåíû</ERR_LOADMSCGI>
-
-<!--THESE MEMBERS MAX 32 CHARACTERS-->
-<MSG_SENDING>Ïîñûëàþ</MSG_SENDING>
-<MSG_RUNON>Âûïîëíÿåòñÿ îïåðàöèÿ</MSG_RUNON>
-<MSG_FOLDERCONT>Ñîäåðæàíèå ïàïêè</MSG_FOLDERCONT>
-<MSG_FILE>Ôàéë</MSG_FILE>
-<MSG_LMODIFY>Ïîñëåäíåå èçìåíåíèå:</MSG_LMODIFY>
-<MSG_SIZE>Ðàçìåð</MSG_SIZE>
-<MSG_NEWCONNECTION>Ñîåäèíåíèå îò</MSG_NEWCONNECTION>
-<MSG_ERRORCONNECTION>Îøèáêà ñîåäèíåíèÿ îò</MSG_ERRORCONNECTION>
-<MSG_ATTIME>âðåìÿ:</MSG_ATTIME>
-</MYSERVER_LANGUAGE_FILE>
diff --git a/myserver/binaries/languages/russian_koi8r.xml b/myserver/binaries/languages/russian_koi8r.xml
deleted file mode 100644
index 4986d14..0000000
--- a/myserver/binaries/languages/russian_koi8r.xml
+++ /dev/null
@@ -1,52 +0,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<!--MYSERVER SUPPORT FOR RUSSIAN LANGUAGE-->
-<!--COPYRIGHT 2002 Rocky_10_Balboa-->
-<MYSERVER_LANGUAGE_FILE>
-<MSG_LANGUAGE>éÓÐÏÌØÚÕÅÔÓÑ ÒÕÓÓËÉÊ ÑÚÙË</MSG_LANGUAGE>
-<MSG_SERVER_CONF>ëÏÎÆÉÇÕÒÁÃÉÑ ÓÅÒ×ÅÒÁ ÐÒÅÒ×ÁÎÁ</MSG_SERVER_CONF>
-<AL_NO_SECURITY>îÅ ÉÓÐÏÌØÚÕÅÔÓÑ ÄÏÓÔÕÐ Ó ÚÁÝÉÔÏÊ, ÓÏÄÅÒÖÁÎÉÅ web ÐÁÐËÉ ÄÏÓÔÕÐÎÏ ×ÓÅÍ</AL_NO_SECURITY>
-<MSG_ISOCK>éÎÉÃÉÁÌÉÚÁÃÉÑ ÂÉÂÌÉÏÔÅËÉ ÓÏËÅÔÁ...</MSG_ISOCK>
-<ERR_ISOCK>ïÛÉÂËÁ ÉÎÉÃÉÁÌÉÚÁÃÉÉ ÂÉÂÌÉÏÔÅËÉ ÓÏËÅÔÁ</ERR_ISOCK>
-<MSG_SOCKSTART>âÉÂÌÉÏÔÅËÁ ÓÏËÅÔÁ ÎÅ ÉÎÉÃÉÁÌÉÚÉÒÏ×ÁÎÁ</MSG_SOCKSTART>
-<MSG_SSOCKCREATE>óÏÚÄÁÎÉÅ ÓÏËÅÔÁ ÓÅÒ×ÅÒÁ</MSG_SSOCKCREATE>
-<MSG_SSOCKRUN>óÏËÅÔ ÓÅÒ×ÅÒÁ ÓÏÚÄÁÎ</MSG_SSOCKRUN>
-<ERR_OPENP>ïÛÉÂËÁ ÏÔËÒÙÔÉÑ ÐÏÒÔÁ, ×ÏÚÍÏÖÎÏ, ÐÏÒÔ ÉÓÐÏÌØÚÕÅÔÓÑ ÄÒÕÇÉÍ ÐÒÉÌÏÖÅÎÉÅÍ</ERR_OPENP>
-<MSG_BIND_PORT>ðÏÐÙÔËÁ Ó×ÑÚÉ Ó ÐÏÒÔÏÍ</MSG_BIND_PORT>
-<ERR_BIND>ïÛÉÂËÁ ÐÒÉ ÐÏÐÙÔËÅ Ó×ÑÚÉ Ó ÐÏÒÔÏÍ, ×ÏÚÍÏÖÎÏ, ÐÏÒÔ ÉÓÐÏÌØÚÕÅÔÓÑ ÄÒÕÇÉÍ ÐÒÉÌÏÖÅÎÉÅÍ</ERR_BIND>
-<MSG_PORT_BOUND>ó×ÑÚØ Ó ÐÏÒÔÏÍ ÕÓÔÁÎÏ×ÌÅÎÁ</MSG_PORT_BOUND>
-<MSG_SLISTEN>ðÏÐÙÔËÁ ÐÒÏÓÌÕÛÉ×ÁÎÉÑ ÐÏÒÔÁ...</MSG_SLISTEN>
-<ERR_LISTEN>ïÛÉÂËÁ ÐÒÏÓÌÕÛÉ×ÁÎÉÑ</ERR_LISTEN>
-<MSG_LISTEN>ðÒÏÓÌÕÛÉ×ÁÎÉÅ ÐÏÒÔÁ</MSG_LISTEN>
-<MSG_LOADMIME>úÁÇÒÕÚËÁ MIME ÔÉÐÏ×</MSG_LOADMIME>
-<MSG_GETNAME>éÍÑ ËÏÍÐØÀÔÅÒÁ: </MSG_GETNAME>
-<MSG_LOADED>úÁÇÒÕÖÅÎÏ</MSG_LOADED>
-<ERR_LOADED>ïÛÉÂËÁ ÚÁÇÒÕÚËÉ</ERR_LOADED>
-<MSG_MIMERUN>MIME ÔÉÐÙ ÂÌÁÇÏÐÏÌÕÞÎÏ ÚÁÇÒÕÖÅÎÙ</MSG_MIMERUN>
-<MSG_ADDRESS>IP ÁÄÒÅÓ</MSG_ADDRESS>
-<ERR_LOADMIME>MIME ÔÉÐÙ ÎÅ ÍÏÇÕÔ ÂÙÔØ ÚÁÇÒÕÖÅÎÙ</ERR_LOADMIME>
-<ERR_ERROR>ïÛÉÂËÁ</ERR_ERROR>
-<MSG_NUM_CPU>þÉÓÌÏ ÐÒÏÃÅÓÓÏÒÏ×: </MSG_NUM_CPU>
-<MSG_CREATET>óÏÚÄÁÎÉÅ ÐÏÄÐÒÏÃÅÓÓÁ</MSG_CREATET>
-<MSG_THREADR>ðÏÄÐÒÏÃÅÓÓ ÓÏÚÄÁÎ</MSG_THREADR>
-<MSG_LISTENT>óÏÚÄÁÀ ÐÏÄÐÒÏÃÅÓÓ ÐÒÏÓÌÕÛÉ×ÁÎÉÑ...</MSG_LISTENT>
-<MSG_LISTENTR>ðÏÄÐÒÏÃÅÓÓ ÐÒÏÓÌÕÛÉ×ÁÎÉÑ ÓÏÚÄÁÎ</MSG_LISTENTR>
-<MSG_READY>myServer ÇÏÔÏ× Ë ÓÏÅÄÉÎÅÎÉÀ</MSG_READY>
-<MSG_BREAK>îÁÖÍÉÔÅ Ctrl+C ÄÌÑ ÐÒÅÒÙ×ÁÎÉÑ ×ÙÐÏÌÎÅÎÉÑ ËÏÍÁÎÄÙ</MSG_BREAK>
-<MSG_STOPT>ïÂÒÙ× ÐÏÄÐÒÏÃÅÓÓÏ×</MSG_STOPT>
-<MSG_TSTOPPED>ðÏÄÐÒÏÃÅÓÓÙ ÏÂÏÒ×ÁÎÙ</MSG_TSTOPPED>
-<MSG_MEMCLEAN>ïÞÉÓÔËÁ ÐÁÍÑÔÉ</MSG_MEMCLEAN>
-<MSG_SERVICESTOP>óÅÒ×ÉÓ ÏÓÔÁÎÏ×ÌÅÎ...</MSG_SERVICESTOP>
-<MSG_LOADMSCGI>MSCGI-LIB ÔÉÐÙ ÂÌÁÇÏÐÏÌÕÞÎÏ ÚÁÇÒÕÖÅÎÙ</MSG_LOADMSCGI>
-<ERR_LOADMSCGI>MSCGI-LIB ÔÉÐÙ ÎÅ ÍÏÇÕÔ ÂÙÔØ ÚÁÇÒÕÖÅÎÙ</ERR_LOADMSCGI>
-
-<!--THESE MEMBERS MAX 32 CHARACTERS-->
-<MSG_SENDING>ðÏÓÙÌÁÀ</MSG_SENDING>
-<MSG_RUNON>÷ÙÐÏÌÎÑÅÔÓÑ ÏÐÅÒÁÃÉÑ</MSG_RUNON>
-<MSG_FOLDERCONT>óÏÄÅÒÖÁÎÉÅ ÐÁÐËÉ</MSG_FOLDERCONT>
-<MSG_FILE>æÁÊÌ</MSG_FILE>
-<MSG_LMODIFY>ðÏÓÌÅÄÎÅÅ ÉÚÍÅÎÅÎÉÅ:</MSG_LMODIFY>
-<MSG_SIZE>òÁÚÍÅÒ</MSG_SIZE>
-<MSG_NEWCONNECTION>óÏÅÄÉÎÅÎÉÅ ÏÔ</MSG_NEWCONNECTION>
-<MSG_ERRORCONNECTION>ïÛÉÂËÁ ÓÏÅÄÉÎÅÎÉÑ ÏÔ</MSG_ERRORCONNECTION>
-<MSG_ATTIME>×ÒÅÍÑ:</MSG_ATTIME>
-</MYSERVER_LANGUAGE_FILE>
diff --git a/myserver/binaries/languages/spanish.xml b/myserver/binaries/languages/spanish.xml
deleted file mode 100644
index 21619e8..0000000
--- a/myserver/binaries/languages/spanish.xml
+++ /dev/null
@@ -1,46 +0,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<!--SOPORTE DE MYSERVER PARA LENGUAJE ESPAÑOL-->
-<!--COPYRIGHT 2002 MyServer Team-->
-<!--TRADUCIDO POR MANUEL A. RUBIO "BOMBADIL"-->
-<MYSERVER_LANGUAGE_FILE>
-<MSG_LANGUAGE>Lenguaje Español en uso</MSG_LANGUAGE>
-<MSG_SERVER_CONF>Configuración del servidor terminada</MSG_SERVER_CONF>
-<AL_NO_SECURITY>Acceso de seguridad no usado, los contenidos de la 
-carpeta web no son accesibles a nadie</AL_NO_SECURITY>
-<MSG_ISOCK>Inicializando librería de conexión...</MSG_ISOCK>
-<ERR_ISOCK>Error inicializando librería de conexión</ERR_ISOCK>
-<MSG_SOCKSTART>Librería de conexión fué inicializada</MSG_SOCKSTART>
-<MSG_SSOCKCREATE>Creando conexión de servidor...</MSG_SSOCKCREATE>
-<MSG_SSOCKRUN>Conexión de servidor creada</MSG_SSOCKRUN>
-<ERR_OPENP>Error abriendo puerto, puede que el puerto esté siendo usado 
-por otra aplicación</ERR_OPENP>
-<MSG_BIND_PORT>Intentando fijar puerto...</MSG_BIND_PORT>
-<ERR_BIND>Error fijando puerto, puede que el puerto esté siendo usado 
-por otra aplicación</ERR_BIND>
-<MSG_PORT_BOUND>El puerto está fijado</MSG_PORT_BOUND>
-<MSG_SLISTEN>Intentando escuchar en puerto...</MSG_SLISTEN>
-<ERR_LISTEN>Error al escuchar</ERR_LISTEN>
-<MSG_LISTEN>Escuchando en puerto</MSG_LISTEN>
-<MSG_LOADMIME>Cargando tipos MIME...</MSG_LOADMIME>
-<MSG_GETNAME>El nombre del ordenador es</MSG_GETNAME>
-<MSG_LOADED>Cargado</MSG_LOADED>
-<ERR_LOADED>Error Cargando</ERR_LOADED>
-<MSG_MIMERUN>Tipos MIME cargados correctamente</MSG_MIMERUN>
-<MSG_ADDRESS>Dirección IP</MSG_ADDRESS>
-<ERR_LOADMIME>Tipos MIME no se pudieron cargar</ERR_LOADMIME>
-<ERR_ERROR>Error genérico</ERR_ERROR>
-<MSG_NUM_CPU>Número de procesadores:</MSG_NUM_CPU>
-<MSG_CREATET>Creando hilo</MSG_CREATET>
-<MSG_THREADR>Hilo creado</MSG_THREADR>
-<MSG_LISTENT>Creando hilo para escuchar...</MSG_LISTENT>
-<MSG_LISTENTR>Hilo para escuchar creado</MSG_LISTENTR>
-<MSG_READY>MyServer preparado para aceptar conexiones</MSG_READY>
-<MSG_BREAK>Presione Ctrl+C para interrumpir ejecución</MSG_BREAK>
-<MSG_STOPT>Terminando hilos...</MSG_STOPT>
-<MSG_TSTOPPED>Hilos terminados</MSG_TSTOPPED>
-<MSG_MEMCLEAN>Limpiando memoria...</MSG_MEMCLEAN>
-<MSG_SERVICESTOP>Deteniendo servicio...</MSG_SERVICESTOP>
-<MSG_LOADMSCGI>Tipos MSCGI-LIB cargados correctamente</MSG_LOADMSCGI>
-<ERR_LOADMSCGI>Tipos MSCGI-LIB no se pudieron cargar</ERR_LOADMSCGI>
-
-</MYSERVER_LANGUAGE_FILE>
\ No newline at end of file
diff --git a/myserver/configure.in b/myserver/configure.in
index 5d33249..5102d2a 100644
--- a/myserver/configure.in
+++ b/myserver/configure.in
@@ -48,6 +48,8 @@ AM_PROG_LEX
 AC_PROG_YACC
 AC_C_BIGENDIAN
 
+AM_GNU_GETTEXT([external])
+
 AC_CHECK_PROG(make_info, makeinfo, yes, no)
 if test x$make_info = xno ; then
    AC_MSG_WARN([ Cannot find makeinfo: info file will not be created])
@@ -323,7 +325,7 @@ AC_SUBST(BUILD_DOC)
 AC_SUBST(BUILD_MSCGI)
 
 dnl AC_CONFIG_SUBDIRS()
-AC_CONFIG_FILES([
+AC_CONFIG_FILES([ po/Makefile.in
     Makefile
     binaries/Makefile
     binaries/certificates/Makefile
diff --git a/myserver/documentation/basic_configuration.texi b/myserver/documentation/basic_configuration.texi
index 80a9ac0..0b5a879 100644
--- a/myserver/documentation/basic_configuration.texi
+++ b/myserver/documentation/basic_configuration.texi
@@ -24,12 +24,6 @@ following order:
 @item Global scope inside /etc/myserver.
 @end enumerate
 
-@section Message localization
-It is possible to change the localization for some MyServer messages
-changing the @code{server.language} value in the @file{myserver.xml} file.
-By default the english language is used, the value specified here must
-refer to a xml file contained in the @file{languages/} directory.
-
 @section Server administrator
 CGI scripts can get the server administrator e-mail and show them to
 the user (through the SERVER_ADMIN environment variable). 
diff --git a/myserver/include/connections_scheduler/listen_threads.h b/myserver/include/connections_scheduler/listen_threads.h
index d24a65c..dd07fd1 100644
--- a/myserver/include/connections_scheduler/listen_threads.h
+++ b/myserver/include/connections_scheduler/listen_threads.h
@@ -1,7 +1,7 @@
 /* -*- mode: c++ -*- */
 /*
 MyServer
-Copyright (C) 2007 Free Software Foundation, Inc.
+Copyright (C) 2007, 2009 Free Software Foundation, Inc.
 This program 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 3 of the License, or
@@ -27,17 +27,17 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 class ListenThreads
 {
 public:
-	void addListeningThread(u_short port);
-	int initialize(XmlParser* parser);
-	int terminate();
+	void addListeningThread (u_short port);
+	int initialize ();
+	int terminate ();
 	/*! Initialize the shutdown phase.  */
-	void shutdown(){shutdownStatus = true;}
+	void shutdown (){shutdownStatus = true;}
 	/*! Is it shutdown phase?  */
-	bool isShutdown(){return shutdownStatus;}
-	void commitFastReboot();
-	void beginFastReboot();
-	void rollbackFastReboot();
-	ListenThreads(ConnectionsScheduler*, Server*);
+	bool isShutdown (){return shutdownStatus;}
+	void commitFastReboot ();
+	void beginFastReboot ();
+	void rollbackFastReboot ();
+	ListenThreads (ConnectionsScheduler*, Server*);
 
 private:
 	struct SocketInformation
@@ -56,12 +56,11 @@ private:
 
 	bool shutdownStatus;
 	HashMap<u_short, SocketInformation*> usedPorts;
-	XmlParser *languageParser;
-	int createServerAndListener(u_short port);
-	void registerListener(SocketInformation*);
-  
-  Server* server;
-  ConnectionsScheduler* scheduler;
+	int createServerAndListener (u_short port);
+	void registerListener (SocketInformation*);
+
+  Server *server;
+  ConnectionsScheduler *scheduler;
 };
 
 #endif
diff --git a/myserver/include/plugin/plugin.h b/myserver/include/plugin/plugin.h
index 04b00a4..9bdfe0a 100755
--- a/myserver/include/plugin/plugin.h
+++ b/myserver/include/plugin/plugin.h
@@ -1,7 +1,7 @@
 /* -*- mode: c++ -*- */
 /*
 MyServer
-Copyright (C) 2007, 2008 Free Software Foundation, Inc.
+Copyright (C) 2007, 2008, 2009 Free Software Foundation, Inc.
 This program 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 3 of the License, or
@@ -32,17 +32,16 @@ class XmlParser;
 class Plugin
 {
 public:
-	Plugin();
-	virtual ~Plugin();
-	virtual int load(Server* server, XmlParser* languageFile);
-	virtual int preLoad(string& file, bool global);
-	virtual int postLoad(Server* server, XmlParser* languageFile);
-	virtual int unLoad();
-	virtual const char* getName(char* buffer, u_long len);
-	virtual void* getDirectMethod(char* name);
+	Plugin ();
+	virtual ~Plugin ();
+	virtual int load (Server* server);
+	virtual int preLoad (string& file, bool global);
+	virtual int postLoad (Server* server);
+	virtual int unLoad ();
+	virtual const char* getName (char* buffer, u_long len);
+	virtual void* getDirectMethod (char* name);
 protected:
 	DynamicLibrary hinstLib;
-
 };
 
 #endif
diff --git a/myserver/include/plugin/plugins_manager.h b/myserver/include/plugin/plugins_manager.h
index b1ceffe..10769c5 100755
--- a/myserver/include/plugin/plugins_manager.h
+++ b/myserver/include/plugin/plugins_manager.h
@@ -1,7 +1,7 @@
 /* -*- mode: c++ -*- */
 /*
 MyServer
-Copyright (C) 2007 Free Software Foundation, Inc.
+Copyright (C) 2007, 2009 Free Software Foundation, Inc.
 This program 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 3 of the License, or
@@ -50,7 +50,7 @@ public:
 
   int preLoad (Server *server, string& resource);
   int load (Server *server);
-  int postLoad (Server *server, XmlParser* languageFile);
+  int postLoad (Server *server);
   int unLoad ();
 
   virtual void removePlugin (string& name);
diff --git a/myserver/include/protocol/control/control_protocol.h b/myserver/include/protocol/control/control_protocol.h
index feefa39..2d3464d 100755
--- a/myserver/include/protocol/control/control_protocol.h
+++ b/myserver/include/protocol/control/control_protocol.h
@@ -30,32 +30,31 @@ using namespace std;
 class ControlProtocol : public Protocol, public ConnectionsSchedulerVisitor
 {
 public:
-  virtual int visitConnection(ConnectionPtr, void*);
+  virtual int visitConnection (ConnectionPtr, void*);
 
-  int sendResponse(char*, int, ConnectionPtr, int, ControlHeader& header, File* = 0);
-  virtual int loadProtocol(XmlParser* languageParser);
-	int controlConnection(ConnectionPtr a, char *b1, char *b2, int bs1, 
+  int sendResponse (char*, int, ConnectionPtr, int, ControlHeader& header, File* = 0);
+  virtual int loadProtocol ();
+	int controlConnection (ConnectionPtr a, char *b1, char *b2, int bs1,
                         int bs2, u_long nbtr, u_long id);
-	virtual char* registerName(char*,int len);
-	ControlProtocol();
-	virtual ~ControlProtocol();
+	virtual char* registerName (char*,int len);
+	ControlProtocol ();
+	virtual ~ControlProtocol ();
 
 protected:
   static char adminLogin[64];
   static char adminPassword[64];
   static int controlEnabled;
 
-  int checkAuth(ControlHeader&);
-  int showConnections(ConnectionPtr,File* out, char *b1,int bs1, ControlHeader&);
-  int showDynamicProtocols(ConnectionPtr,File* out, char *b1,int bs1, ControlHeader&);
-  int showLanguageFiles(ConnectionPtr, File* out, char *b1,int bs1, ControlHeader&);
-  int killConnection(ConnectionPtr,u_long ID, File* out, char *b1,int bs1, ControlHeader&);
-  int getFile(ConnectionPtr, char*, File* in, File* out, 
+  int checkAuth (ControlHeader&);
+  int showConnections (ConnectionPtr,File* out, char *b1,int bs1, ControlHeader&);
+  int showDynamicProtocols (ConnectionPtr,File* out, char *b1,int bs1, ControlHeader&);
+  int killConnection (ConnectionPtr,u_long ID, File* out, char *b1,int bs1, ControlHeader&);
+  int getFile (ConnectionPtr, char*, File* in, File* out,
               char *b1,int bs1, ControlHeader&);
-  int putFile(ConnectionPtr,char*, File* in, File* out, 
+  int putFile (ConnectionPtr,char*, File* in, File* out,
               char *b1,int bs1, ControlHeader&);
-  int getVersion(ConnectionPtr,File* out, char *b1,int bs1, ControlHeader&);
-  int addToLog(int retCode, ConnectionPtr con, char *b1, int bs1, ControlHeader&);
+  int getVersion (ConnectionPtr,File* out, char *b1,int bs1, ControlHeader&);
+  int addToLog (int retCode, ConnectionPtr con, char *b1, int bs1, ControlHeader&);
 };
 
 #endif
diff --git a/myserver/include/protocol/ftp/ftp.h b/myserver/include/protocol/ftp/ftp.h
index 88b21aa..61dcc1c 100755
--- a/myserver/include/protocol/ftp/ftp.h
+++ b/myserver/include/protocol/ftp/ftp.h
@@ -107,8 +107,8 @@ public:
   virtual int controlConnection (ConnectionPtr pConnection, char *b1,
 				 char *b2, int bs1, int bs2, u_long nbtr,
 				 u_long id);
-  static int loadProtocolstatic (XmlParser *);
-  static int unLoadProtocolstatic (XmlParser *);
+  static int loadProtocolstatic ();
+  static int unLoadProtocolstatic ();
 
   int parseControlConnection ();
   yyscan_t getScanner ()
@@ -234,14 +234,14 @@ public:
     return ftp.controlConnection (a, b1, b2, bs1, bs2, nbtr, id);
   }
 
-  virtual int loadProtocol (XmlParser * parser)
+  virtual int loadProtocol ()
   {
-    return Ftp::loadProtocolstatic (parser);
+    return Ftp::loadProtocolstatic ();
   }
 
-  virtual int unLoadProtocol (XmlParser * parser)
+  virtual int unLoadProtocol ()
   {
-    return Ftp::unLoadProtocolstatic (parser);
+    return Ftp::unLoadProtocolstatic ();
 
   }
 
diff --git a/myserver/include/protocol/http/http.h b/myserver/include/protocol/http/http.h
index 4a1369b..f6f5c03 100644
--- a/myserver/include/protocol/http/http.h
+++ b/myserver/include/protocol/http/http.h
@@ -173,9 +173,8 @@ public:
                         u_long nbtr, 
                         u_long id);
 
-  static int loadProtocolStatic(XmlParser*);
-
-  static int unLoadProtocolStatic(XmlParser*);
+  static int loadProtocolStatic();
+  static int unLoadProtocolStatic();
 
   u_long getTimeout ();
   int preprocessHttpRequest(string& filename, int yetmapped, 
@@ -232,14 +231,14 @@ public:
     return ret;
   }
 
-	virtual int loadProtocol(XmlParser* parser)
+	virtual int loadProtocol()
   {
-    return Http::loadProtocolStatic(parser);
+    return Http::loadProtocolStatic ();
   }
   
-  virtual int unLoadProtocol(XmlParser* parser)
+  virtual int unLoadProtocol ()
   {
-    return Http::unLoadProtocolStatic(parser);
+    return Http::unLoadProtocolStatic ();
 
   }
 
diff --git a/myserver/include/protocol/protocol.h b/myserver/include/protocol/protocol.h
index 404e7e1..d89da41 100755
--- a/myserver/include/protocol/protocol.h
+++ b/myserver/include/protocol/protocol.h
@@ -37,8 +37,8 @@ public:
 	virtual char* registerName (char*,int len);
 	virtual int controlConnection (ConnectionPtr a, char *b1, char *b2,
                                  int bs1, int bs2, u_long nbtr, u_long id);
-	virtual int loadProtocol (XmlParser*);
-	virtual int unLoadProtocol (XmlParser*);
+	virtual int loadProtocol ();
+	virtual int unLoadProtocol ();
 
   virtual int getProtocolOptions (){return protocolOptions;}
 
diff --git a/myserver/include/server/server.h b/myserver/include/server/server.h
index 320bdc3..667cf13 100644
--- a/myserver/include/server/server.h
+++ b/myserver/include/server/server.h
@@ -105,10 +105,7 @@ public:
   const char* getMainConfFile();
   const char* getVhostConfFile();
   const char* getMIMEConfFile();
-  const char* getLanguagesPath();
-  const char* getLanguageFile();
   const char* getExternalPath();
-  XmlParser* getLanguageParser();
   ~Server();
   Protocol* getProtocol(const char *protocolName);
   int addConnection(Socket,MYSERVER_SOCKADDRIN*);
@@ -131,7 +128,7 @@ public:
   int getMaxLogFileSize();
   int mustUseLogonOption();
   void setVerbosity(u_long);
-  void start(string &, string &, string &, string &, string &);
+  void start(string &, string &, string &, string &);
   void stop();
   void finalCleanup();
   int terminate();
@@ -217,7 +214,6 @@ private:
   string gid;
   int currentThreadID;
   ProtocolsManager protocols;
-  XmlParser languageParser;
 
   bool autoRebootEnabled;
   bool toReboot;
@@ -249,7 +245,7 @@ private:
   int copyConfigurationFromDefault(const char *);
   void logWriteNTimes(string, unsigned);
   int checkConfigurationPaths();
-  bool resetConfigurationPaths(string &, string &, string &, string &, string &);
+  bool resetConfigurationPaths(string &, string &, string &, string &);
   Mutex* connectionsMutex;
   u_long nStaticThreads;
   u_long nMaxThreads;
@@ -262,8 +258,6 @@ private:
 
   int purgeThreads();
   int reboot();
-  string* languageFile;
-  string* languagesPath;
   string* mainConfigurationFile;
   string* vhostConfigurationFile;
   string* mimeConfigurationFile;
diff --git a/myserver/m4/gettext.m4 b/myserver/m4/gettext.m4
new file mode 100644
index 0000000..c9ae1f7
--- /dev/null
+++ b/myserver/m4/gettext.m4
@@ -0,0 +1,381 @@
+# gettext.m4 serial 60 (gettext-0.17)
+dnl Copyright (C) 1995-2007 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+dnl
+dnl This file can can be used in projects which are not available under
+dnl the GNU General Public License or the GNU Library General Public
+dnl License but which still want to provide support for the GNU gettext
+dnl functionality.
+dnl Please note that the actual code of the GNU gettext library is covered
+dnl by the GNU Library General Public License, and the rest of the GNU
+dnl gettext package package is covered by the GNU General Public License.
+dnl They are *not* in the public domain.
+
+dnl Authors:
+dnl   Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
+dnl   Bruno Haible <haible@clisp.cons.org>, 2000-2006.
+
+dnl Macro to add for using GNU gettext.
+
+dnl Usage: AM_GNU_GETTEXT([INTLSYMBOL], [NEEDSYMBOL], [INTLDIR]).
+dnl INTLSYMBOL can be one of 'external', 'no-libtool', 'use-libtool'. The
+dnl    default (if it is not specified or empty) is 'no-libtool'.
+dnl    INTLSYMBOL should be 'external' for packages with no intl directory,
+dnl    and 'no-libtool' or 'use-libtool' for packages with an intl directory.
+dnl    If INTLSYMBOL is 'use-libtool', then a libtool library
+dnl    $(top_builddir)/intl/libintl.la will be created (shared and/or static,
+dnl    depending on --{enable,disable}-{shared,static} and on the presence of
+dnl    AM-DISABLE-SHARED). If INTLSYMBOL is 'no-libtool', a static library
+dnl    $(top_builddir)/intl/libintl.a will be created.
+dnl If NEEDSYMBOL is specified and is 'need-ngettext', then GNU gettext
+dnl    implementations (in libc or libintl) without the ngettext() function
+dnl    will be ignored.  If NEEDSYMBOL is specified and is
+dnl    'need-formatstring-macros', then GNU gettext implementations that don't
+dnl    support the ISO C 99 <inttypes.h> formatstring macros will be ignored.
+dnl INTLDIR is used to find the intl libraries.  If empty,
+dnl    the value `$(top_builddir)/intl/' is used.
+dnl
+dnl The result of the configuration is one of three cases:
+dnl 1) GNU gettext, as included in the intl subdirectory, will be compiled
+dnl    and used.
+dnl    Catalog format: GNU --> install in $(datadir)
+dnl    Catalog extension: .mo after installation, .gmo in source tree
+dnl 2) GNU gettext has been found in the system's C library.
+dnl    Catalog format: GNU --> install in $(datadir)
+dnl    Catalog extension: .mo after installation, .gmo in source tree
+dnl 3) No internationalization, always use English msgid.
+dnl    Catalog format: none
+dnl    Catalog extension: none
+dnl If INTLSYMBOL is 'external', only cases 2 and 3 can occur.
+dnl The use of .gmo is historical (it was needed to avoid overwriting the
+dnl GNU format catalogs when building on a platform with an X/Open gettext),
+dnl but we keep it in order not to force irrelevant filename changes on the
+dnl maintainers.
+dnl
+AC_DEFUN([AM_GNU_GETTEXT],
+[
+  dnl Argument checking.
+  ifelse([$1], [], , [ifelse([$1], [external], , [ifelse([$1], [no-libtool], , [ifelse([$1], [use-libtool], ,
+    [errprint([ERROR: invalid first argument to AM_GNU_GETTEXT
+])])])])])
+  ifelse([$2], [], , [ifelse([$2], [need-ngettext], , [ifelse([$2], [need-formatstring-macros], ,
+    [errprint([ERROR: invalid second argument to AM_GNU_GETTEXT
+])])])])
+  define([gt_included_intl],
+    ifelse([$1], [external],
+      ifdef([AM_GNU_GETTEXT_][INTL_SUBDIR], [yes], [no]),
+      [yes]))
+  define([gt_libtool_suffix_prefix], ifelse([$1], [use-libtool], [l], []))
+  gt_NEEDS_INIT
+  AM_GNU_GETTEXT_NEED([$2])
+
+  AC_REQUIRE([AM_PO_SUBDIRS])dnl
+  ifelse(gt_included_intl, yes, [
+    AC_REQUIRE([AM_INTL_SUBDIR])dnl
+  ])
+
+  dnl Prerequisites of AC_LIB_LINKFLAGS_BODY.
+  AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
+  AC_REQUIRE([AC_LIB_RPATH])
+
+  dnl Sometimes libintl requires libiconv, so first search for libiconv.
+  dnl Ideally we would do this search only after the
+  dnl      if test "$USE_NLS" = "yes"; then
+  dnl        if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" != "yes"; }; then
+  dnl tests. But if configure.in invokes AM_ICONV after AM_GNU_GETTEXT
+  dnl the configure script would need to contain the same shell code
+  dnl again, outside any 'if'. There are two solutions:
+  dnl - Invoke AM_ICONV_LINKFLAGS_BODY here, outside any 'if'.
+  dnl - Control the expansions in more detail using AC_PROVIDE_IFELSE.
+  dnl Since AC_PROVIDE_IFELSE is only in autoconf >= 2.52 and not
+  dnl documented, we avoid it.
+  ifelse(gt_included_intl, yes, , [
+    AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY])
+  ])
+
+  dnl Sometimes, on MacOS X, libintl requires linking with CoreFoundation.
+  gt_INTL_MACOSX
+
+  dnl Set USE_NLS.
+  AC_REQUIRE([AM_NLS])
+
+  ifelse(gt_included_intl, yes, [
+    BUILD_INCLUDED_LIBINTL=no
+    USE_INCLUDED_LIBINTL=no
+  ])
+  LIBINTL=
+  LTLIBINTL=
+  POSUB=
+
+  dnl Add a version number to the cache macros.
+  case " $gt_needs " in
+    *" need-formatstring-macros "*) gt_api_version=3 ;;
+    *" need-ngettext "*) gt_api_version=2 ;;
+    *) gt_api_version=1 ;;
+  esac
+  gt_func_gnugettext_libc="gt_cv_func_gnugettext${gt_api_version}_libc"
+  gt_func_gnugettext_libintl="gt_cv_func_gnugettext${gt_api_version}_libintl"
+
+  dnl If we use NLS figure out what method
+  if test "$USE_NLS" = "yes"; then
+    gt_use_preinstalled_gnugettext=no
+    ifelse(gt_included_intl, yes, [
+      AC_MSG_CHECKING([whether included gettext is requested])
+      AC_ARG_WITH(included-gettext,
+        [  --with-included-gettext use the GNU gettext library included here],
+        nls_cv_force_use_gnu_gettext=$withval,
+        nls_cv_force_use_gnu_gettext=no)
+      AC_MSG_RESULT($nls_cv_force_use_gnu_gettext)
+
+      nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
+      if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
+    ])
+        dnl User does not insist on using GNU NLS library.  Figure out what
+        dnl to use.  If GNU gettext is available we use this.  Else we have
+        dnl to fall back to GNU NLS library.
+
+        if test $gt_api_version -ge 3; then
+          gt_revision_test_code='
+#ifndef __GNU_GETTEXT_SUPPORTED_REVISION
+#define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1)
+#endif
+changequote(,)dnl
+typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1];
+changequote([,])dnl
+'
+        else
+          gt_revision_test_code=
+        fi
+        if test $gt_api_version -ge 2; then
+          gt_expression_test_code=' + * ngettext ("", "", 0)'
+        else
+          gt_expression_test_code=
+        fi
+
+        AC_CACHE_CHECK([for GNU gettext in libc], [$gt_func_gnugettext_libc],
+         [AC_TRY_LINK([#include <libintl.h>
+$gt_revision_test_code
+extern int _nl_msg_cat_cntr;
+extern int *_nl_domain_bindings;],
+            [bindtextdomain ("", "");
+return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_domain_bindings],
+            [eval "$gt_func_gnugettext_libc=yes"],
+            [eval "$gt_func_gnugettext_libc=no"])])
+
+        if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" != "yes"; }; then
+          dnl Sometimes libintl requires libiconv, so first search for libiconv.
+          ifelse(gt_included_intl, yes, , [
+            AM_ICONV_LINK
+          ])
+          dnl Search for libintl and define LIBINTL, LTLIBINTL and INCINTL
+          dnl accordingly. Don't use AC_LIB_LINKFLAGS_BODY([intl],[iconv])
+          dnl because that would add "-liconv" to LIBINTL and LTLIBINTL
+          dnl even if libiconv doesn't exist.
+          AC_LIB_LINKFLAGS_BODY([intl])
+          AC_CACHE_CHECK([for GNU gettext in libintl],
+            [$gt_func_gnugettext_libintl],
+           [gt_save_CPPFLAGS="$CPPFLAGS"
+            CPPFLAGS="$CPPFLAGS $INCINTL"
+            gt_save_LIBS="$LIBS"
+            LIBS="$LIBS $LIBINTL"
+            dnl Now see whether libintl exists and does not depend on libiconv.
+            AC_TRY_LINK([#include <libintl.h>
+$gt_revision_test_code
+extern int _nl_msg_cat_cntr;
+extern
+#ifdef __cplusplus
+"C"
+#endif
+const char *_nl_expand_alias (const char *);],
+              [bindtextdomain ("", "");
+return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_alias ("")],
+              [eval "$gt_func_gnugettext_libintl=yes"],
+              [eval "$gt_func_gnugettext_libintl=no"])
+            dnl Now see whether libintl exists and depends on libiconv.
+            if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" != yes; } && test -n "$LIBICONV"; then
+              LIBS="$LIBS $LIBICONV"
+              AC_TRY_LINK([#include <libintl.h>
+$gt_revision_test_code
+extern int _nl_msg_cat_cntr;
+extern
+#ifdef __cplusplus
+"C"
+#endif
+const char *_nl_expand_alias (const char *);],
+                [bindtextdomain ("", "");
+return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_alias ("")],
+               [LIBINTL="$LIBINTL $LIBICONV"
+                LTLIBINTL="$LTLIBINTL $LTLIBICONV"
+                eval "$gt_func_gnugettext_libintl=yes"
+               ])
+            fi
+            CPPFLAGS="$gt_save_CPPFLAGS"
+            LIBS="$gt_save_LIBS"])
+        fi
+
+        dnl If an already present or preinstalled GNU gettext() is found,
+        dnl use it.  But if this macro is used in GNU gettext, and GNU
+        dnl gettext is already preinstalled in libintl, we update this
+        dnl libintl.  (Cf. the install rule in intl/Makefile.in.)
+        if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" = "yes"; } \
+           || { { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; } \
+                && test "$PACKAGE" != gettext-runtime \
+                && test "$PACKAGE" != gettext-tools; }; then
+          gt_use_preinstalled_gnugettext=yes
+        else
+          dnl Reset the values set by searching for libintl.
+          LIBINTL=
+          LTLIBINTL=
+          INCINTL=
+        fi
+
+    ifelse(gt_included_intl, yes, [
+        if test "$gt_use_preinstalled_gnugettext" != "yes"; then
+          dnl GNU gettext is not found in the C library.
+          dnl Fall back on included GNU gettext library.
+          nls_cv_use_gnu_gettext=yes
+        fi
+      fi
+
+      if test "$nls_cv_use_gnu_gettext" = "yes"; then
+        dnl Mark actions used to generate GNU NLS library.
+        BUILD_INCLUDED_LIBINTL=yes
+        USE_INCLUDED_LIBINTL=yes
+        LIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LIBICONV $LIBTHREAD"
+        LTLIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LTLIBICONV $LTLIBTHREAD"
+        LIBS=`echo " $LIBS " | sed -e 's/ -lintl / /' -e 's/^ //' -e 's/ $//'`
+      fi
+
+      CATOBJEXT=
+      if test "$gt_use_preinstalled_gnugettext" = "yes" \
+         || test "$nls_cv_use_gnu_gettext" = "yes"; then
+        dnl Mark actions to use GNU gettext tools.
+        CATOBJEXT=.gmo
+      fi
+    ])
+
+    if test -n "$INTL_MACOSX_LIBS"; then
+      if test "$gt_use_preinstalled_gnugettext" = "yes" \
+         || test "$nls_cv_use_gnu_gettext" = "yes"; then
+        dnl Some extra flags are needed during linking.
+        LIBINTL="$LIBINTL $INTL_MACOSX_LIBS"
+        LTLIBINTL="$LTLIBINTL $INTL_MACOSX_LIBS"
+      fi
+    fi
+
+    if test "$gt_use_preinstalled_gnugettext" = "yes" \
+       || test "$nls_cv_use_gnu_gettext" = "yes"; then
+      AC_DEFINE(ENABLE_NLS, 1,
+        [Define to 1 if translation of program messages to the user's native language
+   is requested.])
+    else
+      USE_NLS=no
+    fi
+  fi
+
+  AC_MSG_CHECKING([whether to use NLS])
+  AC_MSG_RESULT([$USE_NLS])
+  if test "$USE_NLS" = "yes"; then
+    AC_MSG_CHECKING([where the gettext function comes from])
+    if test "$gt_use_preinstalled_gnugettext" = "yes"; then
+      if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then
+        gt_source="external libintl"
+      else
+        gt_source="libc"
+      fi
+    else
+      gt_source="included intl directory"
+    fi
+    AC_MSG_RESULT([$gt_source])
+  fi
+
+  if test "$USE_NLS" = "yes"; then
+
+    if test "$gt_use_preinstalled_gnugettext" = "yes"; then
+      if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then
+        AC_MSG_CHECKING([how to link with libintl])
+        AC_MSG_RESULT([$LIBINTL])
+        AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCINTL])
+      fi
+
+      dnl For backward compatibility. Some packages may be using this.
+      AC_DEFINE(HAVE_GETTEXT, 1,
+       [Define if the GNU gettext() function is already present or preinstalled.])
+      AC_DEFINE(HAVE_DCGETTEXT, 1,
+       [Define if the GNU dcgettext() function is already present or preinstalled.])
+    fi
+
+    dnl We need to process the po/ directory.
+    POSUB=po
+  fi
+
+  ifelse(gt_included_intl, yes, [
+    dnl If this is used in GNU gettext we have to set BUILD_INCLUDED_LIBINTL
+    dnl to 'yes' because some of the testsuite requires it.
+    if test "$PACKAGE" = gettext-runtime || test "$PACKAGE" = gettext-tools; then
+      BUILD_INCLUDED_LIBINTL=yes
+    fi
+
+    dnl Make all variables we use known to autoconf.
+    AC_SUBST(BUILD_INCLUDED_LIBINTL)
+    AC_SUBST(USE_INCLUDED_LIBINTL)
+    AC_SUBST(CATOBJEXT)
+
+    dnl For backward compatibility. Some configure.ins may be using this.
+    nls_cv_header_intl=
+    nls_cv_header_libgt=
+
+    dnl For backward compatibility. Some Makefiles may be using this.
+    DATADIRNAME=share
+    AC_SUBST(DATADIRNAME)
+
+    dnl For backward compatibility. Some Makefiles may be using this.
+    INSTOBJEXT=.mo
+    AC_SUBST(INSTOBJEXT)
+
+    dnl For backward compatibility. Some Makefiles may be using this.
+    GENCAT=gencat
+    AC_SUBST(GENCAT)
+
+    dnl For backward compatibility. Some Makefiles may be using this.
+    INTLOBJS=
+    if test "$USE_INCLUDED_LIBINTL" = yes; then
+      INTLOBJS="\$(GETTOBJS)"
+    fi
+    AC_SUBST(INTLOBJS)
+
+    dnl Enable libtool support if the surrounding package wishes it.
+    INTL_LIBTOOL_SUFFIX_PREFIX=gt_libtool_suffix_prefix
+    AC_SUBST(INTL_LIBTOOL_SUFFIX_PREFIX)
+  ])
+
+  dnl For backward compatibility. Some Makefiles may be using this.
+  INTLLIBS="$LIBINTL"
+  AC_SUBST(INTLLIBS)
+
+  dnl Make all documented variables known to autoconf.
+  AC_SUBST(LIBINTL)
+  AC_SUBST(LTLIBINTL)
+  AC_SUBST(POSUB)
+])
+
+
+dnl gt_NEEDS_INIT ensures that the gt_needs variable is initialized.
+m4_define([gt_NEEDS_INIT],
+[
+  m4_divert_text([DEFAULTS], [gt_needs=])
+  m4_define([gt_NEEDS_INIT], [])
+])
+
+
+dnl Usage: AM_GNU_GETTEXT_NEED([NEEDSYMBOL])
+AC_DEFUN([AM_GNU_GETTEXT_NEED],
+[
+  m4_divert_text([INIT_PREPARE], [gt_needs="$gt_needs $1"])
+])
+
+
+dnl Usage: AM_GNU_GETTEXT_VERSION([gettext-version])
+AC_DEFUN([AM_GNU_GETTEXT_VERSION], [])
diff --git a/myserver/m4/iconv.m4 b/myserver/m4/iconv.m4
new file mode 100644
index 0000000..66bc76f
--- /dev/null
+++ b/myserver/m4/iconv.m4
@@ -0,0 +1,180 @@
+# iconv.m4 serial AM6 (gettext-0.17)
+dnl Copyright (C) 2000-2002, 2007 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl From Bruno Haible.
+
+AC_DEFUN([AM_ICONV_LINKFLAGS_BODY],
+[
+  dnl Prerequisites of AC_LIB_LINKFLAGS_BODY.
+  AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
+  AC_REQUIRE([AC_LIB_RPATH])
+
+  dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV
+  dnl accordingly.
+  AC_LIB_LINKFLAGS_BODY([iconv])
+])
+
+AC_DEFUN([AM_ICONV_LINK],
+[
+  dnl Some systems have iconv in libc, some have it in libiconv (OSF/1 and
+  dnl those with the standalone portable GNU libiconv installed).
+  AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+
+  dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV
+  dnl accordingly.
+  AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY])
+
+  dnl Add $INCICONV to CPPFLAGS before performing the following checks,
+  dnl because if the user has installed libiconv and not disabled its use
+  dnl via --without-libiconv-prefix, he wants to use it. The first
+  dnl AC_TRY_LINK will then fail, the second AC_TRY_LINK will succeed.
+  am_save_CPPFLAGS="$CPPFLAGS"
+  AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCICONV])
+
+  AC_CACHE_CHECK([for iconv], am_cv_func_iconv, [
+    am_cv_func_iconv="no, consider installing GNU libiconv"
+    am_cv_lib_iconv=no
+    AC_TRY_LINK([#include <stdlib.h>
+#include <iconv.h>],
+      [iconv_t cd = iconv_open("","");
+       iconv(cd,NULL,NULL,NULL,NULL);
+       iconv_close(cd);],
+      am_cv_func_iconv=yes)
+    if test "$am_cv_func_iconv" != yes; then
+      am_save_LIBS="$LIBS"
+      LIBS="$LIBS $LIBICONV"
+      AC_TRY_LINK([#include <stdlib.h>
+#include <iconv.h>],
+        [iconv_t cd = iconv_open("","");
+         iconv(cd,NULL,NULL,NULL,NULL);
+         iconv_close(cd);],
+        am_cv_lib_iconv=yes
+        am_cv_func_iconv=yes)
+      LIBS="$am_save_LIBS"
+    fi
+  ])
+  if test "$am_cv_func_iconv" = yes; then
+    AC_CACHE_CHECK([for working iconv], am_cv_func_iconv_works, [
+      dnl This tests against bugs in AIX 5.1 and HP-UX 11.11.
+      am_save_LIBS="$LIBS"
+      if test $am_cv_lib_iconv = yes; then
+        LIBS="$LIBS $LIBICONV"
+      fi
+      AC_TRY_RUN([
+#include <iconv.h>
+#include <string.h>
+int main ()
+{
+  /* Test against AIX 5.1 bug: Failures are not distinguishable from successful
+     returns.  */
+  {
+    iconv_t cd_utf8_to_88591 = iconv_open ("ISO8859-1", "UTF-8");
+    if (cd_utf8_to_88591 != (iconv_t)(-1))
+      {
+        static const char input[] = "\342\202\254"; /* EURO SIGN */
+        char buf[10];
+        const char *inptr = input;
+        size_t inbytesleft = strlen (input);
+        char *outptr = buf;
+        size_t outbytesleft = sizeof (buf);
+        size_t res = iconv (cd_utf8_to_88591,
+                            (char **) &inptr, &inbytesleft,
+                            &outptr, &outbytesleft);
+        if (res == 0)
+          return 1;
+      }
+  }
+#if 0 /* This bug could be worked around by the caller.  */
+  /* Test against HP-UX 11.11 bug: Positive return value instead of 0.  */
+  {
+    iconv_t cd_88591_to_utf8 = iconv_open ("utf8", "iso88591");
+    if (cd_88591_to_utf8 != (iconv_t)(-1))
+      {
+        static const char input[] = "\304rger mit b\366sen B\374bchen ohne Augenma\337";
+        char buf[50];
+        const char *inptr = input;
+        size_t inbytesleft = strlen (input);
+        char *outptr = buf;
+        size_t outbytesleft = sizeof (buf);
+        size_t res = iconv (cd_88591_to_utf8,
+                            (char **) &inptr, &inbytesleft,
+                            &outptr, &outbytesleft);
+        if ((int)res > 0)
+          return 1;
+      }
+  }
+#endif
+  /* Test against HP-UX 11.11 bug: No converter from EUC-JP to UTF-8 is
+     provided.  */
+  if (/* Try standardized names.  */
+      iconv_open ("UTF-8", "EUC-JP") == (iconv_t)(-1)
+      /* Try IRIX, OSF/1 names.  */
+      && iconv_open ("UTF-8", "eucJP") == (iconv_t)(-1)
+      /* Try AIX names.  */
+      && iconv_open ("UTF-8", "IBM-eucJP") == (iconv_t)(-1)
+      /* Try HP-UX names.  */
+      && iconv_open ("utf8", "eucJP") == (iconv_t)(-1))
+    return 1;
+  return 0;
+}], [am_cv_func_iconv_works=yes], [am_cv_func_iconv_works=no],
+        [case "$host_os" in
+           aix* | hpux*) am_cv_func_iconv_works="guessing no" ;;
+           *)            am_cv_func_iconv_works="guessing yes" ;;
+         esac])
+      LIBS="$am_save_LIBS"
+    ])
+    case "$am_cv_func_iconv_works" in
+      *no) am_func_iconv=no am_cv_lib_iconv=no ;;
+      *)   am_func_iconv=yes ;;
+    esac
+  else
+    am_func_iconv=no am_cv_lib_iconv=no
+  fi
+  if test "$am_func_iconv" = yes; then
+    AC_DEFINE(HAVE_ICONV, 1,
+      [Define if you have the iconv() function and it works.])
+  fi
+  if test "$am_cv_lib_iconv" = yes; then
+    AC_MSG_CHECKING([how to link with libiconv])
+    AC_MSG_RESULT([$LIBICONV])
+  else
+    dnl If $LIBICONV didn't lead to a usable library, we don't need $INCICONV
+    dnl either.
+    CPPFLAGS="$am_save_CPPFLAGS"
+    LIBICONV=
+    LTLIBICONV=
+  fi
+  AC_SUBST(LIBICONV)
+  AC_SUBST(LTLIBICONV)
+])
+
+AC_DEFUN([AM_ICONV],
+[
+  AM_ICONV_LINK
+  if test "$am_cv_func_iconv" = yes; then
+    AC_MSG_CHECKING([for iconv declaration])
+    AC_CACHE_VAL(am_cv_proto_iconv, [
+      AC_TRY_COMPILE([
+#include <stdlib.h>
+#include <iconv.h>
+extern
+#ifdef __cplusplus
+"C"
+#endif
+#if defined(__STDC__) || defined(__cplusplus)
+size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
+#else
+size_t iconv();
+#endif
+], [], am_cv_proto_iconv_arg1="", am_cv_proto_iconv_arg1="const")
+      am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);"])
+    am_cv_proto_iconv=`echo "[$]am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
+    AC_MSG_RESULT([$]{ac_t:-
+         }[$]am_cv_proto_iconv)
+    AC_DEFINE_UNQUOTED(ICONV_CONST, $am_cv_proto_iconv_arg1,
+      [Define as const if the declaration of iconv() needs const.])
+  fi
+])
diff --git a/myserver/m4/lib-ld.m4 b/myserver/m4/lib-ld.m4
new file mode 100644
index 0000000..96c4e2c
--- /dev/null
+++ b/myserver/m4/lib-ld.m4
@@ -0,0 +1,110 @@
+# lib-ld.m4 serial 3 (gettext-0.13)
+dnl Copyright (C) 1996-2003 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl Subroutines of libtool.m4,
+dnl with replacements s/AC_/AC_LIB/ and s/lt_cv/acl_cv/ to avoid collision
+dnl with libtool.m4.
+
+dnl From libtool-1.4. Sets the variable with_gnu_ld to yes or no.
+AC_DEFUN([AC_LIB_PROG_LD_GNU],
+[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], acl_cv_prog_gnu_ld,
+[# I'd rather use --version here, but apparently some GNU ld's only accept -v.
+case `$LD -v 2>&1 </dev/null` in
+*GNU* | *'with BFD'*)
+  acl_cv_prog_gnu_ld=yes ;;
+*)
+  acl_cv_prog_gnu_ld=no ;;
+esac])
+with_gnu_ld=$acl_cv_prog_gnu_ld
+])
+
+dnl From libtool-1.4. Sets the variable LD.
+AC_DEFUN([AC_LIB_PROG_LD],
+[AC_ARG_WITH(gnu-ld,
+[  --with-gnu-ld           assume the C compiler uses GNU ld [default=no]],
+test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
+AC_REQUIRE([AC_PROG_CC])dnl
+AC_REQUIRE([AC_CANONICAL_HOST])dnl
+# Prepare PATH_SEPARATOR.
+# 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
+ac_prog=ld
+if test "$GCC" = yes; then
+  # Check if gcc -print-prog-name=ld gives a path.
+  AC_MSG_CHECKING([for ld used by GCC])
+  case $host in
+  *-*-mingw*)
+    # gcc leaves a trailing carriage return which upsets mingw
+    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
+  *)
+    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
+  esac
+  case $ac_prog in
+    # Accept absolute paths.
+    [[\\/]* | [A-Za-z]:[\\/]*)]
+      [re_direlt='/[^/][^/]*/\.\./']
+      # Canonicalize the path of ld
+      ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
+      while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
+	ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
+      done
+      test -z "$LD" && LD="$ac_prog"
+      ;;
+  "")
+    # If it fails, then pretend we aren't using GCC.
+    ac_prog=ld
+    ;;
+  *)
+    # If it is relative, then search for the first ld in PATH.
+    with_gnu_ld=unknown
+    ;;
+  esac
+elif test "$with_gnu_ld" = yes; then
+  AC_MSG_CHECKING([for GNU ld])
+else
+  AC_MSG_CHECKING([for non-GNU ld])
+fi
+AC_CACHE_VAL(acl_cv_path_LD,
+[if test -z "$LD"; then
+  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
+  for ac_dir in $PATH; do
+    test -z "$ac_dir" && ac_dir=.
+    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
+      acl_cv_path_LD="$ac_dir/$ac_prog"
+      # Check to see if the program is GNU ld.  I'd rather use --version,
+      # but apparently some GNU ld's only accept -v.
+      # Break only if it was the GNU/non-GNU ld that we prefer.
+      case `"$acl_cv_path_LD" -v 2>&1 < /dev/null` in
+      *GNU* | *'with BFD'*)
+	test "$with_gnu_ld" != no && break ;;
+      *)
+	test "$with_gnu_ld" != yes && break ;;
+      esac
+    fi
+  done
+  IFS="$ac_save_ifs"
+else
+  acl_cv_path_LD="$LD" # Let the user override the test with a path.
+fi])
+LD="$acl_cv_path_LD"
+if test -n "$LD"; then
+  AC_MSG_RESULT($LD)
+else
+  AC_MSG_RESULT(no)
+fi
+test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
+AC_LIB_PROG_LD_GNU
+])
diff --git a/myserver/m4/lib-link.m4 b/myserver/m4/lib-link.m4
new file mode 100644
index 0000000..e3d26fc
--- /dev/null
+++ b/myserver/m4/lib-link.m4
@@ -0,0 +1,709 @@
+# lib-link.m4 serial 13 (gettext-0.17)
+dnl Copyright (C) 2001-2007 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl From Bruno Haible.
+
+AC_PREREQ(2.54)
+
+dnl AC_LIB_LINKFLAGS(name [, dependencies]) searches for libname and
+dnl the libraries corresponding to explicit and implicit dependencies.
+dnl Sets and AC_SUBSTs the LIB${NAME} and LTLIB${NAME} variables and
+dnl augments the CPPFLAGS variable.
+dnl Sets and AC_SUBSTs the LIB${NAME}_PREFIX variable to nonempty if libname
+dnl was found in ${LIB${NAME}_PREFIX}/$acl_libdirstem.
+AC_DEFUN([AC_LIB_LINKFLAGS],
+[
+  AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
+  AC_REQUIRE([AC_LIB_RPATH])
+  define([Name],[translit([$1],[./-], [___])])
+  define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
+                               [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
+  AC_CACHE_CHECK([how to link with lib[]$1], [ac_cv_lib[]Name[]_libs], [
+    AC_LIB_LINKFLAGS_BODY([$1], [$2])
+    ac_cv_lib[]Name[]_libs="$LIB[]NAME"
+    ac_cv_lib[]Name[]_ltlibs="$LTLIB[]NAME"
+    ac_cv_lib[]Name[]_cppflags="$INC[]NAME"
+    ac_cv_lib[]Name[]_prefix="$LIB[]NAME[]_PREFIX"
+  ])
+  LIB[]NAME="$ac_cv_lib[]Name[]_libs"
+  LTLIB[]NAME="$ac_cv_lib[]Name[]_ltlibs"
+  INC[]NAME="$ac_cv_lib[]Name[]_cppflags"
+  LIB[]NAME[]_PREFIX="$ac_cv_lib[]Name[]_prefix"
+  AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
+  AC_SUBST([LIB]NAME)
+  AC_SUBST([LTLIB]NAME)
+  AC_SUBST([LIB]NAME[_PREFIX])
+  dnl Also set HAVE_LIB[]NAME so that AC_LIB_HAVE_LINKFLAGS can reuse the
+  dnl results of this search when this library appears as a dependency.
+  HAVE_LIB[]NAME=yes
+  undefine([Name])
+  undefine([NAME])
+])
+
+dnl AC_LIB_HAVE_LINKFLAGS(name, dependencies, includes, testcode)
+dnl searches for libname and the libraries corresponding to explicit and
+dnl implicit dependencies, together with the specified include files and
+dnl the ability to compile and link the specified testcode. If found, it
+dnl sets and AC_SUBSTs HAVE_LIB${NAME}=yes and the LIB${NAME} and
+dnl LTLIB${NAME} variables and augments the CPPFLAGS variable, and
+dnl #defines HAVE_LIB${NAME} to 1. Otherwise, it sets and AC_SUBSTs
+dnl HAVE_LIB${NAME}=no and LIB${NAME} and LTLIB${NAME} to empty.
+dnl Sets and AC_SUBSTs the LIB${NAME}_PREFIX variable to nonempty if libname
+dnl was found in ${LIB${NAME}_PREFIX}/$acl_libdirstem.
+AC_DEFUN([AC_LIB_HAVE_LINKFLAGS],
+[
+  AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
+  AC_REQUIRE([AC_LIB_RPATH])
+  define([Name],[translit([$1],[./-], [___])])
+  define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
+                               [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
+
+  dnl Search for lib[]Name and define LIB[]NAME, LTLIB[]NAME and INC[]NAME
+  dnl accordingly.
+  AC_LIB_LINKFLAGS_BODY([$1], [$2])
+
+  dnl Add $INC[]NAME to CPPFLAGS before performing the following checks,
+  dnl because if the user has installed lib[]Name and not disabled its use
+  dnl via --without-lib[]Name-prefix, he wants to use it.
+  ac_save_CPPFLAGS="$CPPFLAGS"
+  AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
+
+  AC_CACHE_CHECK([for lib[]$1], [ac_cv_lib[]Name], [
+    ac_save_LIBS="$LIBS"
+    LIBS="$LIBS $LIB[]NAME"
+    AC_TRY_LINK([$3], [$4], [ac_cv_lib[]Name=yes], [ac_cv_lib[]Name=no])
+    LIBS="$ac_save_LIBS"
+  ])
+  if test "$ac_cv_lib[]Name" = yes; then
+    HAVE_LIB[]NAME=yes
+    AC_DEFINE([HAVE_LIB]NAME, 1, [Define if you have the $1 library.])
+    AC_MSG_CHECKING([how to link with lib[]$1])
+    AC_MSG_RESULT([$LIB[]NAME])
+  else
+    HAVE_LIB[]NAME=no
+    dnl If $LIB[]NAME didn't lead to a usable library, we don't need
+    dnl $INC[]NAME either.
+    CPPFLAGS="$ac_save_CPPFLAGS"
+    LIB[]NAME=
+    LTLIB[]NAME=
+    LIB[]NAME[]_PREFIX=
+  fi
+  AC_SUBST([HAVE_LIB]NAME)
+  AC_SUBST([LIB]NAME)
+  AC_SUBST([LTLIB]NAME)
+  AC_SUBST([LIB]NAME[_PREFIX])
+  undefine([Name])
+  undefine([NAME])
+])
+
+dnl Determine the platform dependent parameters needed to use rpath:
+dnl   acl_libext,
+dnl   acl_shlibext,
+dnl   acl_hardcode_libdir_flag_spec,
+dnl   acl_hardcode_libdir_separator,
+dnl   acl_hardcode_direct,
+dnl   acl_hardcode_minus_L.
+AC_DEFUN([AC_LIB_RPATH],
+[
+  dnl Tell automake >= 1.10 to complain if config.rpath is missing.
+  m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([config.rpath])])
+  AC_REQUIRE([AC_PROG_CC])                dnl we use $CC, $GCC, $LDFLAGS
+  AC_REQUIRE([AC_LIB_PROG_LD])            dnl we use $LD, $with_gnu_ld
+  AC_REQUIRE([AC_CANONICAL_HOST])         dnl we use $host
+  AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT]) dnl we use $ac_aux_dir
+  AC_CACHE_CHECK([for shared library run path origin], acl_cv_rpath, [
+    CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
+    ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
+    . ./conftest.sh
+    rm -f ./conftest.sh
+    acl_cv_rpath=done
+  ])
+  wl="$acl_cv_wl"
+  acl_libext="$acl_cv_libext"
+  acl_shlibext="$acl_cv_shlibext"
+  acl_libname_spec="$acl_cv_libname_spec"
+  acl_library_names_spec="$acl_cv_library_names_spec"
+  acl_hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
+  acl_hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
+  acl_hardcode_direct="$acl_cv_hardcode_direct"
+  acl_hardcode_minus_L="$acl_cv_hardcode_minus_L"
+  dnl Determine whether the user wants rpath handling at all.
+  AC_ARG_ENABLE(rpath,
+    [  --disable-rpath         do not hardcode runtime library paths],
+    :, enable_rpath=yes)
+])
+
+dnl AC_LIB_LINKFLAGS_BODY(name [, dependencies]) searches for libname and
+dnl the libraries corresponding to explicit and implicit dependencies.
+dnl Sets the LIB${NAME}, LTLIB${NAME} and INC${NAME} variables.
+dnl Also, sets the LIB${NAME}_PREFIX variable to nonempty if libname was found
+dnl in ${LIB${NAME}_PREFIX}/$acl_libdirstem.
+AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
+[
+  AC_REQUIRE([AC_LIB_PREPARE_MULTILIB])
+  define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
+                               [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
+  dnl Autoconf >= 2.61 supports dots in --with options.
+  define([N_A_M_E],[m4_if(m4_version_compare(m4_defn([m4_PACKAGE_VERSION]),[2.61]),[-1],[translit([$1],[.],[_])],[$1])])
+  dnl By default, look in $includedir and $libdir.
+  use_additional=yes
+  AC_LIB_WITH_FINAL_PREFIX([
+    eval additional_includedir=\"$includedir\"
+    eval additional_libdir=\"$libdir\"
+  ])
+  AC_LIB_ARG_WITH([lib]N_A_M_E[-prefix],
+[  --with-lib]N_A_M_E[-prefix[=DIR]  search for lib$1 in DIR/include and DIR/lib
+  --without-lib]N_A_M_E[-prefix     don't search for lib$1 in includedir and libdir],
+[
+    if test "X$withval" = "Xno"; then
+      use_additional=no
+    else
+      if test "X$withval" = "X"; then
+        AC_LIB_WITH_FINAL_PREFIX([
+          eval additional_includedir=\"$includedir\"
+          eval additional_libdir=\"$libdir\"
+        ])
+      else
+        additional_includedir="$withval/include"
+        additional_libdir="$withval/$acl_libdirstem"
+      fi
+    fi
+])
+  dnl Search the library and its dependencies in $additional_libdir and
+  dnl $LDFLAGS. Using breadth-first-seach.
+  LIB[]NAME=
+  LTLIB[]NAME=
+  INC[]NAME=
+  LIB[]NAME[]_PREFIX=
+  rpathdirs=
+  ltrpathdirs=
+  names_already_handled=
+  names_next_round='$1 $2'
+  while test -n "$names_next_round"; do
+    names_this_round="$names_next_round"
+    names_next_round=
+    for name in $names_this_round; do
+      already_handled=
+      for n in $names_already_handled; do
+        if test "$n" = "$name"; then
+          already_handled=yes
+          break
+        fi
+      done
+      if test -z "$already_handled"; then
+        names_already_handled="$names_already_handled $name"
+        dnl See if it was already located by an earlier AC_LIB_LINKFLAGS
+        dnl or AC_LIB_HAVE_LINKFLAGS call.
+        uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
+        eval value=\"\$HAVE_LIB$uppername\"
+        if test -n "$value"; then
+          if test "$value" = yes; then
+            eval value=\"\$LIB$uppername\"
+            test -z "$value" || LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$value"
+            eval value=\"\$LTLIB$uppername\"
+            test -z "$value" || LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$value"
+          else
+            dnl An earlier call to AC_LIB_HAVE_LINKFLAGS has determined
+            dnl that this library doesn't exist. So just drop it.
+            :
+          fi
+        else
+          dnl Search the library lib$name in $additional_libdir and $LDFLAGS
+          dnl and the already constructed $LIBNAME/$LTLIBNAME.
+          found_dir=
+          found_la=
+          found_so=
+          found_a=
+          eval libname=\"$acl_libname_spec\"    # typically: libname=lib$name
+          if test -n "$acl_shlibext"; then
+            shrext=".$acl_shlibext"             # typically: shrext=.so
+          else
+            shrext=
+          fi
+          if test $use_additional = yes; then
+            dir="$additional_libdir"
+            dnl The same code as in the loop below:
+            dnl First look for a shared library.
+            if test -n "$acl_shlibext"; then
+              if test -f "$dir/$libname$shrext"; then
+                found_dir="$dir"
+                found_so="$dir/$libname$shrext"
+              else
+                if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
+                  ver=`(cd "$dir" && \
+                        for f in "$libname$shrext".*; do echo "$f"; done \
+                        | sed -e "s,^$libname$shrext\\\\.,," \
+                        | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
+                        | sed 1q ) 2>/dev/null`
+                  if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
+                    found_dir="$dir"
+                    found_so="$dir/$libname$shrext.$ver"
+                  fi
+                else
+                  eval library_names=\"$acl_library_names_spec\"
+                  for f in $library_names; do
+                    if test -f "$dir/$f"; then
+                      found_dir="$dir"
+                      found_so="$dir/$f"
+                      break
+                    fi
+                  done
+                fi
+              fi
+            fi
+            dnl Then look for a static library.
+            if test "X$found_dir" = "X"; then
+              if test -f "$dir/$libname.$acl_libext"; then
+                found_dir="$dir"
+                found_a="$dir/$libname.$acl_libext"
+              fi
+            fi
+            if test "X$found_dir" != "X"; then
+              if test -f "$dir/$libname.la"; then
+                found_la="$dir/$libname.la"
+              fi
+            fi
+          fi
+          if test "X$found_dir" = "X"; then
+            for x in $LDFLAGS $LTLIB[]NAME; do
+              AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
+              case "$x" in
+                -L*)
+                  dir=`echo "X$x" | sed -e 's/^X-L//'`
+                  dnl First look for a shared library.
+                  if test -n "$acl_shlibext"; then
+                    if test -f "$dir/$libname$shrext"; then
+                      found_dir="$dir"
+                      found_so="$dir/$libname$shrext"
+                    else
+                      if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
+                        ver=`(cd "$dir" && \
+                              for f in "$libname$shrext".*; do echo "$f"; done \
+                              | sed -e "s,^$libname$shrext\\\\.,," \
+                              | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
+                              | sed 1q ) 2>/dev/null`
+                        if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
+                          found_dir="$dir"
+                          found_so="$dir/$libname$shrext.$ver"
+                        fi
+                      else
+                        eval library_names=\"$acl_library_names_spec\"
+                        for f in $library_names; do
+                          if test -f "$dir/$f"; then
+                            found_dir="$dir"
+                            found_so="$dir/$f"
+                            break
+                          fi
+                        done
+                      fi
+                    fi
+                  fi
+                  dnl Then look for a static library.
+                  if test "X$found_dir" = "X"; then
+                    if test -f "$dir/$libname.$acl_libext"; then
+                      found_dir="$dir"
+                      found_a="$dir/$libname.$acl_libext"
+                    fi
+                  fi
+                  if test "X$found_dir" != "X"; then
+                    if test -f "$dir/$libname.la"; then
+                      found_la="$dir/$libname.la"
+                    fi
+                  fi
+                  ;;
+              esac
+              if test "X$found_dir" != "X"; then
+                break
+              fi
+            done
+          fi
+          if test "X$found_dir" != "X"; then
+            dnl Found the library.
+            LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$found_dir -l$name"
+            if test "X$found_so" != "X"; then
+              dnl Linking with a shared library. We attempt to hardcode its
+              dnl directory into the executable's runpath, unless it's the
+              dnl standard /usr/lib.
+              if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/$acl_libdirstem"; then
+                dnl No hardcoding is needed.
+                LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
+              else
+                dnl Use an explicit option to hardcode DIR into the resulting
+                dnl binary.
+                dnl Potentially add DIR to ltrpathdirs.
+                dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
+                haveit=
+                for x in $ltrpathdirs; do
+                  if test "X$x" = "X$found_dir"; then
+                    haveit=yes
+                    break
+                  fi
+                done
+                if test -z "$haveit"; then
+                  ltrpathdirs="$ltrpathdirs $found_dir"
+                fi
+                dnl The hardcoding into $LIBNAME is system dependent.
+                if test "$acl_hardcode_direct" = yes; then
+                  dnl Using DIR/libNAME.so during linking hardcodes DIR into the
+                  dnl resulting binary.
+                  LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
+                else
+                  if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
+                    dnl Use an explicit option to hardcode DIR into the resulting
+                    dnl binary.
+                    LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
+                    dnl Potentially add DIR to rpathdirs.
+                    dnl The rpathdirs will be appended to $LIBNAME at the end.
+                    haveit=
+                    for x in $rpathdirs; do
+                      if test "X$x" = "X$found_dir"; then
+                        haveit=yes
+                        break
+                      fi
+                    done
+                    if test -z "$haveit"; then
+                      rpathdirs="$rpathdirs $found_dir"
+                    fi
+                  else
+                    dnl Rely on "-L$found_dir".
+                    dnl But don't add it if it's already contained in the LDFLAGS
+                    dnl or the already constructed $LIBNAME
+                    haveit=
+                    for x in $LDFLAGS $LIB[]NAME; do
+                      AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
+                      if test "X$x" = "X-L$found_dir"; then
+                        haveit=yes
+                        break
+                      fi
+                    done
+                    if test -z "$haveit"; then
+                      LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir"
+                    fi
+                    if test "$acl_hardcode_minus_L" != no; then
+                      dnl FIXME: Not sure whether we should use
+                      dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
+                      dnl here.
+                      LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
+                    else
+                      dnl We cannot use $acl_hardcode_runpath_var and LD_RUN_PATH
+                      dnl here, because this doesn't fit in flags passed to the
+                      dnl compiler. So give up. No hardcoding. This affects only
+                      dnl very old systems.
+                      dnl FIXME: Not sure whether we should use
+                      dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
+                      dnl here.
+                      LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
+                    fi
+                  fi
+                fi
+              fi
+            else
+              if test "X$found_a" != "X"; then
+                dnl Linking with a static library.
+                LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_a"
+              else
+                dnl We shouldn't come here, but anyway it's good to have a
+                dnl fallback.
+                LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir -l$name"
+              fi
+            fi
+            dnl Assume the include files are nearby.
+            additional_includedir=
+            case "$found_dir" in
+              */$acl_libdirstem | */$acl_libdirstem/)
+                basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'`
+                LIB[]NAME[]_PREFIX="$basedir"
+                additional_includedir="$basedir/include"
+                ;;
+            esac
+            if test "X$additional_includedir" != "X"; then
+              dnl Potentially add $additional_includedir to $INCNAME.
+              dnl But don't add it
+              dnl   1. if it's the standard /usr/include,
+              dnl   2. if it's /usr/local/include and we are using GCC on Linux,
+              dnl   3. if it's already present in $CPPFLAGS or the already
+              dnl      constructed $INCNAME,
+              dnl   4. if it doesn't exist as a directory.
+              if test "X$additional_includedir" != "X/usr/include"; then
+                haveit=
+                if test "X$additional_includedir" = "X/usr/local/include"; then
+                  if test -n "$GCC"; then
+                    case $host_os in
+                      linux* | gnu* | k*bsd*-gnu) haveit=yes;;
+                    esac
+                  fi
+                fi
+                if test -z "$haveit"; then
+                  for x in $CPPFLAGS $INC[]NAME; do
+                    AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
+                    if test "X$x" = "X-I$additional_includedir"; then
+                      haveit=yes
+                      break
+                    fi
+                  done
+                  if test -z "$haveit"; then
+                    if test -d "$additional_includedir"; then
+                      dnl Really add $additional_includedir to $INCNAME.
+                      INC[]NAME="${INC[]NAME}${INC[]NAME:+ }-I$additional_includedir"
+                    fi
+                  fi
+                fi
+              fi
+            fi
+            dnl Look for dependencies.
+            if test -n "$found_la"; then
+              dnl Read the .la file. It defines the variables
+              dnl dlname, library_names, old_library, dependency_libs, current,
+              dnl age, revision, installed, dlopen, dlpreopen, libdir.
+              save_libdir="$libdir"
+              case "$found_la" in
+                */* | *\\*) . "$found_la" ;;
+                *) . "./$found_la" ;;
+              esac
+              libdir="$save_libdir"
+              dnl We use only dependency_libs.
+              for dep in $dependency_libs; do
+                case "$dep" in
+                  -L*)
+                    additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
+                    dnl Potentially add $additional_libdir to $LIBNAME and $LTLIBNAME.
+                    dnl But don't add it
+                    dnl   1. if it's the standard /usr/lib,
+                    dnl   2. if it's /usr/local/lib and we are using GCC on Linux,
+                    dnl   3. if it's already present in $LDFLAGS or the already
+                    dnl      constructed $LIBNAME,
+                    dnl   4. if it doesn't exist as a directory.
+                    if test "X$additional_libdir" != "X/usr/$acl_libdirstem"; then
+                      haveit=
+                      if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem"; then
+                        if test -n "$GCC"; then
+                          case $host_os in
+                            linux* | gnu* | k*bsd*-gnu) haveit=yes;;
+                          esac
+                        fi
+                      fi
+                      if test -z "$haveit"; then
+                        haveit=
+                        for x in $LDFLAGS $LIB[]NAME; do
+                          AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
+                          if test "X$x" = "X-L$additional_libdir"; then
+                            haveit=yes
+                            break
+                          fi
+                        done
+                        if test -z "$haveit"; then
+                          if test -d "$additional_libdir"; then
+                            dnl Really add $additional_libdir to $LIBNAME.
+                            LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$additional_libdir"
+                          fi
+                        fi
+                        haveit=
+                        for x in $LDFLAGS $LTLIB[]NAME; do
+                          AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
+                          if test "X$x" = "X-L$additional_libdir"; then
+                            haveit=yes
+                            break
+                          fi
+                        done
+                        if test -z "$haveit"; then
+                          if test -d "$additional_libdir"; then
+                            dnl Really add $additional_libdir to $LTLIBNAME.
+                            LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$additional_libdir"
+                          fi
+                        fi
+                      fi
+                    fi
+                    ;;
+                  -R*)
+                    dir=`echo "X$dep" | sed -e 's/^X-R//'`
+                    if test "$enable_rpath" != no; then
+                      dnl Potentially add DIR to rpathdirs.
+                      dnl The rpathdirs will be appended to $LIBNAME at the end.
+                      haveit=
+                      for x in $rpathdirs; do
+                        if test "X$x" = "X$dir"; then
+                          haveit=yes
+                          break
+                        fi
+                      done
+                      if test -z "$haveit"; then
+                        rpathdirs="$rpathdirs $dir"
+                      fi
+                      dnl Potentially add DIR to ltrpathdirs.
+                      dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
+                      haveit=
+                      for x in $ltrpathdirs; do
+                        if test "X$x" = "X$dir"; then
+                          haveit=yes
+                          break
+                        fi
+                      done
+                      if test -z "$haveit"; then
+                        ltrpathdirs="$ltrpathdirs $dir"
+                      fi
+                    fi
+                    ;;
+                  -l*)
+                    dnl Handle this in the next round.
+                    names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
+                    ;;
+                  *.la)
+                    dnl Handle this in the next round. Throw away the .la's
+                    dnl directory; it is already contained in a preceding -L
+                    dnl option.
+                    names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
+                    ;;
+                  *)
+                    dnl Most likely an immediate library name.
+                    LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$dep"
+                    LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$dep"
+                    ;;
+                esac
+              done
+            fi
+          else
+            dnl Didn't find the library; assume it is in the system directories
+            dnl known to the linker and runtime loader. (All the system
+            dnl directories known to the linker should also be known to the
+            dnl runtime loader, otherwise the system is severely misconfigured.)
+            LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
+            LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-l$name"
+          fi
+        fi
+      fi
+    done
+  done
+  if test "X$rpathdirs" != "X"; then
+    if test -n "$acl_hardcode_libdir_separator"; then
+      dnl Weird platform: only the last -rpath option counts, the user must
+      dnl pass all path elements in one option. We can arrange that for a
+      dnl single library, but not when more than one $LIBNAMEs are used.
+      alldirs=
+      for found_dir in $rpathdirs; do
+        alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir"
+      done
+      dnl Note: acl_hardcode_libdir_flag_spec uses $libdir and $wl.
+      acl_save_libdir="$libdir"
+      libdir="$alldirs"
+      eval flag=\"$acl_hardcode_libdir_flag_spec\"
+      libdir="$acl_save_libdir"
+      LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
+    else
+      dnl The -rpath options are cumulative.
+      for found_dir in $rpathdirs; do
+        acl_save_libdir="$libdir"
+        libdir="$found_dir"
+        eval flag=\"$acl_hardcode_libdir_flag_spec\"
+        libdir="$acl_save_libdir"
+        LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
+      done
+    fi
+  fi
+  if test "X$ltrpathdirs" != "X"; then
+    dnl When using libtool, the option that works for both libraries and
+    dnl executables is -R. The -R options are cumulative.
+    for found_dir in $ltrpathdirs; do
+      LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-R$found_dir"
+    done
+  fi
+])
+
+dnl AC_LIB_APPENDTOVAR(VAR, CONTENTS) appends the elements of CONTENTS to VAR,
+dnl unless already present in VAR.
+dnl Works only for CPPFLAGS, not for LIB* variables because that sometimes
+dnl contains two or three consecutive elements that belong together.
+AC_DEFUN([AC_LIB_APPENDTOVAR],
+[
+  for element in [$2]; do
+    haveit=
+    for x in $[$1]; do
+      AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
+      if test "X$x" = "X$element"; then
+        haveit=yes
+        break
+      fi
+    done
+    if test -z "$haveit"; then
+      [$1]="${[$1]}${[$1]:+ }$element"
+    fi
+  done
+])
+
+dnl For those cases where a variable contains several -L and -l options
+dnl referring to unknown libraries and directories, this macro determines the
+dnl necessary additional linker options for the runtime path.
+dnl AC_LIB_LINKFLAGS_FROM_LIBS([LDADDVAR], [LIBSVALUE], [USE-LIBTOOL])
+dnl sets LDADDVAR to linker options needed together with LIBSVALUE.
+dnl If USE-LIBTOOL evaluates to non-empty, linking with libtool is assumed,
+dnl otherwise linking without libtool is assumed.
+AC_DEFUN([AC_LIB_LINKFLAGS_FROM_LIBS],
+[
+  AC_REQUIRE([AC_LIB_RPATH])
+  AC_REQUIRE([AC_LIB_PREPARE_MULTILIB])
+  $1=
+  if test "$enable_rpath" != no; then
+    if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
+      dnl Use an explicit option to hardcode directories into the resulting
+      dnl binary.
+      rpathdirs=
+      next=
+      for opt in $2; do
+        if test -n "$next"; then
+          dir="$next"
+          dnl No need to hardcode the standard /usr/lib.
+          if test "X$dir" != "X/usr/$acl_libdirstem"; then
+            rpathdirs="$rpathdirs $dir"
+          fi
+          next=
+        else
+          case $opt in
+            -L) next=yes ;;
+            -L*) dir=`echo "X$opt" | sed -e 's,^X-L,,'`
+                 dnl No need to hardcode the standard /usr/lib.
+                 if test "X$dir" != "X/usr/$acl_libdirstem"; then
+                   rpathdirs="$rpathdirs $dir"
+                 fi
+                 next= ;;
+            *) next= ;;
+          esac
+        fi
+      done
+      if test "X$rpathdirs" != "X"; then
+        if test -n ""$3""; then
+          dnl libtool is used for linking. Use -R options.
+          for dir in $rpathdirs; do
+            $1="${$1}${$1:+ }-R$dir"
+          done
+        else
+          dnl The linker is used for linking directly.
+          if test -n "$acl_hardcode_libdir_separator"; then
+            dnl Weird platform: only the last -rpath option counts, the user
+            dnl must pass all path elements in one option.
+            alldirs=
+            for dir in $rpathdirs; do
+              alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$dir"
+            done
+            acl_save_libdir="$libdir"
+            libdir="$alldirs"
+            eval flag=\"$acl_hardcode_libdir_flag_spec\"
+            libdir="$acl_save_libdir"
+            $1="$flag"
+          else
+            dnl The -rpath options are cumulative.
+            for dir in $rpathdirs; do
+              acl_save_libdir="$libdir"
+              libdir="$dir"
+              eval flag=\"$acl_hardcode_libdir_flag_spec\"
+              libdir="$acl_save_libdir"
+              $1="${$1}${$1:+ }$flag"
+            done
+          fi
+        fi
+      fi
+    fi
+  fi
+  AC_SUBST([$1])
+])
diff --git a/myserver/m4/lib-prefix.m4 b/myserver/m4/lib-prefix.m4
new file mode 100644
index 0000000..a8684e1
--- /dev/null
+++ b/myserver/m4/lib-prefix.m4
@@ -0,0 +1,185 @@
+# lib-prefix.m4 serial 5 (gettext-0.15)
+dnl Copyright (C) 2001-2005 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl From Bruno Haible.
+
+dnl AC_LIB_ARG_WITH is synonymous to AC_ARG_WITH in autoconf-2.13, and
+dnl similar to AC_ARG_WITH in autoconf 2.52...2.57 except that is doesn't
+dnl require excessive bracketing.
+ifdef([AC_HELP_STRING],
+[AC_DEFUN([AC_LIB_ARG_WITH], [AC_ARG_WITH([$1],[[$2]],[$3],[$4])])],
+[AC_DEFUN([AC_][LIB_ARG_WITH], [AC_ARG_WITH([$1],[$2],[$3],[$4])])])
+
+dnl AC_LIB_PREFIX adds to the CPPFLAGS and LDFLAGS the flags that are needed
+dnl to access previously installed libraries. The basic assumption is that
+dnl a user will want packages to use other packages he previously installed
+dnl with the same --prefix option.
+dnl This macro is not needed if only AC_LIB_LINKFLAGS is used to locate
+dnl libraries, but is otherwise very convenient.
+AC_DEFUN([AC_LIB_PREFIX],
+[
+  AC_BEFORE([$0], [AC_LIB_LINKFLAGS])
+  AC_REQUIRE([AC_PROG_CC])
+  AC_REQUIRE([AC_CANONICAL_HOST])
+  AC_REQUIRE([AC_LIB_PREPARE_MULTILIB])
+  AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
+  dnl By default, look in $includedir and $libdir.
+  use_additional=yes
+  AC_LIB_WITH_FINAL_PREFIX([
+    eval additional_includedir=\"$includedir\"
+    eval additional_libdir=\"$libdir\"
+  ])
+  AC_LIB_ARG_WITH([lib-prefix],
+[  --with-lib-prefix[=DIR] search for libraries in DIR/include and DIR/lib
+  --without-lib-prefix    don't search for libraries in includedir and libdir],
+[
+    if test "X$withval" = "Xno"; then
+      use_additional=no
+    else
+      if test "X$withval" = "X"; then
+        AC_LIB_WITH_FINAL_PREFIX([
+          eval additional_includedir=\"$includedir\"
+          eval additional_libdir=\"$libdir\"
+        ])
+      else
+        additional_includedir="$withval/include"
+        additional_libdir="$withval/$acl_libdirstem"
+      fi
+    fi
+])
+  if test $use_additional = yes; then
+    dnl Potentially add $additional_includedir to $CPPFLAGS.
+    dnl But don't add it
+    dnl   1. if it's the standard /usr/include,
+    dnl   2. if it's already present in $CPPFLAGS,
+    dnl   3. if it's /usr/local/include and we are using GCC on Linux,
+    dnl   4. if it doesn't exist as a directory.
+    if test "X$additional_includedir" != "X/usr/include"; then
+      haveit=
+      for x in $CPPFLAGS; do
+        AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
+        if test "X$x" = "X-I$additional_includedir"; then
+          haveit=yes
+          break
+        fi
+      done
+      if test -z "$haveit"; then
+        if test "X$additional_includedir" = "X/usr/local/include"; then
+          if test -n "$GCC"; then
+            case $host_os in
+              linux* | gnu* | k*bsd*-gnu) haveit=yes;;
+            esac
+          fi
+        fi
+        if test -z "$haveit"; then
+          if test -d "$additional_includedir"; then
+            dnl Really add $additional_includedir to $CPPFLAGS.
+            CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }-I$additional_includedir"
+          fi
+        fi
+      fi
+    fi
+    dnl Potentially add $additional_libdir to $LDFLAGS.
+    dnl But don't add it
+    dnl   1. if it's the standard /usr/lib,
+    dnl   2. if it's already present in $LDFLAGS,
+    dnl   3. if it's /usr/local/lib and we are using GCC on Linux,
+    dnl   4. if it doesn't exist as a directory.
+    if test "X$additional_libdir" != "X/usr/$acl_libdirstem"; then
+      haveit=
+      for x in $LDFLAGS; do
+        AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
+        if test "X$x" = "X-L$additional_libdir"; then
+          haveit=yes
+          break
+        fi
+      done
+      if test -z "$haveit"; then
+        if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem"; then
+          if test -n "$GCC"; then
+            case $host_os in
+              linux*) haveit=yes;;
+            esac
+          fi
+        fi
+        if test -z "$haveit"; then
+          if test -d "$additional_libdir"; then
+            dnl Really add $additional_libdir to $LDFLAGS.
+            LDFLAGS="${LDFLAGS}${LDFLAGS:+ }-L$additional_libdir"
+          fi
+        fi
+      fi
+    fi
+  fi
+])
+
+dnl AC_LIB_PREPARE_PREFIX creates variables acl_final_prefix,
+dnl acl_final_exec_prefix, containing the values to which $prefix and
+dnl $exec_prefix will expand at the end of the configure script.
+AC_DEFUN([AC_LIB_PREPARE_PREFIX],
+[
+  dnl Unfortunately, prefix and exec_prefix get only finally determined
+  dnl at the end of configure.
+  if test "X$prefix" = "XNONE"; then
+    acl_final_prefix="$ac_default_prefix"
+  else
+    acl_final_prefix="$prefix"
+  fi
+  if test "X$exec_prefix" = "XNONE"; then
+    acl_final_exec_prefix='${prefix}'
+  else
+    acl_final_exec_prefix="$exec_prefix"
+  fi
+  acl_save_prefix="$prefix"
+  prefix="$acl_final_prefix"
+  eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
+  prefix="$acl_save_prefix"
+])
+
+dnl AC_LIB_WITH_FINAL_PREFIX([statement]) evaluates statement, with the
+dnl variables prefix and exec_prefix bound to the values they will have
+dnl at the end of the configure script.
+AC_DEFUN([AC_LIB_WITH_FINAL_PREFIX],
+[
+  acl_save_prefix="$prefix"
+  prefix="$acl_final_prefix"
+  acl_save_exec_prefix="$exec_prefix"
+  exec_prefix="$acl_final_exec_prefix"
+  $1
+  exec_prefix="$acl_save_exec_prefix"
+  prefix="$acl_save_prefix"
+])
+
+dnl AC_LIB_PREPARE_MULTILIB creates a variable acl_libdirstem, containing
+dnl the basename of the libdir, either "lib" or "lib64".
+AC_DEFUN([AC_LIB_PREPARE_MULTILIB],
+[
+  dnl There is no formal standard regarding lib and lib64. The current
+  dnl practice is that on a system supporting 32-bit and 64-bit instruction
+  dnl sets or ABIs, 64-bit libraries go under $prefix/lib64 and 32-bit
+  dnl libraries go under $prefix/lib. We determine the compiler's default
+  dnl mode by looking at the compiler's library search path. If at least
+  dnl of its elements ends in /lib64 or points to a directory whose absolute
+  dnl pathname ends in /lib64, we assume a 64-bit ABI. Otherwise we use the
+  dnl default, namely "lib".
+  acl_libdirstem=lib
+  searchpath=`(LC_ALL=C $CC -print-search-dirs) 2>/dev/null | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'`
+  if test -n "$searchpath"; then
+    acl_save_IFS="${IFS= 	}"; IFS=":"
+    for searchdir in $searchpath; do
+      if test -d "$searchdir"; then
+        case "$searchdir" in
+          */lib64/ | */lib64 ) acl_libdirstem=lib64 ;;
+          *) searchdir=`cd "$searchdir" && pwd`
+             case "$searchdir" in
+               */lib64 ) acl_libdirstem=lib64 ;;
+             esac ;;
+        esac
+      fi
+    done
+    IFS="$acl_save_IFS"
+  fi
+])
diff --git a/myserver/m4/nls.m4 b/myserver/m4/nls.m4
new file mode 100644
index 0000000..7967cc2
--- /dev/null
+++ b/myserver/m4/nls.m4
@@ -0,0 +1,31 @@
+# nls.m4 serial 3 (gettext-0.15)
+dnl Copyright (C) 1995-2003, 2005-2006 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+dnl
+dnl This file can can be used in projects which are not available under
+dnl the GNU General Public License or the GNU Library General Public
+dnl License but which still want to provide support for the GNU gettext
+dnl functionality.
+dnl Please note that the actual code of the GNU gettext library is covered
+dnl by the GNU Library General Public License, and the rest of the GNU
+dnl gettext package package is covered by the GNU General Public License.
+dnl They are *not* in the public domain.
+
+dnl Authors:
+dnl   Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
+dnl   Bruno Haible <haible@clisp.cons.org>, 2000-2003.
+
+AC_PREREQ(2.50)
+
+AC_DEFUN([AM_NLS],
+[
+  AC_MSG_CHECKING([whether NLS is requested])
+  dnl Default is enabled NLS
+  AC_ARG_ENABLE(nls,
+    [  --disable-nls           do not use Native Language Support],
+    USE_NLS=$enableval, USE_NLS=yes)
+  AC_MSG_RESULT($USE_NLS)
+  AC_SUBST(USE_NLS)
+])
diff --git a/myserver/m4/po.m4 b/myserver/m4/po.m4
new file mode 100644
index 0000000..0734762
--- /dev/null
+++ b/myserver/m4/po.m4
@@ -0,0 +1,449 @@
+# po.m4 serial 15 (gettext-0.17)
+dnl Copyright (C) 1995-2007 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+dnl
+dnl This file can can be used in projects which are not available under
+dnl the GNU General Public License or the GNU Library General Public
+dnl License but which still want to provide support for the GNU gettext
+dnl functionality.
+dnl Please note that the actual code of the GNU gettext library is covered
+dnl by the GNU Library General Public License, and the rest of the GNU
+dnl gettext package package is covered by the GNU General Public License.
+dnl They are *not* in the public domain.
+
+dnl Authors:
+dnl   Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
+dnl   Bruno Haible <haible@clisp.cons.org>, 2000-2003.
+
+AC_PREREQ(2.50)
+
+dnl Checks for all prerequisites of the po subdirectory.
+AC_DEFUN([AM_PO_SUBDIRS],
+[
+  AC_REQUIRE([AC_PROG_MAKE_SET])dnl
+  AC_REQUIRE([AC_PROG_INSTALL])dnl
+  AC_REQUIRE([AM_PROG_MKDIR_P])dnl defined by automake
+  AC_REQUIRE([AM_NLS])dnl
+
+  dnl Release version of the gettext macros. This is used to ensure that
+  dnl the gettext macros and po/Makefile.in.in are in sync.
+  AC_SUBST([GETTEXT_MACRO_VERSION], [0.17])
+
+  dnl Perform the following tests also if --disable-nls has been given,
+  dnl because they are needed for "make dist" to work.
+
+  dnl Search for GNU msgfmt in the PATH.
+  dnl The first test excludes Solaris msgfmt and early GNU msgfmt versions.
+  dnl The second test excludes FreeBSD msgfmt.
+  AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
+    [$ac_dir/$ac_word --statistics /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1 &&
+     (if $ac_dir/$ac_word --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)],
+    :)
+  AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
+
+  dnl Test whether it is GNU msgfmt >= 0.15.
+changequote(,)dnl
+  case `$MSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in
+    '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) MSGFMT_015=: ;;
+    *) MSGFMT_015=$MSGFMT ;;
+  esac
+changequote([,])dnl
+  AC_SUBST([MSGFMT_015])
+changequote(,)dnl
+  case `$GMSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in
+    '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) GMSGFMT_015=: ;;
+    *) GMSGFMT_015=$GMSGFMT ;;
+  esac
+changequote([,])dnl
+  AC_SUBST([GMSGFMT_015])
+
+  dnl Search for GNU xgettext 0.12 or newer in the PATH.
+  dnl The first test excludes Solaris xgettext and early GNU xgettext versions.
+  dnl The second test excludes FreeBSD xgettext.
+  AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
+    [$ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1 &&
+     (if $ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)],
+    :)
+  dnl Remove leftover from FreeBSD xgettext call.
+  rm -f messages.po
+
+  dnl Test whether it is GNU xgettext >= 0.15.
+changequote(,)dnl
+  case `$XGETTEXT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in
+    '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) XGETTEXT_015=: ;;
+    *) XGETTEXT_015=$XGETTEXT ;;
+  esac
+changequote([,])dnl
+  AC_SUBST([XGETTEXT_015])
+
+  dnl Search for GNU msgmerge 0.11 or newer in the PATH.
+  AM_PATH_PROG_WITH_TEST(MSGMERGE, msgmerge,
+    [$ac_dir/$ac_word --update -q /dev/null /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1], :)
+
+  dnl Installation directories.
+  dnl Autoconf >= 2.60 defines localedir. For older versions of autoconf, we
+  dnl have to define it here, so that it can be used in po/Makefile.
+  test -n "$localedir" || localedir='${datadir}/locale'
+  AC_SUBST([localedir])
+
+  dnl Support for AM_XGETTEXT_OPTION.
+  test -n "${XGETTEXT_EXTRA_OPTIONS+set}" || XGETTEXT_EXTRA_OPTIONS=
+  AC_SUBST([XGETTEXT_EXTRA_OPTIONS])
+
+  AC_CONFIG_COMMANDS([po-directories], [[
+    for ac_file in $CONFIG_FILES; do
+      # Support "outfile[:infile[:infile...]]"
+      case "$ac_file" in
+        *:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
+      esac
+      # PO directories have a Makefile.in generated from Makefile.in.in.
+      case "$ac_file" in */Makefile.in)
+        # Adjust a relative srcdir.
+        ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
+        ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`"
+        ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
+        # In autoconf-2.13 it is called $ac_given_srcdir.
+        # In autoconf-2.50 it is called $srcdir.
+        test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
+        case "$ac_given_srcdir" in
+          .)  top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
+          /*) top_srcdir="$ac_given_srcdir" ;;
+          *)  top_srcdir="$ac_dots$ac_given_srcdir" ;;
+        esac
+        # Treat a directory as a PO directory if and only if it has a
+        # POTFILES.in file. This allows packages to have multiple PO
+        # directories under different names or in different locations.
+        if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then
+          rm -f "$ac_dir/POTFILES"
+          test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES"
+          cat "$ac_given_srcdir/$ac_dir/POTFILES.in" | sed -e "/^#/d" -e "/^[ 	]*\$/d" -e "s,.*,     $top_srcdir/& \\\\," | sed -e "\$s/\(.*\) \\\\/\1/" > "$ac_dir/POTFILES"
+          POMAKEFILEDEPS="POTFILES.in"
+          # ALL_LINGUAS, POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES depend
+          # on $ac_dir but don't depend on user-specified configuration
+          # parameters.
+          if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then
+            # The LINGUAS file contains the set of available languages.
+            if test -n "$OBSOLETE_ALL_LINGUAS"; then
+              test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete"
+            fi
+            ALL_LINGUAS_=`sed -e "/^#/d" -e "s/#.*//" "$ac_given_srcdir/$ac_dir/LINGUAS"`
+            # Hide the ALL_LINGUAS assigment from automake < 1.5.
+            eval 'ALL_LINGUAS''=$ALL_LINGUAS_'
+            POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS"
+          else
+            # The set of available languages was given in configure.in.
+            # Hide the ALL_LINGUAS assigment from automake < 1.5.
+            eval 'ALL_LINGUAS''=$OBSOLETE_ALL_LINGUAS'
+          fi
+          # Compute POFILES
+          # as      $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po)
+          # Compute UPDATEPOFILES
+          # as      $(foreach lang, $(ALL_LINGUAS), $(lang).po-update)
+          # Compute DUMMYPOFILES
+          # as      $(foreach lang, $(ALL_LINGUAS), $(lang).nop)
+          # Compute GMOFILES
+          # as      $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).gmo)
+          case "$ac_given_srcdir" in
+            .) srcdirpre= ;;
+            *) srcdirpre='$(srcdir)/' ;;
+          esac
+          POFILES=
+          UPDATEPOFILES=
+          DUMMYPOFILES=
+          GMOFILES=
+          for lang in $ALL_LINGUAS; do
+            POFILES="$POFILES $srcdirpre$lang.po"
+            UPDATEPOFILES="$UPDATEPOFILES $lang.po-update"
+            DUMMYPOFILES="$DUMMYPOFILES $lang.nop"
+            GMOFILES="$GMOFILES $srcdirpre$lang.gmo"
+          done
+          # CATALOGS depends on both $ac_dir and the user's LINGUAS
+          # environment variable.
+          INST_LINGUAS=
+          if test -n "$ALL_LINGUAS"; then
+            for presentlang in $ALL_LINGUAS; do
+              useit=no
+              if test "%UNSET%" != "$LINGUAS"; then
+                desiredlanguages="$LINGUAS"
+              else
+                desiredlanguages="$ALL_LINGUAS"
+              fi
+              for desiredlang in $desiredlanguages; do
+                # Use the presentlang catalog if desiredlang is
+                #   a. equal to presentlang, or
+                #   b. a variant of presentlang (because in this case,
+                #      presentlang can be used as a fallback for messages
+                #      which are not translated in the desiredlang catalog).
+                case "$desiredlang" in
+                  "$presentlang"*) useit=yes;;
+                esac
+              done
+              if test $useit = yes; then
+                INST_LINGUAS="$INST_LINGUAS $presentlang"
+              fi
+            done
+          fi
+          CATALOGS=
+          if test -n "$INST_LINGUAS"; then
+            for lang in $INST_LINGUAS; do
+              CATALOGS="$CATALOGS $lang.gmo"
+            done
+          fi
+          test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile"
+          sed -e "/^POTFILES =/r $ac_dir/POTFILES" -e "/^# Makevars/r $ac_given_srcdir/$ac_dir/Makevars" -e "s|@POFILES@|$POFILES|g" -e "s|@UPDATEPOFILES@|$UPDATEPOFILES|g" -e "s|@DUMMYPOFILES@|$DUMMYPOFILES|g" -e "s|@GMOFILES@|$GMOFILES|g" -e "s|@CATALOGS@|$CATALOGS|g" -e "s|@POMAKEFILEDEPS@|$POMAKEFILEDEPS|g" "$ac_dir/Makefile.in" > "$ac_dir/Makefile"
+          for f in "$ac_given_srcdir/$ac_dir"/Rules-*; do
+            if test -f "$f"; then
+              case "$f" in
+                *.orig | *.bak | *~) ;;
+                *) cat "$f" >> "$ac_dir/Makefile" ;;
+              esac
+            fi
+          done
+        fi
+        ;;
+      esac
+    done]],
+   [# Capture the value of obsolete ALL_LINGUAS because we need it to compute
+    # POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES, CATALOGS. But hide it
+    # from automake < 1.5.
+    eval 'OBSOLETE_ALL_LINGUAS''="$ALL_LINGUAS"'
+    # Capture the value of LINGUAS because we need it to compute CATALOGS.
+    LINGUAS="${LINGUAS-%UNSET%}"
+   ])
+])
+
+dnl Postprocesses a Makefile in a directory containing PO files.
+AC_DEFUN([AM_POSTPROCESS_PO_MAKEFILE],
+[
+  # When this code is run, in config.status, two variables have already been
+  # set:
+  # - OBSOLETE_ALL_LINGUAS is the value of LINGUAS set in configure.in,
+  # - LINGUAS is the value of the environment variable LINGUAS at configure
+  #   time.
+
+changequote(,)dnl
+  # Adjust a relative srcdir.
+  ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
+  ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`"
+  ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
+  # In autoconf-2.13 it is called $ac_given_srcdir.
+  # In autoconf-2.50 it is called $srcdir.
+  test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
+  case "$ac_given_srcdir" in
+    .)  top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
+    /*) top_srcdir="$ac_given_srcdir" ;;
+    *)  top_srcdir="$ac_dots$ac_given_srcdir" ;;
+  esac
+
+  # Find a way to echo strings without interpreting backslash.
+  if test "X`(echo '\t') 2>/dev/null`" = 'X\t'; then
+    gt_echo='echo'
+  else
+    if test "X`(printf '%s\n' '\t') 2>/dev/null`" = 'X\t'; then
+      gt_echo='printf %s\n'
+    else
+      echo_func () {
+        cat <<EOT
+$*
+EOT
+      }
+      gt_echo='echo_func'
+    fi
+  fi
+
+  # A sed script that extracts the value of VARIABLE from a Makefile.
+  sed_x_variable='
+# Test if the hold space is empty.
+x
+s/P/P/
+x
+ta
+# Yes it was empty. Look if we have the expected variable definition.
+/^[	 ]*VARIABLE[	 ]*=/{
+  # Seen the first line of the variable definition.
+  s/^[	 ]*VARIABLE[	 ]*=//
+  ba
+}
+bd
+:a
+# Here we are processing a line from the variable definition.
+# Remove comment, more precisely replace it with a space.
+s/#.*$/ /
+# See if the line ends in a backslash.
+tb
+:b
+s/\\$//
+# Print the line, without the trailing backslash.
+p
+tc
+# There was no trailing backslash. The end of the variable definition is
+# reached. Clear the hold space.
+s/^.*$//
+x
+bd
+:c
+# A trailing backslash means that the variable definition continues in the
+# next line. Put a nonempty string into the hold space to indicate this.
+s/^.*$/P/
+x
+:d
+'
+changequote([,])dnl
+
+  # Set POTFILES to the value of the Makefile variable POTFILES.
+  sed_x_POTFILES=`$gt_echo "$sed_x_variable" | sed -e '/^ *#/d' -e 's/VARIABLE/POTFILES/g'`
+  POTFILES=`sed -n -e "$sed_x_POTFILES" < "$ac_file"`
+  # Compute POTFILES_DEPS as
+  #   $(foreach file, $(POTFILES), $(top_srcdir)/$(file))
+  POTFILES_DEPS=
+  for file in $POTFILES; do
+    POTFILES_DEPS="$POTFILES_DEPS "'$(top_srcdir)/'"$file"
+  done
+  POMAKEFILEDEPS=""
+
+  if test -n "$OBSOLETE_ALL_LINGUAS"; then
+    test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete"
+  fi
+  if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then
+    # The LINGUAS file contains the set of available languages.
+    ALL_LINGUAS_=`sed -e "/^#/d" -e "s/#.*//" "$ac_given_srcdir/$ac_dir/LINGUAS"`
+    POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS"
+  else
+    # Set ALL_LINGUAS to the value of the Makefile variable LINGUAS.
+    sed_x_LINGUAS=`$gt_echo "$sed_x_variable" | sed -e '/^ *#/d' -e 's/VARIABLE/LINGUAS/g'`
+    ALL_LINGUAS_=`sed -n -e "$sed_x_LINGUAS" < "$ac_file"`
+  fi
+  # Hide the ALL_LINGUAS assigment from automake < 1.5.
+  eval 'ALL_LINGUAS''=$ALL_LINGUAS_'
+  # Compute POFILES
+  # as      $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po)
+  # Compute UPDATEPOFILES
+  # as      $(foreach lang, $(ALL_LINGUAS), $(lang).po-update)
+  # Compute DUMMYPOFILES
+  # as      $(foreach lang, $(ALL_LINGUAS), $(lang).nop)
+  # Compute GMOFILES
+  # as      $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).gmo)
+  # Compute PROPERTIESFILES
+  # as      $(foreach lang, $(ALL_LINGUAS), $(top_srcdir)/$(DOMAIN)_$(lang).properties)
+  # Compute CLASSFILES
+  # as      $(foreach lang, $(ALL_LINGUAS), $(top_srcdir)/$(DOMAIN)_$(lang).class)
+  # Compute QMFILES
+  # as      $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).qm)
+  # Compute MSGFILES
+  # as      $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(frob $(lang)).msg)
+  # Compute RESOURCESDLLFILES
+  # as      $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(frob $(lang))/$(DOMAIN).resources.dll)
+  case "$ac_given_srcdir" in
+    .) srcdirpre= ;;
+    *) srcdirpre='$(srcdir)/' ;;
+  esac
+  POFILES=
+  UPDATEPOFILES=
+  DUMMYPOFILES=
+  GMOFILES=
+  PROPERTIESFILES=
+  CLASSFILES=
+  QMFILES=
+  MSGFILES=
+  RESOURCESDLLFILES=
+  for lang in $ALL_LINGUAS; do
+    POFILES="$POFILES $srcdirpre$lang.po"
+    UPDATEPOFILES="$UPDATEPOFILES $lang.po-update"
+    DUMMYPOFILES="$DUMMYPOFILES $lang.nop"
+    GMOFILES="$GMOFILES $srcdirpre$lang.gmo"
+    PROPERTIESFILES="$PROPERTIESFILES \$(top_srcdir)/\$(DOMAIN)_$lang.properties"
+    CLASSFILES="$CLASSFILES \$(top_srcdir)/\$(DOMAIN)_$lang.class"
+    QMFILES="$QMFILES $srcdirpre$lang.qm"
+    frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`
+    MSGFILES="$MSGFILES $srcdirpre$frobbedlang.msg"
+    frobbedlang=`echo $lang | sed -e 's/_/-/g' -e 's/^sr-CS/sr-SP/' -e 's/@latin$/-Latn/' -e 's/@cyrillic$/-Cyrl/' -e 's/^sr-SP$/sr-SP-Latn/' -e 's/^uz-UZ$/uz-UZ-Latn/'`
+    RESOURCESDLLFILES="$RESOURCESDLLFILES $srcdirpre$frobbedlang/\$(DOMAIN).resources.dll"
+  done
+  # CATALOGS depends on both $ac_dir and the user's LINGUAS
+  # environment variable.
+  INST_LINGUAS=
+  if test -n "$ALL_LINGUAS"; then
+    for presentlang in $ALL_LINGUAS; do
+      useit=no
+      if test "%UNSET%" != "$LINGUAS"; then
+        desiredlanguages="$LINGUAS"
+      else
+        desiredlanguages="$ALL_LINGUAS"
+      fi
+      for desiredlang in $desiredlanguages; do
+        # Use the presentlang catalog if desiredlang is
+        #   a. equal to presentlang, or
+        #   b. a variant of presentlang (because in this case,
+        #      presentlang can be used as a fallback for messages
+        #      which are not translated in the desiredlang catalog).
+        case "$desiredlang" in
+          "$presentlang"*) useit=yes;;
+        esac
+      done
+      if test $useit = yes; then
+        INST_LINGUAS="$INST_LINGUAS $presentlang"
+      fi
+    done
+  fi
+  CATALOGS=
+  JAVACATALOGS=
+  QTCATALOGS=
+  TCLCATALOGS=
+  CSHARPCATALOGS=
+  if test -n "$INST_LINGUAS"; then
+    for lang in $INST_LINGUAS; do
+      CATALOGS="$CATALOGS $lang.gmo"
+      JAVACATALOGS="$JAVACATALOGS \$(DOMAIN)_$lang.properties"
+      QTCATALOGS="$QTCATALOGS $lang.qm"
+      frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`
+      TCLCATALOGS="$TCLCATALOGS $frobbedlang.msg"
+      frobbedlang=`echo $lang | sed -e 's/_/-/g' -e 's/^sr-CS/sr-SP/' -e 's/@latin$/-Latn/' -e 's/@cyrillic$/-Cyrl/' -e 's/^sr-SP$/sr-SP-Latn/' -e 's/^uz-UZ$/uz-UZ-Latn/'`
+      CSHARPCATALOGS="$CSHARPCATALOGS $frobbedlang/\$(DOMAIN).resources.dll"
+    done
+  fi
+
+  sed -e "s|@POTFILES_DEPS@|$POTFILES_DEPS|g" -e "s|@POFILES@|$POFILES|g" -e "s|@UPDATEPOFILES@|$UPDATEPOFILES|g" -e "s|@DUMMYPOFILES@|$DUMMYPOFILES|g" -e "s|@GMOFILES@|$GMOFILES|g" -e "s|@PROPERTIESFILES@|$PROPERTIESFILES|g" -e "s|@CLASSFILES@|$CLASSFILES|g" -e "s|@QMFILES@|$QMFILES|g" -e "s|@MSGFILES@|$MSGFILES|g" -e "s|@RESOURCESDLLFILES@|$RESOURCESDLLFILES|g" -e "s|@CATALOGS@|$CATALOGS|g" -e "s|@JAVACATALOGS@|$JAVACATALOGS|g" -e "s|@QTCATALOGS@|$QTCATALOGS|g" -e "s|@TCLCATALOGS@|$TCLCATALOGS|g" -e "s|@CSHARPCATALOGS@|$CSHARPCATALOGS|g" -e 's,^#distdir:,distdir:,' < "$ac_file" > "$ac_file.tmp"
+  if grep -l '@TCLCATALOGS@' "$ac_file" > /dev/null; then
+    # Add dependencies that cannot be formulated as a simple suffix rule.
+    for lang in $ALL_LINGUAS; do
+      frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`
+      cat >> "$ac_file.tmp" <<EOF
+$frobbedlang.msg: $lang.po
+	@echo "\$(MSGFMT) -c --tcl -d \$(srcdir) -l $lang $srcdirpre$lang.po"; \
+	\$(MSGFMT) -c --tcl -d "\$(srcdir)" -l $lang $srcdirpre$lang.po || { rm -f "\$(srcdir)/$frobbedlang.msg"; exit 1; }
+EOF
+    done
+  fi
+  if grep -l '@CSHARPCATALOGS@' "$ac_file" > /dev/null; then
+    # Add dependencies that cannot be formulated as a simple suffix rule.
+    for lang in $ALL_LINGUAS; do
+      frobbedlang=`echo $lang | sed -e 's/_/-/g' -e 's/^sr-CS/sr-SP/' -e 's/@latin$/-Latn/' -e 's/@cyrillic$/-Cyrl/' -e 's/^sr-SP$/sr-SP-Latn/' -e 's/^uz-UZ$/uz-UZ-Latn/'`
+      cat >> "$ac_file.tmp" <<EOF
+$frobbedlang/\$(DOMAIN).resources.dll: $lang.po
+	@echo "\$(MSGFMT) -c --csharp -d \$(srcdir) -l $lang $srcdirpre$lang.po -r \$(DOMAIN)"; \
+	\$(MSGFMT) -c --csharp -d "\$(srcdir)" -l $lang $srcdirpre$lang.po -r "\$(DOMAIN)" || { rm -f "\$(srcdir)/$frobbedlang.msg"; exit 1; }
+EOF
+    done
+  fi
+  if test -n "$POMAKEFILEDEPS"; then
+    cat >> "$ac_file.tmp" <<EOF
+Makefile: $POMAKEFILEDEPS
+EOF
+  fi
+  mv "$ac_file.tmp" "$ac_file"
+])
+
+dnl Initializes the accumulator used by AM_XGETTEXT_OPTION.
+AC_DEFUN([AM_XGETTEXT_OPTION_INIT],
+[
+  XGETTEXT_EXTRA_OPTIONS=
+])
+
+dnl Registers an option to be passed to xgettext in the po subdirectory.
+AC_DEFUN([AM_XGETTEXT_OPTION],
+[
+  AC_REQUIRE([AM_XGETTEXT_OPTION_INIT])
+  XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS $1"
+])
diff --git a/myserver/m4/progtest.m4 b/myserver/m4/progtest.m4
new file mode 100644
index 0000000..a56365c
--- /dev/null
+++ b/myserver/m4/progtest.m4
@@ -0,0 +1,92 @@
+# progtest.m4 serial 4 (gettext-0.14.2)
+dnl Copyright (C) 1996-2003, 2005 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+dnl
+dnl This file can can be used in projects which are not available under
+dnl the GNU General Public License or the GNU Library General Public
+dnl License but which still want to provide support for the GNU gettext
+dnl functionality.
+dnl Please note that the actual code of the GNU gettext library is covered
+dnl by the GNU Library General Public License, and the rest of the GNU
+dnl gettext package package is covered by the GNU General Public License.
+dnl They are *not* in the public domain.
+
+dnl Authors:
+dnl   Ulrich Drepper <drepper@cygnus.com>, 1996.
+
+AC_PREREQ(2.50)
+
+# Search path for a program which passes the given test.
+
+dnl AM_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
+dnl   TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
+AC_DEFUN([AM_PATH_PROG_WITH_TEST],
+[
+# Prepare PATH_SEPARATOR.
+# 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
+
+# Find out how to test for executable files. Don't use a zero-byte file,
+# as systems may use methods other than mode bits to determine executability.
+cat >conf$$.file <<_ASEOF
+#! /bin/sh
+exit 0
+_ASEOF
+chmod +x conf$$.file
+if test -x conf$$.file >/dev/null 2>&1; then
+  ac_executable_p="test -x"
+else
+  ac_executable_p="test -f"
+fi
+rm -f conf$$.file
+
+# Extract the first word of "$2", so it can be a program name with args.
+set dummy $2; ac_word=[$]2
+AC_MSG_CHECKING([for $ac_word])
+AC_CACHE_VAL(ac_cv_path_$1,
+[case "[$]$1" in
+  [[\\/]]* | ?:[[\\/]]*)
+    ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
+    ;;
+  *)
+    ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
+    for ac_dir in ifelse([$5], , $PATH, [$5]); do
+      IFS="$ac_save_IFS"
+      test -z "$ac_dir" && ac_dir=.
+      for ac_exec_ext in '' $ac_executable_extensions; do
+        if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then
+          echo "$as_me: trying $ac_dir/$ac_word..." >&AS_MESSAGE_LOG_FD
+          if [$3]; then
+            ac_cv_path_$1="$ac_dir/$ac_word$ac_exec_ext"
+            break 2
+          fi
+        fi
+      done
+    done
+    IFS="$ac_save_IFS"
+dnl If no 4th arg is given, leave the cache variable unset,
+dnl so AC_PATH_PROGS will keep looking.
+ifelse([$4], , , [  test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
+])dnl
+    ;;
+esac])dnl
+$1="$ac_cv_path_$1"
+if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then
+  AC_MSG_RESULT([$]$1)
+else
+  AC_MSG_RESULT(no)
+fi
+AC_SUBST($1)dnl
+])
diff --git a/myserver/po/ChangeLog b/myserver/po/ChangeLog
new file mode 100644
index 0000000..9ea0b32
--- /dev/null
+++ b/myserver/po/ChangeLog
@@ -0,0 +1,12 @@
+2009-08-19  gettextize  <bug-gnu-gettext@gnu.org>
+
+	* Makefile.in.in: New file, from gettext-0.17.
+	* boldquot.sed: New file, from gettext-0.17.
+	* en@boldquot.header: New file, from gettext-0.17.
+	* en@quot.header: New file, from gettext-0.17.
+	* insert-header.sin: New file, from gettext-0.17.
+	* quot.sed: New file, from gettext-0.17.
+	* remove-potcdate.sin: New file, from gettext-0.17.
+	* Rules-quot: New file, from gettext-0.17.
+	* POTFILES.in: New file.
+
diff --git a/myserver/po/Makefile.in.in b/myserver/po/Makefile.in.in
new file mode 100644
index 0000000..fecf500
--- /dev/null
+++ b/myserver/po/Makefile.in.in
@@ -0,0 +1,429 @@
+# Makefile for PO directory in any package using GNU gettext.
+# Copyright (C) 1995-1997, 2000-2007 by Ulrich Drepper <drepper@gnu.ai.mit.edu>
+#
+# This file can be copied and used freely without restrictions.  It can
+# be used in projects which are not available under the GNU General Public
+# License but which still want to provide support for the GNU gettext
+# functionality.
+# Please note that the actual code of GNU gettext is covered by the GNU
+# General Public License and is *not* in the public domain.
+#
+# Origin: gettext-0.17
+GETTEXT_MACRO_VERSION = 0.17
+
+PACKAGE = @PACKAGE@
+VERSION = @VERSION@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+
+SHELL = /bin/sh
+@SET_MAKE@
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+
+prefix = @prefix@
+exec_prefix = @exec_prefix@
+datarootdir = @datarootdir@
+datadir = @datadir@
+localedir = @localedir@
+gettextsrcdir = $(datadir)/gettext/po
+
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+
+# We use $(mkdir_p).
+# In automake <= 1.9.x, $(mkdir_p) is defined either as "mkdir -p --" or as
+# "$(mkinstalldirs)" or as "$(install_sh) -d". For these automake versions,
+# @install_sh@ does not start with $(SHELL), so we add it.
+# In automake >= 1.10, @mkdir_p@ is derived from ${MKDIR_P}, which is defined
+# either as "/path/to/mkdir -p" or ".../install-sh -c -d". For these automake
+# versions, $(mkinstalldirs) and $(install_sh) are unused.
+mkinstalldirs = $(SHELL) @install_sh@ -d
+install_sh = $(SHELL) @install_sh@
+MKDIR_P = @MKDIR_P@
+mkdir_p = @mkdir_p@
+
+GMSGFMT_ = @GMSGFMT@
+GMSGFMT_no = @GMSGFMT@
+GMSGFMT_yes = @GMSGFMT_015@
+GMSGFMT = $(GMSGFMT_$(USE_MSGCTXT))
+MSGFMT_ = @MSGFMT@
+MSGFMT_no = @MSGFMT@
+MSGFMT_yes = @MSGFMT_015@
+MSGFMT = $(MSGFMT_$(USE_MSGCTXT))
+XGETTEXT_ = @XGETTEXT@
+XGETTEXT_no = @XGETTEXT@
+XGETTEXT_yes = @XGETTEXT_015@
+XGETTEXT = $(XGETTEXT_$(USE_MSGCTXT))
+MSGMERGE = msgmerge
+MSGMERGE_UPDATE = @MSGMERGE@ --update
+MSGINIT = msginit
+MSGCONV = msgconv
+MSGFILTER = msgfilter
+
+POFILES = @POFILES@
+GMOFILES = @GMOFILES@
+UPDATEPOFILES = @UPDATEPOFILES@
+DUMMYPOFILES = @DUMMYPOFILES@
+DISTFILES.common = Makefile.in.in remove-potcdate.sin \
+$(DISTFILES.common.extra1) $(DISTFILES.common.extra2) $(DISTFILES.common.extra3)
+DISTFILES = $(DISTFILES.common) Makevars POTFILES.in \
+$(POFILES) $(GMOFILES) \
+$(DISTFILES.extra1) $(DISTFILES.extra2) $(DISTFILES.extra3)
+
+POTFILES = \
+
+CATALOGS = @CATALOGS@
+
+# Makevars gets inserted here. (Don't remove this line!)
+
+.SUFFIXES:
+.SUFFIXES: .po .gmo .mo .sed .sin .nop .po-create .po-update
+
+.po.mo:
+	@echo "$(MSGFMT) -c -o $@ $<"; \
+	$(MSGFMT) -c -o t-$@ $< && mv t-$@ $@
+
+.po.gmo:
+	@lang=`echo $* | sed -e 's,.*/,,'`; \
+	test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \
+	echo "$${cdcmd}rm -f $${lang}.gmo && $(GMSGFMT) -c --statistics -o $${lang}.gmo $${lang}.po"; \
+	cd $(srcdir) && rm -f $${lang}.gmo && $(GMSGFMT) -c --statistics -o t-$${lang}.gmo $${lang}.po && mv t-$${lang}.gmo $${lang}.gmo
+
+.sin.sed:
+	sed -e '/^#/d' $< > t-$@
+	mv t-$@ $@
+
+
+all: check-macro-version all-@USE_NLS@
+
+all-yes: stamp-po
+all-no:
+
+# Ensure that the gettext macros and this Makefile.in.in are in sync.
+check-macro-version:
+	@test "$(GETTEXT_MACRO_VERSION)" = "@GETTEXT_MACRO_VERSION@" \
+	  || { echo "*** error: gettext infrastructure mismatch: using a Makefile.in.in from gettext version $(GETTEXT_MACRO_VERSION) but the autoconf macros are from gettext version @GETTEXT_MACRO_VERSION@" 1>&2; \
+	       exit 1; \
+	     }
+
+# $(srcdir)/$(DOMAIN).pot is only created when needed. When xgettext finds no
+# internationalized messages, no $(srcdir)/$(DOMAIN).pot is created (because
+# we don't want to bother translators with empty POT files). We assume that
+# LINGUAS is empty in this case, i.e. $(POFILES) and $(GMOFILES) are empty.
+# In this case, stamp-po is a nop (i.e. a phony target).
+
+# stamp-po is a timestamp denoting the last time at which the CATALOGS have
+# been loosely updated. Its purpose is that when a developer or translator
+# checks out the package via CVS, and the $(DOMAIN).pot file is not in CVS,
+# "make" will update the $(DOMAIN).pot and the $(CATALOGS), but subsequent
+# invocations of "make" will do nothing. This timestamp would not be necessary
+# if updating the $(CATALOGS) would always touch them; however, the rule for
+# $(POFILES) has been designed to not touch files that don't need to be
+# changed.
+stamp-po: $(srcdir)/$(DOMAIN).pot
+	test ! -f $(srcdir)/$(DOMAIN).pot || \
+	  test -z "$(GMOFILES)" || $(MAKE) $(GMOFILES)
+	@test ! -f $(srcdir)/$(DOMAIN).pot || { \
+	  echo "touch stamp-po" && \
+	  echo timestamp > stamp-poT && \
+	  mv stamp-poT stamp-po; \
+	}
+
+# Note: Target 'all' must not depend on target '$(DOMAIN).pot-update',
+# otherwise packages like GCC can not be built if only parts of the source
+# have been downloaded.
+
+# This target rebuilds $(DOMAIN).pot; it is an expensive operation.
+# Note that $(DOMAIN).pot is not touched if it doesn't need to be changed.
+$(DOMAIN).pot-update: $(POTFILES) $(srcdir)/POTFILES.in remove-potcdate.sed
+	if LC_ALL=C grep 'GNU @PACKAGE@' $(top_srcdir)/* 2>/dev/null | grep -v 'libtool:' >/dev/null; then \
+	  package_gnu='GNU '; \
+	else \
+	  package_gnu=''; \
+	fi; \
+	if test -n '$(MSGID_BUGS_ADDRESS)' || test '$(PACKAGE_BUGREPORT)' = '@'PACKAGE_BUGREPORT'@'; then \
+	  msgid_bugs_address='$(MSGID_BUGS_ADDRESS)'; \
+	else \
+	  msgid_bugs_address='$(PACKAGE_BUGREPORT)'; \
+	fi; \
+	case `$(XGETTEXT) --version | sed 1q | sed -e 's,^[^0-9]*,,'` in \
+	  '' | 0.[0-9] | 0.[0-9].* | 0.1[0-5] | 0.1[0-5].* | 0.16 | 0.16.[0-1]*) \
+	    $(XGETTEXT) --default-domain=$(DOMAIN) --directory=$(top_srcdir) \
+	      --add-comments=TRANSLATORS: $(XGETTEXT_OPTIONS) @XGETTEXT_EXTRA_OPTIONS@ \
+	      --files-from=$(srcdir)/POTFILES.in \
+	      --copyright-holder='$(COPYRIGHT_HOLDER)' \
+	      --msgid-bugs-address="$$msgid_bugs_address" \
+	    ;; \
+	  *) \
+	    $(XGETTEXT) --default-domain=$(DOMAIN) --directory=$(top_srcdir) \
+	      --add-comments=TRANSLATORS: $(XGETTEXT_OPTIONS) @XGETTEXT_EXTRA_OPTIONS@ \
+	      --files-from=$(srcdir)/POTFILES.in \
+	      --copyright-holder='$(COPYRIGHT_HOLDER)' \
+	      --package-name="$${package_gnu}@PACKAGE@" \
+	      --package-version='@VERSION@' \
+	      --msgid-bugs-address="$$msgid_bugs_address" \
+	    ;; \
+	esac
+	test ! -f $(DOMAIN).po || { \
+	  if test -f $(srcdir)/$(DOMAIN).pot; then \
+	    sed -f remove-potcdate.sed < $(srcdir)/$(DOMAIN).pot > $(DOMAIN).1po && \
+	    sed -f remove-potcdate.sed < $(DOMAIN).po > $(DOMAIN).2po && \
+	    if cmp $(DOMAIN).1po $(DOMAIN).2po >/dev/null 2>&1; then \
+	      rm -f $(DOMAIN).1po $(DOMAIN).2po $(DOMAIN).po; \
+	    else \
+	      rm -f $(DOMAIN).1po $(DOMAIN).2po $(srcdir)/$(DOMAIN).pot && \
+	      mv $(DOMAIN).po $(srcdir)/$(DOMAIN).pot; \
+	    fi; \
+	  else \
+	    mv $(DOMAIN).po $(srcdir)/$(DOMAIN).pot; \
+	  fi; \
+	}
+
+# This rule has no dependencies: we don't need to update $(DOMAIN).pot at
+# every "make" invocation, only create it when it is missing.
+# Only "make $(DOMAIN).pot-update" or "make dist" will force an update.
+$(srcdir)/$(DOMAIN).pot:
+	$(MAKE) $(DOMAIN).pot-update
+
+# This target rebuilds a PO file if $(DOMAIN).pot has changed.
+# Note that a PO file is not touched if it doesn't need to be changed.
+$(POFILES): $(srcdir)/$(DOMAIN).pot
+	@lang=`echo $@ | sed -e 's,.*/,,' -e 's/\.po$$//'`; \
+	if test -f "$(srcdir)/$${lang}.po"; then \
+	  test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \
+	  echo "$${cdcmd}$(MSGMERGE_UPDATE) $${lang}.po $(DOMAIN).pot"; \
+	  cd $(srcdir) && $(MSGMERGE_UPDATE) $${lang}.po $(DOMAIN).pot; \
+	else \
+	  $(MAKE) $${lang}.po-create; \
+	fi
+
+
+install: install-exec install-data
+install-exec:
+install-data: install-data-@USE_NLS@
+	if test "$(PACKAGE)" = "gettext-tools"; then \
+	  $(mkdir_p) $(DESTDIR)$(gettextsrcdir); \
+	  for file in $(DISTFILES.common) Makevars.template; do \
+	    $(INSTALL_DATA) $(srcdir)/$$file \
+			    $(DESTDIR)$(gettextsrcdir)/$$file; \
+	  done; \
+	  for file in Makevars; do \
+	    rm -f $(DESTDIR)$(gettextsrcdir)/$$file; \
+	  done; \
+	else \
+	  : ; \
+	fi
+install-data-no: all
+install-data-yes: all
+	$(mkdir_p) $(DESTDIR)$(datadir)
+	@catalogs='$(CATALOGS)'; \
+	for cat in $$catalogs; do \
+	  cat=`basename $$cat`; \
+	  lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \
+	  dir=$(localedir)/$$lang/LC_MESSAGES; \
+	  $(mkdir_p) $(DESTDIR)$$dir; \
+	  if test -r $$cat; then realcat=$$cat; else realcat=$(srcdir)/$$cat; fi; \
+	  $(INSTALL_DATA) $$realcat $(DESTDIR)$$dir/$(DOMAIN).mo; \
+	  echo "installing $$realcat as $(DESTDIR)$$dir/$(DOMAIN).mo"; \
+	  for lc in '' $(EXTRA_LOCALE_CATEGORIES); do \
+	    if test -n "$$lc"; then \
+	      if (cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc 2>/dev/null) | grep ' -> ' >/dev/null; then \
+	        link=`cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc | sed -e 's/^.* -> //'`; \
+	        mv $(DESTDIR)$(localedir)/$$lang/$$lc $(DESTDIR)$(localedir)/$$lang/$$lc.old; \
+	        mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \
+	        (cd $(DESTDIR)$(localedir)/$$lang/$$lc.old && \
+	         for file in *; do \
+	           if test -f $$file; then \
+	             ln -s ../$$link/$$file $(DESTDIR)$(localedir)/$$lang/$$lc/$$file; \
+	           fi; \
+	         done); \
+	        rm -f $(DESTDIR)$(localedir)/$$lang/$$lc.old; \
+	      else \
+	        if test -d $(DESTDIR)$(localedir)/$$lang/$$lc; then \
+	          :; \
+	        else \
+	          rm -f $(DESTDIR)$(localedir)/$$lang/$$lc; \
+	          mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \
+	        fi; \
+	      fi; \
+	      rm -f $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo; \
+	      ln -s ../LC_MESSAGES/$(DOMAIN).mo $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo 2>/dev/null || \
+	      ln $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(DOMAIN).mo $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo 2>/dev/null || \
+	      cp -p $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(DOMAIN).mo $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo; \
+	      echo "installing $$realcat link as $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo"; \
+	    fi; \
+	  done; \
+	done
+
+install-strip: install
+
+installdirs: installdirs-exec installdirs-data
+installdirs-exec:
+installdirs-data: installdirs-data-@USE_NLS@
+	if test "$(PACKAGE)" = "gettext-tools"; then \
+	  $(mkdir_p) $(DESTDIR)$(gettextsrcdir); \
+	else \
+	  : ; \
+	fi
+installdirs-data-no:
+installdirs-data-yes:
+	$(mkdir_p) $(DESTDIR)$(datadir)
+	@catalogs='$(CATALOGS)'; \
+	for cat in $$catalogs; do \
+	  cat=`basename $$cat`; \
+	  lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \
+	  dir=$(localedir)/$$lang/LC_MESSAGES; \
+	  $(mkdir_p) $(DESTDIR)$$dir; \
+	  for lc in '' $(EXTRA_LOCALE_CATEGORIES); do \
+	    if test -n "$$lc"; then \
+	      if (cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc 2>/dev/null) | grep ' -> ' >/dev/null; then \
+	        link=`cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc | sed -e 's/^.* -> //'`; \
+	        mv $(DESTDIR)$(localedir)/$$lang/$$lc $(DESTDIR)$(localedir)/$$lang/$$lc.old; \
+	        mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \
+	        (cd $(DESTDIR)$(localedir)/$$lang/$$lc.old && \
+	         for file in *; do \
+	           if test -f $$file; then \
+	             ln -s ../$$link/$$file $(DESTDIR)$(localedir)/$$lang/$$lc/$$file; \
+	           fi; \
+	         done); \
+	        rm -f $(DESTDIR)$(localedir)/$$lang/$$lc.old; \
+	      else \
+	        if test -d $(DESTDIR)$(localedir)/$$lang/$$lc; then \
+	          :; \
+	        else \
+	          rm -f $(DESTDIR)$(localedir)/$$lang/$$lc; \
+	          mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \
+	        fi; \
+	      fi; \
+	    fi; \
+	  done; \
+	done
+
+# Define this as empty until I found a useful application.
+installcheck:
+
+uninstall: uninstall-exec uninstall-data
+uninstall-exec:
+uninstall-data: uninstall-data-@USE_NLS@
+	if test "$(PACKAGE)" = "gettext-tools"; then \
+	  for file in $(DISTFILES.common) Makevars.template; do \
+	    rm -f $(DESTDIR)$(gettextsrcdir)/$$file; \
+	  done; \
+	else \
+	  : ; \
+	fi
+uninstall-data-no:
+uninstall-data-yes:
+	catalogs='$(CATALOGS)'; \
+	for cat in $$catalogs; do \
+	  cat=`basename $$cat`; \
+	  lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \
+	  for lc in LC_MESSAGES $(EXTRA_LOCALE_CATEGORIES); do \
+	    rm -f $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo; \
+	  done; \
+	done
+
+check: all
+
+info dvi ps pdf html tags TAGS ctags CTAGS ID:
+
+mostlyclean:
+	rm -f remove-potcdate.sed
+	rm -f stamp-poT
+	rm -f core core.* $(DOMAIN).po $(DOMAIN).1po $(DOMAIN).2po *.new.po
+	rm -fr *.o
+
+clean: mostlyclean
+
+distclean: clean
+	rm -f Makefile Makefile.in POTFILES *.mo
+
+maintainer-clean: distclean
+	@echo "This command is intended for maintainers to use;"
+	@echo "it deletes files that may require special tools to rebuild."
+	rm -f stamp-po $(GMOFILES)
+
+distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
+dist distdir:
+	$(MAKE) update-po
+	@$(MAKE) dist2
+# This is a separate target because 'update-po' must be executed before.
+dist2: stamp-po $(DISTFILES)
+	dists="$(DISTFILES)"; \
+	if test "$(PACKAGE)" = "gettext-tools"; then \
+	  dists="$$dists Makevars.template"; \
+	fi; \
+	if test -f $(srcdir)/$(DOMAIN).pot; then \
+	  dists="$$dists $(DOMAIN).pot stamp-po"; \
+	fi; \
+	if test -f $(srcdir)/ChangeLog; then \
+	  dists="$$dists ChangeLog"; \
+	fi; \
+	for i in 0 1 2 3 4 5 6 7 8 9; do \
+	  if test -f $(srcdir)/ChangeLog.$$i; then \
+	    dists="$$dists ChangeLog.$$i"; \
+	  fi; \
+	done; \
+	if test -f $(srcdir)/LINGUAS; then dists="$$dists LINGUAS"; fi; \
+	for file in $$dists; do \
+	  if test -f $$file; then \
+	    cp -p $$file $(distdir) || exit 1; \
+	  else \
+	    cp -p $(srcdir)/$$file $(distdir) || exit 1; \
+	  fi; \
+	done
+
+update-po: Makefile
+	$(MAKE) $(DOMAIN).pot-update
+	test -z "$(UPDATEPOFILES)" || $(MAKE) $(UPDATEPOFILES)
+	$(MAKE) update-gmo
+
+# General rule for creating PO files.
+
+.nop.po-create:
+	@lang=`echo $@ | sed -e 's/\.po-create$$//'`; \
+	echo "File $$lang.po does not exist. If you are a translator, you can create it through 'msginit'." 1>&2; \
+	exit 1
+
+# General rule for updating PO files.
+
+.nop.po-update:
+	@lang=`echo $@ | sed -e 's/\.po-update$$//'`; \
+	if test "$(PACKAGE)" = "gettext-tools"; then PATH=`pwd`/../src:$$PATH; fi; \
+	tmpdir=`pwd`; \
+	echo "$$lang:"; \
+	test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \
+	echo "$${cdcmd}$(MSGMERGE) $$lang.po $(DOMAIN).pot -o $$lang.new.po"; \
+	cd $(srcdir); \
+	if $(MSGMERGE) $$lang.po $(DOMAIN).pot -o $$tmpdir/$$lang.new.po; then \
+	  if cmp $$lang.po $$tmpdir/$$lang.new.po >/dev/null 2>&1; then \
+	    rm -f $$tmpdir/$$lang.new.po; \
+	  else \
+	    if mv -f $$tmpdir/$$lang.new.po $$lang.po; then \
+	      :; \
+	    else \
+	      echo "msgmerge for $$lang.po failed: cannot move $$tmpdir/$$lang.new.po to $$lang.po" 1>&2; \
+	      exit 1; \
+	    fi; \
+	  fi; \
+	else \
+	  echo "msgmerge for $$lang.po failed!" 1>&2; \
+	  rm -f $$tmpdir/$$lang.new.po; \
+	fi
+
+$(DUMMYPOFILES):
+
+update-gmo: Makefile $(GMOFILES)
+	@:
+
+Makefile: Makefile.in.in Makevars $(top_builddir)/config.status @POMAKEFILEDEPS@
+	cd $(top_builddir) \
+	  && $(SHELL) ./config.status $(subdir)/$@.in po-directories
+
+force:
+
+# Tell versions [3.59,3.63) of GNU make not to export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/myserver/po/Makevars b/myserver/po/Makevars
new file mode 100644
index 0000000..32692ab
--- /dev/null
+++ b/myserver/po/Makevars
@@ -0,0 +1,41 @@
+# Makefile variables for PO directory in any package using GNU gettext.
+
+# Usually the message domain is the same as the package name.
+DOMAIN = $(PACKAGE)
+
+# These two variables depend on the location of this directory.
+subdir = po
+top_builddir = ..
+
+# These options get passed to xgettext.
+XGETTEXT_OPTIONS = --keyword=_ --keyword=N_
+
+# This is the copyright holder that gets inserted into the header of the
+# $(DOMAIN).pot file.  Set this to the copyright holder of the surrounding
+# package.  (Note that the msgstr strings, extracted from the package's
+# sources, belong to the copyright holder of the package.)  Translators are
+# expected to transfer the copyright for their translations to this person
+# or entity, or to disclaim their copyright.  The empty string stands for
+# the public domain; in this case the translators are expected to disclaim
+# their copyright.
+COPYRIGHT_HOLDER = Free Software Foundation, Inc.
+
+# This is the email address or URL to which the translators shall report
+# bugs in the untranslated strings:
+# - Strings which are not entire sentences, see the maintainer guidelines
+#   in the GNU gettext documentation, section 'Preparing Strings'.
+# - Strings which use unclear terms or require additional context to be
+#   understood.
+# - Strings which make invalid assumptions about notation of date, time or
+#   money.
+# - Pluralisation problems.
+# - Incorrect English spelling.
+# - Incorrect formatting.
+# It can be your email address, or a mailing list address where translators
+# can write to without being subscribed, or the URL of a web page through
+# which the translators can contact you.
+MSGID_BUGS_ADDRESS =
+
+# This is the list of locale categories, beyond LC_MESSAGES, for which the
+# message catalogs shall be used.  It is usually empty.
+EXTRA_LOCALE_CATEGORIES =
diff --git a/myserver/po/Makevars.template b/myserver/po/Makevars.template
new file mode 100644
index 0000000..32692ab
--- /dev/null
+++ b/myserver/po/Makevars.template
@@ -0,0 +1,41 @@
+# Makefile variables for PO directory in any package using GNU gettext.
+
+# Usually the message domain is the same as the package name.
+DOMAIN = $(PACKAGE)
+
+# These two variables depend on the location of this directory.
+subdir = po
+top_builddir = ..
+
+# These options get passed to xgettext.
+XGETTEXT_OPTIONS = --keyword=_ --keyword=N_
+
+# This is the copyright holder that gets inserted into the header of the
+# $(DOMAIN).pot file.  Set this to the copyright holder of the surrounding
+# package.  (Note that the msgstr strings, extracted from the package's
+# sources, belong to the copyright holder of the package.)  Translators are
+# expected to transfer the copyright for their translations to this person
+# or entity, or to disclaim their copyright.  The empty string stands for
+# the public domain; in this case the translators are expected to disclaim
+# their copyright.
+COPYRIGHT_HOLDER = Free Software Foundation, Inc.
+
+# This is the email address or URL to which the translators shall report
+# bugs in the untranslated strings:
+# - Strings which are not entire sentences, see the maintainer guidelines
+#   in the GNU gettext documentation, section 'Preparing Strings'.
+# - Strings which use unclear terms or require additional context to be
+#   understood.
+# - Strings which make invalid assumptions about notation of date, time or
+#   money.
+# - Pluralisation problems.
+# - Incorrect English spelling.
+# - Incorrect formatting.
+# It can be your email address, or a mailing list address where translators
+# can write to without being subscribed, or the URL of a web page through
+# which the translators can contact you.
+MSGID_BUGS_ADDRESS =
+
+# This is the list of locale categories, beyond LC_MESSAGES, for which the
+# message catalogs shall be used.  It is usually empty.
+EXTRA_LOCALE_CATEGORIES =
diff --git a/myserver/po/POTFILES.in b/myserver/po/POTFILES.in
new file mode 100644
index 0000000..07c96d7
--- /dev/null
+++ b/myserver/po/POTFILES.in
@@ -0,0 +1,113 @@
+./src/base/base64/mime_utils.cpp
+./src/base/bitvec/bitvec.cpp
+./src/base/dynamic_lib/dynamiclib.cpp
+./src/base/file/file.cpp
+./src/base/file/files_utility.cpp
+./src/base/files_cache/cached_file_buffer.cpp
+./src/base/files_cache/cached_file.cpp
+./src/base/files_cache/cached_file_factory.cpp
+./src/base/find_data/find_data.cpp
+./src/base/hash_map/hash_map.cpp
+./src/base/home_dir/home_dir.cpp
+./src/base/md5/md5.cpp
+./src/base/mem_buff/mem_buff.cpp
+./src/base/multicast/multicast.cpp
+./src/base/pipe/pipe.cpp
+./src/base/process/fork_server.cpp
+./src/base/process/process.cpp
+./src/base/process/process_server_manager.cpp
+./src/base/regex/myserver_regex.cpp
+./src/base/safetime/safetime.cpp
+./src/base/slab/slab.cpp
+./src/base/socket_pair/socket_pair.cpp
+./src/base/socket/socket.cpp
+./src/base/socket/ssl_socket.cpp
+./src/base/ssl/ssl.cpp
+./src/base/string/securestr.cpp
+./src/base/string/stringutils.cpp
+./src/base/sync/event.cpp
+./src/base/sync/mutex.cpp
+./src/base/sync/read_write_lock.cpp
+./src/base/sync/recursive_mutex.cpp
+./src/base/sync/semaphore.cpp
+./src/base/thread/thread.cpp
+./src/base/unix_socket/unix_socket.cpp
+./src/base/utility.cpp
+./src/base/xml/xml_parser.cpp
+./src/conf/mime/mime_manager.cpp
+./src/conf/nodetree.cpp
+./src/conf/security/auth_domain.cpp
+./src/conf/security/auth_method.cpp
+./src/conf/security/auth_method_factory.cpp
+./src/conf/security/security_cache.cpp
+./src/conf/security/security_domain.cpp
+./src/conf/security/security_manager.cpp
+./src/conf/security/security_token.cpp
+./src/conf/security/validator.cpp
+./src/conf/security/validator_factory.cpp
+./src/conf/security/xml_validator.cpp
+./src/conf/vhost/ip.cpp
+./src/conf/vhost/vhost.cpp
+./src/conf/vhost/vhost_manager.cpp
+./src/conf/xml_conf.cpp
+./src/connection/connection.cpp
+./src/connections_scheduler/connections_scheduler.cpp
+./src/connections_scheduler/listen_threads.cpp
+./src/filter/console.cpp
+./src/filter/filter.cpp
+./src/filter/filters_chain.cpp
+./src/filter/filters_factory.cpp
+./src/filter/gzip/gzip.cpp
+./src/filter/gzip/gzip_decompress.cpp
+./src/filter/memory_stream.cpp
+./src/filter/stream.cpp
+./src/http_handler/cgi/cgi.cpp
+./src/http_handler/fastcgi/fastcgi.cpp
+./src/http_handler/http_dir/http_dir.cpp
+./src/http_handler/http_file/http_file.cpp
+./src/http_handler/isapi/isapi.cpp
+./src/http_handler/mscgi/mscgi.cpp
+./src/http_handler/mscgi/mscgi_manager.cpp
+./src/http_handler/proxy/proxy.cpp
+./src/http_handler/scgi/scgi.cpp
+./src/http_handler/wincgi/wincgi.cpp
+./src/log/log_manager.cpp
+./src/log/stream/console_stream.cpp
+./src/log/stream/console_stream_creator.cpp
+./src/log/stream/file_stream.cpp
+./src/log/stream/file_stream_creator.cpp
+./src/log/stream/log_stream.cpp
+./src/log/stream/log_stream_creator.cpp
+./src/log/stream/log_stream_factory.cpp
+./src/log/stream/socket_stream.cpp
+./src/log/stream/socket_stream_creator.cpp
+./src/myserver.cpp
+./src/plugin/plugin.cpp
+./src/plugin/plugin_info.cpp
+./src/plugin/plugins_manager.cpp
+./src/protocol/control/control_header.cpp
+./src/protocol/control/control_protocol.cpp
+./src/protocol/ftp/ftp.cpp
+./src/protocol/ftp/ftp_lexer.cpp
+./src/protocol/ftp/ftp_parser.cpp
+./src/protocol/http/dyn_http_command.cpp
+./src/protocol/http/dyn_http_command_manager.cpp
+./src/protocol/http/dyn_http_manager.cpp
+./src/protocol/http/dyn_http_manager_list.cpp
+./src/protocol/http/env/env.cpp
+./src/protocol/http/http.cpp
+./src/protocol/http/http_data_handler.cpp
+./src/protocol/http/http_data_read.cpp
+./src/protocol/http/http_errors.cpp
+./src/protocol/http/http_headers.cpp
+./src/protocol/http/http_req_security_domain.cpp
+./src/protocol/http/http_request.cpp
+./src/protocol/http/http_response.cpp
+./src/protocol/http/http_thread_context.cpp
+./src/protocol/https/https.cpp
+./src/protocol/protocol_buffer.cpp
+./src/protocol/protocol.cpp
+./src/protocol/protocols_manager.cpp
+./src/protocol/url.cpp
+./src/server/clients_thread.cpp
+./src/server/server.cpp
diff --git a/myserver/po/Rules-quot b/myserver/po/Rules-quot
new file mode 100644
index 0000000..9c2a995
--- /dev/null
+++ b/myserver/po/Rules-quot
@@ -0,0 +1,47 @@
+# Special Makefile rules for English message catalogs with quotation marks.
+
+DISTFILES.common.extra1 = quot.sed boldquot.sed en@quot.header en@boldquot.header insert-header.sin Rules-quot
+
+.SUFFIXES: .insert-header .po-update-en
+
+en@quot.po-create:
+	$(MAKE) en@quot.po-update
+en@boldquot.po-create:
+	$(MAKE) en@boldquot.po-update
+
+en@quot.po-update: en@quot.po-update-en
+en@boldquot.po-update: en@boldquot.po-update-en
+
+.insert-header.po-update-en:
+	@lang=`echo $@ | sed -e 's/\.po-update-en$$//'`; \
+	if test "$(PACKAGE)" = "gettext"; then PATH=`pwd`/../src:$$PATH; GETTEXTLIBDIR=`cd $(top_srcdir)/src && pwd`; export GETTEXTLIBDIR; fi; \
+	tmpdir=`pwd`; \
+	echo "$$lang:"; \
+	ll=`echo $$lang | sed -e 's/@.*//'`; \
+	LC_ALL=C; export LC_ALL; \
+	cd $(srcdir); \
+	if $(MSGINIT) -i $(DOMAIN).pot --no-translator -l $$ll -o - 2>/dev/null | sed -f $$tmpdir/$$lang.insert-header | $(MSGCONV) -t UTF-8 | $(MSGFILTER) sed -f `echo $$lang | sed -e 's/.*@//'`.sed 2>/dev/null > $$tmpdir/$$lang.new.po; then \
+	  if cmp $$lang.po $$tmpdir/$$lang.new.po >/dev/null 2>&1; then \
+	    rm -f $$tmpdir/$$lang.new.po; \
+	  else \
+	    if mv -f $$tmpdir/$$lang.new.po $$lang.po; then \
+	      :; \
+	    else \
+	      echo "creation of $$lang.po failed: cannot move $$tmpdir/$$lang.new.po to $$lang.po" 1>&2; \
+	      exit 1; \
+	    fi; \
+	  fi; \
+	else \
+	  echo "creation of $$lang.po failed!" 1>&2; \
+	  rm -f $$tmpdir/$$lang.new.po; \
+	fi
+
+en@quot.insert-header: insert-header.sin
+	sed -e '/^#/d' -e 's/HEADER/en@quot.header/g' $(srcdir)/insert-header.sin > en@quot.insert-header
+
+en@boldquot.insert-header: insert-header.sin
+	sed -e '/^#/d' -e 's/HEADER/en@boldquot.header/g' $(srcdir)/insert-header.sin > en@boldquot.insert-header
+
+mostlyclean: mostlyclean-quot
+mostlyclean-quot:
+	rm -f *.insert-header
diff --git a/myserver/po/boldquot.sed b/myserver/po/boldquot.sed
new file mode 100644
index 0000000..4b937aa
--- /dev/null
+++ b/myserver/po/boldquot.sed
@@ -0,0 +1,10 @@
+s/"\([^"]*\)"/â€œ\1â€�/g
+s/`\([^`']*\)'/â€˜\1â€™/g
+s/ '\([^`']*\)' / â€˜\1â€™ /g
+s/ '\([^`']*\)'$/ â€˜\1â€™/g
+s/^'\([^`']*\)' /â€˜\1â€™ /g
+s/â€œâ€�/""/g
+s/â€œ/â€œ[1m/g
+s/â€�/[0mâ€�/g
+s/â€˜/â€˜[1m/g
+s/â€™/[0mâ€™/g
diff --git a/myserver/po/en@boldquot.header b/myserver/po/en@boldquot.header
new file mode 100644
index 0000000..fedb6a0
--- /dev/null
+++ b/myserver/po/en@boldquot.header
@@ -0,0 +1,25 @@
+# All this catalog "translates" are quotation characters.
+# The msgids must be ASCII and therefore cannot contain real quotation
+# characters, only substitutes like grave accent (0x60), apostrophe (0x27)
+# and double quote (0x22). These substitutes look strange; see
+# http://www.cl.cam.ac.uk/~mgk25/ucs/quotes.html
+#
+# This catalog translates grave accent (0x60) and apostrophe (0x27) to
+# left single quotation mark (U+2018) and right single quotation mark (U+2019).
+# It also translates pairs of apostrophe (0x27) to
+# left single quotation mark (U+2018) and right single quotation mark (U+2019)
+# and pairs of quotation mark (0x22) to
+# left double quotation mark (U+201C) and right double quotation mark (U+201D).
+#
+# When output to an UTF-8 terminal, the quotation characters appear perfectly.
+# When output to an ISO-8859-1 terminal, the single quotation marks are
+# transliterated to apostrophes (by iconv in glibc 2.2 or newer) or to
+# grave/acute accent (by libiconv), and the double quotation marks are
+# transliterated to 0x22.
+# When output to an ASCII terminal, the single quotation marks are
+# transliterated to apostrophes, and the double quotation marks are
+# transliterated to 0x22.
+#
+# This catalog furthermore displays the text between the quotation marks in
+# bold face, assuming the VT100/XTerm escape sequences.
+#
diff --git a/myserver/po/en@quot.header b/myserver/po/en@quot.header
new file mode 100644
index 0000000..a9647fc
--- /dev/null
+++ b/myserver/po/en@quot.header
@@ -0,0 +1,22 @@
+# All this catalog "translates" are quotation characters.
+# The msgids must be ASCII and therefore cannot contain real quotation
+# characters, only substitutes like grave accent (0x60), apostrophe (0x27)
+# and double quote (0x22). These substitutes look strange; see
+# http://www.cl.cam.ac.uk/~mgk25/ucs/quotes.html
+#
+# This catalog translates grave accent (0x60) and apostrophe (0x27) to
+# left single quotation mark (U+2018) and right single quotation mark (U+2019).
+# It also translates pairs of apostrophe (0x27) to
+# left single quotation mark (U+2018) and right single quotation mark (U+2019)
+# and pairs of quotation mark (0x22) to
+# left double quotation mark (U+201C) and right double quotation mark (U+201D).
+#
+# When output to an UTF-8 terminal, the quotation characters appear perfectly.
+# When output to an ISO-8859-1 terminal, the single quotation marks are
+# transliterated to apostrophes (by iconv in glibc 2.2 or newer) or to
+# grave/acute accent (by libiconv), and the double quotation marks are
+# transliterated to 0x22.
+# When output to an ASCII terminal, the single quotation marks are
+# transliterated to apostrophes, and the double quotation marks are
+# transliterated to 0x22.
+#
diff --git a/myserver/po/insert-header.sin b/myserver/po/insert-header.sin
new file mode 100644
index 0000000..b26de01
--- /dev/null
+++ b/myserver/po/insert-header.sin
@@ -0,0 +1,23 @@
+# Sed script that inserts the file called HEADER before the header entry.
+#
+# At each occurrence of a line starting with "msgid ", we execute the following
+# commands. At the first occurrence, insert the file. At the following
+# occurrences, do nothing. The distinction between the first and the following
+# occurrences is achieved by looking at the hold space.
+/^msgid /{
+x
+# Test if the hold space is empty.
+s/m/m/
+ta
+# Yes it was empty. First occurrence. Read the file.
+r HEADER
+# Output the file's contents by reading the next line. But don't lose the
+# current line while doing this.
+g
+N
+bb
+:a
+# The hold space was nonempty. Following occurrences. Do nothing.
+x
+:b
+}
diff --git a/myserver/po/quot.sed b/myserver/po/quot.sed
new file mode 100644
index 0000000..0122c46
--- /dev/null
+++ b/myserver/po/quot.sed
@@ -0,0 +1,6 @@
+s/"\([^"]*\)"/â€œ\1â€�/g
+s/`\([^`']*\)'/â€˜\1â€™/g
+s/ '\([^`']*\)' / â€˜\1â€™ /g
+s/ '\([^`']*\)'$/ â€˜\1â€™/g
+s/^'\([^`']*\)' /â€˜\1â€™ /g
+s/â€œâ€�/""/g
diff --git a/myserver/po/remove-potcdate.sin b/myserver/po/remove-potcdate.sin
new file mode 100644
index 0000000..2436c49
--- /dev/null
+++ b/myserver/po/remove-potcdate.sin
@@ -0,0 +1,19 @@
+# Sed script that remove the POT-Creation-Date line in the header entry
+# from a POT file.
+#
+# The distinction between the first and the following occurrences of the
+# pattern is achieved by looking at the hold space.
+/^"POT-Creation-Date: .*"$/{
+x
+# Test if the hold space is empty.
+s/P/P/
+ta
+# Yes it was empty. First occurrence. Remove the line.
+g
+d
+bb
+:a
+# The hold space was nonempty. Following occurrences. Do nothing.
+x
+:b
+}
diff --git a/myserver/src/Makefile.am b/myserver/src/Makefile.am
index 1177344..c12a693 100644
--- a/myserver/src/Makefile.am
+++ b/myserver/src/Makefile.am
@@ -10,16 +10,13 @@ myserver_LDADD = libmyserver.a $(PTHREAD_LIB) $(IDN_LIB) \
 	$(XNET_LIB) $(EVENT_LIB) $(DL_LIB) $(SSL_LIB) $(ZLIB_LIB) \
 	$(XML_LIBS) $(LDFLAGS)
 
-
 clean-libmyserver.a:
 	rm -f libmyserver.a
 
-
 libmyserver.a: clean-libmyserver.a
 	find . | grep .*\\.$(OBJEXT)$ | xargs $(AR) cru libmyserver.a
 	$(RANLIB) libmyserver.a
 
-
 all-local: libmyserver.a myserver${EXEEXT}
 	cp myserver${EXEEXT} ../binaries
 
diff --git a/myserver/src/connections_scheduler/listen_threads.cpp b/myserver/src/connections_scheduler/listen_threads.cpp
index 2d0797e..a5e399d 100644
--- a/myserver/src/connections_scheduler/listen_threads.cpp
+++ b/myserver/src/connections_scheduler/listen_threads.cpp
@@ -286,9 +286,8 @@ void ListenThreads::addListeningThread (u_short port)
  * Initialize the listen threads manager.
  * \param parser Xml data to use for error messages.
  */
-int ListenThreads::initialize (XmlParser* parser)
+int ListenThreads::initialize ()
 {
-  languageParser = parser;
   shutdownStatus = false;
   return 0;
 }
diff --git a/myserver/src/http_handler/proxy/proxy.cpp b/myserver/src/http_handler/proxy/proxy.cpp
index 64256de..743123d 100644
--- a/myserver/src/http_handler/proxy/proxy.cpp
+++ b/myserver/src/http_handler/proxy/proxy.cpp
@@ -62,8 +62,9 @@ int Proxy::send (HttpThreadContext *td,
 
   if (destUrl.getProtocol ().compare ("http") && destUrl.getProtocol ().compare ("HTTP"))
     {
-      td->connection->host->warningsLogWrite ("Proxy: %s is not a known protocol", destUrl.getProtocol ());
-      return 0;
+      td->connection->host->warningsLogWrite ("Proxy: %s is not a known protocol",
+                                              destUrl.getProtocol ().c_str ());
+      return td->http->raiseHTTPError (500);
     }
 
   req.ver.assign ("HTTP/1.1");
diff --git a/myserver/src/myserver.cpp b/myserver/src/myserver.cpp
index a0735a0..13c6e30 100644
--- a/myserver/src/myserver.cpp
+++ b/myserver/src/myserver.cpp
@@ -21,26 +21,32 @@
 #include <include/base/string/stringutils.h>
 #include <include/base/process/process.h>
 
-extern "C" {
+extern "C"
+{
 #ifdef WIN32
-#include <direct.h>
+# include <direct.h>
 #endif
 
 #ifdef ARGP
-#include <argp.h>
+# include <argp.h>
 #endif
 
 #ifndef WIN32
-#include <string.h>
-#include <unistd.h>
-#include <signal.h>
+# include <string.h>
+# include <unistd.h>
+# include <signal.h>
 #endif
 }
 
+#ifdef HAVE_GETTEXT
+# include "localedir.h"
+#endif
+
+
 #define MYSERVER_RUNAS_CONSOLE 1
 #define MYSERVER_RUNAS_SERVICE 2
 
-void consoleService (string &, string &, string &, string &, string &);
+void consoleService (string &, string &, string &, string &);
 
 #ifdef WIN32
 void __stdcall myServerCtrlHandler (u_long fdwControl);
@@ -56,37 +62,36 @@ void runAsService ();
 
 int argn;
 char **argv;
-void registerSignals();
+void registerSignals ();
 
 #ifndef WIN32
-void Sig_Quit(int signal)
+void Sig_Quit (int signal)
 {
-  Server::getInstance()->logWriteln("Exiting...");
-  sync();
-  Server::getInstance()->stop();
-  registerSignals();
+  Server::getInstance ()->logWriteln("Exiting...");
+  sync ();
+  Server::getInstance ()->stop();
+  registerSignals ();
 }
 
-void Sig_Hup(int signal)
+void Sig_Hup (int signal)
 {
   /*
    *On the SIGHUP signal reboot the server.
    */
-  Server::getInstance()->rebootOnNextLoop();
-  registerSignals();
+  Server::getInstance ()->rebootOnNextLoop ();
+  registerSignals ();
 }
 #else
-static BOOL SignalHandler(DWORD type)
+static BOOL SignalHandler (DWORD type)
 {
-  Server::getInstance()->logWriteln("Exiting...");
-  Server::getInstance()->stop();
-  registerSignals();
+  Server::getInstance ()->logWriteln ("Exiting...");
+  Server::getInstance ()->stop ();
+  registerSignals ();
 }
-
 #endif
 
 
-void registerSignals()
+void registerSignals ()
 {
 #ifndef WIN32
   struct sigaction sig1, sig2, sig3;
@@ -193,8 +198,8 @@ static struct argp myserverArgp = {options, parseOpt, argsDoc, doc};
 
 
 /*!
- *Load the external path.
- *Return nonzero on errors.
+ * Load the external path.
+ * Return nonzero on errors.
  */
 int loadExternalPath(string &externalPath)
 {
@@ -205,23 +210,19 @@ int loadExternalPath(string &externalPath)
 #ifdef WIN32
       externalPath.assign("plugins");
 #else
-      if(FilesUtility::fileExists("plugins"))
+      if (FilesUtility::fileExists ("plugins"))
         externalPath.assign("plugins");
       else
         {
-#ifdef PREFIX
+# ifdef PREFIX
           externalPath.assign(PREFIX);
           externalPath.append("/lib/myserver/plugins");
-#else
+# else
           externalPath.assign("/usr/lib/myserver/plugins");
-#endif
+# endif
         }
 
 #endif
-
-#ifdef WIN32
-      externalPath.assign("plugins");
-#endif
     }
   catch (...)
     {
@@ -229,84 +230,32 @@ int loadExternalPath(string &externalPath)
   return 0;
 }
 
-
 /*!
- *Load the languages path.
- *Return nonzero on errors.
+ * Load the vhost configuration files locations.
+ * Return nonzero on errors.
  */
-int loadLanguagesPath(string &languagesPath)
-{
-  try
-    {
-      languagesPath = "";
-
-#ifdef WIN32
-      languagesPath.assign(getdefaultwd(0, 0));
-      languagesPath.append("/languages/");
-#else
-      /*
-       *Do not use the files in the directory /usr/share/myserver/languages
-       *if exists a local directory.
-       */
-      if (FilesUtility::fileExists("languages"))
-        {
-          languagesPath.assign(getdefaultwd(0, 0));
-          languagesPath.append("/languages/");
-        }
-      else
-        {
-#ifdef PREFIX
-          languagesPath.assign(PREFIX);
-          languagesPath.append("/share/myserver/languages/");
-#else
-          /* Default PREFIX is /usr/.  */
-          languagesPath.assign("/usr/share/myserver/languages/");
-#endif
-        }
-#endif
-
-#ifdef WIN32
-      languagesPath.assign( "languages/" );
-#endif
-    }
-  catch (...)
-    {
-    }
-  return 0;
-}
-
-/*!
- *Load the vhost configuration files locations.
- *Return nonzero on errors.
- */
-int loadVHostConfFilesLocation(string &vhostConfigurationFile)
+int loadVHostConfFilesLocation (string &vhostConfigurationFile)
 {
   try
     {
       vhostConfigurationFile = "";
 
 #ifdef WIN32
-      vhostConfigurationFile.assign("virtualhosts.xml");
+      vhostConfigurationFile.assign ("virtualhosts.xml");
 #else
       /*
-       *Under an *nix environment look for .xml files in the following order.
+       * Look for .xml files in the following order.
        *1) myserver executable working directory
        *2) ~/.myserver/
        *3) /etc/myserver/
        *4) default files will be copied in myserver executable working
        */
-      if (FilesUtility::fileExists("virtualhosts.xml"))
-        {
-          vhostConfigurationFile.assign("virtualhosts.xml");
-        }
-      else if (FilesUtility::fileExists("~/.myserver/virtualhosts.xml"))
-        {
-          vhostConfigurationFile.assign("~/.myserver/virtualhosts.xml");
-        }
-      else if (FilesUtility::fileExists("/etc/myserver/virtualhosts.xml"))
-        {
-          vhostConfigurationFile.assign("/etc/myserver/virtualhosts.xml");
-        }
+      if (FilesUtility::fileExists ("virtualhosts.xml"))
+        vhostConfigurationFile.assign ("virtualhosts.xml");
+      else if (FilesUtility::fileExists ("~/.myserver/virtualhosts.xml"))
+        vhostConfigurationFile.assign ("~/.myserver/virtualhosts.xml");
+      else if (FilesUtility::fileExists ("/etc/myserver/virtualhosts.xml"))
+        vhostConfigurationFile.assign("/etc/myserver/virtualhosts.xml");
 #endif
     }
   catch (...)
@@ -317,17 +266,17 @@ int loadVHostConfFilesLocation(string &vhostConfigurationFile)
 
 
 /*!
- *Load the mime configuration files locations.
- *Return nonzero on errors.
+ * Load the mime configuration files locations.
+ * Return nonzero on errors.
  */
-int loadMimeConfFilesLocation(string &mimeConfigurationFile)
+int loadMimeConfFilesLocation (string &mimeConfigurationFile)
 {
   try
     {
       mimeConfigurationFile = "";
 
 #ifdef WIN32
-      mimeConfigurationFile.assign("MIMEtypes.xml");
+      mimeConfigurationFile.assign ("MIMEtypes.xml");
 #else
       /*
        *Under an *nix environment look for .xml files in the following order.
@@ -336,18 +285,12 @@ int loadMimeConfFilesLocation(string &mimeConfigurationFile)
        *3) /etc/myserver/
        *4) default files will be copied in myserver executable working
        */
-      if (FilesUtility::fileExists("MIMEtypes.xml"))
-        {
-          mimeConfigurationFile.assign("MIMEtypes.xml");
-        }
-      else if (FilesUtility::fileExists("~/.myserver/MIMEtypes.xml"))
-        {
-          mimeConfigurationFile.assign("~/.myserver/MIMEtypes.xml");
-        }
-      else if (FilesUtility::fileExists("/etc/myserver/MIMEtypes.xml"))
-        {
-          mimeConfigurationFile.assign("/etc/myserver/MIMEtypes.xml");
-        }
+      if (FilesUtility::fileExists ("MIMEtypes.xml"))
+        mimeConfigurationFile.assign ("MIMEtypes.xml");
+      else if (FilesUtility::fileExists ("~/.myserver/MIMEtypes.xml"))
+        mimeConfigurationFile.assign ("~/.myserver/MIMEtypes.xml");
+      else if (FilesUtility::fileExists ("/etc/myserver/MIMEtypes.xml"))
+        mimeConfigurationFile.assign("/etc/myserver/MIMEtypes.xml");
 #endif
     }
   catch (...)
@@ -358,37 +301,31 @@ int loadMimeConfFilesLocation(string &mimeConfigurationFile)
 
 
 /*!
- *Load the main configuration files locations.
- *Return nonzero on errors.
+ * Load the main configuration files locations.
+ * Return nonzero on errors.
  */
-int loadMainConfFilesLocation(string &mainConfigurationFile)
+int loadMainConfFilesLocation (string &mainConfigurationFile)
 {
   try
     {
       mainConfigurationFile = "";
 
 #ifdef WIN32
-      mainConfigurationFile.assign("myserver.xml");
+      mainConfigurationFile.assign ("myserver.xml");
 #else
       /*
-       *Under an *nix environment look for .xml files in the following order.
-       *1) myserver executable working directory
-       *2) ~/.myserver/
-       *3) /etc/myserver/
-       *4) default files will be copied in myserver executable working
+       * Look for .xml files in the following order.
+       * 1) myserver executable working directory
+       * 2) ~/.myserver/
+       * 3) /etc/myserver/
+       * 4) default files will be copied in myserver executable working
        */
-      if (FilesUtility::fileExists("myserver.xml"))
-        {
-          mainConfigurationFile.assign("myserver.xml");
-        }
-      else if (FilesUtility::fileExists("~/.myserver/myserver.xml"))
-        {
-          mainConfigurationFile.assign("~/.myserver/myserver.xml");
-        }
-      else if (FilesUtility::fileExists("/etc/myserver/myserver.xml"))
-        {
-          mainConfigurationFile.assign("/etc/myserver/myserver.xml");
-        }
+      if (FilesUtility::fileExists ("myserver.xml"))
+        mainConfigurationFile.assign ("myserver.xml");
+      else if (FilesUtility::fileExists ("~/.myserver/myserver.xml"))
+        mainConfigurationFile.assign ("~/.myserver/myserver.xml");
+      else if (FilesUtility::fileExists ("/etc/myserver/myserver.xml"))
+        mainConfigurationFile.assign ("/etc/myserver/myserver.xml");
 #endif
     }
   catch (...)
@@ -399,35 +336,29 @@ int loadMainConfFilesLocation(string &mainConfigurationFile)
 
 
 /*!
- *Load the configuration files locations.
- *Return nonzero on errors.
+ * Load the configuration files locations.
+ * Return nonzero on errors.
  */
-int loadConfFilesLocation(string &mainConfigurationFile, string &mimeConfigurationFile,
-                          string &vhostConfigurationFile, string &externalPath, string &languagesPath)
+int loadConfFilesLocation (string &mainConfigurationFile,
+     string &mimeConfigurationFile, string &vhostConfigurationFile,
+                           string &externalPath)
 {
-  if (loadMainConfFilesLocation(mainConfigurationFile))
-    return -1;
-
-  if (loadMimeConfFilesLocation(mimeConfigurationFile))
+  if (loadMainConfFilesLocation (mainConfigurationFile))
     return -1;
 
-  if (loadVHostConfFilesLocation(vhostConfigurationFile))
+  if (loadMimeConfFilesLocation (mimeConfigurationFile))
     return -1;
 
-  if (loadExternalPath(externalPath))
+  if (loadVHostConfFilesLocation (vhostConfigurationFile))
     return -1;
 
-  if (loadLanguagesPath(languagesPath))
+  if (loadExternalPath (externalPath))
     return -1;
 
   return 0;
 }
 
-
-/*!
- *Main function for MyServer.
- */
-int main (int argn, char **argv)
+int main  (int argn, char **argv)
 {
   int runas = MYSERVER_RUNAS_CONSOLE;
 #ifdef ARGP
@@ -437,21 +368,27 @@ int main (int argn, char **argv)
   pid_t pid;
   pid_t sid;
 #endif
-  string mainConf, mimeConf, vhostConf, externPath, langPath;
+  string mainConf, mimeConf, vhostConf, externPath;
+
+  ::argn = argn;
+  ::argv = argv;
 
-  ::argn=argn;
-  ::argv=argv;
+  registerSignals ();
 
-  registerSignals();
+#if HAVE_GETTEXT
+  setlocale (LC_ALL, "");
+  bindtextdomain (PACKAGE, LOCALEDIR);
+  textdomain (PACKAGE);
+#endif
 
   try
     {
-      Server::createInstance();
+      Server::createInstance ();
     }
   catch(...)
     {
       /* Die if we get exceptions here.  */
-      return(1);
+      return (1);
     };
 
   {
@@ -460,15 +397,15 @@ int main (int argn, char **argv)
     bool differentCwd = false;
     char *path;
 
-    pathLen = strlen(argv[0]);
+    pathLen = strlen (argv[0]);
     path = new char[pathLen + 1];
-    if(path == 0)
+    if (path == 0)
       return 1;
-    strncpy(path, argv[0], pathLen);
+    strncpy (path, argv[0], pathLen);
 
-    for(len = 0; len < pathLen; len++)
+    for (len = 0; len < pathLen; len++)
       {
-        if(path[len] == '/' || path[len] == '\\')
+        if (path[len] == '/' || path[len] == '\\')
           {
             differentCwd = true;
             break;
@@ -476,14 +413,14 @@ int main (int argn, char **argv)
       }
 
     /* Current working directory is where the myserver executable is.  */
-    if(differentCwd)
+    if (differentCwd)
       {
         len = pathLen;
-        while((path[len] != '\\') && (path[len] != '/'))
+        while ((path[len] != '\\') && (path[len] != '/'))
           len--;
         path[len] = '\0';
 
-        setcwd(path);
+        setcwd (path);
       }
 
     /* We can free path memory now.  */
@@ -500,9 +437,9 @@ int main (int argn, char **argv)
   input.useForkServer = 0;
 
   /* Call the parser.  */
-  argp_parse(&myserverArgp, argn, argv, 0, 0, &input);
-  runas=input.runas;
-  if(input.logFileName)
+  argp_parse (&myserverArgp, argn, argv, 0, 0, &input);
+  runas = input.runas;
+  if (input.logFileName)
     {
       if (Server::getInstance ()->setLogLocation (input.logFileName))
         {
@@ -511,7 +448,7 @@ int main (int argn, char **argv)
         }
     }
   /* If the version flag is up, show the version and exit.  */
-  if(input.version)
+  if (input.version)
     {
       cout << MYSERVER_VERSION << endl;
 
@@ -525,7 +462,7 @@ int main (int argn, char **argv)
       return 0;
     }
 #else
-  if(argn > 1)
+  if (argn > 1)
     {
       if (!strcmpi (argv[1], "VERSION"))
         {
@@ -559,7 +496,7 @@ int main (int argn, char **argv)
       if (!strcmpi (argv[1], "SERVICE"))
         {
           /*
-           *Set the log file to use when in service mode.
+           * Set the log file to use when in service mode.
            */
           runas = MYSERVER_RUNAS_SERVICE;
         }
@@ -575,31 +512,31 @@ int main (int argn, char **argv)
 #endif
 
   /*
-   *Start here the MyServer execution.
+   * Start here the MyServer execution.
    */
   try
     {
       setcwdBuffer ();
-      loadConfFilesLocation (mainConf, mimeConf, vhostConf, externPath, langPath);
+      loadConfFilesLocation (mainConf, mimeConf, vhostConf, externPath);
 
       switch(runas)
         {
         case MYSERVER_RUNAS_CONSOLE:
-          consoleService (mainConf, mimeConf, vhostConf, externPath, langPath);
+          consoleService (mainConf, mimeConf, vhostConf, externPath);
           break;
         case MYSERVER_RUNAS_SERVICE:
 #ifdef WIN32
           runService ();
 #else
           /*
-           *Run the daemon.
-           *pid is the process ID for the forked process.
-           *Fork the process.
+           * Run the daemon.
+           * pid is the process ID for the forked process.
+           * Fork the process.
            */
           pid = fork ();
 
           /*
-           *An error happened, return with errors.
+           * An error happened, return with errors.
            */
           if (pid < 0)
             {
@@ -608,9 +545,6 @@ int main (int argn, char **argv)
 
           if (pid)
             {
-              /*
-               *Store the PID.
-               */
 #ifdef ARGP
               if(input.pidFileName)
                 writePidfile (input.pidFileName);
@@ -622,21 +556,13 @@ int main (int argn, char **argv)
               return 0;
             }
           /*
-           *Create a SID for the new process.
+           * Create a SID for the new process.
            */
           sid = setsid ();
-   
-          /*
-           *Error in setting a new sid, return the error.
-           */
           if (sid < 0)
             return 1;
-   
-   
-          /*
-           *Finally run the server from the forked process.
-           */
-          consoleService (mainConf, mimeConf, vhostConf, externPath, langPath);
+
+          consoleService (mainConf, mimeConf, vhostConf, externPath);
 #endif
           break;
         }
@@ -657,7 +583,7 @@ int main (int argn, char **argv)
 #ifndef WIN32
 
 /*!
- *Write the current PID to the file.
+ * Write the current PID to the file.
  */
 int writePidfile (const char* filename)
 {
@@ -690,27 +616,27 @@ int writePidfile (const char* filename)
 #endif
 
 /*!
- *Start MyServer in console mode.
+ * Start MyServer in console mode.
  */
-void consoleService(string &mainConf, string &mimeConf, string &vhostConf, string &externPath, string &langPath)
+void consoleService(string &mainConf, string &mimeConf, string &vhostConf, string &externPath)
 {
-  Server::getInstance()->start(mainConf, mimeConf, vhostConf, externPath, langPath);
+  Server::getInstance()->start(mainConf, mimeConf, vhostConf, externPath);
 }
 
 
 /*!
- *These functions are available only on the windows platform.
+ * These functions are available only on the windows platform.
  */
 #ifdef WIN32
 SERVICE_STATUS          MyServiceStatus;
 SERVICE_STATUS_HANDLE   MyServiceStatusHandle;
 
 /*!
- *Entry-point for the NT service.
+ * Entry-point for the NT service.
  */
 void  __stdcall myServerMainNT (u_long, LPTSTR*)
 {
-  string mainConf, mimeConf, vhostConf, externPath, langPath;
+  string mainConf, mimeConf, vhostConf, externPath;
 
   MyServiceStatus.dwServiceType = SERVICE_WIN32;
   MyServiceStatus.dwCurrentState = SERVICE_STOPPED;
@@ -745,8 +671,8 @@ void  __stdcall myServerMainNT (u_long, LPTSTR*)
       SetServiceStatus( MyServiceStatusHandle, &MyServiceStatus );
 
 
-      loadConfFilesLocation (mainConf, mimeConf, vhostConf, externPath, langPath);
-      Server::getInstance()->start (mainConf, mimeConf, vhostConf, externPath, langPath);
+      loadConfFilesLocation (mainConf, mimeConf, vhostConf, externPath);
+      Server::getInstance()->start (mainConf, mimeConf, vhostConf, externPath);
 
       MyServiceStatus.dwCurrentState = SERVICE_STOP_PENDING;
       SetServiceStatus( MyServiceStatusHandle, &MyServiceStatus );
@@ -760,7 +686,7 @@ void  __stdcall myServerMainNT (u_long, LPTSTR*)
 }
 
 /*!
- *Manage the NT service.
+ * Manage the NT service.
  */
 void __stdcall myServerCtrlHandler(u_long fdwControl)
 {
@@ -792,7 +718,7 @@ void __stdcall myServerCtrlHandler(u_long fdwControl)
 #endif
 
 /*!
- *Run MyServer service.
+ * Run MyServer service.
  */
 void runService ()
 {
@@ -817,7 +743,7 @@ void runService ()
 }
 
 /*!
- *Register the service.
+ * Register the service.
  */
 void registerService ()
 {
@@ -871,7 +797,7 @@ void removeService()
 }
 
 /*!
- *Start the service.
+ * Start the service.
  */
 void runAsService ()
 {
diff --git a/myserver/src/plugin/plugin.cpp b/myserver/src/plugin/plugin.cpp
index b3f939d..f79c0bf 100755
--- a/myserver/src/plugin/plugin.cpp
+++ b/myserver/src/plugin/plugin.cpp
@@ -19,109 +19,104 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 using namespace std;
 
-
-typedef int (*loadPROC)(Server*, XmlParser*);
-typedef int (*postLoadPROC)(Server*, XmlParser*);
+typedef int (*loadPROC)(Server*);
+typedef int (*postLoadPROC)(Server*);
 typedef int (*unLoadPROC)();
 typedef int (*versionPROC)();
 typedef const char* (*getNamePROC)(char*, u_long);
 
 /*!
- *Construct a plugin object.
+ * Construct a plugin object.
  */
-Plugin::Plugin()
+Plugin::Plugin ()
 {
-	
+
 }
 
 /*!
- *Destroy the object.
-*/
-Plugin::~Plugin()
+ * Destroy the object.
+ */
+Plugin::~Plugin ()
 {
-  if(hinstLib.validHandle())
-    hinstLib.close();
+  if (hinstLib.validHandle ())
+    hinstLib.close ();
 }
 
 /*!
- *Load the plugin.
- *\param file The filename to load.
- *\param server The server instance to use.
- *\param languageFile The language file to use to retrieve warnings/errors 
- *messages.
+ * Load the plugin.
+ * \param file The filename to load.
+ * \param server The server instance to use.
+ * \param languageFile The language file to use to retrieve warnings/errors
+ * messages.
  */
-int Plugin::load(Server* server, XmlParser* languageFile)
+int Plugin::load (Server* server)
 {
-  loadPROC proc = (loadPROC)hinstLib.getProc("load"); 
-  if(proc)
-    return proc(server, languageFile);
+  loadPROC proc = (loadPROC)hinstLib.getProc ("load");
+  if (proc)
+    return proc (server);
   return 0;
 }
 
 /*!
- *Preload the plugin.  This function doesn't ensure all other
- *plugins are yet loaded.
- *\param file The filename to load. 
- *messages.
- *\param global Load the shared library globally.
+ * Preload the plugin.  This function doesn't ensure all other
+ * plugins are yet loaded.
+ * \param file The filename to load.
+ * messages.
+ * \param global Load the shared library globally.
  */
-int Plugin::preLoad(string& file, 
-                    bool global)
+int Plugin::preLoad (string& file, bool global)
 {
-  
-  return hinstLib.loadLibrary(file.c_str(), global ? 1 : 0);
+
+  return hinstLib.loadLibrary (file.c_str (), global ? 1 : 0);
 }
 
 /*!
- *Post load initialization.  This is called once all the plugins are loaded.
- *\param server The server instance to use.
- *\param languageFile The language file to use to retrieve warnings/errors 
- *messages.
+ * Post load initialization.  This is called once all the plugins are loaded.
+ * \param server The server instance to use.
+ * \param languageFile The language file to use to retrieve warnings/errors
+ * messages.
  */
-int Plugin::postLoad(Server* server, XmlParser* languageFile)
+int Plugin::postLoad(Server* server)
 {
-  if(hinstLib.validHandle())
-  {
-    postLoadPROC proc = (postLoadPROC)hinstLib.getProc("postLoad"); 
-    if(proc)
-      return proc(server, languageFile);
-  }
+  if (hinstLib.validHandle ())
+    {
+      postLoadPROC proc = (postLoadPROC)hinstLib.getProc("postLoad");
+      if (proc)
+        return proc (server);
+    }
   return 0;
 
 }
 
 /*!
- *Unload the plugin.
- *\param languageFile The language file to use to retrieve warnings/errors 
- *messages.
+ * Unload the plugin.
+ * \param languageFile The language file to use to retrieve warnings/errors
+ * messages.
  */
-int Plugin::unLoad()
+int Plugin::unLoad ()
 {
-  if(hinstLib.validHandle())
-  {
-    unLoadPROC proc = (unLoadPROC)hinstLib.getProc("unLoad"); 
-    if(proc)
-      return proc();
-  }
+  if (hinstLib.validHandle ())
+    {
+      unLoadPROC proc = (unLoadPROC)hinstLib.getProc ("unLoad");
+      if (proc)
+        return proc ();
+    }
   return 0;
 }
 
-
-
-
 /*!
- *Get the plugin name.
- *\param buffer The buffer where write the plugin name.
- *\param len The buffer length in bytes.
+ * Get the plugin name.
+ * \param buffer The buffer where write the plugin name.
+ * \param len The buffer length in bytes.
  */
-const char* Plugin::getName(char* buffer, u_long len)
+const char* Plugin::getName (char* buffer, u_long len)
 {
   getNamePROC proc;
-  if(!hinstLib.validHandle())
+  if (!hinstLib.validHandle ())
     return 0;
-  proc = (getNamePROC)hinstLib.getProc("name");
-  if(proc)
-    return proc(buffer, len);
+  proc = (getNamePROC)hinstLib.getProc ("name");
+  if (proc)
+    return proc (buffer, len);
 
   return 0;
 }
@@ -130,9 +125,9 @@ const char* Plugin::getName(char* buffer, u_long len)
  *Get directly access to a method.
  *\param name The method name.
  */
-void* Plugin::getDirectMethod(char* name)
+void* Plugin::getDirectMethod (char* name)
 {
-  if(!hinstLib.validHandle())
+  if (!hinstLib.validHandle ())
     return 0;
-  return hinstLib.getProc(name);
+  return hinstLib.getProc (name);
 }
diff --git a/myserver/src/plugin/plugins_manager.cpp b/myserver/src/plugin/plugins_manager.cpp
index 632364d..ef625c8 100755
--- a/myserver/src/plugin/plugins_manager.cpp
+++ b/myserver/src/plugin/plugins_manager.cpp
@@ -422,7 +422,6 @@ PluginsManager::loadInfo (Server* server, string& name, string& path)
  * Add a plugin.
  * \param file The plugin file name.
  * \param server The server object to use.
- * \param languageFile The language file to use to retrieve warnings/errors
  * messages.
  * \param global Specify if the library should be loaded globally.
  */
@@ -606,11 +605,9 @@ PluginsManager::load (Server *server)
 /*!
  * PostLoad functions, called once all the plugins are loaded.
  * \param server The server object to use.
- * \param languageFile The language file to use to get errors and warnings
- * messages.
  */
 int
-PluginsManager::postLoad (Server *server, XmlParser* languageFile)
+PluginsManager::postLoad (Server *server)
 {
   HashMap<string, PluginInfo*>::Iterator it = pluginsInfos.begin ();
   while (it != pluginsInfos.end ())
@@ -618,7 +615,7 @@ PluginsManager::postLoad (Server *server, XmlParser* languageFile)
       Plugin* plugin = (*it)->getPlugin ();
       if (plugin)
         {
-          plugin->postLoad (server, languageFile);
+          plugin->postLoad (server);
           server->logWriteln (MYSERVER_LOG_MSG_INFO,
                               _("Plugin %s loaded"),
                               (*it)->getName ().c_str ());
diff --git a/myserver/src/protocol/control/control_protocol.cpp b/myserver/src/protocol/control/control_protocol.cpp
index 3f1204d..ff65877 100755
--- a/myserver/src/protocol/control/control_protocol.cpp
+++ b/myserver/src/protocol/control/control_protocol.cpp
@@ -74,7 +74,7 @@ char* ControlProtocol::registerName (char* out,int len)
 }
 
 /*!
- *Class constructor.
+ * Class constructor.
  */
 ControlProtocol::ControlProtocol ()
 {
@@ -83,7 +83,7 @@ ControlProtocol::ControlProtocol ()
 }
 
 /*!
- *Destructor for the class.
+ * Destructor for the class.
  */
 ControlProtocol::~ControlProtocol ()
 {
@@ -91,9 +91,9 @@ ControlProtocol::~ControlProtocol ()
 }
 
 /*!
- *Load the control protocol.
+ * Load the control protocol.
  */
-int ControlProtocol::loadProtocol (XmlParser* languageParser)
+int ControlProtocol::loadProtocol ()
 {
   char tmpName[64];
   char tmpPassword[64];
@@ -111,44 +111,30 @@ int ControlProtocol::loadProtocol (XmlParser* languageParser)
 
   data = Server::getInstance ()->getHashedData ("control.enabled");
   if (data && (!strcmpi (data, "YES")))
-  {
     controlEnabled = 1;
-  }
   else
-  {
     controlEnabled = 0;
-  }
 
   data = Server::getInstance ()->getHashedData ("control.admin");
   if (data)
-  {
     strncpy (tmpName, data, 64);
-  }
 
   data = Server::getInstance ()->getHashedData ("control.password");
   if (data)
-  {
     strncpy (tmpPassword, data, 64);
-  }
 
   data = Server::getInstance ()->getHashedData ("control.admin.md5");
   if (data)
-  {
     if (strcmpi (data, "YES") == 0)
       adminNameMD5ized = 1;
-  }
 
   data = Server::getInstance ()->getHashedData ("control.password.md5");
   if (data)
-  {
     if (strcmpi (data, "YES") == 0)
       adminPasswordMD5ized = 1;
-  }
 
   if (adminNameMD5ized)
-  {
     strncpy (adminLogin, tmpName, 64);
-  }
   else
   {
     md5.init ();
@@ -157,9 +143,7 @@ int ControlProtocol::loadProtocol (XmlParser* languageParser)
   }
 
   if (adminPasswordMD5ized)
-  {
     strncpy (adminPassword, tmpPassword, 64);
-  }
   else
   {
     md5.init ();
@@ -478,11 +462,6 @@ int ControlProtocol::controlConnection (ConnectionPtr a, char *b1, char *b2,
       knownCommand = 1;
 
     }
-  else if (!strcmp(command, "SHOWLANGUAGEFILES"))
-    {
-      knownCommand = 1;
-      ret = showLanguageFiles(a, outFile, b1, bs1, header);
-    }
   else if (!strcmp(command, "VERSION"))
     {
       knownCommand = 1;
@@ -876,61 +855,6 @@ int ControlProtocol::putFile (ConnectionPtr a, char* fn, File* in,
 }
 
 /*!
- * Show all the language files that the server can use.
- */
-int ControlProtocol::showLanguageFiles (ConnectionPtr a, File* out,
-                                        char *b1,int bs1, ControlHeader& header)
-{
-  string searchPath;
-  const char *path = Server::getInstance ()->getLanguagesPath ();
-  FindData fd;
-  int ret = 0;
-  if (path == 0)
-    {
-      a->host->warningsLogWrite (_("Control: internal error"));
-      return CONTROL_INTERNAL;
-    }
-  searchPath.assign (path);
-
-#ifdef WIN32
-  searchPath.append ("*.xml");
-#endif
-  ret=fd.findfirst (searchPath.c_str ());
-  if (ret == -1)
-    {
-      a->host->warningsLogWrite (_("Control: internal error"));
-      return CONTROL_INTERNAL;
-    }
-  do
-    {
-      string filename;
-      string ext;
-      u_long nbw = 0;
-      /* Do not show files starting with a dot.  */
-      if (fd.name[0]=='.')
-        continue;
-
-      filename.assign (fd.name);
-      FilesUtility::getFileExt (ext, filename);
-      if (stringcmpi (ext, "xml") == 0)
-        {
-          ret = out->writeToFile (filename.c_str(), filename.length(), &nbw);
-          if (ret == 0)
-            ret = out->writeToFile ("\r\n", 2, &nbw);
-        }
-
-      if (ret)
-        {
-          a->host->warningsLogWrite (_("Control: internal error"));
-          return CONTROL_INTERNAL;
-        }
-    }
-  while (!fd.findnext ());
-  fd.findclose ();
-  return 0;
-}
-
-/*!
  *Return the current MyServer version.
  */
 int ControlProtocol::getVersion (ConnectionPtr a, File* out, char *b1, int bs1,
diff --git a/myserver/src/protocol/ftp/ftp.cpp b/myserver/src/protocol/ftp/ftp.cpp
index f090a21..51a0b2d 100755
--- a/myserver/src/protocol/ftp/ftp.cpp
+++ b/myserver/src/protocol/ftp/ftp.cpp
@@ -391,7 +391,7 @@ char * Ftp::registerNameImpl (char *out, int len)
 }
 
 
-int Ftp::loadProtocolstatic (XmlParser *)
+int Ftp::loadProtocolstatic ()
 {
   // load custom messages from cfg here
   Server *server = Server::getInstance ();
@@ -424,12 +424,9 @@ int Ftp::loadProtocolstatic (XmlParser *)
   return 1;
 }
 
-int Ftp::unLoadProtocolstatic (XmlParser *)
+int Ftp::unLoadProtocolstatic ()
 {
-  if (true /*everything is ok */ )
-    return 1;
-  else
-    return 0;
+  return 1;
 }
 
 void Ftp::ftpReply (int nReplyCode, const std::string & sCustomText /*= ""*/ )
diff --git a/myserver/src/protocol/http/http.cpp b/myserver/src/protocol/http/http.cpp
index 9562fee..a423d5e 100644
--- a/myserver/src/protocol/http/http.cpp
+++ b/myserver/src/protocol/http/http.cpp
@@ -1788,7 +1788,7 @@ int Http::sendAuth ()
 /*!
  * Load the HTTP protocol.
  */
-int Http::loadProtocolStatic (XmlParser* languageParser)
+int Http::loadProtocolStatic ()
 {
   const char *data = NULL;
   string pluginsResource (Server::getInstance ()->getExternalPath ());
@@ -1832,7 +1832,7 @@ int Http::loadProtocolStatic (XmlParser* languageParser)
 /*!
  * Unload the HTTP protocol.
  */
-int Http::unLoadProtocolStatic (XmlParser* languageParser)
+int Http::unLoadProtocolStatic ()
 {
   /* Unload the errors.  */
   HttpErrors::unLoad ();
diff --git a/myserver/src/protocol/protocol.cpp b/myserver/src/protocol/protocol.cpp
index 106d613..573e6cc 100755
--- a/myserver/src/protocol/protocol.cpp
+++ b/myserver/src/protocol/protocol.cpp
@@ -20,7 +20,7 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 /*!
  * Load the protocol. Called once at runtime.
  */
-int Protocol::loadProtocol (XmlParser* /*languageParser*/)
+int Protocol::loadProtocol ()
 {
   return 1;
 }
@@ -28,7 +28,7 @@ int Protocol::loadProtocol (XmlParser* /*languageParser*/)
 /*!
  * Unload the protocol. Called once.
  */
-int Protocol::unLoadProtocol (XmlParser* /*languageParser*/)
+int Protocol::unLoadProtocol ()
 {
   return 1;
 }
diff --git a/myserver/src/server/server.cpp b/myserver/src/server/server.cpp
index 99f1f96..f5f296b 100644
--- a/myserver/src/server/server.cpp
+++ b/myserver/src/server/server.cpp
@@ -85,8 +85,6 @@ Server::Server () : connectionsScheduler (this),
   mimeConfigurationFile = 0;
   mainConfigurationFile = 0;
   vhostConfigurationFile = 0;
-  languagesPath = 0;
-  languageFile = 0;
   externalPath = 0;
   path = 0;
   ipAddresses = 0;
@@ -116,8 +114,7 @@ Server::initLogManager ()
  *Returns false on error.
  */
 bool Server::resetConfigurationPaths (string &mainConf, string &mimeConf,
-				     string &vhostConf, string &externPath,
-				     string &langPath)
+				     string &vhostConf, string &externPath)
 {
   if (!mainConfigurationFile)
     mainConfigurationFile = new string (mainConf);
@@ -139,11 +136,6 @@ bool Server::resetConfigurationPaths (string &mainConf, string &mimeConf,
   else
     externalPath->assign (externPath);
 
-  if (!languagesPath)
-    languagesPath = new string (langPath);
-  else
-    languagesPath->assign (langPath);
-
   return true;
 }
 
@@ -250,17 +242,10 @@ int Server::loadLibraries ()
 
 
 /*!
- *Destroy the object.
+ * Destroy the object.
  */
 Server::~Server ()
 {
-  if (languagesPath)
-    delete languagesPath;
-  languagesPath = 0;
-
-  if (languageFile)
-    delete languageFile;
-  languageFile = 0;
   if (vhostList)
     delete vhostList;
 
@@ -294,7 +279,7 @@ Server::~Server ()
  *Start the server.
  */
 void Server::start (string &mainConf, string &mimeConf, string &vhostConf,
-		   string &externPath, string &langPath)
+                    string &externPath)
 {
   int err = 0;
 #ifdef WIN32
@@ -314,7 +299,7 @@ void Server::start (string &mainConf, string &mimeConf, string &vhostConf,
      */
     logWriteln (MYSERVER_LOG_MSG_INFO, _("Initializing server configuration..."));
 
-    if (!resetConfigurationPaths (mainConf, mimeConf, vhostConf, externPath, langPath))
+    if (!resetConfigurationPaths (mainConf, mimeConf, vhostConf, externPath))
       return;
 
     err = checkConfigurationPaths ();
@@ -412,7 +397,7 @@ int Server::postLoad ()
 
   connectionsScheduler.restart ();
 
-  listenThreads.initialize (&languageParser);
+  listenThreads.initialize ();
 
   if (vhostList)
     delete vhostList;
@@ -482,14 +467,14 @@ void Server::loadPlugins ()
     {
       char protocolName[32];
       Protocol *protocol = protocolsSet[j];
-      protocol->loadProtocol (&languageParser);
+      protocol->loadProtocol ();
       protocol->registerName (protocolName, 32);
       getProtocolsManager ()->addProtocol (protocolName, protocol);
     }
 
   getPluginsManager ()->preLoad (this, *externalPath);
   getPluginsManager ()->load (this);
-  getPluginsManager ()->postLoad (this, &languageParser);
+  getPluginsManager ()->postLoad (this);
 }
 
 /*!
@@ -595,7 +580,7 @@ void Server::mainLoop()
                   Socket::stopBlockingOperations (false);
 
                   connectionsScheduler.restart ();
-                  listenThreads.initialize (&languageParser);
+                  listenThreads.initialize ();
 
                   vhostList = new VhostManager (&listenThreads, logManager);
 
@@ -765,14 +750,6 @@ const char *Server::getGid ()
 }
 
 /*!
- *Get a pointer to the language parser.
- */
-XmlParser* Server::getLanguageParser ()
-{
-  return &languageParser;
-}
-
-/*!
  *Returns the numbers of active connections the list.
  */
 u_long Server::getNumConnections ()
@@ -864,7 +841,6 @@ int Server::terminate ()
 
   ipAddresses = 0;
   vhostList = 0;
-  languageParser.close ();
 
   if (mimeManager)
     {
@@ -976,29 +952,6 @@ int Server::initialize ()
 
   initLogManager ();
 
-  data = getHashedData ("server.language");
-  if (languageFile)
-    delete languageFile;
-  languageFile = new string ();
-  if (data)
-    {
-      languageFile->assign (*languagesPath);
-      languageFile->append ("/");
-      languageFile->append (data);
-    }
-  else
-    languageFile->assign ("languages/english.xml");
-
-
-  /* XXX: IT IS NOT USED, AT LEAST IN THIS CLASS.  */
-  if (languageParser.open (languageFile->c_str ()))
-    {
-      logWriteln (MYSERVER_LOG_MSG_ERROR, _("Error loading language file"));
-      return -1;
-    }
-  logWriteln (MYSERVER_LOG_MSG_INFO, _("Using %s"),
-              languageParser.getValue ("MSG_LANGUAGE"));
-
   data = getHashedData ("server.verbosity");
   if (data)
     verbosity = (u_long)atoi(data);
@@ -1749,22 +1702,6 @@ ProtocolsManager *Server::getProtocolsManager ()
 }
 
 /*!
- * Get the path to the directory containing all the language files.
- */
-const char *Server::getLanguagesPath ()
-{
-  return languagesPath ? languagesPath->c_str () : "";
-}
-
-/*!
- * Get the current language file.
- */
-const char *Server::getLanguageFile ()
-{
-  return languageFile ? languageFile->c_str () : "";
-}
-
-/*!
  * Return nonzero if the autoreboot is enabled.
  */
 bool Server::isAutorebootEnabled ()
diff --git a/myserver/stdafx.h b/myserver/stdafx.h
index 1c28adf..187319d 100644
--- a/myserver/stdafx.h
+++ b/myserver/stdafx.h
@@ -88,5 +88,9 @@ typedef void* HANDLE;
 
 #endif
 
-
-#define _(X) X
+#ifdef HAVE_GETTEXT
+# include <libintl.h>
+# define _(X) gettext (X)
+#else
+# define _(X) X
+#endif

-----------------------------------------------------------------------

Summary of changes:
 myserver/Makefile.am                               |   11 +-
 myserver/binaries/Makefile.am                      |    2 +-
 myserver/binaries/languages/Makefile.am            |    7 -
 myserver/binaries/languages/brazilian.xml          |   45 --
 myserver/binaries/languages/configure/Makefile.am  |    3 -
 myserver/binaries/languages/configure/english.xml  |  136 ----
 myserver/binaries/languages/configure/italiano.xml |  103 ---
 myserver/binaries/languages/configure/spanish.xml  |  135 ----
 myserver/binaries/languages/english.xml            |   43 --
 myserver/binaries/languages/french.xml             |   42 --
 myserver/binaries/languages/german.xml             |   43 --
 myserver/binaries/languages/italiano.xml           |   41 --
 myserver/binaries/languages/romana.xml             |   43 --
 myserver/binaries/languages/russian.xml            |   52 --
 myserver/binaries/languages/russian_koi8r.xml      |   52 --
 myserver/binaries/languages/spanish.xml            |   46 --
 myserver/configure.in                              |    4 +-
 myserver/documentation/basic_configuration.texi    |    6 -
 .../include/connections_scheduler/listen_threads.h |   31 +-
 myserver/include/plugin/plugin.h                   |   19 +-
 myserver/include/plugin/plugins_manager.h          |    4 +-
 .../include/protocol/control/control_protocol.h    |   31 +-
 myserver/include/protocol/ftp/ftp.h                |   12 +-
 myserver/include/protocol/http/http.h              |   13 +-
 myserver/include/protocol/protocol.h               |    4 +-
 myserver/include/server/server.h                   |   10 +-
 myserver/m4/gettext.m4                             |  381 +++++++++++
 myserver/m4/iconv.m4                               |  180 +++++
 myserver/m4/lib-ld.m4                              |  110 +++
 myserver/m4/lib-link.m4                            |  709 ++++++++++++++++++++
 myserver/m4/lib-prefix.m4                          |  185 +++++
 myserver/m4/nls.m4                                 |   31 +
 myserver/m4/po.m4                                  |  449 +++++++++++++
 myserver/m4/progtest.m4                            |   92 +++
 myserver/po/ChangeLog                              |   12 +
 myserver/po/Makefile.in.in                         |  429 ++++++++++++
 myserver/po/Makevars                               |   41 ++
 myserver/po/Makevars.template                      |   41 ++
 myserver/po/POTFILES.in                            |  113 ++++
 myserver/po/Rules-quot                             |   47 ++
 myserver/po/boldquot.sed                           |   10 +
 myserver/po/en@boldquot.header                     |   25 +
 myserver/po/en@quot.header                         |   22 +
 myserver/po/insert-header.sin                      |   23 +
 myserver/po/quot.sed                               |    6 +
 myserver/po/remove-potcdate.sin                    |   19 +
 myserver/src/Makefile.am                           |    3 -
 .../src/connections_scheduler/listen_threads.cpp   |    3 +-
 myserver/src/http_handler/proxy/proxy.cpp          |    5 +-
 myserver/src/myserver.cpp                          |  330 ++++------
 myserver/src/plugin/plugin.cpp                     |  123 ++--
 myserver/src/plugin/plugins_manager.cpp            |    7 +-
 myserver/src/protocol/control/control_protocol.cpp |   84 +---
 myserver/src/protocol/ftp/ftp.cpp                  |    9 +-
 myserver/src/protocol/http/http.cpp                |    4 +-
 myserver/src/protocol/protocol.cpp                 |    4 +-
 myserver/src/server/server.cpp                     |   79 +--
 myserver/stdafx.h                                  |    8 +-
 58 files changed, 3214 insertions(+), 1308 deletions(-)
 delete mode 100644 myserver/binaries/languages/Makefile.am
 delete mode 100644 myserver/binaries/languages/brazilian.xml
 delete mode 100644 myserver/binaries/languages/configure/Makefile.am
 delete mode 100644 myserver/binaries/languages/configure/english.xml
 delete mode 100644 myserver/binaries/languages/configure/italiano.xml
 delete mode 100644 myserver/binaries/languages/configure/spanish.xml
 delete mode 100644 myserver/binaries/languages/english.xml
 delete mode 100644 myserver/binaries/languages/french.xml
 delete mode 100644 myserver/binaries/languages/german.xml
 delete mode 100644 myserver/binaries/languages/italiano.xml
 delete mode 100644 myserver/binaries/languages/romana.xml
 delete mode 100644 myserver/binaries/languages/russian.xml
 delete mode 100644 myserver/binaries/languages/russian_koi8r.xml
 delete mode 100644 myserver/binaries/languages/spanish.xml
 create mode 100644 myserver/m4/gettext.m4
 create mode 100644 myserver/m4/iconv.m4
 create mode 100644 myserver/m4/lib-ld.m4
 create mode 100644 myserver/m4/lib-link.m4
 create mode 100644 myserver/m4/lib-prefix.m4
 create mode 100644 myserver/m4/nls.m4
 create mode 100644 myserver/m4/po.m4
 create mode 100644 myserver/m4/progtest.m4
 create mode 100644 myserver/po/ChangeLog
 create mode 100644 myserver/po/Makefile.in.in
 create mode 100644 myserver/po/Makevars
 create mode 100644 myserver/po/Makevars.template
 create mode 100644 myserver/po/POTFILES.in
 create mode 100644 myserver/po/Rules-quot
 create mode 100644 myserver/po/boldquot.sed
 create mode 100644 myserver/po/en@boldquot.header
 create mode 100644 myserver/po/en@quot.header
 create mode 100644 myserver/po/insert-header.sin
 create mode 100644 myserver/po/quot.sed
 create mode 100644 myserver/po/remove-potcdate.sin


hooks/post-receive
-- 
GNU MyServer



From MAILER-DAEMON Wed Aug 19 18:48:37 2009
Received: from mailman by lists.gnu.org with archive (Exim 4.43)
	id 1MdtxN-0001xw-Hw
	for mharc-myserver-commit@gnu.org; Wed, 19 Aug 2009 18:48:37 -0400
Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43)
	id 1MdtxL-0001x0-B2
	for myserver-commit@gnu.org; Wed, 19 Aug 2009 18:48:35 -0400
Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43)
	id 1MdtxK-0001wH-HL
	for myserver-commit@gnu.org; Wed, 19 Aug 2009 18:48:34 -0400
Received: from [199.232.76.173] (port=60535 helo=monty-python.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43) id 1MdtxK-0001wC-Dg
	for myserver-commit@gnu.org; Wed, 19 Aug 2009 18:48:34 -0400
Received: from savannah.gnu.org ([199.232.41.3]:52839 helo=sv.gnu.org)
	by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32)
	(Exim 4.60) (envelope-from <gscrivano@gnu.org>) id 1MdtxK-0002HI-1g
	for myserver-commit@gnu.org; Wed, 19 Aug 2009 18:48:34 -0400
Received: from download.savannah.gnu.org ([199.232.41.75]
	helo=cvs.savannah.gnu.org) by sv.gnu.org with esmtp (Exim 4.69)
	(envelope-from <gscrivano@gnu.org>) id 1MdtxJ-0007r5-IR
	for myserver-commit@gnu.org; Wed, 19 Aug 2009 22:48:33 +0000
Received: from gscrivano by cvs.savannah.gnu.org with local (Exim 4.69)
	(envelope-from <gscrivano@savannah.gnu.org>) id 1MdtxI-0007qd-Kq
	for myserver-commit@gnu.org; Wed, 19 Aug 2009 22:48:33 +0000
To: myserver-commit@gnu.org
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: 0d6db12ec98f18e5e7b9621b8f5e25280d8ad734
X-Git-Newrev: 21e0a612e723e213010fccbbb29b794a5c55f8f0
Message-Id: <E1MdtxI-0007qd-Kq@cvs.savannah.gnu.org>
From: Giuseppe Scrivano <gscrivano@gnu.org>
Date: Wed, 19 Aug 2009 22:48:33 +0000
X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2)
Subject: [myserver-commit] [SCM] GNU MyServer branch, master,
	updated. 21e0a612e723e213010fccbbb29b794a5c55f8f0
X-BeenThere: myserver-commit@gnu.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: myserver-commit.gnu.org
List-Unsubscribe: <http://lists.gnu.org/mailman/listinfo/myserver-commit>,
	<mailto:myserver-commit-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/pipermail/myserver-commit>
List-Post: <mailto:myserver-commit@gnu.org>
List-Help: <mailto:myserver-commit-request@gnu.org?subject=help>
List-Subscribe: <http://lists.gnu.org/mailman/listinfo/myserver-commit>,
	<mailto:myserver-commit-request@gnu.org?subject=subscribe>
X-List-Received-Date: Wed, 19 Aug 2009 22:48:35 -0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU MyServer".

The branch, master has been updated
       via  21e0a612e723e213010fccbbb29b794a5c55f8f0 (commit)
      from  0d6db12ec98f18e5e7b9621b8f5e25280d8ad734 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------


commit 21e0a612e723e213010fccbbb29b794a5c55f8f0
Author: Giuseppe Scrivano <gscrivano@gnu.org>
Date:   Thu Aug 20 00:30:32 2009 +0200

    Update plugins to use the simpler interface to `PluginsManager'

diff --git a/plugins/src/php/php.cpp b/plugins/src/php/php.cpp
index c425c85..621f64f 100644
--- a/plugins/src/php/php.cpp
+++ b/plugins/src/php/php.cpp
@@ -1,6 +1,6 @@
 /*
 MyServer
-Copyright (C) 2007 The Free Software Foundation Inc.
+Copyright (C) 2007, 2009 The Free Software Foundation Inc.
 This program 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 3 of the License, or
@@ -25,9 +25,8 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #include <main/php.h>
 #include <main/SAPI.h>
 
-
 #ifdef ZTS
-#include <TSRM.h>
+# include <TSRM.h>
 #endif
 
 static Server* server;
@@ -290,7 +289,7 @@ static sapi_module_struct myphp_module =
 	STANDARD_SAPI_MODULE_PROPERTIES
 };
 
-int load(void* server,void* parser)
+int load(void* server)
 {
 	::server = (Server*)server;
 	const char *data;
@@ -315,7 +314,7 @@ int load(void* server,void* parser)
 
 /*! Postload phase for the plugin.  */
 extern "C"
-int postLoad(void* server,void* parser)
+int postLoad(void* server)
 {
 	const char *data;
 	data = ::server->getHashedData("PHP_NO_REBOOT");
@@ -361,7 +360,7 @@ int unLoad(void* p)
 /*!
  *Default constructor.
  */
-PhpManager::PhpManager() 
+PhpManager::PhpManager()
 {
 
 }
diff --git a/plugins/src/python/python.cpp b/plugins/src/python/python.cpp
index c8374c5..fa3976b 100644
--- a/plugins/src/python/python.cpp
+++ b/plugins/src/python/python.cpp
@@ -1,6 +1,6 @@
 /*
 MyServer
-Copyright (C) 2007, 2008 The MyServer Team
+Copyright (C) 2007, 2008, 2009 The MyServer Team
 This program 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 3 of the License, or
@@ -53,7 +53,7 @@ void PythonData::clear ()
 
 
 
-int load (void* server, void* parser)
+int load (void* server)
 {
 	serverInstance = (Server*)server;
 	const char* pathData = serverInstance->getHashedData("PYTHON_PATH");
diff --git a/plugins/src/python_http_handler/python_http_handler.cpp b/plugins/src/python_http_handler/python_http_handler.cpp
index 2850d48..c6b1134 100644
--- a/plugins/src/python_http_handler/python_http_handler.cpp
+++ b/plugins/src/python_http_handler/python_http_handler.cpp
@@ -26,9 +26,6 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 static Server* serverInstance;
 
-
-
-
 #ifdef WIN32
 #define EXPORTABLE(x) x _declspec(dllexport)
 #else
@@ -346,7 +343,7 @@ class HttpObserver : public Multicast<string, void*, int>
 	};
 public:
 
-	virtual int updateMulticast(MulticastRegistry<string, void*, int>* reg, string& msg, void* arg)
+	virtual int updateMulticast (MulticastRegistry<string, void*, int>* reg, string& msg, void* arg)
 	{
 		HttpThreadContext *td = (HttpThreadContext*)arg;
 		ThreadID tid = Thread::threadID();
@@ -376,7 +373,7 @@ public:
 		return threadData.getRet();
 	}
 
-	void addRule(const char* rule, bool file)
+	void addRule (const char* rule, bool file)
 	{
 		Item it;
 		it.data.assign(rule);
@@ -384,7 +381,7 @@ public:
 		rules.push_back(it);
 	}
 
-	void setPythonExecutor(Plugin* python){this->python = python;}
+	void setPythonExecutor (Plugin* python){this->python = python;}
 
 private:
 	list<Item> rules;
@@ -394,7 +391,7 @@ private:
 static HttpObserver observer;
 
 
-EXPORTABLE(char*) name(char* name, u_long len)
+EXPORTABLE(char*) name (char* name, u_long len)
 {
 	char* str = (char*)"python_http_handler";
 	if(name)
@@ -402,7 +399,7 @@ EXPORTABLE(char*) name(char* name, u_long len)
 	return str;
 }
 
-EXPORTABLE(int) load(void* server,void* parser)
+EXPORTABLE(int) load (void* server)
 {
 	serverInstance = (Server*)server;
 	HttpStaticData* staticData =(HttpStaticData*) serverInstance->getGlobalData("http-static");
@@ -474,12 +471,14 @@ EXPORTABLE(int) load(void* server,void* parser)
 
 	return 0;
 }
-EXPORTABLE(int) postLoad(void* server,void* parser)
+
+EXPORTABLE(int) postLoad (void* server)
 {
   return 0;
 }
-EXPORTABLE(int) unLoad(void* parser)
+
+EXPORTABLE(int) unLoad ()
 {
-  mutex.destroy();
+  mutex.destroy ();
   return 0;
 }
diff --git a/plugins/src/rules_checker/rules_checker.cpp b/plugins/src/rules_checker/rules_checker.cpp
index a5a9d45..a5d7f05 100644
--- a/plugins/src/rules_checker/rules_checker.cpp
+++ b/plugins/src/rules_checker/rules_checker.cpp
@@ -85,7 +85,7 @@ private:
 static RulesCheckerObserver observer;
 
 
-EXPORTABLE(char*) name(char* name, u_long len)
+EXPORTABLE(char*) name (char* name, u_long len)
 {
   char* str = (char*)"rules_checker";
   if(name)
@@ -93,7 +93,7 @@ EXPORTABLE(char*) name(char* name, u_long len)
   return str;
 }
 
-EXPORTABLE(int) load(void* server,void* parser)
+EXPORTABLE(int) load (void* server)
 {
   Server* serverInstance = (Server*)server;
   HttpStaticData* staticData =(HttpStaticData*) serverInstance->getGlobalData("http-static");
@@ -135,11 +135,12 @@ EXPORTABLE(int) load(void* server,void* parser)
   return 0;
 }
 
-EXPORTABLE(int) postLoad(void* server,void* parser)
+EXPORTABLE(int) postLoad (void* server)
 {
   return 0;
 }
-EXPORTABLE(int) unLoad(void* parser)
+
+EXPORTABLE(int) unLoad ()
 {
   return 0;
 }

-----------------------------------------------------------------------

Summary of changes:
 plugins/src/php/php.cpp                            |   11 ++++-----
 plugins/src/python/python.cpp                      |    4 +-
 .../python_http_handler/python_http_handler.cpp    |   21 +++++++++----------
 plugins/src/rules_checker/rules_checker.cpp        |    9 ++++---
 4 files changed, 22 insertions(+), 23 deletions(-)


hooks/post-receive
-- 
GNU MyServer



From MAILER-DAEMON Thu Aug 20 09:52:11 2009
Received: from mailman by lists.gnu.org with archive (Exim 4.43)
	id 1Me83n-0007J7-F9
	for mharc-myserver-commit@gnu.org; Thu, 20 Aug 2009 09:52:11 -0400
Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43)
	id 1Me83k-0007IH-KY
	for myserver-commit@gnu.org; Thu, 20 Aug 2009 09:52:08 -0400
Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43)
	id 1Me83j-0007Hk-M1
	for myserver-commit@gnu.org; Thu, 20 Aug 2009 09:52:07 -0400
Received: from [199.232.76.173] (port=39296 helo=monty-python.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43) id 1Me83i-0007HX-Rn
	for myserver-commit@gnu.org; Thu, 20 Aug 2009 09:52:06 -0400
Received: from savannah.gnu.org ([199.232.41.3]:43148 helo=sv.gnu.org)
	by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32)
	(Exim 4.60) (envelope-from <gscrivano@gnu.org>) id 1Me83h-0007t8-Km
	for myserver-commit@gnu.org; Thu, 20 Aug 2009 09:52:06 -0400
Received: from download.savannah.gnu.org ([199.232.41.75]
	helo=cvs.savannah.gnu.org) by sv.gnu.org with esmtp (Exim 4.69)
	(envelope-from <gscrivano@gnu.org>) id 1Me83g-0002Mf-C4
	for myserver-commit@gnu.org; Thu, 20 Aug 2009 13:52:04 +0000
Received: from gscrivano by cvs.savannah.gnu.org with local (Exim 4.69)
	(envelope-from <gscrivano@savannah.gnu.org>) id 1Me83d-0002M6-Dc
	for myserver-commit@gnu.org; Thu, 20 Aug 2009 13:52:04 +0000
To: myserver-commit@gnu.org
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: 21e0a612e723e213010fccbbb29b794a5c55f8f0
X-Git-Newrev: b1465eb76903a8499ccbd53c711e7e4461dfe2c2
Message-Id: <E1Me83d-0002M6-Dc@cvs.savannah.gnu.org>
From: Giuseppe Scrivano <gscrivano@gnu.org>
Date: Thu, 20 Aug 2009 13:52:03 +0000
X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2)
Subject: [myserver-commit] [SCM] GNU MyServer branch, master,
	updated. b1465eb76903a8499ccbd53c711e7e4461dfe2c2
X-BeenThere: myserver-commit@gnu.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: myserver-commit.gnu.org
List-Unsubscribe: <http://lists.gnu.org/mailman/listinfo/myserver-commit>,
	<mailto:myserver-commit-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/pipermail/myserver-commit>
List-Post: <mailto:myserver-commit@gnu.org>
List-Help: <mailto:myserver-commit-request@gnu.org?subject=help>
List-Subscribe: <http://lists.gnu.org/mailman/listinfo/myserver-commit>,
	<mailto:myserver-commit-request@gnu.org?subject=subscribe>
X-List-Received-Date: Thu, 20 Aug 2009 13:52:10 -0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU MyServer".

The branch, master has been updated
       via  b1465eb76903a8499ccbd53c711e7e4461dfe2c2 (commit)
       via  5ba71f91a83d0f9bccbbb5ff0fde2026dbe3928d (commit)
      from  21e0a612e723e213010fccbbb29b794a5c55f8f0 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------


commit b1465eb76903a8499ccbd53c711e7e4461dfe2c2
Author: Giuseppe Scrivano <gscrivano@gnu.org>
Date:   Thu Aug 20 15:50:06 2009 +0200

    Removed global getOSVersion() function.

diff --git a/myserver/include/base/utility.h b/myserver/include/base/utility.h
index 6b8b7c9..a6f22bc 100644
--- a/myserver/include/base/utility.h
+++ b/myserver/include/base/utility.h
@@ -29,31 +29,21 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 using namespace std;
 
-/*!
-*Macros to do simple transformations.
-*/
-#define MYSERVER_KB(x) (x << 10)       //x * 1024
-#define MYSERVER_MB(x) (x << 20)       //x * 1024 * 1024
+#define MYSERVER_KB(x) (x << 10)
+#define MYSERVER_MB(x) (x << 20)
 #define MYSERVER_SEC(x) (x * 1000)
-#define OS_WINDOWS_9X      1
-#define OS_WINDOWS_2000    2
-#define OS_WINDOWS_NT3     3
-#define OS_WINDOWS_XP      4
-#define OS_GNU_LINUX       100
-#define OS_FREEBSD         200
-
-int preparePrintError();
-int endPrintError();
-
-int getOSVersion();
-u_long getCPUCount();
-u_long getTicks();
-int setcwdBuffer();
-int getdefaultwdlen();
-char *getdefaultwd(char* dwd,int maxlen);
-int getdefaultwd(string&);
-int setcwd(const char * cwd);
-int freecwdBuffer();
+
+int preparePrintError ();
+int endPrintError ();
+
+u_long getCPUCount ();
+u_long getTicks ();
+int setcwdBuffer ();
+int getdefaultwdlen ();
+char *getdefaultwd (char* dwd,int maxlen);
+int getdefaultwd (string&);
+int setcwd (const char * cwd);
+int freecwdBuffer ();
 
 int readFileHandle (SocketHandle s, Handle* fd);
 int writeFileHandle (SocketHandle s, Handle fd);
diff --git a/myserver/src/base/utility.cpp b/myserver/src/base/utility.cpp
index 0608dc7..f28f896 100644
--- a/myserver/src/base/utility.cpp
+++ b/myserver/src/base/utility.cpp
@@ -20,89 +20,42 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #include <include/base/utility.h>
 #include <include/base/string/securestr.h>
 
-extern "C" {
+extern "C"
+{
 #include <string.h>
 #include <stdlib.h>
 #include <stdio.h>
+
 #ifndef WIN32
-#include <unistd.h>
-#include <signal.h>
-#include <sys/types.h>
-#include <sys/wait.h>
-#include <sys/time.h>
-#ifdef ERRORH
-#include <error.h>
-#endif
-#include <errno.h>
+# include <unistd.h>
+# include <signal.h>
+# include <sys/types.h>
+# include <sys/wait.h>
+# include <sys/time.h>
+# include <errno.h>
+
+# ifdef ERRORH
+#  include <error.h>
+# endif
 #endif
 }
 
 #ifdef WIN32
-#include <direct.h>
+# include <direct.h>
 #endif
 
 #include <iostream>
 using namespace std;
 
 /*
- *Various utility functions.
+ * Various utility functions.
  */
 static char *currentPath = 0;
 
 /*!
- *Returns the version of the operating system.
- *Return 0 if it is not recognized.
- */
-int getOSVersion()
-{
-  int ret = 0;
-  /*!
-   *This is the code for the win32 platform.
-   */
-#ifdef WIN32
-  OSVERSIONINFO osvi;
-  osvi.dwOSVersionInfoSize = sizeof(osvi);
-  ret = GetVersionEx(&osvi);
-  if(!ret)
-    return 0;  
-  switch(osvi.dwMinorVersion)
-  {
-  case 0:
-    if(osvi.dwPlatformId == VER_PLATFORM_WIN32_WINDOWS)
-      ret = OS_WINDOWS_9X;
-    else
-      ret = OS_WINDOWS_2000;
-    break;
-  case 10:
-    ret = OS_WINDOWS_9X;
-    break;  
-  case 90:
-    ret = OS_WINDOWS_9X;
-    break;
-  case 51:
-    ret = OS_WINDOWS_NT3;
-    break;
-  case 1:
-    ret = OS_WINDOWS_XP;
-    break;
-  }
-#endif
-
-#ifdef __linux__
-  ret = OS_GNU_LINUX;
-#endif
-
-#ifdef __FreeBSD__
-  ret = OS_FREEBSD;
-#endif
-
-  return ret;
-}  
-
-/*!
- *Returns the number of processors available on the local machine.
+ * Returns the number of processors available on the local machine.
  */
-u_long getCPUCount()
+u_long getCPUCount ()
 {
   /*! By default use 1 processor.  */
   u_long ret = 1;
@@ -113,7 +66,7 @@ u_long getCPUCount()
 #endif
 
 #ifdef _SC_NPROCESSORS_CONF
-  ret = (u_long)sysconf(_SC_NPROCESSORS_CONF); 
+  ret = (u_long)sysconf(_SC_NPROCESSORS_CONF);
   /*! Use only a processor if some error happens.  */
   if(ret == (u_long)-1)
     ret = 1;
@@ -139,14 +92,14 @@ u_long getCPUCount()
 }
 
 /*!
- *Save the current working directory.
- *Return -1 on fails.
- *Return 0 on success.
+ * Save the current working directory.
+ * Return -1 on fails.
+ * Return 0 on success.
  */
-int setcwdBuffer()
+int setcwdBuffer ()
 {
 #ifdef WIN32
-  /*! Under windows there is MAX_PATH, we will use it.  */
+  /* Under windows there is MAX_PATH, we will use it.  */
   currentPath = new char [MAX_PATH];
   if(currentPath == 0)
     return (-1);
@@ -166,7 +119,7 @@ int setcwdBuffer()
 #endif
 
 #ifdef __OpenBSD__
-  currentPath = getcwd(0, 0);
+  currentPath = getcwd (0, 0);
   return currentPath ? 0 : 1;
 #endif
 
@@ -178,55 +131,56 @@ int setcwdBuffer()
   {
     /*! Allocation problem is up.  */
     if(currentPath == 0)
-    {
-      return (-1);
-    }
-    ret = getcwd(currentPath, size);
-    /*! Realloc the buffer if it cannot contain the current directory.  */
+      return -1;
+
+    ret = getcwd (currentPath, size);
+    /* Realloc the buffer if it cannot contain the current directory.  */
     if(ret == 0)
-    {
-      size *= 2;
-      delete [] currentPath;
-      currentPath = new char[size];
-    }
-  }while( (ret == 0) && (errno == ERANGE) );
-  if(currentPath[strlen(currentPath)] == '/') 
+      {
+        size *= 2;
+        delete [] currentPath;
+        currentPath = new char[size];
+      }
+  }
+  while((ret == 0) && (errno == ERANGE));
+
+  if(currentPath[strlen(currentPath)] == '/')
     currentPath[strlen(currentPath)] = '\0';
   return 0;
 #endif
 }
 
 /*!
- *Get the defult directory using a string as output.
- *Return 0 on success.
- *\param out The string where write.
+ * Get the defult directory using a string as output.
+ * Return 0 on success.
+ * \param out The string where write.
  */
-int getdefaultwd(string& out)
+int getdefaultwd (string& out)
 {
-  char *wd = getdefaultwd(0, 0);
+  char *wd = getdefaultwd (NULL, NULL);
 
-  if(wd == 0)
+  if (wd == 0)
     return -1;
 
-  out.assign(wd);
+  out.assign (wd);
   return 0;
 }
 
 /*!
- *free the cwd buffer.
+ * Free the cwd buffer.
  */
 int freecwdBuffer()
 {
   delete [] currentPath;
-  return 0;  
+  return 0;
 }
 
 /*!
  *Get the default working directory length.
  */
-int getdefaultwdlen()
+int getdefaultwdlen ()
 {
-  return strlen(currentPath) + 1;
+  return strlen (currentPath) + 1;
 }
 
 /*!
@@ -234,96 +188,96 @@ int getdefaultwdlen()
  *\param path The buffer where write.
  *\param len The length of the buffer.
  */
-char *getdefaultwd(char *path, int len)
+char *getdefaultwd (char *path, int len)
 {
-
-  if(path)
-  {
-    /*! If len is equal to zero we assume no limit.  */
-    if(len)
-      myserver_strlcpy(path, currentPath, len);
-    else
-      strcpy(path, currentPath);
-  }
+  if (path)
+    {
+    /* If len is equal to zero we assume no limit.  */
+      if (len)
+        myserver_strlcpy(path, currentPath, len);
+      else
+        strcpy(path, currentPath);
+    }
   return currentPath;
 }
 
-
 /*!
- *Set the current working directory. Returns Zero if successful.
- *\param dir The current working directory.
+ * Set the current working directory. Returns Zero if successful.
+ * \param dir The current working directory.
  */
-int setcwd(const char *dir)
+int setcwd (const char *dir)
 {
-#ifdef WIN32  
+#ifdef WIN32
   return _chdir(dir);
 #endif
+
 #ifndef WIN32
   return chdir(dir);
 #endif
 }
 
 /*!
- *Set the text color to red on black.
- *Return 0 on success.
+ * Set the text color to red on black.
+ * Return 0 on success.
  */
-int preparePrintError()
+int preparePrintError ()
 {
-#ifdef WIN32
-  int ret = SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), 
-                                    FOREGROUND_RED | 
-                                    FOREGROUND_INTENSITY);
-  if(ret)
-    return 0;
-#endif
 #ifndef WIN32
   cout << "\033[31;1m";
   return 0;
+#else
+  int ret = SetConsoleTextAttribute (GetStdHandle (STD_OUTPUT_HANDLE),
+                                     FOREGROUND_RED | FOREGROUND_INTENSITY);
+  if (ret)
+    return 0;
 #endif
 
+  return -1;
 }
 
 /*!
- *Set the text color to white on black.
- *Return 0 on success.
+ * Set the text color to white on black.
+ * Return 0 on success.
  */
-int endPrintError()
+int endPrintError ()
 {
-#ifdef WIN32
-  int ret = SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), 
-                                    FOREGROUND_RED | 
-                                    FOREGROUND_GREEN | 
-                                    FOREGROUND_BLUE);
-  if(ret)
-    return 0;
-#else
+#ifndef WIN32
   cout << "\033[0m";
   return 0;
+#else
+  int ret = SetConsoleTextAttribute (GetStdHandle (STD_OUTPUT_HANDLE),
+                                     FOREGROUND_RED |
+                                     FOREGROUND_GREEN |
+                                     FOREGROUND_BLUE);
+  if (ret)
+    return 0;
 #endif
+
+  return -1;
 }
 
 /*!
- *Return the ticks count. Used to check time variations.
- *Return 0 on errors.
+ * Return the ticks count in milliseconds.
+ * Return 0 on errors.
  */
-u_long getTicks()
+u_long getTicks ()
 {
 #ifdef WIN32
-  return GetTickCount();
+  return GetTickCount ();
 #else
   struct timeval tval;
-  int ret = gettimeofday(&tval, 0);
-  if(ret == -1)
+  int ret = gettimeofday (&tval, 0);
+  if (ret == -1)
     return 0;
   return  (tval.tv_sec * 1000) + (tval.tv_usec / 1000);
 #endif
 }
 
 /*!
- *Read a file handle from a socket.
- *\param s Socket handle to read from.
- *\param File handle received.
- *\return 0 on success.
+ * Read a file handle from a socket.
+ * \param s Socket handle to read from.
+ * \param File handle received.
+ * \return 0 on success.
  */
 int readFileHandle (SocketHandle s, Handle* fd)
 {
@@ -356,10 +310,10 @@ int readFileHandle (SocketHandle s, Handle* fd)
 }
 
 /*!
- *Write a file handle to a socket.
- *\param s Socket handle to write to.
- *\param File handle received.
- *\return 0 on success.
+ * Write a file handle to a socket.
+ * \param s Socket handle to write to.
+ * \param File handle received.
+ * \return 0 on success.
  */
 int writeFileHandle (SocketHandle s, Handle fd)
 {
diff --git a/myserver/tests/test_utility.cpp b/myserver/tests/test_utility.cpp
index 80ab962..ff22f77 100644
--- a/myserver/tests/test_utility.cpp
+++ b/myserver/tests/test_utility.cpp
@@ -1,16 +1,16 @@
 /*
  MyServer
- Copyright (C) 2008 Free Software Foundation, Inc.
+ Copyright (C) 2008, 2009 Free Software Foundation, Inc.
  This program 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 3 of the License, or
  (at your option) any later version.
- 
- This program is distributed in the hope that it will be useful, 
+
+ This program is distributed in the hope that it will be useful,
  but WITHOUT ANY WARRANTY; without even the implied warranty of
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  GNU General Public License for more details.
- 
+
  You should have received a copy of the GNU General Public License
  along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
@@ -32,14 +32,13 @@ class TestUtility : public CppUnit::TestFixture
 {
   CPPUNIT_TEST_SUITE( TestUtility );
   CPPUNIT_TEST( testGetTicks );
-  CPPUNIT_TEST( testGetOsVersion );
   CPPUNIT_TEST( testCWD );
   CPPUNIT_TEST_SUITE_END();
 
 public:
   void setUp()
   {
- 
+
   }
 
   void tearDown()
@@ -59,12 +58,6 @@ public:
     CPPUNIT_ASSERT(ticks2 > ticks);
   }
 
-  void testGetOsVersion()
-  {
-    CPPUNIT_ASSERT(getOSVersion() >= 0);
-  }
-
-
   void testGetCPUCount()
   {
     CPPUNIT_ASSERT(getCPUCount() > 0);
@@ -96,7 +89,7 @@ public:
     CPPUNIT_ASSERT_EQUAL(ret, 0);
 
     CPPUNIT_ASSERT(strBuff.length() > 0);
-    
+
 
 
     freecwdBuffer();



commit 5ba71f91a83d0f9bccbbb5ff0fde2026dbe3928d
Author: Giuseppe Scrivano <gscrivano@gnu.org>
Date:   Thu Aug 20 15:34:50 2009 +0200

    Add notice that the localedir.h file is auto-generated.

diff --git a/myserver/Makefile.am b/myserver/Makefile.am
index 1d37779..f7579dd 100644
--- a/myserver/Makefile.am
+++ b/myserver/Makefile.am
@@ -20,7 +20,8 @@ ACLOCAL_AMFLAGS = -I m4
 
 
 localedir.h: Makefile
-	echo '#define LOCALEDIR "$(localedir)"' >$@
+	echo '/* This file is auto-generated by Makefile!  */' >$@
+	echo '#define LOCALEDIR "$(localedir)"' >> $@
 
 all: localedir.h
 # Generate the localedir.h file before any other rule.

-----------------------------------------------------------------------

Summary of changes:
 myserver/Makefile.am            |    3 +-
 myserver/include/base/utility.h |   38 +++----
 myserver/src/base/utility.cpp   |  242 ++++++++++++++++-----------------------
 myserver/tests/test_utility.cpp |   19 +--
 4 files changed, 120 insertions(+), 182 deletions(-)


hooks/post-receive
-- 
GNU MyServer



From MAILER-DAEMON Thu Aug 20 16:03:44 2009
Received: from mailman by lists.gnu.org with archive (Exim 4.43)
	id 1MeDrM-0003R3-Hb
	for mharc-myserver-commit@gnu.org; Thu, 20 Aug 2009 16:03:44 -0400
Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43)
	id 1MeDrL-0003Qf-Aw
	for myserver-commit@gnu.org; Thu, 20 Aug 2009 16:03:43 -0400
Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43)
	id 1MeDrJ-0003QH-Gl
	for myserver-commit@gnu.org; Thu, 20 Aug 2009 16:03:43 -0400
Received: from [199.232.76.173] (port=59121 helo=monty-python.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43) id 1MeDrJ-0003QA-8T
	for myserver-commit@gnu.org; Thu, 20 Aug 2009 16:03:41 -0400
Received: from savannah.gnu.org ([199.232.41.3]:38410 helo=sv.gnu.org)
	by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32)
	(Exim 4.60) (envelope-from <gscrivano@gnu.org>) id 1MeDrH-0005J6-3s
	for myserver-commit@gnu.org; Thu, 20 Aug 2009 16:03:39 -0400
Received: from download.savannah.gnu.org ([199.232.41.75]
	helo=cvs.savannah.gnu.org) by sv.gnu.org with esmtp (Exim 4.69)
	(envelope-from <gscrivano@gnu.org>) id 1MeDrF-0004qt-VL
	for myserver-commit@gnu.org; Thu, 20 Aug 2009 20:03:38 +0000
Received: from gscrivano by cvs.savannah.gnu.org with local (Exim 4.69)
	(envelope-from <gscrivano@savannah.gnu.org>) id 1MeDrA-0004q5-GV
	for myserver-commit@gnu.org; Thu, 20 Aug 2009 20:03:37 +0000
To: myserver-commit@gnu.org
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: b1465eb76903a8499ccbd53c711e7e4461dfe2c2
X-Git-Newrev: 6bc604a42ff4baae96d50ab9a69f1bd9fab65be2
Message-Id: <E1MeDrA-0004q5-GV@cvs.savannah.gnu.org>
From: Giuseppe Scrivano <gscrivano@gnu.org>
Date: Thu, 20 Aug 2009 20:03:34 +0000
X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2)
Subject: [myserver-commit] [SCM] GNU MyServer branch, master,
	updated. 6bc604a42ff4baae96d50ab9a69f1bd9fab65be2
X-BeenThere: myserver-commit@gnu.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: myserver-commit.gnu.org
List-Unsubscribe: <http://lists.gnu.org/mailman/listinfo/myserver-commit>,
	<mailto:myserver-commit-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/pipermail/myserver-commit>
List-Post: <mailto:myserver-commit@gnu.org>
List-Help: <mailto:myserver-commit-request@gnu.org?subject=help>
List-Subscribe: <http://lists.gnu.org/mailman/listinfo/myserver-commit>,
	<mailto:myserver-commit-request@gnu.org?subject=subscribe>
X-List-Received-Date: Thu, 20 Aug 2009 20:03:43 -0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU MyServer".

The branch, master has been updated
       via  6bc604a42ff4baae96d50ab9a69f1bd9fab65be2 (commit)
       via  21c90b54dd09a03173e26d4777f156cd4e6496a4 (commit)
       via  601ef5ff695ba2f17e6af0aef1373b3a0838aab0 (commit)
       via  467202faae38a843a0de650684f41929e32c3e2d (commit)
       via  be666de939f6e5c037f0ae4a392f17bf2684a636 (commit)
      from  b1465eb76903a8499ccbd53c711e7e4461dfe2c2 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------


commit 6bc604a42ff4baae96d50ab9a69f1bd9fab65be2
Author: Giuseppe Scrivano <gscrivano@gnu.org>
Date:   Thu Aug 20 21:59:59 2009 +0200

    New plugin MIME magic.

diff --git a/plugins/src/mime_magic/README b/plugins/src/mime_magic/README
index 8b13789..48dcb2f 100755
--- a/plugins/src/mime_magic/README
+++ b/plugins/src/mime_magic/README
@@ -1 +1,5 @@
+This plugin makes possible to use libmagic to find a file MIME type.
+
+To use it, define such line in myserver.xml or in a virtual host:
+  <DEFINE name="mime.handler" value="mime_magic" />
 
diff --git a/plugins/src/mime_magic/SConscript b/plugins/src/mime_magic/SConscript
index 1110464..5ef5a78 100755
--- a/plugins/src/mime_magic/SConscript
+++ b/plugins/src/mime_magic/SConscript
@@ -6,8 +6,6 @@ local_listinc=[
       '../../../',
       '/usr/local/include',
       '/usr/include/',
-      '/usr/include/python2.5',
-      '/usr/local/include/python2.5',
       '/usr/local/include/libxml2',
       '/usr/include/libxml2',
       '.'
@@ -19,11 +17,16 @@ env = Environment(CPPPATH=local_listinc)
 
 conf = Configure(env, config_h="config.h")
 
-if conf.CheckHeader("magic.h"):
-    conf.Define('PYTHON', 1)
+
+if conf.CheckLib("magic") and conf.CheckHeader("magic.h"):
+    conf.Define('MAGIC', 1)
+else:
+    print "Cannot find the library magic"
+    raise
+
 
 env = conf.Finish()
 
-env.SharedLibrary(GetLaunchDir() + "/" + dest_dir + "/mime_magic.cpp", ["mime_magic.cpp" ], SHLIBPREFIX="")
+env.SharedLibrary(GetLaunchDir() + "/" + dest_dir + "/mime_magic", ["mime_magic.cpp" ], SHLIBPREFIX="")
 
 Command(GetLaunchDir() + "/" + dest_dir + "/README","README", Copy("$TARGET", "$SOURCE"))
diff --git a/plugins/src/mime_magic/mime_magic.cpp b/plugins/src/mime_magic/mime_magic.cpp
index f5d9342..3a2a155 100755
--- a/plugins/src/mime_magic/mime_magic.cpp
+++ b/plugins/src/mime_magic/mime_magic.cpp
@@ -14,6 +14,7 @@ GNU General Public License for more details.
 You should have received a copy of the GNU General Public License
 along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
+
 #include <stdafx.h>
 #include <string.h>
 #include <include/server/server.h>
@@ -38,7 +39,13 @@ class MagicHandler : public MimeManagerHandler
 public:
   MagicHandler ()
   {
-    cookie = magic_open (MAGIC_SYMLINK); 
+
+  }
+
+  int load ()
+  {
+    cookie = magic_open (MAGIC_SYMLINK | MAGIC_MIME_TYPE);
+    return magic_load (cookie, NULL);
   }
 
   virtual ~MagicHandler ()
@@ -50,23 +57,25 @@ public:
     magic_close (cookie);
   }
 
-	virtual MimeRecord* getMIME (const char *file)
+	virtual MimeRecord *getMIME (const char *file)
   {
     MimeRecord *rec = NULL;
     lock.lock ();
     try
       {
-        /* FIXME: is reentrant and can be moved outside of the critical
-         * section?  */
+        /* FIXME: is this line reentrant and can be moved outside of the
+         * critical section?  */
         const char *type = magic_file (cookie, file);
-        rec = records.get (type);
-        if (!rec)
+        if (type)
           {
-            rec = new MimeRecord;
-            rec->mimeType.assign (type);
-            records.put (type, rec);
+            rec = records.get (type);
+            if (!rec)
+              {
+                rec = new MimeRecord;
+                rec->mimeType.assign (type);
+                records.put (rec->mimeType, rec);
+              }
           }
-
       }
     catch (...)
       {
@@ -87,7 +96,7 @@ private:
 
 EXPORTABLE(char*) name (char* name, u_long len)
 {
-	char* str = (char*)"mime_magic";
+	char* str = (char*) "mime_magic";
 	if (name)
 		strncpy (name, str, len);
 	return str;
@@ -95,23 +104,29 @@ EXPORTABLE(char*) name (char* name, u_long len)
 
 EXPORTABLE(int) load (void* server)
 {
-  string name ("magic");
+	return 0;
+}
+
+EXPORTABLE(int) postLoad(void* server)
+{
+  string name ("mime_magic");
 	Server* serverInstance = (Server*)server;
   MimeManager *mimeManager = serverInstance->getMimeManager ();
 
-  MagicHandler handler = new MagicHandler;
+  MagicHandler *handler = new MagicHandler;
+  if (handler->load ())
+    {
+      serverInstance->logWriteln (MYSERVER_LOG_MSG_ERROR,
+                                  _("cannot load mime magic configuration"));
+      return 1;
+    }
 
   mimeManager->registerHandler (name, handler);
 
 	return 0;
 }
 
-EXPORTABLE(int) postLoad(void* server,void* parser)
-{
-	return 0;
-}
-
-EXPORTABLE(int) unLoad(void* parser)
+EXPORTABLE(int) unLoad()
 {
 	return 0;
 }
diff --git a/plugins/src/mime_magic/plugin.xml b/plugins/src/mime_magic/plugin.xml
index f639ad9..9b6c606 100755
--- a/plugins/src/mime_magic/plugin.xml
+++ b/plugins/src/mime_magic/plugin.xml
@@ -1,9 +1,9 @@
 <?xml version="1.0"?>
 
-<PLUGIN>
-<NAME>mime_magic</NAME>
-<VERSION>0.1</VERSION>
-<AUTHOR>The Free Software Foundation Inc.</AUTHOR>
-<MAINTAINER>The Free Software Foundation Inc.</MAINTAINER>
-<DESCRIPTION>This plugin permits to check MIME types using the libmagic library</DESCRIPTION>
+<PLUGIN min-version="0.9" max-version="0.9">
+	<NAME>mime_magic</NAME>
+	<VERSION>0.1</VERSION>
+	<AUTHOR>The Free Software Foundation Inc.</AUTHOR>
+	<MAINTAINER>The Free Software Foundation Inc.</MAINTAINER>
+	<DESCRIPTION>This plugin permits to check MIME types using the libmagic library</DESCRIPTION>
 </PLUGIN>



commit 21c90b54dd09a03173e26d4777f156cd4e6496a4
Author: Giuseppe Scrivano <gscrivano@gnu.org>
Date:   Thu Aug 20 21:50:18 2009 +0200

    Delegate the function using the desired handler, not NULL.

diff --git a/myserver/src/conf/mime/mime_manager.cpp b/myserver/src/conf/mime/mime_manager.cpp
index e1c1b72..a83e149 100644
--- a/myserver/src/conf/mime/mime_manager.cpp
+++ b/myserver/src/conf/mime/mime_manager.cpp
@@ -402,7 +402,7 @@ void MimeManager::clearRecords ()
  */
 MimeRecord *MimeManager::getMIME (string const &filename, const char *handler)
 {
-  return getMIME (filename.c_str ());
+  return getMIME (filename.c_str (), handler);
 }
 
 /*!
@@ -416,7 +416,6 @@ MimeRecord *MimeManager::getMIME (const char *filename, const char *handler)
   string ext;
   u_long pos = 0;
 
-
   for (list<PathRegex*>::iterator it = pathRegex.begin ();
        it != pathRegex.end ();
        it++)
diff --git a/plugins/src/mime_magic/.svn/dir-prop-base b/plugins/src/mime_magic/.svn/dir-prop-base
new file mode 100755
index 0000000..3160658
--- /dev/null
+++ b/plugins/src/mime_magic/.svn/dir-prop-base
@@ -0,0 +1,5 @@
+K 13
+svn:mergeinfo
+V 0
+
+END
diff --git a/plugins/src/mime_magic/.svn/entries b/plugins/src/mime_magic/.svn/entries
new file mode 100755
index 0000000..c0889e9
--- /dev/null
+++ b/plugins/src/mime_magic/.svn/entries
@@ -0,0 +1,198 @@
+9
+
+dir
+2915
+svn+ssh://svn.savannah.gnu.org/myserver/trunk/plugins/src/http_checker
+svn+ssh://svn.savannah.gnu.org/myserver
+
+
+
+2008-10-26T19:37:37.786994Z
+2913
+dperrone
+has-props
+
+svn:special svn:externals svn:needs-lock
+
+
+
+
+
+
+
+
+
+
+
+c4c922ea-a70d-0410-937d-ec1daf91936c
+
+http_rules_sample.py
+file
+
+
+
+
+2008-10-26T19:53:56.000000Z
+e61d209f6980c329e3795139269735c4
+2007-06-27T17:27:50.877877Z
+2361
+rocky_10_balboa
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+178
+
+http_checker.cpp
+file
+
+
+
+
+2008-10-26T19:53:56.000000Z
+4e6fa7755d56cc869aca2ecbc983fe6d
+2008-10-26T19:37:37.786994Z
+2913
+dperrone
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+8318
+
+SConscript
+file
+
+
+
+
+2008-10-26T19:53:56.000000Z
+7af7e7f0ecaf27a4f285cb25693802b7
+2008-10-26T19:37:37.786994Z
+2913
+dperrone
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+833
+
+README
+file
+
+
+
+
+2008-10-26T19:53:56.000000Z
+c183d3026fc5de262d58657ce90a4dd2
+2007-06-27T17:27:50.877877Z
+2361
+rocky_10_balboa
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+1093
+
+plugin.xml
+file
+
+
+
+
+2008-10-26T19:53:56.000000Z
+12098a0843a40122c30920847a26d14f
+2008-10-26T19:37:37.786994Z
+2913
+dperrone
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+313
+
diff --git a/plugins/src/mime_magic/.svn/format b/plugins/src/mime_magic/.svn/format
new file mode 100755
index 0000000..ec63514
--- /dev/null
+++ b/plugins/src/mime_magic/.svn/format
@@ -0,0 +1 @@
+9
diff --git a/plugins/src/mime_magic/.svn/text-base/README.svn-base b/plugins/src/mime_magic/.svn/text-base/README.svn-base
new file mode 100755
index 0000000..b68b7dc
--- /dev/null
+++ b/plugins/src/mime_magic/.svn/text-base/README.svn-base
@@ -0,0 +1,40 @@
+A HTTP checker rule is added trough the main myserver.xml
+configuration file, a rule is a python script to execute on every HTTP
+request, for example this rule denies any access if the client
+used the host localhost:8080 to connect to the server.
+
+This plugin needs the executors/python plugin to be installed too.
+
+<HTTP_CHECKER_RULE>
+<![CDATA[
+from http_checker import get_header
+from http_checker import raise_error
+
+if get_header('Host') == "localhost:8080":
+	raise_error(401)
+]]>
+</HTTP_CHECKER_RULE>
+
+If the rules are complicated then it is possible to use an external
+python file to execute:
+
+<HTTP_CHECKER_RULE file="http_rules_sample.py" />
+
+
+Functions in the http_checker module:
+
+get_remote_port() - Get the client TCP port.
+
+get_local_port() - Get the local TCP port.
+
+get_remote_addr() - Get the remote IP address.
+
+get_local_addr() - Get the local IP address.
+
+set_header(header, value) - Set HTTP header field value.
+
+get_header(header) - Get HTTP header field value.
+
+send_redirect(page) - Send a redirect to another location.
+
+raise_error(error_code) - Raise HTTP error page.
diff --git a/plugins/src/mime_magic/.svn/text-base/SConscript.svn-base b/plugins/src/mime_magic/.svn/text-base/SConscript.svn-base
new file mode 100755
index 0000000..d63c425
--- /dev/null
+++ b/plugins/src/mime_magic/.svn/text-base/SConscript.svn-base
@@ -0,0 +1,30 @@
+#-*- mode: python -*-
+Import('dest_dir','listinc')
+
+local_listinc=[
+      GetLaunchDir(),
+      '../../../',
+      '/usr/local/include',
+      '/usr/include/',
+      '/usr/include/python2.5',
+      '/usr/local/include/python2.5',
+      '/usr/local/include/libxml2',
+      '/usr/include/libxml2',
+      '.'
+      ]
+
+local_listinc.extend(listinc)
+
+env = Environment(CPPPATH=local_listinc)
+
+conf = Configure(env, config_h="config.h")
+
+if conf.CheckHeader("Python.h"):
+    conf.Define('PYTHON', 1)
+
+env = conf.Finish()
+
+env.SharedLibrary(GetLaunchDir() + "/" + dest_dir + "/http_checker", ["http_checker.cpp" ], SHLIBPREFIX="")
+
+Command(GetLaunchDir() + "/" + dest_dir + "/README","README", Copy("$TARGET", "$SOURCE"))
+Command(GetLaunchDir() + "/" + dest_dir + "/http_rules_sample.py","http_rules_sample.py", Copy("$TARGET", "$SOURCE"))
diff --git a/plugins/src/mime_magic/.svn/text-base/http_checker.cpp.svn-base b/plugins/src/mime_magic/.svn/text-base/http_checker.cpp.svn-base
new file mode 100755
index 0000000..8c5a166
--- /dev/null
+++ b/plugins/src/mime_magic/.svn/text-base/http_checker.cpp.svn-base
@@ -0,0 +1,326 @@
+/*
+MyServer
+Copyright (C) 2007 The Free Software Foundation Inc.
+This program 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 3 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program.  If not, see <http://www.gnu.org/licenses/>.
+*/
+#include <stdafx.h>
+#include <string.h>
+#include <include/server/server.h>
+#include <include/base/multicast/multicast.h>
+#include <include/protocol/http/http.h>
+#include <include/plugin/plugin.h>
+#include <Python.h>
+
+#ifdef WIN32
+#define EXPORTABLE(x) x _declspec(dllexport)
+#else
+#define EXPORTABLE(x) extern "C" x
+#endif
+
+typedef int (*executePROC)(char*, u_long);
+typedef int (*executeFromFilePROC)(char*);
+
+
+struct ThreadData
+{
+	HttpThreadContext* td;
+	int ret;
+};
+
+static HashMap<ThreadID, ThreadData*> pythonThreadData;
+static Mutex mutex;
+
+typedef int (*INIT_MODULE)(char* name, PyMethodDef methods[]);
+static INIT_MODULE init;
+
+
+static ThreadData* getThreadData()
+{
+	ThreadID tid = Thread::threadID();
+	ThreadData* ret;
+	mutex.lock();
+	ret = pythonThreadData.get(tid);
+	mutex.unlock();
+	return ret;
+}
+
+static HttpThreadContext* getThreadContext()
+{
+	return getThreadData()->td;
+}
+
+static PyObject *get_remote_addr(PyObject *self, PyObject *args)
+{
+	HttpThreadContext* context = getThreadContext();
+		return Py_BuildValue((char*)"s", context->connection->getIpAddr());
+}
+
+static PyObject *get_remote_port(PyObject *self, PyObject *args)
+{
+	HttpThreadContext* context = getThreadContext();
+		return Py_BuildValue((char*)"i", context->connection->getPort());
+}
+
+static PyObject *get_local_addr(PyObject *self, PyObject *args)
+{
+	HttpThreadContext* context = getThreadContext();
+		return Py_BuildValue((char*)"s", context->connection->getLocalIpAddr());
+}
+
+static PyObject *get_local_port(PyObject *self, PyObject *args)
+{
+	HttpThreadContext* context = getThreadContext();
+		return Py_BuildValue((char*)"i", context->connection->getLocalPort());
+}
+
+
+static PyObject *get_header(PyObject *self, PyObject *args)
+{
+	char *header;
+	string value;
+	if (!PyArg_ParseTuple(args, (char*)"s", &header))
+		return NULL;
+
+	HttpThreadContext* context = getThreadContext();
+
+	context->request.getValue(header, &value);
+
+	return Py_BuildValue((char*)"s", value.c_str());
+}
+
+static PyObject *set_header(PyObject *self, PyObject *args)
+{
+	char *header;
+	char *value;
+	const char* ret;
+	if (!PyArg_ParseTuple(args, (char*)"ss", &header, &value))
+		return NULL;
+
+	HttpThreadContext* context = getThreadContext();
+
+	ret = context->request.setValue(header, value)->c_str();
+
+	return Py_BuildValue((char*)"s", ret);
+}
+
+static PyObject *raise_error(PyObject *self, PyObject *args)
+{
+	int error;
+	if (!PyArg_ParseTuple(args, (char*)"i", &error))
+		return NULL;
+
+	ThreadData* data = getThreadData();
+
+	if(data->ret)
+		return NULL;
+
+	data->td->http->raiseHTTPError(error);
+
+	data->ret = 1;
+
+	return Py_BuildValue((char*)"s", "");
+}
+
+static PyObject *send_redirect(PyObject *self, PyObject *args)
+{
+	char* dest;
+	if (!PyArg_ParseTuple(args, (char*)"s", &dest))
+		return NULL;
+
+	ThreadData* data = getThreadData();
+
+	if(data->ret)
+		return NULL;
+
+	data->td->http->sendHTTPRedirect(dest);
+
+	data->ret = 1;
+
+	return Py_BuildValue((char*)"s", dest);
+}
+
+static PyMethodDef httpCheckerMethods[] = {
+	{(char*)"get_remote_port", get_remote_port, METH_VARARGS, (char*)"Get the remote TCP port"},
+	{(char*)"get_local_port", get_local_port, METH_VARARGS, (char*)"Get the local TCP port"},
+	{(char*)"get_remote_addr", get_remote_addr, METH_VARARGS, (char*)"Get the remote IP address"},
+	{(char*)"get_local_addr", get_local_addr, METH_VARARGS, (char*)"Get the local IP address"},
+	{(char*)"get_header", get_header, METH_VARARGS, (char*)"Get HTTP header field value"},
+	{(char*)"set_header", set_header, METH_VARARGS, (char*)"Set HTTP header field value"},
+	{(char*)"send_redirect", send_redirect, METH_VARARGS, (char*)"Send a redirect to another location"},
+	{(char*)"raise_error", raise_error, METH_VARARGS, (char*)"Raise HTTP error page"},
+	{NULL, NULL, 0, NULL}
+};
+
+
+class HttpObserver : public Multicast<string, void*, int>
+{
+	struct Item
+	{
+		string data;
+		bool file;
+	};
+public:
+
+	virtual int updateMulticast(MulticastRegistry<string, void*, int>* reg, string& msg, void* arg)
+	{
+		HttpThreadContext *td = (HttpThreadContext*)arg;
+		ThreadID tid = Thread::threadID();
+		list<Item>::iterator it;
+		mutex.lock();
+		ThreadData threadData = {td, 0};
+		pythonThreadData.put(tid, &threadData);
+		mutex.unlock();
+
+		init((char*)"http_checker", httpCheckerMethods);
+
+		for(it = rules.begin(); it != rules.end(); it++)
+		{
+			if((*it).file) 
+			{
+				executeFromFilePROC execute = ((executeFromFilePROC)python->getDirectMethod((char*)"executeFromFile"));
+				if (execute)
+				  execute((char*)(*it).data.c_str());
+			}else
+			{
+				executePROC execute = ((executePROC)python->getDirectMethod((char*)"execute"));
+				
+				if (execute)
+				  execute((char*)(*it).data.c_str(), (*it).data.length());
+			}
+		}
+		return threadData.ret;
+	}
+
+	void addRule(const char* rule, bool file)
+	{
+		Item it;
+		it.data.assign(rule);
+		it.file = file;
+		rules.push_back(it);
+	}
+
+	void setPythonExecutor(Plugin* python){this->python = python;}
+
+private:
+	list<Item> rules;
+	Plugin* python;
+};
+
+static HttpObserver observer;
+
+EXPORTABLE(char*) name(char* name, u_long len)
+{
+	char* str = (char*)"http_checker";
+	if(name)
+		strncpy(name, str, len);
+	return str;
+}
+
+EXPORTABLE(int) load(void* server,void* parser)
+{
+	Server* serverInstance = (Server*)server;
+	HttpStaticData* staticData =(HttpStaticData*) serverInstance->getGlobalData("http-static");
+	string msg("new-http-request");
+	string pythonName("python");
+	Plugin* python;
+	XmlParser* configuration;
+	xmlDocPtr xmlDoc;
+	if(!staticData)
+	{
+		serverInstance->logLockAccess();
+		serverInstance->logPreparePrintError();
+		serverInstance->logWriteln("HttpChecker: Invalid HTTP static data");
+		serverInstance->logEndPrintError();
+		serverInstance->logUnlockAccess();
+		return -1;
+	}
+	python = serverInstance->getPluginsManager()->getPlugin(pythonName);
+
+	if(!python)
+	{
+		serverInstance->logLockAccess();
+		serverInstance->logPreparePrintError();
+		serverInstance->logWriteln("HttpChecker: Cannot find executors::python");
+		serverInstance->logEndPrintError();
+		serverInstance->logUnlockAccess();
+		return -1;
+	}
+	observer.setPythonExecutor(python);
+
+	staticData->addMulticast(msg, &observer);
+
+	init = (INIT_MODULE) python->getDirectMethod((char*)"initModule");
+
+	if(!init)
+	{
+		serverInstance->logLockAccess();
+		serverInstance->logPreparePrintError();
+		serverInstance->logWriteln("HttpChecker: Cannot find method initModule in executors::python");
+		serverInstance->logEndPrintError();
+		serverInstance->logUnlockAccess();
+		return -1;
+	}
+	configuration = serverInstance->getConfiguration();
+	xmlDoc = configuration->getDoc();
+
+	for(xmlNodePtr ptr = xmlDoc->children->next->children; ptr; ptr = ptr->next)
+	{
+		if(!xmlStrcmp(ptr->name, (const xmlChar *)"HTTP_CHECKER_RULE"))
+		{
+			bool file = false;
+			xmlAttrPtr properties = ptr->properties;
+			char* data = 0;
+			while(properties)
+			{
+				if(!xmlStrcmp(properties->name, (const xmlChar *)"file"))
+				{
+					if(properties->children && properties->children->content)
+						data = (char*)properties->children->content;
+
+					file = true;
+				}
+				properties = properties->next;
+			}
+
+			if(!file && ptr->children && ptr->children->next && ptr->children->next->content)
+				data = (char*)ptr->children->next->content;
+
+			if(!data)
+			{
+				serverInstance->logLockAccess();
+				serverInstance->logPreparePrintError();
+				serverInstance->logWriteln("HttpChecker: Invalid rule");
+				serverInstance->logEndPrintError();
+				serverInstance->logUnlockAccess();
+				return -1;
+			}
+
+			observer.addRule(data, file);
+		}
+
+	}
+
+	mutex.init();
+
+	return 0;
+}
+EXPORTABLE(int) postLoad(void* server,void* parser)
+{
+	return 0;
+}
+EXPORTABLE(int) unLoad(void* parser)
+{
+	mutex.destroy();
+	return 0;
+}
diff --git a/plugins/src/mime_magic/.svn/text-base/http_rules_sample.py.svn-base b/plugins/src/mime_magic/.svn/text-base/http_rules_sample.py.svn-base
new file mode 100755
index 0000000..dbf5ead
--- /dev/null
+++ b/plugins/src/mime_magic/.svn/text-base/http_rules_sample.py.svn-base
@@ -0,0 +1,6 @@
+from http_checker import *
+
+# This simple rule returns a 404 error page to every request from the
+# host 192.168.0.2.
+if get_remote_addr() == "192.168.0.2":
+    raise_error(404)
diff --git a/plugins/src/mime_magic/.svn/text-base/plugin.xml.svn-base b/plugins/src/mime_magic/.svn/text-base/plugin.xml.svn-base
new file mode 100755
index 0000000..8af05d9
--- /dev/null
+++ b/plugins/src/mime_magic/.svn/text-base/plugin.xml.svn-base
@@ -0,0 +1,10 @@
+<?xml version="1.0"?>
+
+<PLUGIN>
+<NAME>http_checker</NAME>
+<VERSION>0.1</VERSION>
+<AUTHOR>The Free Software Foundation Inc.</AUTHOR>
+<MAINTAINER>The Free Software Foundation Inc.</MAINTAINER>
+<DESCRIPTION>This plugin permits to validate HTTP requests using python</DESCRIPTION>
+<DEPENDS>python</DEPENDS>
+</PLUGIN>
diff --git a/plugins/src/mime_magic/README b/plugins/src/mime_magic/README
new file mode 100755
index 0000000..8b13789
--- /dev/null
+++ b/plugins/src/mime_magic/README
@@ -0,0 +1 @@
+
diff --git a/plugins/src/mime_magic/SConscript b/plugins/src/mime_magic/SConscript
new file mode 100755
index 0000000..1110464
--- /dev/null
+++ b/plugins/src/mime_magic/SConscript
@@ -0,0 +1,29 @@
+#-*- mode: python -*-
+Import('dest_dir','listinc')
+
+local_listinc=[
+      GetLaunchDir(),
+      '../../../',
+      '/usr/local/include',
+      '/usr/include/',
+      '/usr/include/python2.5',
+      '/usr/local/include/python2.5',
+      '/usr/local/include/libxml2',
+      '/usr/include/libxml2',
+      '.'
+      ]
+
+local_listinc.extend(listinc)
+
+env = Environment(CPPPATH=local_listinc)
+
+conf = Configure(env, config_h="config.h")
+
+if conf.CheckHeader("magic.h"):
+    conf.Define('PYTHON', 1)
+
+env = conf.Finish()
+
+env.SharedLibrary(GetLaunchDir() + "/" + dest_dir + "/mime_magic.cpp", ["mime_magic.cpp" ], SHLIBPREFIX="")
+
+Command(GetLaunchDir() + "/" + dest_dir + "/README","README", Copy("$TARGET", "$SOURCE"))
diff --git a/plugins/src/mime_magic/mime_magic.cpp b/plugins/src/mime_magic/mime_magic.cpp
new file mode 100755
index 0000000..f5d9342
--- /dev/null
+++ b/plugins/src/mime_magic/mime_magic.cpp
@@ -0,0 +1,117 @@
+/*
+MyServer
+Copyright (C) 2007, 2009 The Free Software Foundation Inc.
+This program 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 3 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program.  If not, see <http://www.gnu.org/licenses/>.
+*/
+#include <stdafx.h>
+#include <string.h>
+#include <include/server/server.h>
+#include <include/base/multicast/multicast.h>
+#include <include/protocol/http/http.h>
+#include <include/plugin/plugin.h>
+#include <include/conf/mime/mime_manager.h>
+#include <include/base/hash_map/hash_map.h>
+#include <magic.h>
+
+#ifdef WIN32
+#define EXPORTABLE(x) x _declspec(dllexport)
+#else
+#define EXPORTABLE(x) extern "C" x
+#endif
+
+typedef int (*executePROC)(char*, u_long);
+typedef int (*executeFromFilePROC)(char*);
+
+class MagicHandler : public MimeManagerHandler
+{
+public:
+  MagicHandler ()
+  {
+    cookie = magic_open (MAGIC_SYMLINK); 
+  }
+
+  virtual ~MagicHandler ()
+  {
+    HashMap<string, MimeRecord*>::Iterator it = records.begin ();
+    for (; it != records.end (); it++)
+      delete *it;
+
+    magic_close (cookie);
+  }
+
+	virtual MimeRecord* getMIME (const char *file)
+  {
+    MimeRecord *rec = NULL;
+    lock.lock ();
+    try
+      {
+        /* FIXME: is reentrant and can be moved outside of the critical
+         * section?  */
+        const char *type = magic_file (cookie, file);
+        rec = records.get (type);
+        if (!rec)
+          {
+            rec = new MimeRecord;
+            rec->mimeType.assign (type);
+            records.put (type, rec);
+          }
+
+      }
+    catch (...)
+      {
+        lock.unlock ();
+        return NULL;
+      }
+
+    lock.unlock ();
+
+    return rec;
+  }
+
+private:
+  magic_t cookie;
+  Mutex lock;
+  HashMap<string, MimeRecord*> records;
+};
+
+EXPORTABLE(char*) name (char* name, u_long len)
+{
+	char* str = (char*)"mime_magic";
+	if (name)
+		strncpy (name, str, len);
+	return str;
+}
+
+EXPORTABLE(int) load (void* server)
+{
+  string name ("magic");
+	Server* serverInstance = (Server*)server;
+  MimeManager *mimeManager = serverInstance->getMimeManager ();
+
+  MagicHandler handler = new MagicHandler;
+
+  mimeManager->registerHandler (name, handler);
+
+	return 0;
+}
+
+EXPORTABLE(int) postLoad(void* server,void* parser)
+{
+	return 0;
+}
+
+EXPORTABLE(int) unLoad(void* parser)
+{
+	return 0;
+}
diff --git a/plugins/src/mime_magic/plugin.xml b/plugins/src/mime_magic/plugin.xml
new file mode 100755
index 0000000..f639ad9
--- /dev/null
+++ b/plugins/src/mime_magic/plugin.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0"?>
+
+<PLUGIN>
+<NAME>mime_magic</NAME>
+<VERSION>0.1</VERSION>
+<AUTHOR>The Free Software Foundation Inc.</AUTHOR>
+<MAINTAINER>The Free Software Foundation Inc.</MAINTAINER>
+<DESCRIPTION>This plugin permits to check MIME types using the libmagic library</DESCRIPTION>
+</PLUGIN>



commit 601ef5ff695ba2f17e6af0aef1373b3a0838aab0
Author: Giuseppe Scrivano <gscrivano@gnu.org>
Date:   Thu Aug 20 21:49:57 2009 +0200

    Fixed some error messages.

diff --git a/myserver/src/base/dynamic_lib/dynamiclib.cpp b/myserver/src/base/dynamic_lib/dynamiclib.cpp
index da69dcd..7e480f8 100644
--- a/myserver/src/base/dynamic_lib/dynamiclib.cpp
+++ b/myserver/src/base/dynamic_lib/dynamiclib.cpp
@@ -1,6 +1,6 @@
 /*
 MyServer
-Copyright (C) 2005, 2007, 2008 Free Software Foundation, Inc.
+Copyright (C) 2005, 2007, 2008, 2009 Free Software Foundation, Inc.
 This program 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 3 of the License, or
@@ -18,35 +18,36 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #include <include/base/dynamic_lib/dynamiclib.h>
 
 /*!
- *Initialize class internal data.
+ * Initialize class internal data.
  */
-DynamicLibrary::DynamicLibrary()
+DynamicLibrary::DynamicLibrary ()
 {
   handle = 0;
 }
 
 /*!
- *Destroy the object.
+ * Destroy the object.
  */
-DynamicLibrary::~DynamicLibrary()
+DynamicLibrary::~DynamicLibrary ()
 {
-  close();
+  close ();
 }
 
 /*!
- *Load the specified dynamic library. It returns 0 on success.
- *\param filename Name of the file to load.
- *\param globally Set if the library is loaded globally.
+ * Load the specified dynamic library. It returns 0 on success.
+ * \param filename Name of the file to load.
+ * \param globally Set if the library is loaded globally.
  */
-int DynamicLibrary::loadLibrary(const char* filename, int globally)
+int DynamicLibrary::loadLibrary (const char* filename, int globally)
 {
-  fileName.assign(filename);
+  fileName.assign (filename);
 #ifdef WIN32
-  handle = LoadLibrary(filename);
+  handle = LoadLibrary (filename);
 #endif
+
 #ifdef HAVE_DL
   int flag = 0;
-  if(globally)
+  if (globally)
     flag = RTLD_NOW | RTLD_GLOBAL;
   else
     flag = RTLD_LOCAL | RTLD_LAZY;
@@ -55,51 +56,51 @@ int DynamicLibrary::loadLibrary(const char* filename, int globally)
   flag |= RTLD_DEEPBIND;
 #endif
 
-  handle = dlopen(filename, flag);
+  handle = dlopen (filename, flag);
 #endif
   return handle ? 0 : 1;
 }
 
 /*!
- *Get a pointer to the specified function. Returns 0 on errors or 
- *the function address. 
+ *Get a pointer to the specified function. Returns 0 on errors or
+ *the function address.
  *\param fnName Function name to find.
  */
-void* DynamicLibrary::getProc(const char* fnName)
+void* DynamicLibrary::getProc (const char* fnName)
 {
-  if(!handle)
+  if (!handle)
     return 0;
 #ifdef WIN32
-    return (void*) GetProcAddress((HMODULE)handle, fnName); 
+    return (void*) GetProcAddress ((HMODULE)handle, fnName);
 #endif
 #ifdef HAVE_DL
-    return (void*) dlsym(handle, fnName);
+    return (void*) dlsym (handle, fnName);
 #endif
 }
 
 /*!
  *Close the library. Returns 0 on success.
  */
-int DynamicLibrary::close()
+int DynamicLibrary::close ()
 {
   int ret = 1;
-  if(!handle)
+  if (!handle)
     return 1;
 #ifdef WIN32
-    ret = FreeLibrary((HMODULE)handle) ? 0 : 1; 
+    ret = FreeLibrary ((HMODULE)handle) ? 0 : 1;
 #endif
 #ifdef HAVE_DL
-    ret = dlclose(handle);
+    ret = dlclose (handle);
 #endif
     handle = 0;
-    fileName.assign("");
+    fileName.assign ("");
     return ret;
 }
 
 /*!
- *Return if the object has a valid handle.
+ * Return if the object has a valid handle.
  */
-int DynamicLibrary::validHandle()
+int DynamicLibrary::validHandle ()
 {
   return handle ? 1 : 0;
 }
diff --git a/myserver/src/plugin/plugin.cpp b/myserver/src/plugin/plugin.cpp
index f79c0bf..ee6c601 100755
--- a/myserver/src/plugin/plugin.cpp
+++ b/myserver/src/plugin/plugin.cpp
@@ -66,7 +66,6 @@ int Plugin::load (Server* server)
  */
 int Plugin::preLoad (string& file, bool global)
 {
-
   return hinstLib.loadLibrary (file.c_str (), global ? 1 : 0);
 }
 
diff --git a/myserver/src/plugin/plugins_manager.cpp b/myserver/src/plugin/plugins_manager.cpp
index ef625c8..b69dda2 100755
--- a/myserver/src/plugin/plugins_manager.cpp
+++ b/myserver/src/plugin/plugins_manager.cpp
@@ -214,7 +214,7 @@ PluginsManager::preLoad (Server* server, string& resource)
                 {
                   ret |= 1;
                   server->logWriteln (MYSERVER_LOG_MSG_ERROR,
-                                   _("Error loading plugin %s"), name.c_str ());
+                               _("Error loading plugin %s"), libname.c_str ());
                 }
               else
                 pinfo->setPlugin (plugin);
@@ -257,7 +257,6 @@ PluginsManager::loadInfo (Server* server, string& name, string& path)
     }
   XmlParser xml;
 
-
   if (xml.open (path, true))
     {
       server->logWriteln (MYSERVER_LOG_MSG_ERROR,
@@ -287,7 +286,6 @@ PluginsManager::loadInfo (Server* server, string& name, string& path)
 
       string sMinVer ((char*)minVersion);
       pinfo->setMyServerMinVersion (PluginInfo::convertVersion (&sMinVer));
-      xmlMemFree ((void*)minVersion);
     }
   else
     {
@@ -297,8 +295,6 @@ PluginsManager::loadInfo (Server* server, string& name, string& path)
       return NULL;
     }
 
-
-
   if (xmlHasProp (nodes->nodeTab[0], (const xmlChar*) "max-version"))
     {
       xmlChar* maxVersion = xmlGetProp (nodes->nodeTab[0],
@@ -306,7 +302,6 @@ PluginsManager::loadInfo (Server* server, string& name, string& path)
 
       string sMaxVer ((char*)maxVersion);
       pinfo->setMyServerMaxVersion (PluginInfo::convertVersion (&sMaxVer));
-      xmlMemFree ((void*)maxVersion);
     }
   else
     {
@@ -436,8 +431,8 @@ PluginsManager::preLoadPlugin (string& file, Server* server, bool global)
   if (plugin->preLoad (file, global))
     {
       server->logWriteln (MYSERVER_LOG_MSG_ERROR,
-                          _("Error pre-loading plugin %s, invalid plugin.xml"),
-                          name.c_str ());
+                          _("Error pre-loading plugin %s"),
+                          file.c_str ());
       delete plugin;
       return NULL;
     }
@@ -448,8 +443,8 @@ PluginsManager::preLoadPlugin (string& file, Server* server, bool global)
   else
     {
       server->logWriteln (MYSERVER_LOG_MSG_ERROR,
-                          _("Error pre-loading plugin %s, invalid plugin.xml"),
-                          name.c_str ());
+                          _("Error pre-loading plugin %s"),
+                          file.c_str ());
       delete plugin;
       return NULL;
     }



commit 467202faae38a843a0de650684f41929e32c3e2d
Author: Giuseppe Scrivano <gscrivano@gnu.org>
Date:   Thu Aug 20 19:39:50 2009 +0200

    HTTP uses the specified handler for MIME types.

diff --git a/myserver/src/protocol/http/http.cpp b/myserver/src/protocol/http/http.cpp
index a423d5e..54d60c2 100644
--- a/myserver/src/protocol/http/http.cpp
+++ b/myserver/src/protocol/http/http.cpp
@@ -1554,12 +1554,14 @@ Internal Server Error\n\
  */
 MimeRecord* Http::getMIME (string &filename)
 {
+  /*TODO: document the "mime.handler" option.  */
+  const char *handler = td->securityToken.getHashedData ("mime.handler",
+                      MYSERVER_VHOST_CONF | MYSERVER_SERVER_CONF, NULL);
+
   if (staticHttp.allowVhostMime && td->connection->host->isMIME ())
-    {
-      return td->connection->host->getMIME ()->getMIME (filename);
-    }
+    return td->connection->host->getMIME ()->getMIME (filename);
 
-  return Server::getInstance ()->getMimeManager ()->getMIME (filename);
+  return Server::getInstance ()->getMimeManager ()->getMIME (filename, handler);
 }
 
 /*!



commit be666de939f6e5c037f0ae4a392f17bf2684a636
Author: Giuseppe Scrivano <gscrivano@gnu.org>
Date:   Thu Aug 20 19:33:54 2009 +0200

    The MimeManager can have external handlers now.

diff --git a/myserver/include/conf/mime/mime_manager.h b/myserver/include/conf/mime/mime_manager.h
index a626f6b..96b35db 100644
--- a/myserver/include/conf/mime/mime_manager.h
+++ b/myserver/include/conf/mime/mime_manager.h
@@ -27,16 +27,19 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 
 #ifdef WIN32
-#include <windows.h>
+# include <windows.h>
 #endif
-extern "C" {
+
+extern "C"
+{
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
 #include <ctype.h>
+
 #ifdef WIN32
-#include <tchar.h>
-#include <io.h>
+# include <tchar.h>
+# include <io.h>
 #endif
 }
 
@@ -72,6 +75,15 @@ struct MimeRecord
   const char* getHashedData(string &name);
 };
 
+
+class MimeManagerHandler
+{
+public:
+	virtual MimeRecord* getMIME (const char *file){return NULL;}
+  virtual MimeRecord* getMIME (string const &file)
+  {return getMIME (file.c_str ());}
+};
+
 class MimeManager
 {
 public:
@@ -81,11 +93,10 @@ public:
 
   u_long loadXML (XmlParser* parser);
 	u_long loadXML (const char *filename);
-	u_long loadXML (string &filename)
-    {return loadXML (filename.c_str ());}
+	u_long loadXML (string &filename) {return loadXML (filename.c_str ());}
 
-	MimeRecord* getMIME (const char *ext);
-  MimeRecord* getMIME (string const &ext);
+	MimeRecord* getMIME (const char *file, const char *handler = NULL);
+  MimeRecord* getMIME (string const &file, const char *handler = NULL);
 
   bool isLoaded ();
 	void clean ();
@@ -93,10 +104,14 @@ public:
 
   static MimeRecord *readRecord (xmlNodePtr node);
 
+  void registerHandler (string &name, MimeManagerHandler *handler);
+
 protected:
 	const char *getFilename ();
 	void clearRecords ();
+
 private:
+  HashMap<string, MimeManagerHandler*> handlers;
   bool loaded;
   HashMap<string, int> extIndex;
   vector<MimeRecord*> records;
@@ -106,4 +121,4 @@ private:
 	string filename;
 };
 
-#endif 
+#endif
diff --git a/myserver/src/conf/mime/mime_manager.cpp b/myserver/src/conf/mime/mime_manager.cpp
index 53392e7..e1c1b72 100644
--- a/myserver/src/conf/mime/mime_manager.cpp
+++ b/myserver/src/conf/mime/mime_manager.cpp
@@ -26,7 +26,7 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #include <algorithm>
 
 #ifdef WIN32
-#define MIME_LOWER_CASE
+# define MIME_LOWER_CASE
 #endif
 
 using namespace std;
@@ -42,7 +42,7 @@ MimeRecord::MimeRecord ()
 }
 
 /*!
- *Destroy the object.
+ * Destroy the object.
  */
 MimeRecord::~MimeRecord ()
 {
@@ -50,32 +50,33 @@ MimeRecord::~MimeRecord ()
 }
 
 /*!
- *Add a filter to the list of filters to apply on this MIME type.
- *Return zero if the filters was not added.
+ * Add a filter to the list of filters to apply on this MIME type.
+ * Return zero if the filters was not added.
  */
-int MimeRecord::addFilter (const char* n, bool acceptDuplicate) 
+int MimeRecord::addFilter (const char* n, bool acceptDuplicate)
 {
-  if(!acceptDuplicate)
+  if (!acceptDuplicate)
   {
-    list<string>::iterator i = filters.begin();
-    for( ; i != filters.end() ;i++ )
+    list<string>::iterator i = filters.begin ();
+    for (; i != filters.end (); i++)
     {
-      if(!stringcmpi(*i, n))
+      if (!stringcmpi (*i, n))
         return 0;
     }
   }
-  filters.push_back(n);
+
+  filters.push_back (n);
   return 1;
 }
 
 /*!
- *Copy constructor.
+ * Copy constructor.
  */
 MimeRecord::MimeRecord (MimeRecord& m)
 {
   list<string>::iterator i = m.filters.begin ();
 
-  filters.clear (); 
+  filters.clear ();
 
   for( ; i != m.filters.end (); i++)
   {
@@ -84,7 +85,7 @@ MimeRecord::MimeRecord (MimeRecord& m)
 
   i = m.extensions.begin ();
 
-  extensions.clear (); 
+  extensions.clear ();
 
   for( ; i != m.extensions.end (); i++)
   {
@@ -95,7 +96,7 @@ MimeRecord::MimeRecord (MimeRecord& m)
   mimeType.assign (m.mimeType);
   cmdName.assign (m.cmdName);
   cgiManager.assign (m.cgiManager);
-} 
+}
 
 /*!
   *Clear the used memory.
@@ -104,30 +105,30 @@ void MimeRecord::clear ()
 {
   filters.clear ();
   extensions.clear ();
-  mimeType.assign (""); 
+  mimeType.assign ("");
   cmdName.assign ("");
   cgiManager.assign ("");
 
-  for (list<Regex*>::iterator it = pathRegex.begin (); 
-       it != pathRegex.end (); 
+  for (list<Regex*>::iterator it = pathRegex.begin ();
+       it != pathRegex.end ();
        it++)
   {
     delete *it;
   }
 
-  HashMap<string, string*>::Iterator it = hashedData.begin();
-  for (;it != hashedData.end(); it++)
+  HashMap<string, string*>::Iterator it = hashedData.begin ();
+  for (;it != hashedData.end (); it++)
   {
     delete (*it);
   }
-  hashedData.clear();
+  hashedData.clear ();
 
 
   pathRegex.clear ();
-}  
+}
 
 /*!
- *Get the value stored in the hash dictionary for the `name' key.
+ * Get the value stored in the hash dictionary for the `name' key.
  */
 const char* MimeRecord::getHashedData(string &name)
 {
@@ -139,15 +140,15 @@ const char* MimeRecord::getHashedData(string &name)
 }
 
 /*!
- *Get the name of the file opened by the class.
+ * Get the name of the used file.
  */
 const char *MimeManager::getFilename ()
 {
-  return filename.c_str();
+  return filename.c_str ();
 }
 
 /*!
- *Read a MIME record from a XML node.
+ * Read a MIME record from a XML node.
  */
 MimeRecord *MimeManager::readRecord (xmlNodePtr node)
 {
@@ -158,30 +159,27 @@ MimeRecord *MimeManager::readRecord (xmlNodePtr node)
 
   for (attrs = node->properties; attrs; attrs = attrs->next)
   {
-    if (!xmlStrcmp (attrs->name, (const xmlChar *)"handler") && 
+    if (!xmlStrcmp (attrs->name, (const xmlChar *)"handler") &&
         attrs->children && attrs->children->content)
       rc->cmdName.assign ((const char*)attrs->children->content);
- 
-    if (!xmlStrcmp (attrs->name, (const xmlChar *)"self") && 
+
+    if (!xmlStrcmp (attrs->name, (const xmlChar *)"self") &&
         attrs->children && attrs->children->content)
-      rc->selfExecuted = xmlStrcmp (attrs->children->content, 
+      rc->selfExecuted = xmlStrcmp (attrs->children->content,
                                     (const xmlChar *)"YES");
-   
-    if (!xmlStrcmp (attrs->name, (const xmlChar *)"param") && 
+
+    if (!xmlStrcmp (attrs->name, (const xmlChar *)"param") &&
         attrs->children && attrs->children->content)
       rc->cgiManager.assign ((const char*)attrs->children->content);
   }
 
-
- 
-
   for ( ;lcur; lcur = lcur->next)
   {
     if (lcur->name && !xmlStrcmp(lcur->name, (const xmlChar *)"EXTENSION"))
     {
       for (attrs = lcur->properties; attrs; attrs = attrs->next)
       {
-        if (!xmlStrcmp (attrs->name, (const xmlChar *)"value") && 
+        if (!xmlStrcmp (attrs->name, (const xmlChar *)"value") &&
             attrs->children && attrs->children->content)
         {
           string ext ((const char*)attrs->children->content);
@@ -197,11 +195,11 @@ MimeRecord *MimeManager::readRecord (xmlNodePtr node)
 
       for (attrs = lcur->properties; attrs; attrs = attrs->next)
       {
-        if (!xmlStrcmp (attrs->name, (const xmlChar *)"name") && 
+        if (!xmlStrcmp (attrs->name, (const xmlChar *)"name") &&
             attrs->children && attrs->children->content)
           name = (const char*)attrs->children->content;
 
-        if (!xmlStrcmp (attrs->name, (const xmlChar *)"value") && 
+        if (!xmlStrcmp (attrs->name, (const xmlChar *)"value") &&
             attrs->children && attrs->children->content)
           value = (const char*)attrs->children->content;
       }
@@ -219,7 +217,7 @@ MimeRecord *MimeManager::readRecord (xmlNodePtr node)
     {
       for (attrs = lcur->properties; attrs; attrs = attrs->next)
       {
-        if (!xmlStrcmp (attrs->name, (const xmlChar *)"regex") && 
+        if (!xmlStrcmp (attrs->name, (const xmlChar *)"regex") &&
             attrs->children && attrs->children->content)
         {
           Regex *r = new Regex;
@@ -236,11 +234,9 @@ MimeRecord *MimeManager::readRecord (xmlNodePtr node)
     {
       for (attrs = lcur->properties; attrs; attrs = attrs->next)
       {
-        if (!xmlStrcmp (attrs->name, (const xmlChar *)"value") && 
+        if (!xmlStrcmp (attrs->name, (const xmlChar *)"value") &&
             attrs->children && attrs->children->content)
-        {
           rc->addFilter ((const char*)attrs->children->content);
-        }
       }
     }
   }
@@ -249,8 +245,8 @@ MimeRecord *MimeManager::readRecord (xmlNodePtr node)
 }
 
 /*!
- *Load the MIME types from a XML file. Returns the number of
- *MIME types loaded successfully.
+ * Load the MIME types from a XML file. Returns the number of
+ * MIME types loaded successfully.
  */
 u_long MimeManager::loadXML (const char *fn)
 {
@@ -265,15 +261,15 @@ u_long MimeManager::loadXML (const char *fn)
   filename.assign (fn);
 
   ret = loadXML (&parser);
-  
+
   parser.close ();
-  
+
   return ret;
 }
 
 /*!
- *Load the MIME types from a XML parser object. Returns the number 
- *of MIME types loaded successfully.
+ * Load the MIME types from a XML parser object. Returns the number
+ * of MIME types loaded successfully.
  */
 u_long MimeManager::loadXML (XmlParser* parser)
 {
@@ -282,12 +278,12 @@ u_long MimeManager::loadXML (XmlParser* parser)
 
   clearRecords ();
 
-  doc = parser->getDoc();
+  doc = parser->getDoc ();
   node = doc->children->children;
 
-  for(; node; node = node->next )
+  for (; node; node = node->next)
   {
-    if(xmlStrcmp(node->name, (const xmlChar *)"MIME"))
+    if (xmlStrcmp (node->name, (const xmlChar *)"MIME"))
       continue;
 
     MimeRecord *rc = readRecord (node);
@@ -295,7 +291,7 @@ u_long MimeManager::loadXML (XmlParser* parser)
     if (rc)
       addRecord (rc);
   }
-  
+
   /*! Store the loaded status. */
   loaded = true;
 
@@ -303,7 +299,7 @@ u_long MimeManager::loadXML (XmlParser* parser)
 }
 
 /*!
- *Destroy the object.
+ * Destroy the object.
  */
 MimeManager::~MimeManager ()
 {
@@ -311,7 +307,7 @@ MimeManager::~MimeManager ()
 }
 
 /*!
- *Clean the memory allocated by the structure.
+ * Clean the memory allocated by the structure.
  */
 void MimeManager::clean ()
 {
@@ -324,7 +320,7 @@ void MimeManager::clean ()
 }
 
 /*!
- *Constructor of the class.
+ * Constructor of the class.
  */
 MimeManager::MimeManager ()
 {
@@ -332,8 +328,8 @@ MimeManager::MimeManager ()
 }
 
 /*!
- *Add a new record.
- *\return Return the position for the new record.
+ * Add a new record.
+ * \return Return the position for the new record.
  */
 int MimeManager::addRecord (MimeRecord *mr)
 {
@@ -341,54 +337,53 @@ int MimeManager::addRecord (MimeRecord *mr)
 
   records.push_back (mr);
 
-  for (list<string>::iterator it = mr->extensions.begin (); it != mr->extensions.end (); it++)
-  {
-    string &ext = *it;
+  for (list<string>::iterator it = mr->extensions.begin ();
+       it != mr->extensions.end (); it++)
+    {
+      string &ext = *it;
 
 #ifdef MIME_LOWER_CASE
-    transform (ext.begin(), ext.end(), ext.begin(), ::tolower);
+      transform (ext.begin(), ext.end(), ext.begin(), ::tolower);
 #endif
+      extIndex.put (ext, position);
+    }
 
-    extIndex.put (ext, position);
-  }
-
-  for (list<Regex*>::iterator it = mr->pathRegex.begin (); 
-       it != mr->pathRegex.end (); 
-       it++)
-  {
-    PathRegex *pr = new PathRegex;
-    pr->regex = *it;
-    pr->record = position;
+  for (list<Regex*>::iterator it = mr->pathRegex.begin ();
+       it != mr->pathRegex.end (); it++)
+    {
+      PathRegex *pr = new PathRegex;
+      pr->regex = *it;
+      pr->record = position;
 
-    pathRegex.push_back (pr);
-  }
+      pathRegex.push_back (pr);
+    }
 
   return position;
 }
 
 /*!
- *Remove all the stored records.
+ * Remove all the stored records.
  */
 void MimeManager::clearRecords ()
 {
   vector <MimeRecord*>::iterator i = records.begin ();
 
   while (i != records.end ())
-  {
-    MimeRecord *r = *i;
+    {
+      MimeRecord *r = *i;
+      if (r)
+        delete r;
+      i++;
+    }
 
-    if (r)
-      delete r;
-    
-    i++;
-  }
+  for (list<PathRegex*>::iterator it = pathRegex.begin ();
+       it != pathRegex.end (); it++)
+    delete *it;
 
-  for (list<PathRegex*>::iterator it = pathRegex.begin (); 
-       it != pathRegex.end (); 
-       it++)
-  {
+
+  for (HashMap<string, MimeManagerHandler*>::Iterator it = handlers.begin ();
+       it != handlers.end (); it++)
     delete *it;
-  }
 
   pathRegex.clear ();
   records.clear ();
@@ -400,51 +395,76 @@ void MimeManager::clearRecords ()
 }
 
 /*!
- *Get the MIME type to use on the specified file.
+ * Get the MIME type to use on the specified file.
+ * \param filename Find the MIME type for this file.
+ * \param handler If specified, indicate an external handler to use
+ * if the mime cannot be found locally.
  */
-MimeRecord *MimeManager::getMIME (const char *filename)
+MimeRecord *MimeManager::getMIME (string const &filename, const char *handler)
 {
-  string str (filename);
-  return getMIME (filename);
+  return getMIME (filename.c_str ());
 }
 
 /*!
- *Get the MIME type to use on the specified file.
+ * Get the MIME type to use on the specified file.
+ * \param filename Find the MIME type for this file.
+ * \param handler If specified, indicate an external handler to use
+ * if the mime cannot be found locally.
  */
-MimeRecord *MimeManager::getMIME (string const &filename)
+MimeRecord *MimeManager::getMIME (const char *filename, const char *handler)
 {
   string ext;
   u_long pos = 0;
-  
 
-  for (list<PathRegex*>::iterator it = pathRegex.begin (); 
-       it != pathRegex.end (); 
+
+  for (list<PathRegex*>::iterator it = pathRegex.begin ();
+       it != pathRegex.end ();
        it++)
   {
     PathRegex *pr = *it;
     regmatch_t pm;
 
-    if (pr->regex->exec(filename.c_str (), 1, &pm, 0) == 0)
+    if (pr->regex->exec (filename, 1, &pm, 0) == 0)
     {
       pos = pr->record;
       break;
     }
   }
- 
+
   if (pos == 0)
-  {
-    FilesUtility::getFileExt (ext, filename);
-    pos = extIndex.get (ext.c_str ());
-  }
+    {
+      FilesUtility::getFileExt (ext, filename);
+      pos = extIndex.get (ext.c_str ());
+    }
 
   if (pos)
     return records [pos];
 
+  if (handler)
+    {
+      MimeManagerHandler *h = handlers.get (handler);
+      if (h)
+        return h->getMIME (filename);
+    }
+
   return NULL;
 }
 
 /*!
- *Returns the number of MIME types loaded.
+ * Register an external handler under the specified name.
+ *
+ * \param name Handler name.
+ * \param handler Handler object to register.
+ */
+void MimeManager::registerHandler (string &name, MimeManagerHandler *handler)
+{
+  MimeManagerHandler *old = handlers.put (name, handler);
+  if (old)
+    delete old;
+}
+
+/*!
+ * Returns the number of MIME types loaded.
  */
 u_long MimeManager::getNumMIMELoaded ()
 {
@@ -452,7 +472,7 @@ u_long MimeManager::getNumMIMELoaded ()
 }
 
 /*!
- *Check if the MIME manager is loaded.
+ * Check if the MIME manager is loaded.
  */
 bool MimeManager::isLoaded ()
 {

-----------------------------------------------------------------------

Summary of changes:
 myserver/include/conf/mime/mime_manager.h          |   33 ++-
 myserver/src/base/dynamic_lib/dynamiclib.cpp       |   55 ++--
 myserver/src/conf/mime/mime_manager.cpp            |  223 ++++++++------
 myserver/src/plugin/plugin.cpp                     |    1 -
 myserver/src/plugin/plugins_manager.cpp            |   15 +-
 myserver/src/protocol/http/http.cpp                |   10 +-
 plugins/src/mime_magic/.svn/dir-prop-base          |    5 +
 plugins/src/mime_magic/.svn/entries                |  198 ++++++++++++
 plugins/src/mime_magic/.svn/format                 |    1 +
 .../.svn/text-base/README.svn-base}                |    0
 .../.svn/text-base/SConscript.svn-base}            |    0
 .../.svn/text-base/http_checker.cpp.svn-base       |  326 ++++++++++++++++++++
 .../.svn/text-base/http_rules_sample.py.svn-base}  |    0
 .../.svn/text-base/plugin.xml.svn-base}            |    4 +-
 plugins/src/mime_magic/README                      |    5 +
 .../src/{rules_checker => mime_magic}/SConscript   |   11 +-
 plugins/src/mime_magic/mime_magic.cpp              |  132 ++++++++
 plugins/src/mime_magic/plugin.xml                  |    9 +
 18 files changed, 871 insertions(+), 157 deletions(-)
 create mode 100755 plugins/src/mime_magic/.svn/dir-prop-base
 create mode 100755 plugins/src/mime_magic/.svn/entries
 create mode 100755 plugins/src/mime_magic/.svn/format
 copy plugins/src/{http_checker/README => mime_magic/.svn/text-base/README.svn-base} (100%)
 mode change 100644 => 100755
 copy plugins/src/{http_checker/SConscript => mime_magic/.svn/text-base/SConscript.svn-base} (100%)
 mode change 100644 => 100755
 create mode 100755 plugins/src/mime_magic/.svn/text-base/http_checker.cpp.svn-base
 copy plugins/src/{http_checker/http_rules_sample.py => mime_magic/.svn/text-base/http_rules_sample.py.svn-base} (100%)
 mode change 100644 => 100755
 copy plugins/src/{http_checker/plugin.xml => mime_magic/.svn/text-base/plugin.xml.svn-base} (72%)
 mode change 100644 => 100755
 create mode 100755 plugins/src/mime_magic/README
 copy plugins/src/{rules_checker => mime_magic}/SConscript (65%)
 mode change 100644 => 100755
 create mode 100755 plugins/src/mime_magic/mime_magic.cpp
 create mode 100755 plugins/src/mime_magic/plugin.xml


hooks/post-receive
-- 
GNU MyServer



From MAILER-DAEMON Thu Aug 20 16:06:34 2009
Received: from mailman by lists.gnu.org with archive (Exim 4.43)
	id 1MeDu6-0007Gu-5i
	for mharc-myserver-commit@gnu.org; Thu, 20 Aug 2009 16:06:34 -0400
Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43)
	id 1MeDu4-00079l-Dj
	for myserver-commit@gnu.org; Thu, 20 Aug 2009 16:06:32 -0400
Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43)
	id 1MeDu3-00075o-DY
	for myserver-commit@gnu.org; Thu, 20 Aug 2009 16:06:32 -0400
Received: from [199.232.76.173] (port=59198 helo=monty-python.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43) id 1MeDu3-00075M-90
	for myserver-commit@gnu.org; Thu, 20 Aug 2009 16:06:31 -0400
Received: from savannah.gnu.org ([199.232.41.3]:42898 helo=sv.gnu.org)
	by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32)
	(Exim 4.60) (envelope-from <gscrivano@gnu.org>) id 1MeDu2-0005i0-LS
	for myserver-commit@gnu.org; Thu, 20 Aug 2009 16:06:30 -0400
Received: from download.savannah.gnu.org ([199.232.41.75]
	helo=cvs.savannah.gnu.org) by sv.gnu.org with esmtp (Exim 4.69)
	(envelope-from <gscrivano@gnu.org>) id 1MeDu2-00054L-6O
	for myserver-commit@gnu.org; Thu, 20 Aug 2009 20:06:30 +0000
Received: from gscrivano by cvs.savannah.gnu.org with local (Exim 4.69)
	(envelope-from <gscrivano@savannah.gnu.org>) id 1MeDu1-00053s-Ql
	for myserver-commit@gnu.org; Thu, 20 Aug 2009 20:06:30 +0000
To: myserver-commit@gnu.org
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: 6bc604a42ff4baae96d50ab9a69f1bd9fab65be2
X-Git-Newrev: 5499197f680099587aee598f234838f764d56484
Message-Id: <E1MeDu1-00053s-Ql@cvs.savannah.gnu.org>
From: Giuseppe Scrivano <gscrivano@gnu.org>
Date: Thu, 20 Aug 2009 20:06:29 +0000
X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2)
Subject: [myserver-commit] [SCM] GNU MyServer branch, master,
	updated. 5499197f680099587aee598f234838f764d56484
X-BeenThere: myserver-commit@gnu.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: myserver-commit.gnu.org
List-Unsubscribe: <http://lists.gnu.org/mailman/listinfo/myserver-commit>,
	<mailto:myserver-commit-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/pipermail/myserver-commit>
List-Post: <mailto:myserver-commit@gnu.org>
List-Help: <mailto:myserver-commit-request@gnu.org?subject=help>
List-Subscribe: <http://lists.gnu.org/mailman/listinfo/myserver-commit>,
	<mailto:myserver-commit-request@gnu.org?subject=subscribe>
X-List-Received-Date: Thu, 20 Aug 2009 20:06:32 -0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU MyServer".

The branch, master has been updated
       via  5499197f680099587aee598f234838f764d56484 (commit)
      from  6bc604a42ff4baae96d50ab9a69f1bd9fab65be2 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------


commit 5499197f680099587aee598f234838f764d56484
Author: Giuseppe Scrivano <gscrivano@gnu.org>
Date:   Thu Aug 20 22:04:54 2009 +0200

    Remove unused files added by the last commit.

diff --git a/plugins/src/mime_magic/.svn/dir-prop-base b/plugins/src/mime_magic/.svn/dir-prop-base
deleted file mode 100755
index 3160658..0000000
--- a/plugins/src/mime_magic/.svn/dir-prop-base
+++ /dev/null
@@ -1,5 +0,0 @@
-K 13
-svn:mergeinfo
-V 0
-
-END
diff --git a/plugins/src/mime_magic/.svn/entries b/plugins/src/mime_magic/.svn/entries
deleted file mode 100755
index c0889e9..0000000
--- a/plugins/src/mime_magic/.svn/entries
+++ /dev/null
@@ -1,198 +0,0 @@
-9
-
-dir
-2915
-svn+ssh://svn.savannah.gnu.org/myserver/trunk/plugins/src/http_checker
-svn+ssh://svn.savannah.gnu.org/myserver
-
-
-
-2008-10-26T19:37:37.786994Z
-2913
-dperrone
-has-props
-
-svn:special svn:externals svn:needs-lock
-
-
-
-
-
-
-
-
-
-
-
-c4c922ea-a70d-0410-937d-ec1daf91936c
-
-http_rules_sample.py
-file
-
-
-
-
-2008-10-26T19:53:56.000000Z
-e61d209f6980c329e3795139269735c4
-2007-06-27T17:27:50.877877Z
-2361
-rocky_10_balboa
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-178
-
-http_checker.cpp
-file
-
-
-
-
-2008-10-26T19:53:56.000000Z
-4e6fa7755d56cc869aca2ecbc983fe6d
-2008-10-26T19:37:37.786994Z
-2913
-dperrone
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-8318
-
-SConscript
-file
-
-
-
-
-2008-10-26T19:53:56.000000Z
-7af7e7f0ecaf27a4f285cb25693802b7
-2008-10-26T19:37:37.786994Z
-2913
-dperrone
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-833
-
-README
-file
-
-
-
-
-2008-10-26T19:53:56.000000Z
-c183d3026fc5de262d58657ce90a4dd2
-2007-06-27T17:27:50.877877Z
-2361
-rocky_10_balboa
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-1093
-
-plugin.xml
-file
-
-
-
-
-2008-10-26T19:53:56.000000Z
-12098a0843a40122c30920847a26d14f
-2008-10-26T19:37:37.786994Z
-2913
-dperrone
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-313
-
diff --git a/plugins/src/mime_magic/.svn/format b/plugins/src/mime_magic/.svn/format
deleted file mode 100755
index ec63514..0000000
--- a/plugins/src/mime_magic/.svn/format
+++ /dev/null
@@ -1 +0,0 @@
-9
diff --git a/plugins/src/mime_magic/.svn/text-base/README.svn-base b/plugins/src/mime_magic/.svn/text-base/README.svn-base
deleted file mode 100755
index b68b7dc..0000000
--- a/plugins/src/mime_magic/.svn/text-base/README.svn-base
+++ /dev/null
@@ -1,40 +0,0 @@
-A HTTP checker rule is added trough the main myserver.xml
-configuration file, a rule is a python script to execute on every HTTP
-request, for example this rule denies any access if the client
-used the host localhost:8080 to connect to the server.
-
-This plugin needs the executors/python plugin to be installed too.
-
-<HTTP_CHECKER_RULE>
-<![CDATA[
-from http_checker import get_header
-from http_checker import raise_error
-
-if get_header('Host') == "localhost:8080":
-	raise_error(401)
-]]>
-</HTTP_CHECKER_RULE>
-
-If the rules are complicated then it is possible to use an external
-python file to execute:
-
-<HTTP_CHECKER_RULE file="http_rules_sample.py" />
-
-
-Functions in the http_checker module:
-
-get_remote_port() - Get the client TCP port.
-
-get_local_port() - Get the local TCP port.
-
-get_remote_addr() - Get the remote IP address.
-
-get_local_addr() - Get the local IP address.
-
-set_header(header, value) - Set HTTP header field value.
-
-get_header(header) - Get HTTP header field value.
-
-send_redirect(page) - Send a redirect to another location.
-
-raise_error(error_code) - Raise HTTP error page.
diff --git a/plugins/src/mime_magic/.svn/text-base/SConscript.svn-base b/plugins/src/mime_magic/.svn/text-base/SConscript.svn-base
deleted file mode 100755
index d63c425..0000000
--- a/plugins/src/mime_magic/.svn/text-base/SConscript.svn-base
+++ /dev/null
@@ -1,30 +0,0 @@
-#-*- mode: python -*-
-Import('dest_dir','listinc')
-
-local_listinc=[
-      GetLaunchDir(),
-      '../../../',
-      '/usr/local/include',
-      '/usr/include/',
-      '/usr/include/python2.5',
-      '/usr/local/include/python2.5',
-      '/usr/local/include/libxml2',
-      '/usr/include/libxml2',
-      '.'
-      ]
-
-local_listinc.extend(listinc)
-
-env = Environment(CPPPATH=local_listinc)
-
-conf = Configure(env, config_h="config.h")
-
-if conf.CheckHeader("Python.h"):
-    conf.Define('PYTHON', 1)
-
-env = conf.Finish()
-
-env.SharedLibrary(GetLaunchDir() + "/" + dest_dir + "/http_checker", ["http_checker.cpp" ], SHLIBPREFIX="")
-
-Command(GetLaunchDir() + "/" + dest_dir + "/README","README", Copy("$TARGET", "$SOURCE"))
-Command(GetLaunchDir() + "/" + dest_dir + "/http_rules_sample.py","http_rules_sample.py", Copy("$TARGET", "$SOURCE"))
diff --git a/plugins/src/mime_magic/.svn/text-base/http_checker.cpp.svn-base b/plugins/src/mime_magic/.svn/text-base/http_checker.cpp.svn-base
deleted file mode 100755
index 8c5a166..0000000
--- a/plugins/src/mime_magic/.svn/text-base/http_checker.cpp.svn-base
+++ /dev/null
@@ -1,326 +0,0 @@
-/*
-MyServer
-Copyright (C) 2007 The Free Software Foundation Inc.
-This program 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 3 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program.  If not, see <http://www.gnu.org/licenses/>.
-*/
-#include <stdafx.h>
-#include <string.h>
-#include <include/server/server.h>
-#include <include/base/multicast/multicast.h>
-#include <include/protocol/http/http.h>
-#include <include/plugin/plugin.h>
-#include <Python.h>
-
-#ifdef WIN32
-#define EXPORTABLE(x) x _declspec(dllexport)
-#else
-#define EXPORTABLE(x) extern "C" x
-#endif
-
-typedef int (*executePROC)(char*, u_long);
-typedef int (*executeFromFilePROC)(char*);
-
-
-struct ThreadData
-{
-	HttpThreadContext* td;
-	int ret;
-};
-
-static HashMap<ThreadID, ThreadData*> pythonThreadData;
-static Mutex mutex;
-
-typedef int (*INIT_MODULE)(char* name, PyMethodDef methods[]);
-static INIT_MODULE init;
-
-
-static ThreadData* getThreadData()
-{
-	ThreadID tid = Thread::threadID();
-	ThreadData* ret;
-	mutex.lock();
-	ret = pythonThreadData.get(tid);
-	mutex.unlock();
-	return ret;
-}
-
-static HttpThreadContext* getThreadContext()
-{
-	return getThreadData()->td;
-}
-
-static PyObject *get_remote_addr(PyObject *self, PyObject *args)
-{
-	HttpThreadContext* context = getThreadContext();
-		return Py_BuildValue((char*)"s", context->connection->getIpAddr());
-}
-
-static PyObject *get_remote_port(PyObject *self, PyObject *args)
-{
-	HttpThreadContext* context = getThreadContext();
-		return Py_BuildValue((char*)"i", context->connection->getPort());
-}
-
-static PyObject *get_local_addr(PyObject *self, PyObject *args)
-{
-	HttpThreadContext* context = getThreadContext();
-		return Py_BuildValue((char*)"s", context->connection->getLocalIpAddr());
-}
-
-static PyObject *get_local_port(PyObject *self, PyObject *args)
-{
-	HttpThreadContext* context = getThreadContext();
-		return Py_BuildValue((char*)"i", context->connection->getLocalPort());
-}
-
-
-static PyObject *get_header(PyObject *self, PyObject *args)
-{
-	char *header;
-	string value;
-	if (!PyArg_ParseTuple(args, (char*)"s", &header))
-		return NULL;
-
-	HttpThreadContext* context = getThreadContext();
-
-	context->request.getValue(header, &value);
-
-	return Py_BuildValue((char*)"s", value.c_str());
-}
-
-static PyObject *set_header(PyObject *self, PyObject *args)
-{
-	char *header;
-	char *value;
-	const char* ret;
-	if (!PyArg_ParseTuple(args, (char*)"ss", &header, &value))
-		return NULL;
-
-	HttpThreadContext* context = getThreadContext();
-
-	ret = context->request.setValue(header, value)->c_str();
-
-	return Py_BuildValue((char*)"s", ret);
-}
-
-static PyObject *raise_error(PyObject *self, PyObject *args)
-{
-	int error;
-	if (!PyArg_ParseTuple(args, (char*)"i", &error))
-		return NULL;
-
-	ThreadData* data = getThreadData();
-
-	if(data->ret)
-		return NULL;
-
-	data->td->http->raiseHTTPError(error);
-
-	data->ret = 1;
-
-	return Py_BuildValue((char*)"s", "");
-}
-
-static PyObject *send_redirect(PyObject *self, PyObject *args)
-{
-	char* dest;
-	if (!PyArg_ParseTuple(args, (char*)"s", &dest))
-		return NULL;
-
-	ThreadData* data = getThreadData();
-
-	if(data->ret)
-		return NULL;
-
-	data->td->http->sendHTTPRedirect(dest);
-
-	data->ret = 1;
-
-	return Py_BuildValue((char*)"s", dest);
-}
-
-static PyMethodDef httpCheckerMethods[] = {
-	{(char*)"get_remote_port", get_remote_port, METH_VARARGS, (char*)"Get the remote TCP port"},
-	{(char*)"get_local_port", get_local_port, METH_VARARGS, (char*)"Get the local TCP port"},
-	{(char*)"get_remote_addr", get_remote_addr, METH_VARARGS, (char*)"Get the remote IP address"},
-	{(char*)"get_local_addr", get_local_addr, METH_VARARGS, (char*)"Get the local IP address"},
-	{(char*)"get_header", get_header, METH_VARARGS, (char*)"Get HTTP header field value"},
-	{(char*)"set_header", set_header, METH_VARARGS, (char*)"Set HTTP header field value"},
-	{(char*)"send_redirect", send_redirect, METH_VARARGS, (char*)"Send a redirect to another location"},
-	{(char*)"raise_error", raise_error, METH_VARARGS, (char*)"Raise HTTP error page"},
-	{NULL, NULL, 0, NULL}
-};
-
-
-class HttpObserver : public Multicast<string, void*, int>
-{
-	struct Item
-	{
-		string data;
-		bool file;
-	};
-public:
-
-	virtual int updateMulticast(MulticastRegistry<string, void*, int>* reg, string& msg, void* arg)
-	{
-		HttpThreadContext *td = (HttpThreadContext*)arg;
-		ThreadID tid = Thread::threadID();
-		list<Item>::iterator it;
-		mutex.lock();
-		ThreadData threadData = {td, 0};
-		pythonThreadData.put(tid, &threadData);
-		mutex.unlock();
-
-		init((char*)"http_checker", httpCheckerMethods);
-
-		for(it = rules.begin(); it != rules.end(); it++)
-		{
-			if((*it).file) 
-			{
-				executeFromFilePROC execute = ((executeFromFilePROC)python->getDirectMethod((char*)"executeFromFile"));
-				if (execute)
-				  execute((char*)(*it).data.c_str());
-			}else
-			{
-				executePROC execute = ((executePROC)python->getDirectMethod((char*)"execute"));
-				
-				if (execute)
-				  execute((char*)(*it).data.c_str(), (*it).data.length());
-			}
-		}
-		return threadData.ret;
-	}
-
-	void addRule(const char* rule, bool file)
-	{
-		Item it;
-		it.data.assign(rule);
-		it.file = file;
-		rules.push_back(it);
-	}
-
-	void setPythonExecutor(Plugin* python){this->python = python;}
-
-private:
-	list<Item> rules;
-	Plugin* python;
-};
-
-static HttpObserver observer;
-
-EXPORTABLE(char*) name(char* name, u_long len)
-{
-	char* str = (char*)"http_checker";
-	if(name)
-		strncpy(name, str, len);
-	return str;
-}
-
-EXPORTABLE(int) load(void* server,void* parser)
-{
-	Server* serverInstance = (Server*)server;
-	HttpStaticData* staticData =(HttpStaticData*) serverInstance->getGlobalData("http-static");
-	string msg("new-http-request");
-	string pythonName("python");
-	Plugin* python;
-	XmlParser* configuration;
-	xmlDocPtr xmlDoc;
-	if(!staticData)
-	{
-		serverInstance->logLockAccess();
-		serverInstance->logPreparePrintError();
-		serverInstance->logWriteln("HttpChecker: Invalid HTTP static data");
-		serverInstance->logEndPrintError();
-		serverInstance->logUnlockAccess();
-		return -1;
-	}
-	python = serverInstance->getPluginsManager()->getPlugin(pythonName);
-
-	if(!python)
-	{
-		serverInstance->logLockAccess();
-		serverInstance->logPreparePrintError();
-		serverInstance->logWriteln("HttpChecker: Cannot find executors::python");
-		serverInstance->logEndPrintError();
-		serverInstance->logUnlockAccess();
-		return -1;
-	}
-	observer.setPythonExecutor(python);
-
-	staticData->addMulticast(msg, &observer);
-
-	init = (INIT_MODULE) python->getDirectMethod((char*)"initModule");
-
-	if(!init)
-	{
-		serverInstance->logLockAccess();
-		serverInstance->logPreparePrintError();
-		serverInstance->logWriteln("HttpChecker: Cannot find method initModule in executors::python");
-		serverInstance->logEndPrintError();
-		serverInstance->logUnlockAccess();
-		return -1;
-	}
-	configuration = serverInstance->getConfiguration();
-	xmlDoc = configuration->getDoc();
-
-	for(xmlNodePtr ptr = xmlDoc->children->next->children; ptr; ptr = ptr->next)
-	{
-		if(!xmlStrcmp(ptr->name, (const xmlChar *)"HTTP_CHECKER_RULE"))
-		{
-			bool file = false;
-			xmlAttrPtr properties = ptr->properties;
-			char* data = 0;
-			while(properties)
-			{
-				if(!xmlStrcmp(properties->name, (const xmlChar *)"file"))
-				{
-					if(properties->children && properties->children->content)
-						data = (char*)properties->children->content;
-
-					file = true;
-				}
-				properties = properties->next;
-			}
-
-			if(!file && ptr->children && ptr->children->next && ptr->children->next->content)
-				data = (char*)ptr->children->next->content;
-
-			if(!data)
-			{
-				serverInstance->logLockAccess();
-				serverInstance->logPreparePrintError();
-				serverInstance->logWriteln("HttpChecker: Invalid rule");
-				serverInstance->logEndPrintError();
-				serverInstance->logUnlockAccess();
-				return -1;
-			}
-
-			observer.addRule(data, file);
-		}
-
-	}
-
-	mutex.init();
-
-	return 0;
-}
-EXPORTABLE(int) postLoad(void* server,void* parser)
-{
-	return 0;
-}
-EXPORTABLE(int) unLoad(void* parser)
-{
-	mutex.destroy();
-	return 0;
-}
diff --git a/plugins/src/mime_magic/.svn/text-base/http_rules_sample.py.svn-base b/plugins/src/mime_magic/.svn/text-base/http_rules_sample.py.svn-base
deleted file mode 100755
index dbf5ead..0000000
--- a/plugins/src/mime_magic/.svn/text-base/http_rules_sample.py.svn-base
+++ /dev/null
@@ -1,6 +0,0 @@
-from http_checker import *
-
-# This simple rule returns a 404 error page to every request from the
-# host 192.168.0.2.
-if get_remote_addr() == "192.168.0.2":
-    raise_error(404)
diff --git a/plugins/src/mime_magic/.svn/text-base/plugin.xml.svn-base b/plugins/src/mime_magic/.svn/text-base/plugin.xml.svn-base
deleted file mode 100755
index 8af05d9..0000000
--- a/plugins/src/mime_magic/.svn/text-base/plugin.xml.svn-base
+++ /dev/null
@@ -1,10 +0,0 @@
-<?xml version="1.0"?>
-
-<PLUGIN>
-<NAME>http_checker</NAME>
-<VERSION>0.1</VERSION>
-<AUTHOR>The Free Software Foundation Inc.</AUTHOR>
-<MAINTAINER>The Free Software Foundation Inc.</MAINTAINER>
-<DESCRIPTION>This plugin permits to validate HTTP requests using python</DESCRIPTION>
-<DEPENDS>python</DEPENDS>
-</PLUGIN>

-----------------------------------------------------------------------

Summary of changes:
 plugins/src/mime_magic/.svn/dir-prop-base          |    5 -
 plugins/src/mime_magic/.svn/entries                |  198 ------------
 plugins/src/mime_magic/.svn/format                 |    1 -
 .../src/mime_magic/.svn/text-base/README.svn-base  |   40 ---
 .../mime_magic/.svn/text-base/SConscript.svn-base  |   30 --
 .../.svn/text-base/http_checker.cpp.svn-base       |  326 --------------------
 .../.svn/text-base/http_rules_sample.py.svn-base   |    6 -
 .../mime_magic/.svn/text-base/plugin.xml.svn-base  |   10 -
 8 files changed, 0 insertions(+), 616 deletions(-)
 delete mode 100755 plugins/src/mime_magic/.svn/dir-prop-base
 delete mode 100755 plugins/src/mime_magic/.svn/entries
 delete mode 100755 plugins/src/mime_magic/.svn/format
 delete mode 100755 plugins/src/mime_magic/.svn/text-base/README.svn-base
 delete mode 100755 plugins/src/mime_magic/.svn/text-base/SConscript.svn-base
 delete mode 100755 plugins/src/mime_magic/.svn/text-base/http_checker.cpp.svn-base
 delete mode 100755 plugins/src/mime_magic/.svn/text-base/http_rules_sample.py.svn-base
 delete mode 100755 plugins/src/mime_magic/.svn/text-base/plugin.xml.svn-base


hooks/post-receive
-- 
GNU MyServer



From MAILER-DAEMON Thu Aug 20 16:56:00 2009
Received: from mailman by lists.gnu.org with archive (Exim 4.43)
	id 1MeEfw-0002mX-O1
	for mharc-myserver-commit@gnu.org; Thu, 20 Aug 2009 16:56:00 -0400
Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43)
	id 1MeEfv-0002mS-DF
	for myserver-commit@gnu.org; Thu, 20 Aug 2009 16:55:59 -0400
Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43)
	id 1MeEfu-0002mG-V8
	for myserver-commit@gnu.org; Thu, 20 Aug 2009 16:55:59 -0400
Received: from [199.232.76.173] (port=53713 helo=monty-python.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43) id 1MeEfu-0002mA-Is
	for myserver-commit@gnu.org; Thu, 20 Aug 2009 16:55:58 -0400
Received: from savannah.gnu.org ([199.232.41.3]:49721 helo=sv.gnu.org)
	by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32)
	(Exim 4.60) (envelope-from <gscrivano@gnu.org>) id 1MeEft-000613-FR
	for myserver-commit@gnu.org; Thu, 20 Aug 2009 16:55:58 -0400
Received: from download.savannah.gnu.org ([199.232.41.75]
	helo=cvs.savannah.gnu.org) by sv.gnu.org with esmtp (Exim 4.69)
	(envelope-from <gscrivano@gnu.org>) id 1MeEfs-00085I-Lz
	for myserver-commit@gnu.org; Thu, 20 Aug 2009 20:55:56 +0000
Received: from gscrivano by cvs.savannah.gnu.org with local (Exim 4.69)
	(envelope-from <gscrivano@savannah.gnu.org>) id 1MeEfs-00084m-C1
	for myserver-commit@gnu.org; Thu, 20 Aug 2009 20:55:56 +0000
To: myserver-commit@gnu.org
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: 5499197f680099587aee598f234838f764d56484
X-Git-Newrev: 84ecf068391d3b5468d8bad2e3772cd77392e6d7
Message-Id: <E1MeEfs-00084m-C1@cvs.savannah.gnu.org>
From: Giuseppe Scrivano <gscrivano@gnu.org>
Date: Thu, 20 Aug 2009 20:55:56 +0000
X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2)
Subject: [myserver-commit] [SCM] GNU MyServer branch, master,
	updated. 84ecf068391d3b5468d8bad2e3772cd77392e6d7
X-BeenThere: myserver-commit@gnu.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: myserver-commit.gnu.org
List-Unsubscribe: <http://lists.gnu.org/mailman/listinfo/myserver-commit>,
	<mailto:myserver-commit-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/pipermail/myserver-commit>
List-Post: <mailto:myserver-commit@gnu.org>
List-Help: <mailto:myserver-commit-request@gnu.org?subject=help>
List-Subscribe: <http://lists.gnu.org/mailman/listinfo/myserver-commit>,
	<mailto:myserver-commit-request@gnu.org?subject=subscribe>
X-List-Received-Date: Thu, 20 Aug 2009 20:55:59 -0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU MyServer".

The branch, master has been updated
       via  84ecf068391d3b5468d8bad2e3772cd77392e6d7 (commit)
       via  155b5ea97e1bc766c02e5c37d24c9193136e7808 (commit)
      from  5499197f680099587aee598f234838f764d56484 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------


commit 84ecf068391d3b5468d8bad2e3772cd77392e6d7
Author: Giuseppe Scrivano <gscrivano@gnu.org>
Date:   Thu Aug 20 22:54:21 2009 +0200

    Directories are not handled by the magic MIME plugin.

diff --git a/plugins/src/mime_magic/mime_magic.cpp b/plugins/src/mime_magic/mime_magic.cpp
index 3a2a155..ea4a5a2 100755
--- a/plugins/src/mime_magic/mime_magic.cpp
+++ b/plugins/src/mime_magic/mime_magic.cpp
@@ -66,7 +66,9 @@ public:
         /* FIXME: is this line reentrant and can be moved outside of the
          * critical section?  */
         const char *type = magic_file (cookie, file);
-        if (type)
+
+        /* Do not handle directories.  */
+        if (type && strcmp (type, "application/x-directory"))
           {
             rec = records.get (type);
             if (!rec)



commit 155b5ea97e1bc766c02e5c37d24c9193136e7808
Author: Giuseppe Scrivano <gscrivano@gnu.org>
Date:   Thu Aug 20 22:50:11 2009 +0200

    Use the ETag header with static files.

diff --git a/myserver/include/http_handler/http_file/http_file.h b/myserver/include/http_handler/http_file/http_file.h
index cd59434..c9c40af 100644
--- a/myserver/include/http_handler/http_file/http_file.h
+++ b/myserver/include/http_handler/http_file/http_file.h
@@ -40,6 +40,8 @@ protected:
                string& filename);
   int deleteFile (HttpThreadContext* td,
                   string& filename);
+private:
+  static void generateEtag (string & etag, u_long mtime, u_long size);
 };
 
 
diff --git a/myserver/src/http_handler/http_file/http_file.cpp b/myserver/src/http_handler/http_file/http_file.cpp
index ae8856b..6263aab 100644
--- a/myserver/src/http_handler/http_file/http_file.cpp
+++ b/myserver/src/http_handler/http_file/http_file.cpp
@@ -6,7 +6,7 @@ it under the terms of the GNU General Public License as published by
 the Free Software Foundation; either version 3 of the License, or
 (at your option) any later version.
 
-This program is distributed in the hope that it will be useful, 
+This program is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 GNU General Public License for more details.
@@ -28,7 +28,7 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #include <algorithm>
 using namespace std;
 
-extern "C" 
+extern "C"
 {
 #ifdef WIN32
 # include <direct.h>
@@ -185,6 +185,25 @@ int HttpFile::deleteFile (HttpThreadContext* td,
 }
 
 /*!
+ * Generate the E-Tag header given the resource atime and size.
+ *
+ * \param etag output the etag to this string.
+ * \param atime Resource last modified time.
+ * \param size Resource size.
+ */
+void HttpFile::generateEtag (string & etag, u_long mtime, u_long fsize)
+{
+#define ROL(x, y) ((x << y) | (x >> (32 - y)))
+  /* Do a bit rotation to have less significative bits in the middle.  */
+  u_long x = ROL(mtime, 16) | fsize;
+
+  char buf[16];
+  sprintf (buf, "%u", x);
+  etag.assign (buf);
+}
+
+
+/*!
  * Send a file to the client using the HTTP protocol.
  * \param td The current HTTP thread context.
  * \param filenamePath The path of the static file to send.
@@ -192,11 +211,8 @@ int HttpFile::deleteFile (HttpThreadContext* td,
  * \param execute Not used.
  * \param onlyHeader Specify if send only the HTTP header.
   */
-int HttpFile::send (HttpThreadContext* td,
-                    const char *filenamePath,
-                    const char* exec,
-                    bool execute,
-                    bool onlyHeader)
+int HttpFile::send (HttpThreadContext* td, const char *filenamePath,
+                    const char* exec, bool execute, bool onlyHeader)
 {
   /*
    * With this routine we send a file through the HTTP protocol.
@@ -204,14 +220,14 @@ int HttpFile::send (HttpThreadContext* td,
    */
   int ret;
 
-  /* 
+  /*
    * Will we use GZIP compression to send data?
    */
   bool useGzip = false;
   u_long filesize = 0;
   File *file = 0;
   u_long bytesToSend;
-  u_long firstByte = td->request.rangeByteBegin; 
+  u_long firstByte = td->request.rangeByteBegin;
   u_long lastByte = td->request.rangeByteEnd;
   bool keepalive = false;
   bool useChunks = false;
@@ -247,40 +263,61 @@ int HttpFile::send (HttpThreadContext* td,
     getRFC822GMTTime (lastMT, tmpTime, HTTP_RESPONSE_LAST_MODIFIED_DIM);
     td->response.lastModified.assign (tmpTime);
 
-    HttpRequestHeader::Entry *ifModifiedSince = 
+    HttpRequestHeader::Entry *ifModifiedSince =
       td->request.other.get ("Last-Modified");
 
-    if (ifModifiedSince && ifModifiedSince->value->length () && 
+    if (ifModifiedSince && ifModifiedSince->value->length () &&
        !ifModifiedSince->value->compare(td->response.lastModified.c_str ()))
-          return td->http->sendHTTPNonModified ();
+      return td->http->sendHTTPNonModified ();
 
     file = Server::getInstance ()->getCachedFiles ()->open (filenamePath);
     if (file == 0)
       return td->http->raiseHTTPError (500);
 
     /*
-     * Check how many bytes are ready to be send.  
+     * Check how many bytes are ready to be send.
      */
     filesize = file->getFileSize ();
+
+    string etag;
+    generateEtag (etag, lastMT, filesize);
+
+    HttpRequestHeader::Entry *etagHeader = td->request.other.get ("ETag");
+    if (etagHeader &&  !etagHeader->value->compare (etag))
+      return td->http->sendHTTPNonModified ();
+    else
+      {
+      HttpResponseHeader::Entry *e = td->response.other.get ("Etag");
+      if (e)
+        e->value->assign (etag);
+      else
+        {
+          e = new HttpResponseHeader::Entry ();
+          e->name->assign ("Etag");
+          e->value->assign (etag);
+          td->response.other.put (*(e->name), e);
+        }
+      }
+
     bytesToSend = filesize;
     if (lastByte == 0)
       lastByte = bytesToSend;
     else
       {
-        /* 
-         * If the client use ranges set the right value 
-         * for the last byte number.  
+        /*
+         * If the client use ranges set the right value
+         * for the last byte number.
          */
         lastByte = std::min (lastByte + 1, bytesToSend);
       }
 
     /*
-     * bytesToSend is the interval between the first and the last byte.  
+     * bytesToSend is the interval between the first and the last byte.
      */
     bytesToSend = lastByte - firstByte;
-    
+
     /*
-     * If fail to set the file pointer returns an internal server error.  
+     * If fail to set the file pointer returns an internal server error.
      */
     ret = file->seek (firstByte);
     if (ret)
@@ -324,7 +361,7 @@ int HttpFile::send (HttpThreadContext* td,
 #else
     /* If compiled without GZIP support force the server to don't use it.  */
     useGzip = false;
-#endif  
+#endif
     if (td->appendOutputs)
       useGzip = false;
 
@@ -382,7 +419,7 @@ int HttpFile::send (HttpThreadContext* td,
       memStream.refresh();
       dataSent += nbw;
     }
-    
+
     if (useGzip && !chain.isFilterPresent ("gzip"))
       {
         Filter* gzipFilter =
@@ -407,7 +444,7 @@ int HttpFile::send (HttpThreadContext* td,
       }
 
     useModifiers = chain.hasModifiersFilters ();
- 
+
     if (!useModifiers)
       {
         ostringstream buffer;
@@ -453,7 +490,7 @@ int HttpFile::send (HttpThreadContext* td,
             useChunks = true;
           }
       }
- 
+
     u_long hdrLen = HttpHeaders::buildHTTPResponseHeader (td->buffer->getBuffer(),
                                                           &td->response);
 
@@ -486,7 +523,7 @@ int HttpFile::send (HttpThreadContext* td,
       }
 
     /*
-     * Check if there are all the conditions to use a direct copy from the 
+     * Check if there are all the conditions to use a direct copy from the
      * file to the socket.
      */
     if (!useChunks && chain.isEmpty () && !td->appendOutputs

-----------------------------------------------------------------------

Summary of changes:
 .../include/http_handler/http_file/http_file.h     |    2 +
 myserver/src/http_handler/http_file/http_file.cpp  |   85 ++++++++++++++------
 plugins/src/mime_magic/mime_magic.cpp              |    4 +-
 3 files changed, 66 insertions(+), 25 deletions(-)


hooks/post-receive
-- 
GNU MyServer



From MAILER-DAEMON Fri Aug 21 12:28:09 2009
Received: from mailman by lists.gnu.org with archive (Exim 4.43)
	id 1MeWyH-0005a9-C4
	for mharc-myserver-commit@gnu.org; Fri, 21 Aug 2009 12:28:09 -0400
Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43)
	id 1MeWyE-0005WN-Co
	for myserver-commit@gnu.org; Fri, 21 Aug 2009 12:28:06 -0400
Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43)
	id 1MeWyD-0005VI-Jn
	for myserver-commit@gnu.org; Fri, 21 Aug 2009 12:28:05 -0400
Received: from [199.232.76.173] (port=43881 helo=monty-python.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43) id 1MeWyD-0005Uh-6d
	for myserver-commit@gnu.org; Fri, 21 Aug 2009 12:28:05 -0400
Received: from savannah.gnu.org ([199.232.41.3]:37282 helo=sv.gnu.org)
	by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32)
	(Exim 4.60) (envelope-from <gscrivano@gnu.org>) id 1MeWy2-00032A-GL
	for myserver-commit@gnu.org; Fri, 21 Aug 2009 12:28:05 -0400
Received: from download.savannah.gnu.org ([199.232.41.75]
	helo=cvs.savannah.gnu.org) by sv.gnu.org with esmtp (Exim 4.69)
	(envelope-from <gscrivano@gnu.org>) id 1MeWy1-0008FX-LS
	for myserver-commit@gnu.org; Fri, 21 Aug 2009 16:27:53 +0000
Received: from gscrivano by cvs.savannah.gnu.org with local (Exim 4.69)
	(envelope-from <gscrivano@savannah.gnu.org>) id 1MeWxv-0008Aa-JN
	for myserver-commit@gnu.org; Fri, 21 Aug 2009 16:27:53 +0000
To: myserver-commit@gnu.org
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: 84ecf068391d3b5468d8bad2e3772cd77392e6d7
X-Git-Newrev: 2b2688341a4c6138b6ee3856b2456e95818505db
Message-Id: <E1MeWxv-0008Aa-JN@cvs.savannah.gnu.org>
From: Giuseppe Scrivano <gscrivano@gnu.org>
Date: Fri, 21 Aug 2009 16:27:49 +0000
X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2)
Subject: [myserver-commit] [SCM] GNU MyServer branch, master,
	updated. 2b2688341a4c6138b6ee3856b2456e95818505db
X-BeenThere: myserver-commit@gnu.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: myserver-commit.gnu.org
List-Unsubscribe: <http://lists.gnu.org/mailman/listinfo/myserver-commit>,
	<mailto:myserver-commit-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/pipermail/myserver-commit>
List-Post: <mailto:myserver-commit@gnu.org>
List-Help: <mailto:myserver-commit-request@gnu.org?subject=help>
List-Subscribe: <http://lists.gnu.org/mailman/listinfo/myserver-commit>,
	<mailto:myserver-commit-request@gnu.org?subject=subscribe>
X-List-Received-Date: Fri, 21 Aug 2009 16:28:06 -0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU MyServer".

The branch, master has been updated
       via  2b2688341a4c6138b6ee3856b2456e95818505db (commit)
       via  f42d766aca5c956573d6b9ec186e0bf4b6ef8d24 (commit)
      from  84ecf068391d3b5468d8bad2e3772cd77392e6d7 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------


commit 2b2688341a4c6138b6ee3856b2456e95818505db
Author: Giuseppe Scrivano <gscrivano@gnu.org>
Date:   Fri Aug 21 18:23:56 2009 +0200

    Update build-system

diff --git a/myserver/INSTALL b/myserver/INSTALL
index 8fe942d..2550dab 100644
--- a/myserver/INSTALL
+++ b/myserver/INSTALL
@@ -1,50 +1,302 @@
-                     GNU MyServer
+Installation Instructions
+*************************
 
-Copyright (C) 2002-2009 Free Software Foundation, Inc.
+Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005,
+2006, 2007, 2008, 2009 Free Software Foundation, Inc.
 
-This file contains generic information describing how build and
-install MyServer, please refer to your operating system manual for
-more detailed information about how source packages should be
-installed.
+   This file is free documentation; the Free Software Foundation gives
+unlimited permission to copy, distribute and modify it.
 
-BULD MYSERVER FROM SOURCE CODE
+Basic Installation
+==================
 
-MyServer can be compiled from its source code using the `configure'
-shell script which attempts to guess the correct configuration for
-various system dependent variables.
+   Briefly, the shell commands `./configure; make; make install' should
+configure, build, and install this package.  The following
+more-detailed instructions are generic; see the `README' file for
+instructions specific to this package.
 
-After the configure script has checked if MyServer can be compiled on
-your system and have setted some variables, you can build it using the
-`make' utility.
+   The `configure' shell script attempts to guess correct values for
+various system-dependent variables used during compilation.  It uses
+those values to create a `Makefile' in each directory of the package.
+It may also create one or more `.h' files containing system-dependent
+definitions.  Finally, it creates a shell script `config.status' that
+you can run in the future to recreate the current configuration, and a
+file `config.log' containing compiler output (useful mainly for
+debugging `configure').
 
-To compile MyServer from source code then you will need:
+   It can also use an optional file (typically called `config.cache'
+and enabled with `--cache-file=config.cache' or simply `-C') that saves
+the results of its tests to speed up reconfiguring.  Caching is
+disabled by default to prevent problems with accidental use of stale
+cache files.
 
-   1. `cd' to the directory where the source code is contained.
-   2. ./configure
-   3. make
+   If you need to do unusual things to compile the package, please try
+to figure out how `configure' could check whether to do them, and mail
+diffs or instructions to the address given in the `README' so they can
+be considered for the next release.  If you are using the cache, and at
+some point `config.cache' contains results you don't want to keep, you
+may remove or edit it.
 
-It is possible to install the obtained binaries invoking:
+   The file `configure.ac' (or `configure.in') is used to create
+`configure' by a program called `autoconf'.  You need `configure.ac' if
+you want to change it or regenerate `configure' using a newer version
+of `autoconf'.
 
-make install
+The simplest way to compile this package is:
 
+  1. `cd' to the directory containing the package's source code and type
+     `./configure' to configure the package for your system.
 
-EXTERNAL DEPENDENCIES
+     Running `configure' might take a while.  While running, it prints
+     some messages telling which features it is checking for.
 
-In order to build MyServer you will need the following external
-libraries:
+  2. Type `make' to compile the package.
 
-- libxml2
-- GNU libidn
-- GNU tls
-- libevent
-- libz
+  3. Optionally, type `make check' to run any self-tests that come with
+     the package.
 
-Be sure to have all of them before build MyServer.
+  4. Type `make install' to install the programs and any data files and
+     documentation.
 
+  5. You can remove the program binaries and object files from the
+     source code directory by typing `make clean'.  To also remove the
+     files that `configure' created (so you can compile the package for
+     a different kind of computer), type `make distclean'.  There is
+     also a `make maintainer-clean' target, but that is intended mainly
+     for the package's developers.  If you use it, you may have to get
+     all sorts of other programs in order to regenerate files that came
+     with the distribution.
 
-BINARIES
+  6. Often, you can also type `make uninstall' to remove the installed
+     files again.
 
-It may be possible to find precompiled binaries for your platform
-here:
+Compilers and Options
+=====================
+
+   Some systems require unusual options for compilation or linking that
+the `configure' script does not know about.  Run `./configure --help'
+for details on some of the pertinent environment variables.
+
+   You can give `configure' initial values for configuration parameters
+by setting variables in the command line or in the environment.  Here
+is an example:
+
+     ./configure CC=c99 CFLAGS=-g LIBS=-lposix
+
+   *Note Defining Variables::, for more details.
+
+Compiling For Multiple Architectures
+====================================
+
+   You can compile the package for more than one kind of computer at the
+same time, by placing the object files for each architecture in their
+own directory.  To do this, you can use GNU `make'.  `cd' to the
+directory where you want the object files and executables to go and run
+the `configure' script.  `configure' automatically checks for the
+source code in the directory that `configure' is in and in `..'.
+
+   With a non-GNU `make', it is safer to compile the package for one
+architecture at a time in the source code directory.  After you have
+installed the package for one architecture, use `make distclean' before
+reconfiguring for another architecture.
+
+   On MacOS X 10.5 and later systems, you can create libraries and
+executables that work on multiple system types--known as "fat" or
+"universal" binaries--by specifying multiple `-arch' options to the
+compiler but only a single `-arch' option to the preprocessor.  Like
+this:
+
+     ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
+                 CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
+                 CPP="gcc -E" CXXCPP="g++ -E"
+
+   This is not guaranteed to produce working output in all cases, you
+may have to build one architecture at a time and combine the results
+using the `lipo' tool if you have problems.
+
+Installation Names
+==================
+
+   By default, `make install' installs the package's commands under
+`/usr/local/bin', include files under `/usr/local/include', etc.  You
+can specify an installation prefix other than `/usr/local' by giving
+`configure' the option `--prefix=PREFIX'.
+
+   You can specify separate installation prefixes for
+architecture-specific files and architecture-independent files.  If you
+pass the option `--exec-prefix=PREFIX' to `configure', the package uses
+PREFIX as the prefix for installing programs and libraries.
+Documentation and other data files still use the regular prefix.
+
+   In addition, if you use an unusual directory layout you can give
+options like `--bindir=DIR' to specify different values for particular
+kinds of files.  Run `configure --help' for a list of the directories
+you can set and what kinds of files go in them.
+
+   If the package supports it, you can cause programs to be installed
+with an extra prefix or suffix on their names by giving `configure' the
+option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
+
+Optional Features
+=================
+
+   Some packages pay attention to `--enable-FEATURE' options to
+`configure', where FEATURE indicates an optional part of the package.
+They may also pay attention to `--with-PACKAGE' options, where PACKAGE
+is something like `gnu-as' or `x' (for the X Window System).  The
+`README' should mention any `--enable-' and `--with-' options that the
+package recognizes.
+
+   For packages that use the X Window System, `configure' can usually
+find the X include and library files automatically, but if it doesn't,
+you can use the `configure' options `--x-includes=DIR' and
+`--x-libraries=DIR' to specify their locations.
+
+Particular systems
+==================
+
+   On HP-UX, the default C compiler is not ANSI C compatible.  If GNU
+CC is not installed, it is recommended to use the following options in
+order to use an ANSI C compiler:
+
+     ./configure CC="cc -Ae -D_XOPEN_SOURCE=500"
+
+and if that doesn't work, install pre-built binaries of GCC for HP-UX.
+
+   On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot
+parse its `<wchar.h>' header file.  The option `-nodtk' can be used as
+a workaround.  If GNU CC is not installed, it is therefore recommended
+to try
+
+     ./configure CC="cc"
+
+and if that doesn't work, try
+
+     ./configure CC="cc -nodtk"
+
+   On Solaris, don't put `/usr/ucb' early in your `PATH'.  This
+directory contains several dysfunctional programs; working variants of
+these programs are available in `/usr/bin'.  So, if you need `/usr/ucb'
+in your `PATH', put it _after_ `/usr/bin'.
+
+   On Haiku, software installed for all users goes in `/boot/common',
+not `/usr/local'.  It is recommended to use the following options:
+
+     ./configure --prefix=/boot/common
+
+Specifying the System Type
+==========================
+
+   There may be some features `configure' cannot figure out
+automatically, but needs to determine by the type of machine the package
+will run on.  Usually, assuming the package is built to be run on the
+_same_ architectures, `configure' can figure that out, but if it prints
+a message saying it cannot guess the machine type, give it the
+`--build=TYPE' option.  TYPE can either be a short name for the system
+type, such as `sun4', or a canonical name which has the form:
+
+     CPU-COMPANY-SYSTEM
+
+where SYSTEM can have one of these forms:
+
+     OS
+     KERNEL-OS
+
+   See the file `config.sub' for the possible values of each field.  If
+`config.sub' isn't included in this package, then this package doesn't
+need to know the machine type.
+
+   If you are _building_ compiler tools for cross-compiling, you should
+use the option `--target=TYPE' to select the type of system they will
+produce code for.
+
+   If you want to _use_ a cross compiler, that generates code for a
+platform different from the build platform, you should specify the
+"host" platform (i.e., that on which the generated programs will
+eventually be run) with `--host=TYPE'.
+
+Sharing Defaults
+================
+
+   If you want to set default values for `configure' scripts to share,
+you can create a site shell script called `config.site' that gives
+default values for variables like `CC', `cache_file', and `prefix'.
+`configure' looks for `PREFIX/share/config.site' if it exists, then
+`PREFIX/etc/config.site' if it exists.  Or, you can set the
+`CONFIG_SITE' environment variable to the location of the site script.
+A warning: not all `configure' scripts look for a site script.
+
+Defining Variables
+==================
+
+   Variables not defined in a site shell script can be set in the
+environment passed to `configure'.  However, some packages may run
+configure again during the build, and the customized values of these
+variables may be lost.  In order to avoid this problem, you should set
+them in the `configure' command line, using `VAR=value'.  For example:
+
+     ./configure CC=/usr/local2/bin/gcc
+
+causes the specified `gcc' to be used as the C compiler (unless it is
+overridden in the site shell script).
+
+Unfortunately, this technique does not work for `CONFIG_SHELL' due to
+an Autoconf bug.  Until the bug is fixed you can use this workaround:
+
+     CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash
+
+`configure' Invocation
+======================
+
+   `configure' recognizes the following options to control how it
+operates.
+
+`--help'
+`-h'
+     Print a summary of all of the options to `configure', and exit.
+
+`--help=short'
+`--help=recursive'
+     Print a summary of the options unique to this package's
+     `configure', and exit.  The `short' variant lists options used
+     only in the top level, while the `recursive' variant lists options
+     also present in any nested packages.
+
+`--version'
+`-V'
+     Print the version of Autoconf used to generate the `configure'
+     script, and exit.
+
+`--cache-file=FILE'
+     Enable the cache: use and save the results of the tests in FILE,
+     traditionally `config.cache'.  FILE defaults to `/dev/null' to
+     disable caching.
+
+`--config-cache'
+`-C'
+     Alias for `--cache-file=config.cache'.
+
+`--quiet'
+`--silent'
+`-q'
+     Do not print messages saying which checks are being made.  To
+     suppress all normal output, redirect it to `/dev/null' (any error
+     messages will still be shown).
+
+`--srcdir=DIR'
+     Look for the package's source code in directory DIR.  Usually
+     `configure' can determine that directory automatically.
+
+`--prefix=DIR'
+     Use DIR as the installation prefix.  *Note Installation Names::
+     for more details, including other options available for fine-tuning
+     the installation locations.
+
+`--no-create'
+`-n'
+     Run the configure checks, but stop before creating any output
+     files.
+
+`configure' also accepts some other, not widely useful, options.  Run
+`configure --help' for more details.
 
-http://savannah.gnu.org/projects/myserver/
diff --git a/myserver/Makefile.am b/myserver/Makefile.am
index f7579dd..8b80a2e 100644
--- a/myserver/Makefile.am
+++ b/myserver/Makefile.am
@@ -7,18 +7,12 @@ if BUILD_DOC
 DOCS = documentation
 endif
 
-am__aclocal_m4_deps = $(top_srcdir)/m4/gnome-pthread-check.m4 \
-        $(top_srcdir)/m4/libtool.m4 \
-        $(top_srcdir)/m4/libxml.m4 $(top_srcdir)/m4/cppunit.m4 \
-        $(top_srcdir)/configure.in
-
 SUBDIRS = po src include $(CONTROL) $(CGI_LIB) binaries $(DOCS) $(TESTS_DIR)
 
-EXTRA_DIST = stdafx.h stdafx.cpp doxygen SConstruct
+EXTRA_DIST = config.rpath  stdafx.h stdafx.cpp doxygen SConstruct
 
 ACLOCAL_AMFLAGS = -I m4
 
-
 localedir.h: Makefile
 	echo '/* This file is auto-generated by Makefile!  */' >$@
 	echo '#define LOCALEDIR "$(localedir)"' >> $@
diff --git a/myserver/autogen.sh b/myserver/autogen.sh
index 59e71e9..72d0902 100755
--- a/myserver/autogen.sh
+++ b/myserver/autogen.sh
@@ -3,7 +3,7 @@
 #
 # http://www.myserverproject.net
 #
-# Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
+# Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2009 Free Software Foundation, Inc.
 # This program 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 3 of the License, or
@@ -18,42 +18,7 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 
-(aclocal --version) < /dev/null > /dev/null 2>&1 ||
-{
-    echo;
-    echo "You will need aclocal to compile MyServer";
-    echo;
-    exit;
-}
-
-(autoheader --version) < /dev/null > /dev/null 2>&1 ||
-{
-    echo;
-    echo "You will need autoheader to compile MyServer";
-    echo;
-    exit;
-}
-
-(automake --version) < /dev/null > /dev/null 2>&1 ||
-{
-    echo;
-    echo "You will need automake to compile MyServer";
-    echo;
-    exit;
-}
-
-(autoconf --version) < /dev/null > /dev/null 2>&1 ||
-{
-    echo;
-    echo "You will need autoconf to compile MyServer";
-    echo;
-    exit;
-}
-
 echo "Creating configuration files for MyServer. Please wait..."
 echo;
 
-aclocal -I m4
-autoheader
-automake -a
-autoconf
+autoreconf -fis
diff --git a/myserver/binaries/Makefile.am b/myserver/binaries/Makefile.am
index 7e15cc3..c4982b5 100644
--- a/myserver/binaries/Makefile.am
+++ b/myserver/binaries/Makefile.am
@@ -3,7 +3,7 @@ SUBDIRS = logs system web certificates plugins
 EXTRA_DIST = myserver-daemon MIMEtypes.default.xml myserver.default.xml \
 						 virtualhosts.default.xml
 
-configdir = $(DESTDIR)/etc/myserver
+configdir = $(DESTDIR)$(prefix)/etc/myserver
 
 install: install-recursive
 	$(install_sh_DATA) MIMEtypes.default.xml $(configdir)/MIMEtypes.xml
diff --git a/myserver/binaries/certificates/Makefile.am b/myserver/binaries/certificates/Makefile.am
index 69501f5..52cbebc 100644
--- a/myserver/binaries/certificates/Makefile.am
+++ b/myserver/binaries/certificates/Makefile.am
@@ -1,4 +1,4 @@
 EXTRA_DIST = how_create_certificates.txt
 install :
-	$(INSTALL) -d '$(DESTDIR)/etc/myserver/certificates'
-	$(INSTALL) 'how_create_certificates.txt' '$(DESTDIR)/etc/myserver/certificates/how_create_certificates.txt'
+	$(INSTALL) -d '$(DESTDIR)$(prefix)/etc/myserver/certificates'
+	$(INSTALL) 'how_create_certificates.txt' '$(DESTDIR)$(prefix)/etc/myserver/certificates/how_create_certificates.txt'
diff --git a/myserver/binaries/logs/Makefile.am b/myserver/binaries/logs/Makefile.am
index 1bc56a5..59d9fef 100644
--- a/myserver/binaries/logs/Makefile.am
+++ b/myserver/binaries/logs/Makefile.am
@@ -1,2 +1,2 @@
 install :
-	$(INSTALL) -d $(DESTDIR)/var/log/myserver
+	$(INSTALL) -d $(DESTDIR)$(prefix)/var/log/myserver
diff --git a/myserver/binaries/web/Makefile.am b/myserver/binaries/web/Makefile.am
index 0e36859..2ed3505 100644
--- a/myserver/binaries/web/Makefile.am
+++ b/myserver/binaries/web/Makefile.am
@@ -4,6 +4,6 @@ endif
 
 SUBDIRS = cgi-bin $(CGI_SRC)
 
-myserverdatadir = $(DESTDIR)/var/web
+myserverdatadir = $(prefix)/var/web
 
 dist_myserverdata_DATA = logo.png goto.png default.html link.html
diff --git a/myserver/binaries/web/cgi-bin/Makefile.am b/myserver/binaries/web/cgi-bin/Makefile.am
index 9eca560..4d1e64e 100644
--- a/myserver/binaries/web/cgi-bin/Makefile.am
+++ b/myserver/binaries/web/cgi-bin/Makefile.am
@@ -1,4 +1,3 @@
-myserverdatadir = $(DESTDIR)/var/web/cgi-bin
+myserverdatadir = $(prefix)/var/web/cgi-bin
 
 dist_myserverdata_DATA = counter.html default.html counter.readme
-
diff --git a/myserver/binaries/web/cgi-src/math_sum/Makefile.am b/myserver/binaries/web/cgi-src/math_sum/Makefile.am
index bc8f1a6..7213004 100644
--- a/myserver/binaries/web/cgi-src/math_sum/Makefile.am
+++ b/myserver/binaries/web/cgi-src/math_sum/Makefile.am
@@ -12,9 +12,9 @@ math_sum.mscgi : $(libmath_sum_a_OBJECTS) $(libmath_sum_a_DEPENDENCIES)
 	$(CXX) $(libmath_sum_a_OBJECTS) ../../../../src/libmyserver.a $(libmath_sum_a_LIBADD)  $(PTHREAD_LIB) $(IDN_LIB) $(XNET_LIB) $(EVENT_LIB) $(DL_LIB) $(SSL_LIB) $(ZLIB_LIB) $(XML_LIBS) $(LDFLAGS) -o math_sum.mscgi -shared $(CXXFLAGS) $(XML_CFLAGS)
 
 install : math_sum.mscgi
-	$(INSTALL) -D 'math_sum.mscgi' '$(DESTDIR)/var/web/cgi-bin/math_sum.mscgi'
+	$(INSTALL) -D 'math_sum.mscgi' '$(DESTDIR)$(prefix)/var/web/cgi-bin/math_sum.mscgi'
 
 
-clean :
+clean-local:
 	rm -f math_sum.mscgi
 	rm -f *.o
diff --git a/myserver/binaries/web/cgi-src/post/Makefile.am b/myserver/binaries/web/cgi-src/post/Makefile.am
index 301c2f8..4529ae3 100644
--- a/myserver/binaries/web/cgi-src/post/Makefile.am
+++ b/myserver/binaries/web/cgi-src/post/Makefile.am
@@ -13,8 +13,8 @@ post.mscgi : $(libpost_a_OBJECTS) $(libpost_a_DEPENDENCIES)
 	$(CXX) $(libpost_a_OBJECTS) ../../../../src/libmyserver.a $(libpost_a_LIBADD)  $(PTHREAD_LIB) $(IDN_LIB) $(XNET_LIB) $(EVENT_LIB) $(DL_LIB) $(SSL_LIB) $(ZLIB_LIB) $(XML_LIBS) $(LDFLAGS) -o post.mscgi -shared $(CXXFLAGS) $(XML_CFLAGS)
 
 install : post.mscgi
-	$(INSTALL) -D 'post.mscgi' '$(DESTDIR)/var/web/cgi-bin/post.mscgi'
+	$(INSTALL) -D 'post.mscgi' '$(DESTDIR)$(prefix)/var/web/cgi-bin/post.mscgi'
 
-clean :
+clean-local:
 	rm -f post.mscgi
 	rm -f *.o
diff --git a/myserver/config.guess b/myserver/config.guess
deleted file mode 100755
index 278f9e9..0000000
--- a/myserver/config.guess
+++ /dev/null
@@ -1,1516 +0,0 @@
-#! /bin/sh
-# Attempt to guess a canonical system name.
-#   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-#   2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation,
-#   Inc.
-
-timestamp='2007-07-22'
-
-# This file 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 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful, but
-# WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-# General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
-# 02110-1301, USA.
-#
-# As a special exception to the GNU General Public License, if you
-# distribute this file as part of a program that contains a
-# configuration script generated by Autoconf, you may include it under
-# the same distribution terms that you use for the rest of that program.
-
-
-# Originally written by Per Bothner <per@bothner.com>.
-# Please send patches to <config-patches@gnu.org>.  Submit a context
-# diff and a properly formatted ChangeLog entry.
-#
-# This script attempts to guess a canonical system name similar to
-# config.sub.  If it succeeds, it prints the system name on stdout, and
-# exits with 0.  Otherwise, it exits with 1.
-#
-# The plan is that this can be called by configure scripts if you
-# don't specify an explicit build system type.
-
-me=`echo "$0" | sed -e 's,.*/,,'`
-
-usage="\
-Usage: $0 [OPTION]
-
-Output the configuration name of the system \`$me' is run on.
-
-Operation modes:
-  -h, --help         print this help, then exit
-  -t, --time-stamp   print date of last modification, then exit
-  -v, --version      print version number, then exit
-
-Report bugs and patches to <config-patches@gnu.org>."
-
-version="\
-GNU config.guess ($timestamp)
-
-Originally written by Per Bothner.
-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
-Free Software Foundation, Inc.
-
-This is free software; see the source for copying conditions.  There is NO
-warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
-
-help="
-Try \`$me --help' for more information."
-
-# Parse command line
-while test $# -gt 0 ; do
-  case $1 in
-    --time-stamp | --time* | -t )
-       echo "$timestamp" ; exit ;;
-    --version | -v )
-       echo "$version" ; exit ;;
-    --help | --h* | -h )
-       echo "$usage"; exit ;;
-    -- )     # Stop option processing
-       shift; break ;;
-    - )	# Use stdin as input.
-       break ;;
-    -* )
-       echo "$me: invalid option $1$help" >&2
-       exit 1 ;;
-    * )
-       break ;;
-  esac
-done
-
-if test $# != 0; then
-  echo "$me: too many arguments$help" >&2
-  exit 1
-fi
-
-trap 'exit 1' 1 2 15
-
-# CC_FOR_BUILD -- compiler used by this script. Note that the use of a
-# compiler to aid in system detection is discouraged as it requires
-# temporary files to be created and, as you can see below, it is a
-# headache to deal with in a portable fashion.
-
-# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still
-# use `HOST_CC' if defined, but it is deprecated.
-
-# Portable tmp directory creation inspired by the Autoconf team.
-
-set_cc_for_build='
-trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ;
-trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ;
-: ${TMPDIR=/tmp} ;
- { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
- { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
- { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } ||
- { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ;
-dummy=$tmp/dummy ;
-tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ;
-case $CC_FOR_BUILD,$HOST_CC,$CC in
- ,,)    echo "int x;" > $dummy.c ;
-	for c in cc gcc c89 c99 ; do
-	  if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then
-	     CC_FOR_BUILD="$c"; break ;
-	  fi ;
-	done ;
-	if test x"$CC_FOR_BUILD" = x ; then
-	  CC_FOR_BUILD=no_compiler_found ;
-	fi
-	;;
- ,,*)   CC_FOR_BUILD=$CC ;;
- ,*,*)  CC_FOR_BUILD=$HOST_CC ;;
-esac ; set_cc_for_build= ;'
-
-# This is needed to find uname on a Pyramid OSx when run in the BSD universe.
-# (ghazi@noc.rutgers.edu 1994-08-24)
-if (test -f /.attbin/uname) >/dev/null 2>&1 ; then
-	PATH=$PATH:/.attbin ; export PATH
-fi
-
-UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
-UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
-UNAME_SYSTEM=`(uname -s) 2>/dev/null`  || UNAME_SYSTEM=unknown
-UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
-
-# Note: order is significant - the case branches are not exclusive.
-
-case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
-    *:NetBSD:*:*)
-	# NetBSD (nbsd) targets should (where applicable) match one or
-	# more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*,
-	# *-*-netbsdecoff* and *-*-netbsd*.  For targets that recently
-	# switched to ELF, *-*-netbsd* would select the old
-	# object file format.  This provides both forward
-	# compatibility and a consistent mechanism for selecting the
-	# object file format.
-	#
-	# Note: NetBSD doesn't particularly care about the vendor
-	# portion of the name.  We always set it to "unknown".
-	sysctl="sysctl -n hw.machine_arch"
-	UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \
-	    /usr/sbin/$sysctl 2>/dev/null || echo unknown)`
-	case "${UNAME_MACHINE_ARCH}" in
-	    armeb) machine=armeb-unknown ;;
-	    arm*) machine=arm-unknown ;;
-	    sh3el) machine=shl-unknown ;;
-	    sh3eb) machine=sh-unknown ;;
-	    sh5el) machine=sh5le-unknown ;;
-	    *) machine=${UNAME_MACHINE_ARCH}-unknown ;;
-	esac
-	# The Operating System including object format, if it has switched
-	# to ELF recently, or will in the future.
-	case "${UNAME_MACHINE_ARCH}" in
-	    arm*|i386|m68k|ns32k|sh3*|sparc|vax)
-		eval $set_cc_for_build
-		if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
-			| grep __ELF__ >/dev/null
-		then
-		    # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
-		    # Return netbsd for either.  FIX?
-		    os=netbsd
-		else
-		    os=netbsdelf
-		fi
-		;;
-	    *)
-	        os=netbsd
-		;;
-	esac
-	# The OS release
-	# Debian GNU/NetBSD machines have a different userland, and
-	# thus, need a distinct triplet. However, they do not need
-	# kernel version information, so it can be replaced with a
-	# suitable tag, in the style of linux-gnu.
-	case "${UNAME_VERSION}" in
-	    Debian*)
-		release='-gnu'
-		;;
-	    *)
-		release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
-		;;
-	esac
-	# Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
-	# contains redundant information, the shorter form:
-	# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
-	echo "${machine}-${os}${release}"
-	exit ;;
-    *:OpenBSD:*:*)
-	UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
-	echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE}
-	exit ;;
-    *:ekkoBSD:*:*)
-	echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
-	exit ;;
-    *:SolidBSD:*:*)
-	echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE}
-	exit ;;
-    macppc:MirBSD:*:*)
-	echo powerpc-unknown-mirbsd${UNAME_RELEASE}
-	exit ;;
-    *:MirBSD:*:*)
-	echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
-	exit ;;
-    alpha:OSF1:*:*)
-	case $UNAME_RELEASE in
-	*4.0)
-		UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
-		;;
-	*5.*)
-	        UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
-		;;
-	esac
-	# According to Compaq, /usr/sbin/psrinfo has been available on
-	# OSF/1 and Tru64 systems produced since 1995.  I hope that
-	# covers most systems running today.  This code pipes the CPU
-	# types through head -n 1, so we only detect the type of CPU 0.
-	ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^  The alpha \(.*\) processor.*$/\1/p' | head -n 1`
-	case "$ALPHA_CPU_TYPE" in
-	    "EV4 (21064)")
-		UNAME_MACHINE="alpha" ;;
-	    "EV4.5 (21064)")
-		UNAME_MACHINE="alpha" ;;
-	    "LCA4 (21066/21068)")
-		UNAME_MACHINE="alpha" ;;
-	    "EV5 (21164)")
-		UNAME_MACHINE="alphaev5" ;;
-	    "EV5.6 (21164A)")
-		UNAME_MACHINE="alphaev56" ;;
-	    "EV5.6 (21164PC)")
-		UNAME_MACHINE="alphapca56" ;;
-	    "EV5.7 (21164PC)")
-		UNAME_MACHINE="alphapca57" ;;
-	    "EV6 (21264)")
-		UNAME_MACHINE="alphaev6" ;;
-	    "EV6.7 (21264A)")
-		UNAME_MACHINE="alphaev67" ;;
-	    "EV6.8CB (21264C)")
-		UNAME_MACHINE="alphaev68" ;;
-	    "EV6.8AL (21264B)")
-		UNAME_MACHINE="alphaev68" ;;
-	    "EV6.8CX (21264D)")
-		UNAME_MACHINE="alphaev68" ;;
-	    "EV6.9A (21264/EV69A)")
-		UNAME_MACHINE="alphaev69" ;;
-	    "EV7 (21364)")
-		UNAME_MACHINE="alphaev7" ;;
-	    "EV7.9 (21364A)")
-		UNAME_MACHINE="alphaev79" ;;
-	esac
-	# A Pn.n version is a patched version.
-	# A Vn.n version is a released version.
-	# A Tn.n version is a released field test version.
-	# A Xn.n version is an unreleased experimental baselevel.
-	# 1.2 uses "1.2" for uname -r.
-	echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
-	exit ;;
-    Alpha\ *:Windows_NT*:*)
-	# How do we know it's Interix rather than the generic POSIX subsystem?
-	# Should we change UNAME_MACHINE based on the output of uname instead
-	# of the specific Alpha model?
-	echo alpha-pc-interix
-	exit ;;
-    21064:Windows_NT:50:3)
-	echo alpha-dec-winnt3.5
-	exit ;;
-    Amiga*:UNIX_System_V:4.0:*)
-	echo m68k-unknown-sysv4
-	exit ;;
-    *:[Aa]miga[Oo][Ss]:*:*)
-	echo ${UNAME_MACHINE}-unknown-amigaos
-	exit ;;
-    *:[Mm]orph[Oo][Ss]:*:*)
-	echo ${UNAME_MACHINE}-unknown-morphos
-	exit ;;
-    *:OS/390:*:*)
-	echo i370-ibm-openedition
-	exit ;;
-    *:z/VM:*:*)
-	echo s390-ibm-zvmoe
-	exit ;;
-    *:OS400:*:*)
-        echo powerpc-ibm-os400
-	exit ;;
-    arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
-	echo arm-acorn-riscix${UNAME_RELEASE}
-	exit ;;
-    arm:riscos:*:*|arm:RISCOS:*:*)
-	echo arm-unknown-riscos
-	exit ;;
-    SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
-	echo hppa1.1-hitachi-hiuxmpp
-	exit ;;
-    Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*)
-	# akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE.
-	if test "`(/bin/universe) 2>/dev/null`" = att ; then
-		echo pyramid-pyramid-sysv3
-	else
-		echo pyramid-pyramid-bsd
-	fi
-	exit ;;
-    NILE*:*:*:dcosx)
-	echo pyramid-pyramid-svr4
-	exit ;;
-    DRS?6000:unix:4.0:6*)
-	echo sparc-icl-nx6
-	exit ;;
-    DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*)
-	case `/usr/bin/uname -p` in
-	    sparc) echo sparc-icl-nx7; exit ;;
-	esac ;;
-    sun4H:SunOS:5.*:*)
-	echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
-	exit ;;
-    sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
-	echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
-	exit ;;
-    i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
-	echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
-	exit ;;
-    sun4*:SunOS:6*:*)
-	# According to config.sub, this is the proper way to canonicalize
-	# SunOS6.  Hard to guess exactly what SunOS6 will be like, but
-	# it's likely to be more like Solaris than SunOS4.
-	echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
-	exit ;;
-    sun4*:SunOS:*:*)
-	case "`/usr/bin/arch -k`" in
-	    Series*|S4*)
-		UNAME_RELEASE=`uname -v`
-		;;
-	esac
-	# Japanese Language versions have a version number like `4.1.3-JL'.
-	echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'`
-	exit ;;
-    sun3*:SunOS:*:*)
-	echo m68k-sun-sunos${UNAME_RELEASE}
-	exit ;;
-    sun*:*:4.2BSD:*)
-	UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
-	test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3
-	case "`/bin/arch`" in
-	    sun3)
-		echo m68k-sun-sunos${UNAME_RELEASE}
-		;;
-	    sun4)
-		echo sparc-sun-sunos${UNAME_RELEASE}
-		;;
-	esac
-	exit ;;
-    aushp:SunOS:*:*)
-	echo sparc-auspex-sunos${UNAME_RELEASE}
-	exit ;;
-    # The situation for MiNT is a little confusing.  The machine name
-    # can be virtually everything (everything which is not
-    # "atarist" or "atariste" at least should have a processor
-    # > m68000).  The system name ranges from "MiNT" over "FreeMiNT"
-    # to the lowercase version "mint" (or "freemint").  Finally
-    # the system name "TOS" denotes a system which is actually not
-    # MiNT.  But MiNT is downward compatible to TOS, so this should
-    # be no problem.
-    atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
-        echo m68k-atari-mint${UNAME_RELEASE}
-	exit ;;
-    atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
-	echo m68k-atari-mint${UNAME_RELEASE}
-        exit ;;
-    *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
-        echo m68k-atari-mint${UNAME_RELEASE}
-	exit ;;
-    milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
-        echo m68k-milan-mint${UNAME_RELEASE}
-        exit ;;
-    hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
-        echo m68k-hades-mint${UNAME_RELEASE}
-        exit ;;
-    *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
-        echo m68k-unknown-mint${UNAME_RELEASE}
-        exit ;;
-    m68k:machten:*:*)
-	echo m68k-apple-machten${UNAME_RELEASE}
-	exit ;;
-    powerpc:machten:*:*)
-	echo powerpc-apple-machten${UNAME_RELEASE}
-	exit ;;
-    RISC*:Mach:*:*)
-	echo mips-dec-mach_bsd4.3
-	exit ;;
-    RISC*:ULTRIX:*:*)
-	echo mips-dec-ultrix${UNAME_RELEASE}
-	exit ;;
-    VAX*:ULTRIX*:*:*)
-	echo vax-dec-ultrix${UNAME_RELEASE}
-	exit ;;
-    2020:CLIX:*:* | 2430:CLIX:*:*)
-	echo clipper-intergraph-clix${UNAME_RELEASE}
-	exit ;;
-    mips:*:*:UMIPS | mips:*:*:RISCos)
-	eval $set_cc_for_build
-	sed 's/^	//' << EOF >$dummy.c
-#ifdef __cplusplus
-#include <stdio.h>  /* for printf() prototype */
-	int main (int argc, char *argv[]) {
-#else
-	int main (argc, argv) int argc; char *argv[]; {
-#endif
-	#if defined (host_mips) && defined (MIPSEB)
-	#if defined (SYSTYPE_SYSV)
-	  printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0);
-	#endif
-	#if defined (SYSTYPE_SVR4)
-	  printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0);
-	#endif
-	#if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD)
-	  printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0);
-	#endif
-	#endif
-	  exit (-1);
-	}
-EOF
-	$CC_FOR_BUILD -o $dummy $dummy.c &&
-	  dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` &&
-	  SYSTEM_NAME=`$dummy $dummyarg` &&
-	    { echo "$SYSTEM_NAME"; exit; }
-	echo mips-mips-riscos${UNAME_RELEASE}
-	exit ;;
-    Motorola:PowerMAX_OS:*:*)
-	echo powerpc-motorola-powermax
-	exit ;;
-    Motorola:*:4.3:PL8-*)
-	echo powerpc-harris-powermax
-	exit ;;
-    Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*)
-	echo powerpc-harris-powermax
-	exit ;;
-    Night_Hawk:Power_UNIX:*:*)
-	echo powerpc-harris-powerunix
-	exit ;;
-    m88k:CX/UX:7*:*)
-	echo m88k-harris-cxux7
-	exit ;;
-    m88k:*:4*:R4*)
-	echo m88k-motorola-sysv4
-	exit ;;
-    m88k:*:3*:R3*)
-	echo m88k-motorola-sysv3
-	exit ;;
-    AViiON:dgux:*:*)
-        # DG/UX returns AViiON for all architectures
-        UNAME_PROCESSOR=`/usr/bin/uname -p`
-	if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ]
-	then
-	    if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \
-	       [ ${TARGET_BINARY_INTERFACE}x = x ]
-	    then
-		echo m88k-dg-dgux${UNAME_RELEASE}
-	    else
-		echo m88k-dg-dguxbcs${UNAME_RELEASE}
-	    fi
-	else
-	    echo i586-dg-dgux${UNAME_RELEASE}
-	fi
- 	exit ;;
-    M88*:DolphinOS:*:*)	# DolphinOS (SVR3)
-	echo m88k-dolphin-sysv3
-	exit ;;
-    M88*:*:R3*:*)
-	# Delta 88k system running SVR3
-	echo m88k-motorola-sysv3
-	exit ;;
-    XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3)
-	echo m88k-tektronix-sysv3
-	exit ;;
-    Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD)
-	echo m68k-tektronix-bsd
-	exit ;;
-    *:IRIX*:*:*)
-	echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'`
-	exit ;;
-    ????????:AIX?:[12].1:2)   # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
-	echo romp-ibm-aix     # uname -m gives an 8 hex-code CPU id
-	exit ;;               # Note that: echo "'`uname -s`'" gives 'AIX '
-    i*86:AIX:*:*)
-	echo i386-ibm-aix
-	exit ;;
-    ia64:AIX:*:*)
-	if [ -x /usr/bin/oslevel ] ; then
-		IBM_REV=`/usr/bin/oslevel`
-	else
-		IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
-	fi
-	echo ${UNAME_MACHINE}-ibm-aix${IBM_REV}
-	exit ;;
-    *:AIX:2:3)
-	if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
-		eval $set_cc_for_build
-		sed 's/^		//' << EOF >$dummy.c
-		#include <sys/systemcfg.h>
-
-		main()
-			{
-			if (!__power_pc())
-				exit(1);
-			puts("powerpc-ibm-aix3.2.5");
-			exit(0);
-			}
-EOF
-		if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy`
-		then
-			echo "$SYSTEM_NAME"
-		else
-			echo rs6000-ibm-aix3.2.5
-		fi
-	elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
-		echo rs6000-ibm-aix3.2.4
-	else
-		echo rs6000-ibm-aix3.2
-	fi
-	exit ;;
-    *:AIX:*:[45])
-	IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
-	if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
-		IBM_ARCH=rs6000
-	else
-		IBM_ARCH=powerpc
-	fi
-	if [ -x /usr/bin/oslevel ] ; then
-		IBM_REV=`/usr/bin/oslevel`
-	else
-		IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
-	fi
-	echo ${IBM_ARCH}-ibm-aix${IBM_REV}
-	exit ;;
-    *:AIX:*:*)
-	echo rs6000-ibm-aix
-	exit ;;
-    ibmrt:4.4BSD:*|romp-ibm:BSD:*)
-	echo romp-ibm-bsd4.4
-	exit ;;
-    ibmrt:*BSD:*|romp-ibm:BSD:*)            # covers RT/PC BSD and
-	echo romp-ibm-bsd${UNAME_RELEASE}   # 4.3 with uname added to
-	exit ;;                             # report: romp-ibm BSD 4.3
-    *:BOSX:*:*)
-	echo rs6000-bull-bosx
-	exit ;;
-    DPX/2?00:B.O.S.:*:*)
-	echo m68k-bull-sysv3
-	exit ;;
-    9000/[34]??:4.3bsd:1.*:*)
-	echo m68k-hp-bsd
-	exit ;;
-    hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)
-	echo m68k-hp-bsd4.4
-	exit ;;
-    9000/[34678]??:HP-UX:*:*)
-	HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
-	case "${UNAME_MACHINE}" in
-	    9000/31? )            HP_ARCH=m68000 ;;
-	    9000/[34]?? )         HP_ARCH=m68k ;;
-	    9000/[678][0-9][0-9])
-		if [ -x /usr/bin/getconf ]; then
-		    sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
-                    sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
-                    case "${sc_cpu_version}" in
-                      523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
-                      528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
-                      532)                      # CPU_PA_RISC2_0
-                        case "${sc_kernel_bits}" in
-                          32) HP_ARCH="hppa2.0n" ;;
-                          64) HP_ARCH="hppa2.0w" ;;
-			  '') HP_ARCH="hppa2.0" ;;   # HP-UX 10.20
-                        esac ;;
-                    esac
-		fi
-		if [ "${HP_ARCH}" = "" ]; then
-		    eval $set_cc_for_build
-		    sed 's/^              //' << EOF >$dummy.c
-
-              #define _HPUX_SOURCE
-              #include <stdlib.h>
-              #include <unistd.h>
-
-              int main ()
-              {
-              #if defined(_SC_KERNEL_BITS)
-                  long bits = sysconf(_SC_KERNEL_BITS);
-              #endif
-                  long cpu  = sysconf (_SC_CPU_VERSION);
-
-                  switch (cpu)
-              	{
-              	case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
-              	case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
-              	case CPU_PA_RISC2_0:
-              #if defined(_SC_KERNEL_BITS)
-              	    switch (bits)
-              		{
-              		case 64: puts ("hppa2.0w"); break;
-              		case 32: puts ("hppa2.0n"); break;
-              		default: puts ("hppa2.0"); break;
-              		} break;
-              #else  /* !defined(_SC_KERNEL_BITS) */
-              	    puts ("hppa2.0"); break;
-              #endif
-              	default: puts ("hppa1.0"); break;
-              	}
-                  exit (0);
-              }
-EOF
-		    (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
-		    test -z "$HP_ARCH" && HP_ARCH=hppa
-		fi ;;
-	esac
-	if [ ${HP_ARCH} = "hppa2.0w" ]
-	then
-	    eval $set_cc_for_build
-
-	    # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating
-	    # 32-bit code.  hppa64-hp-hpux* has the same kernel and a compiler
-	    # generating 64-bit code.  GNU and HP use different nomenclature:
-	    #
-	    # $ CC_FOR_BUILD=cc ./config.guess
-	    # => hppa2.0w-hp-hpux11.23
-	    # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess
-	    # => hppa64-hp-hpux11.23
-
-	    if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) |
-		grep __LP64__ >/dev/null
-	    then
-		HP_ARCH="hppa2.0w"
-	    else
-		HP_ARCH="hppa64"
-	    fi
-	fi
-	echo ${HP_ARCH}-hp-hpux${HPUX_REV}
-	exit ;;
-    ia64:HP-UX:*:*)
-	HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
-	echo ia64-hp-hpux${HPUX_REV}
-	exit ;;
-    3050*:HI-UX:*:*)
-	eval $set_cc_for_build
-	sed 's/^	//' << EOF >$dummy.c
-	#include <unistd.h>
-	int
-	main ()
-	{
-	  long cpu = sysconf (_SC_CPU_VERSION);
-	  /* The order matters, because CPU_IS_HP_MC68K erroneously returns
-	     true for CPU_PA_RISC1_0.  CPU_IS_PA_RISC returns correct
-	     results, however.  */
-	  if (CPU_IS_PA_RISC (cpu))
-	    {
-	      switch (cpu)
-		{
-		  case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break;
-		  case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break;
-		  case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break;
-		  default: puts ("hppa-hitachi-hiuxwe2"); break;
-		}
-	    }
-	  else if (CPU_IS_HP_MC68K (cpu))
-	    puts ("m68k-hitachi-hiuxwe2");
-	  else puts ("unknown-hitachi-hiuxwe2");
-	  exit (0);
-	}
-EOF
-	$CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` &&
-		{ echo "$SYSTEM_NAME"; exit; }
-	echo unknown-hitachi-hiuxwe2
-	exit ;;
-    9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
-	echo hppa1.1-hp-bsd
-	exit ;;
-    9000/8??:4.3bsd:*:*)
-	echo hppa1.0-hp-bsd
-	exit ;;
-    *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*)
-	echo hppa1.0-hp-mpeix
-	exit ;;
-    hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* )
-	echo hppa1.1-hp-osf
-	exit ;;
-    hp8??:OSF1:*:*)
-	echo hppa1.0-hp-osf
-	exit ;;
-    i*86:OSF1:*:*)
-	if [ -x /usr/sbin/sysversion ] ; then
-	    echo ${UNAME_MACHINE}-unknown-osf1mk
-	else
-	    echo ${UNAME_MACHINE}-unknown-osf1
-	fi
-	exit ;;
-    parisc*:Lites*:*:*)
-	echo hppa1.1-hp-lites
-	exit ;;
-    C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
-	echo c1-convex-bsd
-        exit ;;
-    C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
-	if getsysinfo -f scalar_acc
-	then echo c32-convex-bsd
-	else echo c2-convex-bsd
-	fi
-        exit ;;
-    C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
-	echo c34-convex-bsd
-        exit ;;
-    C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
-	echo c38-convex-bsd
-        exit ;;
-    C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
-	echo c4-convex-bsd
-        exit ;;
-    CRAY*Y-MP:*:*:*)
-	echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
-	exit ;;
-    CRAY*[A-Z]90:*:*:*)
-	echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \
-	| sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
-	      -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \
-	      -e 's/\.[^.]*$/.X/'
-	exit ;;
-    CRAY*TS:*:*:*)
-	echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
-	exit ;;
-    CRAY*T3E:*:*:*)
-	echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
-	exit ;;
-    CRAY*SV1:*:*:*)
-	echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
-	exit ;;
-    *:UNICOS/mp:*:*)
-	echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
-	exit ;;
-    F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
-	FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
-        FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
-        FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
-        echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
-        exit ;;
-    5000:UNIX_System_V:4.*:*)
-        FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
-        FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
-        echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
-	exit ;;
-    i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
-	echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
-	exit ;;
-    sparc*:BSD/OS:*:*)
-	echo sparc-unknown-bsdi${UNAME_RELEASE}
-	exit ;;
-    *:BSD/OS:*:*)
-	echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
-	exit ;;
-    *:FreeBSD:*:*)
-	case ${UNAME_MACHINE} in
-	    pc98)
-		echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
-	    amd64)
-		echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
-	    *)
-		echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
-	esac
-	exit ;;
-    i*:CYGWIN*:*)
-	echo ${UNAME_MACHINE}-pc-cygwin
-	exit ;;
-    *:MINGW*:*)
-	echo ${UNAME_MACHINE}-pc-mingw32
-	exit ;;
-    i*:windows32*:*)
-    	# uname -m includes "-pc" on this system.
-    	echo ${UNAME_MACHINE}-mingw32
-	exit ;;
-    i*:PW*:*)
-	echo ${UNAME_MACHINE}-pc-pw32
-	exit ;;
-    *:Interix*:[3456]*)
-    	case ${UNAME_MACHINE} in
-	    x86)
-		echo i586-pc-interix${UNAME_RELEASE}
-		exit ;;
-	    EM64T | authenticamd)
-		echo x86_64-unknown-interix${UNAME_RELEASE}
-		exit ;;
-	esac ;;
-    [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
-	echo i${UNAME_MACHINE}-pc-mks
-	exit ;;
-    i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
-	# How do we know it's Interix rather than the generic POSIX subsystem?
-	# It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
-	# UNAME_MACHINE based on the output of uname instead of i386?
-	echo i586-pc-interix
-	exit ;;
-    i*:UWIN*:*)
-	echo ${UNAME_MACHINE}-pc-uwin
-	exit ;;
-    amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*)
-	echo x86_64-unknown-cygwin
-	exit ;;
-    p*:CYGWIN*:*)
-	echo powerpcle-unknown-cygwin
-	exit ;;
-    prep*:SunOS:5.*:*)
-	echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
-	exit ;;
-    *:GNU:*:*)
-	# the GNU system
-	echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
-	exit ;;
-    *:GNU/*:*:*)
-	# other systems with GNU libc and userland
-	echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu
-	exit ;;
-    i*86:Minix:*:*)
-	echo ${UNAME_MACHINE}-pc-minix
-	exit ;;
-    arm*:Linux:*:*)
-	echo ${UNAME_MACHINE}-unknown-linux-gnu
-	exit ;;
-    avr32*:Linux:*:*)
-	echo ${UNAME_MACHINE}-unknown-linux-gnu
-	exit ;;
-    cris:Linux:*:*)
-	echo cris-axis-linux-gnu
-	exit ;;
-    crisv32:Linux:*:*)
-	echo crisv32-axis-linux-gnu
-	exit ;;
-    frv:Linux:*:*)
-    	echo frv-unknown-linux-gnu
-	exit ;;
-    ia64:Linux:*:*)
-	echo ${UNAME_MACHINE}-unknown-linux-gnu
-	exit ;;
-    m32r*:Linux:*:*)
-	echo ${UNAME_MACHINE}-unknown-linux-gnu
-	exit ;;
-    m68*:Linux:*:*)
-	echo ${UNAME_MACHINE}-unknown-linux-gnu
-	exit ;;
-    mips:Linux:*:*)
-	eval $set_cc_for_build
-	sed 's/^	//' << EOF >$dummy.c
-	#undef CPU
-	#undef mips
-	#undef mipsel
-	#if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
-	CPU=mipsel
-	#else
-	#if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
-	CPU=mips
-	#else
-	CPU=
-	#endif
-	#endif
-EOF
-	eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
-	    /^CPU/{
-		s: ::g
-		p
-	    }'`"
-	test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
-	;;
-    mips64:Linux:*:*)
-	eval $set_cc_for_build
-	sed 's/^	//' << EOF >$dummy.c
-	#undef CPU
-	#undef mips64
-	#undef mips64el
-	#if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
-	CPU=mips64el
-	#else
-	#if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
-	CPU=mips64
-	#else
-	CPU=
-	#endif
-	#endif
-EOF
-	eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
-	    /^CPU/{
-		s: ::g
-		p
-	    }'`"
-	test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
-	;;
-    or32:Linux:*:*)
-	echo or32-unknown-linux-gnu
-	exit ;;
-    ppc:Linux:*:*)
-	echo powerpc-unknown-linux-gnu
-	exit ;;
-    ppc64:Linux:*:*)
-	echo powerpc64-unknown-linux-gnu
-	exit ;;
-    alpha:Linux:*:*)
-	case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
-	  EV5)   UNAME_MACHINE=alphaev5 ;;
-	  EV56)  UNAME_MACHINE=alphaev56 ;;
-	  PCA56) UNAME_MACHINE=alphapca56 ;;
-	  PCA57) UNAME_MACHINE=alphapca56 ;;
-	  EV6)   UNAME_MACHINE=alphaev6 ;;
-	  EV67)  UNAME_MACHINE=alphaev67 ;;
-	  EV68*) UNAME_MACHINE=alphaev68 ;;
-        esac
-	objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null
-	if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
-	echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
-	exit ;;
-    parisc:Linux:*:* | hppa:Linux:*:*)
-	# Look for CPU level
-	case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
-	  PA7*) echo hppa1.1-unknown-linux-gnu ;;
-	  PA8*) echo hppa2.0-unknown-linux-gnu ;;
-	  *)    echo hppa-unknown-linux-gnu ;;
-	esac
-	exit ;;
-    parisc64:Linux:*:* | hppa64:Linux:*:*)
-	echo hppa64-unknown-linux-gnu
-	exit ;;
-    s390:Linux:*:* | s390x:Linux:*:*)
-	echo ${UNAME_MACHINE}-ibm-linux
-	exit ;;
-    sh64*:Linux:*:*)
-    	echo ${UNAME_MACHINE}-unknown-linux-gnu
-	exit ;;
-    sh*:Linux:*:*)
-	echo ${UNAME_MACHINE}-unknown-linux-gnu
-	exit ;;
-    sparc:Linux:*:* | sparc64:Linux:*:*)
-	echo ${UNAME_MACHINE}-unknown-linux-gnu
-	exit ;;
-    vax:Linux:*:*)
-	echo ${UNAME_MACHINE}-dec-linux-gnu
-	exit ;;
-    x86_64:Linux:*:*)
-	echo x86_64-unknown-linux-gnu
-	exit ;;
-    xtensa:Linux:*:*)
-    	echo xtensa-unknown-linux-gnu
-	exit ;;
-    i*86:Linux:*:*)
-	# The BFD linker knows what the default object file format is, so
-	# first see if it will tell us. cd to the root directory to prevent
-	# problems with other programs or directories called `ld' in the path.
-	# Set LC_ALL=C to ensure ld outputs messages in English.
-	ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \
-			 | sed -ne '/supported targets:/!d
-				    s/[ 	][ 	]*/ /g
-				    s/.*supported targets: *//
-				    s/ .*//
-				    p'`
-        case "$ld_supported_targets" in
-	  elf32-i386)
-		TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu"
-		;;
-	  a.out-i386-linux)
-		echo "${UNAME_MACHINE}-pc-linux-gnuaout"
-		exit ;;
-	  coff-i386)
-		echo "${UNAME_MACHINE}-pc-linux-gnucoff"
-		exit ;;
-	  "")
-		# Either a pre-BFD a.out linker (linux-gnuoldld) or
-		# one that does not give us useful --help.
-		echo "${UNAME_MACHINE}-pc-linux-gnuoldld"
-		exit ;;
-	esac
-	# Determine whether the default compiler is a.out or elf
-	eval $set_cc_for_build
-	sed 's/^	//' << EOF >$dummy.c
-	#include <features.h>
-	#ifdef __ELF__
-	# ifdef __GLIBC__
-	#  if __GLIBC__ >= 2
-	LIBC=gnu
-	#  else
-	LIBC=gnulibc1
-	#  endif
-	# else
-	LIBC=gnulibc1
-	# endif
-	#else
-	#if defined(__INTEL_COMPILER) || defined(__PGI) || defined(__SUNPRO_C) || defined(__SUNPRO_CC)
-	LIBC=gnu
-	#else
-	LIBC=gnuaout
-	#endif
-	#endif
-	#ifdef __dietlibc__
-	LIBC=dietlibc
-	#endif
-EOF
-	eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
-	    /^LIBC/{
-		s: ::g
-		p
-	    }'`"
-	test x"${LIBC}" != x && {
-		echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
-		exit
-	}
-	test x"${TENTATIVE}" != x && { echo "${TENTATIVE}"; exit; }
-	;;
-    i*86:DYNIX/ptx:4*:*)
-	# ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
-	# earlier versions are messed up and put the nodename in both
-	# sysname and nodename.
-	echo i386-sequent-sysv4
-	exit ;;
-    i*86:UNIX_SV:4.2MP:2.*)
-        # Unixware is an offshoot of SVR4, but it has its own version
-        # number series starting with 2...
-        # I am not positive that other SVR4 systems won't match this,
-	# I just have to hope.  -- rms.
-        # Use sysv4.2uw... so that sysv4* matches it.
-	echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
-	exit ;;
-    i*86:OS/2:*:*)
-	# If we were able to find `uname', then EMX Unix compatibility
-	# is probably installed.
-	echo ${UNAME_MACHINE}-pc-os2-emx
-	exit ;;
-    i*86:XTS-300:*:STOP)
-	echo ${UNAME_MACHINE}-unknown-stop
-	exit ;;
-    i*86:atheos:*:*)
-	echo ${UNAME_MACHINE}-unknown-atheos
-	exit ;;
-    i*86:syllable:*:*)
-	echo ${UNAME_MACHINE}-pc-syllable
-	exit ;;
-    i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*)
-	echo i386-unknown-lynxos${UNAME_RELEASE}
-	exit ;;
-    i*86:*DOS:*:*)
-	echo ${UNAME_MACHINE}-pc-msdosdjgpp
-	exit ;;
-    i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*)
-	UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'`
-	if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
-		echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL}
-	else
-		echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL}
-	fi
-	exit ;;
-    i*86:*:5:[678]*)
-    	# UnixWare 7.x, OpenUNIX and OpenServer 6.
-	case `/bin/uname -X | grep "^Machine"` in
-	    *486*)	     UNAME_MACHINE=i486 ;;
-	    *Pentium)	     UNAME_MACHINE=i586 ;;
-	    *Pent*|*Celeron) UNAME_MACHINE=i686 ;;
-	esac
-	echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}
-	exit ;;
-    i*86:*:3.2:*)
-	if test -f /usr/options/cb.name; then
-		UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
-		echo ${UNAME_MACHINE}-pc-isc$UNAME_REL
-	elif /bin/uname -X 2>/dev/null >/dev/null ; then
-		UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')`
-		(/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486
-		(/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \
-			&& UNAME_MACHINE=i586
-		(/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \
-			&& UNAME_MACHINE=i686
-		(/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \
-			&& UNAME_MACHINE=i686
-		echo ${UNAME_MACHINE}-pc-sco$UNAME_REL
-	else
-		echo ${UNAME_MACHINE}-pc-sysv32
-	fi
-	exit ;;
-    pc:*:*:*)
-	# Left here for compatibility:
-        # uname -m prints for DJGPP always 'pc', but it prints nothing about
-        # the processor, so we play safe by assuming i386.
-	echo i386-pc-msdosdjgpp
-        exit ;;
-    Intel:Mach:3*:*)
-	echo i386-pc-mach3
-	exit ;;
-    paragon:*:*:*)
-	echo i860-intel-osf1
-	exit ;;
-    i860:*:4.*:*) # i860-SVR4
-	if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
-	  echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4
-	else # Add other i860-SVR4 vendors below as they are discovered.
-	  echo i860-unknown-sysv${UNAME_RELEASE}  # Unknown i860-SVR4
-	fi
-	exit ;;
-    mini*:CTIX:SYS*5:*)
-	# "miniframe"
-	echo m68010-convergent-sysv
-	exit ;;
-    mc68k:UNIX:SYSTEM5:3.51m)
-	echo m68k-convergent-sysv
-	exit ;;
-    M680?0:D-NIX:5.3:*)
-	echo m68k-diab-dnix
-	exit ;;
-    M68*:*:R3V[5678]*:*)
-	test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;;
-    3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0)
-	OS_REL=''
-	test -r /etc/.relid \
-	&& OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
-	/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
-	  && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
-	/bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
-	  && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
-    3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
-        /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
-          && { echo i486-ncr-sysv4; exit; } ;;
-    m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
-	echo m68k-unknown-lynxos${UNAME_RELEASE}
-	exit ;;
-    mc68030:UNIX_System_V:4.*:*)
-	echo m68k-atari-sysv4
-	exit ;;
-    TSUNAMI:LynxOS:2.*:*)
-	echo sparc-unknown-lynxos${UNAME_RELEASE}
-	exit ;;
-    rs6000:LynxOS:2.*:*)
-	echo rs6000-unknown-lynxos${UNAME_RELEASE}
-	exit ;;
-    PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*)
-	echo powerpc-unknown-lynxos${UNAME_RELEASE}
-	exit ;;
-    SM[BE]S:UNIX_SV:*:*)
-	echo mips-dde-sysv${UNAME_RELEASE}
-	exit ;;
-    RM*:ReliantUNIX-*:*:*)
-	echo mips-sni-sysv4
-	exit ;;
-    RM*:SINIX-*:*:*)
-	echo mips-sni-sysv4
-	exit ;;
-    *:SINIX-*:*:*)
-	if uname -p 2>/dev/null >/dev/null ; then
-		UNAME_MACHINE=`(uname -p) 2>/dev/null`
-		echo ${UNAME_MACHINE}-sni-sysv4
-	else
-		echo ns32k-sni-sysv
-	fi
-	exit ;;
-    PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
-                      # says <Richard.M.Bartel@ccMail.Census.GOV>
-        echo i586-unisys-sysv4
-        exit ;;
-    *:UNIX_System_V:4*:FTX*)
-	# From Gerald Hewes <hewes@openmarket.com>.
-	# How about differentiating between stratus architectures? -djm
-	echo hppa1.1-stratus-sysv4
-	exit ;;
-    *:*:*:FTX*)
-	# From seanf@swdc.stratus.com.
-	echo i860-stratus-sysv4
-	exit ;;
-    i*86:VOS:*:*)
-	# From Paul.Green@stratus.com.
-	echo ${UNAME_MACHINE}-stratus-vos
-	exit ;;
-    *:VOS:*:*)
-	# From Paul.Green@stratus.com.
-	echo hppa1.1-stratus-vos
-	exit ;;
-    mc68*:A/UX:*:*)
-	echo m68k-apple-aux${UNAME_RELEASE}
-	exit ;;
-    news*:NEWS-OS:6*:*)
-	echo mips-sony-newsos6
-	exit ;;
-    R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
-	if [ -d /usr/nec ]; then
-	        echo mips-nec-sysv${UNAME_RELEASE}
-	else
-	        echo mips-unknown-sysv${UNAME_RELEASE}
-	fi
-        exit ;;
-    BeBox:BeOS:*:*)	# BeOS running on hardware made by Be, PPC only.
-	echo powerpc-be-beos
-	exit ;;
-    BeMac:BeOS:*:*)	# BeOS running on Mac or Mac clone, PPC only.
-	echo powerpc-apple-beos
-	exit ;;
-    BePC:BeOS:*:*)	# BeOS running on Intel PC compatible.
-	echo i586-pc-beos
-	exit ;;
-    SX-4:SUPER-UX:*:*)
-	echo sx4-nec-superux${UNAME_RELEASE}
-	exit ;;
-    SX-5:SUPER-UX:*:*)
-	echo sx5-nec-superux${UNAME_RELEASE}
-	exit ;;
-    SX-6:SUPER-UX:*:*)
-	echo sx6-nec-superux${UNAME_RELEASE}
-	exit ;;
-    SX-7:SUPER-UX:*:*)
-	echo sx7-nec-superux${UNAME_RELEASE}
-	exit ;;
-    SX-8:SUPER-UX:*:*)
-	echo sx8-nec-superux${UNAME_RELEASE}
-	exit ;;
-    SX-8R:SUPER-UX:*:*)
-	echo sx8r-nec-superux${UNAME_RELEASE}
-	exit ;;
-    Power*:Rhapsody:*:*)
-	echo powerpc-apple-rhapsody${UNAME_RELEASE}
-	exit ;;
-    *:Rhapsody:*:*)
-	echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
-	exit ;;
-    *:Darwin:*:*)
-	UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
-	case $UNAME_PROCESSOR in
-	    unknown) UNAME_PROCESSOR=powerpc ;;
-	esac
-	echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
-	exit ;;
-    *:procnto*:*:* | *:QNX:[0123456789]*:*)
-	UNAME_PROCESSOR=`uname -p`
-	if test "$UNAME_PROCESSOR" = "x86"; then
-		UNAME_PROCESSOR=i386
-		UNAME_MACHINE=pc
-	fi
-	echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE}
-	exit ;;
-    *:QNX:*:4*)
-	echo i386-pc-qnx
-	exit ;;
-    NSE-?:NONSTOP_KERNEL:*:*)
-	echo nse-tandem-nsk${UNAME_RELEASE}
-	exit ;;
-    NSR-?:NONSTOP_KERNEL:*:*)
-	echo nsr-tandem-nsk${UNAME_RELEASE}
-	exit ;;
-    *:NonStop-UX:*:*)
-	echo mips-compaq-nonstopux
-	exit ;;
-    BS2000:POSIX*:*:*)
-	echo bs2000-siemens-sysv
-	exit ;;
-    DS/*:UNIX_System_V:*:*)
-	echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE}
-	exit ;;
-    *:Plan9:*:*)
-	# "uname -m" is not consistent, so use $cputype instead. 386
-	# is converted to i386 for consistency with other x86
-	# operating systems.
-	if test "$cputype" = "386"; then
-	    UNAME_MACHINE=i386
-	else
-	    UNAME_MACHINE="$cputype"
-	fi
-	echo ${UNAME_MACHINE}-unknown-plan9
-	exit ;;
-    *:TOPS-10:*:*)
-	echo pdp10-unknown-tops10
-	exit ;;
-    *:TENEX:*:*)
-	echo pdp10-unknown-tenex
-	exit ;;
-    KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*)
-	echo pdp10-dec-tops20
-	exit ;;
-    XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*)
-	echo pdp10-xkl-tops20
-	exit ;;
-    *:TOPS-20:*:*)
-	echo pdp10-unknown-tops20
-	exit ;;
-    *:ITS:*:*)
-	echo pdp10-unknown-its
-	exit ;;
-    SEI:*:*:SEIUX)
-        echo mips-sei-seiux${UNAME_RELEASE}
-	exit ;;
-    *:DragonFly:*:*)
-	echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
-	exit ;;
-    *:*VMS:*:*)
-    	UNAME_MACHINE=`(uname -p) 2>/dev/null`
-	case "${UNAME_MACHINE}" in
-	    A*) echo alpha-dec-vms ; exit ;;
-	    I*) echo ia64-dec-vms ; exit ;;
-	    V*) echo vax-dec-vms ; exit ;;
-	esac ;;
-    *:XENIX:*:SysV)
-	echo i386-pc-xenix
-	exit ;;
-    i*86:skyos:*:*)
-	echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//'
-	exit ;;
-    i*86:rdos:*:*)
-	echo ${UNAME_MACHINE}-pc-rdos
-	exit ;;
-esac
-
-#echo '(No uname command or uname output not recognized.)' 1>&2
-#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2
-
-eval $set_cc_for_build
-cat >$dummy.c <<EOF
-#ifdef _SEQUENT_
-# include <sys/types.h>
-# include <sys/utsname.h>
-#endif
-main ()
-{
-#if defined (sony)
-#if defined (MIPSEB)
-  /* BFD wants "bsd" instead of "newsos".  Perhaps BFD should be changed,
-     I don't know....  */
-  printf ("mips-sony-bsd\n"); exit (0);
-#else
-#include <sys/param.h>
-  printf ("m68k-sony-newsos%s\n",
-#ifdef NEWSOS4
-          "4"
-#else
-	  ""
-#endif
-         ); exit (0);
-#endif
-#endif
-
-#if defined (__arm) && defined (__acorn) && defined (__unix)
-  printf ("arm-acorn-riscix\n"); exit (0);
-#endif
-
-#if defined (hp300) && !defined (hpux)
-  printf ("m68k-hp-bsd\n"); exit (0);
-#endif
-
-#if defined (NeXT)
-#if !defined (__ARCHITECTURE__)
-#define __ARCHITECTURE__ "m68k"
-#endif
-  int version;
-  version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`;
-  if (version < 4)
-    printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version);
-  else
-    printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version);
-  exit (0);
-#endif
-
-#if defined (MULTIMAX) || defined (n16)
-#if defined (UMAXV)
-  printf ("ns32k-encore-sysv\n"); exit (0);
-#else
-#if defined (CMU)
-  printf ("ns32k-encore-mach\n"); exit (0);
-#else
-  printf ("ns32k-encore-bsd\n"); exit (0);
-#endif
-#endif
-#endif
-
-#if defined (__386BSD__)
-  printf ("i386-pc-bsd\n"); exit (0);
-#endif
-
-#if defined (sequent)
-#if defined (i386)
-  printf ("i386-sequent-dynix\n"); exit (0);
-#endif
-#if defined (ns32000)
-  printf ("ns32k-sequent-dynix\n"); exit (0);
-#endif
-#endif
-
-#if defined (_SEQUENT_)
-    struct utsname un;
-
-    uname(&un);
-
-    if (strncmp(un.version, "V2", 2) == 0) {
-	printf ("i386-sequent-ptx2\n"); exit (0);
-    }
-    if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */
-	printf ("i386-sequent-ptx1\n"); exit (0);
-    }
-    printf ("i386-sequent-ptx\n"); exit (0);
-
-#endif
-
-#if defined (vax)
-# if !defined (ultrix)
-#  include <sys/param.h>
-#  if defined (BSD)
-#   if BSD == 43
-      printf ("vax-dec-bsd4.3\n"); exit (0);
-#   else
-#    if BSD == 199006
-      printf ("vax-dec-bsd4.3reno\n"); exit (0);
-#    else
-      printf ("vax-dec-bsd\n"); exit (0);
-#    endif
-#   endif
-#  else
-    printf ("vax-dec-bsd\n"); exit (0);
-#  endif
-# else
-    printf ("vax-dec-ultrix\n"); exit (0);
-# endif
-#endif
-
-#if defined (alliant) && defined (i860)
-  printf ("i860-alliant-bsd\n"); exit (0);
-#endif
-
-  exit (1);
-}
-EOF
-
-$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` &&
-	{ echo "$SYSTEM_NAME"; exit; }
-
-# Apollos put the system type in the environment.
-
-test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; }
-
-# Convex versions that predate uname can use getsysinfo(1)
-
-if [ -x /usr/convex/getsysinfo ]
-then
-    case `getsysinfo -f cpu_type` in
-    c1*)
-	echo c1-convex-bsd
-	exit ;;
-    c2*)
-	if getsysinfo -f scalar_acc
-	then echo c32-convex-bsd
-	else echo c2-convex-bsd
-	fi
-	exit ;;
-    c34*)
-	echo c34-convex-bsd
-	exit ;;
-    c38*)
-	echo c38-convex-bsd
-	exit ;;
-    c4*)
-	echo c4-convex-bsd
-	exit ;;
-    esac
-fi
-
-cat >&2 <<EOF
-$0: unable to guess system type
-
-This script, last modified $timestamp, has failed to recognize
-the operating system you are using. It is advised that you
-download the most up to date version of the config scripts from
-
-  http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.guess
-and
-  http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.sub
-
-If the version you run ($0) is already up to date, please
-send the following data and any information you think might be
-pertinent to <config-patches@gnu.org> in order to provide the needed
-information to handle your system.
-
-config.guess timestamp = $timestamp
-
-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`
-/bin/uname -X     = `(/bin/uname -X) 2>/dev/null`
-
-hostinfo               = `(hostinfo) 2>/dev/null`
-/bin/universe          = `(/bin/universe) 2>/dev/null`
-/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null`
-/bin/arch              = `(/bin/arch) 2>/dev/null`
-/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null`
-/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null`
-
-UNAME_MACHINE = ${UNAME_MACHINE}
-UNAME_RELEASE = ${UNAME_RELEASE}
-UNAME_SYSTEM  = ${UNAME_SYSTEM}
-UNAME_VERSION = ${UNAME_VERSION}
-EOF
-
-exit 1
-
-# Local variables:
-# eval: (add-hook 'write-file-hooks 'time-stamp)
-# time-stamp-start: "timestamp='"
-# time-stamp-format: "%:y-%02m-%02d"
-# time-stamp-end: "'"
-# End:
diff --git a/myserver/config.sub b/myserver/config.sub
deleted file mode 100755
index 1761d8b..0000000
--- a/myserver/config.sub
+++ /dev/null
@@ -1,1626 +0,0 @@
-#! /bin/sh
-# Configuration validation subroutine script.
-#   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-#   2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation,
-#   Inc.
-
-timestamp='2007-06-28'
-
-# This file is (in principle) common to ALL GNU software.
-# The presence of a machine in this file suggests that SOME GNU software
-# can handle that machine.  It does not imply ALL GNU software can.
-#
-# This file 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 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
-# 02110-1301, USA.
-#
-# As a special exception to the GNU General Public License, if you
-# distribute this file as part of a program that contains a
-# configuration script generated by Autoconf, you may include it under
-# the same distribution terms that you use for the rest of that program.
-
-
-# Please send patches to <config-patches@gnu.org>.  Submit a context
-# diff and a properly formatted ChangeLog entry.
-#
-# Configuration subroutine to validate and canonicalize a configuration type.
-# Supply the specified configuration type as an argument.
-# If it is invalid, we print an error message on stderr and exit with code 1.
-# Otherwise, we print the canonical config type on stdout and succeed.
-
-# This file is supposed to be the same for all GNU packages
-# and recognize all the CPU types, system types and aliases
-# that are meaningful with *any* GNU software.
-# Each package is responsible for reporting which valid configurations
-# it does not support.  The user should be able to distinguish
-# a failure to support a valid configuration from a meaningless
-# configuration.
-
-# The goal of this file is to map all the various variations of a given
-# machine specification into a single specification in the form:
-#	CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
-# or in some cases, the newer four-part form:
-#	CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
-# It is wrong to echo any other type of specification.
-
-me=`echo "$0" | sed -e 's,.*/,,'`
-
-usage="\
-Usage: $0 [OPTION] CPU-MFR-OPSYS
-       $0 [OPTION] ALIAS
-
-Canonicalize a configuration name.
-
-Operation modes:
-  -h, --help         print this help, then exit
-  -t, --time-stamp   print date of last modification, then exit
-  -v, --version      print version number, then exit
-
-Report bugs and patches to <config-patches@gnu.org>."
-
-version="\
-GNU config.sub ($timestamp)
-
-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
-Free Software Foundation, Inc.
-
-This is free software; see the source for copying conditions.  There is NO
-warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
-
-help="
-Try \`$me --help' for more information."
-
-# Parse command line
-while test $# -gt 0 ; do
-  case $1 in
-    --time-stamp | --time* | -t )
-       echo "$timestamp" ; exit ;;
-    --version | -v )
-       echo "$version" ; exit ;;
-    --help | --h* | -h )
-       echo "$usage"; exit ;;
-    -- )     # Stop option processing
-       shift; break ;;
-    - )	# Use stdin as input.
-       break ;;
-    -* )
-       echo "$me: invalid option $1$help"
-       exit 1 ;;
-
-    *local*)
-       # First pass through any local machine types.
-       echo $1
-       exit ;;
-
-    * )
-       break ;;
-  esac
-done
-
-case $# in
- 0) echo "$me: missing argument$help" >&2
-    exit 1;;
- 1) ;;
- *) echo "$me: too many arguments$help" >&2
-    exit 1;;
-esac
-
-# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any).
-# Here we must recognize all the valid KERNEL-OS combinations.
-maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
-case $maybe_os in
-  nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \
-  uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \
-  storm-chaos* | os2-emx* | rtmk-nova*)
-    os=-$maybe_os
-    basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
-    ;;
-  *)
-    basic_machine=`echo $1 | sed 's/-[^-]*$//'`
-    if [ $basic_machine != $1 ]
-    then os=`echo $1 | sed 's/.*-/-/'`
-    else os=; fi
-    ;;
-esac
-
-### Let's recognize common machines as not being operating systems so
-### that things like config.sub decstation-3100 work.  We also
-### recognize some manufacturers as not being operating systems, so we
-### can provide default operating systems below.
-case $os in
-	-sun*os*)
-		# Prevent following clause from handling this invalid input.
-		;;
-	-dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \
-	-att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \
-	-unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \
-	-convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
-	-c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
-	-harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
-	-apple | -axis | -knuth | -cray)
-		os=
-		basic_machine=$1
-		;;
-	-sim | -cisco | -oki | -wec | -winbond)
-		os=
-		basic_machine=$1
-		;;
-	-scout)
-		;;
-	-wrs)
-		os=-vxworks
-		basic_machine=$1
-		;;
-	-chorusos*)
-		os=-chorusos
-		basic_machine=$1
-		;;
- 	-chorusrdb)
- 		os=-chorusrdb
-		basic_machine=$1
- 		;;
-	-hiux*)
-		os=-hiuxwe2
-		;;
-	-sco6)
-		os=-sco5v6
-		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
-		;;
-	-sco5)
-		os=-sco3.2v5
-		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
-		;;
-	-sco4)
-		os=-sco3.2v4
-		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
-		;;
-	-sco3.2.[4-9]*)
-		os=`echo $os | sed -e 's/sco3.2./sco3.2v/'`
-		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
-		;;
-	-sco3.2v[4-9]*)
-		# Don't forget version if it is 3.2v4 or newer.
-		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
-		;;
-	-sco5v6*)
-		# Don't forget version if it is 3.2v4 or newer.
-		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
-		;;
-	-sco*)
-		os=-sco3.2v2
-		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
-		;;
-	-udk*)
-		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
-		;;
-	-isc)
-		os=-isc2.2
-		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
-		;;
-	-clix*)
-		basic_machine=clipper-intergraph
-		;;
-	-isc*)
-		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
-		;;
-	-lynx*)
-		os=-lynxos
-		;;
-	-ptx*)
-		basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'`
-		;;
-	-windowsnt*)
-		os=`echo $os | sed -e 's/windowsnt/winnt/'`
-		;;
-	-psos*)
-		os=-psos
-		;;
-	-mint | -mint[0-9]*)
-		basic_machine=m68k-atari
-		os=-mint
-		;;
-esac
-
-# Decode aliases for certain CPU-COMPANY combinations.
-case $basic_machine in
-	# Recognize the basic CPU types without company name.
-	# Some are omitted here because they have special meanings below.
-	1750a | 580 \
-	| a29k \
-	| alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
-	| alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
-	| am33_2.0 \
-	| arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \
-	| bfin \
-	| c4x | clipper \
-	| d10v | d30v | dlx | dsp16xx \
-	| fido | fr30 | frv \
-	| h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
-	| i370 | i860 | i960 | ia64 \
-	| ip2k | iq2000 \
-	| m32c | m32r | m32rle | m68000 | m68k | m88k \
-	| maxq | mb | microblaze | mcore | mep \
-	| mips | mipsbe | mipseb | mipsel | mipsle \
-	| mips16 \
-	| mips64 | mips64el \
-	| mips64vr | mips64vrel \
-	| mips64orion | mips64orionel \
-	| mips64vr4100 | mips64vr4100el \
-	| mips64vr4300 | mips64vr4300el \
-	| mips64vr5000 | mips64vr5000el \
-	| mips64vr5900 | mips64vr5900el \
-	| mipsisa32 | mipsisa32el \
-	| mipsisa32r2 | mipsisa32r2el \
-	| mipsisa64 | mipsisa64el \
-	| mipsisa64r2 | mipsisa64r2el \
-	| mipsisa64sb1 | mipsisa64sb1el \
-	| mipsisa64sr71k | mipsisa64sr71kel \
-	| mipstx39 | mipstx39el \
-	| mn10200 | mn10300 \
-	| mt \
-	| msp430 \
-	| nios | nios2 \
-	| ns16k | ns32k \
-	| or32 \
-	| pdp10 | pdp11 | pj | pjl \
-	| powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
-	| pyramid \
-	| score \
-	| sh | sh[1234] | sh[24]a | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
-	| sh64 | sh64le \
-	| sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
-	| sparcv8 | sparcv9 | sparcv9b | sparcv9v \
-	| spu | strongarm \
-	| tahoe | thumb | tic4x | tic80 | tron \
-	| v850 | v850e \
-	| we32k \
-	| x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \
-	| z8k)
-		basic_machine=$basic_machine-unknown
-		;;
-	m6811 | m68hc11 | m6812 | m68hc12)
-		# Motorola 68HC11/12.
-		basic_machine=$basic_machine-unknown
-		os=-none
-		;;
-	m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k)
-		;;
-	ms1)
-		basic_machine=mt-unknown
-		;;
-
-	# We use `pc' rather than `unknown'
-	# because (1) that's what they normally are, and
-	# (2) the word "unknown" tends to confuse beginning users.
-	i*86 | x86_64)
-	  basic_machine=$basic_machine-pc
-	  ;;
-	# Object if more than one company name word.
-	*-*-*)
-		echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
-		exit 1
-		;;
-	# Recognize the basic CPU types with company name.
-	580-* \
-	| a29k-* \
-	| alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
-	| alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
-	| alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
-	| arm-*  | armbe-* | armle-* | armeb-* | armv*-* \
-	| avr-* | avr32-* \
-	| bfin-* | bs2000-* \
-	| c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \
-	| clipper-* | craynv-* | cydra-* \
-	| d10v-* | d30v-* | dlx-* \
-	| elxsi-* \
-	| f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
-	| h8300-* | h8500-* \
-	| hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
-	| i*86-* | i860-* | i960-* | ia64-* \
-	| ip2k-* | iq2000-* \
-	| m32c-* | m32r-* | m32rle-* \
-	| m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
-	| m88110-* | m88k-* | maxq-* | mcore-* \
-	| mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
-	| mips16-* \
-	| mips64-* | mips64el-* \
-	| mips64vr-* | mips64vrel-* \
-	| mips64orion-* | mips64orionel-* \
-	| mips64vr4100-* | mips64vr4100el-* \
-	| mips64vr4300-* | mips64vr4300el-* \
-	| mips64vr5000-* | mips64vr5000el-* \
-	| mips64vr5900-* | mips64vr5900el-* \
-	| mipsisa32-* | mipsisa32el-* \
-	| mipsisa32r2-* | mipsisa32r2el-* \
-	| mipsisa64-* | mipsisa64el-* \
-	| mipsisa64r2-* | mipsisa64r2el-* \
-	| mipsisa64sb1-* | mipsisa64sb1el-* \
-	| mipsisa64sr71k-* | mipsisa64sr71kel-* \
-	| mipstx39-* | mipstx39el-* \
-	| mmix-* \
-	| mt-* \
-	| msp430-* \
-	| nios-* | nios2-* \
-	| none-* | np1-* | ns16k-* | ns32k-* \
-	| orion-* \
-	| pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
-	| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
-	| pyramid-* \
-	| romp-* | rs6000-* \
-	| sh-* | sh[1234]-* | sh[24]a-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
-	| shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
-	| sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
-	| sparclite-* \
-	| sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \
-	| tahoe-* | thumb-* \
-	| tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
-	| tron-* \
-	| v850-* | v850e-* | vax-* \
-	| we32k-* \
-	| x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \
-	| xstormy16-* | xtensa-* \
-	| ymp-* \
-	| z8k-*)
-		;;
-	# Recognize the various machine names and aliases which stand
-	# for a CPU type and a company and sometimes even an OS.
-	386bsd)
-		basic_machine=i386-unknown
-		os=-bsd
-		;;
-	3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
-		basic_machine=m68000-att
-		;;
-	3b*)
-		basic_machine=we32k-att
-		;;
-	a29khif)
-		basic_machine=a29k-amd
-		os=-udi
-		;;
-    	abacus)
-		basic_machine=abacus-unknown
-		;;
-	adobe68k)
-		basic_machine=m68010-adobe
-		os=-scout
-		;;
-	alliant | fx80)
-		basic_machine=fx80-alliant
-		;;
-	altos | altos3068)
-		basic_machine=m68k-altos
-		;;
-	am29k)
-		basic_machine=a29k-none
-		os=-bsd
-		;;
-	amd64)
-		basic_machine=x86_64-pc
-		;;
-	amd64-*)
-		basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'`
-		;;
-	amdahl)
-		basic_machine=580-amdahl
-		os=-sysv
-		;;
-	amiga | amiga-*)
-		basic_machine=m68k-unknown
-		;;
-	amigaos | amigados)
-		basic_machine=m68k-unknown
-		os=-amigaos
-		;;
-	amigaunix | amix)
-		basic_machine=m68k-unknown
-		os=-sysv4
-		;;
-	apollo68)
-		basic_machine=m68k-apollo
-		os=-sysv
-		;;
-	apollo68bsd)
-		basic_machine=m68k-apollo
-		os=-bsd
-		;;
-	aux)
-		basic_machine=m68k-apple
-		os=-aux
-		;;
-	balance)
-		basic_machine=ns32k-sequent
-		os=-dynix
-		;;
-	c90)
-		basic_machine=c90-cray
-		os=-unicos
-		;;
-	convex-c1)
-		basic_machine=c1-convex
-		os=-bsd
-		;;
-	convex-c2)
-		basic_machine=c2-convex
-		os=-bsd
-		;;
-	convex-c32)
-		basic_machine=c32-convex
-		os=-bsd
-		;;
-	convex-c34)
-		basic_machine=c34-convex
-		os=-bsd
-		;;
-	convex-c38)
-		basic_machine=c38-convex
-		os=-bsd
-		;;
-	cray | j90)
-		basic_machine=j90-cray
-		os=-unicos
-		;;
-	craynv)
-		basic_machine=craynv-cray
-		os=-unicosmp
-		;;
-	cr16)
-		basic_machine=cr16-unknown
-		os=-elf
-		;;
-	crds | unos)
-		basic_machine=m68k-crds
-		;;
-	crisv32 | crisv32-* | etraxfs*)
-		basic_machine=crisv32-axis
-		;;
-	cris | cris-* | etrax*)
-		basic_machine=cris-axis
-		;;
-	crx)
-		basic_machine=crx-unknown
-		os=-elf
-		;;
-	da30 | da30-*)
-		basic_machine=m68k-da30
-		;;
-	decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn)
-		basic_machine=mips-dec
-		;;
-	decsystem10* | dec10*)
-		basic_machine=pdp10-dec
-		os=-tops10
-		;;
-	decsystem20* | dec20*)
-		basic_machine=pdp10-dec
-		os=-tops20
-		;;
-	delta | 3300 | motorola-3300 | motorola-delta \
-	      | 3300-motorola | delta-motorola)
-		basic_machine=m68k-motorola
-		;;
-	delta88)
-		basic_machine=m88k-motorola
-		os=-sysv3
-		;;
-	djgpp)
-		basic_machine=i586-pc
-		os=-msdosdjgpp
-		;;
-	dpx20 | dpx20-*)
-		basic_machine=rs6000-bull
-		os=-bosx
-		;;
-	dpx2* | dpx2*-bull)
-		basic_machine=m68k-bull
-		os=-sysv3
-		;;
-	ebmon29k)
-		basic_machine=a29k-amd
-		os=-ebmon
-		;;
-	elxsi)
-		basic_machine=elxsi-elxsi
-		os=-bsd
-		;;
-	encore | umax | mmax)
-		basic_machine=ns32k-encore
-		;;
-	es1800 | OSE68k | ose68k | ose | OSE)
-		basic_machine=m68k-ericsson
-		os=-ose
-		;;
-	fx2800)
-		basic_machine=i860-alliant
-		;;
-	genix)
-		basic_machine=ns32k-ns
-		;;
-	gmicro)
-		basic_machine=tron-gmicro
-		os=-sysv
-		;;
-	go32)
-		basic_machine=i386-pc
-		os=-go32
-		;;
-	h3050r* | hiux*)
-		basic_machine=hppa1.1-hitachi
-		os=-hiuxwe2
-		;;
-	h8300hms)
-		basic_machine=h8300-hitachi
-		os=-hms
-		;;
-	h8300xray)
-		basic_machine=h8300-hitachi
-		os=-xray
-		;;
-	h8500hms)
-		basic_machine=h8500-hitachi
-		os=-hms
-		;;
-	harris)
-		basic_machine=m88k-harris
-		os=-sysv3
-		;;
-	hp300-*)
-		basic_machine=m68k-hp
-		;;
-	hp300bsd)
-		basic_machine=m68k-hp
-		os=-bsd
-		;;
-	hp300hpux)
-		basic_machine=m68k-hp
-		os=-hpux
-		;;
-	hp3k9[0-9][0-9] | hp9[0-9][0-9])
-		basic_machine=hppa1.0-hp
-		;;
-	hp9k2[0-9][0-9] | hp9k31[0-9])
-		basic_machine=m68000-hp
-		;;
-	hp9k3[2-9][0-9])
-		basic_machine=m68k-hp
-		;;
-	hp9k6[0-9][0-9] | hp6[0-9][0-9])
-		basic_machine=hppa1.0-hp
-		;;
-	hp9k7[0-79][0-9] | hp7[0-79][0-9])
-		basic_machine=hppa1.1-hp
-		;;
-	hp9k78[0-9] | hp78[0-9])
-		# FIXME: really hppa2.0-hp
-		basic_machine=hppa1.1-hp
-		;;
-	hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893)
-		# FIXME: really hppa2.0-hp
-		basic_machine=hppa1.1-hp
-		;;
-	hp9k8[0-9][13679] | hp8[0-9][13679])
-		basic_machine=hppa1.1-hp
-		;;
-	hp9k8[0-9][0-9] | hp8[0-9][0-9])
-		basic_machine=hppa1.0-hp
-		;;
-	hppa-next)
-		os=-nextstep3
-		;;
-	hppaosf)
-		basic_machine=hppa1.1-hp
-		os=-osf
-		;;
-	hppro)
-		basic_machine=hppa1.1-hp
-		os=-proelf
-		;;
-	i370-ibm* | ibm*)
-		basic_machine=i370-ibm
-		;;
-# I'm not sure what "Sysv32" means.  Should this be sysv3.2?
-	i*86v32)
-		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
-		os=-sysv32
-		;;
-	i*86v4*)
-		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
-		os=-sysv4
-		;;
-	i*86v)
-		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
-		os=-sysv
-		;;
-	i*86sol2)
-		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
-		os=-solaris2
-		;;
-	i386mach)
-		basic_machine=i386-mach
-		os=-mach
-		;;
-	i386-vsta | vsta)
-		basic_machine=i386-unknown
-		os=-vsta
-		;;
-	iris | iris4d)
-		basic_machine=mips-sgi
-		case $os in
-		    -irix*)
-			;;
-		    *)
-			os=-irix4
-			;;
-		esac
-		;;
-	isi68 | isi)
-		basic_machine=m68k-isi
-		os=-sysv
-		;;
-	m88k-omron*)
-		basic_machine=m88k-omron
-		;;
-	magnum | m3230)
-		basic_machine=mips-mips
-		os=-sysv
-		;;
-	merlin)
-		basic_machine=ns32k-utek
-		os=-sysv
-		;;
-	mingw32)
-		basic_machine=i386-pc
-		os=-mingw32
-		;;
-	mingw32ce)
-		basic_machine=arm-unknown
-		os=-mingw32ce
-		;;
-	miniframe)
-		basic_machine=m68000-convergent
-		;;
-	*mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*)
-		basic_machine=m68k-atari
-		os=-mint
-		;;
-	mips3*-*)
-		basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
-		;;
-	mips3*)
-		basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
-		;;
-	monitor)
-		basic_machine=m68k-rom68k
-		os=-coff
-		;;
-	morphos)
-		basic_machine=powerpc-unknown
-		os=-morphos
-		;;
-	msdos)
-		basic_machine=i386-pc
-		os=-msdos
-		;;
-	ms1-*)
-		basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`
-		;;
-	mvs)
-		basic_machine=i370-ibm
-		os=-mvs
-		;;
-	ncr3000)
-		basic_machine=i486-ncr
-		os=-sysv4
-		;;
-	netbsd386)
-		basic_machine=i386-unknown
-		os=-netbsd
-		;;
-	netwinder)
-		basic_machine=armv4l-rebel
-		os=-linux
-		;;
-	news | news700 | news800 | news900)
-		basic_machine=m68k-sony
-		os=-newsos
-		;;
-	news1000)
-		basic_machine=m68030-sony
-		os=-newsos
-		;;
-	news-3600 | risc-news)
-		basic_machine=mips-sony
-		os=-newsos
-		;;
-	necv70)
-		basic_machine=v70-nec
-		os=-sysv
-		;;
-	next | m*-next )
-		basic_machine=m68k-next
-		case $os in
-		    -nextstep* )
-			;;
-		    -ns2*)
-		      os=-nextstep2
-			;;
-		    *)
-		      os=-nextstep3
-			;;
-		esac
-		;;
-	nh3000)
-		basic_machine=m68k-harris
-		os=-cxux
-		;;
-	nh[45]000)
-		basic_machine=m88k-harris
-		os=-cxux
-		;;
-	nindy960)
-		basic_machine=i960-intel
-		os=-nindy
-		;;
-	mon960)
-		basic_machine=i960-intel
-		os=-mon960
-		;;
-	nonstopux)
-		basic_machine=mips-compaq
-		os=-nonstopux
-		;;
-	np1)
-		basic_machine=np1-gould
-		;;
-	nsr-tandem)
-		basic_machine=nsr-tandem
-		;;
-	op50n-* | op60c-*)
-		basic_machine=hppa1.1-oki
-		os=-proelf
-		;;
-	openrisc | openrisc-*)
-		basic_machine=or32-unknown
-		;;
-	os400)
-		basic_machine=powerpc-ibm
-		os=-os400
-		;;
-	OSE68000 | ose68000)
-		basic_machine=m68000-ericsson
-		os=-ose
-		;;
-	os68k)
-		basic_machine=m68k-none
-		os=-os68k
-		;;
-	pa-hitachi)
-		basic_machine=hppa1.1-hitachi
-		os=-hiuxwe2
-		;;
-	paragon)
-		basic_machine=i860-intel
-		os=-osf
-		;;
-	pbd)
-		basic_machine=sparc-tti
-		;;
-	pbb)
-		basic_machine=m68k-tti
-		;;
-	pc532 | pc532-*)
-		basic_machine=ns32k-pc532
-		;;
-	pc98)
-		basic_machine=i386-pc
-		;;
-	pc98-*)
-		basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'`
-		;;
-	pentium | p5 | k5 | k6 | nexgen | viac3)
-		basic_machine=i586-pc
-		;;
-	pentiumpro | p6 | 6x86 | athlon | athlon_*)
-		basic_machine=i686-pc
-		;;
-	pentiumii | pentium2 | pentiumiii | pentium3)
-		basic_machine=i686-pc
-		;;
-	pentium4)
-		basic_machine=i786-pc
-		;;
-	pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
-		basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
-		;;
-	pentiumpro-* | p6-* | 6x86-* | athlon-*)
-		basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
-		;;
-	pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*)
-		basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
-		;;
-	pentium4-*)
-		basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'`
-		;;
-	pn)
-		basic_machine=pn-gould
-		;;
-	power)	basic_machine=power-ibm
-		;;
-	ppc)	basic_machine=powerpc-unknown
-		;;
-	ppc-*)	basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
-		;;
-	ppcle | powerpclittle | ppc-le | powerpc-little)
-		basic_machine=powerpcle-unknown
-		;;
-	ppcle-* | powerpclittle-*)
-		basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`
-		;;
-	ppc64)	basic_machine=powerpc64-unknown
-		;;
-	ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'`
-		;;
-	ppc64le | powerpc64little | ppc64-le | powerpc64-little)
-		basic_machine=powerpc64le-unknown
-		;;
-	ppc64le-* | powerpc64little-*)
-		basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'`
-		;;
-	ps2)
-		basic_machine=i386-ibm
-		;;
-	pw32)
-		basic_machine=i586-unknown
-		os=-pw32
-		;;
-	rdos)
-		basic_machine=i386-pc
-		os=-rdos
-		;;
-	rom68k)
-		basic_machine=m68k-rom68k
-		os=-coff
-		;;
-	rm[46]00)
-		basic_machine=mips-siemens
-		;;
-	rtpc | rtpc-*)
-		basic_machine=romp-ibm
-		;;
-	s390 | s390-*)
-		basic_machine=s390-ibm
-		;;
-	s390x | s390x-*)
-		basic_machine=s390x-ibm
-		;;
-	sa29200)
-		basic_machine=a29k-amd
-		os=-udi
-		;;
-	sb1)
-		basic_machine=mipsisa64sb1-unknown
-		;;
-	sb1el)
-		basic_machine=mipsisa64sb1el-unknown
-		;;
-	sde)
-		basic_machine=mipsisa32-sde
-		os=-elf
-		;;
-	sei)
-		basic_machine=mips-sei
-		os=-seiux
-		;;
-	sequent)
-		basic_machine=i386-sequent
-		;;
-	sh)
-		basic_machine=sh-hitachi
-		os=-hms
-		;;
-	sh5el)
-		basic_machine=sh5le-unknown
-		;;
-	sh64)
-		basic_machine=sh64-unknown
-		;;
-	sparclite-wrs | simso-wrs)
-		basic_machine=sparclite-wrs
-		os=-vxworks
-		;;
-	sps7)
-		basic_machine=m68k-bull
-		os=-sysv2
-		;;
-	spur)
-		basic_machine=spur-unknown
-		;;
-	st2000)
-		basic_machine=m68k-tandem
-		;;
-	stratus)
-		basic_machine=i860-stratus
-		os=-sysv4
-		;;
-	sun2)
-		basic_machine=m68000-sun
-		;;
-	sun2os3)
-		basic_machine=m68000-sun
-		os=-sunos3
-		;;
-	sun2os4)
-		basic_machine=m68000-sun
-		os=-sunos4
-		;;
-	sun3os3)
-		basic_machine=m68k-sun
-		os=-sunos3
-		;;
-	sun3os4)
-		basic_machine=m68k-sun
-		os=-sunos4
-		;;
-	sun4os3)
-		basic_machine=sparc-sun
-		os=-sunos3
-		;;
-	sun4os4)
-		basic_machine=sparc-sun
-		os=-sunos4
-		;;
-	sun4sol2)
-		basic_machine=sparc-sun
-		os=-solaris2
-		;;
-	sun3 | sun3-*)
-		basic_machine=m68k-sun
-		;;
-	sun4)
-		basic_machine=sparc-sun
-		;;
-	sun386 | sun386i | roadrunner)
-		basic_machine=i386-sun
-		;;
-	sv1)
-		basic_machine=sv1-cray
-		os=-unicos
-		;;
-	symmetry)
-		basic_machine=i386-sequent
-		os=-dynix
-		;;
-	t3e)
-		basic_machine=alphaev5-cray
-		os=-unicos
-		;;
-	t90)
-		basic_machine=t90-cray
-		os=-unicos
-		;;
-	tic54x | c54x*)
-		basic_machine=tic54x-unknown
-		os=-coff
-		;;
-	tic55x | c55x*)
-		basic_machine=tic55x-unknown
-		os=-coff
-		;;
-	tic6x | c6x*)
-		basic_machine=tic6x-unknown
-		os=-coff
-		;;
-	tx39)
-		basic_machine=mipstx39-unknown
-		;;
-	tx39el)
-		basic_machine=mipstx39el-unknown
-		;;
-	toad1)
-		basic_machine=pdp10-xkl
-		os=-tops20
-		;;
-	tower | tower-32)
-		basic_machine=m68k-ncr
-		;;
-	tpf)
-		basic_machine=s390x-ibm
-		os=-tpf
-		;;
-	udi29k)
-		basic_machine=a29k-amd
-		os=-udi
-		;;
-	ultra3)
-		basic_machine=a29k-nyu
-		os=-sym1
-		;;
-	v810 | necv810)
-		basic_machine=v810-nec
-		os=-none
-		;;
-	vaxv)
-		basic_machine=vax-dec
-		os=-sysv
-		;;
-	vms)
-		basic_machine=vax-dec
-		os=-vms
-		;;
-	vpp*|vx|vx-*)
-		basic_machine=f301-fujitsu
-		;;
-	vxworks960)
-		basic_machine=i960-wrs
-		os=-vxworks
-		;;
-	vxworks68)
-		basic_machine=m68k-wrs
-		os=-vxworks
-		;;
-	vxworks29k)
-		basic_machine=a29k-wrs
-		os=-vxworks
-		;;
-	w65*)
-		basic_machine=w65-wdc
-		os=-none
-		;;
-	w89k-*)
-		basic_machine=hppa1.1-winbond
-		os=-proelf
-		;;
-	xbox)
-		basic_machine=i686-pc
-		os=-mingw32
-		;;
-	xps | xps100)
-		basic_machine=xps100-honeywell
-		;;
-	ymp)
-		basic_machine=ymp-cray
-		os=-unicos
-		;;
-	z8k-*-coff)
-		basic_machine=z8k-unknown
-		os=-sim
-		;;
-	none)
-		basic_machine=none-none
-		os=-none
-		;;
-
-# Here we handle the default manufacturer of certain CPU types.  It is in
-# some cases the only manufacturer, in others, it is the most popular.
-	w89k)
-		basic_machine=hppa1.1-winbond
-		;;
-	op50n)
-		basic_machine=hppa1.1-oki
-		;;
-	op60c)
-		basic_machine=hppa1.1-oki
-		;;
-	romp)
-		basic_machine=romp-ibm
-		;;
-	mmix)
-		basic_machine=mmix-knuth
-		;;
-	rs6000)
-		basic_machine=rs6000-ibm
-		;;
-	vax)
-		basic_machine=vax-dec
-		;;
-	pdp10)
-		# there are many clones, so DEC is not a safe bet
-		basic_machine=pdp10-unknown
-		;;
-	pdp11)
-		basic_machine=pdp11-dec
-		;;
-	we32k)
-		basic_machine=we32k-att
-		;;
-	sh[1234] | sh[24]a | sh[34]eb | sh[1234]le | sh[23]ele)
-		basic_machine=sh-unknown
-		;;
-	sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v)
-		basic_machine=sparc-sun
-		;;
-	cydra)
-		basic_machine=cydra-cydrome
-		;;
-	orion)
-		basic_machine=orion-highlevel
-		;;
-	orion105)
-		basic_machine=clipper-highlevel
-		;;
-	mac | mpw | mac-mpw)
-		basic_machine=m68k-apple
-		;;
-	pmac | pmac-mpw)
-		basic_machine=powerpc-apple
-		;;
-	*-unknown)
-		# Make sure to match an already-canonicalized machine name.
-		;;
-	*)
-		echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
-		exit 1
-		;;
-esac
-
-# Here we canonicalize certain aliases for manufacturers.
-case $basic_machine in
-	*-digital*)
-		basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'`
-		;;
-	*-commodore*)
-		basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'`
-		;;
-	*)
-		;;
-esac
-
-# Decode manufacturer-specific aliases for certain operating systems.
-
-if [ x"$os" != x"" ]
-then
-case $os in
-        # First match some system type aliases
-        # that might get confused with valid system types.
-	# -solaris* is a basic system type, with this one exception.
-	-solaris1 | -solaris1.*)
-		os=`echo $os | sed -e 's|solaris1|sunos4|'`
-		;;
-	-solaris)
-		os=-solaris2
-		;;
-	-svr4*)
-		os=-sysv4
-		;;
-	-unixware*)
-		os=-sysv4.2uw
-		;;
-	-gnu/linux*)
-		os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'`
-		;;
-	# First accept the basic system types.
-	# The portable systems comes first.
-	# Each alternative MUST END IN A *, to match a version number.
-	# -sysv* is not here because it comes later, after sysvr4.
-	-gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
-	      | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\
-	      | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \
-	      | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
-	      | -aos* \
-	      | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
-	      | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
-	      | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
-	      | -openbsd* | -solidbsd* \
-	      | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
-	      | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
-	      | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
-	      | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
-	      | -chorusos* | -chorusrdb* \
-	      | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
-	      | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \
-	      | -uxpv* | -beos* | -mpeix* | -udk* \
-	      | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
-	      | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
-	      | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
-	      | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
-	      | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
-	      | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
-	      | -skyos* | -haiku* | -rdos* | -toppers* | -drops*)
-	# Remember, each alternative MUST END IN *, to match a version number.
-		;;
-	-qnx*)
-		case $basic_machine in
-		    x86-* | i*86-*)
-			;;
-		    *)
-			os=-nto$os
-			;;
-		esac
-		;;
-	-nto-qnx*)
-		;;
-	-nto*)
-		os=`echo $os | sed -e 's|nto|nto-qnx|'`
-		;;
-	-sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
-	      | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \
-	      | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)
-		;;
-	-mac*)
-		os=`echo $os | sed -e 's|mac|macos|'`
-		;;
-	-linux-dietlibc)
-		os=-linux-dietlibc
-		;;
-	-linux*)
-		os=`echo $os | sed -e 's|linux|linux-gnu|'`
-		;;
-	-sunos5*)
-		os=`echo $os | sed -e 's|sunos5|solaris2|'`
-		;;
-	-sunos6*)
-		os=`echo $os | sed -e 's|sunos6|solaris3|'`
-		;;
-	-opened*)
-		os=-openedition
-		;;
-        -os400*)
-		os=-os400
-		;;
-	-wince*)
-		os=-wince
-		;;
-	-osfrose*)
-		os=-osfrose
-		;;
-	-osf*)
-		os=-osf
-		;;
-	-utek*)
-		os=-bsd
-		;;
-	-dynix*)
-		os=-bsd
-		;;
-	-acis*)
-		os=-aos
-		;;
-	-atheos*)
-		os=-atheos
-		;;
-	-syllable*)
-		os=-syllable
-		;;
-	-386bsd)
-		os=-bsd
-		;;
-	-ctix* | -uts*)
-		os=-sysv
-		;;
-	-nova*)
-		os=-rtmk-nova
-		;;
-	-ns2 )
-		os=-nextstep2
-		;;
-	-nsk*)
-		os=-nsk
-		;;
-	# Preserve the version number of sinix5.
-	-sinix5.*)
-		os=`echo $os | sed -e 's|sinix|sysv|'`
-		;;
-	-sinix*)
-		os=-sysv4
-		;;
-        -tpf*)
-		os=-tpf
-		;;
-	-triton*)
-		os=-sysv3
-		;;
-	-oss*)
-		os=-sysv3
-		;;
-	-svr4)
-		os=-sysv4
-		;;
-	-svr3)
-		os=-sysv3
-		;;
-	-sysvr4)
-		os=-sysv4
-		;;
-	# This must come after -sysvr4.
-	-sysv*)
-		;;
-	-ose*)
-		os=-ose
-		;;
-	-es1800*)
-		os=-ose
-		;;
-	-xenix)
-		os=-xenix
-		;;
-	-*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
-		os=-mint
-		;;
-	-aros*)
-		os=-aros
-		;;
-	-kaos*)
-		os=-kaos
-		;;
-	-zvmoe)
-		os=-zvmoe
-		;;
-	-none)
-		;;
-	*)
-		# Get rid of the `-' at the beginning of $os.
-		os=`echo $os | sed 's/[^-]*-//'`
-		echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2
-		exit 1
-		;;
-esac
-else
-
-# Here we handle the default operating systems that come with various machines.
-# The value should be what the vendor currently ships out the door with their
-# machine or put another way, the most popular os provided with the machine.
-
-# Note that if you're going to try to match "-MANUFACTURER" here (say,
-# "-sun"), then you have to tell the case statement up towards the top
-# that MANUFACTURER isn't an operating system.  Otherwise, code above
-# will signal an error saying that MANUFACTURER isn't an operating
-# system, and we'll never get to this point.
-
-case $basic_machine in
-        score-*)
-		os=-elf
-		;;
-        spu-*)
-		os=-elf
-		;;
-	*-acorn)
-		os=-riscix1.2
-		;;
-	arm*-rebel)
-		os=-linux
-		;;
-	arm*-semi)
-		os=-aout
-		;;
-        c4x-* | tic4x-*)
-        	os=-coff
-		;;
-	# This must come before the *-dec entry.
-	pdp10-*)
-		os=-tops20
-		;;
-	pdp11-*)
-		os=-none
-		;;
-	*-dec | vax-*)
-		os=-ultrix4.2
-		;;
-	m68*-apollo)
-		os=-domain
-		;;
-	i386-sun)
-		os=-sunos4.0.2
-		;;
-	m68000-sun)
-		os=-sunos3
-		# This also exists in the configure program, but was not the
-		# default.
-		# os=-sunos4
-		;;
-	m68*-cisco)
-		os=-aout
-		;;
-        mep-*)
-		os=-elf
-		;;
-	mips*-cisco)
-		os=-elf
-		;;
-	mips*-*)
-		os=-elf
-		;;
-	or32-*)
-		os=-coff
-		;;
-	*-tti)	# must be before sparc entry or we get the wrong os.
-		os=-sysv3
-		;;
-	sparc-* | *-sun)
-		os=-sunos4.1.1
-		;;
-	*-be)
-		os=-beos
-		;;
-	*-haiku)
-		os=-haiku
-		;;
-	*-ibm)
-		os=-aix
-		;;
-    	*-knuth)
-		os=-mmixware
-		;;
-	*-wec)
-		os=-proelf
-		;;
-	*-winbond)
-		os=-proelf
-		;;
-	*-oki)
-		os=-proelf
-		;;
-	*-hp)
-		os=-hpux
-		;;
-	*-hitachi)
-		os=-hiux
-		;;
-	i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent)
-		os=-sysv
-		;;
-	*-cbm)
-		os=-amigaos
-		;;
-	*-dg)
-		os=-dgux
-		;;
-	*-dolphin)
-		os=-sysv3
-		;;
-	m68k-ccur)
-		os=-rtu
-		;;
-	m88k-omron*)
-		os=-luna
-		;;
-	*-next )
-		os=-nextstep
-		;;
-	*-sequent)
-		os=-ptx
-		;;
-	*-crds)
-		os=-unos
-		;;
-	*-ns)
-		os=-genix
-		;;
-	i370-*)
-		os=-mvs
-		;;
-	*-next)
-		os=-nextstep3
-		;;
-	*-gould)
-		os=-sysv
-		;;
-	*-highlevel)
-		os=-bsd
-		;;
-	*-encore)
-		os=-bsd
-		;;
-	*-sgi)
-		os=-irix
-		;;
-	*-siemens)
-		os=-sysv4
-		;;
-	*-masscomp)
-		os=-rtu
-		;;
-	f30[01]-fujitsu | f700-fujitsu)
-		os=-uxpv
-		;;
-	*-rom68k)
-		os=-coff
-		;;
-	*-*bug)
-		os=-coff
-		;;
-	*-apple)
-		os=-macos
-		;;
-	*-atari*)
-		os=-mint
-		;;
-	*)
-		os=-none
-		;;
-esac
-fi
-
-# Here we handle the case where we know the os, and the CPU type, but not the
-# manufacturer.  We pick the logical manufacturer.
-vendor=unknown
-case $basic_machine in
-	*-unknown)
-		case $os in
-			-riscix*)
-				vendor=acorn
-				;;
-			-sunos*)
-				vendor=sun
-				;;
-			-aix*)
-				vendor=ibm
-				;;
-			-beos*)
-				vendor=be
-				;;
-			-hpux*)
-				vendor=hp
-				;;
-			-mpeix*)
-				vendor=hp
-				;;
-			-hiux*)
-				vendor=hitachi
-				;;
-			-unos*)
-				vendor=crds
-				;;
-			-dgux*)
-				vendor=dg
-				;;
-			-luna*)
-				vendor=omron
-				;;
-			-genix*)
-				vendor=ns
-				;;
-			-mvs* | -opened*)
-				vendor=ibm
-				;;
-			-os400*)
-				vendor=ibm
-				;;
-			-ptx*)
-				vendor=sequent
-				;;
-			-tpf*)
-				vendor=ibm
-				;;
-			-vxsim* | -vxworks* | -windiss*)
-				vendor=wrs
-				;;
-			-aux*)
-				vendor=apple
-				;;
-			-hms*)
-				vendor=hitachi
-				;;
-			-mpw* | -macos*)
-				vendor=apple
-				;;
-			-*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
-				vendor=atari
-				;;
-			-vos*)
-				vendor=stratus
-				;;
-		esac
-		basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
-		;;
-esac
-
-echo $basic_machine$os
-exit
-
-# Local variables:
-# eval: (add-hook 'write-file-hooks 'time-stamp)
-# time-stamp-start: "timestamp='"
-# time-stamp-format: "%:y-%02m-%02d"
-# time-stamp-end: "'"
-# End:
diff --git a/myserver/configure.in b/myserver/configure.ac
similarity index 96%
rename from myserver/configure.in
rename to myserver/configure.ac
index 5102d2a..0474f21 100644
--- a/myserver/configure.in
+++ b/myserver/configure.ac
@@ -17,7 +17,7 @@ dnl You should have received a copy of the GNU General Public License
 dnl along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 AC_INIT([GNU MyServer], m4_esyscmd([cat version]), [bug-myserver@gnu.org])
-AC_PREREQ([2.50])
+AC_PREREQ([2.61])
 AM_CONFIG_HEADER(config.h)
 CFLAGS="${CFLAGS=}"
 CXXFLAGS="${CXXFLAGS=}"
@@ -25,28 +25,33 @@ LDFLAGS="${LDFLAGS=}"
 AC_CANONICAL_HOST
 AC_CANONICAL_TARGET
 
-AM_INIT_AUTOMAKE
+AM_INIT_AUTOMAKE([gnu])
 
-PACKAGE_STRING="m4_esyscmd([cat version])"
-MYSERVER_VERSION="${PACKAGE_STRING}"
-
-AC_SUBST(MYSERVER_VERSION)
-
-AC_DEFINE_UNQUOTED([MYSERVER_VERSION], ["${MYSERVER_VERSION}"], [The software version])
+AC_CONFIG_MACRO_DIR([m4])
 
+AC_PROG_INSTALL
 AC_PROG_CC
-AC_PROG_CPP
+AC_PROG_CXX
+
 AC_AIX
 AC_ISC_POSIX
 AC_MINIX
 AC_HEADER_STDC
-AC_PROG_CXX
-AC_PROG_CXXCPP
-AC_PROG_RANLIB
-AC_PROG_LIBTOOL
 AM_PROG_LEX
 AC_PROG_YACC
 AC_C_BIGENDIAN
+AC_PROG_RANLIB
+AC_PROG_LIBTOOL
+
+AC_CANONICAL_HOST
+AC_LIBTOOL_WIN32_DLL
+
+PACKAGE_STRING="m4_esyscmd([cat version])"
+MYSERVER_VERSION="${PACKAGE_STRING}"
+
+AC_SUBST(MYSERVER_VERSION)
+
+AC_DEFINE_UNQUOTED([MYSERVER_VERSION], ["${MYSERVER_VERSION}"], [The software version])
 
 AM_GNU_GETTEXT([external])
 
@@ -58,10 +63,6 @@ else
    MAKE_DOC=yes
 fi
 
-CFLAGS="$CFLAGS $_LT_AC_TAGVAR(lt_prog_compiler_pic, CXX)"
-CXXFLAGS="$CXXFLAGS $_LT_AC_TAGVAR(lt_prog_compiler_pic, CXX)"
-LDFLAGS="$LDFLAGS $_LT_AC_TAGVAR(lt_prog_compiler_pic, CXX)"
-
 AC_ARG_ENABLE([ipv6], [--enable-ipv6 Build with IPv6 support], enable_ipv6="yes", enable_ipv6="")
 
 AC_ARG_ENABLE([tests], [--disable-tests Disable the tests suite],
@@ -110,7 +111,14 @@ case "${host}" in
      ;;
   *)
      dnl Looking for pthreads
-     GNOME_PTHREAD_CHECK
+        PTHREAD_LIB="" 
+        AC_CHECK_LIB(pthread, pthread_create, PTHREAD_LIB="-lpthread",
+                [AC_CHECK_LIB(pthreads, pthread_create, PTHREAD_LIB="-lpthreads",
+                    [AC_CHECK_LIB(c_r, pthread_create, PTHREAD_LIB="-lc_r",
+                        [AC_CHECK_FUNC(pthread_create)]
+                    )]
+                )]
+        )
      if test x$PTHREAD_LIB = x; then
              AC_MSG_ERROR([
              *** This system appears to have no posix threads
@@ -118,6 +126,10 @@ case "${host}" in
              ])
     fi
 
+
+
+        AC_SUBST(PTHREAD_LIB)
+
     dnl Looking for dl
     AC_SEARCH_LIBS([dlopen], [dl c], have_dl=yes)
 
diff --git a/myserver/depcomp b/myserver/depcomp
deleted file mode 100755
index 0d1c6db..0000000
--- a/myserver/depcomp
+++ /dev/null
@@ -1,423 +0,0 @@
-#! /bin/sh
-
-# depcomp - compile a program generating dependencies as side-effects
-# Copyright 1999, 2000 Free Software Foundation, Inc.
-
-# This program 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.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
-# 02110-1301, USA.
-
-# As a special exception to the GNU General Public License, if you
-# distribute this file as part of a program that contains a
-# configuration script generated by Autoconf, you may include it under
-# the same distribution terms that you use for the rest of that program.
-
-# Originally written by Alexandre Oliva <oliva@dcc.unicamp.br>.
-
-if test -z "$depmode" || test -z "$source" || test -z "$object"; then
-  echo "depcomp: Variables source, object and depmode must be set" 1>&2
-  exit 1
-fi
-# `libtool' can also be set to `yes' or `no'.
-
-if test -z "$depfile"; then
-   base=`echo "$object" | sed -e 's,^.*/,,' -e 's,\.\([^.]*\)$,.P\1,'`
-   dir=`echo "$object" | sed 's,/.*$,/,'`
-   if test "$dir" = "$object"; then
-      dir=
-   fi
-   # FIXME: should be _deps on DOS.
-   depfile="$dir.deps/$base"
-fi
-
-tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`}
-
-rm -f "$tmpdepfile"
-
-# Some modes work just like other modes, but use different flags.  We
-# parameterize here, but still list the modes in the big case below,
-# to make depend.m4 easier to write.  Note that we *cannot* use a case
-# here, because this file can only contain one case statement.
-if test "$depmode" = hp; then
-  # HP compiler uses -M and no extra arg.
-  gccflag=-M
-  depmode=gcc
-fi
-
-if test "$depmode" = dashXmstdout; then
-   # This is just like dashmstdout with a different argument.
-   dashmflag=-xM
-   depmode=dashmstdout
-fi
-
-case "$depmode" in
-gcc3)
-## gcc 3 implements dependency tracking that does exactly what
-## we want.  Yay!  Note: for some reason libtool 1.4 doesn't like
-## it if -MD -MP comes after the -MF stuff.  Hmm.
-  "$@" -MT "$object" -MD -MP -MF "$tmpdepfile"
-  stat=$?
-  if test $stat -eq 0; then :
-  else
-    rm -f "$tmpdepfile"
-    exit $stat
-  fi
-  mv "$tmpdepfile" "$depfile"
-  ;;
-
-gcc)
-## There are various ways to get dependency output from gcc.  Here's
-## why we pick this rather obscure method:
-## - Don't want to use -MD because we'd like the dependencies to end
-##   up in a subdir.  Having to rename by hand is ugly.
-##   (We might end up doing this anyway to support other compilers.)
-## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like
-##   -MM, not -M (despite what the docs say).
-## - Using -M directly means running the compiler twice (even worse
-##   than renaming).
-  if test -z "$gccflag"; then
-    gccflag=-MD,
-  fi
-  "$@" -Wp,"$gccflag$tmpdepfile"
-  stat=$?
-  if test $stat -eq 0; then :
-  else
-    rm -f "$tmpdepfile"
-    exit $stat
-  fi
-  rm -f "$depfile"
-  echo "$object : \\" > "$depfile"
-  alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz
-## The second -e expression handles DOS-style file names with drive letters.
-  sed -e 's/^[^:]*: / /' \
-      -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile"
-## This next piece of magic avoids the `deleted header file' problem.
-## The problem is that when a header file which appears in a .P file
-## is deleted, the dependency causes make to die (because there is
-## typically no way to rebuild the header).  We avoid this by adding
-## dummy dependencies for each header file.  Too bad gcc doesn't do
-## this for us directly.
-  tr ' ' '
-' < "$tmpdepfile" |
-## Some versions of gcc put a space before the `:'.  On the theory
-## that the space means something, we add a space to the output as
-## well.
-## Some versions of the HPUX 10.20 sed can't process this invocation
-## correctly.  Breaking it into two sed invocations is a workaround.
-    sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
-  rm -f "$tmpdepfile"
-  ;;
-
-hp)
-  # This case exists only to let depend.m4 do its work.  It works by
-  # looking at the text of this script.  This case will never be run,
-  # since it is checked for above.
-  exit 1
-  ;;
-
-sgi)
-  if test "$libtool" = yes; then
-    "$@" "-Wp,-MDupdate,$tmpdepfile"
-  else
-    "$@" -MDupdate "$tmpdepfile"
-  fi
-  stat=$?
-  if test $stat -eq 0; then :
-  else
-    rm -f "$tmpdepfile"
-    exit $stat
-  fi
-  rm -f "$depfile"
-
-  if test -f "$tmpdepfile"; then  # yes, the sourcefile depend on other files
-    echo "$object : \\" > "$depfile"
-
-    # Clip off the initial element (the dependent).  Don't try to be
-    # clever and replace this with sed code, as IRIX sed won't handle
-    # lines with more than a fixed number of characters (4096 in
-    # IRIX 6.2 sed, 8192 in IRIX 6.5).  We also remove comment lines;
-    # the IRIX cc adds comments like `#:fec' to the end of the
-    # dependency line.
-    tr ' ' '
-' < "$tmpdepfile" \
-    | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \
-    tr '
-' ' ' >> $depfile
-    echo >> $depfile
-
-    # The second pass generates a dummy entry for each header file.
-    tr ' ' '
-' < "$tmpdepfile" \
-   | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \
-   >> $depfile
-  else
-    # The sourcefile does not contain any dependencies, so just
-    # store a dummy comment line, to avoid errors with the Makefile
-    # "include basename.Plo" scheme.
-    echo "#dummy" > "$depfile"
-  fi
-  rm -f "$tmpdepfile"
-  ;;
-
-aix)
-  # The C for AIX Compiler uses -M and outputs the dependencies
-  # in a .u file.  This file always lives in the current directory.
-  # Also, the AIX compiler puts `$object:' at the start of each line;
-  # $object doesn't have directory information.
-  stripped=`echo "$object" | sed -e 's,^.*/,,' -e 's/\(.*\)\..*$/\1/'`
-  tmpdepfile="$stripped.u"
-  outname="$stripped.o"
-  if test "$libtool" = yes; then
-    "$@" -Wc,-M
-  else
-    "$@" -M
-  fi
-
-  stat=$?
-  if test $stat -eq 0; then :
-  else
-    rm -f "$tmpdepfile"
-    exit $stat
-  fi
-
-  if test -f "$tmpdepfile"; then
-    # Each line is of the form `foo.o: dependent.h'.
-    # Do two passes, one to just change these to
-    # `$object: dependent.h' and one to simply `dependent.h:'.
-    sed -e "s,^$outname:,$object :," < "$tmpdepfile" > "$depfile"
-    sed -e "s,^$outname: \(.*\)$,\1:," < "$tmpdepfile" >> "$depfile"
-  else
-    # The sourcefile does not contain any dependencies, so just
-    # store a dummy comment line, to avoid errors with the Makefile
-    # "include basename.Plo" scheme.
-    echo "#dummy" > "$depfile"
-  fi
-  rm -f "$tmpdepfile"
-  ;;
-
-tru64)
-   # The Tru64 compiler uses -MD to generate dependencies as a side
-   # effect.  `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'.
-   # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put
-   # dependencies in `foo.d' instead, so we check for that too.
-   # Subdirectories are respected.
-   dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
-   test "x$dir" = "x$object" && dir=
-   base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
-
-   if test "$libtool" = yes; then
-      tmpdepfile1="$dir.libs/$base.lo.d"
-      tmpdepfile2="$dir.libs/$base.d"
-      "$@" -Wc,-MD
-   else
-      tmpdepfile1="$dir$base.o.d"
-      tmpdepfile2="$dir$base.d"
-      "$@" -MD
-   fi
-
-   stat=$?
-   if test $stat -eq 0; then :
-   else
-      rm -f "$tmpdepfile1" "$tmpdepfile2"
-      exit $stat
-   fi
-
-   if test -f "$tmpdepfile1"; then
-      tmpdepfile="$tmpdepfile1"
-   else
-      tmpdepfile="$tmpdepfile2"
-   fi
-   if test -f "$tmpdepfile"; then
-      sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
-      # That's a space and a tab in the [].
-      sed -e 's,^.*\.[a-z]*:[ 	]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
-   else
-      echo "#dummy" > "$depfile"
-   fi
-   rm -f "$tmpdepfile"
-   ;;
-
-#nosideeffect)
-  # This comment above is used by automake to tell side-effect
-  # dependency tracking mechanisms from slower ones.
-
-dashmstdout)
-  # Important note: in order to support this mode, a compiler *must*
-  # always write the proprocessed file to stdout, regardless of -o.
-  "$@" || exit $?
-
-  # Remove the call to Libtool.
-  if test "$libtool" = yes; then
-    while test $1 != '--mode=compile'; do
-      shift
-    done
-    shift
-  fi
-
-  # Remove `-o $object'.  We will use -o /dev/null later,
-  # however we can't do the remplacement now because
-  # `-o $object' might simply not be used
-  IFS=" "
-  for arg
-  do
-    case $arg in
-    -o)
-      shift
-      ;;
-    $object)
-      shift
-      ;;
-    *)
-      set fnord "$@" "$arg"
-      shift # fnord
-      shift # $arg
-      ;;
-    esac
-  done
-
-  test -z "$dashmflag" && dashmflag=-M
-  "$@" -o /dev/null $dashmflag | sed 's:^[^:]*\:[ 	]*:'"$object"'\: :' > "$tmpdepfile"
-  rm -f "$depfile"
-  cat < "$tmpdepfile" > "$depfile"
-  tr ' ' '
-' < "$tmpdepfile" | \
-## Some versions of the HPUX 10.20 sed can't process this invocation
-## correctly.  Breaking it into two sed invocations is a workaround.
-    sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
-  rm -f "$tmpdepfile"
-  ;;
-
-dashXmstdout)
-  # This case only exists to satisfy depend.m4.  It is never actually
-  # run, as this mode is specially recognized in the preamble.
-  exit 1
-  ;;
-
-makedepend)
-  "$@" || exit $?
-  # X makedepend
-  shift
-  cleared=no
-  for arg in "$@"; do
-    case $cleared in
-    no)
-      set ""; shift
-      cleared=yes ;;
-    esac
-    case "$arg" in
-    -D*|-I*)
-      set fnord "$@" "$arg"; shift ;;
-    -*)
-      ;;
-    *)
-      set fnord "$@" "$arg"; shift ;;
-    esac
-  done
-  obj_suffix="`echo $object | sed 's/^.*\././'`"
-  touch "$tmpdepfile"
-  ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@"
-  rm -f "$depfile"
-  cat < "$tmpdepfile" > "$depfile"
-  sed '1,2d' "$tmpdepfile" | tr ' ' '
-' | \
-## Some versions of the HPUX 10.20 sed can't process this invocation
-## correctly.  Breaking it into two sed invocations is a workaround.
-    sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
-  rm -f "$tmpdepfile" "$tmpdepfile".bak
-  ;;
-
-cpp)
-  # Important note: in order to support this mode, a compiler *must*
-  # always write the proprocessed file to stdout.
-  "$@" || exit $?
-
-  # Remove the call to Libtool.
-  if test "$libtool" = yes; then
-    while test $1 != '--mode=compile'; do
-      shift
-    done
-    shift
-  fi
-
-  # Remove `-o $object'.
-  IFS=" "
-  for arg
-  do
-    case $arg in
-    -o)
-      shift
-      ;;
-    $object)
-      shift
-      ;;
-    *)
-      set fnord "$@" "$arg"
-      shift # fnord
-      shift # $arg
-      ;;
-    esac
-  done
-
-  "$@" -E |
-    sed -n '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' |
-    sed '$ s: \\$::' > "$tmpdepfile"
-  rm -f "$depfile"
-  echo "$object : \\" > "$depfile"
-  cat < "$tmpdepfile" >> "$depfile"
-  sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile"
-  rm -f "$tmpdepfile"
-  ;;
-
-msvisualcpp)
-  # Important note: in order to support this mode, a compiler *must*
-  # always write the proprocessed file to stdout, regardless of -o,
-  # because we must use -o when running libtool.
-  "$@" || exit $?
-  IFS=" "
-  for arg
-  do
-    case "$arg" in
-    "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI")
-	set fnord "$@"
-	shift
-	shift
-	;;
-    *)
-	set fnord "$@" "$arg"
-	shift
-	shift
-	;;
-    esac
-  done
-  "$@" -E |
-  sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::echo "`cygpath -u \\"\1\\"`":p' | sort | uniq > "$tmpdepfile"
-  rm -f "$depfile"
-  echo "$object : \\" > "$depfile"
-  . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s::	\1 \\:p' >> "$depfile"
-  echo "	" >> "$depfile"
-  . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s::\1\::p' >> "$depfile"
-  rm -f "$tmpdepfile"
-  ;;
-
-none)
-  exec "$@"
-  ;;
-
-*)
-  echo "Unknown depmode $depmode" 1>&2
-  exit 1
-  ;;
-esac
-
-exit 0
diff --git a/myserver/install-sh b/myserver/install-sh
deleted file mode 100755
index 4fbbae7..0000000
--- a/myserver/install-sh
+++ /dev/null
@@ -1,507 +0,0 @@
-#!/bin/sh
-# install - install a program, script, or datafile
-
-scriptversion=2006-10-14.15
-
-# This originates from X11R5 (mit/util/scripts/install.sh), which was
-# later released in X11R6 (xc/config/util/install.sh) with the
-# following copyright and license.
-#
-# Copyright (C) 1994 X Consortium
-#
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of this software and associated documentation files (the "Software"), to
-# deal in the Software without restriction, including without limitation the
-# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
-# sell copies of the Software, and to permit persons to whom the Software is
-# furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included in
-# all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
-# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
-# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC-
-# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-#
-# Except as contained in this notice, the name of the X Consortium shall not
-# be used in advertising or otherwise to promote the sale, use or other deal-
-# ings in this Software without prior written authorization from the X Consor-
-# tium.
-#
-#
-# FSF changes to this file are in the public domain.
-#
-# 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.
-
-nl='
-'
-IFS=" ""	$nl"
-
-# set DOITPROG to echo to test this script
-
-# Don't use :- since 4.3BSD and earlier shells don't like it.
-doit="${DOITPROG-}"
-if test -z "$doit"; then
-  doit_exec=exec
-else
-  doit_exec=$doit
-fi
-
-# Put in absolute file names if you don't have them in your path;
-# or use environment 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}"
-
-posix_glob=
-posix_mkdir=
-
-# Desired mode of installed file.
-mode=0755
-
-chmodcmd=$chmodprog
-chowncmd=
-chgrpcmd=
-stripcmd=
-rmcmd="$rmprog -f"
-mvcmd="$mvprog"
-src=
-dst=
-dir_arg=
-dstarg=
-no_target_directory=
-
-usage="Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE
-   or: $0 [OPTION]... SRCFILES... DIRECTORY
-   or: $0 [OPTION]... -t DIRECTORY SRCFILES...
-   or: $0 [OPTION]... -d DIRECTORIES...
-
-In the 1st form, copy SRCFILE to DSTFILE.
-In the 2nd and 3rd, copy all SRCFILES to DIRECTORY.
-In the 4th, create DIRECTORIES.
-
-Options:
--c         (ignored)
--d         create directories instead of installing files.
--g GROUP   $chgrpprog installed files to GROUP.
--m MODE    $chmodprog installed files to MODE.
--o USER    $chownprog installed files to USER.
--s         $stripprog installed files.
--t DIRECTORY  install into DIRECTORY.
--T         report an error if DSTFILE is a directory.
---help     display this help and exit.
---version  display version info and exit.
-
-Environment variables override the default commands:
-  CHGRPPROG CHMODPROG CHOWNPROG CPPROG MKDIRPROG MVPROG RMPROG STRIPPROG
-"
-
-while test $# -ne 0; do
-  case $1 in
-    -c) shift
-        continue;;
-
-    -d) dir_arg=true
-        shift
-        continue;;
-
-    -g) chgrpcmd="$chgrpprog $2"
-        shift
-        shift
-        continue;;
-
-    --help) echo "$usage"; exit $?;;
-
-    -m) mode=$2
-        shift
-        shift
-	case $mode in
-	  *' '* | *'	'* | *'
-'*	  | *'*'* | *'?'* | *'['*)
-	    echo "$0: invalid mode: $mode" >&2
-	    exit 1;;
-	esac
-        continue;;
-
-    -o) chowncmd="$chownprog $2"
-        shift
-        shift
-        continue;;
-
-    -s) stripcmd=$stripprog
-        shift
-        continue;;
-
-    -t) dstarg=$2
-	shift
-	shift
-	continue;;
-
-    -T) no_target_directory=true
-	shift
-	continue;;
-
-    --version) echo "$0 $scriptversion"; exit $?;;
-
-    --)	shift
-	break;;
-
-    -*)	echo "$0: invalid option: $1" >&2
-	exit 1;;
-
-    *)  break;;
-  esac
-done
-
-if test $# -ne 0 && test -z "$dir_arg$dstarg"; then
-  # When -d is used, all remaining arguments are directories to create.
-  # When -t is used, the destination is already specified.
-  # Otherwise, the last argument is the destination.  Remove it from $@.
-  for arg
-  do
-    if test -n "$dstarg"; then
-      # $@ is not empty: it contains at least $arg.
-      set fnord "$@" "$dstarg"
-      shift # fnord
-    fi
-    shift # arg
-    dstarg=$arg
-  done
-fi
-
-if test $# -eq 0; then
-  if test -z "$dir_arg"; then
-    echo "$0: no input file specified." >&2
-    exit 1
-  fi
-  # It's OK to call `install-sh -d' without argument.
-  # This can happen when creating conditional directories.
-  exit 0
-fi
-
-if test -z "$dir_arg"; then
-  trap '(exit $?); exit' 1 2 13 15
-
-  # Set umask so as not to create temps with too-generous modes.
-  # However, 'strip' requires both read and write access to temps.
-  case $mode in
-    # Optimize common cases.
-    *644) cp_umask=133;;
-    *755) cp_umask=22;;
-
-    *[0-7])
-      if test -z "$stripcmd"; then
-	u_plus_rw=
-      else
-	u_plus_rw='% 200'
-      fi
-      cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;;
-    *)
-      if test -z "$stripcmd"; then
-	u_plus_rw=
-      else
-	u_plus_rw=,u+rw
-      fi
-      cp_umask=$mode$u_plus_rw;;
-  esac
-fi
-
-for src
-do
-  # Protect names starting with `-'.
-  case $src in
-    -*) src=./$src ;;
-  esac
-
-  if test -n "$dir_arg"; then
-    dst=$src
-    dstdir=$dst
-    test -d "$dstdir"
-    dstdir_status=$?
-  else
-
-    # Waiting for this to be detected by the "$cpprog $src $dsttmp" command
-    # might cause directories to be created, which would be especially bad
-    # if $src (and thus $dsttmp) contains '*'.
-    if test ! -f "$src" && test ! -d "$src"; then
-      echo "$0: $src does not exist." >&2
-      exit 1
-    fi
-
-    if test -z "$dstarg"; then
-      echo "$0: no destination specified." >&2
-      exit 1
-    fi
-
-    dst=$dstarg
-    # Protect names starting with `-'.
-    case $dst in
-      -*) dst=./$dst ;;
-    esac
-
-    # If destination is a directory, append the input filename; won't work
-    # if double slashes aren't ignored.
-    if test -d "$dst"; then
-      if test -n "$no_target_directory"; then
-	echo "$0: $dstarg: Is a directory" >&2
-	exit 1
-      fi
-      dstdir=$dst
-      dst=$dstdir/`basename "$src"`
-      dstdir_status=0
-    else
-      # Prefer dirname, but fall back on a substitute if dirname fails.
-      dstdir=`
-	(dirname "$dst") 2>/dev/null ||
-	expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
-	     X"$dst" : 'X\(//\)[^/]' \| \
-	     X"$dst" : 'X\(//\)$' \| \
-	     X"$dst" : 'X\(/\)' \| . 2>/dev/null ||
-	echo X"$dst" |
-	    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
-		   s//\1/
-		   q
-		 }
-		 /^X\(\/\/\)[^/].*/{
-		   s//\1/
-		   q
-		 }
-		 /^X\(\/\/\)$/{
-		   s//\1/
-		   q
-		 }
-		 /^X\(\/\).*/{
-		   s//\1/
-		   q
-		 }
-		 s/.*/./; q'
-      `
-
-      test -d "$dstdir"
-      dstdir_status=$?
-    fi
-  fi
-
-  obsolete_mkdir_used=false
-
-  if test $dstdir_status != 0; then
-    case $posix_mkdir in
-      '')
-	# Create intermediate dirs using mode 755 as modified by the umask.
-	# This is like FreeBSD 'install' as of 1997-10-28.
-	umask=`umask`
-	case $stripcmd.$umask in
-	  # Optimize common cases.
-	  *[2367][2367]) mkdir_umask=$umask;;
-	  .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;;
-
-	  *[0-7])
-	    mkdir_umask=`expr $umask + 22 \
-	      - $umask % 100 % 40 + $umask % 20 \
-	      - $umask % 10 % 4 + $umask % 2
-	    `;;
-	  *) mkdir_umask=$umask,go-w;;
-	esac
-
-	# With -d, create the new directory with the user-specified mode.
-	# Otherwise, rely on $mkdir_umask.
-	if test -n "$dir_arg"; then
-	  mkdir_mode=-m$mode
-	else
-	  mkdir_mode=
-	fi
-
-	posix_mkdir=false
-	case $umask in
-	  *[123567][0-7][0-7])
-	    # POSIX mkdir -p sets u+wx bits regardless of umask, which
-	    # is incompatible with FreeBSD 'install' when (umask & 300) != 0.
-	    ;;
-	  *)
-	    tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
-	    trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0
-
-	    if (umask $mkdir_umask &&
-		exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1
-	    then
-	      if test -z "$dir_arg" || {
-		   # Check for POSIX incompatibilities with -m.
-		   # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
-		   # other-writeable bit of parent directory when it shouldn't.
-		   # FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
-		   ls_ld_tmpdir=`ls -ld "$tmpdir"`
-		   case $ls_ld_tmpdir in
-		     d????-?r-*) different_mode=700;;
-		     d????-?--*) different_mode=755;;
-		     *) false;;
-		   esac &&
-		   $mkdirprog -m$different_mode -p -- "$tmpdir" && {
-		     ls_ld_tmpdir_1=`ls -ld "$tmpdir"`
-		     test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
-		   }
-		 }
-	      then posix_mkdir=:
-	      fi
-	      rmdir "$tmpdir/d" "$tmpdir"
-	    else
-	      # Remove any dirs left behind by ancient mkdir implementations.
-	      rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null
-	    fi
-	    trap '' 0;;
-	esac;;
-    esac
-
-    if
-      $posix_mkdir && (
-	umask $mkdir_umask &&
-	$doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir"
-      )
-    then :
-    else
-
-      # The umask is ridiculous, or mkdir does not conform to POSIX,
-      # or it failed possibly due to a race condition.  Create the
-      # directory the slow way, step by step, checking for races as we go.
-
-      case $dstdir in
-	/*) prefix=/ ;;
-	-*) prefix=./ ;;
-	*)  prefix= ;;
-      esac
-
-      case $posix_glob in
-        '')
-	  if (set -f) 2>/dev/null; then
-	    posix_glob=true
-	  else
-	    posix_glob=false
-	  fi ;;
-      esac
-
-      oIFS=$IFS
-      IFS=/
-      $posix_glob && set -f
-      set fnord $dstdir
-      shift
-      $posix_glob && set +f
-      IFS=$oIFS
-
-      prefixes=
-
-      for d
-      do
-	test -z "$d" && continue
-
-	prefix=$prefix$d
-	if test -d "$prefix"; then
-	  prefixes=
-	else
-	  if $posix_mkdir; then
-	    (umask=$mkdir_umask &&
-	     $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break
-	    # Don't fail if two instances are running concurrently.
-	    test -d "$prefix" || exit 1
-	  else
-	    case $prefix in
-	      *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;;
-	      *) qprefix=$prefix;;
-	    esac
-	    prefixes="$prefixes '$qprefix'"
-	  fi
-	fi
-	prefix=$prefix/
-      done
-
-      if test -n "$prefixes"; then
-	# Don't fail if two instances are running concurrently.
-	(umask $mkdir_umask &&
-	 eval "\$doit_exec \$mkdirprog $prefixes") ||
-	  test -d "$dstdir" || exit 1
-	obsolete_mkdir_used=true
-      fi
-    fi
-  fi
-
-  if test -n "$dir_arg"; then
-    { test -z "$chowncmd" || $doit $chowncmd "$dst"; } &&
-    { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } &&
-    { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false ||
-      test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1
-  else
-
-    # Make a couple of temp file names in the proper directory.
-    dsttmp=$dstdir/_inst.$$_
-    rmtmp=$dstdir/_rm.$$_
-
-    # Trap to clean up those temp files at exit.
-    trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0
-
-    # Copy the file name to the temp name.
-    (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") &&
-
-    # 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 $cpprog $src $dsttmp" command.
-    #
-    { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } \
-      && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } \
-      && { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } \
-      && { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } &&
-
-    # Now rename the file to the real destination.
-    { $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null \
-      || {
-	   # The rename failed, perhaps because mv can't rename something else
-	   # to itself, or perhaps because mv is so ancient that it does not
-	   # support -f.
-
-	   # Now remove or move aside any old file at destination location.
-	   # We try this two ways since rm can't unlink itself on some
-	   # systems and the destination file might be busy for other
-	   # reasons.  In this case, the final cleanup might fail but the new
-	   # file should still install successfully.
-	   {
-	     if test -f "$dst"; then
-	       $doit $rmcmd -f "$dst" 2>/dev/null \
-	       || { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null \
-		     && { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; }; }\
-	       || {
-		 echo "$0: cannot unlink or rename $dst" >&2
-		 (exit 1); exit 1
-	       }
-	     else
-	       :
-	     fi
-	   } &&
-
-	   # Now rename the file to the real destination.
-	   $doit $mvcmd "$dsttmp" "$dst"
-	 }
-    } || exit 1
-
-    trap '' 0
-  fi
-done
-
-# Local variables:
-# eval: (add-hook 'write-file-hooks 'time-stamp)
-# time-stamp-start: "scriptversion="
-# time-stamp-format: "%:y-%02m-%02d.%02H"
-# time-stamp-end: "$"
-# End:
diff --git a/myserver/ltmain.sh b/myserver/ltmain.sh
deleted file mode 100755
index ac13f0a..0000000
--- a/myserver/ltmain.sh
+++ /dev/null
@@ -1,6928 +0,0 @@
-# ltmain.sh - Provide generalized library-building support services.
-# NOTE: Changing this file will not affect anything until you rerun configure.
-#
-# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006
-# Free Software Foundation, Inc.
-# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
-#
-# This program 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 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful, but
-# WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-# General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-#
-# As a special exception to the GNU General Public License, if you
-# distribute this file as part of a program that contains a
-# configuration script generated by Autoconf, you may include it under
-# the same distribution terms that you use for the rest of that program.
-
-basename="s,^.*/,,g"
-
-# Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh
-# is ksh but when the shell is invoked as "sh" and the current value of
-# the _XPG environment variable is not equal to 1 (one), the special
-# positional parameter $0, within a function call, is the name of the
-# function.
-progpath="$0"
-
-# The name of this program:
-progname=`echo "$progpath" | $SED $basename`
-modename="$progname"
-
-# Global variables:
-EXIT_SUCCESS=0
-EXIT_FAILURE=1
-
-PROGRAM=ltmain.sh
-PACKAGE=libtool
-VERSION=1.5.23a
-TIMESTAMP=" (1.1220.2.416 2006/10/24 20:18:28)"
-
-# Be Bourne compatible (taken from Autoconf:_AS_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+"$@"}'='"$@"'
-  setopt NO_GLOB_SUBST
-else
-  case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac
-fi
-BIN_SH=xpg4; export BIN_SH # for Tru64
-DUALCASE=1; export DUALCASE # for MKS sh
-
-# Check that we have a working $echo.
-if test "X$1" = X--no-reexec; then
-  # Discard the --no-reexec flag, and continue.
-  shift
-elif test "X$1" = X--fallback-echo; then
-  # Avoid inline document here, it may be left over
-  :
-elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then
-  # Yippee, $echo works!
-  :
-else
-  # Restart under the correct shell, and then maybe $echo will work.
-  exec $SHELL "$progpath" --no-reexec ${1+"$@"}
-fi
-
-if test "X$1" = X--fallback-echo; then
-  # used as fallback echo
-  shift
-  cat <<EOF
-$*
-EOF
-  exit $EXIT_SUCCESS
-fi
-
-default_mode=
-help="Try \`$progname --help' for more information."
-magic="%%%MAGIC variable%%%"
-mkdir="mkdir"
-mv="mv -f"
-rm="rm -f"
-
-# Sed substitution that helps us do robust quoting.  It backslashifies
-# metacharacters that are still active within double-quoted strings.
-Xsed="${SED}"' -e 1s/^X//'
-sed_quote_subst='s/\([\\`\\"$\\\\]\)/\\\1/g'
-# test EBCDIC or ASCII
-case `echo X|tr X '\101'` in
- A) # ASCII based system
-    # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
-  SP2NL='tr \040 \012'
-  NL2SP='tr \015\012 \040\040'
-  ;;
- *) # EBCDIC based system
-  SP2NL='tr \100 \n'
-  NL2SP='tr \r\n \100\100'
-  ;;
-esac
-
-# NLS nuisances.
-# Only set LANG and LC_ALL to C if already set.
-# These must not be set unconditionally because not all systems understand
-# e.g. LANG=C (notably SCO).
-# We save the old values to restore during execute mode.
-for lt_var in LANG LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES
-do
-  eval "if test \"\${$lt_var+set}\" = set; then
-	  save_$lt_var=\$$lt_var
-	  $lt_var=C
-	  export $lt_var
-	fi"
-done
-
-# Make sure IFS has a sensible default
-lt_nl='
-'
-IFS=" 	$lt_nl"
-
-if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then
-  $echo "$modename: not configured to build any kind of library" 1>&2
-  $echo "Fatal configuration error.  See the $PACKAGE docs for more information." 1>&2
-  exit $EXIT_FAILURE
-fi
-
-# Global variables.
-mode=$default_mode
-nonopt=
-prev=
-prevopt=
-run=
-show="$echo"
-show_help=
-execute_dlfiles=
-duplicate_deps=no
-preserve_args=
-lo2o="s/\\.lo\$/.${objext}/"
-o2lo="s/\\.${objext}\$/.lo/"
-extracted_archives=
-extracted_serial=0
-
-#####################################
-# Shell function definitions:
-# This seems to be the best place for them
-
-# func_mktempdir [string]
-# Make a temporary directory that won't clash with other running
-# libtool processes, and avoids race conditions if possible.  If
-# given, STRING is the basename for that directory.
-func_mktempdir ()
-{
-    my_template="${TMPDIR-/tmp}/${1-$progname}"
-
-    if test "$run" = ":"; then
-      # Return a directory name, but don't create it in dry-run mode
-      my_tmpdir="${my_template}-$$"
-    else
-
-      # If mktemp works, use that first and foremost
-      my_tmpdir=`mktemp -d "${my_template}-XXXXXXXX" 2>/dev/null`
-
-      if test ! -d "$my_tmpdir"; then
-	# Failing that, at least try and use $RANDOM to avoid a race
-	my_tmpdir="${my_template}-${RANDOM-0}$$"
-
-	save_mktempdir_umask=`umask`
-	umask 0077
-	$mkdir "$my_tmpdir"
-	umask $save_mktempdir_umask
-      fi
-
-      # If we're not in dry-run mode, bomb out on failure
-      test -d "$my_tmpdir" || {
-        $echo "cannot create temporary directory \`$my_tmpdir'" 1>&2
-	exit $EXIT_FAILURE
-      }
-    fi
-
-    $echo "X$my_tmpdir" | $Xsed
-}
-
-
-# func_win32_libid arg
-# return the library type of file 'arg'
-#
-# Need a lot of goo to handle *both* DLLs and import libs
-# Has to be a shell function in order to 'eat' the argument
-# that is supplied when $file_magic_command is called.
-func_win32_libid ()
-{
-  win32_libid_type="unknown"
-  win32_fileres=`file -L $1 2>/dev/null`
-  case $win32_fileres in
-  *ar\ archive\ import\ library*) # definitely import
-    win32_libid_type="x86 archive import"
-    ;;
-  *ar\ archive*) # could be an import, or static
-    if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | \
-      $EGREP -e 'file format pe-i386(.*architecture: i386)?' >/dev/null ; then
-      win32_nmres=`eval $NM -f posix -A $1 | \
-	$SED -n -e '1,100{
-		/ I /{
-			s,.*,import,
-			p
-			q
-			}
-		}'`
-      case $win32_nmres in
-      import*)  win32_libid_type="x86 archive import";;
-      *)        win32_libid_type="x86 archive static";;
-      esac
-    fi
-    ;;
-  *DLL*)
-    win32_libid_type="x86 DLL"
-    ;;
-  *executable*) # but shell scripts are "executable" too...
-    case $win32_fileres in
-    *MS\ Windows\ PE\ Intel*)
-      win32_libid_type="x86 DLL"
-      ;;
-    esac
-    ;;
-  esac
-  $echo $win32_libid_type
-}
-
-
-# func_infer_tag arg
-# Infer tagged configuration to use if any are available and
-# if one wasn't chosen via the "--tag" command line option.
-# Only attempt this if the compiler in the base compile
-# command doesn't match the default compiler.
-# arg is usually of the form 'gcc ...'
-func_infer_tag ()
-{
-    if test -n "$available_tags" && test -z "$tagname"; then
-      CC_quoted=
-      for arg in $CC; do
-	case $arg in
-	  *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*|"")
-	  arg="\"$arg\""
-	  ;;
-	esac
-	CC_quoted="$CC_quoted $arg"
-      done
-      case $@ in
-      # Blanks in the command may have been stripped by the calling shell,
-      # but not from the CC environment variable when configure was run.
-      " $CC "* | "$CC "* | " `$echo $CC` "* | "`$echo $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$echo $CC_quoted` "* | "`$echo $CC_quoted` "*) ;;
-      # Blanks at the start of $base_compile will cause this to fail
-      # if we don't check for them as well.
-      *)
-	for z in $available_tags; do
-	  if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$progpath" > /dev/null; then
-	    # Evaluate the configuration.
-	    eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $progpath`"
-	    CC_quoted=
-	    for arg in $CC; do
-	    # Double-quote args containing other shell metacharacters.
-	    case $arg in
-	      *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*|"")
-	      arg="\"$arg\""
-	      ;;
-	    esac
-	    CC_quoted="$CC_quoted $arg"
-	  done
-	    case "$@ " in
-	      " $CC "* | "$CC "* | " `$echo $CC` "* | "`$echo $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$echo $CC_quoted` "* | "`$echo $CC_quoted` "*)
-	      # The compiler in the base compile command matches
-	      # the one in the tagged configuration.
-	      # Assume this is the tagged configuration we want.
-	      tagname=$z
-	      break
-	      ;;
-	    esac
-	  fi
-	done
-	# If $tagname still isn't set, then no tagged configuration
-	# was found and let the user know that the "--tag" command
-	# line option must be used.
-	if test -z "$tagname"; then
-	  $echo "$modename: unable to infer tagged configuration"
-	  $echo "$modename: specify a tag with \`--tag'" 1>&2
-	  exit $EXIT_FAILURE
-#        else
-#          $echo "$modename: using $tagname tagged configuration"
-	fi
-	;;
-      esac
-    fi
-}
-
-
-# func_extract_an_archive dir oldlib
-func_extract_an_archive ()
-{
-    f_ex_an_ar_dir="$1"; shift
-    f_ex_an_ar_oldlib="$1"
-
-    $show "(cd $f_ex_an_ar_dir && $AR x $f_ex_an_ar_oldlib)"
-    $run eval "(cd \$f_ex_an_ar_dir && $AR x \$f_ex_an_ar_oldlib)" || exit $?
-    if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then
-     :
-    else
-      $echo "$modename: ERROR: object name conflicts: $f_ex_an_ar_dir/$f_ex_an_ar_oldlib" 1>&2
-      exit $EXIT_FAILURE
-    fi
-}
-
-# func_extract_archives gentop oldlib ...
-func_extract_archives ()
-{
-    my_gentop="$1"; shift
-    my_oldlibs=${1+"$@"}
-    my_oldobjs=""
-    my_xlib=""
-    my_xabs=""
-    my_xdir=""
-    my_status=""
-
-    $show "${rm}r $my_gentop"
-    $run ${rm}r "$my_gentop"
-    $show "$mkdir $my_gentop"
-    $run $mkdir "$my_gentop"
-    my_status=$?
-    if test "$my_status" -ne 0 && test ! -d "$my_gentop"; then
-      exit $my_status
-    fi
-
-    for my_xlib in $my_oldlibs; do
-      # Extract the objects.
-      case $my_xlib in
-	[\\/]* | [A-Za-z]:[\\/]*) my_xabs="$my_xlib" ;;
-	*) my_xabs=`pwd`"/$my_xlib" ;;
-      esac
-      my_xlib=`$echo "X$my_xlib" | $Xsed -e 's%^.*/%%'`
-      my_xlib_u=$my_xlib
-      while :; do
-        case " $extracted_archives " in
-	*" $my_xlib_u "*)
-	  extracted_serial=`expr $extracted_serial + 1`
-	  my_xlib_u=lt$extracted_serial-$my_xlib ;;
-	*) break ;;
-	esac
-      done
-      extracted_archives="$extracted_archives $my_xlib_u"
-      my_xdir="$my_gentop/$my_xlib_u"
-
-      $show "${rm}r $my_xdir"
-      $run ${rm}r "$my_xdir"
-      $show "$mkdir $my_xdir"
-      $run $mkdir "$my_xdir"
-      exit_status=$?
-      if test "$exit_status" -ne 0 && test ! -d "$my_xdir"; then
-	exit $exit_status
-      fi
-      case $host in
-      *-darwin*)
-	$show "Extracting $my_xabs"
-	# Do not bother doing anything if just a dry run
-	if test -z "$run"; then
-	  darwin_orig_dir=`pwd`
-	  cd $my_xdir || exit $?
-	  darwin_archive=$my_xabs
-	  darwin_curdir=`pwd`
-	  darwin_base_archive=`$echo "X$darwin_archive" | $Xsed -e 's%^.*/%%'`
-	  darwin_arches=`lipo -info "$darwin_archive" 2>/dev/null | $EGREP Architectures 2>/dev/null`
-	  if test -n "$darwin_arches"; then 
-	    darwin_arches=`echo "$darwin_arches" | $SED -e 's/.*are://'`
-	    darwin_arch=
-	    $show "$darwin_base_archive has multiple architectures $darwin_arches"
-	    for darwin_arch in  $darwin_arches ; do
-	      mkdir -p "unfat-$$/${darwin_base_archive}-${darwin_arch}"
-	      lipo -thin $darwin_arch -output "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" "${darwin_archive}"
-	      cd "unfat-$$/${darwin_base_archive}-${darwin_arch}"
-	      func_extract_an_archive "`pwd`" "${darwin_base_archive}"
-	      cd "$darwin_curdir"
-	      $rm "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}"
-	    done # $darwin_arches
-      ## Okay now we have a bunch of thin objects, gotta fatten them up :)
-	    darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print| xargs basename | sort -u | $NL2SP`
-	    darwin_file=
-	    darwin_files=
-	    for darwin_file in $darwin_filelist; do
-	      darwin_files=`find unfat-$$ -name $darwin_file -print | $NL2SP`
-	      lipo -create -output "$darwin_file" $darwin_files
-	    done # $darwin_filelist
-	    ${rm}r unfat-$$
-	    cd "$darwin_orig_dir"
-	  else
-	    cd "$darwin_orig_dir"
- 	    func_extract_an_archive "$my_xdir" "$my_xabs"
-	  fi # $darwin_arches
-	fi # $run
-	;;
-      *)
-        func_extract_an_archive "$my_xdir" "$my_xabs"
-        ;;
-      esac
-      my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP`
-    done
-    func_extract_archives_result="$my_oldobjs"
-}
-# End of Shell function definitions
-#####################################
-
-# Darwin sucks
-eval std_shrext=\"$shrext_cmds\"
-
-disable_libs=no
-
-# Parse our command line options once, thoroughly.
-while test "$#" -gt 0
-do
-  arg="$1"
-  shift
-
-  case $arg in
-  -*=*) optarg=`$echo "X$arg" | $Xsed -e 's/[-_a-zA-Z0-9]*=//'` ;;
-  *) optarg= ;;
-  esac
-
-  # If the previous option needs an argument, assign it.
-  if test -n "$prev"; then
-    case $prev in
-    execute_dlfiles)
-      execute_dlfiles="$execute_dlfiles $arg"
-      ;;
-    tag)
-      tagname="$arg"
-      preserve_args="${preserve_args}=$arg"
-
-      # Check whether tagname contains only valid characters
-      case $tagname in
-      *[!-_A-Za-z0-9,/]*)
-	$echo "$progname: invalid tag name: $tagname" 1>&2
-	exit $EXIT_FAILURE
-	;;
-      esac
-
-      case $tagname in
-      CC)
-	# Don't test for the "default" C tag, as we know, it's there, but
-	# not specially marked.
-	;;
-      *)
-	if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "$progpath" > /dev/null; then
-	  taglist="$taglist $tagname"
-	  # Evaluate the configuration.
-	  eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$tagname'$/,/^# ### END LIBTOOL TAG CONFIG: '$tagname'$/p' < $progpath`"
-	else
-	  $echo "$progname: ignoring unknown tag $tagname" 1>&2
-	fi
-	;;
-      esac
-      ;;
-    *)
-      eval "$prev=\$arg"
-      ;;
-    esac
-
-    prev=
-    prevopt=
-    continue
-  fi
-
-  # Have we seen a non-optional argument yet?
-  case $arg in
-  --help)
-    show_help=yes
-    ;;
-
-  --version)
-    echo "\
-
-$PROGRAM (GNU $PACKAGE) $VERSION$TIMESTAMP
-
-Copyright (C) 2006  Free Software Foundation, Inc.
-This is free software; see the source for copying conditions.  There is NO
-warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
-    exit $?
-    ;;
-
-  --config)
-    ${SED} -e '1,/^# ### BEGIN LIBTOOL CONFIG/d' -e '/^# ### END LIBTOOL CONFIG/,$d' $progpath
-    # Now print the configurations for the tags.
-    for tagname in $taglist; do
-      ${SED} -n -e "/^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$/,/^# ### END LIBTOOL TAG CONFIG: $tagname$/p" < "$progpath"
-    done
-    exit $?
-    ;;
-
-  --debug)
-    $echo "$progname: enabling shell trace mode"
-    set -x
-    preserve_args="$preserve_args $arg"
-    ;;
-
-  --dry-run | -n)
-    run=:
-    ;;
-
-  --features)
-    $echo "host: $host"
-    if test "$build_libtool_libs" = yes; then
-      $echo "enable shared libraries"
-    else
-      $echo "disable shared libraries"
-    fi
-    if test "$build_old_libs" = yes; then
-      $echo "enable static libraries"
-    else
-      $echo "disable static libraries"
-    fi
-    exit $?
-    ;;
-
-  --finish) mode="finish" ;;
-
-  --mode) prevopt="--mode" prev=mode ;;
-  --mode=*) mode="$optarg" ;;
-
-  --preserve-dup-deps) duplicate_deps="yes" ;;
-
-  --quiet | --silent)
-    show=:
-    preserve_args="$preserve_args $arg"
-    ;;
-
-  --tag)
-    prevopt="--tag"
-    prev=tag
-    preserve_args="$preserve_args --tag"
-    ;;
-  --tag=*)
-    set tag "$optarg" ${1+"$@"}
-    shift
-    prev=tag
-    preserve_args="$preserve_args --tag"
-    ;;
-
-  -dlopen)
-    prevopt="-dlopen"
-    prev=execute_dlfiles
-    ;;
-
-  -*)
-    $echo "$modename: unrecognized option \`$arg'" 1>&2
-    $echo "$help" 1>&2
-    exit $EXIT_FAILURE
-    ;;
-
-  *)
-    nonopt="$arg"
-    break
-    ;;
-  esac
-done
-
-if test -n "$prevopt"; then
-  $echo "$modename: option \`$prevopt' requires an argument" 1>&2
-  $echo "$help" 1>&2
-  exit $EXIT_FAILURE
-fi
-
-case $disable_libs in
-no) 
-  ;;
-shared)
-  build_libtool_libs=no
-  build_old_libs=yes
-  ;;
-static)
-  build_old_libs=`case $build_libtool_libs in yes) echo no;; *) echo yes;; esac`
-  ;;
-esac
-
-# If this variable is set in any of the actions, the command in it
-# will be execed at the end.  This prevents here-documents from being
-# left over by shells.
-exec_cmd=
-
-if test -z "$show_help"; then
-
-  # Infer the operation mode.
-  if test -z "$mode"; then
-    $echo "*** Warning: inferring the mode of operation is deprecated." 1>&2
-    $echo "*** Future versions of Libtool will require --mode=MODE be specified." 1>&2
-    case $nonopt in
-    *cc | cc* | *++ | gcc* | *-gcc* | g++* | xlc*)
-      mode=link
-      for arg
-      do
-	case $arg in
-	-c)
-	   mode=compile
-	   break
-	   ;;
-	esac
-      done
-      ;;
-    *db | *dbx | *strace | *truss)
-      mode=execute
-      ;;
-    *install*|cp|mv)
-      mode=install
-      ;;
-    *rm)
-      mode=uninstall
-      ;;
-    *)
-      # If we have no mode, but dlfiles were specified, then do execute mode.
-      test -n "$execute_dlfiles" && mode=execute
-
-      # Just use the default operation mode.
-      if test -z "$mode"; then
-	if test -n "$nonopt"; then
-	  $echo "$modename: warning: cannot infer operation mode from \`$nonopt'" 1>&2
-	else
-	  $echo "$modename: warning: cannot infer operation mode without MODE-ARGS" 1>&2
-	fi
-      fi
-      ;;
-    esac
-  fi
-
-  # Only execute mode is allowed to have -dlopen flags.
-  if test -n "$execute_dlfiles" && test "$mode" != execute; then
-    $echo "$modename: unrecognized option \`-dlopen'" 1>&2
-    $echo "$help" 1>&2
-    exit $EXIT_FAILURE
-  fi
-
-  # Change the help message to a mode-specific one.
-  generic_help="$help"
-  help="Try \`$modename --help --mode=$mode' for more information."
-
-  # These modes are in order of execution frequency so that they run quickly.
-  case $mode in
-  # libtool compile mode
-  compile)
-    modename="$modename: compile"
-    # Get the compilation command and the source file.
-    base_compile=
-    srcfile="$nonopt"  #  always keep a non-empty value in "srcfile"
-    suppress_opt=yes
-    suppress_output=
-    arg_mode=normal
-    libobj=
-    later=
-
-    for arg
-    do
-      case $arg_mode in
-      arg  )
-	# do not "continue".  Instead, add this to base_compile
-	lastarg="$arg"
-	arg_mode=normal
-	;;
-
-      target )
-	libobj="$arg"
-	arg_mode=normal
-	continue
-	;;
-
-      normal )
-	# Accept any command-line options.
-	case $arg in
-	-o)
-	  if test -n "$libobj" ; then
-	    $echo "$modename: you cannot specify \`-o' more than once" 1>&2
-	    exit $EXIT_FAILURE
-	  fi
-	  arg_mode=target
-	  continue
-	  ;;
-
-	-static | -prefer-pic | -prefer-non-pic)
-	  later="$later $arg"
-	  continue
-	  ;;
-
-	-no-suppress)
-	  suppress_opt=no
-	  continue
-	  ;;
-
-	-Xcompiler)
-	  arg_mode=arg  #  the next one goes into the "base_compile" arg list
-	  continue      #  The current "srcfile" will either be retained or
-	  ;;            #  replaced later.  I would guess that would be a bug.
-
-	-Wc,*)
-	  args=`$echo "X$arg" | $Xsed -e "s/^-Wc,//"`
-	  lastarg=
-	  save_ifs="$IFS"; IFS=','
- 	  for arg in $args; do
-	    IFS="$save_ifs"
-
-	    # Double-quote args containing other shell metacharacters.
-	    # Many Bourne shells cannot handle close brackets correctly
-	    # in scan sets, so we specify it separately.
-	    case $arg in
-	      *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*|"")
-	      arg="\"$arg\""
-	      ;;
-	    esac
-	    lastarg="$lastarg $arg"
-	  done
-	  IFS="$save_ifs"
-	  lastarg=`$echo "X$lastarg" | $Xsed -e "s/^ //"`
-
-	  # Add the arguments to base_compile.
-	  base_compile="$base_compile $lastarg"
-	  continue
-	  ;;
-
-	* )
-	  # Accept the current argument as the source file.
-	  # The previous "srcfile" becomes the current argument.
-	  #
-	  lastarg="$srcfile"
-	  srcfile="$arg"
-	  ;;
-	esac  #  case $arg
-	;;
-      esac    #  case $arg_mode
-
-      # Aesthetically quote the previous argument.
-      lastarg=`$echo "X$lastarg" | $Xsed -e "$sed_quote_subst"`
-
-      case $lastarg in
-      # Double-quote args containing other shell metacharacters.
-      # Many Bourne shells cannot handle close brackets correctly
-      # in scan sets, and some SunOS ksh mistreat backslash-escaping
-      # in scan sets (worked around with variable expansion),
-      # and furthermore cannot handle '|' '&' '(' ')' in scan sets 
-      # at all, so we specify them separately.
-      *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*|"")
-	lastarg="\"$lastarg\""
-	;;
-      esac
-
-      base_compile="$base_compile $lastarg"
-    done # for arg
-
-    case $arg_mode in
-    arg)
-      $echo "$modename: you must specify an argument for -Xcompile"
-      exit $EXIT_FAILURE
-      ;;
-    target)
-      $echo "$modename: you must specify a target with \`-o'" 1>&2
-      exit $EXIT_FAILURE
-      ;;
-    *)
-      # Get the name of the library object.
-      [ -z "$libobj" ] && libobj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%'`
-      ;;
-    esac
-
-    # Recognize several different file suffixes.
-    # If the user specifies -o file.o, it is replaced with file.lo
-    xform='[cCFSifmso]'
-    case $libobj in
-    *.ada) xform=ada ;;
-    *.adb) xform=adb ;;
-    *.ads) xform=ads ;;
-    *.asm) xform=asm ;;
-    *.c++) xform=c++ ;;
-    *.cc) xform=cc ;;
-    *.ii) xform=ii ;;
-    *.class) xform=class ;;
-    *.cpp) xform=cpp ;;
-    *.cxx) xform=cxx ;;
-    *.f90) xform=f90 ;;
-    *.for) xform=for ;;
-    *.java) xform=java ;;
-    *.obj) xform=obj ;;
-    esac
-
-    libobj=`$echo "X$libobj" | $Xsed -e "s/\.$xform$/.lo/"`
-
-    case $libobj in
-    *.lo) obj=`$echo "X$libobj" | $Xsed -e "$lo2o"` ;;
-    *)
-      $echo "$modename: cannot determine name of library object from \`$libobj'" 1>&2
-      exit $EXIT_FAILURE
-      ;;
-    esac
-
-    func_infer_tag $base_compile
-
-    for arg in $later; do
-      case $arg in
-      -static)
-	build_old_libs=yes
-	continue
-	;;
-
-      -prefer-pic)
-	pic_mode=yes
-	continue
-	;;
-
-      -prefer-non-pic)
-	pic_mode=no
-	continue
-	;;
-      esac
-    done
-
-    qlibobj=`$echo "X$libobj" | $Xsed -e "$sed_quote_subst"`
-    case $qlibobj in
-      *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*|"")
-	qlibobj="\"$qlibobj\"" ;;
-    esac
-    test "X$libobj" != "X$qlibobj" \
-	&& $echo "X$libobj" | grep '[]~#^*{};<>?"'"'"' 	&()|`$[]' \
-	&& $echo "$modename: libobj name \`$libobj' may not contain shell special characters."
-    objname=`$echo "X$obj" | $Xsed -e 's%^.*/%%'`
-    xdir=`$echo "X$obj" | $Xsed -e 's%/[^/]*$%%'`
-    if test "X$xdir" = "X$obj"; then
-      xdir=
-    else
-      xdir=$xdir/
-    fi
-    lobj=${xdir}$objdir/$objname
-
-    if test -z "$base_compile"; then
-      $echo "$modename: you must specify a compilation command" 1>&2
-      $echo "$help" 1>&2
-      exit $EXIT_FAILURE
-    fi
-
-    # Delete any leftover library objects.
-    if test "$build_old_libs" = yes; then
-      removelist="$obj $lobj $libobj ${libobj}T"
-    else
-      removelist="$lobj $libobj ${libobj}T"
-    fi
-
-    $run $rm $removelist
-    trap "$run $rm $removelist; exit $EXIT_FAILURE" 1 2 15
-
-    # On Cygwin there's no "real" PIC flag so we must build both object types
-    case $host_os in
-    cygwin* | mingw* | pw32* | os2*)
-      pic_mode=default
-      ;;
-    esac
-    if test "$pic_mode" = no && test "$deplibs_check_method" != pass_all; then
-      # non-PIC code in shared libraries is not supported
-      pic_mode=default
-    fi
-
-    # Calculate the filename of the output object if compiler does
-    # not support -o with -c
-    if test "$compiler_c_o" = no; then
-      output_obj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%' -e 's%\.[^.]*$%%'`.${objext}
-      lockfile="$output_obj.lock"
-      removelist="$removelist $output_obj $lockfile"
-      trap "$run $rm $removelist; exit $EXIT_FAILURE" 1 2 15
-    else
-      output_obj=
-      need_locks=no
-      lockfile=
-    fi
-
-    # Lock this critical section if it is needed
-    # We use this script file to make the link, it avoids creating a new file
-    if test "$need_locks" = yes; then
-      until $run ln "$progpath" "$lockfile" 2>/dev/null; do
-	$show "Waiting for $lockfile to be removed"
-	sleep 2
-      done
-    elif test "$need_locks" = warn; then
-      if test -f "$lockfile"; then
-	$echo "\
-*** ERROR, $lockfile exists and contains:
-`cat $lockfile 2>/dev/null`
-
-This indicates that another process is trying to use the same
-temporary object file, and libtool could not work around it because
-your compiler does not support \`-c' and \`-o' together.  If you
-repeat this compilation, it may succeed, by chance, but you had better
-avoid parallel builds (make -j) in this platform, or get a better
-compiler."
-
-	$run $rm $removelist
-	exit $EXIT_FAILURE
-      fi
-      $echo "$srcfile" > "$lockfile"
-    fi
-
-    if test -n "$fix_srcfile_path"; then
-      eval srcfile=\"$fix_srcfile_path\"
-    fi
-    qsrcfile=`$echo "X$srcfile" | $Xsed -e "$sed_quote_subst"`
-    case $qsrcfile in
-      *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*|"")
-      qsrcfile="\"$qsrcfile\"" ;;
-    esac
-
-    $run $rm "$libobj" "${libobj}T"
-
-    # Create a libtool object file (analogous to a ".la" file),
-    # but don't create it if we're doing a dry run.
-    test -z "$run" && cat > ${libobj}T <<EOF
-# $libobj - a libtool object file
-# Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
-#
-# Please DO NOT delete this file!
-# It is necessary for linking the library.
-
-# Name of the PIC object.
-EOF
-
-    # Only build a PIC object if we are building libtool libraries.
-    if test "$build_libtool_libs" = yes; then
-      # Without this assignment, base_compile gets emptied.
-      fbsd_hideous_sh_bug=$base_compile
-
-      if test "$pic_mode" != no; then
-	command="$base_compile $qsrcfile $pic_flag"
-      else
-	# Don't build PIC code
-	command="$base_compile $qsrcfile"
-      fi
-
-      if test ! -d "${xdir}$objdir"; then
-	$show "$mkdir ${xdir}$objdir"
-	$run $mkdir ${xdir}$objdir
-	exit_status=$?
-	if test "$exit_status" -ne 0 && test ! -d "${xdir}$objdir"; then
-	  exit $exit_status
-	fi
-      fi
-
-      if test -z "$output_obj"; then
-	# Place PIC objects in $objdir
-	command="$command -o $lobj"
-      fi
-
-      $run $rm "$lobj" "$output_obj"
-
-      $show "$command"
-      if $run eval "$command"; then :
-      else
-	test -n "$output_obj" && $run $rm $removelist
-	exit $EXIT_FAILURE
-      fi
-
-      if test "$need_locks" = warn &&
-	 test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then
-	$echo "\
-*** ERROR, $lockfile contains:
-`cat $lockfile 2>/dev/null`
-
-but it should contain:
-$srcfile
-
-This indicates that another process is trying to use the same
-temporary object file, and libtool could not work around it because
-your compiler does not support \`-c' and \`-o' together.  If you
-repeat this compilation, it may succeed, by chance, but you had better
-avoid parallel builds (make -j) in this platform, or get a better
-compiler."
-
-	$run $rm $removelist
-	exit $EXIT_FAILURE
-      fi
-
-      # Just move the object if needed, then go on to compile the next one
-      if test -n "$output_obj" && test "X$output_obj" != "X$lobj"; then
-	$show "$mv $output_obj $lobj"
-	if $run $mv $output_obj $lobj; then :
-	else
-	  error=$?
-	  $run $rm $removelist
-	  exit $error
-	fi
-      fi
-
-      # Append the name of the PIC object to the libtool object file.
-      test -z "$run" && cat >> ${libobj}T <<EOF
-pic_object='$objdir/$objname'
-
-EOF
-
-      # Allow error messages only from the first compilation.
-      if test "$suppress_opt" = yes; then
-        suppress_output=' >/dev/null 2>&1'
-      fi
-    else
-      # No PIC object so indicate it doesn't exist in the libtool
-      # object file.
-      test -z "$run" && cat >> ${libobj}T <<EOF
-pic_object=none
-
-EOF
-    fi
-
-    # Only build a position-dependent object if we build old libraries.
-    if test "$build_old_libs" = yes; then
-      if test "$pic_mode" != yes; then
-	# Don't build PIC code
-	command="$base_compile $qsrcfile"
-      else
-	command="$base_compile $qsrcfile $pic_flag"
-      fi
-      if test "$compiler_c_o" = yes; then
-	command="$command -o $obj"
-      fi
-
-      # Suppress compiler output if we already did a PIC compilation.
-      command="$command$suppress_output"
-      $run $rm "$obj" "$output_obj"
-      $show "$command"
-      if $run eval "$command"; then :
-      else
-	$run $rm $removelist
-	exit $EXIT_FAILURE
-      fi
-
-      if test "$need_locks" = warn &&
-	 test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then
-	$echo "\
-*** ERROR, $lockfile contains:
-`cat $lockfile 2>/dev/null`
-
-but it should contain:
-$srcfile
-
-This indicates that another process is trying to use the same
-temporary object file, and libtool could not work around it because
-your compiler does not support \`-c' and \`-o' together.  If you
-repeat this compilation, it may succeed, by chance, but you had better
-avoid parallel builds (make -j) in this platform, or get a better
-compiler."
-
-	$run $rm $removelist
-	exit $EXIT_FAILURE
-      fi
-
-      # Just move the object if needed
-      if test -n "$output_obj" && test "X$output_obj" != "X$obj"; then
-	$show "$mv $output_obj $obj"
-	if $run $mv $output_obj $obj; then :
-	else
-	  error=$?
-	  $run $rm $removelist
-	  exit $error
-	fi
-      fi
-
-      # Append the name of the non-PIC object the libtool object file.
-      # Only append if the libtool object file exists.
-      test -z "$run" && cat >> ${libobj}T <<EOF
-# Name of the non-PIC object.
-non_pic_object='$objname'
-
-EOF
-    else
-      # Append the name of the non-PIC object the libtool object file.
-      # Only append if the libtool object file exists.
-      test -z "$run" && cat >> ${libobj}T <<EOF
-# Name of the non-PIC object.
-non_pic_object=none
-
-EOF
-    fi
-
-    $run $mv "${libobj}T" "${libobj}"
-
-    # Unlock the critical section if it was locked
-    if test "$need_locks" != no; then
-      $run $rm "$lockfile"
-    fi
-
-    exit $EXIT_SUCCESS
-    ;;
-
-  # libtool link mode
-  link | relink)
-    modename="$modename: link"
-    case $host in
-    *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
-      # It is impossible to link a dll without this setting, and
-      # we shouldn't force the makefile maintainer to figure out
-      # which system we are compiling for in order to pass an extra
-      # flag for every libtool invocation.
-      # allow_undefined=no
-
-      # FIXME: Unfortunately, there are problems with the above when trying
-      # to make a dll which has undefined symbols, in which case not
-      # even a static library is built.  For now, we need to specify
-      # -no-undefined on the libtool link line when we can be certain
-      # that all symbols are satisfied, otherwise we get a static library.
-      allow_undefined=yes
-      ;;
-    *)
-      allow_undefined=yes
-      ;;
-    esac
-    libtool_args="$nonopt"
-    base_compile="$nonopt $@"
-    compile_command="$nonopt"
-    finalize_command="$nonopt"
-
-    compile_rpath=
-    finalize_rpath=
-    compile_shlibpath=
-    finalize_shlibpath=
-    convenience=
-    old_convenience=
-    deplibs=
-    old_deplibs=
-    compiler_flags=
-    linker_flags=
-    dllsearchpath=
-    lib_search_path=`pwd`
-    inst_prefix_dir=
-
-    avoid_version=no
-    dlfiles=
-    dlprefiles=
-    dlself=no
-    export_dynamic=no
-    export_symbols=
-    export_symbols_regex=
-    generated=
-    libobjs=
-    ltlibs=
-    module=no
-    no_install=no
-    objs=
-    non_pic_objects=
-    notinst_path= # paths that contain not-installed libtool libraries
-    precious_files_regex=
-    prefer_static_libs=no
-    preload=no
-    prev=
-    prevarg=
-    release=
-    rpath=
-    xrpath=
-    perm_rpath=
-    temp_rpath=
-    thread_safe=no
-    vinfo=
-    vinfo_number=no
-
-    func_infer_tag $base_compile
-
-    # We need to know -static, to get the right output filenames.
-    for arg
-    do
-      case $arg in
-      -all-static | -static | -static-libtool-libs)
-	case $arg in
-	-all-static)
-	  if test "$build_libtool_libs" = yes && test -z "$link_static_flag"; then
-	    $echo "$modename: warning: complete static linking is impossible in this configuration" 1>&2
-	  fi
-	  if test -n "$link_static_flag"; then
-	    dlopen_self=$dlopen_self_static
-	  fi
-	  prefer_static_libs=yes
-	  ;;
-	-static)
-	  if test -z "$pic_flag" && test -n "$link_static_flag"; then
-	    dlopen_self=$dlopen_self_static
-	  fi
-	  prefer_static_libs=built
-	  ;;
-	-static-libtool-libs)
-	  if test -z "$pic_flag" && test -n "$link_static_flag"; then
-	    dlopen_self=$dlopen_self_static
-	  fi
-	  prefer_static_libs=yes
-	  ;;
-	esac
-	build_libtool_libs=no
-	build_old_libs=yes
-	break
-	;;
-      esac
-    done
-
-    # See if our shared archives depend on static archives.
-    test -n "$old_archive_from_new_cmds" && build_old_libs=yes
-
-    # Go through the arguments, transforming them on the way.
-    while test "$#" -gt 0; do
-      arg="$1"
-      shift
-      case $arg in
-      *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*|"")
-	qarg=\"`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`\" ### testsuite: skip nested quoting test
-	;;
-      *) qarg=$arg ;;
-      esac
-      libtool_args="$libtool_args $qarg"
-
-      # If the previous option needs an argument, assign it.
-      if test -n "$prev"; then
-	case $prev in
-	output)
-	  compile_command="$compile_command @OUTPUT@"
-	  finalize_command="$finalize_command @OUTPUT@"
-	  ;;
-	esac
-
-	case $prev in
-	dlfiles|dlprefiles)
-	  if test "$preload" = no; then
-	    # Add the symbol object into the linking commands.
-	    compile_command="$compile_command @SYMFILE@"
-	    finalize_command="$finalize_command @SYMFILE@"
-	    preload=yes
-	  fi
-	  case $arg in
-	  *.la | *.lo) ;;  # We handle these cases below.
-	  force)
-	    if test "$dlself" = no; then
-	      dlself=needless
-	      export_dynamic=yes
-	    fi
-	    prev=
-	    continue
-	    ;;
-	  self)
-	    if test "$prev" = dlprefiles; then
-	      dlself=yes
-	    elif test "$prev" = dlfiles && test "$dlopen_self" != yes; then
-	      dlself=yes
-	    else
-	      dlself=needless
-	      export_dynamic=yes
-	    fi
-	    prev=
-	    continue
-	    ;;
-	  *)
-	    if test "$prev" = dlfiles; then
-	      dlfiles="$dlfiles $arg"
-	    else
-	      dlprefiles="$dlprefiles $arg"
-	    fi
-	    prev=
-	    continue
-	    ;;
-	  esac
-	  ;;
-	expsyms)
-	  export_symbols="$arg"
-	  if test ! -f "$arg"; then
-	    $echo "$modename: symbol file \`$arg' does not exist"
-	    exit $EXIT_FAILURE
-	  fi
-	  prev=
-	  continue
-	  ;;
-	expsyms_regex)
-	  export_symbols_regex="$arg"
-	  prev=
-	  continue
-	  ;;
-	inst_prefix)
-	  inst_prefix_dir="$arg"
-	  prev=
-	  continue
-	  ;;
-	precious_regex)
-	  precious_files_regex="$arg"
-	  prev=
-	  continue
-	  ;;
-	release)
-	  release="-$arg"
-	  prev=
-	  continue
-	  ;;
-	objectlist)
-	  if test -f "$arg"; then
-	    save_arg=$arg
-	    moreargs=
-	    for fil in `cat $save_arg`
-	    do
-#	      moreargs="$moreargs $fil"
-	      arg=$fil
-	      # A libtool-controlled object.
-
-	      # Check to see that this really is a libtool object.
-	      if (${SED} -e '2q' $arg | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
-		pic_object=
-		non_pic_object=
-
-		# Read the .lo file
-		# If there is no directory component, then add one.
-		case $arg in
-		*/* | *\\*) . $arg ;;
-		*) . ./$arg ;;
-		esac
-
-		if test -z "$pic_object" || \
-		   test -z "$non_pic_object" ||
-		   test "$pic_object" = none && \
-		   test "$non_pic_object" = none; then
-		  $echo "$modename: cannot find name of object for \`$arg'" 1>&2
-		  exit $EXIT_FAILURE
-		fi
-
-		# Extract subdirectory from the argument.
-		xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'`
-		if test "X$xdir" = "X$arg"; then
-		  xdir=
-		else
-		  xdir="$xdir/"
-		fi
-
-		if test "$pic_object" != none; then
-		  # Prepend the subdirectory the object is found in.
-		  pic_object="$xdir$pic_object"
-
-		  if test "$prev" = dlfiles; then
-		    if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then
-		      dlfiles="$dlfiles $pic_object"
-		      prev=
-		      continue
-		    else
-		      # If libtool objects are unsupported, then we need to preload.
-		      prev=dlprefiles
-		    fi
-		  fi
-
-		  # CHECK ME:  I think I busted this.  -Ossama
-		  if test "$prev" = dlprefiles; then
-		    # Preload the old-style object.
-		    dlprefiles="$dlprefiles $pic_object"
-		    prev=
-		  fi
-
-		  # A PIC object.
-		  libobjs="$libobjs $pic_object"
-		  arg="$pic_object"
-		fi
-
-		# Non-PIC object.
-		if test "$non_pic_object" != none; then
-		  # Prepend the subdirectory the object is found in.
-		  non_pic_object="$xdir$non_pic_object"
-
-		  # A standard non-PIC object
-		  non_pic_objects="$non_pic_objects $non_pic_object"
-		  if test -z "$pic_object" || test "$pic_object" = none ; then
-		    arg="$non_pic_object"
-		  fi
-		else
-		  # If the PIC object exists, use it instead.
-		  # $xdir was prepended to $pic_object above.
-		  non_pic_object="$pic_object"
-		  non_pic_objects="$non_pic_objects $non_pic_object"
-		fi
-	      else
-		# Only an error if not doing a dry-run.
-		if test -z "$run"; then
-		  $echo "$modename: \`$arg' is not a valid libtool object" 1>&2
-		  exit $EXIT_FAILURE
-		else
-		  # Dry-run case.
-
-		  # Extract subdirectory from the argument.
-		  xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'`
-		  if test "X$xdir" = "X$arg"; then
-		    xdir=
-		  else
-		    xdir="$xdir/"
-		  fi
-
-		  pic_object=`$echo "X${xdir}${objdir}/${arg}" | $Xsed -e "$lo2o"`
-		  non_pic_object=`$echo "X${xdir}${arg}" | $Xsed -e "$lo2o"`
-		  libobjs="$libobjs $pic_object"
-		  non_pic_objects="$non_pic_objects $non_pic_object"
-		fi
-	      fi
-	    done
-	  else
-	    $echo "$modename: link input file \`$save_arg' does not exist"
-	    exit $EXIT_FAILURE
-	  fi
-	  arg=$save_arg
-	  prev=
-	  continue
-	  ;;
-	rpath | xrpath)
-	  # We need an absolute path.
-	  case $arg in
-	  [\\/]* | [A-Za-z]:[\\/]*) ;;
-	  *)
-	    $echo "$modename: only absolute run-paths are allowed" 1>&2
-	    exit $EXIT_FAILURE
-	    ;;
-	  esac
-	  if test "$prev" = rpath; then
-	    case "$rpath " in
-	    *" $arg "*) ;;
-	    *) rpath="$rpath $arg" ;;
-	    esac
-	  else
-	    case "$xrpath " in
-	    *" $arg "*) ;;
-	    *) xrpath="$xrpath $arg" ;;
-	    esac
-	  fi
-	  prev=
-	  continue
-	  ;;
-	xcompiler)
-	  compiler_flags="$compiler_flags $qarg"
-	  prev=
-	  compile_command="$compile_command $qarg"
-	  finalize_command="$finalize_command $qarg"
-	  continue
-	  ;;
-	xlinker)
-	  linker_flags="$linker_flags $qarg"
-	  compiler_flags="$compiler_flags $wl$qarg"
-	  prev=
-	  compile_command="$compile_command $wl$qarg"
-	  finalize_command="$finalize_command $wl$qarg"
-	  continue
-	  ;;
-	xcclinker)
-	  linker_flags="$linker_flags $qarg"
-	  compiler_flags="$compiler_flags $qarg"
-	  prev=
-	  compile_command="$compile_command $qarg"
-	  finalize_command="$finalize_command $qarg"
-	  continue
-	  ;;
-	shrext)
-  	  shrext_cmds="$arg"
-	  prev=
-	  continue
-	  ;;
-	darwin_framework|darwin_framework_skip)
-	  test "$prev" = "darwin_framework" && compiler_flags="$compiler_flags $arg"
-	  compile_command="$compile_command $arg"
-	  finalize_command="$finalize_command $arg"
-	  prev=
-	  continue
-	  ;;
-	*)
-	  eval "$prev=\"\$arg\""
-	  prev=
-	  continue
-	  ;;
-	esac
-      fi # test -n "$prev"
-
-      prevarg="$arg"
-
-      case $arg in
-      -all-static)
-	if test -n "$link_static_flag"; then
-	  compile_command="$compile_command $link_static_flag"
-	  finalize_command="$finalize_command $link_static_flag"
-	fi
-	continue
-	;;
-
-      -allow-undefined)
-	# FIXME: remove this flag sometime in the future.
-	$echo "$modename: \`-allow-undefined' is deprecated because it is the default" 1>&2
-	continue
-	;;
-
-      -avoid-version)
-	avoid_version=yes
-	continue
-	;;
-
-      -dlopen)
-	prev=dlfiles
-	continue
-	;;
-
-      -dlpreopen)
-	prev=dlprefiles
-	continue
-	;;
-
-      -export-dynamic)
-	export_dynamic=yes
-	continue
-	;;
-
-      -export-symbols | -export-symbols-regex)
-	if test -n "$export_symbols" || test -n "$export_symbols_regex"; then
-	  $echo "$modename: more than one -exported-symbols argument is not allowed"
-	  exit $EXIT_FAILURE
-	fi
-	if test "X$arg" = "X-export-symbols"; then
-	  prev=expsyms
-	else
-	  prev=expsyms_regex
-	fi
-	continue
-	;;
-
-      -framework|-arch|-isysroot)
-	case " $CC " in
-	  *" ${arg} ${1} "* | *" ${arg}	${1} "*) 
-		prev=darwin_framework_skip ;;
-	  *) compiler_flags="$compiler_flags $arg"
-	     prev=darwin_framework ;;
-	esac
-	compile_command="$compile_command $arg"
-	finalize_command="$finalize_command $arg"
-	continue
-	;;
-
-      -inst-prefix-dir)
-	prev=inst_prefix
-	continue
-	;;
-
-      # The native IRIX linker understands -LANG:*, -LIST:* and -LNO:*
-      # so, if we see these flags be careful not to treat them like -L
-      -L[A-Z][A-Z]*:*)
-	case $with_gcc/$host in
-	no/*-*-irix* | /*-*-irix*)
-	  compile_command="$compile_command $arg"
-	  finalize_command="$finalize_command $arg"
-	  ;;
-	esac
-	continue
-	;;
-
-      -L*)
-	dir=`$echo "X$arg" | $Xsed -e 's/^-L//'`
-	# We need an absolute path.
-	case $dir in
-	[\\/]* | [A-Za-z]:[\\/]*) ;;
-	*)
-	  absdir=`cd "$dir" && pwd`
-	  if test -z "$absdir"; then
-	    $echo "$modename: cannot determine absolute directory name of \`$dir'" 1>&2
-	    absdir="$dir"
-	    notinst_path="$notinst_path $dir"
-	  fi
-	  dir="$absdir"
-	  ;;
-	esac
-	case "$deplibs " in
-	*" -L$dir "*) ;;
-	*)
-	  deplibs="$deplibs -L$dir"
-	  lib_search_path="$lib_search_path $dir"
-	  ;;
-	esac
-	case $host in
-	*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
-	  testbindir=`$echo "X$dir" | $Xsed -e 's*/lib$*/bin*'`
-	  case :$dllsearchpath: in
-	  *":$dir:"*) ;;
-	  *) dllsearchpath="$dllsearchpath:$dir";;
-	  esac
-	  case :$dllsearchpath: in
-	  *":$testbindir:"*) ;;
-	  *) dllsearchpath="$dllsearchpath:$testbindir";;
-	  esac
-	  ;;
-	esac
-	continue
-	;;
-
-      -l*)
-	if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then
-	  case $host in
-	  *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos*)
-	    # These systems don't actually have a C or math library (as such)
-	    continue
-	    ;;
-	  *-*-os2*)
-	    # These systems don't actually have a C library (as such)
-	    test "X$arg" = "X-lc" && continue
-	    ;;
-	  *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
-	    # Do not include libc due to us having libc/libc_r.
-	    test "X$arg" = "X-lc" && continue
-	    ;;
-	  *-*-rhapsody* | *-*-darwin1.[012])
-	    # Rhapsody C and math libraries are in the System framework
-	    deplibs="$deplibs -framework System"
-	    continue
-	    ;;
-	  *-*-sco3.2v5* | *-*-sco5v6*)
-	    # Causes problems with __ctype
-	    test "X$arg" = "X-lc" && continue
-	    ;;
-	  *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*)
-	    # Compiler inserts libc in the correct place for threads to work
-	    test "X$arg" = "X-lc" && continue
-	    ;;
-	  esac
-	elif test "X$arg" = "X-lc_r"; then
-	 case $host in
-	 *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
-	   # Do not include libc_r directly, use -pthread flag.
-	   continue
-	   ;;
-	 esac
-	fi
-	deplibs="$deplibs $arg"
-	continue
-	;;
-
-      # Tru64 UNIX uses -model [arg] to determine the layout of C++
-      # classes, name mangling, and exception handling.
-      -model)
-	compile_command="$compile_command $arg"
-	compiler_flags="$compiler_flags $arg"
-	finalize_command="$finalize_command $arg"
-	prev=xcompiler
-	continue
-	;;
-
-     -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads)
-	compiler_flags="$compiler_flags $arg"
-	compile_command="$compile_command $arg"
-	finalize_command="$finalize_command $arg"
-	continue
-	;;
-
-      -module)
-	module=yes
-	continue
-	;;
-
-      # -64, -mips[0-9] enable 64-bit mode on the SGI compiler
-      # -r[0-9][0-9]* specifies the processor on the SGI compiler
-      # -xarch=*, -xtarget=* enable 64-bit mode on the Sun compiler
-      # +DA*, +DD* enable 64-bit mode on the HP compiler
-      # -q* pass through compiler args for the IBM compiler
-      # -m* pass through architecture-specific compiler args for GCC
-      # -m*, -t[45]*, -txscale* pass through architecture-specific
-      # compiler args for GCC
-      # -pg, --coverage pass through profiling flag for GCC
-      # -F/path gives path to uninstalled frameworks, gcc on darwin
-      # @file GCC response files
-      -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \
-      -t[45]*|-txscale*|-pg|--coverage|-F*|@*)
-
-	# Unknown arguments in both finalize_command and compile_command need
-	# to be aesthetically quoted because they are evaled later.
-	arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
-	case $arg in
-	*[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*|"")
-	  arg="\"$arg\""
-	  ;;
-	esac
-        compile_command="$compile_command $arg"
-        finalize_command="$finalize_command $arg"
-        compiler_flags="$compiler_flags $arg"
-        continue
-        ;;
-
-      -shrext)
-	prev=shrext
-	continue
-	;;
-
-      -no-fast-install)
-	fast_install=no
-	continue
-	;;
-
-      -no-install)
-	case $host in
-	*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
-	  # The PATH hackery in wrapper scripts is required on Windows
-	  # in order for the loader to find any dlls it needs.
-	  $echo "$modename: warning: \`-no-install' is ignored for $host" 1>&2
-	  $echo "$modename: warning: assuming \`-no-fast-install' instead" 1>&2
-	  fast_install=no
-	  ;;
-	*) no_install=yes ;;
-	esac
-	continue
-	;;
-
-      -no-undefined)
-	allow_undefined=no
-	continue
-	;;
-
-      -objectlist)
-	prev=objectlist
-	continue
-	;;
-
-      -o) prev=output ;;
-
-      -precious-files-regex)
-	prev=precious_regex
-	continue
-	;;
-
-      -release)
-	prev=release
-	continue
-	;;
-
-      -rpath)
-	prev=rpath
-	continue
-	;;
-
-      -R)
-	prev=xrpath
-	continue
-	;;
-
-      -R*)
-	dir=`$echo "X$arg" | $Xsed -e 's/^-R//'`
-	# We need an absolute path.
-	case $dir in
-	[\\/]* | [A-Za-z]:[\\/]*) ;;
-	*)
-	  $echo "$modename: only absolute run-paths are allowed" 1>&2
-	  exit $EXIT_FAILURE
-	  ;;
-	esac
-	case "$xrpath " in
-	*" $dir "*) ;;
-	*) xrpath="$xrpath $dir" ;;
-	esac
-	continue
-	;;
-
-      -static | -static-libtool-libs)
-	# The effects of -static are defined in a previous loop.
-	# We used to do the same as -all-static on platforms that
-	# didn't have a PIC flag, but the assumption that the effects
-	# would be equivalent was wrong.  It would break on at least
-	# Digital Unix and AIX.
-	continue
-	;;
-
-      -thread-safe)
-	thread_safe=yes
-	continue
-	;;
-
-      -version-info)
-	prev=vinfo
-	continue
-	;;
-      -version-number)
-	prev=vinfo
-	vinfo_number=yes
-	continue
-	;;
-
-      -Wc,*)
-	args=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wc,//'`
-	arg=
-	save_ifs="$IFS"; IFS=','
-	for flag in $args; do
-	  IFS="$save_ifs"
-	  case $flag in
-	    *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*|"")
-	    flag="\"$flag\""
-	    ;;
-	  esac
-	  arg="$arg $wl$flag"
-	  compiler_flags="$compiler_flags $flag"
-	done
-	IFS="$save_ifs"
-	arg=`$echo "X$arg" | $Xsed -e "s/^ //"`
-	;;
-
-      -Wl,*)
-	args=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wl,//'`
-	arg=
-	save_ifs="$IFS"; IFS=','
-	for flag in $args; do
-	  IFS="$save_ifs"
-	  case $flag in
-	    *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*|"")
-	    flag="\"$flag\""
-	    ;;
-	  esac
-	  arg="$arg $wl$flag"
-	  compiler_flags="$compiler_flags $wl$flag"
-	  linker_flags="$linker_flags $flag"
-	done
-	IFS="$save_ifs"
-	arg=`$echo "X$arg" | $Xsed -e "s/^ //"`
-	;;
-
-      -Xcompiler)
-	prev=xcompiler
-	continue
-	;;
-
-      -Xlinker)
-	prev=xlinker
-	continue
-	;;
-
-      -XCClinker)
-	prev=xcclinker
-	continue
-	;;
-
-      # Some other compiler flag.
-      -* | +*)
-	# Unknown arguments in both finalize_command and compile_command need
-	# to be aesthetically quoted because they are evaled later.
-	arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
-	case $arg in
-	*[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*|"")
-	  arg="\"$arg\""
-	  ;;
-	esac
-	;;
-
-      *.$objext)
-	# A standard object.
-	objs="$objs $arg"
-	;;
-
-      *.lo)
-	# A libtool-controlled object.
-
-	# Check to see that this really is a libtool object.
-	if (${SED} -e '2q' $arg | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
-	  pic_object=
-	  non_pic_object=
-
-	  # Read the .lo file
-	  # If there is no directory component, then add one.
-	  case $arg in
-	  */* | *\\*) . $arg ;;
-	  *) . ./$arg ;;
-	  esac
-
-	  if test -z "$pic_object" || \
-	     test -z "$non_pic_object" ||
-	     test "$pic_object" = none && \
-	     test "$non_pic_object" = none; then
-	    $echo "$modename: cannot find name of object for \`$arg'" 1>&2
-	    exit $EXIT_FAILURE
-	  fi
-
-	  # Extract subdirectory from the argument.
-	  xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'`
-	  if test "X$xdir" = "X$arg"; then
-	    xdir=
- 	  else
-	    xdir="$xdir/"
-	  fi
-
-	  if test "$pic_object" != none; then
-	    # Prepend the subdirectory the object is found in.
-	    pic_object="$xdir$pic_object"
-
-	    if test "$prev" = dlfiles; then
-	      if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then
-		dlfiles="$dlfiles $pic_object"
-		prev=
-		continue
-	      else
-		# If libtool objects are unsupported, then we need to preload.
-		prev=dlprefiles
-	      fi
-	    fi
-
-	    # CHECK ME:  I think I busted this.  -Ossama
-	    if test "$prev" = dlprefiles; then
-	      # Preload the old-style object.
-	      dlprefiles="$dlprefiles $pic_object"
-	      prev=
-	    fi
-
-	    # A PIC object.
-	    libobjs="$libobjs $pic_object"
-	    arg="$pic_object"
-	  fi
-
-	  # Non-PIC object.
-	  if test "$non_pic_object" != none; then
-	    # Prepend the subdirectory the object is found in.
-	    non_pic_object="$xdir$non_pic_object"
-
-	    # A standard non-PIC object
-	    non_pic_objects="$non_pic_objects $non_pic_object"
-	    if test -z "$pic_object" || test "$pic_object" = none ; then
-	      arg="$non_pic_object"
-	    fi
-	  else
-	    # If the PIC object exists, use it instead.
-	    # $xdir was prepended to $pic_object above.
-	    non_pic_object="$pic_object"
-	    non_pic_objects="$non_pic_objects $non_pic_object"
-	  fi
-	else
-	  # Only an error if not doing a dry-run.
-	  if test -z "$run"; then
-	    $echo "$modename: \`$arg' is not a valid libtool object" 1>&2
-	    exit $EXIT_FAILURE
-	  else
-	    # Dry-run case.
-
-	    # Extract subdirectory from the argument.
-	    xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'`
-	    if test "X$xdir" = "X$arg"; then
-	      xdir=
-	    else
-	      xdir="$xdir/"
-	    fi
-
-	    pic_object=`$echo "X${xdir}${objdir}/${arg}" | $Xsed -e "$lo2o"`
-	    non_pic_object=`$echo "X${xdir}${arg}" | $Xsed -e "$lo2o"`
-	    libobjs="$libobjs $pic_object"
-	    non_pic_objects="$non_pic_objects $non_pic_object"
-	  fi
-	fi
-	;;
-
-      *.$libext)
-	# An archive.
-	deplibs="$deplibs $arg"
-	old_deplibs="$old_deplibs $arg"
-	continue
-	;;
-
-      *.la)
-	# A libtool-controlled library.
-
-	if test "$prev" = dlfiles; then
-	  # This library was specified with -dlopen.
-	  dlfiles="$dlfiles $arg"
-	  prev=
-	elif test "$prev" = dlprefiles; then
-	  # The library was specified with -dlpreopen.
-	  dlprefiles="$dlprefiles $arg"
-	  prev=
-	else
-	  deplibs="$deplibs $arg"
-	fi
-	continue
-	;;
-
-      # Some other compiler argument.
-      *)
-	# Unknown arguments in both finalize_command and compile_command need
-	# to be aesthetically quoted because they are evaled later.
-	arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
-	case $arg in
-	*[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*|"")
-	  arg="\"$arg\""
-	  ;;
-	esac
-	;;
-      esac # arg
-
-      # Now actually substitute the argument into the commands.
-      if test -n "$arg"; then
-	compile_command="$compile_command $arg"
-	finalize_command="$finalize_command $arg"
-      fi
-    done # argument parsing loop
-
-    if test -n "$prev"; then
-      $echo "$modename: the \`$prevarg' option requires an argument" 1>&2
-      $echo "$help" 1>&2
-      exit $EXIT_FAILURE
-    fi
-
-    if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then
-      eval arg=\"$export_dynamic_flag_spec\"
-      compile_command="$compile_command $arg"
-      finalize_command="$finalize_command $arg"
-    fi
-
-    oldlibs=
-    # calculate the name of the file, without its directory
-    outputname=`$echo "X$output" | $Xsed -e 's%^.*/%%'`
-    libobjs_save="$libobjs"
-
-    if test -n "$shlibpath_var"; then
-      # get the directories listed in $shlibpath_var
-      eval shlib_search_path=\`\$echo \"X\${$shlibpath_var}\" \| \$Xsed -e \'s/:/ /g\'\`
-    else
-      shlib_search_path=
-    fi
-    eval sys_lib_search_path=\"$sys_lib_search_path_spec\"
-    eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\"
-
-    output_objdir=`$echo "X$output" | $Xsed -e 's%/[^/]*$%%'`
-    if test "X$output_objdir" = "X$output"; then
-      output_objdir="$objdir"
-    else
-      output_objdir="$output_objdir/$objdir"
-    fi
-    # Create the object directory.
-    if test ! -d "$output_objdir"; then
-      $show "$mkdir $output_objdir"
-      $run $mkdir $output_objdir
-      exit_status=$?
-      if test "$exit_status" -ne 0 && test ! -d "$output_objdir"; then
-	exit $exit_status
-      fi
-    fi
-
-    # Determine the type of output
-    case $output in
-    "")
-      $echo "$modename: you must specify an output file" 1>&2
-      $echo "$help" 1>&2
-      exit $EXIT_FAILURE
-      ;;
-    *.$libext) linkmode=oldlib ;;
-    *.lo | *.$objext) linkmode=obj ;;
-    *.la) linkmode=lib ;;
-    *) linkmode=prog ;; # Anything else should be a program.
-    esac
-
-    case $host in
-    *cygwin* | *mingw* | *pw32*)
-      # don't eliminate duplications in $postdeps and $predeps
-      duplicate_compiler_generated_deps=yes
-      ;;
-    *)
-      duplicate_compiler_generated_deps=$duplicate_deps
-      ;;
-    esac
-    specialdeplibs=
-
-    libs=
-    # Find all interdependent deplibs by searching for libraries
-    # that are linked more than once (e.g. -la -lb -la)
-    for deplib in $deplibs; do
-      if test "X$duplicate_deps" = "Xyes" ; then
-	case "$libs " in
-	*" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
-	esac
-      fi
-      libs="$libs $deplib"
-    done
-
-    if test "$linkmode" = lib; then
-      libs="$predeps $libs $compiler_lib_search_path $postdeps"
-
-      # Compute libraries that are listed more than once in $predeps
-      # $postdeps and mark them as special (i.e., whose duplicates are
-      # not to be eliminated).
-      pre_post_deps=
-      if test "X$duplicate_compiler_generated_deps" = "Xyes" ; then
-	for pre_post_dep in $predeps $postdeps; do
-	  case "$pre_post_deps " in
-	  *" $pre_post_dep "*) specialdeplibs="$specialdeplibs $pre_post_deps" ;;
-	  esac
-	  pre_post_deps="$pre_post_deps $pre_post_dep"
-	done
-      fi
-      pre_post_deps=
-    fi
-
-    deplibs=
-    newdependency_libs=
-    newlib_search_path=
-    need_relink=no # whether we're linking any uninstalled libtool libraries
-    notinst_deplibs= # not-installed libtool libraries
-    case $linkmode in
-    lib)
-	passes="conv link"
-	for file in $dlfiles $dlprefiles; do
-	  case $file in
-	  *.la) ;;
-	  *)
-	    $echo "$modename: libraries can \`-dlopen' only libtool libraries: $file" 1>&2
-	    exit $EXIT_FAILURE
-	    ;;
-	  esac
-	done
-	;;
-    prog)
-	compile_deplibs=
-	finalize_deplibs=
-	alldeplibs=no
-	newdlfiles=
-	newdlprefiles=
-	passes="conv scan dlopen dlpreopen link"
-	;;
-    *)  passes="conv"
-	;;
-    esac
-    for pass in $passes; do
-      if test "$linkmode,$pass" = "lib,link" ||
-	 test "$linkmode,$pass" = "prog,scan"; then
-	libs="$deplibs"
-	deplibs=
-      fi
-      if test "$linkmode" = prog; then
-	case $pass in
-	dlopen) libs="$dlfiles" ;;
-	dlpreopen) libs="$dlprefiles" ;;
-	link) libs="$deplibs %DEPLIBS% $dependency_libs" ;;
-	esac
-      fi
-      if test "$pass" = dlopen; then
-	# Collect dlpreopened libraries
-	save_deplibs="$deplibs"
-	deplibs=
-      fi
-      for deplib in $libs; do
-	lib=
-	found=no
-	case $deplib in
-	-mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads)
-	  if test "$linkmode,$pass" = "prog,link"; then
-	    compile_deplibs="$deplib $compile_deplibs"
-	    finalize_deplibs="$deplib $finalize_deplibs"
-	  else
-	    compiler_flags="$compiler_flags $deplib"
-	  fi
-	  continue
-	  ;;
-	-l*)
-	  if test "$linkmode" != lib && test "$linkmode" != prog; then
-	    $echo "$modename: warning: \`-l' is ignored for archives/objects" 1>&2
-	    continue
-	  fi
-	  name=`$echo "X$deplib" | $Xsed -e 's/^-l//'`
-	  for searchdir in $newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path; do
-	    for search_ext in .la $std_shrext .so .a; do
-	      # Search the libtool library
-	      lib="$searchdir/lib${name}${search_ext}"
-	      if test -f "$lib"; then
-		if test "$search_ext" = ".la"; then
-		  found=yes
-		else
-		  found=no
-		fi
-		break 2
-	      fi
-	    done
-	  done
-	  if test "$found" != yes; then
-	    # deplib doesn't seem to be a libtool library
-	    if test "$linkmode,$pass" = "prog,link"; then
-	      compile_deplibs="$deplib $compile_deplibs"
-	      finalize_deplibs="$deplib $finalize_deplibs"
-	    else
-	      deplibs="$deplib $deplibs"
-	      test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs"
-	    fi
-	    continue
-	  else # deplib is a libtool library
-	    # If $allow_libtool_libs_with_static_runtimes && $deplib is a stdlib,
-	    # We need to do some special things here, and not later.
-	    if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
-	      case " $predeps $postdeps " in
-	      *" $deplib "*)
-		if (${SED} -e '2q' $lib |
-                    grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
-		  library_names=
-		  old_library=
-		  case $lib in
-		  */* | *\\*) . $lib ;;
-		  *) . ./$lib ;;
-		  esac
-		  for l in $old_library $library_names; do
-		    ll="$l"
-		  done
-		  if test "X$ll" = "X$old_library" ; then # only static version available
-		    found=no
-		    ladir=`$echo "X$lib" | $Xsed -e 's%/[^/]*$%%'`
-		    test "X$ladir" = "X$lib" && ladir="."
-		    lib=$ladir/$old_library
-		    if test "$linkmode,$pass" = "prog,link"; then
-		      compile_deplibs="$deplib $compile_deplibs"
-		      finalize_deplibs="$deplib $finalize_deplibs"
-		    else
-		      deplibs="$deplib $deplibs"
-		      test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs"
-		    fi
-		    continue
-		  fi
-		fi
-	        ;;
-	      *) ;;
-	      esac
-	    fi
-	  fi
-	  ;; # -l
-	-L*)
-	  case $linkmode in
-	  lib)
-	    deplibs="$deplib $deplibs"
-	    test "$pass" = conv && continue
-	    newdependency_libs="$deplib $newdependency_libs"
-	    newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`
-	    ;;
-	  prog)
-	    if test "$pass" = conv; then
-	      deplibs="$deplib $deplibs"
-	      continue
-	    fi
-	    if test "$pass" = scan; then
-	      deplibs="$deplib $deplibs"
-	    else
-	      compile_deplibs="$deplib $compile_deplibs"
-	      finalize_deplibs="$deplib $finalize_deplibs"
-	    fi
-	    newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`
-	    ;;
-	  *)
-	    $echo "$modename: warning: \`-L' is ignored for archives/objects" 1>&2
-	    ;;
-	  esac # linkmode
-	  continue
-	  ;; # -L
-	-R*)
-	  if test "$pass" = link; then
-	    dir=`$echo "X$deplib" | $Xsed -e 's/^-R//'`
-	    # Make sure the xrpath contains only unique directories.
-	    case "$xrpath " in
-	    *" $dir "*) ;;
-	    *) xrpath="$xrpath $dir" ;;
-	    esac
-	  fi
-	  deplibs="$deplib $deplibs"
-	  continue
-	  ;;
-	*.la) lib="$deplib" ;;
-	*.$libext)
-	  if test "$pass" = conv; then
-	    deplibs="$deplib $deplibs"
-	    continue
-	  fi
-	  case $linkmode in
-	  lib)
-	    valid_a_lib=no
-	    case $deplibs_check_method in
-	      match_pattern*)
-		set dummy $deplibs_check_method
-	        match_pattern_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"`
-		if eval $echo \"$deplib\" 2>/dev/null \
-		    | $SED 10q \
-		    | $EGREP "$match_pattern_regex" > /dev/null; then
-		  valid_a_lib=yes
-		fi
-		;;
-	      pass_all)
-		valid_a_lib=yes
-		;;
-            esac
-	    if test "$valid_a_lib" != yes; then
-	      $echo
-	      $echo "*** Warning: Trying to link with static lib archive $deplib."
-	      $echo "*** I have the capability to make that library automatically link in when"
-	      $echo "*** you link to this library.  But I can only do this if you have a"
-	      $echo "*** shared version of the library, which you do not appear to have"
-	      $echo "*** because the file extensions .$libext of this argument makes me believe"
-	      $echo "*** that it is just a static archive that I should not used here."
-	    else
-	      $echo
-	      $echo "*** Warning: Linking the shared library $output against the"
-	      $echo "*** static library $deplib is not portable!"
-	      deplibs="$deplib $deplibs"
-	    fi
-	    continue
-	    ;;
-	  prog)
-	    if test "$pass" != link; then
-	      deplibs="$deplib $deplibs"
-	    else
-	      compile_deplibs="$deplib $compile_deplibs"
-	      finalize_deplibs="$deplib $finalize_deplibs"
-	    fi
-	    continue
-	    ;;
-	  esac # linkmode
-	  ;; # *.$libext
-	*.lo | *.$objext)
-	  if test "$pass" = conv; then
-	    deplibs="$deplib $deplibs"
-	  elif test "$linkmode" = prog; then
-	    if test "$pass" = dlpreopen || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then
-	      # If there is no dlopen support or we're linking statically,
-	      # we need to preload.
-	      newdlprefiles="$newdlprefiles $deplib"
-	      compile_deplibs="$deplib $compile_deplibs"
-	      finalize_deplibs="$deplib $finalize_deplibs"
-	    else
-	      newdlfiles="$newdlfiles $deplib"
-	    fi
-	  fi
-	  continue
-	  ;;
-	%DEPLIBS%)
-	  alldeplibs=yes
-	  continue
-	  ;;
-	esac # case $deplib
-	if test "$found" = yes || test -f "$lib"; then :
-	else
-	  $echo "$modename: cannot find the library \`$lib' or unhandled argument \`$deplib'" 1>&2
-	  exit $EXIT_FAILURE
-	fi
-
-	# Check to see that this really is a libtool archive.
-	if (${SED} -e '2q' $lib | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
-	else
-	  $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
-	  exit $EXIT_FAILURE
-	fi
-
-	ladir=`$echo "X$lib" | $Xsed -e 's%/[^/]*$%%'`
-	test "X$ladir" = "X$lib" && ladir="."
-
-	dlname=
-	dlopen=
-	dlpreopen=
-	libdir=
-	library_names=
-	old_library=
-	# If the library was installed with an old release of libtool,
-	# it will not redefine variables installed, or shouldnotlink
-	installed=yes
-	shouldnotlink=no
-	avoidtemprpath=
-
-
-	# Read the .la file
-	case $lib in
-	*/* | *\\*) . $lib ;;
-	*) . ./$lib ;;
-	esac
-
-	if test "$linkmode,$pass" = "lib,link" ||
-	   test "$linkmode,$pass" = "prog,scan" ||
-	   { test "$linkmode" != prog && test "$linkmode" != lib; }; then
-	  test -n "$dlopen" && dlfiles="$dlfiles $dlopen"
-	  test -n "$dlpreopen" && dlprefiles="$dlprefiles $dlpreopen"
-	fi
-
-	if test "$pass" = conv; then
-	  # Only check for convenience libraries
-	  deplibs="$lib $deplibs"
-	  if test -z "$libdir"; then
-	    if test -z "$old_library"; then
-	      $echo "$modename: cannot find name of link library for \`$lib'" 1>&2
-	      exit $EXIT_FAILURE
-	    fi
-	    # It is a libtool convenience library, so add in its objects.
-	    convenience="$convenience $ladir/$objdir/$old_library"
-	    old_convenience="$old_convenience $ladir/$objdir/$old_library"
-	    tmp_libs=
-	    for deplib in $dependency_libs; do
-	      deplibs="$deplib $deplibs"
-              if test "X$duplicate_deps" = "Xyes" ; then
-	        case "$tmp_libs " in
-	        *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
-	        esac
-              fi
-	      tmp_libs="$tmp_libs $deplib"
-	    done
-	  elif test "$linkmode" != prog && test "$linkmode" != lib; then
-	    $echo "$modename: \`$lib' is not a convenience library" 1>&2
-	    exit $EXIT_FAILURE
-	  fi
-	  continue
-	fi # $pass = conv
-
-
-	# Get the name of the library we link against.
-	linklib=
-	for l in $old_library $library_names; do
-	  linklib="$l"
-	done
-	if test -z "$linklib"; then
-	  $echo "$modename: cannot find name of link library for \`$lib'" 1>&2
-	  exit $EXIT_FAILURE
-	fi
-
-	# This library was specified with -dlopen.
-	if test "$pass" = dlopen; then
-	  if test -z "$libdir"; then
-	    $echo "$modename: cannot -dlopen a convenience library: \`$lib'" 1>&2
-	    exit $EXIT_FAILURE
-	  fi
-	  if test -z "$dlname" ||
-	     test "$dlopen_support" != yes ||
-	     test "$build_libtool_libs" = no; then
-	    # If there is no dlname, no dlopen support or we're linking
-	    # statically, we need to preload.  We also need to preload any
-	    # dependent libraries so libltdl's deplib preloader doesn't
-	    # bomb out in the load deplibs phase.
-	    dlprefiles="$dlprefiles $lib $dependency_libs"
-	  else
-	    newdlfiles="$newdlfiles $lib"
-	  fi
-	  continue
-	fi # $pass = dlopen
-
-	# We need an absolute path.
-	case $ladir in
-	[\\/]* | [A-Za-z]:[\\/]*) abs_ladir="$ladir" ;;
-	*)
-	  abs_ladir=`cd "$ladir" && pwd`
-	  if test -z "$abs_ladir"; then
-	    $echo "$modename: warning: cannot determine absolute directory name of \`$ladir'" 1>&2
-	    $echo "$modename: passing it literally to the linker, although it might fail" 1>&2
-	    abs_ladir="$ladir"
-	  fi
-	  ;;
-	esac
-	laname=`$echo "X$lib" | $Xsed -e 's%^.*/%%'`
-
-	# Find the relevant object directory and library name.
-	if test "X$installed" = Xyes; then
-	  if test ! -f "$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then
-	    $echo "$modename: warning: library \`$lib' was moved." 1>&2
-	    dir="$ladir"
-	    absdir="$abs_ladir"
-	    libdir="$abs_ladir"
-	  else
-	    dir="$libdir"
-	    absdir="$libdir"
-	  fi
-	  test "X$hardcode_automatic" = Xyes && avoidtemprpath=yes
-	else
-	  if test ! -f "$ladir/$objdir/$linklib" && test -f "$abs_ladir/$linklib"; then
-	    dir="$ladir"
-	    absdir="$abs_ladir"
-	    # Remove this search path later
-	    notinst_path="$notinst_path $abs_ladir"
-	  else
-	    dir="$ladir/$objdir"
-	    absdir="$abs_ladir/$objdir"
-	    # Remove this search path later
-	    notinst_path="$notinst_path $abs_ladir"
-	  fi
-	fi # $installed = yes
-	name=`$echo "X$laname" | $Xsed -e 's/\.la$//' -e 's/^lib//'`
-
-	# This library was specified with -dlpreopen.
-	if test "$pass" = dlpreopen; then
-	  if test -z "$libdir"; then
-	    $echo "$modename: cannot -dlpreopen a convenience library: \`$lib'" 1>&2
-	    exit $EXIT_FAILURE
-	  fi
-	  # Prefer using a static library (so that no silly _DYNAMIC symbols
-	  # are required to link).
-	  if test -n "$old_library"; then
-	    newdlprefiles="$newdlprefiles $dir/$old_library"
-	  # Otherwise, use the dlname, so that lt_dlopen finds it.
-	  elif test -n "$dlname"; then
-	    newdlprefiles="$newdlprefiles $dir/$dlname"
-	  else
-	    newdlprefiles="$newdlprefiles $dir/$linklib"
-	  fi
-	fi # $pass = dlpreopen
-
-	if test -z "$libdir"; then
-	  # Link the convenience library
-	  if test "$linkmode" = lib; then
-	    deplibs="$dir/$old_library $deplibs"
-	  elif test "$linkmode,$pass" = "prog,link"; then
-	    compile_deplibs="$dir/$old_library $compile_deplibs"
-	    finalize_deplibs="$dir/$old_library $finalize_deplibs"
-	  else
-	    deplibs="$lib $deplibs" # used for prog,scan pass
-	  fi
-	  continue
-	fi
-
-
-	if test "$linkmode" = prog && test "$pass" != link; then
-	  newlib_search_path="$newlib_search_path $ladir"
-	  deplibs="$lib $deplibs"
-
-	  linkalldeplibs=no
-	  if test "$link_all_deplibs" != no || test -z "$library_names" ||
-	     test "$build_libtool_libs" = no; then
-	    linkalldeplibs=yes
-	  fi
-
-	  tmp_libs=
-	  for deplib in $dependency_libs; do
-	    case $deplib in
-	    -L*) newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`;; ### testsuite: skip nested quoting test
-	    esac
-	    # Need to link against all dependency_libs?
-	    if test "$linkalldeplibs" = yes; then
-	      deplibs="$deplib $deplibs"
-	    else
-	      # Need to hardcode shared library paths
-	      # or/and link against static libraries
-	      newdependency_libs="$deplib $newdependency_libs"
-	    fi
-	    if test "X$duplicate_deps" = "Xyes" ; then
-	      case "$tmp_libs " in
-	      *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
-	      esac
-	    fi
-	    tmp_libs="$tmp_libs $deplib"
-	  done # for deplib
-	  continue
-	fi # $linkmode = prog...
-
-	if test "$linkmode,$pass" = "prog,link"; then
-	  if test -n "$library_names" &&
-	     { { test "$prefer_static_libs" = no ||
-		 test "$prefer_static_libs,$installed" = "built,yes"; } ||
-	       test -z "$old_library"; }; then
-	    # We need to hardcode the library path
-	    if test -n "$shlibpath_var" && test -z "$avoidtemprpath" ; then
-	      # Make sure the rpath contains only unique directories.
-	      case "$temp_rpath " in
-	      *" $dir "*) ;;
-	      *" $absdir "*) ;;
-	      *) temp_rpath="$temp_rpath $absdir" ;;
-	      esac
-	    fi
-
-	    # Hardcode the library path.
-	    # Skip directories that are in the system default run-time
-	    # search path.
-	    case " $sys_lib_dlsearch_path " in
-	    *" $absdir "*) ;;
-	    *)
-	      case "$compile_rpath " in
-	      *" $absdir "*) ;;
-	      *) compile_rpath="$compile_rpath $absdir"
-	      esac
-	      ;;
-	    esac
-	    case " $sys_lib_dlsearch_path " in
-	    *" $libdir "*) ;;
-	    *)
-	      case "$finalize_rpath " in
-	      *" $libdir "*) ;;
-	      *) finalize_rpath="$finalize_rpath $libdir"
-	      esac
-	      ;;
-	    esac
-	  fi # $linkmode,$pass = prog,link...
-
-	  if test "$alldeplibs" = yes &&
-	     { test "$deplibs_check_method" = pass_all ||
-	       { test "$build_libtool_libs" = yes &&
-		 test -n "$library_names"; }; }; then
-	    # We only need to search for static libraries
-	    continue
-	  fi
-	fi
-
-	link_static=no # Whether the deplib will be linked statically
-	use_static_libs=$prefer_static_libs
-	if test "$use_static_libs" = built && test "$installed" = yes ; then
-	  use_static_libs=no
-	fi
-	if test -n "$library_names" &&
-	   { test "$use_static_libs" = no || test -z "$old_library"; }; then
-	  if test "$installed" = no; then
-	    notinst_deplibs="$notinst_deplibs $lib"
-	    need_relink=yes
-	  fi
-	  # This is a shared library
-
-	  # Warn about portability, can't link against -module's on
-	  # some systems (darwin)
-	  if test "$shouldnotlink" = yes && test "$pass" = link ; then
-	    $echo
-	    if test "$linkmode" = prog; then
-	      $echo "*** Warning: Linking the executable $output against the loadable module"
-	    else
-	      $echo "*** Warning: Linking the shared library $output against the loadable module"
-	    fi
-	    $echo "*** $linklib is not portable!"
-	  fi
-	  if test "$linkmode" = lib &&
-	     test "$hardcode_into_libs" = yes; then
-	    # Hardcode the library path.
-	    # Skip directories that are in the system default run-time
-	    # search path.
-	    case " $sys_lib_dlsearch_path " in
-	    *" $absdir "*) ;;
-	    *)
-	      case "$compile_rpath " in
-	      *" $absdir "*) ;;
-	      *) compile_rpath="$compile_rpath $absdir"
-	      esac
-	      ;;
-	    esac
-	    case " $sys_lib_dlsearch_path " in
-	    *" $libdir "*) ;;
-	    *)
-	      case "$finalize_rpath " in
-	      *" $libdir "*) ;;
-	      *) finalize_rpath="$finalize_rpath $libdir"
-	      esac
-	      ;;
-	    esac
-	  fi
-
-	  if test -n "$old_archive_from_expsyms_cmds"; then
-	    # figure out the soname
-	    set dummy $library_names
-	    realname="$2"
-	    shift; shift
-	    libname=`eval \\$echo \"$libname_spec\"`
-	    # use dlname if we got it. it's perfectly good, no?
-	    if test -n "$dlname"; then
-	      soname="$dlname"
-	    elif test -n "$soname_spec"; then
-	      # bleh windows
-	      case $host in
-	      *cygwin* | mingw*)
-		major=`expr $current - $age`
-		versuffix="-$major"
-		;;
-	      esac
-	      eval soname=\"$soname_spec\"
-	    else
-	      soname="$realname"
-	    fi
-
-	    # Make a new name for the extract_expsyms_cmds to use
-	    soroot="$soname"
-	    soname=`$echo $soroot | ${SED} -e 's/^.*\///'`
-	    newlib="libimp-`$echo $soname | ${SED} 's/^lib//;s/\.dll$//'`.a"
-
-	    # If the library has no export list, then create one now
-	    if test -f "$output_objdir/$soname-def"; then :
-	    else
-	      $show "extracting exported symbol list from \`$soname'"
-	      save_ifs="$IFS"; IFS='~'
-	      cmds=$extract_expsyms_cmds
-	      for cmd in $cmds; do
-		IFS="$save_ifs"
-		eval cmd=\"$cmd\"
-		$show "$cmd"
-		$run eval "$cmd" || exit $?
-	      done
-	      IFS="$save_ifs"
-	    fi
-
-	    # Create $newlib
-	    if test -f "$output_objdir/$newlib"; then :; else
-	      $show "generating import library for \`$soname'"
-	      save_ifs="$IFS"; IFS='~'
-	      cmds=$old_archive_from_expsyms_cmds
-	      for cmd in $cmds; do
-		IFS="$save_ifs"
-		eval cmd=\"$cmd\"
-		$show "$cmd"
-		$run eval "$cmd" || exit $?
-	      done
-	      IFS="$save_ifs"
-	    fi
-	    # make sure the library variables are pointing to the new library
-	    dir=$output_objdir
-	    linklib=$newlib
-	  fi # test -n "$old_archive_from_expsyms_cmds"
-
-	  if test "$linkmode" = prog || test "$mode" != relink; then
-	    add_shlibpath=
-	    add_dir=
-	    add=
-	    lib_linked=yes
-	    case $hardcode_action in
-	    immediate | unsupported)
-	      if test "$hardcode_direct" = no; then
-		add="$dir/$linklib"
-		case $host in
-		  *-*-sco3.2v5.0.[024]*) add_dir="-L$dir" ;;
-		  *-*-sysv4*uw2*) add_dir="-L$dir" ;;
-		  *-*-sysv5OpenUNIX* | *-*-sysv5UnixWare7.[01].[10]* | \
-		    *-*-unixware7*) add_dir="-L$dir" ;;
-		  *-*-darwin* )
-		    # if the lib is a module then we can not link against
-		    # it, someone is ignoring the new warnings I added
-		    if /usr/bin/file -L $add 2> /dev/null |
-                      $EGREP ": [^:]* bundle" >/dev/null ; then
-		      $echo "** Warning, lib $linklib is a module, not a shared library"
-		      if test -z "$old_library" ; then
-		        $echo
-		        $echo "** And there doesn't seem to be a static archive available"
-		        $echo "** The link will probably fail, sorry"
-		      else
-		        add="$dir/$old_library"
-		      fi
-		    fi
-		esac
-	      elif test "$hardcode_minus_L" = no; then
-		case $host in
-		*-*-sunos*) add_shlibpath="$dir" ;;
-		esac
-		add_dir="-L$dir"
-		add="-l$name"
-	      elif test "$hardcode_shlibpath_var" = no; then
-		add_shlibpath="$dir"
-		add="-l$name"
-	      else
-		lib_linked=no
-	      fi
-	      ;;
-	    relink)
-	      if test "$hardcode_direct" = yes; then
-		add="$dir/$linklib"
-	      elif test "$hardcode_minus_L" = yes; then
-		add_dir="-L$dir"
-		# Try looking first in the location we're being installed to.
-		if test -n "$inst_prefix_dir"; then
-		  case $libdir in
-		    [\\/]*)
-		      add_dir="$add_dir -L$inst_prefix_dir$libdir"
-		      ;;
-		  esac
-		fi
-		add="-l$name"
-	      elif test "$hardcode_shlibpath_var" = yes; then
-		add_shlibpath="$dir"
-		add="-l$name"
-	      else
-		lib_linked=no
-	      fi
-	      ;;
-	    *) lib_linked=no ;;
-	    esac
-
-	    if test "$lib_linked" != yes; then
-	      $echo "$modename: configuration error: unsupported hardcode properties"
-	      exit $EXIT_FAILURE
-	    fi
-
-	    if test -n "$add_shlibpath"; then
-	      case :$compile_shlibpath: in
-	      *":$add_shlibpath:"*) ;;
-	      *) compile_shlibpath="$compile_shlibpath$add_shlibpath:" ;;
-	      esac
-	    fi
-	    if test "$linkmode" = prog; then
-	      test -n "$add_dir" && compile_deplibs="$add_dir $compile_deplibs"
-	      test -n "$add" && compile_deplibs="$add $compile_deplibs"
-	    else
-	      test -n "$add_dir" && deplibs="$add_dir $deplibs"
-	      test -n "$add" && deplibs="$add $deplibs"
-	      if test "$hardcode_direct" != yes && \
-		 test "$hardcode_minus_L" != yes && \
-		 test "$hardcode_shlibpath_var" = yes; then
-		case :$finalize_shlibpath: in
-		*":$libdir:"*) ;;
-		*) finalize_shlibpath="$finalize_shlibpath$libdir:" ;;
-		esac
-	      fi
-	    fi
-	  fi
-
-	  if test "$linkmode" = prog || test "$mode" = relink; then
-	    add_shlibpath=
-	    add_dir=
-	    add=
-	    # Finalize command for both is simple: just hardcode it.
-	    if test "$hardcode_direct" = yes; then
-	      add="$libdir/$linklib"
-	    elif test "$hardcode_minus_L" = yes; then
-	      add_dir="-L$libdir"
-	      add="-l$name"
-	    elif test "$hardcode_shlibpath_var" = yes; then
-	      case :$finalize_shlibpath: in
-	      *":$libdir:"*) ;;
-	      *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;;
-	      esac
-	      add="-l$name"
-	    elif test "$hardcode_automatic" = yes; then
-	      if test -n "$inst_prefix_dir" &&
-		 test -f "$inst_prefix_dir$libdir/$linklib" ; then
-	        add="$inst_prefix_dir$libdir/$linklib"
-	      else
-	        add="$libdir/$linklib"
-	      fi
-	    else
-	      # We cannot seem to hardcode it, guess we'll fake it.
-	      add_dir="-L$libdir"
-	      # Try looking first in the location we're being installed to.
-	      if test -n "$inst_prefix_dir"; then
-		case $libdir in
-		  [\\/]*)
-		    add_dir="$add_dir -L$inst_prefix_dir$libdir"
-		    ;;
-		esac
-	      fi
-	      add="-l$name"
-	    fi
-
-	    if test "$linkmode" = prog; then
-	      test -n "$add_dir" && finalize_deplibs="$add_dir $finalize_deplibs"
-	      test -n "$add" && finalize_deplibs="$add $finalize_deplibs"
-	    else
-	      test -n "$add_dir" && deplibs="$add_dir $deplibs"
-	      test -n "$add" && deplibs="$add $deplibs"
-	    fi
-	  fi
-	elif test "$linkmode" = prog; then
-	  # Here we assume that one of hardcode_direct or hardcode_minus_L
-	  # is not unsupported.  This is valid on all known static and
-	  # shared platforms.
-	  if test "$hardcode_direct" != unsupported; then
-	    test -n "$old_library" && linklib="$old_library"
-	    compile_deplibs="$dir/$linklib $compile_deplibs"
-	    finalize_deplibs="$dir/$linklib $finalize_deplibs"
-	  else
-	    compile_deplibs="-l$name -L$dir $compile_deplibs"
-	    finalize_deplibs="-l$name -L$dir $finalize_deplibs"
-	  fi
-	elif test "$build_libtool_libs" = yes; then
-	  # Not a shared library
-	  if test "$deplibs_check_method" != pass_all; then
-	    # We're trying link a shared library against a static one
-	    # but the system doesn't support it.
-
-	    # Just print a warning and add the library to dependency_libs so
-	    # that the program can be linked against the static library.
-	    $echo
-	    $echo "*** Warning: This system can not link to static lib archive $lib."
-	    $echo "*** I have the capability to make that library automatically link in when"
-	    $echo "*** you link to this library.  But I can only do this if you have a"
-	    $echo "*** shared version of the library, which you do not appear to have."
-	    if test "$module" = yes; then
-	      $echo "*** But as you try to build a module library, libtool will still create "
-	      $echo "*** a static module, that should work as long as the dlopening application"
-	      $echo "*** is linked with the -dlopen flag to resolve symbols at runtime."
-	      if test -z "$global_symbol_pipe"; then
-		$echo
-		$echo "*** However, this would only work if libtool was able to extract symbol"
-		$echo "*** lists from a program, using \`nm' or equivalent, but libtool could"
-		$echo "*** not find such a program.  So, this module is probably useless."
-		$echo "*** \`nm' from GNU binutils and a full rebuild may help."
-	      fi
-	      if test "$build_old_libs" = no; then
-		build_libtool_libs=module
-		build_old_libs=yes
-	      else
-		build_libtool_libs=no
-	      fi
-	    fi
-	  else
-	    deplibs="$dir/$old_library $deplibs"
-	    link_static=yes
-	  fi
-	fi # link shared/static library?
-
-	if test "$linkmode" = lib; then
-	  if test -n "$dependency_libs" &&
-	     { test "$hardcode_into_libs" != yes ||
-	       test "$build_old_libs" = yes ||
-	       test "$link_static" = yes; }; then
-	    # Extract -R from dependency_libs
-	    temp_deplibs=
-	    for libdir in $dependency_libs; do
-	      case $libdir in
-	      -R*) temp_xrpath=`$echo "X$libdir" | $Xsed -e 's/^-R//'`
-		   case " $xrpath " in
-		   *" $temp_xrpath "*) ;;
-		   *) xrpath="$xrpath $temp_xrpath";;
-		   esac;;
-	      *) temp_deplibs="$temp_deplibs $libdir";;
-	      esac
-	    done
-	    dependency_libs="$temp_deplibs"
-	  fi
-
-	  newlib_search_path="$newlib_search_path $absdir"
-	  # Link against this library
-	  test "$link_static" = no && newdependency_libs="$abs_ladir/$laname $newdependency_libs"
-	  # ... and its dependency_libs
-	  tmp_libs=
-	  for deplib in $dependency_libs; do
-	    newdependency_libs="$deplib $newdependency_libs"
-	    if test "X$duplicate_deps" = "Xyes" ; then
-	      case "$tmp_libs " in
-	      *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
-	      esac
-	    fi
-	    tmp_libs="$tmp_libs $deplib"
-	  done
-
-	  if test "$link_all_deplibs" != no; then
-	    # Add the search paths of all dependency libraries
-	    for deplib in $dependency_libs; do
-	      case $deplib in
-	      -L*) path="$deplib" ;;
-	      *.la)
-		dir=`$echo "X$deplib" | $Xsed -e 's%/[^/]*$%%'`
-		test "X$dir" = "X$deplib" && dir="."
-		# We need an absolute path.
-		case $dir in
-		[\\/]* | [A-Za-z]:[\\/]*) absdir="$dir" ;;
-		*)
-		  absdir=`cd "$dir" && pwd`
-		  if test -z "$absdir"; then
-		    $echo "$modename: warning: cannot determine absolute directory name of \`$dir'" 1>&2
-		    absdir="$dir"
-		  fi
-		  ;;
-		esac
-		if grep "^installed=no" $deplib > /dev/null; then
-		  path="$absdir/$objdir"
-		else
-		  eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
-		  if test -z "$libdir"; then
-		    $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2
-		    exit $EXIT_FAILURE
-		  fi
-		  if test "$absdir" != "$libdir"; then
-		    $echo "$modename: warning: \`$deplib' seems to be moved" 1>&2
-		  fi
-		  path="$absdir"
-		fi
-		depdepl=
-		case $host in
-		*-*-darwin*)
-		  # we do not want to link against static libs,
-		  # but need to link against shared
-		  eval deplibrary_names=`${SED} -n -e 's/^library_names=\(.*\)$/\1/p' $deplib`
-		  if test -n "$deplibrary_names" ; then
-		    for tmp in $deplibrary_names ; do
-		      depdepl=$tmp
-		    done
-		    if test -f "$path/$depdepl" ; then
-		      depdepl="$path/$depdepl"
-		    fi
-		    # do not add paths which are already there
-		    case " $newlib_search_path " in
-		    *" $path "*) ;;
-		    *) newlib_search_path="$newlib_search_path $path";;
-		    esac
-		  fi
-		  path=""
-		  ;;
-		*)
-		  path="-L$path"
-		  ;;
-		esac
-		;;
-	      -l*)
-		case $host in
-		*-*-darwin*)
-		  # Again, we only want to link against shared libraries
-		  eval tmp_libs=`$echo "X$deplib" | $Xsed -e "s,^\-l,,"`
-		  for tmp in $newlib_search_path ; do
-		    if test -f "$tmp/lib$tmp_libs.dylib" ; then
-		      eval depdepl="$tmp/lib$tmp_libs.dylib"
-		      break
-		    fi
-		  done
-		  path=""
-		  ;;
-		*) continue ;;
-		esac
-		;;
-	      *) continue ;;
-	      esac
-	      case " $deplibs " in
-	      *" $path "*) ;;
-	      *) deplibs="$path $deplibs" ;;
-	      esac
-	      case " $deplibs " in
-	      *" $depdepl "*) ;;
-	      *) deplibs="$depdepl $deplibs" ;;
-	      esac
-	    done
-	  fi # link_all_deplibs != no
-	fi # linkmode = lib
-      done # for deplib in $libs
-      dependency_libs="$newdependency_libs"
-      if test "$pass" = dlpreopen; then
-	# Link the dlpreopened libraries before other libraries
-	for deplib in $save_deplibs; do
-	  deplibs="$deplib $deplibs"
-	done
-      fi
-      if test "$pass" != dlopen; then
-	if test "$pass" != conv; then
-	  # Make sure lib_search_path contains only unique directories.
-	  lib_search_path=
-	  for dir in $newlib_search_path; do
-	    case "$lib_search_path " in
-	    *" $dir "*) ;;
-	    *) lib_search_path="$lib_search_path $dir" ;;
-	    esac
-	  done
-	  newlib_search_path=
-	fi
-
-	if test "$linkmode,$pass" != "prog,link"; then
-	  vars="deplibs"
-	else
-	  vars="compile_deplibs finalize_deplibs"
-	fi
-	for var in $vars dependency_libs; do
-	  # Add libraries to $var in reverse order
-	  eval tmp_libs=\"\$$var\"
-	  new_libs=
-	  for deplib in $tmp_libs; do
-	    # FIXME: Pedantically, this is the right thing to do, so
-	    #        that some nasty dependency loop isn't accidentally
-	    #        broken:
-	    #new_libs="$deplib $new_libs"
-	    # Pragmatically, this seems to cause very few problems in
-	    # practice:
-	    case $deplib in
-	    -L*) new_libs="$deplib $new_libs" ;;
-	    -R*) ;;
-	    *)
-	      # And here is the reason: when a library appears more
-	      # than once as an explicit dependence of a library, or
-	      # is implicitly linked in more than once by the
-	      # compiler, it is considered special, and multiple
-	      # occurrences thereof are not removed.  Compare this
-	      # with having the same library being listed as a
-	      # dependency of multiple other libraries: in this case,
-	      # we know (pedantically, we assume) the library does not
-	      # need to be listed more than once, so we keep only the
-	      # last copy.  This is not always right, but it is rare
-	      # enough that we require users that really mean to play
-	      # such unportable linking tricks to link the library
-	      # using -Wl,-lname, so that libtool does not consider it
-	      # for duplicate removal.
-	      case " $specialdeplibs " in
-	      *" $deplib "*) new_libs="$deplib $new_libs" ;;
-	      *)
-		case " $new_libs " in
-		*" $deplib "*) ;;
-		*) new_libs="$deplib $new_libs" ;;
-		esac
-		;;
-	      esac
-	      ;;
-	    esac
-	  done
-	  tmp_libs=
-	  for deplib in $new_libs; do
-	    case $deplib in
-	    -L*)
-	      case " $tmp_libs " in
-	      *" $deplib "*) ;;
-	      *) tmp_libs="$tmp_libs $deplib" ;;
-	      esac
-	      ;;
-	    *) tmp_libs="$tmp_libs $deplib" ;;
-	    esac
-	  done
-	  eval $var=\"$tmp_libs\"
-	done # for var
-      fi
-      # Last step: remove runtime libs from dependency_libs
-      # (they stay in deplibs)
-      tmp_libs=
-      for i in $dependency_libs ; do
-	case " $predeps $postdeps $compiler_lib_search_path " in
-	*" $i "*)
-	  i=""
-	  ;;
-	esac
-	if test -n "$i" ; then
-	  tmp_libs="$tmp_libs $i"
-	fi
-      done
-      dependency_libs=$tmp_libs
-    done # for pass
-    if test "$linkmode" = prog; then
-      dlfiles="$newdlfiles"
-      dlprefiles="$newdlprefiles"
-    fi
-
-    case $linkmode in
-    oldlib)
-      if test -n "$deplibs"; then
-	$echo "$modename: warning: \`-l' and \`-L' are ignored for archives" 1>&2
-      fi
-
-      if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
-	$echo "$modename: warning: \`-dlopen' is ignored for archives" 1>&2
-      fi
-
-      if test -n "$rpath"; then
-	$echo "$modename: warning: \`-rpath' is ignored for archives" 1>&2
-      fi
-
-      if test -n "$xrpath"; then
-	$echo "$modename: warning: \`-R' is ignored for archives" 1>&2
-      fi
-
-      if test -n "$vinfo"; then
-	$echo "$modename: warning: \`-version-info/-version-number' is ignored for archives" 1>&2
-      fi
-
-      if test -n "$release"; then
-	$echo "$modename: warning: \`-release' is ignored for archives" 1>&2
-      fi
-
-      if test -n "$export_symbols" || test -n "$export_symbols_regex"; then
-	$echo "$modename: warning: \`-export-symbols' is ignored for archives" 1>&2
-      fi
-
-      # Now set the variables for building old libraries.
-      build_libtool_libs=no
-      oldlibs="$output"
-      objs="$objs$old_deplibs"
-      ;;
-
-    lib)
-      # Make sure we only generate libraries of the form `libNAME.la'.
-      case $outputname in
-      lib*)
-	name=`$echo "X$outputname" | $Xsed -e 's/\.la$//' -e 's/^lib//'`
-	eval shared_ext=\"$shrext_cmds\"
-	eval libname=\"$libname_spec\"
-	;;
-      *)
-	if test "$module" = no; then
-	  $echo "$modename: libtool library \`$output' must begin with \`lib'" 1>&2
-	  $echo "$help" 1>&2
-	  exit $EXIT_FAILURE
-	fi
-	if test "$need_lib_prefix" != no; then
-	  # Add the "lib" prefix for modules if required
-	  name=`$echo "X$outputname" | $Xsed -e 's/\.la$//'`
-	  eval shared_ext=\"$shrext_cmds\"
-	  eval libname=\"$libname_spec\"
-	else
-	  libname=`$echo "X$outputname" | $Xsed -e 's/\.la$//'`
-	fi
-	;;
-      esac
-
-      if test -n "$objs"; then
-	if test "$deplibs_check_method" != pass_all; then
-	  $echo "$modename: cannot build libtool library \`$output' from non-libtool objects on this host:$objs" 2>&1
-	  exit $EXIT_FAILURE
-	else
-	  $echo
-	  $echo "*** Warning: Linking the shared library $output against the non-libtool"
-	  $echo "*** objects $objs is not portable!"
-	  libobjs="$libobjs $objs"
-	fi
-      fi
-
-      if test "$dlself" != no; then
-	$echo "$modename: warning: \`-dlopen self' is ignored for libtool libraries" 1>&2
-      fi
-
-      set dummy $rpath
-      if test "$#" -gt 2; then
-	$echo "$modename: warning: ignoring multiple \`-rpath's for a libtool library" 1>&2
-      fi
-      install_libdir="$2"
-
-      oldlibs=
-      if test -z "$rpath"; then
-	if test "$build_libtool_libs" = yes; then
-	  # Building a libtool convenience library.
-	  # Some compilers have problems with a `.al' extension so
-	  # convenience libraries should have the same extension an
-	  # archive normally would.
-	  oldlibs="$output_objdir/$libname.$libext $oldlibs"
-	  build_libtool_libs=convenience
-	  build_old_libs=yes
-	fi
-
-	if test -n "$vinfo"; then
-	  $echo "$modename: warning: \`-version-info/-version-number' is ignored for convenience libraries" 1>&2
-	fi
-
-	if test -n "$release"; then
-	  $echo "$modename: warning: \`-release' is ignored for convenience libraries" 1>&2
-	fi
-      else
-
-	# Parse the version information argument.
-	save_ifs="$IFS"; IFS=':'
-	set dummy $vinfo 0 0 0
-	IFS="$save_ifs"
-
-	if test -n "$8"; then
-	  $echo "$modename: too many parameters to \`-version-info'" 1>&2
-	  $echo "$help" 1>&2
-	  exit $EXIT_FAILURE
-	fi
-
-	# convert absolute version numbers to libtool ages
-	# this retains compatibility with .la files and attempts
-	# to make the code below a bit more comprehensible
-
-	case $vinfo_number in
-	yes)
-	  number_major="$2"
-	  number_minor="$3"
-	  number_revision="$4"
-	  #
-	  # There are really only two kinds -- those that
-	  # use the current revision as the major version
-	  # and those that subtract age and use age as
-	  # a minor version.  But, then there is irix
-	  # which has an extra 1 added just for fun
-	  #
-	  case $version_type in
-	  darwin|linux|osf|windows|none)
-	    current=`expr $number_major + $number_minor`
-	    age="$number_minor"
-	    revision="$number_revision"
-	    ;;
-	  freebsd-aout|freebsd-elf|sunos)
-	    current="$number_major"
-	    revision="$number_minor"
-	    age="0"
-	    ;;
-	  irix|nonstopux)
-	    current=`expr $number_major + $number_minor - 1`
-	    age="$number_minor"
-	    revision="$number_minor"
-	    ;;
-	  esac
-	  ;;
-	no)
-	  current="$2"
-	  revision="$3"
-	  age="$4"
-	  ;;
-	esac
-
-	# Check that each of the things are valid numbers.
-	case $current in
-	0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;;
-	*)
-	  $echo "$modename: CURRENT \`$current' must be a nonnegative integer" 1>&2
-	  $echo "$modename: \`$vinfo' is not valid version information" 1>&2
-	  exit $EXIT_FAILURE
-	  ;;
-	esac
-
-	case $revision in
-	0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;;
-	*)
-	  $echo "$modename: REVISION \`$revision' must be a nonnegative integer" 1>&2
-	  $echo "$modename: \`$vinfo' is not valid version information" 1>&2
-	  exit $EXIT_FAILURE
-	  ;;
-	esac
-
-	case $age in
-	0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;;
-	*)
-	  $echo "$modename: AGE \`$age' must be a nonnegative integer" 1>&2
-	  $echo "$modename: \`$vinfo' is not valid version information" 1>&2
-	  exit $EXIT_FAILURE
-	  ;;
-	esac
-
-	if test "$age" -gt "$current"; then
-	  $echo "$modename: AGE \`$age' is greater than the current interface number \`$current'" 1>&2
-	  $echo "$modename: \`$vinfo' is not valid version information" 1>&2
-	  exit $EXIT_FAILURE
-	fi
-
-	# Calculate the version variables.
-	major=
-	versuffix=
-	verstring=
-	case $version_type in
-	none) ;;
-
-	darwin)
-	  # Like Linux, but with the current version available in
-	  # verstring for coding it into the library header
-	  major=.`expr $current - $age`
-	  versuffix="$major.$age.$revision"
-	  # Darwin ld doesn't like 0 for these options...
-	  minor_current=`expr $current + 1`
-	  verstring="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision"
-	  ;;
-
-	freebsd-aout)
-	  major=".$current"
-	  versuffix=".$current.$revision";
-	  ;;
-
-	freebsd-elf)
-	  major=".$current"
-	  versuffix=".$current";
-	  ;;
-
-	irix | nonstopux)
-	  major=`expr $current - $age + 1`
-
-	  case $version_type in
-	    nonstopux) verstring_prefix=nonstopux ;;
-	    *)         verstring_prefix=sgi ;;
-	  esac
-	  verstring="$verstring_prefix$major.$revision"
-
-	  # Add in all the interfaces that we are compatible with.
-	  loop=$revision
-	  while test "$loop" -ne 0; do
-	    iface=`expr $revision - $loop`
-	    loop=`expr $loop - 1`
-	    verstring="$verstring_prefix$major.$iface:$verstring"
-	  done
-
-	  # Before this point, $major must not contain `.'.
-	  major=.$major
-	  versuffix="$major.$revision"
-	  ;;
-
-	linux)
-	  major=.`expr $current - $age`
-	  versuffix="$major.$age.$revision"
-	  ;;
-
-	osf)
-	  major=.`expr $current - $age`
-	  versuffix=".$current.$age.$revision"
-	  verstring="$current.$age.$revision"
-
-	  # Add in all the interfaces that we are compatible with.
-	  loop=$age
-	  while test "$loop" -ne 0; do
-	    iface=`expr $current - $loop`
-	    loop=`expr $loop - 1`
-	    verstring="$verstring:${iface}.0"
-	  done
-
-	  # Make executables depend on our current version.
-	  verstring="$verstring:${current}.0"
-	  ;;
-
-	sunos)
-	  major=".$current"
-	  versuffix=".$current.$revision"
-	  ;;
-
-	windows)
-	  # Use '-' rather than '.', since we only want one
-	  # extension on DOS 8.3 filesystems.
-	  major=`expr $current - $age`
-	  versuffix="-$major"
-	  ;;
-
-	*)
-	  $echo "$modename: unknown library version type \`$version_type'" 1>&2
-	  $echo "Fatal configuration error.  See the $PACKAGE docs for more information." 1>&2
-	  exit $EXIT_FAILURE
-	  ;;
-	esac
-
-	# Clear the version info if we defaulted, and they specified a release.
-	if test -z "$vinfo" && test -n "$release"; then
-	  major=
-	  case $version_type in
-	  darwin)
-	    # we can't check for "0.0" in archive_cmds due to quoting
-	    # problems, so we reset it completely
-	    verstring=
-	    ;;
-	  *)
-	    verstring="0.0"
-	    ;;
-	  esac
-	  if test "$need_version" = no; then
-	    versuffix=
-	  else
-	    versuffix=".0.0"
-	  fi
-	fi
-
-	# Remove version info from name if versioning should be avoided
-	if test "$avoid_version" = yes && test "$need_version" = no; then
-	  major=
-	  versuffix=
-	  verstring=""
-	fi
-
-	# Check to see if the archive will have undefined symbols.
-	if test "$allow_undefined" = yes; then
-	  if test "$allow_undefined_flag" = unsupported; then
-	    $echo "$modename: warning: undefined symbols not allowed in $host shared libraries" 1>&2
-	    build_libtool_libs=no
-	    build_old_libs=yes
-	  fi
-	else
-	  # Don't allow undefined symbols.
-	  allow_undefined_flag="$no_undefined_flag"
-	fi
-      fi
-
-      if test "$mode" != relink; then
-	# Remove our outputs, but don't remove object files since they
-	# may have been created when compiling PIC objects.
-	removelist=
-	tempremovelist=`$echo "$output_objdir/*"`
-	for p in $tempremovelist; do
-	  case $p in
-	    *.$objext)
-	       ;;
-	    $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/${libname}${release}.*)
-	       if test "X$precious_files_regex" != "X"; then
-	         if echo $p | $EGREP -e "$precious_files_regex" >/dev/null 2>&1
-	         then
-		   continue
-		 fi
-	       fi
-	       removelist="$removelist $p"
-	       ;;
-	    *) ;;
-	  esac
-	done
-	if test -n "$removelist"; then
-	  $show "${rm}r $removelist"
-	  $run ${rm}r $removelist
-	fi
-      fi
-
-      # Now set the variables for building old libraries.
-      if test "$build_old_libs" = yes && test "$build_libtool_libs" != convenience ; then
-	oldlibs="$oldlibs $output_objdir/$libname.$libext"
-
-	# Transform .lo files to .o files.
-	oldobjs="$objs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}'$/d' -e "$lo2o" | $NL2SP`
-      fi
-
-      # Eliminate all temporary directories.
-      #for path in $notinst_path; do
-      #	lib_search_path=`$echo "$lib_search_path " | ${SED} -e "s% $path % %g"`
-      #	deplibs=`$echo "$deplibs " | ${SED} -e "s% -L$path % %g"`
-      #	dependency_libs=`$echo "$dependency_libs " | ${SED} -e "s% -L$path % %g"`
-      #done
-
-      if test -n "$xrpath"; then
-	# If the user specified any rpath flags, then add them.
-	temp_xrpath=
-	for libdir in $xrpath; do
-	  temp_xrpath="$temp_xrpath -R$libdir"
-	  case "$finalize_rpath " in
-	  *" $libdir "*) ;;
-	  *) finalize_rpath="$finalize_rpath $libdir" ;;
-	  esac
-	done
-	if test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes; then
-	  dependency_libs="$temp_xrpath $dependency_libs"
-	fi
-      fi
-
-      # Make sure dlfiles contains only unique files that won't be dlpreopened
-      old_dlfiles="$dlfiles"
-      dlfiles=
-      for lib in $old_dlfiles; do
-	case " $dlprefiles $dlfiles " in
-	*" $lib "*) ;;
-	*) dlfiles="$dlfiles $lib" ;;
-	esac
-      done
-
-      # Make sure dlprefiles contains only unique files
-      old_dlprefiles="$dlprefiles"
-      dlprefiles=
-      for lib in $old_dlprefiles; do
-	case "$dlprefiles " in
-	*" $lib "*) ;;
-	*) dlprefiles="$dlprefiles $lib" ;;
-	esac
-      done
-
-      if test "$build_libtool_libs" = yes; then
-	if test -n "$rpath"; then
-	  case $host in
-	  *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos*)
-	    # these systems don't actually have a c library (as such)!
-	    ;;
-	  *-*-rhapsody* | *-*-darwin1.[012])
-	    # Rhapsody C library is in the System framework
-	    deplibs="$deplibs -framework System"
-	    ;;
-	  *-*-netbsd*)
-	    # Don't link with libc until the a.out ld.so is fixed.
-	    ;;
-	  *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
-	    # Do not include libc due to us having libc/libc_r.
-	    ;;
-	  *-*-sco3.2v5* | *-*-sco5v6*)
-	    # Causes problems with __ctype
-	    ;;
-	  *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*)
-	    # Compiler inserts libc in the correct place for threads to work
-	    ;;
- 	  *)
-	    # Add libc to deplibs on all other systems if necessary.
-	    if test "$build_libtool_need_lc" = "yes"; then
-	      deplibs="$deplibs -lc"
-	    fi
-	    ;;
-	  esac
-	fi
-
-	# Transform deplibs into only deplibs that can be linked in shared.
-	name_save=$name
-	libname_save=$libname
-	release_save=$release
-	versuffix_save=$versuffix
-	major_save=$major
-	# I'm not sure if I'm treating the release correctly.  I think
-	# release should show up in the -l (ie -lgmp5) so we don't want to
-	# add it in twice.  Is that correct?
-	release=""
-	versuffix=""
-	major=""
-	newdeplibs=
-	droppeddeps=no
-	case $deplibs_check_method in
-	pass_all)
-	  # Don't check for shared/static.  Everything works.
-	  # This might be a little naive.  We might want to check
-	  # whether the library exists or not.  But this is on
-	  # osf3 & osf4 and I'm not really sure... Just
-	  # implementing what was already the behavior.
-	  newdeplibs=$deplibs
-	  ;;
-	test_compile)
-	  # This code stresses the "libraries are programs" paradigm to its
-	  # limits. Maybe even breaks it.  We compile a program, linking it
-	  # against the deplibs as a proxy for the library.  Then we can check
-	  # whether they linked in statically or dynamically with ldd.
-	  $rm conftest.c
-	  cat > conftest.c <<EOF
-	  int main() { return 0; }
-EOF
-	  $rm conftest
-	  if $LTCC $LTCFLAGS -o conftest conftest.c $deplibs; then
-	    ldd_output=`ldd conftest`
-	    for i in $deplibs; do
-	      name=`expr $i : '-l\(.*\)'`
-	      # If $name is empty we are operating on a -L argument.
-              if test "$name" != "" && test "$name" != "0"; then
-		if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
-		  case " $predeps $postdeps " in
-		  *" $i "*)
-		    newdeplibs="$newdeplibs $i"
-		    i=""
-		    ;;
-		  esac
-	        fi
-		if test -n "$i" ; then
-		  libname=`eval \\$echo \"$libname_spec\"`
-		  deplib_matches=`eval \\$echo \"$library_names_spec\"`
-		  set dummy $deplib_matches
-		  deplib_match=$2
-		  if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
-		    newdeplibs="$newdeplibs $i"
-		  else
-		    droppeddeps=yes
-		    $echo
-		    $echo "*** Warning: dynamic linker does not accept needed library $i."
-		    $echo "*** I have the capability to make that library automatically link in when"
-		    $echo "*** you link to this library.  But I can only do this if you have a"
-		    $echo "*** shared version of the library, which I believe you do not have"
-		    $echo "*** because a test_compile did reveal that the linker did not use it for"
-		    $echo "*** its dynamic dependency list that programs get resolved with at runtime."
-		  fi
-		fi
-	      else
-		newdeplibs="$newdeplibs $i"
-	      fi
-	    done
-	  else
-	    # Error occurred in the first compile.  Let's try to salvage
-	    # the situation: Compile a separate program for each library.
-	    for i in $deplibs; do
-	      name=`expr $i : '-l\(.*\)'`
-	      # If $name is empty we are operating on a -L argument.
-              if test "$name" != "" && test "$name" != "0"; then
-		$rm conftest
-		if $LTCC $LTCFLAGS -o conftest conftest.c $i; then
-		  ldd_output=`ldd conftest`
-		  if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
-		    case " $predeps $postdeps " in
-		    *" $i "*)
-		      newdeplibs="$newdeplibs $i"
-		      i=""
-		      ;;
-		    esac
-		  fi
-		  if test -n "$i" ; then
-		    libname=`eval \\$echo \"$libname_spec\"`
-		    deplib_matches=`eval \\$echo \"$library_names_spec\"`
-		    set dummy $deplib_matches
-		    deplib_match=$2
-		    if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
-		      newdeplibs="$newdeplibs $i"
-		    else
-		      droppeddeps=yes
-		      $echo
-		      $echo "*** Warning: dynamic linker does not accept needed library $i."
-		      $echo "*** I have the capability to make that library automatically link in when"
-		      $echo "*** you link to this library.  But I can only do this if you have a"
-		      $echo "*** shared version of the library, which you do not appear to have"
-		      $echo "*** because a test_compile did reveal that the linker did not use this one"
-		      $echo "*** as a dynamic dependency that programs can get resolved with at runtime."
-		    fi
-		  fi
-		else
-		  droppeddeps=yes
-		  $echo
-		  $echo "*** Warning!  Library $i is needed by this library but I was not able to"
-		  $echo "*** make it link in!  You will probably need to install it or some"
-		  $echo "*** library that it depends on before this library will be fully"
-		  $echo "*** functional.  Installing it before continuing would be even better."
-		fi
-	      else
-		newdeplibs="$newdeplibs $i"
-	      fi
-	    done
-	  fi
-	  ;;
-	file_magic*)
-	  set dummy $deplibs_check_method
-	  file_magic_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"`
-	  for a_deplib in $deplibs; do
-	    name=`expr $a_deplib : '-l\(.*\)'`
-	    # If $name is empty we are operating on a -L argument.
-            if test "$name" != "" && test  "$name" != "0"; then
-	      if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
-		case " $predeps $postdeps " in
-		*" $a_deplib "*)
-		  newdeplibs="$newdeplibs $a_deplib"
-		  a_deplib=""
-		  ;;
-		esac
-	      fi
-	      if test -n "$a_deplib" ; then
-		libname=`eval \\$echo \"$libname_spec\"`
-		for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do
-		  potential_libs=`ls $i/$libname[.-]* 2>/dev/null`
-		  for potent_lib in $potential_libs; do
-		      # Follow soft links.
-		      if ls -lLd "$potent_lib" 2>/dev/null \
-			 | grep " -> " >/dev/null; then
-			continue
-		      fi
-		      # The statement above tries to avoid entering an
-		      # endless loop below, in case of cyclic links.
-		      # We might still enter an endless loop, since a link
-		      # loop can be closed while we follow links,
-		      # but so what?
-		      potlib="$potent_lib"
-		      while test -h "$potlib" 2>/dev/null; do
-			potliblink=`ls -ld $potlib | ${SED} 's/.* -> //'`
-			case $potliblink in
-			[\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";;
-			*) potlib=`$echo "X$potlib" | $Xsed -e 's,[^/]*$,,'`"$potliblink";;
-			esac
-		      done
-		      if eval $file_magic_cmd \"\$potlib\" 2>/dev/null \
-			 | ${SED} 10q \
-			 | $EGREP "$file_magic_regex" > /dev/null; then
-			newdeplibs="$newdeplibs $a_deplib"
-			a_deplib=""
-			break 2
-		      fi
-		  done
-		done
-	      fi
-	      if test -n "$a_deplib" ; then
-		droppeddeps=yes
-		$echo
-		$echo "*** Warning: linker path does not have real file for library $a_deplib."
-		$echo "*** I have the capability to make that library automatically link in when"
-		$echo "*** you link to this library.  But I can only do this if you have a"
-		$echo "*** shared version of the library, which you do not appear to have"
-		$echo "*** because I did check the linker path looking for a file starting"
-		if test -z "$potlib" ; then
-		  $echo "*** with $libname but no candidates were found. (...for file magic test)"
-		else
-		  $echo "*** with $libname and none of the candidates passed a file format test"
-		  $echo "*** using a file magic. Last file checked: $potlib"
-		fi
-	      fi
-	    else
-	      # Add a -L argument.
-	      newdeplibs="$newdeplibs $a_deplib"
-	    fi
-	  done # Gone through all deplibs.
-	  ;;
-	match_pattern*)
-	  set dummy $deplibs_check_method
-	  match_pattern_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"`
-	  for a_deplib in $deplibs; do
-	    name=`expr $a_deplib : '-l\(.*\)'`
-	    # If $name is empty we are operating on a -L argument.
-	    if test -n "$name" && test "$name" != "0"; then
-	      if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
-		case " $predeps $postdeps " in
-		*" $a_deplib "*)
-		  newdeplibs="$newdeplibs $a_deplib"
-		  a_deplib=""
-		  ;;
-		esac
-	      fi
-	      if test -n "$a_deplib" ; then
-		libname=`eval \\$echo \"$libname_spec\"`
-		for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do
-		  potential_libs=`ls $i/$libname[.-]* 2>/dev/null`
-		  for potent_lib in $potential_libs; do
-		    potlib="$potent_lib" # see symlink-check above in file_magic test
-		    if eval $echo \"$potent_lib\" 2>/dev/null \
-		        | ${SED} 10q \
-		        | $EGREP "$match_pattern_regex" > /dev/null; then
-		      newdeplibs="$newdeplibs $a_deplib"
-		      a_deplib=""
-		      break 2
-		    fi
-		  done
-		done
-	      fi
-	      if test -n "$a_deplib" ; then
-		droppeddeps=yes
-		$echo
-		$echo "*** Warning: linker path does not have real file for library $a_deplib."
-		$echo "*** I have the capability to make that library automatically link in when"
-		$echo "*** you link to this library.  But I can only do this if you have a"
-		$echo "*** shared version of the library, which you do not appear to have"
-		$echo "*** because I did check the linker path looking for a file starting"
-		if test -z "$potlib" ; then
-		  $echo "*** with $libname but no candidates were found. (...for regex pattern test)"
-		else
-		  $echo "*** with $libname and none of the candidates passed a file format test"
-		  $echo "*** using a regex pattern. Last file checked: $potlib"
-		fi
-	      fi
-	    else
-	      # Add a -L argument.
-	      newdeplibs="$newdeplibs $a_deplib"
-	    fi
-	  done # Gone through all deplibs.
-	  ;;
-	none | unknown | *)
-	  newdeplibs=""
-	  tmp_deplibs=`$echo "X $deplibs" | $Xsed -e 's/ -lc$//' \
-	    -e 's/ -[LR][^ ]*//g'`
-	  if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
-	    for i in $predeps $postdeps ; do
-	      # can't use Xsed below, because $i might contain '/'
-	      tmp_deplibs=`$echo "X $tmp_deplibs" | ${SED} -e "1s,^X,," -e "s,$i,,"`
-	    done
-	  fi
-	  if $echo "X $tmp_deplibs" | $Xsed -e 's/[ 	]//g' \
-	    | grep . >/dev/null; then
-	    $echo
-	    if test "X$deplibs_check_method" = "Xnone"; then
-	      $echo "*** Warning: inter-library dependencies are not supported in this platform."
-	    else
-	      $echo "*** Warning: inter-library dependencies are not known to be supported."
-	    fi
-	    $echo "*** All declared inter-library dependencies are being dropped."
-	    droppeddeps=yes
-	  fi
-	  ;;
-	esac
-	versuffix=$versuffix_save
-	major=$major_save
-	release=$release_save
-	libname=$libname_save
-	name=$name_save
-
-	case $host in
-	*-*-rhapsody* | *-*-darwin1.[012])
-	  # On Rhapsody replace the C library is the System framework
-	  newdeplibs=`$echo "X $newdeplibs" | $Xsed -e 's/ -lc / -framework System /'`
-	  ;;
-	esac
-
-	if test "$droppeddeps" = yes; then
-	  if test "$module" = yes; then
-	    $echo
-	    $echo "*** Warning: libtool could not satisfy all declared inter-library"
-	    $echo "*** dependencies of module $libname.  Therefore, libtool will create"
-	    $echo "*** a static module, that should work as long as the dlopening"
-	    $echo "*** application is linked with the -dlopen flag."
-	    if test -z "$global_symbol_pipe"; then
-	      $echo
-	      $echo "*** However, this would only work if libtool was able to extract symbol"
-	      $echo "*** lists from a program, using \`nm' or equivalent, but libtool could"
-	      $echo "*** not find such a program.  So, this module is probably useless."
-	      $echo "*** \`nm' from GNU binutils and a full rebuild may help."
-	    fi
-	    if test "$build_old_libs" = no; then
-	      oldlibs="$output_objdir/$libname.$libext"
-	      build_libtool_libs=module
-	      build_old_libs=yes
-	    else
-	      build_libtool_libs=no
-	    fi
-	  else
-	    $echo "*** The inter-library dependencies that have been dropped here will be"
-	    $echo "*** automatically added whenever a program is linked with this library"
-	    $echo "*** or is declared to -dlopen it."
-
-	    if test "$allow_undefined" = no; then
-	      $echo
-	      $echo "*** Since this library must not contain undefined symbols,"
-	      $echo "*** because either the platform does not support them or"
-	      $echo "*** it was explicitly requested with -no-undefined,"
-	      $echo "*** libtool will only create a static version of it."
-	      if test "$build_old_libs" = no; then
-		oldlibs="$output_objdir/$libname.$libext"
-		build_libtool_libs=module
-		build_old_libs=yes
-	      else
-		build_libtool_libs=no
-	      fi
-	    fi
-	  fi
-	fi
-	# Done checking deplibs!
-	deplibs=$newdeplibs
-      fi
-
-
-      # move library search paths that coincide with paths to not yet
-      # installed libraries to the beginning of the library search list
-      new_libs=
-      for path in $notinst_path; do
-	case " $new_libs " in
-	*" -L$path/$objdir "*) ;;
-	*)
-	  case " $deplibs " in
-	  *" -L$path/$objdir "*)
-	    new_libs="$new_libs -L$path/$objdir" ;;
-	  esac
-	  ;;
-	esac
-      done
-      for deplib in $deplibs; do
-	case $deplib in
-	-L*)
-	  case " $new_libs " in
-	  *" $deplib "*) ;;
-	  *) new_libs="$new_libs $deplib" ;;
-	  esac
-	  ;;
-	*) new_libs="$new_libs $deplib" ;;
-	esac
-      done
-      deplibs="$new_libs"
-
-
-      # All the library-specific variables (install_libdir is set above).
-      library_names=
-      old_library=
-      dlname=
-
-      # Test again, we may have decided not to build it any more
-      if test "$build_libtool_libs" = yes; then
-	if test "$hardcode_into_libs" = yes; then
-	  # Hardcode the library paths
-	  hardcode_libdirs=
-	  dep_rpath=
-	  rpath="$finalize_rpath"
-	  test "$mode" != relink && rpath="$compile_rpath$rpath"
-	  for libdir in $rpath; do
-	    if test -n "$hardcode_libdir_flag_spec"; then
-	      if test -n "$hardcode_libdir_separator"; then
-		if test -z "$hardcode_libdirs"; then
-		  hardcode_libdirs="$libdir"
-		else
-		  # Just accumulate the unique libdirs.
-		  case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
-		  *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
-		    ;;
-		  *)
-		    hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
-		    ;;
-		  esac
-		fi
-	      else
-		eval flag=\"$hardcode_libdir_flag_spec\"
-		dep_rpath="$dep_rpath $flag"
-	      fi
-	    elif test -n "$runpath_var"; then
-	      case "$perm_rpath " in
-	      *" $libdir "*) ;;
-	      *) perm_rpath="$perm_rpath $libdir" ;;
-	      esac
-	    fi
-	  done
-	  # Substitute the hardcoded libdirs into the rpath.
-	  if test -n "$hardcode_libdir_separator" &&
-	     test -n "$hardcode_libdirs"; then
-	    libdir="$hardcode_libdirs"
-	    if test -n "$hardcode_libdir_flag_spec_ld"; then
-	      case $archive_cmds in
-	      *\$LD*) eval dep_rpath=\"$hardcode_libdir_flag_spec_ld\" ;;
-	      *)      eval dep_rpath=\"$hardcode_libdir_flag_spec\" ;;
-	      esac
-	    else
-	      eval dep_rpath=\"$hardcode_libdir_flag_spec\"
-	    fi
-	  fi
-	  if test -n "$runpath_var" && test -n "$perm_rpath"; then
-	    # We should set the runpath_var.
-	    rpath=
-	    for dir in $perm_rpath; do
-	      rpath="$rpath$dir:"
-	    done
-	    eval "$runpath_var='$rpath\$$runpath_var'; export $runpath_var"
-	  fi
-	  test -n "$dep_rpath" && deplibs="$dep_rpath $deplibs"
-	fi
-
-	shlibpath="$finalize_shlibpath"
-	test "$mode" != relink && shlibpath="$compile_shlibpath$shlibpath"
-	if test -n "$shlibpath"; then
-	  eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var"
-	fi
-
-	# Get the real and link names of the library.
-	eval shared_ext=\"$shrext_cmds\"
-	eval library_names=\"$library_names_spec\"
-	set dummy $library_names
-	realname="$2"
-	shift; shift
-
-	if test -n "$soname_spec"; then
-	  eval soname=\"$soname_spec\"
-	else
-	  soname="$realname"
-	fi
-	if test -z "$dlname"; then
-	  dlname=$soname
-	fi
-
-	lib="$output_objdir/$realname"
-	linknames=
-	for link
-	do
-	  linknames="$linknames $link"
-	done
-
-	# Use standard objects if they are pic
-	test -z "$pic_flag" && libobjs=`$echo "X$libobjs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
-
-	# Prepare the list of exported symbols
-	if test -z "$export_symbols"; then
-	  if test "$always_export_symbols" = yes || test -n "$export_symbols_regex"; then
-	    $show "generating symbol list for \`$libname.la'"
-	    export_symbols="$output_objdir/$libname.exp"
-	    $run $rm $export_symbols
-	    cmds=$export_symbols_cmds
-	    save_ifs="$IFS"; IFS='~'
-	    for cmd in $cmds; do
-	      IFS="$save_ifs"
-	      eval cmd=\"$cmd\"
-	      if len=`expr "X$cmd" : ".*"` &&
-	       test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then
-	        $show "$cmd"
-	        $run eval "$cmd" || exit $?
-	        skipped_export=false
-	      else
-	        # The command line is too long to execute in one step.
-	        $show "using reloadable object file for export list..."
-	        skipped_export=:
-		# Break out early, otherwise skipped_export may be
-		# set to false by a later but shorter cmd.
-		break
-	      fi
-	    done
-	    IFS="$save_ifs"
-	    if test -n "$export_symbols_regex"; then
-	      $show "$EGREP -e \"$export_symbols_regex\" \"$export_symbols\" > \"${export_symbols}T\""
-	      $run eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"'
-	      $show "$mv \"${export_symbols}T\" \"$export_symbols\""
-	      $run eval '$mv "${export_symbols}T" "$export_symbols"'
-	    fi
-	  fi
-	fi
-
-	if test -n "$export_symbols" && test -n "$include_expsyms"; then
-	  $run eval '$echo "X$include_expsyms" | $SP2NL >> "$export_symbols"'
-	fi
-
-	tmp_deplibs=
-	for test_deplib in $deplibs; do
-		case " $convenience " in
-		*" $test_deplib "*) ;;
-		*)
-			tmp_deplibs="$tmp_deplibs $test_deplib"
-			;;
-		esac
-	done
-	deplibs="$tmp_deplibs"
-
-	if test -n "$convenience"; then
-	  if test -n "$whole_archive_flag_spec"; then
-	    save_libobjs=$libobjs
-	    eval libobjs=\"\$libobjs $whole_archive_flag_spec\"
-	  else
-	    gentop="$output_objdir/${outputname}x"
-	    generated="$generated $gentop"
-
-	    func_extract_archives $gentop $convenience
-	    libobjs="$libobjs $func_extract_archives_result"
-	  fi
-	fi
-	
-	if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then
-	  eval flag=\"$thread_safe_flag_spec\"
-	  linker_flags="$linker_flags $flag"
-	fi
-
-	# Make a backup of the uninstalled library when relinking
-	if test "$mode" = relink; then
-	  $run eval '(cd $output_objdir && $rm ${realname}U && $mv $realname ${realname}U)' || exit $?
-	fi
-
-	# Do each of the archive commands.
-	if test "$module" = yes && test -n "$module_cmds" ; then
-	  if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then
-	    eval test_cmds=\"$module_expsym_cmds\"
-	    cmds=$module_expsym_cmds
-	  else
-	    eval test_cmds=\"$module_cmds\"
-	    cmds=$module_cmds
-	  fi
-	else
-	if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then
-	  eval test_cmds=\"$archive_expsym_cmds\"
-	  cmds=$archive_expsym_cmds
-	else
-	  eval test_cmds=\"$archive_cmds\"
-	  cmds=$archive_cmds
-	  fi
-	fi
-
-	if test "X$skipped_export" != "X:" &&
-	   len=`expr "X$test_cmds" : ".*" 2>/dev/null` &&
-	   test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then
-	  :
-	else
-	  # The command line is too long to link in one step, link piecewise.
-	  $echo "creating reloadable object files..."
-
-	  # Save the value of $output and $libobjs because we want to
-	  # use them later.  If we have whole_archive_flag_spec, we
-	  # want to use save_libobjs as it was before
-	  # whole_archive_flag_spec was expanded, because we can't
-	  # assume the linker understands whole_archive_flag_spec.
-	  # This may have to be revisited, in case too many
-	  # convenience libraries get linked in and end up exceeding
-	  # the spec.
-	  if test -z "$convenience" || test -z "$whole_archive_flag_spec"; then
-	    save_libobjs=$libobjs
-	  fi
-	  save_output=$output
-	  output_la=`$echo "X$output" | $Xsed -e "$basename"`
-
-	  # Clear the reloadable object creation command queue and
-	  # initialize k to one.
-	  test_cmds=
-	  concat_cmds=
-	  objlist=
-	  delfiles=
-	  last_robj=
-	  k=1
-	  output=$output_objdir/$output_la-${k}.$objext
-	  # Loop over the list of objects to be linked.
-	  for obj in $save_libobjs
-	  do
-	    eval test_cmds=\"$reload_cmds $objlist $last_robj\"
-	    if test "X$objlist" = X ||
-	       { len=`expr "X$test_cmds" : ".*" 2>/dev/null` &&
-		 test "$len" -le "$max_cmd_len"; }; then
-	      objlist="$objlist $obj"
-	    else
-	      # The command $test_cmds is almost too long, add a
-	      # command to the queue.
-	      if test "$k" -eq 1 ; then
-		# The first file doesn't have a previous command to add.
-		eval concat_cmds=\"$reload_cmds $objlist $last_robj\"
-	      else
-		# All subsequent reloadable object files will link in
-		# the last one created.
-		eval concat_cmds=\"\$concat_cmds~$reload_cmds $objlist $last_robj\"
-	      fi
-	      last_robj=$output_objdir/$output_la-${k}.$objext
-	      k=`expr $k + 1`
-	      output=$output_objdir/$output_la-${k}.$objext
-	      objlist=$obj
-	      len=1
-	    fi
-	  done
-	  # Handle the remaining objects by creating one last
-	  # reloadable object file.  All subsequent reloadable object
-	  # files will link in the last one created.
-	  test -z "$concat_cmds" || concat_cmds=$concat_cmds~
-	  eval concat_cmds=\"\${concat_cmds}$reload_cmds $objlist $last_robj\"
-
-	  if ${skipped_export-false}; then
-	    $show "generating symbol list for \`$libname.la'"
-	    export_symbols="$output_objdir/$libname.exp"
-	    $run $rm $export_symbols
-	    libobjs=$output
-	    # Append the command to create the export file.
-	    eval concat_cmds=\"\$concat_cmds~$export_symbols_cmds\"
-          fi
-
-	  # Set up a command to remove the reloadable object files
-	  # after they are used.
-	  i=0
-	  while test "$i" -lt "$k"
-	  do
-	    i=`expr $i + 1`
-	    delfiles="$delfiles $output_objdir/$output_la-${i}.$objext"
-	  done
-
-	  $echo "creating a temporary reloadable object file: $output"
-
-	  # Loop through the commands generated above and execute them.
-	  save_ifs="$IFS"; IFS='~'
-	  for cmd in $concat_cmds; do
-	    IFS="$save_ifs"
-	    $show "$cmd"
-	    $run eval "$cmd" || exit $?
-	  done
-	  IFS="$save_ifs"
-
-	  libobjs=$output
-	  # Restore the value of output.
-	  output=$save_output
-
-	  if test -n "$convenience" && test -n "$whole_archive_flag_spec"; then
-	    eval libobjs=\"\$libobjs $whole_archive_flag_spec\"
-	  fi
-	  # Expand the library linking commands again to reset the
-	  # value of $libobjs for piecewise linking.
-
-	  # Do each of the archive commands.
-	  if test "$module" = yes && test -n "$module_cmds" ; then
-	    if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then
-	      cmds=$module_expsym_cmds
-	    else
-	      cmds=$module_cmds
-	    fi
-	  else
-	  if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then
-	    cmds=$archive_expsym_cmds
-	  else
-	    cmds=$archive_cmds
-	    fi
-	  fi
-
-	  # Append the command to remove the reloadable object files
-	  # to the just-reset $cmds.
-	  eval cmds=\"\$cmds~\$rm $delfiles\"
-	fi
-	save_ifs="$IFS"; IFS='~'
-	for cmd in $cmds; do
-	  IFS="$save_ifs"
-	  eval cmd=\"$cmd\"
-	  $show "$cmd"
-	  $run eval "$cmd" || {
-	    lt_exit=$?
-
-	    # Restore the uninstalled library and exit
-	    if test "$mode" = relink; then
-	      $run eval '(cd $output_objdir && $rm ${realname}T && $mv ${realname}U $realname)'
-	    fi
-
-	    exit $lt_exit
-	  }
-	done
-	IFS="$save_ifs"
-
-	# Restore the uninstalled library and exit
-	if test "$mode" = relink; then
-	  $run eval '(cd $output_objdir && $rm ${realname}T && $mv $realname ${realname}T && $mv "$realname"U $realname)' || exit $?
-
-	  if test -n "$convenience"; then
-	    if test -z "$whole_archive_flag_spec"; then
-	      $show "${rm}r $gentop"
-	      $run ${rm}r "$gentop"
-	    fi
-	  fi
-
-	  exit $EXIT_SUCCESS
-	fi
-
-	# Create links to the real library.
-	for linkname in $linknames; do
-	  if test "$realname" != "$linkname"; then
-	    $show "(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)"
-	    $run eval '(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)' || exit $?
-	  fi
-	done
-
-	# If -module or -export-dynamic was specified, set the dlname.
-	if test "$module" = yes || test "$export_dynamic" = yes; then
-	  # On all known operating systems, these are identical.
-	  dlname="$soname"
-	fi
-      fi
-      ;;
-
-    obj)
-      if test -n "$deplibs"; then
-	$echo "$modename: warning: \`-l' and \`-L' are ignored for objects" 1>&2
-      fi
-
-      if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
-	$echo "$modename: warning: \`-dlopen' is ignored for objects" 1>&2
-      fi
-
-      if test -n "$rpath"; then
-	$echo "$modename: warning: \`-rpath' is ignored for objects" 1>&2
-      fi
-
-      if test -n "$xrpath"; then
-	$echo "$modename: warning: \`-R' is ignored for objects" 1>&2
-      fi
-
-      if test -n "$vinfo"; then
-	$echo "$modename: warning: \`-version-info' is ignored for objects" 1>&2
-      fi
-
-      if test -n "$release"; then
-	$echo "$modename: warning: \`-release' is ignored for objects" 1>&2
-      fi
-
-      case $output in
-      *.lo)
-	if test -n "$objs$old_deplibs"; then
-	  $echo "$modename: cannot build library object \`$output' from non-libtool objects" 1>&2
-	  exit $EXIT_FAILURE
-	fi
-	libobj="$output"
-	obj=`$echo "X$output" | $Xsed -e "$lo2o"`
-	;;
-      *)
-	libobj=
-	obj="$output"
-	;;
-      esac
-
-      # Delete the old objects.
-      $run $rm $obj $libobj
-
-      # Objects from convenience libraries.  This assumes
-      # single-version convenience libraries.  Whenever we create
-      # different ones for PIC/non-PIC, this we'll have to duplicate
-      # the extraction.
-      reload_conv_objs=
-      gentop=
-      # reload_cmds runs $LD directly, so let us get rid of
-      # -Wl from whole_archive_flag_spec and hope we can get by with
-      # turning comma into space..
-      wl=
-
-      if test -n "$convenience"; then
-	if test -n "$whole_archive_flag_spec"; then
-	  eval tmp_whole_archive_flags=\"$whole_archive_flag_spec\"
-	  reload_conv_objs=$reload_objs\ `$echo "X$tmp_whole_archive_flags" | $Xsed -e 's|,| |g'`
-	else
-	  gentop="$output_objdir/${obj}x"
-	  generated="$generated $gentop"
-
-	  func_extract_archives $gentop $convenience
-	  reload_conv_objs="$reload_objs $func_extract_archives_result"
-	fi
-      fi
-
-      # Create the old-style object.
-      reload_objs="$objs$old_deplibs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}$'/d' -e '/\.lib$/d' -e "$lo2o" | $NL2SP`" $reload_conv_objs" ### testsuite: skip nested quoting test
-
-      output="$obj"
-      cmds=$reload_cmds
-      save_ifs="$IFS"; IFS='~'
-      for cmd in $cmds; do
-	IFS="$save_ifs"
-	eval cmd=\"$cmd\"
-	$show "$cmd"
-	$run eval "$cmd" || exit $?
-      done
-      IFS="$save_ifs"
-
-      # Exit if we aren't doing a library object file.
-      if test -z "$libobj"; then
-	if test -n "$gentop"; then
-	  $show "${rm}r $gentop"
-	  $run ${rm}r $gentop
-	fi
-
-	exit $EXIT_SUCCESS
-      fi
-
-      if test "$build_libtool_libs" != yes; then
-	if test -n "$gentop"; then
-	  $show "${rm}r $gentop"
-	  $run ${rm}r $gentop
-	fi
-
-	# Create an invalid libtool object if no PIC, so that we don't
-	# accidentally link it into a program.
-	# $show "echo timestamp > $libobj"
-	# $run eval "echo timestamp > $libobj" || exit $?
-	exit $EXIT_SUCCESS
-      fi
-
-      if test -n "$pic_flag" || test "$pic_mode" != default; then
-	# Only do commands if we really have different PIC objects.
-	reload_objs="$libobjs $reload_conv_objs"
-	output="$libobj"
-	cmds=$reload_cmds
-	save_ifs="$IFS"; IFS='~'
-	for cmd in $cmds; do
-	  IFS="$save_ifs"
-	  eval cmd=\"$cmd\"
-	  $show "$cmd"
-	  $run eval "$cmd" || exit $?
-	done
-	IFS="$save_ifs"
-      fi
-
-      if test -n "$gentop"; then
-	$show "${rm}r $gentop"
-	$run ${rm}r $gentop
-      fi
-
-      exit $EXIT_SUCCESS
-      ;;
-
-    prog)
-      case $host in
-	*cygwin*) output=`$echo $output | ${SED} -e 's,.exe$,,;s,$,.exe,'` ;;
-      esac
-      if test -n "$vinfo"; then
-	$echo "$modename: warning: \`-version-info' is ignored for programs" 1>&2
-      fi
-
-      if test -n "$release"; then
-	$echo "$modename: warning: \`-release' is ignored for programs" 1>&2
-      fi
-
-      if test "$preload" = yes; then
-	if test "$dlopen_support" = unknown && test "$dlopen_self" = unknown &&
-	   test "$dlopen_self_static" = unknown; then
-	  $echo "$modename: warning: \`AC_LIBTOOL_DLOPEN' not used. Assuming no dlopen support."
-	fi
-      fi
-
-      case $host in
-      *-*-rhapsody* | *-*-darwin1.[012])
-	# On Rhapsody replace the C library is the System framework
-	compile_deplibs=`$echo "X $compile_deplibs" | $Xsed -e 's/ -lc / -framework System /'`
-	finalize_deplibs=`$echo "X $finalize_deplibs" | $Xsed -e 's/ -lc / -framework System /'`
-	;;
-      esac
-
-      case $host in
-      *darwin*)
-        # Don't allow lazy linking, it breaks C++ global constructors
-        if test "$tagname" = CXX ; then
-        compile_command="$compile_command ${wl}-bind_at_load"
-        finalize_command="$finalize_command ${wl}-bind_at_load"
-        fi
-        ;;
-      esac
-
-
-      # move library search paths that coincide with paths to not yet
-      # installed libraries to the beginning of the library search list
-      new_libs=
-      for path in $notinst_path; do
-	case " $new_libs " in
-	*" -L$path/$objdir "*) ;;
-	*)
-	  case " $compile_deplibs " in
-	  *" -L$path/$objdir "*)
-	    new_libs="$new_libs -L$path/$objdir" ;;
-	  esac
-	  ;;
-	esac
-      done
-      for deplib in $compile_deplibs; do
-	case $deplib in
-	-L*)
-	  case " $new_libs " in
-	  *" $deplib "*) ;;
-	  *) new_libs="$new_libs $deplib" ;;
-	  esac
-	  ;;
-	*) new_libs="$new_libs $deplib" ;;
-	esac
-      done
-      compile_deplibs="$new_libs"
-
-
-      compile_command="$compile_command $compile_deplibs"
-      finalize_command="$finalize_command $finalize_deplibs"
-
-      if test -n "$rpath$xrpath"; then
-	# If the user specified any rpath flags, then add them.
-	for libdir in $rpath $xrpath; do
-	  # This is the magic to use -rpath.
-	  case "$finalize_rpath " in
-	  *" $libdir "*) ;;
-	  *) finalize_rpath="$finalize_rpath $libdir" ;;
-	  esac
-	done
-      fi
-
-      # Now hardcode the library paths
-      rpath=
-      hardcode_libdirs=
-      for libdir in $compile_rpath $finalize_rpath; do
-	if test -n "$hardcode_libdir_flag_spec"; then
-	  if test -n "$hardcode_libdir_separator"; then
-	    if test -z "$hardcode_libdirs"; then
-	      hardcode_libdirs="$libdir"
-	    else
-	      # Just accumulate the unique libdirs.
-	      case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
-	      *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
-		;;
-	      *)
-		hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
-		;;
-	      esac
-	    fi
-	  else
-	    eval flag=\"$hardcode_libdir_flag_spec\"
-	    rpath="$rpath $flag"
-	  fi
-	elif test -n "$runpath_var"; then
-	  case "$perm_rpath " in
-	  *" $libdir "*) ;;
-	  *) perm_rpath="$perm_rpath $libdir" ;;
-	  esac
-	fi
-	case $host in
-	*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
-	  testbindir=`$echo "X$libdir" | $Xsed -e 's*/lib$*/bin*'`
-	  case :$dllsearchpath: in
-	  *":$libdir:"*) ;;
-	  *) dllsearchpath="$dllsearchpath:$libdir";;
-	  esac
-	  case :$dllsearchpath: in
-	  *":$testbindir:"*) ;;
-	  *) dllsearchpath="$dllsearchpath:$testbindir";;
-	  esac
-	  ;;
-	esac
-      done
-      # Substitute the hardcoded libdirs into the rpath.
-      if test -n "$hardcode_libdir_separator" &&
-	 test -n "$hardcode_libdirs"; then
-	libdir="$hardcode_libdirs"
-	eval rpath=\" $hardcode_libdir_flag_spec\"
-      fi
-      compile_rpath="$rpath"
-
-      rpath=
-      hardcode_libdirs=
-      for libdir in $finalize_rpath; do
-	if test -n "$hardcode_libdir_flag_spec"; then
-	  if test -n "$hardcode_libdir_separator"; then
-	    if test -z "$hardcode_libdirs"; then
-	      hardcode_libdirs="$libdir"
-	    else
-	      # Just accumulate the unique libdirs.
-	      case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
-	      *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
-		;;
-	      *)
-		hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
-		;;
-	      esac
-	    fi
-	  else
-	    eval flag=\"$hardcode_libdir_flag_spec\"
-	    rpath="$rpath $flag"
-	  fi
-	elif test -n "$runpath_var"; then
-	  case "$finalize_perm_rpath " in
-	  *" $libdir "*) ;;
-	  *) finalize_perm_rpath="$finalize_perm_rpath $libdir" ;;
-	  esac
-	fi
-      done
-      # Substitute the hardcoded libdirs into the rpath.
-      if test -n "$hardcode_libdir_separator" &&
-	 test -n "$hardcode_libdirs"; then
-	libdir="$hardcode_libdirs"
-	eval rpath=\" $hardcode_libdir_flag_spec\"
-      fi
-      finalize_rpath="$rpath"
-
-      if test -n "$libobjs" && test "$build_old_libs" = yes; then
-	# Transform all the library objects into standard objects.
-	compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
-	finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
-      fi
-
-      dlsyms=
-      if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
-	if test -n "$NM" && test -n "$global_symbol_pipe"; then
-	  dlsyms="${outputname}S.c"
-	else
-	  $echo "$modename: not configured to extract global symbols from dlpreopened files" 1>&2
-	fi
-      fi
-
-      if test -n "$dlsyms"; then
-	case $dlsyms in
-	"") ;;
-	*.c)
-	  # Discover the nlist of each of the dlfiles.
-	  nlist="$output_objdir/${outputname}.nm"
-
-	  $show "$rm $nlist ${nlist}S ${nlist}T"
-	  $run $rm "$nlist" "${nlist}S" "${nlist}T"
-
-	  # Parse the name list into a source file.
-	  $show "creating $output_objdir/$dlsyms"
-
-	  test -z "$run" && $echo > "$output_objdir/$dlsyms" "\
-/* $dlsyms - symbol resolution table for \`$outputname' dlsym emulation. */
-/* Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP */
-
-#ifdef __cplusplus
-extern \"C\" {
-#endif
-
-/* Prevent the only kind of declaration conflicts we can make. */
-#define lt_preloaded_symbols some_other_symbol
-
-/* External symbol declarations for the compiler. */\
-"
-
-	  if test "$dlself" = yes; then
-	    $show "generating symbol list for \`$output'"
-
-	    test -z "$run" && $echo ': @PROGRAM@ ' > "$nlist"
-
-	    # Add our own program objects to the symbol list.
-	    progfiles=`$echo "X$objs$old_deplibs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
-	    for arg in $progfiles; do
-	      $show "extracting global C symbols from \`$arg'"
-	      $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'"
-	    done
-
-	    if test -n "$exclude_expsyms"; then
-	      $run eval '$EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T'
-	      $run eval '$mv "$nlist"T "$nlist"'
-	    fi
-
-	    if test -n "$export_symbols_regex"; then
-	      $run eval '$EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T'
-	      $run eval '$mv "$nlist"T "$nlist"'
-	    fi
-
-	    # Prepare the list of exported symbols
-	    if test -z "$export_symbols"; then
-	      export_symbols="$output_objdir/$outputname.exp"
-	      $run $rm $export_symbols
-	      $run eval "${SED} -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"'
-              case $host in
-              *cygwin* | *mingw* )
-	        $run eval "echo EXPORTS "'> "$output_objdir/$outputname.def"'
-		$run eval 'cat "$export_symbols" >> "$output_objdir/$outputname.def"'
-                ;;
-              esac
-	    else
-	      $run eval "${SED} -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"'
-	      $run eval 'grep -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T'
-	      $run eval 'mv "$nlist"T "$nlist"'
-              case $host in
-              *cygwin* | *mingw* )
-	        $run eval "echo EXPORTS "'> "$output_objdir/$outputname.def"'
-		$run eval 'cat "$nlist" >> "$output_objdir/$outputname.def"'
-                ;;
-              esac
-	    fi
-	  fi
-
-	  for arg in $dlprefiles; do
-	    $show "extracting global C symbols from \`$arg'"
-	    name=`$echo "$arg" | ${SED} -e 's%^.*/%%'`
-	    $run eval '$echo ": $name " >> "$nlist"'
-	    $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'"
-	  done
-
-	  if test -z "$run"; then
-	    # Make sure we have at least an empty file.
-	    test -f "$nlist" || : > "$nlist"
-
-	    if test -n "$exclude_expsyms"; then
-	      $EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T
-	      $mv "$nlist"T "$nlist"
-	    fi
-
-	    # Try sorting and uniquifying the output.
-	    if grep -v "^: " < "$nlist" |
-		if sort -k 3 </dev/null >/dev/null 2>&1; then
-		  sort -k 3
-		else
-		  sort +2
-		fi |
-		uniq > "$nlist"S; then
-	      :
-	    else
-	      grep -v "^: " < "$nlist" > "$nlist"S
-	    fi
-
-	    if test -f "$nlist"S; then
-	      eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$dlsyms"'
-	    else
-	      $echo '/* NONE */' >> "$output_objdir/$dlsyms"
-	    fi
-
-	    $echo >> "$output_objdir/$dlsyms" "\
-
-#undef lt_preloaded_symbols
-
-#if defined (__STDC__) && __STDC__
-# define lt_ptr void *
-#else
-# define lt_ptr char *
-# define const
-#endif
-
-/* The mapping between symbol names and symbols. */
-"
-
-	    case $host in
-	    *cygwin* | *mingw* )
-	  $echo >> "$output_objdir/$dlsyms" "\
-/* DATA imports from DLLs on WIN32 can't be const, because
-   runtime relocations are performed -- see ld's documentation
-   on pseudo-relocs */
-struct {
-"
-	      ;;
-	    * )
-	  $echo >> "$output_objdir/$dlsyms" "\
-const struct {
-"
-	      ;;
-	    esac
-
-
-	  $echo >> "$output_objdir/$dlsyms" "\
-  const char *name;
-  lt_ptr address;
-}
-lt_preloaded_symbols[] =
-{\
-"
-
-	    eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$dlsyms"
-
-	    $echo >> "$output_objdir/$dlsyms" "\
-  {0, (lt_ptr) 0}
-};
-
-/* This works around a problem in FreeBSD linker */
-#ifdef FREEBSD_WORKAROUND
-static const void *lt_preloaded_setup() {
-  return lt_preloaded_symbols;
-}
-#endif
-
-#ifdef __cplusplus
-}
-#endif\
-"
-	  fi
-
-	  pic_flag_for_symtable=
-	  case $host in
-	  # compiling the symbol table file with pic_flag works around
-	  # a FreeBSD bug that causes programs to crash when -lm is
-	  # linked before any other PIC object.  But we must not use
-	  # pic_flag when linking with -static.  The problem exists in
-	  # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1.
-	  *-*-freebsd2*|*-*-freebsd3.0*|*-*-freebsdelf3.0*)
-	    case "$compile_command " in
-	    *" -static "*) ;;
-	    *) pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND";;
-	    esac;;
-	  *-*-hpux*)
-	    case "$compile_command " in
-	    *" -static "*) ;;
-	    *) pic_flag_for_symtable=" $pic_flag";;
-	    esac
-	  esac
-
-	  # Now compile the dynamic symbol file.
-	  $show "(cd $output_objdir && $LTCC  $LTCFLAGS -c$no_builtin_flag$pic_flag_for_symtable \"$dlsyms\")"
-	  $run eval '(cd $output_objdir && $LTCC  $LTCFLAGS -c$no_builtin_flag$pic_flag_for_symtable "$dlsyms")' || exit $?
-
-	  # Clean up the generated files.
-	  $show "$rm $output_objdir/$dlsyms $nlist ${nlist}S ${nlist}T"
-	  $run $rm "$output_objdir/$dlsyms" "$nlist" "${nlist}S" "${nlist}T"
-
-	  # Transform the symbol file into the correct name.
-          case $host in
-          *cygwin* | *mingw* )
-            if test -f "$output_objdir/${outputname}.def" ; then
-              compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}.def $output_objdir/${outputname}S.${objext}%" | $NL2SP`
-              finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}.def $output_objdir/${outputname}S.${objext}%" | $NL2SP`
-            else
-              compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP`
-              finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP`
-             fi
-            ;;
-          * )
-            compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP`
-            finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP`
-            ;;
-          esac
-	  ;;
-	*)
-	  $echo "$modename: unknown suffix for \`$dlsyms'" 1>&2
-	  exit $EXIT_FAILURE
-	  ;;
-	esac
-      else
-	# We keep going just in case the user didn't refer to
-	# lt_preloaded_symbols.  The linker will fail if global_symbol_pipe
-	# really was required.
-
-	# Nullify the symbol file.
-	compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s% @SYMFILE@%%" | $NL2SP`
-	finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s% @SYMFILE@%%" | $NL2SP`
-      fi
-
-      if test "$need_relink" = no || test "$build_libtool_libs" != yes; then
-	# Replace the output file specification.
-	compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e 's%@OUTPUT@%'"$output"'%g' | $NL2SP`
-	link_command="$compile_command$compile_rpath"
-
-	# We have no uninstalled library dependencies, so finalize right now.
-	$show "$link_command"
-	$run eval "$link_command"
-	exit_status=$?
-
-	# Delete the generated files.
-	if test -n "$dlsyms"; then
-	  $show "$rm $output_objdir/${outputname}S.${objext}"
-	  $run $rm "$output_objdir/${outputname}S.${objext}"
-	fi
-
-	exit $exit_status
-      fi
-
-      if test -n "$shlibpath_var"; then
-	# We should set the shlibpath_var
-	rpath=
-	for dir in $temp_rpath; do
-	  case $dir in
-	  [\\/]* | [A-Za-z]:[\\/]*)
-	    # Absolute path.
-	    rpath="$rpath$dir:"
-	    ;;
-	  *)
-	    # Relative path: add a thisdir entry.
-	    rpath="$rpath\$thisdir/$dir:"
-	    ;;
-	  esac
-	done
-	temp_rpath="$rpath"
-      fi
-
-      if test -n "$compile_shlibpath$finalize_shlibpath"; then
-	compile_command="$shlibpath_var=\"$compile_shlibpath$finalize_shlibpath\$$shlibpath_var\" $compile_command"
-      fi
-      if test -n "$finalize_shlibpath"; then
-	finalize_command="$shlibpath_var=\"$finalize_shlibpath\$$shlibpath_var\" $finalize_command"
-      fi
-
-      compile_var=
-      finalize_var=
-      if test -n "$runpath_var"; then
-	if test -n "$perm_rpath"; then
-	  # We should set the runpath_var.
-	  rpath=
-	  for dir in $perm_rpath; do
-	    rpath="$rpath$dir:"
-	  done
-	  compile_var="$runpath_var=\"$rpath\$$runpath_var\" "
-	fi
-	if test -n "$finalize_perm_rpath"; then
-	  # We should set the runpath_var.
-	  rpath=
-	  for dir in $finalize_perm_rpath; do
-	    rpath="$rpath$dir:"
-	  done
-	  finalize_var="$runpath_var=\"$rpath\$$runpath_var\" "
-	fi
-      fi
-
-      if test "$no_install" = yes; then
-	# We don't need to create a wrapper script.
-	link_command="$compile_var$compile_command$compile_rpath"
-	# Replace the output file specification.
-	link_command=`$echo "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'`
-	# Delete the old output file.
-	$run $rm $output
-	# Link the executable and exit
-	$show "$link_command"
-	$run eval "$link_command" || exit $?
-	exit $EXIT_SUCCESS
-      fi
-
-      if test "$hardcode_action" = relink; then
-	# Fast installation is not supported
-	link_command="$compile_var$compile_command$compile_rpath"
-	relink_command="$finalize_var$finalize_command$finalize_rpath"
-
-	$echo "$modename: warning: this platform does not like uninstalled shared libraries" 1>&2
-	$echo "$modename: \`$output' will be relinked during installation" 1>&2
-      else
-	if test "$fast_install" != no; then
-	  link_command="$finalize_var$compile_command$finalize_rpath"
-	  if test "$fast_install" = yes; then
-	    relink_command=`$echo "X$compile_var$compile_command$compile_rpath" | $SP2NL | $Xsed -e 's%@OUTPUT@%\$progdir/\$file%g' | $NL2SP`
-	  else
-	    # fast_install is set to needless
-	    relink_command=
-	  fi
-	else
-	  link_command="$compile_var$compile_command$compile_rpath"
-	  relink_command="$finalize_var$finalize_command$finalize_rpath"
-	fi
-      fi
-
-      # Replace the output file specification.
-      link_command=`$echo "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'`
-
-      # Delete the old output files.
-      $run $rm $output $output_objdir/$outputname $output_objdir/lt-$outputname
-
-      $show "$link_command"
-      $run eval "$link_command" || exit $?
-
-      # Now create the wrapper script.
-      $show "creating $output"
-
-      # Quote the relink command for shipping.
-      if test -n "$relink_command"; then
-	# Preserve any variables that may affect compiler behavior
-	for var in $variables_saved_for_relink; do
-	  if eval test -z \"\${$var+set}\"; then
-	    relink_command="{ test -z \"\${$var+set}\" || unset $var || { $var=; export $var; }; }; $relink_command"
-	  elif eval var_value=\$$var; test -z "$var_value"; then
-	    relink_command="$var=; export $var; $relink_command"
-	  else
-	    var_value=`$echo "X$var_value" | $Xsed -e "$sed_quote_subst"`
-	    relink_command="$var=\"$var_value\"; export $var; $relink_command"
-	  fi
-	done
-	relink_command="(cd `pwd`; $relink_command)"
-	relink_command=`$echo "X$relink_command" | $SP2NL | $Xsed -e "$sed_quote_subst" | $NL2SP`
-      fi
-
-      # Quote $echo for shipping.
-      if test "X$echo" = "X$SHELL $progpath --fallback-echo"; then
-	case $progpath in
-	[\\/]* | [A-Za-z]:[\\/]*) qecho="$SHELL $progpath --fallback-echo";;
-	*) qecho="$SHELL `pwd`/$progpath --fallback-echo";;
-	esac
-	qecho=`$echo "X$qecho" | $Xsed -e "$sed_quote_subst"`
-      else
-	qecho=`$echo "X$echo" | $Xsed -e "$sed_quote_subst"`
-      fi
-
-      # Only actually do things if our run command is non-null.
-      if test -z "$run"; then
-	# win32 will think the script is a binary if it has
-	# a .exe suffix, so we strip it off here.
-	case $output in
-	  *.exe) output=`$echo $output|${SED} 's,.exe$,,'` ;;
-	esac
-	# test for cygwin because mv fails w/o .exe extensions
-	case $host in
-	  *cygwin*)
-	    exeext=.exe
-	    outputname=`$echo $outputname|${SED} 's,.exe$,,'` ;;
-	  *) exeext= ;;
-	esac
-	case $host in
-	  *cygwin* | *mingw* )
-            output_name=`basename $output`
-            output_path=`dirname $output`
-            cwrappersource="$output_path/$objdir/lt-$output_name.c"
-            cwrapper="$output_path/$output_name.exe"
-            $rm $cwrappersource $cwrapper
-            trap "$rm $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15
-
-	    cat > $cwrappersource <<EOF
-
-/* $cwrappersource - temporary wrapper executable for $objdir/$outputname
-   Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
-
-   The $output program cannot be directly executed until all the libtool
-   libraries that it depends on are installed.
-
-   This wrapper executable should never be moved out of the build directory.
-   If it is, it will not operate correctly.
-
-   Currently, it simply execs the wrapper *script* "/bin/sh $output",
-   but could eventually absorb all of the scripts functionality and
-   exec $objdir/$outputname directly.
-*/
-EOF
-	    cat >> $cwrappersource<<"EOF"
-#include <stdio.h>
-#include <stdlib.h>
-#include <unistd.h>
-#include <malloc.h>
-#include <stdarg.h>
-#include <assert.h>
-#include <string.h>
-#include <ctype.h>
-#include <sys/stat.h>
-
-#if defined(PATH_MAX)
-# define LT_PATHMAX PATH_MAX
-#elif defined(MAXPATHLEN)
-# define LT_PATHMAX MAXPATHLEN
-#else
-# define LT_PATHMAX 1024
-#endif
-
-#ifndef DIR_SEPARATOR
-# define DIR_SEPARATOR '/'
-# define PATH_SEPARATOR ':'
-#endif
-
-#if defined (_WIN32) || defined (__MSDOS__) || defined (__DJGPP__) || \
-  defined (__OS2__)
-# define HAVE_DOS_BASED_FILE_SYSTEM
-# ifndef DIR_SEPARATOR_2
-#  define DIR_SEPARATOR_2 '\\'
-# endif
-# ifndef PATH_SEPARATOR_2
-#  define PATH_SEPARATOR_2 ';'
-# endif
-#endif
-
-#ifndef DIR_SEPARATOR_2
-# define IS_DIR_SEPARATOR(ch) ((ch) == DIR_SEPARATOR)
-#else /* DIR_SEPARATOR_2 */
-# define IS_DIR_SEPARATOR(ch) \
-        (((ch) == DIR_SEPARATOR) || ((ch) == DIR_SEPARATOR_2))
-#endif /* DIR_SEPARATOR_2 */
-
-#ifndef PATH_SEPARATOR_2
-# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR)
-#else /* PATH_SEPARATOR_2 */
-# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR_2)
-#endif /* PATH_SEPARATOR_2 */
-
-#define XMALLOC(type, num)      ((type *) xmalloc ((num) * sizeof(type)))
-#define XFREE(stale) do { \
-  if (stale) { free ((void *) stale); stale = 0; } \
-} while (0)
-
-/* -DDEBUG is fairly common in CFLAGS.  */
-#undef DEBUG
-#if defined DEBUGWRAPPER
-# define DEBUG(format, ...) fprintf(stderr, format, __VA_ARGS__)
-#else
-# define DEBUG(format, ...)
-#endif
-
-const char *program_name = NULL;
-
-void * xmalloc (size_t num);
-char * xstrdup (const char *string);
-const char * base_name (const char *name);
-char * find_executable(const char *wrapper);
-int    check_executable(const char *path);
-char * strendzap(char *str, const char *pat);
-void lt_fatal (const char *message, ...);
-
-int
-main (int argc, char *argv[])
-{
-  char **newargz;
-  int i;
-
-  program_name = (char *) xstrdup (base_name (argv[0]));
-  DEBUG("(main) argv[0]      : %s\n",argv[0]);
-  DEBUG("(main) program_name : %s\n",program_name);
-  newargz = XMALLOC(char *, argc+2);
-EOF
-
-            cat >> $cwrappersource <<EOF
-  newargz[0] = (char *) xstrdup("$SHELL");
-EOF
-
-            cat >> $cwrappersource <<"EOF"
-  newargz[1] = find_executable(argv[0]);
-  if (newargz[1] == NULL)
-    lt_fatal("Couldn't find %s", argv[0]);
-  DEBUG("(main) found exe at : %s\n",newargz[1]);
-  /* we know the script has the same name, without the .exe */
-  /* so make sure newargz[1] doesn't end in .exe */
-  strendzap(newargz[1],".exe");
-  for (i = 1; i < argc; i++)
-    newargz[i+1] = xstrdup(argv[i]);
-  newargz[argc+1] = NULL;
-
-  for (i=0; i<argc+1; i++)
-  {
-    DEBUG("(main) newargz[%d]   : %s\n",i,newargz[i]);
-    ;
-  }
-
-EOF
-
-            case $host_os in
-              mingw*)
-                cat >> $cwrappersource <<EOF
-  execv("$SHELL",(char const **)newargz);
-EOF
-              ;;
-              *)
-                cat >> $cwrappersource <<EOF
-  execv("$SHELL",newargz);
-EOF
-              ;;
-            esac
-
-            cat >> $cwrappersource <<"EOF"
-  return 127;
-}
-
-void *
-xmalloc (size_t num)
-{
-  void * p = (void *) malloc (num);
-  if (!p)
-    lt_fatal ("Memory exhausted");
-
-  return p;
-}
-
-char *
-xstrdup (const char *string)
-{
-  return string ? strcpy ((char *) xmalloc (strlen (string) + 1), string) : NULL
-;
-}
-
-const char *
-base_name (const char *name)
-{
-  const char *base;
-
-#if defined (HAVE_DOS_BASED_FILE_SYSTEM)
-  /* Skip over the disk name in MSDOS pathnames. */
-  if (isalpha ((unsigned char)name[0]) && name[1] == ':')
-    name += 2;
-#endif
-
-  for (base = name; *name; name++)
-    if (IS_DIR_SEPARATOR (*name))
-      base = name + 1;
-  return base;
-}
-
-int
-check_executable(const char * path)
-{
-  struct stat st;
-
-  DEBUG("(check_executable)  : %s\n", path ? (*path ? path : "EMPTY!") : "NULL!");
-  if ((!path) || (!*path))
-    return 0;
-
-  if ((stat (path, &st) >= 0) &&
-      (
-        /* MinGW & native WIN32 do not support S_IXOTH or S_IXGRP */
-#if defined (S_IXOTH)
-       ((st.st_mode & S_IXOTH) == S_IXOTH) ||
-#endif
-#if defined (S_IXGRP)
-       ((st.st_mode & S_IXGRP) == S_IXGRP) ||
-#endif
-       ((st.st_mode & S_IXUSR) == S_IXUSR))
-      )
-    return 1;
-  else
-    return 0;
-}
-
-/* Searches for the full path of the wrapper.  Returns
-   newly allocated full path name if found, NULL otherwise */
-char *
-find_executable (const char* wrapper)
-{
-  int has_slash = 0;
-  const char* p;
-  const char* p_next;
-  /* static buffer for getcwd */
-  char tmp[LT_PATHMAX + 1];
-  int tmp_len;
-  char* concat_name;
-
-  DEBUG("(find_executable)  : %s\n", wrapper ? (*wrapper ? wrapper : "EMPTY!") : "NULL!");
-
-  if ((wrapper == NULL) || (*wrapper == '\0'))
-    return NULL;
-
-  /* Absolute path? */
-#if defined (HAVE_DOS_BASED_FILE_SYSTEM)
-  if (isalpha ((unsigned char)wrapper[0]) && wrapper[1] == ':')
-  {
-    concat_name = xstrdup (wrapper);
-    if (check_executable(concat_name))
-      return concat_name;
-    XFREE(concat_name);
-  }
-  else
-  {
-#endif
-    if (IS_DIR_SEPARATOR (wrapper[0]))
-    {
-      concat_name = xstrdup (wrapper);
-      if (check_executable(concat_name))
-        return concat_name;
-      XFREE(concat_name);
-    }
-#if defined (HAVE_DOS_BASED_FILE_SYSTEM)
-  }
-#endif
-
-  for (p = wrapper; *p; p++)
-    if (*p == '/')
-    {
-      has_slash = 1;
-      break;
-    }
-  if (!has_slash)
-  {
-    /* no slashes; search PATH */
-    const char* path = getenv ("PATH");
-    if (path != NULL)
-    {
-      for (p = path; *p; p = p_next)
-      {
-        const char* q;
-        size_t p_len;
-        for (q = p; *q; q++)
-          if (IS_PATH_SEPARATOR(*q))
-            break;
-        p_len = q - p;
-        p_next = (*q == '\0' ? q : q + 1);
-        if (p_len == 0)
-        {
-          /* empty path: current directory */
-          if (getcwd (tmp, LT_PATHMAX) == NULL)
-            lt_fatal ("getcwd failed");
-          tmp_len = strlen(tmp);
-          concat_name = XMALLOC(char, tmp_len + 1 + strlen(wrapper) + 1);
-          memcpy (concat_name, tmp, tmp_len);
-          concat_name[tmp_len] = '/';
-          strcpy (concat_name + tmp_len + 1, wrapper);
-        }
-        else
-        {
-          concat_name = XMALLOC(char, p_len + 1 + strlen(wrapper) + 1);
-          memcpy (concat_name, p, p_len);
-          concat_name[p_len] = '/';
-          strcpy (concat_name + p_len + 1, wrapper);
-        }
-        if (check_executable(concat_name))
-          return concat_name;
-        XFREE(concat_name);
-      }
-    }
-    /* not found in PATH; assume curdir */
-  }
-  /* Relative path | not found in path: prepend cwd */
-  if (getcwd (tmp, LT_PATHMAX) == NULL)
-    lt_fatal ("getcwd failed");
-  tmp_len = strlen(tmp);
-  concat_name = XMALLOC(char, tmp_len + 1 + strlen(wrapper) + 1);
-  memcpy (concat_name, tmp, tmp_len);
-  concat_name[tmp_len] = '/';
-  strcpy (concat_name + tmp_len + 1, wrapper);
-
-  if (check_executable(concat_name))
-    return concat_name;
-  XFREE(concat_name);
-  return NULL;
-}
-
-char *
-strendzap(char *str, const char *pat)
-{
-  size_t len, patlen;
-
-  assert(str != NULL);
-  assert(pat != NULL);
-
-  len = strlen(str);
-  patlen = strlen(pat);
-
-  if (patlen <= len)
-  {
-    str += len - patlen;
-    if (strcmp(str, pat) == 0)
-      *str = '\0';
-  }
-  return str;
-}
-
-static void
-lt_error_core (int exit_status, const char * mode,
-          const char * message, va_list ap)
-{
-  fprintf (stderr, "%s: %s: ", program_name, mode);
-  vfprintf (stderr, message, ap);
-  fprintf (stderr, ".\n");
-
-  if (exit_status >= 0)
-    exit (exit_status);
-}
-
-void
-lt_fatal (const char *message, ...)
-{
-  va_list ap;
-  va_start (ap, message);
-  lt_error_core (EXIT_FAILURE, "FATAL", message, ap);
-  va_end (ap);
-}
-EOF
-          # we should really use a build-platform specific compiler
-          # here, but OTOH, the wrappers (shell script and this C one)
-          # are only useful if you want to execute the "real" binary.
-          # Since the "real" binary is built for $host, then this
-          # wrapper might as well be built for $host, too.
-          $run $LTCC $LTCFLAGS -s -o $cwrapper $cwrappersource
-          ;;
-        esac
-        $rm $output
-        trap "$rm $output; exit $EXIT_FAILURE" 1 2 15
-
-	$echo > $output "\
-#! $SHELL
-
-# $output - temporary wrapper script for $objdir/$outputname
-# Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
-#
-# The $output program cannot be directly executed until all the libtool
-# libraries that it depends on are installed.
-#
-# This wrapper script should never be moved out of the build directory.
-# If it is, it will not operate correctly.
-
-# Sed substitution that helps us do robust quoting.  It backslashifies
-# metacharacters that are still active within double-quoted strings.
-Xsed='${SED} -e 1s/^X//'
-sed_quote_subst='$sed_quote_subst'
-
-# Be Bourne compatible (taken from Autoconf:_AS_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+\"\$@\"}'='\"\$@\"'
-  setopt NO_GLOB_SUBST
-else
-  case \`(set -o) 2>/dev/null\` in *posix*) set -o posix;; esac
-fi
-BIN_SH=xpg4; export BIN_SH # for Tru64
-DUALCASE=1; export DUALCASE # for MKS sh
-
-# The HP-UX ksh and POSIX shell print the target directory to stdout
-# if CDPATH is set.
-(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
-
-relink_command=\"$relink_command\"
-
-# This environment variable determines our operation mode.
-if test \"\$libtool_install_magic\" = \"$magic\"; then
-  # install mode needs the following variable:
-  notinst_deplibs='$notinst_deplibs'
-else
-  # When we are sourced in execute mode, \$file and \$echo are already set.
-  if test \"\$libtool_execute_magic\" != \"$magic\"; then
-    echo=\"$qecho\"
-    file=\"\$0\"
-    # Make sure echo works.
-    if test \"X\$1\" = X--no-reexec; then
-      # Discard the --no-reexec flag, and continue.
-      shift
-    elif test \"X\`(\$echo '\t') 2>/dev/null\`\" = 'X\t'; then
-      # Yippee, \$echo works!
-      :
-    else
-      # Restart under the correct shell, and then maybe \$echo will work.
-      exec $SHELL \"\$0\" --no-reexec \${1+\"\$@\"}
-    fi
-  fi\
-"
-	$echo >> $output "\
-
-  # Find the directory that this script lives in.
-  thisdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*$%%'\`
-  test \"x\$thisdir\" = \"x\$file\" && thisdir=.
-
-  # Follow symbolic links until we get to the real thisdir.
-  file=\`ls -ld \"\$file\" | ${SED} -n 's/.*-> //p'\`
-  while test -n \"\$file\"; do
-    destdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*\$%%'\`
-
-    # If there was a directory component, then change thisdir.
-    if test \"x\$destdir\" != \"x\$file\"; then
-      case \"\$destdir\" in
-      [\\\\/]* | [A-Za-z]:[\\\\/]*) thisdir=\"\$destdir\" ;;
-      *) thisdir=\"\$thisdir/\$destdir\" ;;
-      esac
-    fi
-
-    file=\`\$echo \"X\$file\" | \$Xsed -e 's%^.*/%%'\`
-    file=\`ls -ld \"\$thisdir/\$file\" | ${SED} -n 's/.*-> //p'\`
-  done
-
-  # Try to get the absolute directory name.
-  absdir=\`cd \"\$thisdir\" && pwd\`
-  test -n \"\$absdir\" && thisdir=\"\$absdir\"
-"
-
-	if test "$fast_install" = yes; then
-	  $echo >> $output "\
-  program=lt-'$outputname'$exeext
-  progdir=\"\$thisdir/$objdir\"
-
-  if test ! -f \"\$progdir/\$program\" || \\
-     { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | ${SED} 1q\`; \\
-       test \"X\$file\" != \"X\$progdir/\$program\"; }; then
-
-    file=\"\$\$-\$program\"
-
-    if test ! -d \"\$progdir\"; then
-      $mkdir \"\$progdir\"
-    else
-      $rm \"\$progdir/\$file\"
-    fi"
-
-	  $echo >> $output "\
-
-    # relink executable if necessary
-    if test -n \"\$relink_command\"; then
-      if relink_command_output=\`eval \$relink_command 2>&1\`; then :
-      else
-	$echo \"\$relink_command_output\" >&2
-	$rm \"\$progdir/\$file\"
-	exit $EXIT_FAILURE
-      fi
-    fi
-
-    $mv \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null ||
-    { $rm \"\$progdir/\$program\";
-      $mv \"\$progdir/\$file\" \"\$progdir/\$program\"; }
-    $rm \"\$progdir/\$file\"
-  fi"
-	else
-	  $echo >> $output "\
-  program='$outputname'
-  progdir=\"\$thisdir/$objdir\"
-"
-	fi
-
-	$echo >> $output "\
-
-  if test -f \"\$progdir/\$program\"; then"
-
-	# Export our shlibpath_var if we have one.
-	if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then
-	  $echo >> $output "\
-    # Add our own library path to $shlibpath_var
-    $shlibpath_var=\"$temp_rpath\$$shlibpath_var\"
-
-    # Some systems cannot cope with colon-terminated $shlibpath_var
-    # The second colon is a workaround for a bug in BeOS R4 sed
-    $shlibpath_var=\`\$echo \"X\$$shlibpath_var\" | \$Xsed -e 's/::*\$//'\`
-
-    export $shlibpath_var
-"
-	fi
-
-	# fixup the dll searchpath if we need to.
-	if test -n "$dllsearchpath"; then
-	  $echo >> $output "\
-    # Add the dll search path components to the executable PATH
-    PATH=$dllsearchpath:\$PATH
-"
-	fi
-
-	$echo >> $output "\
-    if test \"\$libtool_execute_magic\" != \"$magic\"; then
-      # Run the actual program with our arguments.
-"
-	case $host in
-	# Backslashes separate directories on plain windows
-	*-*-mingw | *-*-os2*)
-	  $echo >> $output "\
-      exec \"\$progdir\\\\\$program\" \${1+\"\$@\"}
-"
-	  ;;
-
-	*)
-	  $echo >> $output "\
-      exec \"\$progdir/\$program\" \${1+\"\$@\"}
-"
-	  ;;
-	esac
-	$echo >> $output "\
-      \$echo \"\$0: cannot exec \$program \$*\"
-      exit $EXIT_FAILURE
-    fi
-  else
-    # The program doesn't exist.
-    \$echo \"\$0: error: \\\`\$progdir/\$program' does not exist\" 1>&2
-    \$echo \"This script is just a wrapper for \$program.\" 1>&2
-    $echo \"See the $PACKAGE documentation for more information.\" 1>&2
-    exit $EXIT_FAILURE
-  fi
-fi\
-"
-	chmod +x $output
-      fi
-      exit $EXIT_SUCCESS
-      ;;
-    esac
-
-    # See if we need to build an old-fashioned archive.
-    for oldlib in $oldlibs; do
-
-      if test "$build_libtool_libs" = convenience; then
-	oldobjs="$libobjs_save"
-	addlibs="$convenience"
-	build_libtool_libs=no
-      else
-	if test "$build_libtool_libs" = module; then
-	  oldobjs="$libobjs_save"
-	  build_libtool_libs=no
-	else
-	  oldobjs="$old_deplibs $non_pic_objects"
-	fi
-	addlibs="$old_convenience"
-      fi
-
-      if test -n "$addlibs"; then
-	gentop="$output_objdir/${outputname}x"
-	generated="$generated $gentop"
-
-	func_extract_archives $gentop $addlibs
-	oldobjs="$oldobjs $func_extract_archives_result"
-      fi
-
-      # Do each command in the archive commands.
-      if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then
-       cmds=$old_archive_from_new_cmds
-      else
-	# POSIX demands no paths to be encoded in archives.  We have
-	# to avoid creating archives with duplicate basenames if we
-	# might have to extract them afterwards, e.g., when creating a
-	# static archive out of a convenience library, or when linking
-	# the entirety of a libtool archive into another (currently
-	# not supported by libtool).
-	if (for obj in $oldobjs
-	    do
-	      $echo "X$obj" | $Xsed -e 's%^.*/%%'
-	    done | sort | sort -uc >/dev/null 2>&1); then
-	  :
-	else
-	  $echo "copying selected object files to avoid basename conflicts..."
-
-	  if test -z "$gentop"; then
-	    gentop="$output_objdir/${outputname}x"
-	    generated="$generated $gentop"
-
-	    $show "${rm}r $gentop"
-	    $run ${rm}r "$gentop"
-	    $show "$mkdir $gentop"
-	    $run $mkdir "$gentop"
-	    exit_status=$?
-	    if test "$exit_status" -ne 0 && test ! -d "$gentop"; then
-	      exit $exit_status
-	    fi
-	  fi
-
-	  save_oldobjs=$oldobjs
-	  oldobjs=
-	  counter=1
-	  for obj in $save_oldobjs
-	  do
-	    objbase=`$echo "X$obj" | $Xsed -e 's%^.*/%%'`
-	    case " $oldobjs " in
-	    " ") oldobjs=$obj ;;
-	    *[\ /]"$objbase "*)
-	      while :; do
-		# Make sure we don't pick an alternate name that also
-		# overlaps.
-		newobj=lt$counter-$objbase
-		counter=`expr $counter + 1`
-		case " $oldobjs " in
-		*[\ /]"$newobj "*) ;;
-		*) if test ! -f "$gentop/$newobj"; then break; fi ;;
-		esac
-	      done
-	      $show "ln $obj $gentop/$newobj || cp $obj $gentop/$newobj"
-	      $run ln "$obj" "$gentop/$newobj" ||
-	      $run cp "$obj" "$gentop/$newobj"
-	      oldobjs="$oldobjs $gentop/$newobj"
-	      ;;
-	    *) oldobjs="$oldobjs $obj" ;;
-	    esac
-	  done
-	fi
-
-	eval cmds=\"$old_archive_cmds\"
-
-	if len=`expr "X$cmds" : ".*"` &&
-	     test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then
-	  cmds=$old_archive_cmds
-	else
-	  # the command line is too long to link in one step, link in parts
-	  $echo "using piecewise archive linking..."
-	  save_RANLIB=$RANLIB
-	  RANLIB=:
-	  objlist=
-	  concat_cmds=
-	  save_oldobjs=$oldobjs
-
-	  # Is there a better way of finding the last object in the list?
-	  for obj in $save_oldobjs
-	  do
-	    last_oldobj=$obj
-	  done
-	  for obj in $save_oldobjs
-	  do
-	    oldobjs="$objlist $obj"
-	    objlist="$objlist $obj"
-	    eval test_cmds=\"$old_archive_cmds\"
-	    if len=`expr "X$test_cmds" : ".*" 2>/dev/null` &&
-	       test "$len" -le "$max_cmd_len"; then
-	      :
-	    else
-	      # the above command should be used before it gets too long
-	      oldobjs=$objlist
-	      if test "$obj" = "$last_oldobj" ; then
-	        RANLIB=$save_RANLIB
-	      fi
-	      test -z "$concat_cmds" || concat_cmds=$concat_cmds~
-	      eval concat_cmds=\"\${concat_cmds}$old_archive_cmds\"
-	      objlist=
-	    fi
-	  done
-	  RANLIB=$save_RANLIB
-	  oldobjs=$objlist
-	  if test "X$oldobjs" = "X" ; then
-	    eval cmds=\"\$concat_cmds\"
-	  else
-	    eval cmds=\"\$concat_cmds~\$old_archive_cmds\"
-	  fi
-	fi
-      fi
-      save_ifs="$IFS"; IFS='~'
-      for cmd in $cmds; do
-        eval cmd=\"$cmd\"
-	IFS="$save_ifs"
-	$show "$cmd"
-	$run eval "$cmd" || exit $?
-      done
-      IFS="$save_ifs"
-    done
-
-    if test -n "$generated"; then
-      $show "${rm}r$generated"
-      $run ${rm}r$generated
-    fi
-
-    # Now create the libtool archive.
-    case $output in
-    *.la)
-      old_library=
-      test "$build_old_libs" = yes && old_library="$libname.$libext"
-      $show "creating $output"
-
-      # Preserve any variables that may affect compiler behavior
-      for var in $variables_saved_for_relink; do
-	if eval test -z \"\${$var+set}\"; then
-	  relink_command="{ test -z \"\${$var+set}\" || unset $var || { $var=; export $var; }; }; $relink_command"
-	elif eval var_value=\$$var; test -z "$var_value"; then
-	  relink_command="$var=; export $var; $relink_command"
-	else
-	  var_value=`$echo "X$var_value" | $Xsed -e "$sed_quote_subst"`
-	  relink_command="$var=\"$var_value\"; export $var; $relink_command"
-	fi
-      done
-      # Quote the link command for shipping.
-      relink_command="(cd `pwd`; $SHELL $progpath $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)"
-      relink_command=`$echo "X$relink_command" | $SP2NL | $Xsed -e "$sed_quote_subst" | $NL2SP`
-      if test "$hardcode_automatic" = yes ; then
-	relink_command=
-      fi
-
-
-      # Only create the output if not a dry run.
-      if test -z "$run"; then
-	for installed in no yes; do
-	  if test "$installed" = yes; then
-	    if test -z "$install_libdir"; then
-	      break
-	    fi
-	    output="$output_objdir/$outputname"i
-	    # Replace all uninstalled libtool libraries with the installed ones
-	    newdependency_libs=
-	    for deplib in $dependency_libs; do
-	      case $deplib in
-	      *.la)
-		name=`$echo "X$deplib" | $Xsed -e 's%^.*/%%'`
-		eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
-		if test -z "$libdir"; then
-		  $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2
-		  exit $EXIT_FAILURE
-		fi
-		newdependency_libs="$newdependency_libs $libdir/$name"
-		;;
-	      *) newdependency_libs="$newdependency_libs $deplib" ;;
-	      esac
-	    done
-	    dependency_libs="$newdependency_libs"
-	    newdlfiles=
-	    for lib in $dlfiles; do
-	      name=`$echo "X$lib" | $Xsed -e 's%^.*/%%'`
-	      eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
-	      if test -z "$libdir"; then
-		$echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
-		exit $EXIT_FAILURE
-	      fi
-	      newdlfiles="$newdlfiles $libdir/$name"
-	    done
-	    dlfiles="$newdlfiles"
-	    newdlprefiles=
-	    for lib in $dlprefiles; do
-	      name=`$echo "X$lib" | $Xsed -e 's%^.*/%%'`
-	      eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
-	      if test -z "$libdir"; then
-		$echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
-		exit $EXIT_FAILURE
-	      fi
-	      newdlprefiles="$newdlprefiles $libdir/$name"
-	    done
-	    dlprefiles="$newdlprefiles"
-	  else
-	    newdlfiles=
-	    for lib in $dlfiles; do
-	      case $lib in
-		[\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;;
-		*) abs=`pwd`"/$lib" ;;
-	      esac
-	      newdlfiles="$newdlfiles $abs"
-	    done
-	    dlfiles="$newdlfiles"
-	    newdlprefiles=
-	    for lib in $dlprefiles; do
-	      case $lib in
-		[\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;;
-		*) abs=`pwd`"/$lib" ;;
-	      esac
-	      newdlprefiles="$newdlprefiles $abs"
-	    done
-	    dlprefiles="$newdlprefiles"
-	  fi
-	  $rm $output
-	  # place dlname in correct position for cygwin
-	  tdlname=$dlname
-	  case $host,$output,$installed,$module,$dlname in
-	    *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll) tdlname=../bin/$dlname ;;
-	  esac
-	  $echo > $output "\
-# $outputname - a libtool library file
-# Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
-#
-# Please DO NOT delete this file!
-# It is necessary for linking the library.
-
-# The name that we can dlopen(3).
-dlname='$tdlname'
-
-# Names of this library.
-library_names='$library_names'
-
-# The name of the static archive.
-old_library='$old_library'
-
-# Libraries that this one depends upon.
-dependency_libs='$dependency_libs'
-
-# Version information for $libname.
-current=$current
-age=$age
-revision=$revision
-
-# Is this an already installed library?
-installed=$installed
-
-# Should we warn about portability when linking against -modules?
-shouldnotlink=$module
-
-# Files to dlopen/dlpreopen
-dlopen='$dlfiles'
-dlpreopen='$dlprefiles'
-
-# Directory that this library needs to be installed in:
-libdir='$install_libdir'"
-	  if test "$installed" = no && test "$need_relink" = yes; then
-	    $echo >> $output "\
-relink_command=\"$relink_command\""
-	  fi
-	done
-      fi
-
-      # Do a symbolic link so that the libtool archive can be found in
-      # LD_LIBRARY_PATH before the program is installed.
-      $show "(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)"
-      $run eval '(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)' || exit $?
-      ;;
-    esac
-    exit $EXIT_SUCCESS
-    ;;
-
-  # libtool install mode
-  install)
-    modename="$modename: install"
-
-    # There may be an optional sh(1) argument at the beginning of
-    # install_prog (especially on Windows NT).
-    if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh ||
-       # Allow the use of GNU shtool's install command.
-       $echo "X$nonopt" | grep shtool > /dev/null; then
-      # Aesthetically quote it.
-      arg=`$echo "X$nonopt" | $Xsed -e "$sed_quote_subst"`
-      case $arg in
-      *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*|"")
-	arg="\"$arg\""
-	;;
-      esac
-      install_prog="$arg "
-      arg="$1"
-      shift
-    else
-      install_prog=
-      arg=$nonopt
-    fi
-
-    # The real first argument should be the name of the installation program.
-    # Aesthetically quote it.
-    arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
-    case $arg in
-    *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*|"")
-      arg="\"$arg\""
-      ;;
-    esac
-    install_prog="$install_prog$arg"
-
-    # We need to accept at least all the BSD install flags.
-    dest=
-    files=
-    opts=
-    prev=
-    install_type=
-    isdir=no
-    stripme=
-    for arg
-    do
-      if test -n "$dest"; then
-	files="$files $dest"
-	dest=$arg
-	continue
-      fi
-
-      case $arg in
-      -d) isdir=yes ;;
-      -f) 
-      	case " $install_prog " in
-	*[\\\ /]cp\ *) ;;
-	*) prev=$arg ;;
-	esac
-	;;
-      -g | -m | -o) prev=$arg ;;
-      -s)
-	stripme=" -s"
-	continue
-	;;
-      -*)
-	;;
-      *)
-	# If the previous option needed an argument, then skip it.
-	if test -n "$prev"; then
-	  prev=
-	else
-	  dest=$arg
-	  continue
-	fi
-	;;
-      esac
-
-      # Aesthetically quote the argument.
-      arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
-      case $arg in
-      *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*|"")
-	arg="\"$arg\""
-	;;
-      esac
-      install_prog="$install_prog $arg"
-    done
-
-    if test -z "$install_prog"; then
-      $echo "$modename: you must specify an install program" 1>&2
-      $echo "$help" 1>&2
-      exit $EXIT_FAILURE
-    fi
-
-    if test -n "$prev"; then
-      $echo "$modename: the \`$prev' option requires an argument" 1>&2
-      $echo "$help" 1>&2
-      exit $EXIT_FAILURE
-    fi
-
-    if test -z "$files"; then
-      if test -z "$dest"; then
-	$echo "$modename: no file or destination specified" 1>&2
-      else
-	$echo "$modename: you must specify a destination" 1>&2
-      fi
-      $echo "$help" 1>&2
-      exit $EXIT_FAILURE
-    fi
-
-    # Strip any trailing slash from the destination.
-    dest=`$echo "X$dest" | $Xsed -e 's%/$%%'`
-
-    # Check to see that the destination is a directory.
-    test -d "$dest" && isdir=yes
-    if test "$isdir" = yes; then
-      destdir="$dest"
-      destname=
-    else
-      destdir=`$echo "X$dest" | $Xsed -e 's%/[^/]*$%%'`
-      test "X$destdir" = "X$dest" && destdir=.
-      destname=`$echo "X$dest" | $Xsed -e 's%^.*/%%'`
-
-      # Not a directory, so check to see that there is only one file specified.
-      set dummy $files
-      if test "$#" -gt 2; then
-	$echo "$modename: \`$dest' is not a directory" 1>&2
-	$echo "$help" 1>&2
-	exit $EXIT_FAILURE
-      fi
-    fi
-    case $destdir in
-    [\\/]* | [A-Za-z]:[\\/]*) ;;
-    *)
-      for file in $files; do
-	case $file in
-	*.lo) ;;
-	*)
-	  $echo "$modename: \`$destdir' must be an absolute directory name" 1>&2
-	  $echo "$help" 1>&2
-	  exit $EXIT_FAILURE
-	  ;;
-	esac
-      done
-      ;;
-    esac
-
-    # This variable tells wrapper scripts just to set variables rather
-    # than running their programs.
-    libtool_install_magic="$magic"
-
-    staticlibs=
-    future_libdirs=
-    current_libdirs=
-    for file in $files; do
-
-      # Do each installation.
-      case $file in
-      *.$libext)
-	# Do the static libraries later.
-	staticlibs="$staticlibs $file"
-	;;
-
-      *.la)
-	# Check to see that this really is a libtool archive.
-	if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
-	else
-	  $echo "$modename: \`$file' is not a valid libtool archive" 1>&2
-	  $echo "$help" 1>&2
-	  exit $EXIT_FAILURE
-	fi
-
-	library_names=
-	old_library=
-	relink_command=
-	# If there is no directory component, then add one.
-	case $file in
-	*/* | *\\*) . $file ;;
-	*) . ./$file ;;
-	esac
-
-	# Add the libdir to current_libdirs if it is the destination.
-	if test "X$destdir" = "X$libdir"; then
-	  case "$current_libdirs " in
-	  *" $libdir "*) ;;
-	  *) current_libdirs="$current_libdirs $libdir" ;;
-	  esac
-	else
-	  # Note the libdir as a future libdir.
-	  case "$future_libdirs " in
-	  *" $libdir "*) ;;
-	  *) future_libdirs="$future_libdirs $libdir" ;;
-	  esac
-	fi
-
-	dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`/
-	test "X$dir" = "X$file/" && dir=
-	dir="$dir$objdir"
-
-	if test -n "$relink_command"; then
-	  # Determine the prefix the user has applied to our future dir.
-	  inst_prefix_dir=`$echo "$destdir" | $SED "s%$libdir\$%%"`
-
-	  # Don't allow the user to place us outside of our expected
-	  # location b/c this prevents finding dependent libraries that
-	  # are installed to the same prefix.
-	  # At present, this check doesn't affect windows .dll's that
-	  # are installed into $libdir/../bin (currently, that works fine)
-	  # but it's something to keep an eye on.
-	  if test "$inst_prefix_dir" = "$destdir"; then
-	    $echo "$modename: error: cannot install \`$file' to a directory not ending in $libdir" 1>&2
-	    exit $EXIT_FAILURE
-	  fi
-
-	  if test -n "$inst_prefix_dir"; then
-	    # Stick the inst_prefix_dir data into the link command.
-	    relink_command=`$echo "$relink_command" | $SP2NL | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%" | $NL2SP`
-	  else
-	    relink_command=`$echo "$relink_command" | $SP2NL | $SED "s%@inst_prefix_dir@%%" | $NL2SP`
-	  fi
-
-	  $echo "$modename: warning: relinking \`$file'" 1>&2
-	  $show "$relink_command"
-	  if $run eval "$relink_command"; then :
-	  else
-	    $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2
-	    exit $EXIT_FAILURE
-	  fi
-	fi
-
-	# See the names of the shared library.
-	set dummy $library_names
-	if test -n "$2"; then
-	  realname="$2"
-	  shift
-	  shift
-
-	  srcname="$realname"
-	  test -n "$relink_command" && srcname="$realname"T
-
-	  # Install the shared library and build the symlinks.
-	  $show "$install_prog $dir/$srcname $destdir/$realname"
-	  $run eval "$install_prog $dir/$srcname $destdir/$realname" || exit $?
-	  if test -n "$stripme" && test -n "$striplib"; then
-	    $show "$striplib $destdir/$realname"
-	    $run eval "$striplib $destdir/$realname" || exit $?
-	  fi
-
-	  if test "$#" -gt 0; then
-	    # Delete the old symlinks, and create new ones.
-	    # Try `ln -sf' first, because the `ln' binary might depend on
-	    # the symlink we replace!  Solaris /bin/ln does not understand -f,
-	    # so we also need to try rm && ln -s.
-	    for linkname
-	    do
-	      if test "$linkname" != "$realname"; then
-                $show "(cd $destdir && { $LN_S -f $realname $linkname || { $rm $linkname && $LN_S $realname $linkname; }; })"
-                $run eval "(cd $destdir && { $LN_S -f $realname $linkname || { $rm $linkname && $LN_S $realname $linkname; }; })"
-	      fi
-	    done
-	  fi
-
-	  # Do each command in the postinstall commands.
-	  lib="$destdir/$realname"
-	  cmds=$postinstall_cmds
-	  save_ifs="$IFS"; IFS='~'
-	  for cmd in $cmds; do
-	    IFS="$save_ifs"
-	    eval cmd=\"$cmd\"
-	    $show "$cmd"
-	    $run eval "$cmd" || {
-	      lt_exit=$?
-
-	      # Restore the uninstalled library and exit
-	      if test "$mode" = relink; then
-		$run eval '(cd $output_objdir && $rm ${realname}T && $mv ${realname}U $realname)'
-	      fi
-
-	      exit $lt_exit
-	    }
-	  done
-	  IFS="$save_ifs"
-	fi
-
-	# Install the pseudo-library for information purposes.
-	name=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
-	instname="$dir/$name"i
-	$show "$install_prog $instname $destdir/$name"
-	$run eval "$install_prog $instname $destdir/$name" || exit $?
-
-	# Maybe install the static library, too.
-	test -n "$old_library" && staticlibs="$staticlibs $dir/$old_library"
-	;;
-
-      *.lo)
-	# Install (i.e. copy) a libtool object.
-
-	# Figure out destination file name, if it wasn't already specified.
-	if test -n "$destname"; then
-	  destfile="$destdir/$destname"
-	else
-	  destfile=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
-	  destfile="$destdir/$destfile"
-	fi
-
-	# Deduce the name of the destination old-style object file.
-	case $destfile in
-	*.lo)
-	  staticdest=`$echo "X$destfile" | $Xsed -e "$lo2o"`
-	  ;;
-	*.$objext)
-	  staticdest="$destfile"
-	  destfile=
-	  ;;
-	*)
-	  $echo "$modename: cannot copy a libtool object to \`$destfile'" 1>&2
-	  $echo "$help" 1>&2
-	  exit $EXIT_FAILURE
-	  ;;
-	esac
-
-	# Install the libtool object if requested.
-	if test -n "$destfile"; then
-	  $show "$install_prog $file $destfile"
-	  $run eval "$install_prog $file $destfile" || exit $?
-	fi
-
-	# Install the old object if enabled.
-	if test "$build_old_libs" = yes; then
-	  # Deduce the name of the old-style object file.
-	  staticobj=`$echo "X$file" | $Xsed -e "$lo2o"`
-
-	  $show "$install_prog $staticobj $staticdest"
-	  $run eval "$install_prog \$staticobj \$staticdest" || exit $?
-	fi
-	exit $EXIT_SUCCESS
-	;;
-
-      *)
-	# Figure out destination file name, if it wasn't already specified.
-	if test -n "$destname"; then
-	  destfile="$destdir/$destname"
-	else
-	  destfile=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
-	  destfile="$destdir/$destfile"
-	fi
-
-	# If the file is missing, and there is a .exe on the end, strip it
-	# because it is most likely a libtool script we actually want to
-	# install
-	stripped_ext=""
-	case $file in
-	  *.exe)
-	    if test ! -f "$file"; then
-	      file=`$echo $file|${SED} 's,.exe$,,'`
-	      stripped_ext=".exe"
-	    fi
-	    ;;
-	esac
-
-	# Do a test to see if this is really a libtool program.
-	case $host in
-	*cygwin*|*mingw*)
-	    wrapper=`$echo $file | ${SED} -e 's,.exe$,,'`
-	    ;;
-	*)
-	    wrapper=$file
-	    ;;
-	esac
-	if (${SED} -e '4q' $wrapper | grep "^# Generated by .*$PACKAGE")>/dev/null 2>&1; then
-	  notinst_deplibs=
-	  relink_command=
-
-	  # Note that it is not necessary on cygwin/mingw to append a dot to
-	  # foo even if both foo and FILE.exe exist: automatic-append-.exe
-	  # behavior happens only for exec(3), not for open(2)!  Also, sourcing
-	  # `FILE.' does not work on cygwin managed mounts.
-	  #
-	  # If there is no directory component, then add one.
-	  case $wrapper in
-	  */* | *\\*) . ${wrapper} ;;
-	  *) . ./${wrapper} ;;
-	  esac
-
-	  # Check the variables that should have been set.
-	  if test -z "$notinst_deplibs"; then
-	    $echo "$modename: invalid libtool wrapper script \`$wrapper'" 1>&2
-	    exit $EXIT_FAILURE
-	  fi
-
-	  finalize=yes
-	  for lib in $notinst_deplibs; do
-	    # Check to see that each library is installed.
-	    libdir=
-	    if test -f "$lib"; then
-	      # If there is no directory component, then add one.
-	      case $lib in
-	      */* | *\\*) . $lib ;;
-	      *) . ./$lib ;;
-	      esac
-	    fi
-	    libfile="$libdir/"`$echo "X$lib" | $Xsed -e 's%^.*/%%g'` ### testsuite: skip nested quoting test
-	    if test -n "$libdir" && test ! -f "$libfile"; then
-	      $echo "$modename: warning: \`$lib' has not been installed in \`$libdir'" 1>&2
-	      finalize=no
-	    fi
-	  done
-
-	  relink_command=
-	  # Note that it is not necessary on cygwin/mingw to append a dot to
-	  # foo even if both foo and FILE.exe exist: automatic-append-.exe
-	  # behavior happens only for exec(3), not for open(2)!  Also, sourcing
-	  # `FILE.' does not work on cygwin managed mounts.
-	  #
-	  # If there is no directory component, then add one.
-	  case $wrapper in
-	  */* | *\\*) . ${wrapper} ;;
-	  *) . ./${wrapper} ;;
-	  esac
-
-	  outputname=
-	  if test "$fast_install" = no && test -n "$relink_command"; then
-	    if test "$finalize" = yes && test -z "$run"; then
-	      tmpdir=`func_mktempdir`
-	      file=`$echo "X$file$stripped_ext" | $Xsed -e 's%^.*/%%'`
-	      outputname="$tmpdir/$file"
-	      # Replace the output file specification.
-	      relink_command=`$echo "X$relink_command" | $SP2NL | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g' | $NL2SP`
-
-	      $show "$relink_command"
-	      if $run eval "$relink_command"; then :
-	      else
-		$echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2
-		${rm}r "$tmpdir"
-		continue
-	      fi
-	      file="$outputname"
-	    else
-	      $echo "$modename: warning: cannot relink \`$file'" 1>&2
-	    fi
-	  else
-	    # Install the binary that we compiled earlier.
-	    file=`$echo "X$file$stripped_ext" | $Xsed -e "s%\([^/]*\)$%$objdir/\1%"`
-	  fi
-	fi
-
-	# remove .exe since cygwin /usr/bin/install will append another
-	# one anyway 
-	case $install_prog,$host in
-	*/usr/bin/install*,*cygwin*)
-	  case $file:$destfile in
-	  *.exe:*.exe)
-	    # this is ok
-	    ;;
-	  *.exe:*)
-	    destfile=$destfile.exe
-	    ;;
-	  *:*.exe)
-	    destfile=`$echo $destfile | ${SED} -e 's,.exe$,,'`
-	    ;;
-	  esac
-	  ;;
-	esac
-	$show "$install_prog$stripme $file $destfile"
-	$run eval "$install_prog\$stripme \$file \$destfile" || exit $?
-	test -n "$outputname" && ${rm}r "$tmpdir"
-	;;
-      esac
-    done
-
-    for file in $staticlibs; do
-      name=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
-
-      # Set up the ranlib parameters.
-      oldlib="$destdir/$name"
-
-      $show "$install_prog $file $oldlib"
-      $run eval "$install_prog \$file \$oldlib" || exit $?
-
-      if test -n "$stripme" && test -n "$old_striplib"; then
-	$show "$old_striplib $oldlib"
-	$run eval "$old_striplib $oldlib" || exit $?
-      fi
-
-      # Do each command in the postinstall commands.
-      cmds=$old_postinstall_cmds
-      save_ifs="$IFS"; IFS='~'
-      for cmd in $cmds; do
-	IFS="$save_ifs"
-	eval cmd=\"$cmd\"
-	$show "$cmd"
-	$run eval "$cmd" || exit $?
-      done
-      IFS="$save_ifs"
-    done
-
-    if test -n "$future_libdirs"; then
-      $echo "$modename: warning: remember to run \`$progname --finish$future_libdirs'" 1>&2
-    fi
-
-    if test -n "$current_libdirs"; then
-      # Maybe just do a dry run.
-      test -n "$run" && current_libdirs=" -n$current_libdirs"
-      exec_cmd='$SHELL $progpath $preserve_args --finish$current_libdirs'
-    else
-      exit $EXIT_SUCCESS
-    fi
-    ;;
-
-  # libtool finish mode
-  finish)
-    modename="$modename: finish"
-    libdirs="$nonopt"
-    admincmds=
-
-    if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then
-      for dir
-      do
-	libdirs="$libdirs $dir"
-      done
-
-      for libdir in $libdirs; do
-	if test -n "$finish_cmds"; then
-	  # Do each command in the finish commands.
-	  cmds=$finish_cmds
-	  save_ifs="$IFS"; IFS='~'
-	  for cmd in $cmds; do
-	    IFS="$save_ifs"
-	    eval cmd=\"$cmd\"
-	    $show "$cmd"
-	    $run eval "$cmd" || admincmds="$admincmds
-       $cmd"
-	  done
-	  IFS="$save_ifs"
-	fi
-	if test -n "$finish_eval"; then
-	  # Do the single finish_eval.
-	  eval cmds=\"$finish_eval\"
-	  $run eval "$cmds" || admincmds="$admincmds
-       $cmds"
-	fi
-      done
-    fi
-
-    # Exit here if they wanted silent mode.
-    test "$show" = : && exit $EXIT_SUCCESS
-
-    $echo "X----------------------------------------------------------------------" | $Xsed
-    $echo "Libraries have been installed in:"
-    for libdir in $libdirs; do
-      $echo "   $libdir"
-    done
-    $echo
-    $echo "If you ever happen to want to link against installed libraries"
-    $echo "in a given directory, LIBDIR, you must either use libtool, and"
-    $echo "specify the full pathname of the library, or use the \`-LLIBDIR'"
-    $echo "flag during linking and do at least one of the following:"
-    if test -n "$shlibpath_var"; then
-      $echo "   - add LIBDIR to the \`$shlibpath_var' environment variable"
-      $echo "     during execution"
-    fi
-    if test -n "$runpath_var"; then
-      $echo "   - add LIBDIR to the \`$runpath_var' environment variable"
-      $echo "     during linking"
-    fi
-    if test -n "$hardcode_libdir_flag_spec"; then
-      libdir=LIBDIR
-      eval flag=\"$hardcode_libdir_flag_spec\"
-
-      $echo "   - use the \`$flag' linker flag"
-    fi
-    if test -n "$admincmds"; then
-      $echo "   - have your system administrator run these commands:$admincmds"
-    fi
-    if test -f /etc/ld.so.conf; then
-      $echo "   - have your system administrator add LIBDIR to \`/etc/ld.so.conf'"
-    fi
-    $echo
-    $echo "See any operating system documentation about shared libraries for"
-    $echo "more information, such as the ld(1) and ld.so(8) manual pages."
-    $echo "X----------------------------------------------------------------------" | $Xsed
-    exit $EXIT_SUCCESS
-    ;;
-
-  # libtool execute mode
-  execute)
-    modename="$modename: execute"
-
-    # The first argument is the command name.
-    cmd="$nonopt"
-    if test -z "$cmd"; then
-      $echo "$modename: you must specify a COMMAND" 1>&2
-      $echo "$help"
-      exit $EXIT_FAILURE
-    fi
-
-    # Handle -dlopen flags immediately.
-    for file in $execute_dlfiles; do
-      if test ! -f "$file"; then
-	$echo "$modename: \`$file' is not a file" 1>&2
-	$echo "$help" 1>&2
-	exit $EXIT_FAILURE
-      fi
-
-      dir=
-      case $file in
-      *.la)
-	# Check to see that this really is a libtool archive.
-	if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
-	else
-	  $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
-	  $echo "$help" 1>&2
-	  exit $EXIT_FAILURE
-	fi
-
-	# Read the libtool library.
-	dlname=
-	library_names=
-
-	# If there is no directory component, then add one.
-	case $file in
-	*/* | *\\*) . $file ;;
-	*) . ./$file ;;
-	esac
-
-	# Skip this library if it cannot be dlopened.
-	if test -z "$dlname"; then
-	  # Warn if it was a shared library.
-	  test -n "$library_names" && $echo "$modename: warning: \`$file' was not linked with \`-export-dynamic'"
-	  continue
-	fi
-
-	dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`
-	test "X$dir" = "X$file" && dir=.
-
-	if test -f "$dir/$objdir/$dlname"; then
-	  dir="$dir/$objdir"
-	else
-	  if test ! -f "$dir/$dlname"; then
-	    $echo "$modename: cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" 1>&2
-	    exit $EXIT_FAILURE
-	  fi
-	fi
-	;;
-
-      *.lo)
-	# Just add the directory containing the .lo file.
-	dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`
-	test "X$dir" = "X$file" && dir=.
-	;;
-
-      *)
-	$echo "$modename: warning \`-dlopen' is ignored for non-libtool libraries and objects" 1>&2
-	continue
-	;;
-      esac
-
-      # Get the absolute pathname.
-      absdir=`cd "$dir" && pwd`
-      test -n "$absdir" && dir="$absdir"
-
-      # Now add the directory to shlibpath_var.
-      if eval "test -z \"\$$shlibpath_var\""; then
-	eval "$shlibpath_var=\"\$dir\""
-      else
-	eval "$shlibpath_var=\"\$dir:\$$shlibpath_var\""
-      fi
-    done
-
-    # This variable tells wrapper scripts just to set shlibpath_var
-    # rather than running their programs.
-    libtool_execute_magic="$magic"
-
-    # Check if any of the arguments is a wrapper script.
-    args=
-    for file
-    do
-      case $file in
-      -*) ;;
-      *)
-	# Do a test to see if this is really a libtool program.
-	if (${SED} -e '4q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
-	  # If there is no directory component, then add one.
-	  case $file in
-	  */* | *\\*) . $file ;;
-	  *) . ./$file ;;
-	  esac
-
-	  # Transform arg to wrapped name.
-	  file="$progdir/$program"
-	fi
-	;;
-      esac
-      # Quote arguments (to preserve shell metacharacters).
-      file=`$echo "X$file" | $Xsed -e "$sed_quote_subst"`
-      args="$args \"$file\""
-    done
-
-    if test -z "$run"; then
-      if test -n "$shlibpath_var"; then
-	# Export the shlibpath_var.
-	eval "export $shlibpath_var"
-      fi
-
-      # Restore saved environment variables
-      for lt_var in LANG LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES
-      do
-	eval "if test \"\${save_$lt_var+set}\" = set; then
-		$lt_var=\$save_$lt_var; export $lt_var
-	      else
-		$lt_unset $lt_var
-	      fi"
-      done
-
-      # Now prepare to actually exec the command.
-      exec_cmd="\$cmd$args"
-    else
-      # Display what would be done.
-      if test -n "$shlibpath_var"; then
-	eval "\$echo \"\$shlibpath_var=\$$shlibpath_var\""
-	$echo "export $shlibpath_var"
-      fi
-      $echo "$cmd$args"
-      exit $EXIT_SUCCESS
-    fi
-    ;;
-
-  # libtool clean and uninstall mode
-  clean | uninstall)
-    modename="$modename: $mode"
-    rm="$nonopt"
-    files=
-    rmforce=
-    exit_status=0
-
-    # This variable tells wrapper scripts just to set variables rather
-    # than running their programs.
-    libtool_install_magic="$magic"
-
-    for arg
-    do
-      case $arg in
-      -f) rm="$rm $arg"; rmforce=yes ;;
-      -*) rm="$rm $arg" ;;
-      *) files="$files $arg" ;;
-      esac
-    done
-
-    if test -z "$rm"; then
-      $echo "$modename: you must specify an RM program" 1>&2
-      $echo "$help" 1>&2
-      exit $EXIT_FAILURE
-    fi
-
-    rmdirs=
-
-    origobjdir="$objdir"
-    for file in $files; do
-      dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`
-      if test "X$dir" = "X$file"; then
-	dir=.
-	objdir="$origobjdir"
-      else
-	objdir="$dir/$origobjdir"
-      fi
-      name=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
-      test "$mode" = uninstall && objdir="$dir"
-
-      # Remember objdir for removal later, being careful to avoid duplicates
-      if test "$mode" = clean; then
-	case " $rmdirs " in
-	  *" $objdir "*) ;;
-	  *) rmdirs="$rmdirs $objdir" ;;
-	esac
-      fi
-
-      # Don't error if the file doesn't exist and rm -f was used.
-      if (test -L "$file") >/dev/null 2>&1 \
-	|| (test -h "$file") >/dev/null 2>&1 \
-	|| test -f "$file"; then
-	:
-      elif test -d "$file"; then
-	exit_status=1
-	continue
-      elif test "$rmforce" = yes; then
-	continue
-      fi
-
-      rmfiles="$file"
-
-      case $name in
-      *.la)
-	# Possibly a libtool archive, so verify it.
-	if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
-	  . $dir/$name
-
-	  # Delete the libtool libraries and symlinks.
-	  for n in $library_names; do
-	    rmfiles="$rmfiles $objdir/$n"
-	  done
-	  test -n "$old_library" && rmfiles="$rmfiles $objdir/$old_library"
-
-	  case "$mode" in
-	  clean)
-	    case "  $library_names " in
-	    # "  " in the beginning catches empty $dlname
-	    *" $dlname "*) ;;
-	    *) rmfiles="$rmfiles $objdir/$dlname" ;;
-	    esac
-	     test -n "$libdir" && rmfiles="$rmfiles $objdir/$name $objdir/${name}i"
-	    ;;
-	  uninstall)
-	    if test -n "$library_names"; then
-	      # Do each command in the postuninstall commands.
-	      cmds=$postuninstall_cmds
-	      save_ifs="$IFS"; IFS='~'
-	      for cmd in $cmds; do
-		IFS="$save_ifs"
-		eval cmd=\"$cmd\"
-		$show "$cmd"
-		$run eval "$cmd"
-		if test "$?" -ne 0 && test "$rmforce" != yes; then
-		  exit_status=1
-		fi
-	      done
-	      IFS="$save_ifs"
-	    fi
-
-	    if test -n "$old_library"; then
-	      # Do each command in the old_postuninstall commands.
-	      cmds=$old_postuninstall_cmds
-	      save_ifs="$IFS"; IFS='~'
-	      for cmd in $cmds; do
-		IFS="$save_ifs"
-		eval cmd=\"$cmd\"
-		$show "$cmd"
-		$run eval "$cmd"
-		if test "$?" -ne 0 && test "$rmforce" != yes; then
-		  exit_status=1
-		fi
-	      done
-	      IFS="$save_ifs"
-	    fi
-	    # FIXME: should reinstall the best remaining shared library.
-	    ;;
-	  esac
-	fi
-	;;
-
-      *.lo)
-	# Possibly a libtool object, so verify it.
-	if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
-
-	  # Read the .lo file
-	  . $dir/$name
-
-	  # Add PIC object to the list of files to remove.
-	  if test -n "$pic_object" \
-	     && test "$pic_object" != none; then
-	    rmfiles="$rmfiles $dir/$pic_object"
-	  fi
-
-	  # Add non-PIC object to the list of files to remove.
-	  if test -n "$non_pic_object" \
-	     && test "$non_pic_object" != none; then
-	    rmfiles="$rmfiles $dir/$non_pic_object"
-	  fi
-	fi
-	;;
-
-      *)
-	if test "$mode" = clean ; then
-	  noexename=$name
-	  case $file in
-	  *.exe)
-	    file=`$echo $file|${SED} 's,.exe$,,'`
-	    noexename=`$echo $name|${SED} 's,.exe$,,'`
-	    # $file with .exe has already been added to rmfiles,
-	    # add $file without .exe
-	    rmfiles="$rmfiles $file"
-	    ;;
-	  esac
-	  # Do a test to see if this is a libtool program.
-	  if (${SED} -e '4q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
-	    relink_command=
-	    . $dir/$noexename
-
-	    # note $name still contains .exe if it was in $file originally
-	    # as does the version of $file that was added into $rmfiles
-	    rmfiles="$rmfiles $objdir/$name $objdir/${name}S.${objext}"
-	    if test "$fast_install" = yes && test -n "$relink_command"; then
-	      rmfiles="$rmfiles $objdir/lt-$name"
-	    fi
-	    if test "X$noexename" != "X$name" ; then
-	      rmfiles="$rmfiles $objdir/lt-${noexename}.c"
-	    fi
-	  fi
-	fi
-	;;
-      esac
-      $show "$rm $rmfiles"
-      $run $rm $rmfiles || exit_status=1
-    done
-    objdir="$origobjdir"
-
-    # Try to remove the ${objdir}s in the directories where we deleted files
-    for dir in $rmdirs; do
-      if test -d "$dir"; then
-	$show "rmdir $dir"
-	$run rmdir $dir >/dev/null 2>&1
-      fi
-    done
-
-    exit $exit_status
-    ;;
-
-  "")
-    $echo "$modename: you must specify a MODE" 1>&2
-    $echo "$generic_help" 1>&2
-    exit $EXIT_FAILURE
-    ;;
-  esac
-
-  if test -z "$exec_cmd"; then
-    $echo "$modename: invalid operation mode \`$mode'" 1>&2
-    $echo "$generic_help" 1>&2
-    exit $EXIT_FAILURE
-  fi
-fi # test -z "$show_help"
-
-if test -n "$exec_cmd"; then
-  eval exec $exec_cmd
-  exit $EXIT_FAILURE
-fi
-
-# We need to display help for each of the modes.
-case $mode in
-"") $echo \
-"Usage: $modename [OPTION]... [MODE-ARG]...
-
-Provide generalized library-building support services.
-
-    --config          show all configuration variables
-    --debug           enable verbose shell tracing
--n, --dry-run         display commands without modifying any files
-    --features        display basic configuration information and exit
-    --finish          same as \`--mode=finish'
-    --help            display this help message and exit
-    --mode=MODE       use operation mode MODE [default=inferred from MODE-ARGS]
-    --quiet           same as \`--silent'
-    --silent          don't print informational messages
-    --tag=TAG         use configuration variables from tag TAG
-    --version         print version information
-
-MODE must be one of the following:
-
-      clean           remove files from the build directory
-      compile         compile a source file into a libtool object
-      execute         automatically set library path, then run a program
-      finish          complete the installation of libtool libraries
-      install         install libraries or executables
-      link            create a library or an executable
-      uninstall       remove libraries from an installed directory
-
-MODE-ARGS vary depending on the MODE.  Try \`$modename --help --mode=MODE' for
-a more detailed description of MODE.
-
-Report bugs to <bug-libtool@gnu.org>."
-  exit $EXIT_SUCCESS
-  ;;
-
-clean)
-  $echo \
-"Usage: $modename [OPTION]... --mode=clean RM [RM-OPTION]... FILE...
-
-Remove files from the build directory.
-
-RM is the name of the program to use to delete files associated with each FILE
-(typically \`/bin/rm').  RM-OPTIONS are options (such as \`-f') to be passed
-to RM.
-
-If FILE is a libtool library, object or program, all the files associated
-with it are deleted. Otherwise, only FILE itself is deleted using RM."
-  ;;
-
-compile)
-  $echo \
-"Usage: $modename [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE
-
-Compile a source file into a libtool library object.
-
-This mode accepts the following additional options:
-
-  -o OUTPUT-FILE    set the output file name to OUTPUT-FILE
-  -prefer-pic       try to building PIC objects only
-  -prefer-non-pic   try to building non-PIC objects only
-  -static           always build a \`.o' file suitable for static linking
-
-COMPILE-COMMAND is a command to be used in creating a \`standard' object file
-from the given SOURCEFILE.
-
-The output file name is determined by removing the directory component from
-SOURCEFILE, then substituting the C source code suffix \`.c' with the
-library object suffix, \`.lo'."
-  ;;
-
-execute)
-  $echo \
-"Usage: $modename [OPTION]... --mode=execute COMMAND [ARGS]...
-
-Automatically set library path, then run a program.
-
-This mode accepts the following additional options:
-
-  -dlopen FILE      add the directory containing FILE to the library path
-
-This mode sets the library path environment variable according to \`-dlopen'
-flags.
-
-If any of the ARGS are libtool executable wrappers, then they are translated
-into their corresponding uninstalled binary, and any of their required library
-directories are added to the library path.
-
-Then, COMMAND is executed, with ARGS as arguments."
-  ;;
-
-finish)
-  $echo \
-"Usage: $modename [OPTION]... --mode=finish [LIBDIR]...
-
-Complete the installation of libtool libraries.
-
-Each LIBDIR is a directory that contains libtool libraries.
-
-The commands that this mode executes may require superuser privileges.  Use
-the \`--dry-run' option if you just want to see what would be executed."
-  ;;
-
-install)
-  $echo \
-"Usage: $modename [OPTION]... --mode=install INSTALL-COMMAND...
-
-Install executables or libraries.
-
-INSTALL-COMMAND is the installation command.  The first component should be
-either the \`install' or \`cp' program.
-
-The rest of the components are interpreted as arguments to that command (only
-BSD-compatible install options are recognized)."
-  ;;
-
-link)
-  $echo \
-"Usage: $modename [OPTION]... --mode=link LINK-COMMAND...
-
-Link object files or libraries together to form another library, or to
-create an executable program.
-
-LINK-COMMAND is a command using the C compiler that you would use to create
-a program from several object files.
-
-The following components of LINK-COMMAND are treated specially:
-
-  -all-static       do not do any dynamic linking at all
-  -avoid-version    do not add a version suffix if possible
-  -dlopen FILE      \`-dlpreopen' FILE if it cannot be dlopened at runtime
-  -dlpreopen FILE   link in FILE and add its symbols to lt_preloaded_symbols
-  -export-dynamic   allow symbols from OUTPUT-FILE to be resolved with dlsym(3)
-  -export-symbols SYMFILE
-                    try to export only the symbols listed in SYMFILE
-  -export-symbols-regex REGEX
-                    try to export only the symbols matching REGEX
-  -LLIBDIR          search LIBDIR for required installed libraries
-  -lNAME            OUTPUT-FILE requires the installed library libNAME
-  -module           build a library that can dlopened
-  -no-fast-install  disable the fast-install mode
-  -no-install       link a not-installable executable
-  -no-undefined     declare that a library does not refer to external symbols
-  -o OUTPUT-FILE    create OUTPUT-FILE from the specified objects
-  -objectlist FILE  Use a list of object files found in FILE to specify objects
-  -precious-files-regex REGEX
-                    don't remove output files matching REGEX
-  -release RELEASE  specify package release information
-  -rpath LIBDIR     the created library will eventually be installed in LIBDIR
-  -R[ ]LIBDIR       add LIBDIR to the runtime path of programs and libraries
-  -static           do not do any dynamic linking of uninstalled libtool libraries
-  -static-libtool-libs
-                    do not do any dynamic linking of libtool libraries
-  -version-info CURRENT[:REVISION[:AGE]]
-                    specify library version info [each variable defaults to 0]
-
-All other options (arguments beginning with \`-') are ignored.
-
-Every other argument is treated as a filename.  Files ending in \`.la' are
-treated as uninstalled libtool libraries, other files are standard or library
-object files.
-
-If the OUTPUT-FILE ends in \`.la', then a libtool library is created,
-only library objects (\`.lo' files) may be specified, and \`-rpath' is
-required, except when creating a convenience library.
-
-If OUTPUT-FILE ends in \`.a' or \`.lib', then a standard library is created
-using \`ar' and \`ranlib', or on Windows using \`lib'.
-
-If OUTPUT-FILE ends in \`.lo' or \`.${objext}', then a reloadable object file
-is created, otherwise an executable program is created."
-  ;;
-
-uninstall)
-  $echo \
-"Usage: $modename [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE...
-
-Remove libraries from an installation directory.
-
-RM is the name of the program to use to delete files associated with each FILE
-(typically \`/bin/rm').  RM-OPTIONS are options (such as \`-f') to be passed
-to RM.
-
-If FILE is a libtool library, all the files associated with it are deleted.
-Otherwise, only FILE itself is deleted using RM."
-  ;;
-
-*)
-  $echo "$modename: invalid operation mode \`$mode'" 1>&2
-  $echo "$help" 1>&2
-  exit $EXIT_FAILURE
-  ;;
-esac
-
-$echo
-$echo "Try \`$modename --help' for more information about other modes."
-
-exit $?
-
-# The TAGs below are defined such that we never get into a situation
-# in which we disable both kinds of libraries.  Given conflicting
-# choices, we go for a static library, that is the most portable,
-# since we can't tell whether shared libraries were disabled because
-# the user asked for that or because the platform doesn't support
-# them.  This is particularly important on AIX, because we don't
-# support having both static and shared libraries enabled at the same
-# time on that platform, so we default to a shared-only configuration.
-# If a disable-shared tag is given, we'll fallback to a static-only
-# configuration.  But we'll never go from static-only to shared-only.
-
-# ### BEGIN LIBTOOL TAG CONFIG: disable-shared
-disable_libs=shared
-# ### END LIBTOOL TAG CONFIG: disable-shared
-
-# ### BEGIN LIBTOOL TAG CONFIG: disable-static
-disable_libs=static
-# ### END LIBTOOL TAG CONFIG: disable-static
-
-# Local Variables:
-# mode:shell-script
-# sh-indentation:2
-# End:
diff --git a/myserver/m4/gnome-pthread-check.m4 b/myserver/m4/gnome-pthread-check.m4
deleted file mode 100644
index eb6f739..0000000
--- a/myserver/m4/gnome-pthread-check.m4
+++ /dev/null
@@ -1,17 +0,0 @@
-# Barrowed from gnome for use with MyServer
-dnl
-dnl And better, use gthreads instead...
-dnl
-
-AC_DEFUN([GNOME_PTHREAD_CHECK],[
-        PTHREAD_LIB=""
-        AC_CHECK_LIB(pthread, pthread_create, PTHREAD_LIB="-lpthread",
-                [AC_CHECK_LIB(pthreads, pthread_create, PTHREAD_LIB="-lpthreads",
-                    [AC_CHECK_LIB(c_r, pthread_create, PTHREAD_LIB="-lc_r",
-                        [AC_CHECK_FUNC(pthread_create)]
-                    )]
-                )]
-        )
-        AC_SUBST(PTHREAD_LIB)
-        AC_PROVIDE([GNOME_PTHREAD_CHECK])
-])
diff --git a/myserver/m4/iconv.m4 b/myserver/m4/iconv.m4
deleted file mode 100644
index 66bc76f..0000000
--- a/myserver/m4/iconv.m4
+++ /dev/null
@@ -1,180 +0,0 @@
-# iconv.m4 serial AM6 (gettext-0.17)
-dnl Copyright (C) 2000-2002, 2007 Free Software Foundation, Inc.
-dnl This file is free software; the Free Software Foundation
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-
-dnl From Bruno Haible.
-
-AC_DEFUN([AM_ICONV_LINKFLAGS_BODY],
-[
-  dnl Prerequisites of AC_LIB_LINKFLAGS_BODY.
-  AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
-  AC_REQUIRE([AC_LIB_RPATH])
-
-  dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV
-  dnl accordingly.
-  AC_LIB_LINKFLAGS_BODY([iconv])
-])
-
-AC_DEFUN([AM_ICONV_LINK],
-[
-  dnl Some systems have iconv in libc, some have it in libiconv (OSF/1 and
-  dnl those with the standalone portable GNU libiconv installed).
-  AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
-
-  dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV
-  dnl accordingly.
-  AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY])
-
-  dnl Add $INCICONV to CPPFLAGS before performing the following checks,
-  dnl because if the user has installed libiconv and not disabled its use
-  dnl via --without-libiconv-prefix, he wants to use it. The first
-  dnl AC_TRY_LINK will then fail, the second AC_TRY_LINK will succeed.
-  am_save_CPPFLAGS="$CPPFLAGS"
-  AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCICONV])
-
-  AC_CACHE_CHECK([for iconv], am_cv_func_iconv, [
-    am_cv_func_iconv="no, consider installing GNU libiconv"
-    am_cv_lib_iconv=no
-    AC_TRY_LINK([#include <stdlib.h>
-#include <iconv.h>],
-      [iconv_t cd = iconv_open("","");
-       iconv(cd,NULL,NULL,NULL,NULL);
-       iconv_close(cd);],
-      am_cv_func_iconv=yes)
-    if test "$am_cv_func_iconv" != yes; then
-      am_save_LIBS="$LIBS"
-      LIBS="$LIBS $LIBICONV"
-      AC_TRY_LINK([#include <stdlib.h>
-#include <iconv.h>],
-        [iconv_t cd = iconv_open("","");
-         iconv(cd,NULL,NULL,NULL,NULL);
-         iconv_close(cd);],
-        am_cv_lib_iconv=yes
-        am_cv_func_iconv=yes)
-      LIBS="$am_save_LIBS"
-    fi
-  ])
-  if test "$am_cv_func_iconv" = yes; then
-    AC_CACHE_CHECK([for working iconv], am_cv_func_iconv_works, [
-      dnl This tests against bugs in AIX 5.1 and HP-UX 11.11.
-      am_save_LIBS="$LIBS"
-      if test $am_cv_lib_iconv = yes; then
-        LIBS="$LIBS $LIBICONV"
-      fi
-      AC_TRY_RUN([
-#include <iconv.h>
-#include <string.h>
-int main ()
-{
-  /* Test against AIX 5.1 bug: Failures are not distinguishable from successful
-     returns.  */
-  {
-    iconv_t cd_utf8_to_88591 = iconv_open ("ISO8859-1", "UTF-8");
-    if (cd_utf8_to_88591 != (iconv_t)(-1))
-      {
-        static const char input[] = "\342\202\254"; /* EURO SIGN */
-        char buf[10];
-        const char *inptr = input;
-        size_t inbytesleft = strlen (input);
-        char *outptr = buf;
-        size_t outbytesleft = sizeof (buf);
-        size_t res = iconv (cd_utf8_to_88591,
-                            (char **) &inptr, &inbytesleft,
-                            &outptr, &outbytesleft);
-        if (res == 0)
-          return 1;
-      }
-  }
-#if 0 /* This bug could be worked around by the caller.  */
-  /* Test against HP-UX 11.11 bug: Positive return value instead of 0.  */
-  {
-    iconv_t cd_88591_to_utf8 = iconv_open ("utf8", "iso88591");
-    if (cd_88591_to_utf8 != (iconv_t)(-1))
-      {
-        static const char input[] = "\304rger mit b\366sen B\374bchen ohne Augenma\337";
-        char buf[50];
-        const char *inptr = input;
-        size_t inbytesleft = strlen (input);
-        char *outptr = buf;
-        size_t outbytesleft = sizeof (buf);
-        size_t res = iconv (cd_88591_to_utf8,
-                            (char **) &inptr, &inbytesleft,
-                            &outptr, &outbytesleft);
-        if ((int)res > 0)
-          return 1;
-      }
-  }
-#endif
-  /* Test against HP-UX 11.11 bug: No converter from EUC-JP to UTF-8 is
-     provided.  */
-  if (/* Try standardized names.  */
-      iconv_open ("UTF-8", "EUC-JP") == (iconv_t)(-1)
-      /* Try IRIX, OSF/1 names.  */
-      && iconv_open ("UTF-8", "eucJP") == (iconv_t)(-1)
-      /* Try AIX names.  */
-      && iconv_open ("UTF-8", "IBM-eucJP") == (iconv_t)(-1)
-      /* Try HP-UX names.  */
-      && iconv_open ("utf8", "eucJP") == (iconv_t)(-1))
-    return 1;
-  return 0;
-}], [am_cv_func_iconv_works=yes], [am_cv_func_iconv_works=no],
-        [case "$host_os" in
-           aix* | hpux*) am_cv_func_iconv_works="guessing no" ;;
-           *)            am_cv_func_iconv_works="guessing yes" ;;
-         esac])
-      LIBS="$am_save_LIBS"
-    ])
-    case "$am_cv_func_iconv_works" in
-      *no) am_func_iconv=no am_cv_lib_iconv=no ;;
-      *)   am_func_iconv=yes ;;
-    esac
-  else
-    am_func_iconv=no am_cv_lib_iconv=no
-  fi
-  if test "$am_func_iconv" = yes; then
-    AC_DEFINE(HAVE_ICONV, 1,
-      [Define if you have the iconv() function and it works.])
-  fi
-  if test "$am_cv_lib_iconv" = yes; then
-    AC_MSG_CHECKING([how to link with libiconv])
-    AC_MSG_RESULT([$LIBICONV])
-  else
-    dnl If $LIBICONV didn't lead to a usable library, we don't need $INCICONV
-    dnl either.
-    CPPFLAGS="$am_save_CPPFLAGS"
-    LIBICONV=
-    LTLIBICONV=
-  fi
-  AC_SUBST(LIBICONV)
-  AC_SUBST(LTLIBICONV)
-])
-
-AC_DEFUN([AM_ICONV],
-[
-  AM_ICONV_LINK
-  if test "$am_cv_func_iconv" = yes; then
-    AC_MSG_CHECKING([for iconv declaration])
-    AC_CACHE_VAL(am_cv_proto_iconv, [
-      AC_TRY_COMPILE([
-#include <stdlib.h>
-#include <iconv.h>
-extern
-#ifdef __cplusplus
-"C"
-#endif
-#if defined(__STDC__) || defined(__cplusplus)
-size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
-#else
-size_t iconv();
-#endif
-], [], am_cv_proto_iconv_arg1="", am_cv_proto_iconv_arg1="const")
-      am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);"])
-    am_cv_proto_iconv=`echo "[$]am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
-    AC_MSG_RESULT([$]{ac_t:-
-         }[$]am_cv_proto_iconv)
-    AC_DEFINE_UNQUOTED(ICONV_CONST, $am_cv_proto_iconv_arg1,
-      [Define as const if the declaration of iconv() needs const.])
-  fi
-])
diff --git a/myserver/m4/lib-ld.m4 b/myserver/m4/lib-ld.m4
deleted file mode 100644
index 96c4e2c..0000000
--- a/myserver/m4/lib-ld.m4
+++ /dev/null
@@ -1,110 +0,0 @@
-# lib-ld.m4 serial 3 (gettext-0.13)
-dnl Copyright (C) 1996-2003 Free Software Foundation, Inc.
-dnl This file is free software; the Free Software Foundation
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-
-dnl Subroutines of libtool.m4,
-dnl with replacements s/AC_/AC_LIB/ and s/lt_cv/acl_cv/ to avoid collision
-dnl with libtool.m4.
-
-dnl From libtool-1.4. Sets the variable with_gnu_ld to yes or no.
-AC_DEFUN([AC_LIB_PROG_LD_GNU],
-[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], acl_cv_prog_gnu_ld,
-[# I'd rather use --version here, but apparently some GNU ld's only accept -v.
-case `$LD -v 2>&1 </dev/null` in
-*GNU* | *'with BFD'*)
-  acl_cv_prog_gnu_ld=yes ;;
-*)
-  acl_cv_prog_gnu_ld=no ;;
-esac])
-with_gnu_ld=$acl_cv_prog_gnu_ld
-])
-
-dnl From libtool-1.4. Sets the variable LD.
-AC_DEFUN([AC_LIB_PROG_LD],
-[AC_ARG_WITH(gnu-ld,
-[  --with-gnu-ld           assume the C compiler uses GNU ld [default=no]],
-test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
-AC_REQUIRE([AC_PROG_CC])dnl
-AC_REQUIRE([AC_CANONICAL_HOST])dnl
-# Prepare PATH_SEPARATOR.
-# 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
-ac_prog=ld
-if test "$GCC" = yes; then
-  # Check if gcc -print-prog-name=ld gives a path.
-  AC_MSG_CHECKING([for ld used by GCC])
-  case $host in
-  *-*-mingw*)
-    # gcc leaves a trailing carriage return which upsets mingw
-    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
-  *)
-    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
-  esac
-  case $ac_prog in
-    # Accept absolute paths.
-    [[\\/]* | [A-Za-z]:[\\/]*)]
-      [re_direlt='/[^/][^/]*/\.\./']
-      # Canonicalize the path of ld
-      ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
-      while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
-	ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
-      done
-      test -z "$LD" && LD="$ac_prog"
-      ;;
-  "")
-    # If it fails, then pretend we aren't using GCC.
-    ac_prog=ld
-    ;;
-  *)
-    # If it is relative, then search for the first ld in PATH.
-    with_gnu_ld=unknown
-    ;;
-  esac
-elif test "$with_gnu_ld" = yes; then
-  AC_MSG_CHECKING([for GNU ld])
-else
-  AC_MSG_CHECKING([for non-GNU ld])
-fi
-AC_CACHE_VAL(acl_cv_path_LD,
-[if test -z "$LD"; then
-  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
-  for ac_dir in $PATH; do
-    test -z "$ac_dir" && ac_dir=.
-    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
-      acl_cv_path_LD="$ac_dir/$ac_prog"
-      # Check to see if the program is GNU ld.  I'd rather use --version,
-      # but apparently some GNU ld's only accept -v.
-      # Break only if it was the GNU/non-GNU ld that we prefer.
-      case `"$acl_cv_path_LD" -v 2>&1 < /dev/null` in
-      *GNU* | *'with BFD'*)
-	test "$with_gnu_ld" != no && break ;;
-      *)
-	test "$with_gnu_ld" != yes && break ;;
-      esac
-    fi
-  done
-  IFS="$ac_save_ifs"
-else
-  acl_cv_path_LD="$LD" # Let the user override the test with a path.
-fi])
-LD="$acl_cv_path_LD"
-if test -n "$LD"; then
-  AC_MSG_RESULT($LD)
-else
-  AC_MSG_RESULT(no)
-fi
-test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
-AC_LIB_PROG_LD_GNU
-])
diff --git a/myserver/m4/lib-link.m4 b/myserver/m4/lib-link.m4
deleted file mode 100644
index e3d26fc..0000000
--- a/myserver/m4/lib-link.m4
+++ /dev/null
@@ -1,709 +0,0 @@
-# lib-link.m4 serial 13 (gettext-0.17)
-dnl Copyright (C) 2001-2007 Free Software Foundation, Inc.
-dnl This file is free software; the Free Software Foundation
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-
-dnl From Bruno Haible.
-
-AC_PREREQ(2.54)
-
-dnl AC_LIB_LINKFLAGS(name [, dependencies]) searches for libname and
-dnl the libraries corresponding to explicit and implicit dependencies.
-dnl Sets and AC_SUBSTs the LIB${NAME} and LTLIB${NAME} variables and
-dnl augments the CPPFLAGS variable.
-dnl Sets and AC_SUBSTs the LIB${NAME}_PREFIX variable to nonempty if libname
-dnl was found in ${LIB${NAME}_PREFIX}/$acl_libdirstem.
-AC_DEFUN([AC_LIB_LINKFLAGS],
-[
-  AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
-  AC_REQUIRE([AC_LIB_RPATH])
-  define([Name],[translit([$1],[./-], [___])])
-  define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
-                               [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
-  AC_CACHE_CHECK([how to link with lib[]$1], [ac_cv_lib[]Name[]_libs], [
-    AC_LIB_LINKFLAGS_BODY([$1], [$2])
-    ac_cv_lib[]Name[]_libs="$LIB[]NAME"
-    ac_cv_lib[]Name[]_ltlibs="$LTLIB[]NAME"
-    ac_cv_lib[]Name[]_cppflags="$INC[]NAME"
-    ac_cv_lib[]Name[]_prefix="$LIB[]NAME[]_PREFIX"
-  ])
-  LIB[]NAME="$ac_cv_lib[]Name[]_libs"
-  LTLIB[]NAME="$ac_cv_lib[]Name[]_ltlibs"
-  INC[]NAME="$ac_cv_lib[]Name[]_cppflags"
-  LIB[]NAME[]_PREFIX="$ac_cv_lib[]Name[]_prefix"
-  AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
-  AC_SUBST([LIB]NAME)
-  AC_SUBST([LTLIB]NAME)
-  AC_SUBST([LIB]NAME[_PREFIX])
-  dnl Also set HAVE_LIB[]NAME so that AC_LIB_HAVE_LINKFLAGS can reuse the
-  dnl results of this search when this library appears as a dependency.
-  HAVE_LIB[]NAME=yes
-  undefine([Name])
-  undefine([NAME])
-])
-
-dnl AC_LIB_HAVE_LINKFLAGS(name, dependencies, includes, testcode)
-dnl searches for libname and the libraries corresponding to explicit and
-dnl implicit dependencies, together with the specified include files and
-dnl the ability to compile and link the specified testcode. If found, it
-dnl sets and AC_SUBSTs HAVE_LIB${NAME}=yes and the LIB${NAME} and
-dnl LTLIB${NAME} variables and augments the CPPFLAGS variable, and
-dnl #defines HAVE_LIB${NAME} to 1. Otherwise, it sets and AC_SUBSTs
-dnl HAVE_LIB${NAME}=no and LIB${NAME} and LTLIB${NAME} to empty.
-dnl Sets and AC_SUBSTs the LIB${NAME}_PREFIX variable to nonempty if libname
-dnl was found in ${LIB${NAME}_PREFIX}/$acl_libdirstem.
-AC_DEFUN([AC_LIB_HAVE_LINKFLAGS],
-[
-  AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
-  AC_REQUIRE([AC_LIB_RPATH])
-  define([Name],[translit([$1],[./-], [___])])
-  define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
-                               [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
-
-  dnl Search for lib[]Name and define LIB[]NAME, LTLIB[]NAME and INC[]NAME
-  dnl accordingly.
-  AC_LIB_LINKFLAGS_BODY([$1], [$2])
-
-  dnl Add $INC[]NAME to CPPFLAGS before performing the following checks,
-  dnl because if the user has installed lib[]Name and not disabled its use
-  dnl via --without-lib[]Name-prefix, he wants to use it.
-  ac_save_CPPFLAGS="$CPPFLAGS"
-  AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
-
-  AC_CACHE_CHECK([for lib[]$1], [ac_cv_lib[]Name], [
-    ac_save_LIBS="$LIBS"
-    LIBS="$LIBS $LIB[]NAME"
-    AC_TRY_LINK([$3], [$4], [ac_cv_lib[]Name=yes], [ac_cv_lib[]Name=no])
-    LIBS="$ac_save_LIBS"
-  ])
-  if test "$ac_cv_lib[]Name" = yes; then
-    HAVE_LIB[]NAME=yes
-    AC_DEFINE([HAVE_LIB]NAME, 1, [Define if you have the $1 library.])
-    AC_MSG_CHECKING([how to link with lib[]$1])
-    AC_MSG_RESULT([$LIB[]NAME])
-  else
-    HAVE_LIB[]NAME=no
-    dnl If $LIB[]NAME didn't lead to a usable library, we don't need
-    dnl $INC[]NAME either.
-    CPPFLAGS="$ac_save_CPPFLAGS"
-    LIB[]NAME=
-    LTLIB[]NAME=
-    LIB[]NAME[]_PREFIX=
-  fi
-  AC_SUBST([HAVE_LIB]NAME)
-  AC_SUBST([LIB]NAME)
-  AC_SUBST([LTLIB]NAME)
-  AC_SUBST([LIB]NAME[_PREFIX])
-  undefine([Name])
-  undefine([NAME])
-])
-
-dnl Determine the platform dependent parameters needed to use rpath:
-dnl   acl_libext,
-dnl   acl_shlibext,
-dnl   acl_hardcode_libdir_flag_spec,
-dnl   acl_hardcode_libdir_separator,
-dnl   acl_hardcode_direct,
-dnl   acl_hardcode_minus_L.
-AC_DEFUN([AC_LIB_RPATH],
-[
-  dnl Tell automake >= 1.10 to complain if config.rpath is missing.
-  m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([config.rpath])])
-  AC_REQUIRE([AC_PROG_CC])                dnl we use $CC, $GCC, $LDFLAGS
-  AC_REQUIRE([AC_LIB_PROG_LD])            dnl we use $LD, $with_gnu_ld
-  AC_REQUIRE([AC_CANONICAL_HOST])         dnl we use $host
-  AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT]) dnl we use $ac_aux_dir
-  AC_CACHE_CHECK([for shared library run path origin], acl_cv_rpath, [
-    CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
-    ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
-    . ./conftest.sh
-    rm -f ./conftest.sh
-    acl_cv_rpath=done
-  ])
-  wl="$acl_cv_wl"
-  acl_libext="$acl_cv_libext"
-  acl_shlibext="$acl_cv_shlibext"
-  acl_libname_spec="$acl_cv_libname_spec"
-  acl_library_names_spec="$acl_cv_library_names_spec"
-  acl_hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
-  acl_hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
-  acl_hardcode_direct="$acl_cv_hardcode_direct"
-  acl_hardcode_minus_L="$acl_cv_hardcode_minus_L"
-  dnl Determine whether the user wants rpath handling at all.
-  AC_ARG_ENABLE(rpath,
-    [  --disable-rpath         do not hardcode runtime library paths],
-    :, enable_rpath=yes)
-])
-
-dnl AC_LIB_LINKFLAGS_BODY(name [, dependencies]) searches for libname and
-dnl the libraries corresponding to explicit and implicit dependencies.
-dnl Sets the LIB${NAME}, LTLIB${NAME} and INC${NAME} variables.
-dnl Also, sets the LIB${NAME}_PREFIX variable to nonempty if libname was found
-dnl in ${LIB${NAME}_PREFIX}/$acl_libdirstem.
-AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
-[
-  AC_REQUIRE([AC_LIB_PREPARE_MULTILIB])
-  define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
-                               [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
-  dnl Autoconf >= 2.61 supports dots in --with options.
-  define([N_A_M_E],[m4_if(m4_version_compare(m4_defn([m4_PACKAGE_VERSION]),[2.61]),[-1],[translit([$1],[.],[_])],[$1])])
-  dnl By default, look in $includedir and $libdir.
-  use_additional=yes
-  AC_LIB_WITH_FINAL_PREFIX([
-    eval additional_includedir=\"$includedir\"
-    eval additional_libdir=\"$libdir\"
-  ])
-  AC_LIB_ARG_WITH([lib]N_A_M_E[-prefix],
-[  --with-lib]N_A_M_E[-prefix[=DIR]  search for lib$1 in DIR/include and DIR/lib
-  --without-lib]N_A_M_E[-prefix     don't search for lib$1 in includedir and libdir],
-[
-    if test "X$withval" = "Xno"; then
-      use_additional=no
-    else
-      if test "X$withval" = "X"; then
-        AC_LIB_WITH_FINAL_PREFIX([
-          eval additional_includedir=\"$includedir\"
-          eval additional_libdir=\"$libdir\"
-        ])
-      else
-        additional_includedir="$withval/include"
-        additional_libdir="$withval/$acl_libdirstem"
-      fi
-    fi
-])
-  dnl Search the library and its dependencies in $additional_libdir and
-  dnl $LDFLAGS. Using breadth-first-seach.
-  LIB[]NAME=
-  LTLIB[]NAME=
-  INC[]NAME=
-  LIB[]NAME[]_PREFIX=
-  rpathdirs=
-  ltrpathdirs=
-  names_already_handled=
-  names_next_round='$1 $2'
-  while test -n "$names_next_round"; do
-    names_this_round="$names_next_round"
-    names_next_round=
-    for name in $names_this_round; do
-      already_handled=
-      for n in $names_already_handled; do
-        if test "$n" = "$name"; then
-          already_handled=yes
-          break
-        fi
-      done
-      if test -z "$already_handled"; then
-        names_already_handled="$names_already_handled $name"
-        dnl See if it was already located by an earlier AC_LIB_LINKFLAGS
-        dnl or AC_LIB_HAVE_LINKFLAGS call.
-        uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
-        eval value=\"\$HAVE_LIB$uppername\"
-        if test -n "$value"; then
-          if test "$value" = yes; then
-            eval value=\"\$LIB$uppername\"
-            test -z "$value" || LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$value"
-            eval value=\"\$LTLIB$uppername\"
-            test -z "$value" || LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$value"
-          else
-            dnl An earlier call to AC_LIB_HAVE_LINKFLAGS has determined
-            dnl that this library doesn't exist. So just drop it.
-            :
-          fi
-        else
-          dnl Search the library lib$name in $additional_libdir and $LDFLAGS
-          dnl and the already constructed $LIBNAME/$LTLIBNAME.
-          found_dir=
-          found_la=
-          found_so=
-          found_a=
-          eval libname=\"$acl_libname_spec\"    # typically: libname=lib$name
-          if test -n "$acl_shlibext"; then
-            shrext=".$acl_shlibext"             # typically: shrext=.so
-          else
-            shrext=
-          fi
-          if test $use_additional = yes; then
-            dir="$additional_libdir"
-            dnl The same code as in the loop below:
-            dnl First look for a shared library.
-            if test -n "$acl_shlibext"; then
-              if test -f "$dir/$libname$shrext"; then
-                found_dir="$dir"
-                found_so="$dir/$libname$shrext"
-              else
-                if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
-                  ver=`(cd "$dir" && \
-                        for f in "$libname$shrext".*; do echo "$f"; done \
-                        | sed -e "s,^$libname$shrext\\\\.,," \
-                        | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
-                        | sed 1q ) 2>/dev/null`
-                  if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
-                    found_dir="$dir"
-                    found_so="$dir/$libname$shrext.$ver"
-                  fi
-                else
-                  eval library_names=\"$acl_library_names_spec\"
-                  for f in $library_names; do
-                    if test -f "$dir/$f"; then
-                      found_dir="$dir"
-                      found_so="$dir/$f"
-                      break
-                    fi
-                  done
-                fi
-              fi
-            fi
-            dnl Then look for a static library.
-            if test "X$found_dir" = "X"; then
-              if test -f "$dir/$libname.$acl_libext"; then
-                found_dir="$dir"
-                found_a="$dir/$libname.$acl_libext"
-              fi
-            fi
-            if test "X$found_dir" != "X"; then
-              if test -f "$dir/$libname.la"; then
-                found_la="$dir/$libname.la"
-              fi
-            fi
-          fi
-          if test "X$found_dir" = "X"; then
-            for x in $LDFLAGS $LTLIB[]NAME; do
-              AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
-              case "$x" in
-                -L*)
-                  dir=`echo "X$x" | sed -e 's/^X-L//'`
-                  dnl First look for a shared library.
-                  if test -n "$acl_shlibext"; then
-                    if test -f "$dir/$libname$shrext"; then
-                      found_dir="$dir"
-                      found_so="$dir/$libname$shrext"
-                    else
-                      if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
-                        ver=`(cd "$dir" && \
-                              for f in "$libname$shrext".*; do echo "$f"; done \
-                              | sed -e "s,^$libname$shrext\\\\.,," \
-                              | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
-                              | sed 1q ) 2>/dev/null`
-                        if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
-                          found_dir="$dir"
-                          found_so="$dir/$libname$shrext.$ver"
-                        fi
-                      else
-                        eval library_names=\"$acl_library_names_spec\"
-                        for f in $library_names; do
-                          if test -f "$dir/$f"; then
-                            found_dir="$dir"
-                            found_so="$dir/$f"
-                            break
-                          fi
-                        done
-                      fi
-                    fi
-                  fi
-                  dnl Then look for a static library.
-                  if test "X$found_dir" = "X"; then
-                    if test -f "$dir/$libname.$acl_libext"; then
-                      found_dir="$dir"
-                      found_a="$dir/$libname.$acl_libext"
-                    fi
-                  fi
-                  if test "X$found_dir" != "X"; then
-                    if test -f "$dir/$libname.la"; then
-                      found_la="$dir/$libname.la"
-                    fi
-                  fi
-                  ;;
-              esac
-              if test "X$found_dir" != "X"; then
-                break
-              fi
-            done
-          fi
-          if test "X$found_dir" != "X"; then
-            dnl Found the library.
-            LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$found_dir -l$name"
-            if test "X$found_so" != "X"; then
-              dnl Linking with a shared library. We attempt to hardcode its
-              dnl directory into the executable's runpath, unless it's the
-              dnl standard /usr/lib.
-              if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/$acl_libdirstem"; then
-                dnl No hardcoding is needed.
-                LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
-              else
-                dnl Use an explicit option to hardcode DIR into the resulting
-                dnl binary.
-                dnl Potentially add DIR to ltrpathdirs.
-                dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
-                haveit=
-                for x in $ltrpathdirs; do
-                  if test "X$x" = "X$found_dir"; then
-                    haveit=yes
-                    break
-                  fi
-                done
-                if test -z "$haveit"; then
-                  ltrpathdirs="$ltrpathdirs $found_dir"
-                fi
-                dnl The hardcoding into $LIBNAME is system dependent.
-                if test "$acl_hardcode_direct" = yes; then
-                  dnl Using DIR/libNAME.so during linking hardcodes DIR into the
-                  dnl resulting binary.
-                  LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
-                else
-                  if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
-                    dnl Use an explicit option to hardcode DIR into the resulting
-                    dnl binary.
-                    LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
-                    dnl Potentially add DIR to rpathdirs.
-                    dnl The rpathdirs will be appended to $LIBNAME at the end.
-                    haveit=
-                    for x in $rpathdirs; do
-                      if test "X$x" = "X$found_dir"; then
-                        haveit=yes
-                        break
-                      fi
-                    done
-                    if test -z "$haveit"; then
-                      rpathdirs="$rpathdirs $found_dir"
-                    fi
-                  else
-                    dnl Rely on "-L$found_dir".
-                    dnl But don't add it if it's already contained in the LDFLAGS
-                    dnl or the already constructed $LIBNAME
-                    haveit=
-                    for x in $LDFLAGS $LIB[]NAME; do
-                      AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
-                      if test "X$x" = "X-L$found_dir"; then
-                        haveit=yes
-                        break
-                      fi
-                    done
-                    if test -z "$haveit"; then
-                      LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir"
-                    fi
-                    if test "$acl_hardcode_minus_L" != no; then
-                      dnl FIXME: Not sure whether we should use
-                      dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
-                      dnl here.
-                      LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
-                    else
-                      dnl We cannot use $acl_hardcode_runpath_var and LD_RUN_PATH
-                      dnl here, because this doesn't fit in flags passed to the
-                      dnl compiler. So give up. No hardcoding. This affects only
-                      dnl very old systems.
-                      dnl FIXME: Not sure whether we should use
-                      dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
-                      dnl here.
-                      LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
-                    fi
-                  fi
-                fi
-              fi
-            else
-              if test "X$found_a" != "X"; then
-                dnl Linking with a static library.
-                LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_a"
-              else
-                dnl We shouldn't come here, but anyway it's good to have a
-                dnl fallback.
-                LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir -l$name"
-              fi
-            fi
-            dnl Assume the include files are nearby.
-            additional_includedir=
-            case "$found_dir" in
-              */$acl_libdirstem | */$acl_libdirstem/)
-                basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'`
-                LIB[]NAME[]_PREFIX="$basedir"
-                additional_includedir="$basedir/include"
-                ;;
-            esac
-            if test "X$additional_includedir" != "X"; then
-              dnl Potentially add $additional_includedir to $INCNAME.
-              dnl But don't add it
-              dnl   1. if it's the standard /usr/include,
-              dnl   2. if it's /usr/local/include and we are using GCC on Linux,
-              dnl   3. if it's already present in $CPPFLAGS or the already
-              dnl      constructed $INCNAME,
-              dnl   4. if it doesn't exist as a directory.
-              if test "X$additional_includedir" != "X/usr/include"; then
-                haveit=
-                if test "X$additional_includedir" = "X/usr/local/include"; then
-                  if test -n "$GCC"; then
-                    case $host_os in
-                      linux* | gnu* | k*bsd*-gnu) haveit=yes;;
-                    esac
-                  fi
-                fi
-                if test -z "$haveit"; then
-                  for x in $CPPFLAGS $INC[]NAME; do
-                    AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
-                    if test "X$x" = "X-I$additional_includedir"; then
-                      haveit=yes
-                      break
-                    fi
-                  done
-                  if test -z "$haveit"; then
-                    if test -d "$additional_includedir"; then
-                      dnl Really add $additional_includedir to $INCNAME.
-                      INC[]NAME="${INC[]NAME}${INC[]NAME:+ }-I$additional_includedir"
-                    fi
-                  fi
-                fi
-              fi
-            fi
-            dnl Look for dependencies.
-            if test -n "$found_la"; then
-              dnl Read the .la file. It defines the variables
-              dnl dlname, library_names, old_library, dependency_libs, current,
-              dnl age, revision, installed, dlopen, dlpreopen, libdir.
-              save_libdir="$libdir"
-              case "$found_la" in
-                */* | *\\*) . "$found_la" ;;
-                *) . "./$found_la" ;;
-              esac
-              libdir="$save_libdir"
-              dnl We use only dependency_libs.
-              for dep in $dependency_libs; do
-                case "$dep" in
-                  -L*)
-                    additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
-                    dnl Potentially add $additional_libdir to $LIBNAME and $LTLIBNAME.
-                    dnl But don't add it
-                    dnl   1. if it's the standard /usr/lib,
-                    dnl   2. if it's /usr/local/lib and we are using GCC on Linux,
-                    dnl   3. if it's already present in $LDFLAGS or the already
-                    dnl      constructed $LIBNAME,
-                    dnl   4. if it doesn't exist as a directory.
-                    if test "X$additional_libdir" != "X/usr/$acl_libdirstem"; then
-                      haveit=
-                      if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem"; then
-                        if test -n "$GCC"; then
-                          case $host_os in
-                            linux* | gnu* | k*bsd*-gnu) haveit=yes;;
-                          esac
-                        fi
-                      fi
-                      if test -z "$haveit"; then
-                        haveit=
-                        for x in $LDFLAGS $LIB[]NAME; do
-                          AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
-                          if test "X$x" = "X-L$additional_libdir"; then
-                            haveit=yes
-                            break
-                          fi
-                        done
-                        if test -z "$haveit"; then
-                          if test -d "$additional_libdir"; then
-                            dnl Really add $additional_libdir to $LIBNAME.
-                            LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$additional_libdir"
-                          fi
-                        fi
-                        haveit=
-                        for x in $LDFLAGS $LTLIB[]NAME; do
-                          AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
-                          if test "X$x" = "X-L$additional_libdir"; then
-                            haveit=yes
-                            break
-                          fi
-                        done
-                        if test -z "$haveit"; then
-                          if test -d "$additional_libdir"; then
-                            dnl Really add $additional_libdir to $LTLIBNAME.
-                            LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$additional_libdir"
-                          fi
-                        fi
-                      fi
-                    fi
-                    ;;
-                  -R*)
-                    dir=`echo "X$dep" | sed -e 's/^X-R//'`
-                    if test "$enable_rpath" != no; then
-                      dnl Potentially add DIR to rpathdirs.
-                      dnl The rpathdirs will be appended to $LIBNAME at the end.
-                      haveit=
-                      for x in $rpathdirs; do
-                        if test "X$x" = "X$dir"; then
-                          haveit=yes
-                          break
-                        fi
-                      done
-                      if test -z "$haveit"; then
-                        rpathdirs="$rpathdirs $dir"
-                      fi
-                      dnl Potentially add DIR to ltrpathdirs.
-                      dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
-                      haveit=
-                      for x in $ltrpathdirs; do
-                        if test "X$x" = "X$dir"; then
-                          haveit=yes
-                          break
-                        fi
-                      done
-                      if test -z "$haveit"; then
-                        ltrpathdirs="$ltrpathdirs $dir"
-                      fi
-                    fi
-                    ;;
-                  -l*)
-                    dnl Handle this in the next round.
-                    names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
-                    ;;
-                  *.la)
-                    dnl Handle this in the next round. Throw away the .la's
-                    dnl directory; it is already contained in a preceding -L
-                    dnl option.
-                    names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
-                    ;;
-                  *)
-                    dnl Most likely an immediate library name.
-                    LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$dep"
-                    LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$dep"
-                    ;;
-                esac
-              done
-            fi
-          else
-            dnl Didn't find the library; assume it is in the system directories
-            dnl known to the linker and runtime loader. (All the system
-            dnl directories known to the linker should also be known to the
-            dnl runtime loader, otherwise the system is severely misconfigured.)
-            LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
-            LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-l$name"
-          fi
-        fi
-      fi
-    done
-  done
-  if test "X$rpathdirs" != "X"; then
-    if test -n "$acl_hardcode_libdir_separator"; then
-      dnl Weird platform: only the last -rpath option counts, the user must
-      dnl pass all path elements in one option. We can arrange that for a
-      dnl single library, but not when more than one $LIBNAMEs are used.
-      alldirs=
-      for found_dir in $rpathdirs; do
-        alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir"
-      done
-      dnl Note: acl_hardcode_libdir_flag_spec uses $libdir and $wl.
-      acl_save_libdir="$libdir"
-      libdir="$alldirs"
-      eval flag=\"$acl_hardcode_libdir_flag_spec\"
-      libdir="$acl_save_libdir"
-      LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
-    else
-      dnl The -rpath options are cumulative.
-      for found_dir in $rpathdirs; do
-        acl_save_libdir="$libdir"
-        libdir="$found_dir"
-        eval flag=\"$acl_hardcode_libdir_flag_spec\"
-        libdir="$acl_save_libdir"
-        LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
-      done
-    fi
-  fi
-  if test "X$ltrpathdirs" != "X"; then
-    dnl When using libtool, the option that works for both libraries and
-    dnl executables is -R. The -R options are cumulative.
-    for found_dir in $ltrpathdirs; do
-      LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-R$found_dir"
-    done
-  fi
-])
-
-dnl AC_LIB_APPENDTOVAR(VAR, CONTENTS) appends the elements of CONTENTS to VAR,
-dnl unless already present in VAR.
-dnl Works only for CPPFLAGS, not for LIB* variables because that sometimes
-dnl contains two or three consecutive elements that belong together.
-AC_DEFUN([AC_LIB_APPENDTOVAR],
-[
-  for element in [$2]; do
-    haveit=
-    for x in $[$1]; do
-      AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
-      if test "X$x" = "X$element"; then
-        haveit=yes
-        break
-      fi
-    done
-    if test -z "$haveit"; then
-      [$1]="${[$1]}${[$1]:+ }$element"
-    fi
-  done
-])
-
-dnl For those cases where a variable contains several -L and -l options
-dnl referring to unknown libraries and directories, this macro determines the
-dnl necessary additional linker options for the runtime path.
-dnl AC_LIB_LINKFLAGS_FROM_LIBS([LDADDVAR], [LIBSVALUE], [USE-LIBTOOL])
-dnl sets LDADDVAR to linker options needed together with LIBSVALUE.
-dnl If USE-LIBTOOL evaluates to non-empty, linking with libtool is assumed,
-dnl otherwise linking without libtool is assumed.
-AC_DEFUN([AC_LIB_LINKFLAGS_FROM_LIBS],
-[
-  AC_REQUIRE([AC_LIB_RPATH])
-  AC_REQUIRE([AC_LIB_PREPARE_MULTILIB])
-  $1=
-  if test "$enable_rpath" != no; then
-    if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
-      dnl Use an explicit option to hardcode directories into the resulting
-      dnl binary.
-      rpathdirs=
-      next=
-      for opt in $2; do
-        if test -n "$next"; then
-          dir="$next"
-          dnl No need to hardcode the standard /usr/lib.
-          if test "X$dir" != "X/usr/$acl_libdirstem"; then
-            rpathdirs="$rpathdirs $dir"
-          fi
-          next=
-        else
-          case $opt in
-            -L) next=yes ;;
-            -L*) dir=`echo "X$opt" | sed -e 's,^X-L,,'`
-                 dnl No need to hardcode the standard /usr/lib.
-                 if test "X$dir" != "X/usr/$acl_libdirstem"; then
-                   rpathdirs="$rpathdirs $dir"
-                 fi
-                 next= ;;
-            *) next= ;;
-          esac
-        fi
-      done
-      if test "X$rpathdirs" != "X"; then
-        if test -n ""$3""; then
-          dnl libtool is used for linking. Use -R options.
-          for dir in $rpathdirs; do
-            $1="${$1}${$1:+ }-R$dir"
-          done
-        else
-          dnl The linker is used for linking directly.
-          if test -n "$acl_hardcode_libdir_separator"; then
-            dnl Weird platform: only the last -rpath option counts, the user
-            dnl must pass all path elements in one option.
-            alldirs=
-            for dir in $rpathdirs; do
-              alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$dir"
-            done
-            acl_save_libdir="$libdir"
-            libdir="$alldirs"
-            eval flag=\"$acl_hardcode_libdir_flag_spec\"
-            libdir="$acl_save_libdir"
-            $1="$flag"
-          else
-            dnl The -rpath options are cumulative.
-            for dir in $rpathdirs; do
-              acl_save_libdir="$libdir"
-              libdir="$dir"
-              eval flag=\"$acl_hardcode_libdir_flag_spec\"
-              libdir="$acl_save_libdir"
-              $1="${$1}${$1:+ }$flag"
-            done
-          fi
-        fi
-      fi
-    fi
-  fi
-  AC_SUBST([$1])
-])
diff --git a/myserver/m4/lib-prefix.m4 b/myserver/m4/lib-prefix.m4
deleted file mode 100644
index a8684e1..0000000
--- a/myserver/m4/lib-prefix.m4
+++ /dev/null
@@ -1,185 +0,0 @@
-# lib-prefix.m4 serial 5 (gettext-0.15)
-dnl Copyright (C) 2001-2005 Free Software Foundation, Inc.
-dnl This file is free software; the Free Software Foundation
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-
-dnl From Bruno Haible.
-
-dnl AC_LIB_ARG_WITH is synonymous to AC_ARG_WITH in autoconf-2.13, and
-dnl similar to AC_ARG_WITH in autoconf 2.52...2.57 except that is doesn't
-dnl require excessive bracketing.
-ifdef([AC_HELP_STRING],
-[AC_DEFUN([AC_LIB_ARG_WITH], [AC_ARG_WITH([$1],[[$2]],[$3],[$4])])],
-[AC_DEFUN([AC_][LIB_ARG_WITH], [AC_ARG_WITH([$1],[$2],[$3],[$4])])])
-
-dnl AC_LIB_PREFIX adds to the CPPFLAGS and LDFLAGS the flags that are needed
-dnl to access previously installed libraries. The basic assumption is that
-dnl a user will want packages to use other packages he previously installed
-dnl with the same --prefix option.
-dnl This macro is not needed if only AC_LIB_LINKFLAGS is used to locate
-dnl libraries, but is otherwise very convenient.
-AC_DEFUN([AC_LIB_PREFIX],
-[
-  AC_BEFORE([$0], [AC_LIB_LINKFLAGS])
-  AC_REQUIRE([AC_PROG_CC])
-  AC_REQUIRE([AC_CANONICAL_HOST])
-  AC_REQUIRE([AC_LIB_PREPARE_MULTILIB])
-  AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
-  dnl By default, look in $includedir and $libdir.
-  use_additional=yes
-  AC_LIB_WITH_FINAL_PREFIX([
-    eval additional_includedir=\"$includedir\"
-    eval additional_libdir=\"$libdir\"
-  ])
-  AC_LIB_ARG_WITH([lib-prefix],
-[  --with-lib-prefix[=DIR] search for libraries in DIR/include and DIR/lib
-  --without-lib-prefix    don't search for libraries in includedir and libdir],
-[
-    if test "X$withval" = "Xno"; then
-      use_additional=no
-    else
-      if test "X$withval" = "X"; then
-        AC_LIB_WITH_FINAL_PREFIX([
-          eval additional_includedir=\"$includedir\"
-          eval additional_libdir=\"$libdir\"
-        ])
-      else
-        additional_includedir="$withval/include"
-        additional_libdir="$withval/$acl_libdirstem"
-      fi
-    fi
-])
-  if test $use_additional = yes; then
-    dnl Potentially add $additional_includedir to $CPPFLAGS.
-    dnl But don't add it
-    dnl   1. if it's the standard /usr/include,
-    dnl   2. if it's already present in $CPPFLAGS,
-    dnl   3. if it's /usr/local/include and we are using GCC on Linux,
-    dnl   4. if it doesn't exist as a directory.
-    if test "X$additional_includedir" != "X/usr/include"; then
-      haveit=
-      for x in $CPPFLAGS; do
-        AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
-        if test "X$x" = "X-I$additional_includedir"; then
-          haveit=yes
-          break
-        fi
-      done
-      if test -z "$haveit"; then
-        if test "X$additional_includedir" = "X/usr/local/include"; then
-          if test -n "$GCC"; then
-            case $host_os in
-              linux* | gnu* | k*bsd*-gnu) haveit=yes;;
-            esac
-          fi
-        fi
-        if test -z "$haveit"; then
-          if test -d "$additional_includedir"; then
-            dnl Really add $additional_includedir to $CPPFLAGS.
-            CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }-I$additional_includedir"
-          fi
-        fi
-      fi
-    fi
-    dnl Potentially add $additional_libdir to $LDFLAGS.
-    dnl But don't add it
-    dnl   1. if it's the standard /usr/lib,
-    dnl   2. if it's already present in $LDFLAGS,
-    dnl   3. if it's /usr/local/lib and we are using GCC on Linux,
-    dnl   4. if it doesn't exist as a directory.
-    if test "X$additional_libdir" != "X/usr/$acl_libdirstem"; then
-      haveit=
-      for x in $LDFLAGS; do
-        AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
-        if test "X$x" = "X-L$additional_libdir"; then
-          haveit=yes
-          break
-        fi
-      done
-      if test -z "$haveit"; then
-        if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem"; then
-          if test -n "$GCC"; then
-            case $host_os in
-              linux*) haveit=yes;;
-            esac
-          fi
-        fi
-        if test -z "$haveit"; then
-          if test -d "$additional_libdir"; then
-            dnl Really add $additional_libdir to $LDFLAGS.
-            LDFLAGS="${LDFLAGS}${LDFLAGS:+ }-L$additional_libdir"
-          fi
-        fi
-      fi
-    fi
-  fi
-])
-
-dnl AC_LIB_PREPARE_PREFIX creates variables acl_final_prefix,
-dnl acl_final_exec_prefix, containing the values to which $prefix and
-dnl $exec_prefix will expand at the end of the configure script.
-AC_DEFUN([AC_LIB_PREPARE_PREFIX],
-[
-  dnl Unfortunately, prefix and exec_prefix get only finally determined
-  dnl at the end of configure.
-  if test "X$prefix" = "XNONE"; then
-    acl_final_prefix="$ac_default_prefix"
-  else
-    acl_final_prefix="$prefix"
-  fi
-  if test "X$exec_prefix" = "XNONE"; then
-    acl_final_exec_prefix='${prefix}'
-  else
-    acl_final_exec_prefix="$exec_prefix"
-  fi
-  acl_save_prefix="$prefix"
-  prefix="$acl_final_prefix"
-  eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
-  prefix="$acl_save_prefix"
-])
-
-dnl AC_LIB_WITH_FINAL_PREFIX([statement]) evaluates statement, with the
-dnl variables prefix and exec_prefix bound to the values they will have
-dnl at the end of the configure script.
-AC_DEFUN([AC_LIB_WITH_FINAL_PREFIX],
-[
-  acl_save_prefix="$prefix"
-  prefix="$acl_final_prefix"
-  acl_save_exec_prefix="$exec_prefix"
-  exec_prefix="$acl_final_exec_prefix"
-  $1
-  exec_prefix="$acl_save_exec_prefix"
-  prefix="$acl_save_prefix"
-])
-
-dnl AC_LIB_PREPARE_MULTILIB creates a variable acl_libdirstem, containing
-dnl the basename of the libdir, either "lib" or "lib64".
-AC_DEFUN([AC_LIB_PREPARE_MULTILIB],
-[
-  dnl There is no formal standard regarding lib and lib64. The current
-  dnl practice is that on a system supporting 32-bit and 64-bit instruction
-  dnl sets or ABIs, 64-bit libraries go under $prefix/lib64 and 32-bit
-  dnl libraries go under $prefix/lib. We determine the compiler's default
-  dnl mode by looking at the compiler's library search path. If at least
-  dnl of its elements ends in /lib64 or points to a directory whose absolute
-  dnl pathname ends in /lib64, we assume a 64-bit ABI. Otherwise we use the
-  dnl default, namely "lib".
-  acl_libdirstem=lib
-  searchpath=`(LC_ALL=C $CC -print-search-dirs) 2>/dev/null | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'`
-  if test -n "$searchpath"; then
-    acl_save_IFS="${IFS= 	}"; IFS=":"
-    for searchdir in $searchpath; do
-      if test -d "$searchdir"; then
-        case "$searchdir" in
-          */lib64/ | */lib64 ) acl_libdirstem=lib64 ;;
-          *) searchdir=`cd "$searchdir" && pwd`
-             case "$searchdir" in
-               */lib64 ) acl_libdirstem=lib64 ;;
-             esac ;;
-        esac
-      fi
-    done
-    IFS="$acl_save_IFS"
-  fi
-])
diff --git a/myserver/m4/libtool.m4 b/myserver/m4/libtool.m4
index 469dc0f..1e7ea47 100644
--- a/myserver/m4/libtool.m4
+++ b/myserver/m4/libtool.m4
@@ -1,122 +1,185 @@
 # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
-## Copyright 1996, 1997, 1998, 1999, 2000, 2001
-## Free Software Foundation, Inc.
-## Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
-##
-## This program 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 of the License, or
-## (at your option) any later version.
-##
-## This program is distributed in the hope that it will be useful, but
-## WITHOUT ANY WARRANTY; without even the implied warranty of
-## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-## General Public License for more details.
-##
-## You should have received a copy of the GNU General Public License
-## along with this program; if not, write to the Free Software
-## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02110-1301, USA.
-##
-## As a special exception to the GNU General Public License, if you
-## distribute this file as part of a program that contains a
-## configuration script generated by Autoconf, you may include it under
-## the same distribution terms that you use for the rest of that program.
-
-# serial 47 AC_PROG_LIBTOOL
-
-
-# AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED)
-# -----------------------------------------------------------
-# If this macro is not defined by Autoconf, define it here.
-m4_ifdef([AC_PROVIDE_IFELSE],
-         [],
-         [m4_define([AC_PROVIDE_IFELSE],
-	         [m4_ifdef([AC_PROVIDE_$1],
-		           [$2], [$3])])])
-
-
-# AC_PROG_LIBTOOL
-# ---------------
-AC_DEFUN([AC_PROG_LIBTOOL],
-[AC_REQUIRE([_AC_PROG_LIBTOOL])dnl
-dnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX
-dnl immediately, otherwise, hook it in at the end of AC_PROG_CXX.
-  AC_PROVIDE_IFELSE([AC_PROG_CXX],
-    [AC_LIBTOOL_CXX],
-    [define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX
-  ])])
-dnl And a similar setup for Fortran 77 support
-  AC_PROVIDE_IFELSE([AC_PROG_F77],
-    [AC_LIBTOOL_F77],
-    [define([AC_PROG_F77], defn([AC_PROG_F77])[AC_LIBTOOL_F77
-])])
-
-dnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly.
-dnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run
-dnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both.
-  AC_PROVIDE_IFELSE([AC_PROG_GCJ],
-    [AC_LIBTOOL_GCJ],
-    [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
-      [AC_LIBTOOL_GCJ],
-      [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],
-	[AC_LIBTOOL_GCJ],
-      [ifdef([AC_PROG_GCJ],
-	     [define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])
-       ifdef([A][M_PROG_GCJ],
-	     [define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ])])
-       ifdef([LT_AC_PROG_GCJ],
-	     [define([LT_AC_PROG_GCJ],
-		defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])])])
-])])# AC_PROG_LIBTOOL
-
-
-# _AC_PROG_LIBTOOL
-# ----------------
-AC_DEFUN([_AC_PROG_LIBTOOL],
-[AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
-AC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl
-AC_BEFORE([$0],[AC_LIBTOOL_F77])dnl
-AC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl
+#
+#   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
+#                 2006, 2007, 2008 Free Software Foundation, Inc.
+#   Written by Gordon Matzigkeit, 1996
+#
+# This file is free software; the Free Software Foundation gives
+# unlimited permission to copy and/or distribute it, with or without
+# modifications, as long as this notice is preserved.
+
+m4_define([_LT_COPYING], [dnl
+#   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
+#                 2006, 2007, 2008 Free Software Foundation, Inc.
+#   Written by Gordon Matzigkeit, 1996
+#
+#   This file is part of GNU Libtool.
+#
+# GNU Libtool 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 of
+# the License, or (at your option) any later version.
+#
+# As a special exception to the GNU General Public License,
+# if you distribute this file as part of a program or library that
+# is built using GNU Libtool, you may include this file under the
+# same distribution terms that you use for the rest of that program.
+#
+# GNU Libtool 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 GNU Libtool; see the file COPYING.  If not, a copy
+# can be downloaded from http://www.gnu.org/licenses/gpl.html, or
+# obtained by writing to the Free Software Foundation, Inc.,
+# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+])
+
+# serial 56 LT_INIT
+
+
+# LT_PREREQ(VERSION)
+# ------------------
+# Complain and exit if this libtool version is less that VERSION.
+m4_defun([LT_PREREQ],
+[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1,
+       [m4_default([$3],
+		   [m4_fatal([Libtool version $1 or higher is required],
+		             63)])],
+       [$2])])
+
+
+# _LT_CHECK_BUILDDIR
+# ------------------
+# Complain if the absolute build directory name contains unusual characters
+m4_defun([_LT_CHECK_BUILDDIR],
+[case `pwd` in
+  *\ * | *\	*)
+    AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;;
+esac
+])
+
+
+# LT_INIT([OPTIONS])
+# ------------------
+AC_DEFUN([LT_INIT],
+[AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT
+AC_BEFORE([$0], [LT_LANG])dnl
+AC_BEFORE([$0], [LT_OUTPUT])dnl
+AC_BEFORE([$0], [LTDL_INIT])dnl
+m4_require([_LT_CHECK_BUILDDIR])dnl
+
+dnl Autoconf doesn't catch unexpanded LT_ macros by default:
+m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl
+m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl
+dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4
+dnl unless we require an AC_DEFUNed macro:
+AC_REQUIRE([LTOPTIONS_VERSION])dnl
+AC_REQUIRE([LTSUGAR_VERSION])dnl
+AC_REQUIRE([LTVERSION_VERSION])dnl
+AC_REQUIRE([LTOBSOLETE_VERSION])dnl
+m4_require([_LT_PROG_LTMAIN])dnl
+
+dnl Parse OPTIONS
+_LT_SET_OPTIONS([$0], [$1])
 
 # This can be used to rebuild libtool when needed
-LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
+LIBTOOL_DEPS="$ltmain"
 
 # Always use our own libtool.
 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
 AC_SUBST(LIBTOOL)dnl
 
-# Prevent multiple expansion
-define([AC_PROG_LIBTOOL], [])
-])# _AC_PROG_LIBTOOL
+_LT_SETUP
 
+# Only expand once:
+m4_define([LT_INIT])
+])# LT_INIT
 
-# AC_LIBTOOL_SETUP
-# ----------------
-AC_DEFUN([AC_LIBTOOL_SETUP],
-[AC_PREREQ(2.50)dnl
-AC_REQUIRE([AC_ENABLE_SHARED])dnl
-AC_REQUIRE([AC_ENABLE_STATIC])dnl
-AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl
-AC_REQUIRE([AC_CANONICAL_HOST])dnl
+# Old names:
+AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT])
+AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_PROG_LIBTOOL], [])
+dnl AC_DEFUN([AM_PROG_LIBTOOL], [])
+
+
+# _LT_CC_BASENAME(CC)
+# -------------------
+# Calculate cc_basename.  Skip known compiler wrappers and cross-prefix.
+m4_defun([_LT_CC_BASENAME],
+[for cc_temp in $1""; do
+  case $cc_temp in
+    compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
+    distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
+    \-*) ;;
+    *) break;;
+  esac
+done
+cc_basename=`$ECHO "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
+])
+
+
+# _LT_FILEUTILS_DEFAULTS
+# ----------------------
+# It is okay to use these file commands and assume they have been set
+# sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'.
+m4_defun([_LT_FILEUTILS_DEFAULTS],
+[: ${CP="cp -f"}
+: ${MV="mv -f"}
+: ${RM="rm -f"}
+])# _LT_FILEUTILS_DEFAULTS
+
+
+# _LT_SETUP
+# ---------
+m4_defun([_LT_SETUP],
+[AC_REQUIRE([AC_CANONICAL_HOST])dnl
 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
+_LT_DECL([], [host_alias], [0], [The host system])dnl
+_LT_DECL([], [host], [0])dnl
+_LT_DECL([], [host_os], [0])dnl
+dnl
+_LT_DECL([], [build_alias], [0], [The build system])dnl
+_LT_DECL([], [build], [0])dnl
+_LT_DECL([], [build_os], [0])dnl
+dnl
 AC_REQUIRE([AC_PROG_CC])dnl
-AC_REQUIRE([AC_PROG_LD])dnl
-AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl
-AC_REQUIRE([AC_PROG_NM])dnl
-
+AC_REQUIRE([LT_PATH_LD])dnl
+AC_REQUIRE([LT_PATH_NM])dnl
+dnl
 AC_REQUIRE([AC_PROG_LN_S])dnl
-AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl
-# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
-AC_REQUIRE([AC_OBJEXT])dnl
-AC_REQUIRE([AC_EXEEXT])dnl
+test -z "$LN_S" && LN_S="ln -s"
+_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl
 dnl
+AC_REQUIRE([LT_CMD_MAX_LEN])dnl
+_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl
+_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl
+dnl
+m4_require([_LT_FILEUTILS_DEFAULTS])dnl
+m4_require([_LT_CHECK_SHELL_FEATURES])dnl
+m4_require([_LT_CMD_RELOAD])dnl
+m4_require([_LT_CHECK_MAGIC_METHOD])dnl
+m4_require([_LT_CMD_OLD_ARCHIVE])dnl
+m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
+
+_LT_CONFIG_LIBTOOL_INIT([
+# See if we are running on zsh, and set the options which allow our
+# commands through without removal of \ escapes INIT.
+if test -n "\${ZSH_VERSION+set}" ; then
+   setopt NO_GLOB_SUBST
+fi
+])
+if test -n "${ZSH_VERSION+set}" ; then
+   setopt NO_GLOB_SUBST
+fi
 
-AC_LIBTOOL_SYS_MAX_CMD_LEN
-AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
-AC_LIBTOOL_OBJDIR
+_LT_CHECK_OBJDIR
 
-AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
-_LT_AC_PROG_ECHO_BACKSLASH
+m4_require([_LT_TAG_COMPILER])dnl
+_LT_PROG_ECHO_BACKSLASH
 
 case $host_os in
 aix3*)
@@ -132,174 +195,885 @@ esac
 
 # Sed substitution that helps us do robust quoting.  It backslashifies
 # metacharacters that are still active within double-quoted strings.
-Xsed='sed -e s/^X//'
-[sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g']
+sed_quote_subst='s/\([["`$\\]]\)/\\\1/g'
 
 # Same as above, but do not quote variable references.
-[double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g']
+double_quote_subst='s/\([["`\\]]\)/\\\1/g'
 
 # Sed substitution to delay expansion of an escaped shell variable in a
 # double_quote_subst'ed string.
 delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
 
+# Sed substitution to delay expansion of an escaped single quote.
+delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
+
 # Sed substitution to avoid accidental globbing in evaled expressions
 no_glob_subst='s/\*/\\\*/g'
 
-# Constants:
-rm="rm -f"
-
 # Global variables:
-default_ofile=libtool
+ofile=libtool
 can_build_shared=yes
 
-# All known linkers require a `.a' archive for static linking (except M$VC,
+# All known linkers require a `.a' archive for static linking (except MSVC,
 # which needs '.lib').
 libext=a
-ltmain="$ac_aux_dir/ltmain.sh"
-ofile="$default_ofile"
-with_gnu_ld="$lt_cv_prog_gnu_ld"
 
-AC_CHECK_TOOL(AR, ar, false)
-AC_CHECK_TOOL(RANLIB, ranlib, :)
-AC_CHECK_TOOL(STRIP, strip, :)
+with_gnu_ld="$lt_cv_prog_gnu_ld"
 
 old_CC="$CC"
 old_CFLAGS="$CFLAGS"
 
 # Set sane defaults for various variables
-test -z "$AR" && AR=ar
-test -z "$AR_FLAGS" && AR_FLAGS=cru
-test -z "$AS" && AS=as
 test -z "$CC" && CC=cc
 test -z "$LTCC" && LTCC=$CC
-test -z "$DLLTOOL" && DLLTOOL=dlltool
+test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
 test -z "$LD" && LD=ld
-test -z "$LN_S" && LN_S="ln -s"
-test -z "$MAGIC_CMD" && MAGIC_CMD=file
-test -z "$NM" && NM=nm
-test -z "$SED" && SED=sed
-test -z "$OBJDUMP" && OBJDUMP=objdump
-test -z "$RANLIB" && RANLIB=:
-test -z "$STRIP" && STRIP=:
 test -z "$ac_objext" && ac_objext=o
 
-# Determine commands to create old-style static archives.
-old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
-old_postinstall_cmds='chmod 644 $oldlib'
-old_postuninstall_cmds=
-
-if test -n "$RANLIB"; then
-  case $host_os in
-  openbsd*)
-    old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds"
-    ;;
-  *)
-    old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
-    ;;
-  esac
-  old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
-fi
+_LT_CC_BASENAME([$compiler])
 
 # Only perform the check for file, if the check method requires it
+test -z "$MAGIC_CMD" && MAGIC_CMD=file
 case $deplibs_check_method in
 file_magic*)
   if test "$file_magic_cmd" = '$MAGIC_CMD'; then
-    AC_PATH_MAGIC
+    _LT_PATH_MAGIC
   fi
   ;;
 esac
 
-AC_PROVIDE_IFELSE([AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no)
-AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
-enable_win32_dll=yes, enable_win32_dll=no)
+# Use C for the default configuration in the libtool script
+LT_SUPPORTED_TAG([CC])
+_LT_LANG_C_CONFIG
+_LT_LANG_DEFAULT_CONFIG
+_LT_CONFIG_COMMANDS
+])# _LT_SETUP
 
-AC_ARG_ENABLE([libtool-lock],
-    [AC_HELP_STRING([--disable-libtool-lock],
-	[avoid locking (might break parallel builds)])])
-test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
 
-AC_ARG_WITH([pic],
-    [AC_HELP_STRING([--with-pic],
-	[try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
-    [pic_mode="$withval"],
-    [pic_mode=default])
-test -z "$pic_mode" && pic_mode=default
+# _LT_PROG_LTMAIN
+# ---------------
+# Note that this code is called both from `configure', and `config.status'
+# now that we use AC_CONFIG_COMMANDS to generate libtool.  Notably,
+# `config.status' has no value for ac_aux_dir unless we are using Automake,
+# so we pass a copy along to make sure it has a sensible value anyway.
+m4_defun([_LT_PROG_LTMAIN],
+[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl
+_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir'])
+ltmain="$ac_aux_dir/ltmain.sh"
+])# _LT_PROG_LTMAIN
 
-# Use C for the default configuration in the libtool script
-tagname=
-AC_LIBTOOL_LANG_C_CONFIG
-_LT_AC_TAGCONFIG
-])# AC_LIBTOOL_SETUP
 
+## ------------------------------------- ##
+## Accumulate code for creating libtool. ##
+## ------------------------------------- ##
+
+# So that we can recreate a full libtool script including additional
+# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS
+# in macros and then make a single call at the end using the `libtool'
+# label.
+
+
+# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS])
+# ----------------------------------------
+# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later.
+m4_define([_LT_CONFIG_LIBTOOL_INIT],
+[m4_ifval([$1],
+          [m4_append([_LT_OUTPUT_LIBTOOL_INIT],
+                     [$1
+])])])
+
+# Initialize.
+m4_define([_LT_OUTPUT_LIBTOOL_INIT])
+
+
+# _LT_CONFIG_LIBTOOL([COMMANDS])
+# ------------------------------
+# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later.
+m4_define([_LT_CONFIG_LIBTOOL],
+[m4_ifval([$1],
+          [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS],
+                     [$1
+])])])
+
+# Initialize.
+m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS])
+
+
+# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS])
+# -----------------------------------------------------
+m4_defun([_LT_CONFIG_SAVE_COMMANDS],
+[_LT_CONFIG_LIBTOOL([$1])
+_LT_CONFIG_LIBTOOL_INIT([$2])
+])
+
+
+# _LT_FORMAT_COMMENT([COMMENT])
+# -----------------------------
+# Add leading comment marks to the start of each line, and a trailing
+# full-stop to the whole comment if one is not present already.
+m4_define([_LT_FORMAT_COMMENT],
+[m4_ifval([$1], [
+m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])],
+              [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.])
+)])
+
+
+
+## ------------------------ ##
+## FIXME: Eliminate VARNAME ##
+## ------------------------ ##
+
+
+# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?])
+# -------------------------------------------------------------------
+# CONFIGNAME is the name given to the value in the libtool script.
+# VARNAME is the (base) name used in the configure script.
+# VALUE may be 0, 1 or 2 for a computed quote escaped value based on
+# VARNAME.  Any other value will be used directly.
+m4_define([_LT_DECL],
+[lt_if_append_uniq([lt_decl_varnames], [$2], [, ],
+    [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name],
+	[m4_ifval([$1], [$1], [$2])])
+    lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3])
+    m4_ifval([$4],
+	[lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])])
+    lt_dict_add_subkey([lt_decl_dict], [$2],
+	[tagged?], [m4_ifval([$5], [yes], [no])])])
+])
+
+
+# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION])
+# --------------------------------------------------------
+m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])])
+
+
+# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...])
+# ------------------------------------------------
+m4_define([lt_decl_tag_varnames],
+[_lt_decl_filter([tagged?], [yes], $@)])
+
+
+# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..])
+# ---------------------------------------------------------
+m4_define([_lt_decl_filter],
+[m4_case([$#],
+  [0], [m4_fatal([$0: too few arguments: $#])],
+  [1], [m4_fatal([$0: too few arguments: $#: $1])],
+  [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)],
+  [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)],
+  [lt_dict_filter([lt_decl_dict], $@)])[]dnl
+])
+
+
+# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...])
+# --------------------------------------------------
+m4_define([lt_decl_quote_varnames],
+[_lt_decl_filter([value], [1], $@)])
+
+
+# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...])
+# ---------------------------------------------------
+m4_define([lt_decl_dquote_varnames],
+[_lt_decl_filter([value], [2], $@)])
+
+
+# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...])
+# ---------------------------------------------------
+m4_define([lt_decl_varnames_tagged],
+[m4_assert([$# <= 2])dnl
+_$0(m4_quote(m4_default([$1], [[, ]])),
+    m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]),
+    m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))])
+m4_define([_lt_decl_varnames_tagged],
+[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])])
+
+
+# lt_decl_all_varnames([SEPARATOR], [VARNAME1...])
+# ------------------------------------------------
+m4_define([lt_decl_all_varnames],
+[_$0(m4_quote(m4_default([$1], [[, ]])),
+     m4_if([$2], [],
+	   m4_quote(lt_decl_varnames),
+	m4_quote(m4_shift($@))))[]dnl
+])
+m4_define([_lt_decl_all_varnames],
+[lt_join($@, lt_decl_varnames_tagged([$1],
+			lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl
+])
+
+
+# _LT_CONFIG_STATUS_DECLARE([VARNAME])
+# ------------------------------------
+# Quote a variable value, and forward it to `config.status' so that its
+# declaration there will have the same value as in `configure'.  VARNAME
+# must have a single quote delimited value for this to work.
+m4_define([_LT_CONFIG_STATUS_DECLARE],
+[$1='`$ECHO "X$][$1" | $Xsed -e "$delay_single_quote_subst"`'])
+
+
+# _LT_CONFIG_STATUS_DECLARATIONS
+# ------------------------------
+# We delimit libtool config variables with single quotes, so when
+# we write them to config.status, we have to be sure to quote all
+# embedded single quotes properly.  In configure, this macro expands
+# each variable declared with _LT_DECL (and _LT_TAGDECL) into:
+#
+#    <var>='`$ECHO "X$<var>" | $Xsed -e "$delay_single_quote_subst"`'
+m4_defun([_LT_CONFIG_STATUS_DECLARATIONS],
+[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames),
+    [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])])
 
-# _LT_AC_SYS_COMPILER
+
+# _LT_LIBTOOL_TAGS
+# ----------------
+# Output comment and list of tags supported by the script
+m4_defun([_LT_LIBTOOL_TAGS],
+[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl
+available_tags="_LT_TAGS"dnl
+])
+
+
+# _LT_LIBTOOL_DECLARE(VARNAME, [TAG])
+# -----------------------------------
+# Extract the dictionary values for VARNAME (optionally with TAG) and
+# expand to a commented shell variable setting:
+#
+#    # Some comment about what VAR is for.
+#    visible_name=$lt_internal_name
+m4_define([_LT_LIBTOOL_DECLARE],
+[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1],
+					   [description])))[]dnl
+m4_pushdef([_libtool_name],
+    m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl
+m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])),
+    [0], [_libtool_name=[$]$1],
+    [1], [_libtool_name=$lt_[]$1],
+    [2], [_libtool_name=$lt_[]$1],
+    [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl
+m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl
+])
+
+
+# _LT_LIBTOOL_CONFIG_VARS
+# -----------------------
+# Produce commented declarations of non-tagged libtool config variables
+# suitable for insertion in the LIBTOOL CONFIG section of the `libtool'
+# script.  Tagged libtool config variables (even for the LIBTOOL CONFIG
+# section) are produced by _LT_LIBTOOL_TAG_VARS.
+m4_defun([_LT_LIBTOOL_CONFIG_VARS],
+[m4_foreach([_lt_var],
+    m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)),
+    [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])])
+
+
+# _LT_LIBTOOL_TAG_VARS(TAG)
+# -------------------------
+m4_define([_LT_LIBTOOL_TAG_VARS],
+[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames),
+    [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])])
+
+
+# _LT_TAGVAR(VARNAME, [TAGNAME])
+# ------------------------------
+m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])])
+
+
+# _LT_CONFIG_COMMANDS
 # -------------------
-AC_DEFUN([_LT_AC_SYS_COMPILER],
+# Send accumulated output to $CONFIG_STATUS.  Thanks to the lists of
+# variables for single and double quote escaping we saved from calls
+# to _LT_DECL, we can put quote escaped variables declarations
+# into `config.status', and then the shell code to quote escape them in
+# for loops in `config.status'.  Finally, any additional code accumulated
+# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded.
+m4_defun([_LT_CONFIG_COMMANDS],
+[AC_PROVIDE_IFELSE([LT_OUTPUT],
+	dnl If the libtool generation code has been placed in $CONFIG_LT,
+	dnl instead of duplicating it all over again into config.status,
+	dnl then we will have config.status run $CONFIG_LT later, so it
+	dnl needs to know what name is stored there:
+        [AC_CONFIG_COMMANDS([libtool],
+            [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])],
+    dnl If the libtool generation code is destined for config.status,
+    dnl expand the accumulated commands and init code now:
+    [AC_CONFIG_COMMANDS([libtool],
+        [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])])
+])#_LT_CONFIG_COMMANDS
+
+
+# Initialize.
+m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT],
+[
+
+# The HP-UX ksh and POSIX shell print the target directory to stdout
+# if CDPATH is set.
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+
+sed_quote_subst='$sed_quote_subst'
+double_quote_subst='$double_quote_subst'
+delay_variable_subst='$delay_variable_subst'
+_LT_CONFIG_STATUS_DECLARATIONS
+LTCC='$LTCC'
+LTCFLAGS='$LTCFLAGS'
+compiler='$compiler_DEFAULT'
+
+# Quote evaled strings.
+for var in lt_decl_all_varnames([[ \
+]], lt_decl_quote_varnames); do
+    case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in
+    *[[\\\\\\\`\\"\\\$]]*)
+      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$sed_quote_subst\\"\\\`\\\\\\""
+      ;;
+    *)
+      eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
+      ;;
+    esac
+done
+
+# Double-quote double-evaled strings.
+for var in lt_decl_all_varnames([[ \
+]], lt_decl_dquote_varnames); do
+    case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in
+    *[[\\\\\\\`\\"\\\$]]*)
+      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\""
+      ;;
+    *)
+      eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
+      ;;
+    esac
+done
+
+# Fix-up fallback echo if it was mangled by the above quoting rules.
+case \$lt_ECHO in
+*'\\\[$]0 --fallback-echo"')dnl "
+  lt_ECHO=\`\$ECHO "X\$lt_ECHO" | \$Xsed -e 's/\\\\\\\\\\\\\\\[$]0 --fallback-echo"\[$]/\[$]0 --fallback-echo"/'\`
+  ;;
+esac
+
+_LT_OUTPUT_LIBTOOL_INIT
+])
+
+
+# LT_OUTPUT
+# ---------
+# This macro allows early generation of the libtool script (before
+# AC_OUTPUT is called), incase it is used in configure for compilation
+# tests.
+AC_DEFUN([LT_OUTPUT],
+[: ${CONFIG_LT=./config.lt}
+AC_MSG_NOTICE([creating $CONFIG_LT])
+cat >"$CONFIG_LT" <<_LTEOF
+#! $SHELL
+# Generated by $as_me.
+# Run this file to recreate a libtool stub with the current configuration.
+
+lt_cl_silent=false
+SHELL=\${CONFIG_SHELL-$SHELL}
+_LTEOF
+
+cat >>"$CONFIG_LT" <<\_LTEOF
+AS_SHELL_SANITIZE
+_AS_PREPARE
+
+exec AS_MESSAGE_FD>&1
+exec AS_MESSAGE_LOG_FD>>config.log
+{
+  echo
+  AS_BOX([Running $as_me.])
+} >&AS_MESSAGE_LOG_FD
+
+lt_cl_help="\
+\`$as_me' creates a local libtool stub from the current configuration,
+for use in further configure time tests before the real libtool is
+generated.
+
+Usage: $[0] [[OPTIONS]]
+
+  -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
+
+Report bugs to <bug-libtool@gnu.org>."
+
+lt_cl_version="\
+m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl
+m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION])
+configured by $[0], generated by m4_PACKAGE_STRING.
+
+Copyright (C) 2008 Free Software Foundation, Inc.
+This config.lt script is free software; the Free Software Foundation
+gives unlimited permision to copy, distribute and modify it."
+
+while test $[#] != 0
+do
+  case $[1] in
+    --version | --v* | -V )
+      echo "$lt_cl_version"; exit 0 ;;
+    --help | --h* | -h )
+      echo "$lt_cl_help"; exit 0 ;;
+    --debug | --d* | -d )
+      debug=: ;;
+    --quiet | --q* | --silent | --s* | -q )
+      lt_cl_silent=: ;;
+
+    -*) AC_MSG_ERROR([unrecognized option: $[1]
+Try \`$[0] --help' for more information.]) ;;
+
+    *) AC_MSG_ERROR([unrecognized argument: $[1]
+Try \`$[0] --help' for more information.]) ;;
+  esac
+  shift
+done
+
+if $lt_cl_silent; then
+  exec AS_MESSAGE_FD>/dev/null
+fi
+_LTEOF
+
+cat >>"$CONFIG_LT" <<_LTEOF
+_LT_OUTPUT_LIBTOOL_COMMANDS_INIT
+_LTEOF
+
+cat >>"$CONFIG_LT" <<\_LTEOF
+AC_MSG_NOTICE([creating $ofile])
+_LT_OUTPUT_LIBTOOL_COMMANDS
+AS_EXIT(0)
+_LTEOF
+chmod +x "$CONFIG_LT"
+
+# configure is writing to config.log, but config.lt does its own redirection,
+# appending to config.log, which fails on DOS, as config.log is still kept
+# open by configure.  Here we exec the FD to /dev/null, effectively closing
+# config.log, so it can be properly (re)opened and appended to by config.lt.
+if test "$no_create" != yes; then
+  lt_cl_success=:
+  test "$silent" = yes &&
+    lt_config_lt_args="$lt_config_lt_args --quiet"
+  exec AS_MESSAGE_LOG_FD>/dev/null
+  $SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false
+  exec AS_MESSAGE_LOG_FD>>config.log
+  $lt_cl_success || AS_EXIT(1)
+fi
+])# LT_OUTPUT
+
+
+# _LT_CONFIG(TAG)
+# ---------------
+# If TAG is the built-in tag, create an initial libtool script with a
+# default configuration from the untagged config vars.  Otherwise add code
+# to config.status for appending the configuration named by TAG from the
+# matching tagged config vars.
+m4_defun([_LT_CONFIG],
+[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
+_LT_CONFIG_SAVE_COMMANDS([
+  m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl
+  m4_if(_LT_TAG, [C], [
+    # See if we are running on zsh, and set the options which allow our
+    # commands through without removal of \ escapes.
+    if test -n "${ZSH_VERSION+set}" ; then
+      setopt NO_GLOB_SUBST
+    fi
+
+    cfgfile="${ofile}T"
+    trap "$RM \"$cfgfile\"; exit 1" 1 2 15
+    $RM "$cfgfile"
+
+    cat <<_LT_EOF >> "$cfgfile"
+#! $SHELL
+
+# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
+# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION
+# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
+# NOTE: Changes made to this file will be lost: look at ltmain.sh.
+#
+_LT_COPYING
+_LT_LIBTOOL_TAGS
+
+# ### BEGIN LIBTOOL CONFIG
+_LT_LIBTOOL_CONFIG_VARS
+_LT_LIBTOOL_TAG_VARS
+# ### END LIBTOOL CONFIG
+
+_LT_EOF
+
+  case $host_os in
+  aix3*)
+    cat <<\_LT_EOF >> "$cfgfile"
+# AIX sometimes has problems with the GCC collect2 program.  For some
+# reason, if we set the COLLECT_NAMES environment variable, the problems
+# vanish in a puff of smoke.
+if test "X${COLLECT_NAMES+set}" != Xset; then
+  COLLECT_NAMES=
+  export COLLECT_NAMES
+fi
+_LT_EOF
+    ;;
+  esac
+
+  _LT_PROG_LTMAIN
+
+  # We use sed instead of cat because bash on DJGPP gets confused if
+  # if finds mixed CR/LF and LF-only lines.  Since sed operates in
+  # text mode, it properly converts lines to CR/LF.  This bash problem
+  # is reportedly fixed, but why not run on old versions too?
+  sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \
+    || (rm -f "$cfgfile"; exit 1)
+
+  _LT_PROG_XSI_SHELLFNS
+
+  sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \
+    || (rm -f "$cfgfile"; exit 1)
+
+  mv -f "$cfgfile" "$ofile" ||
+    (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
+  chmod +x "$ofile"
+],
+[cat <<_LT_EOF >> "$ofile"
+
+dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded
+dnl in a comment (ie after a #).
+# ### BEGIN LIBTOOL TAG CONFIG: $1
+_LT_LIBTOOL_TAG_VARS(_LT_TAG)
+# ### END LIBTOOL TAG CONFIG: $1
+_LT_EOF
+])dnl /m4_if
+],
+[m4_if([$1], [], [
+    PACKAGE='$PACKAGE'
+    VERSION='$VERSION'
+    TIMESTAMP='$TIMESTAMP'
+    RM='$RM'
+    ofile='$ofile'], [])
+])dnl /_LT_CONFIG_SAVE_COMMANDS
+])# _LT_CONFIG
+
+
+# LT_SUPPORTED_TAG(TAG)
+# ---------------------
+# Trace this macro to discover what tags are supported by the libtool
+# --tag option, using:
+#    autoconf --trace 'LT_SUPPORTED_TAG:$1'
+AC_DEFUN([LT_SUPPORTED_TAG], [])
+
+
+# C support is built-in for now
+m4_define([_LT_LANG_C_enabled], [])
+m4_define([_LT_TAGS], [])
+
+
+# LT_LANG(LANG)
+# -------------
+# Enable libtool support for the given language if not already enabled.
+AC_DEFUN([LT_LANG],
+[AC_BEFORE([$0], [LT_OUTPUT])dnl
+m4_case([$1],
+  [C],			[_LT_LANG(C)],
+  [C++],		[_LT_LANG(CXX)],
+  [Java],		[_LT_LANG(GCJ)],
+  [Fortran 77],		[_LT_LANG(F77)],
+  [Fortran],		[_LT_LANG(FC)],
+  [Windows Resource],	[_LT_LANG(RC)],
+  [m4_ifdef([_LT_LANG_]$1[_CONFIG],
+    [_LT_LANG($1)],
+    [m4_fatal([$0: unsupported language: "$1"])])])dnl
+])# LT_LANG
+
+
+# _LT_LANG(LANGNAME)
+# ------------------
+m4_defun([_LT_LANG],
+[m4_ifdef([_LT_LANG_]$1[_enabled], [],
+  [LT_SUPPORTED_TAG([$1])dnl
+  m4_append([_LT_TAGS], [$1 ])dnl
+  m4_define([_LT_LANG_]$1[_enabled], [])dnl
+  _LT_LANG_$1_CONFIG($1)])dnl
+])# _LT_LANG
+
+
+# _LT_LANG_DEFAULT_CONFIG
+# -----------------------
+m4_defun([_LT_LANG_DEFAULT_CONFIG],
+[AC_PROVIDE_IFELSE([AC_PROG_CXX],
+  [LT_LANG(CXX)],
+  [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])])
+
+AC_PROVIDE_IFELSE([AC_PROG_F77],
+  [LT_LANG(F77)],
+  [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])])
+
+AC_PROVIDE_IFELSE([AC_PROG_FC],
+  [LT_LANG(FC)],
+  [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])])
+
+dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal
+dnl pulling things in needlessly.
+AC_PROVIDE_IFELSE([AC_PROG_GCJ],
+  [LT_LANG(GCJ)],
+  [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
+    [LT_LANG(GCJ)],
+    [AC_PROVIDE_IFELSE([LT_PROG_GCJ],
+      [LT_LANG(GCJ)],
+      [m4_ifdef([AC_PROG_GCJ],
+	[m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])])
+       m4_ifdef([A][M_PROG_GCJ],
+	[m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])])
+       m4_ifdef([LT_PROG_GCJ],
+	[m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])])
+
+AC_PROVIDE_IFELSE([LT_PROG_RC],
+  [LT_LANG(RC)],
+  [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])])
+])# _LT_LANG_DEFAULT_CONFIG
+
+# Obsolete macros:
+AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)])
+AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)])
+AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)])
+AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_LIBTOOL_CXX], [])
+dnl AC_DEFUN([AC_LIBTOOL_F77], [])
+dnl AC_DEFUN([AC_LIBTOOL_FC], [])
+dnl AC_DEFUN([AC_LIBTOOL_GCJ], [])
+
+
+# _LT_TAG_COMPILER
+# ----------------
+m4_defun([_LT_TAG_COMPILER],
 [AC_REQUIRE([AC_PROG_CC])dnl
 
+_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl
+_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl
+_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl
+_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl
+
 # If no C compiler was specified, use CC.
 LTCC=${LTCC-"$CC"}
 
+# If no C compiler flags were specified, use CFLAGS.
+LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
+
 # Allow CC to be a program name with arguments.
 compiler=$CC
-])# _LT_AC_SYS_COMPILER
+])# _LT_TAG_COMPILER
 
 
-# _LT_AC_SYS_LIBPATH_AIX
+# _LT_COMPILER_BOILERPLATE
+# ------------------------
+# Check for compiler boilerplate output or warnings with
+# the simple compiler test code.
+m4_defun([_LT_COMPILER_BOILERPLATE],
+[m4_require([_LT_DECL_SED])dnl
+ac_outfile=conftest.$ac_objext
+echo "$lt_simple_compile_test_code" >conftest.$ac_ext
+eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
+_lt_compiler_boilerplate=`cat conftest.err`
+$RM conftest*
+])# _LT_COMPILER_BOILERPLATE
+
+
+# _LT_LINKER_BOILERPLATE
 # ----------------------
+# Check for linker boilerplate output or warnings with
+# the simple link test code.
+m4_defun([_LT_LINKER_BOILERPLATE],
+[m4_require([_LT_DECL_SED])dnl
+ac_outfile=conftest.$ac_objext
+echo "$lt_simple_link_test_code" >conftest.$ac_ext
+eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
+_lt_linker_boilerplate=`cat conftest.err`
+$RM -r conftest*
+])# _LT_LINKER_BOILERPLATE
+
+# _LT_REQUIRED_DARWIN_CHECKS
+# -------------------------
+m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
+  case $host_os in
+    rhapsody* | darwin*)
+    AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:])
+    AC_CHECK_TOOL([NMEDIT], [nmedit], [:])
+    AC_CHECK_TOOL([LIPO], [lipo], [:])
+    AC_CHECK_TOOL([OTOOL], [otool], [:])
+    AC_CHECK_TOOL([OTOOL64], [otool64], [:])
+    _LT_DECL([], [DSYMUTIL], [1],
+      [Tool to manipulate archived DWARF debug symbol files on Mac OS X])
+    _LT_DECL([], [NMEDIT], [1],
+      [Tool to change global to local symbols on Mac OS X])
+    _LT_DECL([], [LIPO], [1],
+      [Tool to manipulate fat objects and archives on Mac OS X])
+    _LT_DECL([], [OTOOL], [1],
+      [ldd/readelf like tool for Mach-O binaries on Mac OS X])
+    _LT_DECL([], [OTOOL64], [1],
+      [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4])
+
+    AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod],
+      [lt_cv_apple_cc_single_mod=no
+      if test -z "${LT_MULTI_MODULE}"; then
+	# By default we will add the -single_module flag. You can override
+	# by either setting the environment variable LT_MULTI_MODULE
+	# non-empty at configure time, or by adding -multi_module to the
+	# link flags.
+	rm -rf libconftest.dylib*
+	echo "int foo(void){return 1;}" > conftest.c
+	echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
+-dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD
+	$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
+	  -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
+        _lt_result=$?
+	if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then
+	  lt_cv_apple_cc_single_mod=yes
+	else
+	  cat conftest.err >&AS_MESSAGE_LOG_FD
+	fi
+	rm -rf libconftest.dylib*
+	rm -f conftest.*
+      fi])
+    AC_CACHE_CHECK([for -exported_symbols_list linker flag],
+      [lt_cv_ld_exported_symbols_list],
+      [lt_cv_ld_exported_symbols_list=no
+      save_LDFLAGS=$LDFLAGS
+      echo "_main" > conftest.sym
+      LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
+      AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
+	[lt_cv_ld_exported_symbols_list=yes],
+	[lt_cv_ld_exported_symbols_list=no])
+	LDFLAGS="$save_LDFLAGS"
+    ])
+    case $host_os in
+    rhapsody* | darwin1.[[012]])
+      _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
+    darwin1.*)
+      _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
+    darwin*) # darwin 5.x on
+      # if running on 10.5 or later, the deployment target defaults
+      # to the OS version, if on x86, and 10.4, the deployment
+      # target defaults to 10.4. Don't you love it?
+      case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
+	10.0,*86*-darwin8*|10.0,*-darwin[[91]]*)
+	  _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
+	10.[[012]]*)
+	  _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
+	10.*)
+	  _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
+      esac
+    ;;
+  esac
+    if test "$lt_cv_apple_cc_single_mod" = "yes"; then
+      _lt_dar_single_mod='$single_module'
+    fi
+    if test "$lt_cv_ld_exported_symbols_list" = "yes"; then
+      _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym'
+    else
+      _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}'
+    fi
+    if test "$DSYMUTIL" != ":"; then
+      _lt_dsymutil='~$DSYMUTIL $lib || :'
+    else
+      _lt_dsymutil=
+    fi
+    ;;
+  esac
+])
+
+
+# _LT_DARWIN_LINKER_FEATURES
+# --------------------------
+# Checks for linker and compiler features on darwin
+m4_defun([_LT_DARWIN_LINKER_FEATURES],
+[
+  m4_require([_LT_REQUIRED_DARWIN_CHECKS])
+  _LT_TAGVAR(archive_cmds_need_lc, $1)=no
+  _LT_TAGVAR(hardcode_direct, $1)=no
+  _LT_TAGVAR(hardcode_automatic, $1)=yes
+  _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
+  _LT_TAGVAR(whole_archive_flag_spec, $1)=''
+  _LT_TAGVAR(link_all_deplibs, $1)=yes
+  _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined"
+  case $cc_basename in
+     ifort*) _lt_dar_can_shared=yes ;;
+     *) _lt_dar_can_shared=$GCC ;;
+  esac
+  if test "$_lt_dar_can_shared" = "yes"; then
+    output_verbose_link_cmd=echo
+    _LT_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}"
+    _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
+    _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}"
+    _LT_TAGVAR(module_expsym_cmds, $1)="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}"
+    m4_if([$1], [CXX],
+[   if test "$lt_cv_apple_cc_single_mod" != "yes"; then
+      _LT_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}"
+      _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}"
+    fi
+],[])
+  else
+  _LT_TAGVAR(ld_shlibs, $1)=no
+  fi
+])
+
+# _LT_SYS_MODULE_PATH_AIX
+# -----------------------
 # Links a minimal program and checks the executable
 # for the system default hardcoded library path. In most cases,
 # this is /usr/lib:/lib, but when the MPI compilers are used
 # the location of the communication and MPI libs are included too.
 # If we don't find anything, use the default library path according
 # to the aix ld manual.
-AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX],
-[AC_LINK_IFELSE(AC_LANG_PROGRAM,[
-aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
-}'`
+m4_defun([_LT_SYS_MODULE_PATH_AIX],
+[m4_require([_LT_DECL_SED])dnl
+AC_LINK_IFELSE(AC_LANG_PROGRAM,[
+lt_aix_libpath_sed='
+    /Import File Strings/,/^$/ {
+	/^0/ {
+	    s/^0  *\(.*\)$/\1/
+	    p
+	}
+    }'
+aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
 # Check for a 64-bit object if we didn't find anything.
-if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
-}'`; fi],[])
+if test -z "$aix_libpath"; then
+  aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+fi],[])
 if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
-])# _LT_AC_SYS_LIBPATH_AIX
+])# _LT_SYS_MODULE_PATH_AIX
 
 
-# _LT_AC_SHELL_INIT(ARG)
-# ----------------------
-AC_DEFUN([_LT_AC_SHELL_INIT],
+# _LT_SHELL_INIT(ARG)
+# -------------------
+m4_define([_LT_SHELL_INIT],
 [ifdef([AC_DIVERSION_NOTICE],
 	     [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
 	 [AC_DIVERT_PUSH(NOTICE)])
 $1
 AC_DIVERT_POP
-])# _LT_AC_SHELL_INIT
+])# _LT_SHELL_INIT
 
 
-# _LT_AC_PROG_ECHO_BACKSLASH
-# --------------------------
+# _LT_PROG_ECHO_BACKSLASH
+# -----------------------
 # Add some code to the start of the generated configure script which
 # will find an echo command which doesn't interpret backslashes.
-AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH],
-[_LT_AC_SHELL_INIT([
+m4_defun([_LT_PROG_ECHO_BACKSLASH],
+[_LT_SHELL_INIT([
 # Check that we are running under the correct shell.
 SHELL=${CONFIG_SHELL-/bin/sh}
 
-case X$ECHO in
+case X$lt_ECHO in
 X*--fallback-echo)
   # Remove one level of quotation (which was required for Make).
-  ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
+  ECHO=`echo "$lt_ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
   ;;
 esac
 
-echo=${ECHO-echo}
+ECHO=${lt_ECHO-echo}
 if test "X[$]1" = X--no-reexec; then
   # Discard the --no-reexec flag, and continue.
   shift
 elif test "X[$]1" = X--fallback-echo; then
   # Avoid inline document here, it may be left over
   :
-elif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then
-  # Yippee, $echo works!
+elif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' ; then
+  # Yippee, $ECHO works!
   :
 else
   # Restart under the correct shell.
@@ -309,134 +1083,137 @@ fi
 if test "X[$]1" = X--fallback-echo; then
   # used as fallback echo
   shift
-  cat <<EOF
+  cat <<_LT_EOF
 [$]*
-EOF
+_LT_EOF
   exit 0
 fi
 
 # The HP-UX ksh and POSIX shell print the target directory to stdout
 # if CDPATH is set.
-if test "X${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
-
-if test -z "$ECHO"; then
-if test "X${echo_test_string+set}" != Xset; then
-# find a string as large as possible, as long as the shell can cope with it
-  for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
-    # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
-    if (echo_test_string="`eval $cmd`") 2>/dev/null &&
-       echo_test_string="`eval $cmd`" &&
-       (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
-    then
-      break
-    fi
-  done
-fi
-
-if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
-   echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
-   test "X$echo_testing_string" = "X$echo_test_string"; then
-  :
-else
-  # The Solaris, AIX, and Digital Unix default echo programs unquote
-  # backslashes.  This makes it impossible to quote backslashes using
-  #   echo "$something" | sed 's/\\/\\\\/g'
-  #
-  # So, first we look for a working echo in the user's PATH.
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+
+if test -z "$lt_ECHO"; then
+  if test "X${echo_test_string+set}" != Xset; then
+    # find a string as large as possible, as long as the shell can cope with it
+    for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
+      # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
+      if { echo_test_string=`eval $cmd`; } 2>/dev/null &&
+	 { test "X$echo_test_string" = "X$echo_test_string"; } 2>/dev/null
+      then
+        break
+      fi
+    done
+  fi
 
-  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
-  for dir in $PATH /usr/ucb; do
+  if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' &&
+     echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` &&
+     test "X$echo_testing_string" = "X$echo_test_string"; then
+    :
+  else
+    # The Solaris, AIX, and Digital Unix default echo programs unquote
+    # backslashes.  This makes it impossible to quote backslashes using
+    #   echo "$something" | sed 's/\\/\\\\/g'
+    #
+    # So, first we look for a working echo in the user's PATH.
+
+    lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+    for dir in $PATH /usr/ucb; do
+      IFS="$lt_save_ifs"
+      if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
+         test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
+         echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
+         test "X$echo_testing_string" = "X$echo_test_string"; then
+        ECHO="$dir/echo"
+        break
+      fi
+    done
     IFS="$lt_save_ifs"
-    if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
-       test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
-       echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
-       test "X$echo_testing_string" = "X$echo_test_string"; then
-      echo="$dir/echo"
-      break
-    fi
-  done
-  IFS="$lt_save_ifs"
 
-  if test "X$echo" = Xecho; then
-    # We didn't find a better echo, so look for alternatives.
-    if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
-       echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
-       test "X$echo_testing_string" = "X$echo_test_string"; then
-      # This shell has a builtin print -r that does the trick.
-      echo='print -r'
-    elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
-	 test "X$CONFIG_SHELL" != X/bin/ksh; then
-      # If we have ksh, try running configure again with it.
-      ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
-      export ORIGINAL_CONFIG_SHELL
-      CONFIG_SHELL=/bin/ksh
-      export CONFIG_SHELL
-      exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
-    else
-      # Try using printf.
-      echo='printf %s\n'
-      if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
-	 echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
-	 test "X$echo_testing_string" = "X$echo_test_string"; then
-	# Cool, printf works
-	:
-      elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
-	   test "X$echo_testing_string" = 'X\t' &&
-	   echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
-	   test "X$echo_testing_string" = "X$echo_test_string"; then
-	CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
-	export CONFIG_SHELL
-	SHELL="$CONFIG_SHELL"
-	export SHELL
-	echo="$CONFIG_SHELL [$]0 --fallback-echo"
-      elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
-	   test "X$echo_testing_string" = 'X\t' &&
-	   echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
-	   test "X$echo_testing_string" = "X$echo_test_string"; then
-	echo="$CONFIG_SHELL [$]0 --fallback-echo"
+    if test "X$ECHO" = Xecho; then
+      # We didn't find a better echo, so look for alternatives.
+      if test "X`{ print -r '\t'; } 2>/dev/null`" = 'X\t' &&
+         echo_testing_string=`{ print -r "$echo_test_string"; } 2>/dev/null` &&
+         test "X$echo_testing_string" = "X$echo_test_string"; then
+        # This shell has a builtin print -r that does the trick.
+        ECHO='print -r'
+      elif { test -f /bin/ksh || test -f /bin/ksh$ac_exeext; } &&
+	   test "X$CONFIG_SHELL" != X/bin/ksh; then
+        # If we have ksh, try running configure again with it.
+        ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
+        export ORIGINAL_CONFIG_SHELL
+        CONFIG_SHELL=/bin/ksh
+        export CONFIG_SHELL
+        exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
       else
-	# maybe with a smaller string...
-	prev=:
+        # Try using printf.
+        ECHO='printf %s\n'
+        if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' &&
+	   echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` &&
+	   test "X$echo_testing_string" = "X$echo_test_string"; then
+	  # Cool, printf works
+	  :
+        elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
+	     test "X$echo_testing_string" = 'X\t' &&
+	     echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
+	     test "X$echo_testing_string" = "X$echo_test_string"; then
+	  CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
+	  export CONFIG_SHELL
+	  SHELL="$CONFIG_SHELL"
+	  export SHELL
+	  ECHO="$CONFIG_SHELL [$]0 --fallback-echo"
+        elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
+	     test "X$echo_testing_string" = 'X\t' &&
+	     echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
+	     test "X$echo_testing_string" = "X$echo_test_string"; then
+	  ECHO="$CONFIG_SHELL [$]0 --fallback-echo"
+        else
+	  # maybe with a smaller string...
+	  prev=:
 
-	for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do
-	  if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null
-	  then
-	    break
-	  fi
-	  prev="$cmd"
-	done
+	  for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do
+	    if { test "X$echo_test_string" = "X`eval $cmd`"; } 2>/dev/null
+	    then
+	      break
+	    fi
+	    prev="$cmd"
+	  done
 
-	if test "$prev" != 'sed 50q "[$]0"'; then
-	  echo_test_string=`eval $prev`
-	  export echo_test_string
-	  exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"}
-	else
-	  # Oops.  We lost completely, so just stick with echo.
-	  echo=echo
-	fi
+	  if test "$prev" != 'sed 50q "[$]0"'; then
+	    echo_test_string=`eval $prev`
+	    export echo_test_string
+	    exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"}
+	  else
+	    # Oops.  We lost completely, so just stick with echo.
+	    ECHO=echo
+	  fi
+        fi
       fi
     fi
   fi
 fi
-fi
 
 # Copy echo and quote the copy suitably for passing to libtool from
 # the Makefile, instead of quoting the original, which is used later.
-ECHO=$echo
-if test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
-   ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
+lt_ECHO=$ECHO
+if test "X$lt_ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
+   lt_ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
 fi
 
-AC_SUBST(ECHO)
-])])# _LT_AC_PROG_ECHO_BACKSLASH
+AC_SUBST(lt_ECHO)
+])
+_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts])
+_LT_DECL([], [ECHO], [1],
+    [An echo program that does not interpret backslashes])
+])# _LT_PROG_ECHO_BACKSLASH
 
 
-# _LT_AC_LOCK
-# -----------
-AC_DEFUN([_LT_AC_LOCK],
+# _LT_ENABLE_LOCK
+# ---------------
+m4_defun([_LT_ENABLE_LOCK],
 [AC_ARG_ENABLE([libtool-lock],
-    [AC_HELP_STRING([--disable-libtool-lock],
-	[avoid locking (might break parallel builds)])])
+  [AS_HELP_STRING([--disable-libtool-lock],
+    [avoid locking (might break parallel builds)])])
 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
 
 # Some flags need to be propagated to the compiler or linker for good
@@ -447,12 +1224,12 @@ ia64-*-hpux*)
   echo 'int i;' > conftest.$ac_ext
   if AC_TRY_EVAL(ac_compile); then
     case `/usr/bin/file conftest.$ac_objext` in
-    *ELF-32*)
-      HPUX_IA64_MODE="32"
-      ;;
-    *ELF-64*)
-      HPUX_IA64_MODE="64"
-      ;;
+      *ELF-32*)
+	HPUX_IA64_MODE="32"
+	;;
+      *ELF-64*)
+	HPUX_IA64_MODE="64"
+	;;
     esac
   fi
   rm -rf conftest*
@@ -461,72 +1238,79 @@ ia64-*-hpux*)
   # Find out which ABI we are using.
   echo '[#]line __oline__ "configure"' > conftest.$ac_ext
   if AC_TRY_EVAL(ac_compile); then
-   if test "$lt_cv_prog_gnu_ld" = yes; then
-    case `/usr/bin/file conftest.$ac_objext` in
-    *32-bit*)
-      LD="${LD-ld} -melf32bsmip"
-      ;;
-    *N32*)
-      LD="${LD-ld} -melf32bmipn32"
-      ;;
-    *64-bit*)
-      LD="${LD-ld} -melf64bmip"
-      ;;
-    esac
-   else
-    case `/usr/bin/file conftest.$ac_objext` in
-    *32-bit*)
-      LD="${LD-ld} -32"
-      ;;
-    *N32*)
-      LD="${LD-ld} -n32"
-      ;;
-    *64-bit*)
-      LD="${LD-ld} -64"
-      ;;
-    esac
-   fi
+    if test "$lt_cv_prog_gnu_ld" = yes; then
+      case `/usr/bin/file conftest.$ac_objext` in
+	*32-bit*)
+	  LD="${LD-ld} -melf32bsmip"
+	  ;;
+	*N32*)
+	  LD="${LD-ld} -melf32bmipn32"
+	  ;;
+	*64-bit*)
+	  LD="${LD-ld} -melf64bmip"
+	;;
+      esac
+    else
+      case `/usr/bin/file conftest.$ac_objext` in
+	*32-bit*)
+	  LD="${LD-ld} -32"
+	  ;;
+	*N32*)
+	  LD="${LD-ld} -n32"
+	  ;;
+	*64-bit*)
+	  LD="${LD-ld} -64"
+	  ;;
+      esac
+    fi
   fi
   rm -rf conftest*
   ;;
 
-x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*)
+x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
+s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
   # Find out which ABI we are using.
   echo 'int i;' > conftest.$ac_ext
   if AC_TRY_EVAL(ac_compile); then
-    case "`/usr/bin/file conftest.o`" in
-    *32-bit*)
-      case $host in
-        x86_64-*linux*)
-          LD="${LD-ld} -m elf_i386"
-          ;;
-        ppc64-*linux*|powerpc64-*linux*)
-          LD="${LD-ld} -m elf32ppclinux"
-          ;;
-        s390x-*linux*)
-          LD="${LD-ld} -m elf_s390"
-          ;;
-        sparc64-*linux*)
-          LD="${LD-ld} -m elf32_sparc"
-          ;;
-      esac
-      ;;
-    *64-bit*)
-      case $host in
-        x86_64-*linux*)
-          LD="${LD-ld} -m elf_x86_64"
-          ;;
-        ppc*-*linux*|powerpc*-*linux*)
-          LD="${LD-ld} -m elf64ppc"
-          ;;
-        s390*-*linux*)
-          LD="${LD-ld} -m elf64_s390"
-          ;;
-        sparc*-*linux*)
-          LD="${LD-ld} -m elf64_sparc"
-          ;;
-      esac
-      ;;
+    case `/usr/bin/file conftest.o` in
+      *32-bit*)
+	case $host in
+	  x86_64-*kfreebsd*-gnu)
+	    LD="${LD-ld} -m elf_i386_fbsd"
+	    ;;
+	  x86_64-*linux*)
+	    LD="${LD-ld} -m elf_i386"
+	    ;;
+	  ppc64-*linux*|powerpc64-*linux*)
+	    LD="${LD-ld} -m elf32ppclinux"
+	    ;;
+	  s390x-*linux*)
+	    LD="${LD-ld} -m elf_s390"
+	    ;;
+	  sparc64-*linux*)
+	    LD="${LD-ld} -m elf32_sparc"
+	    ;;
+	esac
+	;;
+      *64-bit*)
+	case $host in
+	  x86_64-*kfreebsd*-gnu)
+	    LD="${LD-ld} -m elf_x86_64_fbsd"
+	    ;;
+	  x86_64-*linux*)
+	    LD="${LD-ld} -m elf_x86_64"
+	    ;;
+	  ppc*-*linux*|powerpc*-*linux*)
+	    LD="${LD-ld} -m elf64ppc"
+	    ;;
+	  s390*-*linux*|s390*-*tpf*)
+	    LD="${LD-ld} -m elf64_s390"
+	    ;;
+	  sparc*-*linux*)
+	    LD="${LD-ld} -m elf64_sparc"
+	    ;;
+	esac
+	;;
     esac
   fi
   rm -rf conftest*
@@ -538,37 +1322,90 @@ x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*)
   CFLAGS="$CFLAGS -belf"
   AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
     [AC_LANG_PUSH(C)
-     AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
+     AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
      AC_LANG_POP])
   if test x"$lt_cv_cc_needs_belf" != x"yes"; then
     # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
     CFLAGS="$SAVE_CFLAGS"
   fi
   ;;
-AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
-[*-*-cygwin* | *-*-mingw* | *-*-pw32*)
-  AC_CHECK_TOOL(DLLTOOL, dlltool, false)
-  AC_CHECK_TOOL(AS, as, false)
-  AC_CHECK_TOOL(OBJDUMP, objdump, false)
+sparc*-*solaris*)
+  # Find out which ABI we are using.
+  echo 'int i;' > conftest.$ac_ext
+  if AC_TRY_EVAL(ac_compile); then
+    case `/usr/bin/file conftest.o` in
+    *64-bit*)
+      case $lt_cv_prog_gnu_ld in
+      yes*) LD="${LD-ld} -m elf64_sparc" ;;
+      *)
+	if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
+	  LD="${LD-ld} -64"
+	fi
+	;;
+      esac
+      ;;
+    esac
+  fi
+  rm -rf conftest*
   ;;
-  ])
 esac
 
 need_locks="$enable_libtool_lock"
+])# _LT_ENABLE_LOCK
 
-])# _LT_AC_LOCK
 
+# _LT_CMD_OLD_ARCHIVE
+# -------------------
+m4_defun([_LT_CMD_OLD_ARCHIVE],
+[AC_CHECK_TOOL(AR, ar, false)
+test -z "$AR" && AR=ar
+test -z "$AR_FLAGS" && AR_FLAGS=cru
+_LT_DECL([], [AR], [1], [The archiver])
+_LT_DECL([], [AR_FLAGS], [1])
 
-# AC_LIBTOOL_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
+AC_CHECK_TOOL(STRIP, strip, :)
+test -z "$STRIP" && STRIP=:
+_LT_DECL([], [STRIP], [1], [A symbol stripping program])
+
+AC_CHECK_TOOL(RANLIB, ranlib, :)
+test -z "$RANLIB" && RANLIB=:
+_LT_DECL([], [RANLIB], [1],
+    [Commands used to install an old-style archive])
+
+# Determine commands to create old-style static archives.
+old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
+old_postinstall_cmds='chmod 644 $oldlib'
+old_postuninstall_cmds=
+
+if test -n "$RANLIB"; then
+  case $host_os in
+  openbsd*)
+    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib"
+    ;;
+  *)
+    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
+    ;;
+  esac
+  old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
+fi
+_LT_DECL([], [old_postinstall_cmds], [2])
+_LT_DECL([], [old_postuninstall_cmds], [2])
+_LT_TAGDECL([], [old_archive_cmds], [2],
+    [Commands used to build an old-style archive])
+])# _LT_CMD_OLD_ARCHIVE
+
+
+# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
 #		[OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
 # ----------------------------------------------------------------
 # Check whether the given compiler option works
-AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION],
-[AC_REQUIRE([LT_AC_PROG_SED])
+AC_DEFUN([_LT_COMPILER_OPTION],
+[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
+m4_require([_LT_DECL_SED])dnl
 AC_CACHE_CHECK([$1], [$2],
   [$2=no
-  ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
-   printf "$lt_simple_compile_test_code" > conftest.$ac_ext
+   m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
+   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
    lt_compiler_flag="$3"
    # Insert the option either (1) after the last *FLAGS variable, or
    # (2) before a word containing "conftest.", or (3) at the end.
@@ -576,7 +1413,7 @@ AC_CACHE_CHECK([$1], [$2],
    # with a dollar sign (not a hyphen), so the echo should work correctly.
    # The option is referenced via a variable to avoid confusing sed.
    lt_compile=`echo "$ac_compile" | $SED \
-   -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
+   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
    (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
@@ -586,58 +1423,78 @@ AC_CACHE_CHECK([$1], [$2],
    echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
    if (exit $ac_status) && test -s "$ac_outfile"; then
      # The compiler can only warn and ignore the option if not recognized
-     # So say no if there are warnings
-     if test ! -s conftest.err; then
+     # So say no if there are warnings other than the usual output.
+     $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
+     $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
+     if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
        $2=yes
      fi
    fi
-   $rm conftest*
+   $RM conftest*
 ])
 
 if test x"[$]$2" = xyes; then
-    ifelse([$5], , :, [$5])
+    m4_if([$5], , :, [$5])
 else
-    ifelse([$6], , :, [$6])
+    m4_if([$6], , :, [$6])
 fi
-])# AC_LIBTOOL_COMPILER_OPTION
+])# _LT_COMPILER_OPTION
 
+# Old name:
+AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], [])
 
-# AC_LIBTOOL_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
-#                          [ACTION-SUCCESS], [ACTION-FAILURE])
-# ------------------------------------------------------------
-# Check whether the given compiler option works
-AC_DEFUN([AC_LIBTOOL_LINKER_OPTION],
-[AC_CACHE_CHECK([$1], [$2],
+
+# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
+#                  [ACTION-SUCCESS], [ACTION-FAILURE])
+# ----------------------------------------------------
+# Check whether the given linker option works
+AC_DEFUN([_LT_LINKER_OPTION],
+[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
+m4_require([_LT_DECL_SED])dnl
+AC_CACHE_CHECK([$1], [$2],
   [$2=no
    save_LDFLAGS="$LDFLAGS"
    LDFLAGS="$LDFLAGS $3"
-   printf "$lt_simple_link_test_code" > conftest.$ac_ext
+   echo "$lt_simple_link_test_code" > conftest.$ac_ext
    if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
-     # The compiler can only warn and ignore the option if not recognized
+     # The linker can only warn and ignore the option if not recognized
      # So say no if there are warnings
      if test -s conftest.err; then
        # Append any errors to the config.log.
        cat conftest.err 1>&AS_MESSAGE_LOG_FD
+       $ECHO "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
+       $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
+       if diff conftest.exp conftest.er2 >/dev/null; then
+         $2=yes
+       fi
      else
        $2=yes
      fi
    fi
-   $rm conftest*
+   $RM -r conftest*
    LDFLAGS="$save_LDFLAGS"
 ])
 
 if test x"[$]$2" = xyes; then
-    ifelse([$4], , :, [$4])
+    m4_if([$4], , :, [$4])
 else
-    ifelse([$5], , :, [$5])
+    m4_if([$5], , :, [$5])
 fi
-])# AC_LIBTOOL_LINKER_OPTION
+])# _LT_LINKER_OPTION
 
+# Old name:
+AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], [])
 
-# AC_LIBTOOL_SYS_MAX_CMD_LEN
-# --------------------------
-AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN],
-[# find the maximum length of command line arguments
+
+# LT_CMD_MAX_LEN
+#---------------
+AC_DEFUN([LT_CMD_MAX_LEN],
+[AC_REQUIRE([AC_CANONICAL_HOST])dnl
+# find the maximum length of command line arguments
 AC_MSG_CHECKING([the maximum length of command line arguments])
 AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
   i=0
@@ -659,7 +1516,7 @@ AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
     lt_cv_sys_max_cmd_len=-1;
     ;;
 
-  cygwin* | mingw*)
+  cygwin* | mingw* | cegcc*)
     # On Win9x/ME, this test blows up -- it succeeds, but takes
     # about 5 minutes as the teststring grows exponentially.
     # Worse, since 9x/ME are not pre-emptively multitasking,
@@ -676,24 +1533,79 @@ AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
     lt_cv_sys_max_cmd_len=8192;
     ;;
 
- *)
-    # If test is not a shell built-in, we'll probably end up computing a
-    # maximum length that is only half of the actual maximum length, but
-    # we can't tell.
-    while (test "X"`$CONFIG_SHELL [$]0 --fallback-echo "X$teststring" 2>/dev/null` \
-	       = "XX$teststring") >/dev/null 2>&1 &&
-	    new_result=`expr "X$teststring" : ".*" 2>&1` &&
-	    lt_cv_sys_max_cmd_len=$new_result &&
-	    test $i != 17 # 1/2 MB should be enough
-    do
-      i=`expr $i + 1`
-      teststring=$teststring$teststring
-    done
-    teststring=
-    # Add a significant safety factor because C++ compilers can tack on massive
-    # amounts of additional arguments before passing them to the linker.
-    # It appears as though 1/2 is a usable value.
-    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
+  netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
+    # This has been around since 386BSD, at least.  Likely further.
+    if test -x /sbin/sysctl; then
+      lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
+    elif test -x /usr/sbin/sysctl; then
+      lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
+    else
+      lt_cv_sys_max_cmd_len=65536	# usable default for all BSDs
+    fi
+    # And add a safety zone
+    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
+    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
+    ;;
+
+  interix*)
+    # We know the value 262144 and hardcode it with a safety zone (like BSD)
+    lt_cv_sys_max_cmd_len=196608
+    ;;
+
+  osf*)
+    # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
+    # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
+    # nice to cause kernel panics so lets avoid the loop below.
+    # First set a reasonable default.
+    lt_cv_sys_max_cmd_len=16384
+    #
+    if test -x /sbin/sysconfig; then
+      case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
+        *1*) lt_cv_sys_max_cmd_len=-1 ;;
+      esac
+    fi
+    ;;
+  sco3.2v5*)
+    lt_cv_sys_max_cmd_len=102400
+    ;;
+  sysv5* | sco5v6* | sysv4.2uw2*)
+    kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
+    if test -n "$kargmax"; then
+      lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[	 ]]//'`
+    else
+      lt_cv_sys_max_cmd_len=32768
+    fi
+    ;;
+  *)
+    lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
+    if test -n "$lt_cv_sys_max_cmd_len"; then
+      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
+      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
+    else
+      # Make teststring a little bigger before we do anything with it.
+      # a 1K string should be a reasonable start.
+      for i in 1 2 3 4 5 6 7 8 ; do
+        teststring=$teststring$teststring
+      done
+      SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
+      # If test is not a shell built-in, we'll probably end up computing a
+      # maximum length that is only half of the actual maximum length, but
+      # we can't tell.
+      while { test "X"`$SHELL [$]0 --fallback-echo "X$teststring$teststring" 2>/dev/null` \
+	         = "XX$teststring$teststring"; } >/dev/null 2>&1 &&
+	      test $i != 17 # 1/2 MB should be enough
+      do
+        i=`expr $i + 1`
+        teststring=$teststring$teststring
+      done
+      # Only check the string length outside the loop.
+      lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
+      teststring=
+      # Add a significant safety factor because C++ compilers can tack on
+      # massive amounts of additional arguments before passing them to the
+      # linker.  It appears as though 1/2 is a usable value.
+      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
+    fi
     ;;
   esac
 ])
@@ -702,27 +1614,35 @@ if test -n $lt_cv_sys_max_cmd_len ; then
 else
   AC_MSG_RESULT(none)
 fi
-])# AC_LIBTOOL_SYS_MAX_CMD_LEN
+max_cmd_len=$lt_cv_sys_max_cmd_len
+_LT_DECL([], [max_cmd_len], [0],
+    [What is the maximum length of a command?])
+])# LT_CMD_MAX_LEN
 
+# Old name:
+AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], [])
 
-# _LT_AC_CHECK_DLFCN
-# --------------------
-AC_DEFUN([_LT_AC_CHECK_DLFCN],
-[AC_CHECK_HEADERS(dlfcn.h)dnl
-])# _LT_AC_CHECK_DLFCN
 
+# _LT_HEADER_DLFCN
+# ----------------
+m4_defun([_LT_HEADER_DLFCN],
+[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl
+])# _LT_HEADER_DLFCN
 
-# _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
-#                           ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
-# ------------------------------------------------------------------
-AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF],
-[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
+
+# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
+#                      ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
+# ----------------------------------------------------------------
+m4_defun([_LT_TRY_DLOPEN_SELF],
+[m4_require([_LT_HEADER_DLFCN])dnl
 if test "$cross_compiling" = yes; then :
   [$4]
 else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
-  cat > conftest.$ac_ext <<EOF
+  cat > conftest.$ac_ext <<_LT_EOF
 [#line __oline__ "configure"
 #include "confdefs.h"
 
@@ -764,10 +1684,6 @@ else
 #  endif
 #endif
 
-#ifdef __cplusplus
-extern "C" void exit (int);
-#endif
-
 void fnord() { int i=42;}
 int main ()
 {
@@ -780,17 +1696,19 @@ int main ()
       else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
       /* dlclose (self); */
     }
+  else
+    puts (dlerror ());
 
-    exit (status);
+  return status;
 }]
-EOF
+_LT_EOF
   if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
-    (./conftest; exit; ) 2>/dev/null
+    (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
     lt_status=$?
     case x$lt_status in
       x$lt_dlno_uscore) $1 ;;
       x$lt_dlneed_uscore) $2 ;;
-      x$lt_unknown|x*) $3 ;;
+      x$lt_dlunknown|x*) $3 ;;
     esac
   else :
     # compilation failed
@@ -798,13 +1716,13 @@ EOF
   fi
 fi
 rm -fr conftest*
-])# _LT_AC_TRY_DLOPEN_SELF
+])# _LT_TRY_DLOPEN_SELF
 
 
-# AC_LIBTOOL_DLOPEN_SELF
-# -------------------
-AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF],
-[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
+# LT_SYS_DLOPEN_SELF
+# ------------------
+AC_DEFUN([LT_SYS_DLOPEN_SELF],
+[m4_require([_LT_HEADER_DLFCN])dnl
 if test "x$enable_dlopen" != xyes; then
   enable_dlopen=unknown
   enable_dlopen_self=unknown
@@ -820,15 +1738,15 @@ else
     lt_cv_dlopen_self=yes
     ;;
 
-  mingw* | pw32*)
+  mingw* | pw32* | cegcc*)
     lt_cv_dlopen="LoadLibrary"
     lt_cv_dlopen_libs=
-   ;;
+    ;;
 
   cygwin*)
     lt_cv_dlopen="dlopen"
     lt_cv_dlopen_libs=
-   ;;
+    ;;
 
   darwin*)
   # if libdl is installed we need to link against it
@@ -838,13 +1756,13 @@ else
     lt_cv_dlopen_libs=
     lt_cv_dlopen_self=yes
     ])
-   ;;
+    ;;
 
   *)
     AC_CHECK_FUNC([shl_load],
 	  [lt_cv_dlopen="shl_load"],
       [AC_CHECK_LIB([dld], [shl_load],
-	    [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"],
+	    [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"],
 	[AC_CHECK_FUNC([dlopen],
 	      [lt_cv_dlopen="dlopen"],
 	  [AC_CHECK_LIB([dl], [dlopen],
@@ -852,7 +1770,7 @@ else
 	    [AC_CHECK_LIB([svld], [dlopen],
 		  [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
 	      [AC_CHECK_LIB([dld], [dld_link],
-		    [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"])
+		    [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"])
 	      ])
 	    ])
 	  ])
@@ -873,23 +1791,23 @@ else
     test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
 
     save_LDFLAGS="$LDFLAGS"
-    eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
+    wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
 
     save_LIBS="$LIBS"
     LIBS="$lt_cv_dlopen_libs $LIBS"
 
     AC_CACHE_CHECK([whether a program can dlopen itself],
 	  lt_cv_dlopen_self, [dnl
-	  _LT_AC_TRY_DLOPEN_SELF(
+	  _LT_TRY_DLOPEN_SELF(
 	    lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
 	    lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
     ])
 
     if test "x$lt_cv_dlopen_self" = xyes; then
-      LDFLAGS="$LDFLAGS $link_static_flag"
+      wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
       AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
-    	  lt_cv_dlopen_self_static, [dnl
-	  _LT_AC_TRY_DLOPEN_SELF(
+	  lt_cv_dlopen_self_static, [dnl
+	  _LT_TRY_DLOPEN_SELF(
 	    lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
 	    lt_cv_dlopen_self_static=no,  lt_cv_dlopen_self_static=cross)
       ])
@@ -911,22 +1829,36 @@ else
   *) enable_dlopen_self_static=unknown ;;
   esac
 fi
-])# AC_LIBTOOL_DLOPEN_SELF
+_LT_DECL([dlopen_support], [enable_dlopen], [0],
+	 [Whether dlopen is supported])
+_LT_DECL([dlopen_self], [enable_dlopen_self], [0],
+	 [Whether dlopen of programs is supported])
+_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0],
+	 [Whether dlopen of statically linked programs is supported])
+])# LT_SYS_DLOPEN_SELF
 
+# Old name:
+AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], [])
 
-# AC_LIBTOOL_PROG_CC_C_O([TAGNAME])
-# ---------------------------------
-# Check to see if options -c and -o are simultaneously supported by compiler
-AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O],
-[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
+
+# _LT_COMPILER_C_O([TAGNAME])
+# ---------------------------
+# Check to see if options -c and -o are simultaneously supported by compiler.
+# This macro does not hard code the compiler like AC_PROG_CC_C_O.
+m4_defun([_LT_COMPILER_C_O],
+[m4_require([_LT_DECL_SED])dnl
+m4_require([_LT_FILEUTILS_DEFAULTS])dnl
+m4_require([_LT_TAG_COMPILER])dnl
 AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
-  [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
-  [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
-   $rm -r conftest 2>/dev/null
+  [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
+  [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
+   $RM -r conftest 2>/dev/null
    mkdir conftest
    cd conftest
    mkdir out
-   printf "$lt_simple_compile_test_code" > conftest.$ac_ext
+   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
 
    lt_compiler_flag="-o out/conftest2.$ac_objext"
    # Insert the option either (1) after the last *FLAGS variable, or
@@ -934,7 +1866,7 @@ AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
    # Note that $ac_compile itself does not contain backslashes and begins
    # with a dollar sign (not a hyphen), so the echo should work correctly.
    lt_compile=`echo "$ac_compile" | $SED \
-   -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
+   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
    (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
@@ -946,35 +1878,41 @@ AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
    then
      # The compiler can only warn and ignore the option if not recognized
      # So say no if there are warnings
-     if test ! -s out/conftest.err; then
-       _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
+     $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
+     $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
+     if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
+       _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
      fi
    fi
-   chmod u+w .
-   $rm conftest*
+   chmod u+w . 2>&AS_MESSAGE_LOG_FD
+   $RM conftest*
    # SGI C++ compiler will create directory out/ii_files/ for
    # template instantiation
-   test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files
-   $rm out/* && rmdir out
+   test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
+   $RM out/* && rmdir out
    cd ..
-   rmdir conftest
-   $rm conftest*
+   $RM -r conftest
+   $RM conftest*
 ])
-])# AC_LIBTOOL_PROG_CC_C_O
+_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1],
+	[Does compiler simultaneously support -c and -o options?])
+])# _LT_COMPILER_C_O
 
 
-# AC_LIBTOOL_SYS_HARD_LINK_LOCKS([TAGNAME])
-# -----------------------------------------
+# _LT_COMPILER_FILE_LOCKS([TAGNAME])
+# ----------------------------------
 # Check to see if we can do hard links to lock some files if needed
-AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS],
-[AC_REQUIRE([_LT_AC_LOCK])dnl
+m4_defun([_LT_COMPILER_FILE_LOCKS],
+[m4_require([_LT_ENABLE_LOCK])dnl
+m4_require([_LT_FILEUTILS_DEFAULTS])dnl
+_LT_COMPILER_C_O([$1])
 
 hard_links="nottested"
-if test "$_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
+if test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
   # do not overwrite the value of need_locks provided by the user
   AC_MSG_CHECKING([if we can lock with hard links])
   hard_links=yes
-  $rm conftest*
+  $RM conftest*
   ln conftest.a conftest.b 2>/dev/null && hard_links=no
   touch conftest.a
   ln conftest.a conftest.b 2>&5 || hard_links=no
@@ -987,12 +1925,13 @@ if test "$_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks"
 else
   need_locks=no
 fi
-])# AC_LIBTOOL_SYS_HARD_LINK_LOCKS
+_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?])
+])# _LT_COMPILER_FILE_LOCKS
 
 
-# AC_LIBTOOL_OBJDIR
-# -----------------
-AC_DEFUN([AC_LIBTOOL_OBJDIR],
+# _LT_CHECK_OBJDIR
+# ----------------
+m4_defun([_LT_CHECK_OBJDIR],
 [AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
 [rm -f .libs 2>/dev/null
 mkdir .libs 2>/dev/null
@@ -1004,40 +1943,46 @@ else
 fi
 rmdir .libs 2>/dev/null])
 objdir=$lt_cv_objdir
-])# AC_LIBTOOL_OBJDIR
+_LT_DECL([], [objdir], [0],
+         [The name of the directory that contains temporary libtool files])dnl
+m4_pattern_allow([LT_OBJDIR])dnl
+AC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/",
+  [Define to the sub-directory in which libtool stores uninstalled libraries.])
+])# _LT_CHECK_OBJDIR
 
 
-# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([TAGNAME])
-# ----------------------------------------------
+# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME])
+# --------------------------------------
 # Check hardcoding attributes.
-AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH],
+m4_defun([_LT_LINKER_HARDCODE_LIBPATH],
 [AC_MSG_CHECKING([how to hardcode library paths into programs])
-_LT_AC_TAGVAR(hardcode_action, $1)=
-if test -n "$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)" || \
-   test -n "$_LT_AC_TAGVAR(runpath_var $1)" || \
-   test "X$_LT_AC_TAGVAR(hardcode_automatic, $1)"="Xyes" ; then
+_LT_TAGVAR(hardcode_action, $1)=
+if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" ||
+   test -n "$_LT_TAGVAR(runpath_var, $1)" ||
+   test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then
 
-  # We can hardcode non-existant directories.
-  if test "$_LT_AC_TAGVAR(hardcode_direct, $1)" != no &&
+  # We can hardcode non-existent directories.
+  if test "$_LT_TAGVAR(hardcode_direct, $1)" != no &&
      # If the only mechanism to avoid hardcoding is shlibpath_var, we
      # have to relink, otherwise we might link with an installed library
      # when we should be linking with a yet-to-be-installed one
-     ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
-     test "$_LT_AC_TAGVAR(hardcode_minus_L, $1)" != no; then
+     ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
+     test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then
     # Linking always hardcodes the temporary library directory.
-    _LT_AC_TAGVAR(hardcode_action, $1)=relink
+    _LT_TAGVAR(hardcode_action, $1)=relink
   else
     # We can link without hardcoding, and we can hardcode nonexisting dirs.
-    _LT_AC_TAGVAR(hardcode_action, $1)=immediate
+    _LT_TAGVAR(hardcode_action, $1)=immediate
   fi
 else
   # We cannot hardcode anything, or else we can only hardcode existing
   # directories.
-  _LT_AC_TAGVAR(hardcode_action, $1)=unsupported
+  _LT_TAGVAR(hardcode_action, $1)=unsupported
 fi
-AC_MSG_RESULT([$_LT_AC_TAGVAR(hardcode_action, $1)])
+AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)])
 
-if test "$_LT_AC_TAGVAR(hardcode_action, $1)" = relink; then
+if test "$_LT_TAGVAR(hardcode_action, $1)" = relink ||
+   test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then
   # Fast installation is not supported
   enable_fast_install=no
 elif test "$shlibpath_overrides_runpath" = yes ||
@@ -1045,43 +1990,107 @@ elif test "$shlibpath_overrides_runpath" = yes ||
   # Fast installation is not necessary
   enable_fast_install=needless
 fi
-])# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH
+_LT_TAGDECL([], [hardcode_action], [0],
+    [How to hardcode a shared library path into an executable])
+])# _LT_LINKER_HARDCODE_LIBPATH
 
 
-# AC_LIBTOOL_SYS_LIB_STRIP
-# ------------------------
-AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP],
-[striplib=
+# _LT_CMD_STRIPLIB
+# ----------------
+m4_defun([_LT_CMD_STRIPLIB],
+[m4_require([_LT_DECL_EGREP])
+striplib=
 old_striplib=
 AC_MSG_CHECKING([whether stripping libraries is possible])
-if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
+if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
   test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
   test -z "$striplib" && striplib="$STRIP --strip-unneeded"
   AC_MSG_RESULT([yes])
 else
 # FIXME - insert some real tests, host_os isn't really good enough
   case $host_os in
-   darwin*)
-       if test -n "$STRIP" ; then
-         striplib="$STRIP -x"
-         AC_MSG_RESULT([yes])
-       else
-  AC_MSG_RESULT([no])
-fi
-       ;;
-   *)
-  AC_MSG_RESULT([no])
+  darwin*)
+    if test -n "$STRIP" ; then
+      striplib="$STRIP -x"
+      old_striplib="$STRIP -S"
+      AC_MSG_RESULT([yes])
+    else
+      AC_MSG_RESULT([no])
+    fi
+    ;;
+  *)
+    AC_MSG_RESULT([no])
     ;;
   esac
 fi
-])# AC_LIBTOOL_SYS_LIB_STRIP
+_LT_DECL([], [old_striplib], [1], [Commands to strip libraries])
+_LT_DECL([], [striplib], [1])
+])# _LT_CMD_STRIPLIB
 
 
-# AC_LIBTOOL_SYS_DYNAMIC_LINKER
+# _LT_SYS_DYNAMIC_LINKER([TAG])
 # -----------------------------
 # PORTME Fill in your ld.so characteristics
-AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER],
-[AC_MSG_CHECKING([dynamic linker characteristics])
+m4_defun([_LT_SYS_DYNAMIC_LINKER],
+[AC_REQUIRE([AC_CANONICAL_HOST])dnl
+m4_require([_LT_DECL_EGREP])dnl
+m4_require([_LT_FILEUTILS_DEFAULTS])dnl
+m4_require([_LT_DECL_OBJDUMP])dnl
+m4_require([_LT_DECL_SED])dnl
+AC_MSG_CHECKING([dynamic linker characteristics])
+m4_if([$1],
+	[], [
+if test "$GCC" = yes; then
+  case $host_os in
+    darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
+    *) lt_awk_arg="/^libraries:/" ;;
+  esac
+  lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"`
+  if $ECHO "$lt_search_path_spec" | $GREP ';' >/dev/null ; then
+    # if the path contains ";" then we assume it to be the separator
+    # otherwise default to the standard path separator (i.e. ":") - it is
+    # assumed that no part of a normal pathname contains ";" but that should
+    # okay in the real world where ";" in dirpaths is itself problematic.
+    lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e 's/;/ /g'`
+  else
+    lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
+  fi
+  # Ok, now we have the path, separated by spaces, we can step through it
+  # and add multilib dir if necessary.
+  lt_tmp_lt_search_path_spec=
+  lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
+  for lt_sys_path in $lt_search_path_spec; do
+    if test -d "$lt_sys_path/$lt_multi_os_dir"; then
+      lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir"
+    else
+      test -d "$lt_sys_path" && \
+	lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
+    fi
+  done
+  lt_search_path_spec=`$ECHO $lt_tmp_lt_search_path_spec | awk '
+BEGIN {RS=" "; FS="/|\n";} {
+  lt_foo="";
+  lt_count=0;
+  for (lt_i = NF; lt_i > 0; lt_i--) {
+    if ($lt_i != "" && $lt_i != ".") {
+      if ($lt_i == "..") {
+        lt_count++;
+      } else {
+        if (lt_count == 0) {
+          lt_foo="/" $lt_i lt_foo;
+        } else {
+          lt_count--;
+        }
+      }
+    }
+  }
+  if (lt_foo != "") { lt_freq[[lt_foo]]++; }
+  if (lt_freq[[lt_foo]] == 1) { print lt_foo; }
+}'`
+  sys_lib_search_path_spec=`$ECHO $lt_search_path_spec`
+else
+  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
+fi])
 library_names_spec=
 libname_spec='lib$name'
 soname_spec=
@@ -1095,20 +2104,6 @@ shlibpath_overrides_runpath=unknown
 version_type=none
 dynamic_linker="$host_os ld.so"
 sys_lib_dlsearch_path_spec="/lib /usr/lib"
-if test "$GCC" = yes; then
-  sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
-  if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then
-    # if the path contains ";" then we assume it to be the separator
-    # otherwise default to the standard path separator (i.e. ":") - it is
-    # assumed that no part of a normal pathname contains ";" but that should
-    # okay in the real world where ";" in dirpaths is itself problematic.
-    sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
-  else
-    sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
-  fi
-else
-  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
-fi
 need_lib_prefix=unknown
 hardcode_into_libs=no
 
@@ -1126,7 +2121,7 @@ aix3*)
   soname_spec='${libname}${release}${shared_ext}$major'
   ;;
 
-aix4* | aix5*)
+aix[[4-9]]*)
   version_type=linux
   need_lib_prefix=no
   need_version=no
@@ -1145,7 +2140,7 @@ aix4* | aix5*)
       aix4 | aix4.[[01]] | aix4.[[01]].*)
       if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
 	   echo ' yes '
-	   echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
+	   echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then
 	:
       else
 	can_build_shared=no
@@ -1171,9 +2166,18 @@ aix4* | aix5*)
   ;;
 
 amigaos*)
-  library_names_spec='$libname.ixlibrary $libname.a'
-  # Create ${libname}_ixlibrary.a entries in /sys/libs.
-  finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
+  case $host_cpu in
+  powerpc)
+    # Since July 2007 AmigaOS4 officially supports .so libraries.
+    # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+    ;;
+  m68k)
+    library_names_spec='$libname.ixlibrary $libname.a'
+    # Create ${libname}_ixlibrary.a entries in /sys/libs.
+    finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$ECHO "X$lib" | $Xsed -e '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
+    ;;
+  esac
   ;;
 
 beos*)
@@ -1182,7 +2186,7 @@ beos*)
   shlibpath_var=LIBRARY_PATH
   ;;
 
-bsdi4*)
+bsdi[[45]]*)
   version_type=linux
   need_version=no
   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
@@ -1196,24 +2200,28 @@ bsdi4*)
   # libtool to hard-code these into programs
   ;;
 
-cygwin* | mingw* | pw32*)
+cygwin* | mingw* | pw32* | cegcc*)
   version_type=windows
   shrext_cmds=".dll"
   need_version=no
   need_lib_prefix=no
 
   case $GCC,$host_os in
-  yes,cygwin* | yes,mingw* | yes,pw32*)
+  yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*)
     library_names_spec='$libname.dll.a'
     # DLL is installed to $(libdir)/../bin by postinstall_cmds
     postinstall_cmds='base_file=`basename \${file}`~
-      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~
+      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
       dldir=$destdir/`dirname \$dlpath`~
       test -d \$dldir || mkdir -p \$dldir~
-      $install_prog $dir/$dlname \$dldir/$dlname'
+      $install_prog $dir/$dlname \$dldir/$dlname~
+      chmod a+x \$dldir/$dlname~
+      if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
+        eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
+      fi'
     postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
       dlpath=$dir/\$dldll~
-       $rm \$dlpath'
+       $RM \$dlpath'
     shlibpath_overrides_runpath=yes
 
     case $host_os in
@@ -1222,25 +2230,25 @@ cygwin* | mingw* | pw32*)
       soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
       sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
       ;;
-    mingw*)
+    mingw* | cegcc*)
       # MinGW DLLs use traditional 'lib' prefix
       soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
-      sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
-      if echo "$sys_lib_search_path_spec" | [grep ';[c-zC-Z]:/' >/dev/null]; then
+      sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
+      if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then
         # It is most probably a Windows format PATH printed by
         # mingw gcc, but we are running on Cygwin. Gcc prints its search
         # path with ; separators, and with drive letters. We can handle the
         # drive letters (cygwin fileutils understands them), so leave them,
         # especially as we might pass files found there to a mingw objdump,
         # which wouldn't understand a cygwinified path. Ahh.
-        sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
+        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
       else
-        sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
+        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
       fi
       ;;
     pw32*)
       # pw32 DLLs use 'pw' prefix rather than 'lib'
-      library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
+      library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
       ;;
     esac
     ;;
@@ -1259,17 +2267,13 @@ darwin* | rhapsody*)
   version_type=darwin
   need_lib_prefix=no
   need_version=no
-  library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext'
+  library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext'
   soname_spec='${libname}${release}${major}$shared_ext'
   shlibpath_overrides_runpath=yes
   shlibpath_var=DYLD_LIBRARY_PATH
-  shrext_cmds='$(test .$module = .yes && echo .so || echo .dylib)'
-  # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same.
-  if test "$GCC" = yes; then
-    sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"`
-  else
-    sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib'
-  fi
+  shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
+m4_if([$1], [],[
+  sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"])
   sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
   ;;
 
@@ -1286,20 +2290,17 @@ freebsd1*)
   dynamic_linker=no
   ;;
 
-kfreebsd*-gnu)
-  version_type=linux
-  need_lib_prefix=no
-  need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
-  shlibpath_var=LD_LIBRARY_PATH
-  shlibpath_overrides_runpath=no
-  hardcode_into_libs=yes
-  dynamic_linker='GNU ld.so'
-  ;;
-
-freebsd*)
-  objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
+freebsd* | dragonfly*)
+  # DragonFly does not have aout.  When/if they implement a new
+  # versioning mechanism, adjust this.
+  if test -x /usr/bin/objformat; then
+    objformat=`/usr/bin/objformat`
+  else
+    case $host_os in
+    freebsd[[123]]*) objformat=aout ;;
+    *) objformat=elf ;;
+    esac
+  fi
   version_type=freebsd-$objformat
   case $version_type in
     freebsd-elf*)
@@ -1317,14 +2318,19 @@ freebsd*)
   freebsd2*)
     shlibpath_overrides_runpath=yes
     ;;
-  freebsd3.[01]* | freebsdelf3.[01]*)
+  freebsd3.[[01]]* | freebsdelf3.[[01]]*)
     shlibpath_overrides_runpath=yes
     hardcode_into_libs=yes
     ;;
-  *) # from 3.2 on
+  freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
+  freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
     shlibpath_overrides_runpath=no
     hardcode_into_libs=yes
     ;;
+  *) # from 4.6 on, and DragonFly
+    shlibpath_overrides_runpath=yes
+    hardcode_into_libs=yes
+    ;;
   esac
   ;;
 
@@ -1344,7 +2350,7 @@ hpux9* | hpux10* | hpux11*)
   version_type=sunos
   need_lib_prefix=no
   need_version=no
-  case "$host_cpu" in
+  case $host_cpu in
   ia64*)
     shrext_cmds='.so'
     hardcode_into_libs=yes
@@ -1360,18 +2366,18 @@ hpux9* | hpux10* | hpux11*)
     fi
     sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
     ;;
-   hppa*64*)
-     shrext_cmds='.sl'
-     hardcode_into_libs=yes
-     dynamic_linker="$host_os dld.sl"
-     shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
-     shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
-     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-     soname_spec='${libname}${release}${shared_ext}$major'
-     sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
-     sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
-     ;;
-   *)
+  hppa*64*)
+    shrext_cmds='.sl'
+    hardcode_into_libs=yes
+    dynamic_linker="$host_os dld.sl"
+    shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
+    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+    soname_spec='${libname}${release}${shared_ext}$major'
+    sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
+    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
+    ;;
+  *)
     shrext_cmds='.sl'
     dynamic_linker="$host_os dld.sl"
     shlibpath_var=SHLIB_PATH
@@ -1384,6 +2390,18 @@ hpux9* | hpux10* | hpux11*)
   postinstall_cmds='chmod 555 $lib'
   ;;
 
+interix[[3-9]]*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=no
+  hardcode_into_libs=yes
+  ;;
+
 irix5* | irix6* | nonstopux*)
   case $host_os in
     nonstopux*) version_type=nonstopux ;;
@@ -1427,7 +2445,7 @@ linux*oldld* | linux*aout* | linux*coff*)
   ;;
 
 # This must be Linux ELF.
-linux*)
+linux* | k*bsd*-gnu)
   version_type=linux
   need_lib_prefix=no
   need_version=no
@@ -1436,6 +2454,17 @@ linux*)
   finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
   shlibpath_var=LD_LIBRARY_PATH
   shlibpath_overrides_runpath=no
+  # Some binutils ld are patched to set DT_RUNPATH
+  save_LDFLAGS=$LDFLAGS
+  save_libdir=$libdir
+  eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \
+       LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\""
+  AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
+    [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null],
+       [shlibpath_overrides_runpath=yes])])
+  LDFLAGS=$save_LDFLAGS
+  libdir=$save_libdir
+
   # This implies no fast_install, which is unacceptable.
   # Some rework will be needed to allow for fast_install
   # before this can be enabled.
@@ -1443,7 +2472,7 @@ linux*)
 
   # Append ld.so.conf contents to the search path
   if test -f /etc/ld.so.conf; then
-    lt_ld_extra=`$SED -e 's/[:,\t]/ /g;s/=[^=]*$//;s/=[^= ]* / /g' /etc/ld.so.conf | tr '\n' ' '`
+    lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[	 ]*hwcap[	 ]/d;s/[:,	]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
     sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
   fi
 
@@ -1456,7 +2485,7 @@ linux*)
   dynamic_linker='GNU/Linux ld.so'
   ;;
 
-knetbsd*-gnu)
+netbsdelf*-gnu)
   version_type=linux
   need_lib_prefix=no
   need_version=no
@@ -1465,14 +2494,14 @@ knetbsd*-gnu)
   shlibpath_var=LD_LIBRARY_PATH
   shlibpath_overrides_runpath=no
   hardcode_into_libs=yes
-  dynamic_linker='GNU ld.so'
+  dynamic_linker='NetBSD ld.elf_so'
   ;;
 
 netbsd*)
   version_type=sunos
   need_lib_prefix=no
   need_version=no
-  if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
+  if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
     finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
     dynamic_linker='NetBSD (a.out) ld.so'
@@ -1493,24 +2522,31 @@ newsos6)
   shlibpath_overrides_runpath=yes
   ;;
 
-nto-qnx*)
-  version_type=linux
+*nto* | *qnx*)
+  version_type=qnx
   need_lib_prefix=no
   need_version=no
   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
   soname_spec='${libname}${release}${shared_ext}$major'
   shlibpath_var=LD_LIBRARY_PATH
-  shlibpath_overrides_runpath=yes
+  shlibpath_overrides_runpath=no
+  hardcode_into_libs=yes
+  dynamic_linker='ldqnx.so'
   ;;
 
 openbsd*)
   version_type=sunos
+  sys_lib_dlsearch_path_spec="/usr/lib"
   need_lib_prefix=no
-  need_version=yes
+  # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
+  case $host_os in
+    openbsd3.3 | openbsd3.3.*)	need_version=yes ;;
+    *)				need_version=no  ;;
+  esac
   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
   finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
   shlibpath_var=LD_LIBRARY_PATH
-  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
     case $host_os in
       openbsd2.[[89]] | openbsd2.[[89]].*)
 	shlibpath_overrides_runpath=no
@@ -1544,11 +2580,8 @@ osf3* | osf4* | osf5*)
   sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
   ;;
 
-sco3.2v5*)
-  version_type=osf
-  soname_spec='${libname}${release}${shared_ext}$major'
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-  shlibpath_var=LD_LIBRARY_PATH
+rdos*)
+  dynamic_linker=no
   ;;
 
 solaris*)
@@ -1576,7 +2609,7 @@ sunos4*)
   need_version=yes
   ;;
 
-sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
+sysv4 | sysv4.3*)
   version_type=linux
   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
   soname_spec='${libname}${release}${shared_ext}$major'
@@ -1585,7 +2618,6 @@ sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
     sni)
       shlibpath_overrides_runpath=no
       need_lib_prefix=no
-      export_dynamic_flag_spec='${wl}-Blargedynsym'
       runpath_var=LD_RUN_PATH
       ;;
     siemens)
@@ -1609,6 +2641,39 @@ sysv4*MP*)
   fi
   ;;
 
+sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
+  version_type=freebsd-elf
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+  hardcode_into_libs=yes
+  if test "$with_gnu_ld" = yes; then
+    sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
+  else
+    sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
+    case $host_os in
+      sco3.2v5*)
+        sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
+	;;
+    esac
+  fi
+  sys_lib_dlsearch_path_spec='/usr/lib'
+  ;;
+
+tpf*)
+  # TPF is a cross-target only.  Preferred cross-host = GNU/Linux.
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=no
+  hardcode_into_libs=yes
+  ;;
+
 uts4*)
   version_type=linux
   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
@@ -1622,271 +2687,59 @@ uts4*)
 esac
 AC_MSG_RESULT([$dynamic_linker])
 test "$dynamic_linker" = no && can_build_shared=no
-])# AC_LIBTOOL_SYS_DYNAMIC_LINKER
-
-
-# _LT_AC_TAGCONFIG
-# ----------------
-AC_DEFUN([_LT_AC_TAGCONFIG],
-[AC_ARG_WITH([tags],
-    [AC_HELP_STRING([--with-tags@<:@=TAGS@:>@],
-        [include additional configurations @<:@automatic@:>@])],
-    [tagnames="$withval"])
-
-if test -f "$ltmain" && test -n "$tagnames"; then
-  if test ! -f "${ofile}"; then
-    AC_MSG_WARN([output file `$ofile' does not exist])
-  fi
-
-  if test -z "$LTCC"; then
-    eval "`$SHELL ${ofile} --config | grep '^LTCC='`"
-    if test -z "$LTCC"; then
-      AC_MSG_WARN([output file `$ofile' does not look like a libtool script])
-    else
-      AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile'])
-    fi
-  fi
 
-  # Extract list of available tagged configurations in $ofile.
-  # Note that this assumes the entire list is on one line.
-  available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'`
-
-  lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
-  for tagname in $tagnames; do
-    IFS="$lt_save_ifs"
-    # Check whether tagname contains only valid characters
-    case `$echo "X$tagname" | $Xsed -e 's:[[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]]::g'` in
-    "") ;;
-    *)  AC_MSG_ERROR([invalid tag name: $tagname])
-	;;
-    esac
-
-    if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null
-    then
-      AC_MSG_ERROR([tag name \"$tagname\" already exists])
-    fi
-
-    # Update the list of available tags.
-    if test -n "$tagname"; then
-      echo appending configuration tag \"$tagname\" to $ofile
-
-      case $tagname in
-      CXX)
-	if test -n "$CXX" && test "X$CXX" != "Xno"; then
-	  AC_LIBTOOL_LANG_CXX_CONFIG
-	else
-	  tagname=""
-	fi
-	;;
-
-      F77)
-	if test -n "$F77" && test "X$F77" != "Xno"; then
-	  AC_LIBTOOL_LANG_F77_CONFIG
-	else
-	  tagname=""
-	fi
-	;;
-
-      GCJ)
-	if test -n "$GCJ" && test "X$GCJ" != "Xno"; then
-	  AC_LIBTOOL_LANG_GCJ_CONFIG
-	else
-	  tagname=""
-	fi
-	;;
-
-      RC)
-	AC_LIBTOOL_LANG_RC_CONFIG
-	;;
-
-      *)
-	AC_MSG_ERROR([Unsupported tag name: $tagname])
-	;;
-      esac
-
-      # Append the new tag name to the list of available tags.
-      if test -n "$tagname" ; then
-      available_tags="$available_tags $tagname"
-    fi
-    fi
-  done
-  IFS="$lt_save_ifs"
-
-  # Now substitute the updated list of available tags.
-  if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then
-    mv "${ofile}T" "$ofile"
-    chmod +x "$ofile"
-  else
-    rm -f "${ofile}T"
-    AC_MSG_ERROR([unable to update list of available tagged configurations.])
-  fi
+variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
+if test "$GCC" = yes; then
+  variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
 fi
-])# _LT_AC_TAGCONFIG
-
-
-# AC_LIBTOOL_DLOPEN
-# -----------------
-# enable checks for dlopen support
-AC_DEFUN([AC_LIBTOOL_DLOPEN],
- [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])
-])# AC_LIBTOOL_DLOPEN
-
-
-# AC_LIBTOOL_WIN32_DLL
-# --------------------
-# declare package support for building win32 dll's
-AC_DEFUN([AC_LIBTOOL_WIN32_DLL],
-[AC_BEFORE([$0], [AC_LIBTOOL_SETUP])
-])# AC_LIBTOOL_WIN32_DLL
-
-
-# AC_ENABLE_SHARED([DEFAULT])
-# ---------------------------
-# implement the --enable-shared flag
-# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
-AC_DEFUN([AC_ENABLE_SHARED],
-[define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
-AC_ARG_ENABLE([shared],
-    [AC_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
-	[build shared libraries @<:@default=]AC_ENABLE_SHARED_DEFAULT[@:>@])],
-    [p=${PACKAGE-default}
-    case $enableval in
-    yes) enable_shared=yes ;;
-    no) enable_shared=no ;;
-    *)
-      enable_shared=no
-      # Look at the argument we got.  We use all the common list separators.
-      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
-      for pkg in $enableval; do
-	IFS="$lt_save_ifs"
-	if test "X$pkg" = "X$p"; then
-	  enable_shared=yes
-	fi
-      done
-      IFS="$lt_save_ifs"
-      ;;
-    esac],
-    [enable_shared=]AC_ENABLE_SHARED_DEFAULT)
-])# AC_ENABLE_SHARED
-
-
-# AC_DISABLE_SHARED
-# -----------------
-#- set the default shared flag to --disable-shared
-AC_DEFUN([AC_DISABLE_SHARED],
-[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
-AC_ENABLE_SHARED(no)
-])# AC_DISABLE_SHARED
-
-
-# AC_ENABLE_STATIC([DEFAULT])
-# ---------------------------
-# implement the --enable-static flag
-# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
-AC_DEFUN([AC_ENABLE_STATIC],
-[define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
-AC_ARG_ENABLE([static],
-    [AC_HELP_STRING([--enable-static@<:@=PKGS@:>@],
-	[build static libraries @<:@default=]AC_ENABLE_STATIC_DEFAULT[@:>@])],
-    [p=${PACKAGE-default}
-    case $enableval in
-    yes) enable_static=yes ;;
-    no) enable_static=no ;;
-    *)
-     enable_static=no
-      # Look at the argument we got.  We use all the common list separators.
-      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
-      for pkg in $enableval; do
-	IFS="$lt_save_ifs"
-	if test "X$pkg" = "X$p"; then
-	  enable_static=yes
-	fi
-      done
-      IFS="$lt_save_ifs"
-      ;;
-    esac],
-    [enable_static=]AC_ENABLE_STATIC_DEFAULT)
-])# AC_ENABLE_STATIC
-
-
-# AC_DISABLE_STATIC
-# -----------------
-# set the default static flag to --disable-static
-AC_DEFUN([AC_DISABLE_STATIC],
-[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
-AC_ENABLE_STATIC(no)
-])# AC_DISABLE_STATIC
-
-
-# AC_ENABLE_FAST_INSTALL([DEFAULT])
-# ---------------------------------
-# implement the --enable-fast-install flag
-# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
-AC_DEFUN([AC_ENABLE_FAST_INSTALL],
-[define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
-AC_ARG_ENABLE([fast-install],
-    [AC_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
-    [optimize for fast installation @<:@default=]AC_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
-    [p=${PACKAGE-default}
-    case $enableval in
-    yes) enable_fast_install=yes ;;
-    no) enable_fast_install=no ;;
-    *)
-      enable_fast_install=no
-      # Look at the argument we got.  We use all the common list separators.
-      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
-      for pkg in $enableval; do
-	IFS="$lt_save_ifs"
-	if test "X$pkg" = "X$p"; then
-	  enable_fast_install=yes
-	fi
-      done
-      IFS="$lt_save_ifs"
-      ;;
-    esac],
-    [enable_fast_install=]AC_ENABLE_FAST_INSTALL_DEFAULT)
-])# AC_ENABLE_FAST_INSTALL
-
-
-# AC_DISABLE_FAST_INSTALL
-# -----------------------
-# set the default to --disable-fast-install
-AC_DEFUN([AC_DISABLE_FAST_INSTALL],
-[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
-AC_ENABLE_FAST_INSTALL(no)
-])# AC_DISABLE_FAST_INSTALL
 
+if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then
+  sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
+fi
+if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then
+  sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
+fi
 
-# AC_LIBTOOL_PICMODE([MODE])
+_LT_DECL([], [variables_saved_for_relink], [1],
+    [Variables whose values should be saved in libtool wrapper scripts and
+    restored at link time])
+_LT_DECL([], [need_lib_prefix], [0],
+    [Do we need the "lib" prefix for modules?])
+_LT_DECL([], [need_version], [0], [Do we need a version for libraries?])
+_LT_DECL([], [version_type], [0], [Library versioning type])
+_LT_DECL([], [runpath_var], [0],  [Shared library runtime path variable])
+_LT_DECL([], [shlibpath_var], [0],[Shared library path variable])
+_LT_DECL([], [shlibpath_overrides_runpath], [0],
+    [Is shlibpath searched before the hard-coded library search path?])
+_LT_DECL([], [libname_spec], [1], [Format of library name prefix])
+_LT_DECL([], [library_names_spec], [1],
+    [[List of archive names.  First name is the real one, the rest are links.
+    The last name is the one that the linker finds with -lNAME]])
+_LT_DECL([], [soname_spec], [1],
+    [[The coded name of the library, if different from the real name]])
+_LT_DECL([], [postinstall_cmds], [2],
+    [Command to use after installation of a shared archive])
+_LT_DECL([], [postuninstall_cmds], [2],
+    [Command to use after uninstallation of a shared archive])
+_LT_DECL([], [finish_cmds], [2],
+    [Commands used to finish a libtool library installation in a directory])
+_LT_DECL([], [finish_eval], [1],
+    [[As "finish_cmds", except a single script fragment to be evaled but
+    not shown]])
+_LT_DECL([], [hardcode_into_libs], [0],
+    [Whether we should hardcode library paths into libraries])
+_LT_DECL([], [sys_lib_search_path_spec], [2],
+    [Compile-time system search path for libraries])
+_LT_DECL([], [sys_lib_dlsearch_path_spec], [2],
+    [Run-time system search path for libraries])
+])# _LT_SYS_DYNAMIC_LINKER
+
+
+# _LT_PATH_TOOL_PREFIX(TOOL)
 # --------------------------
-# implement the --with-pic flag
-# MODE is either `yes' or `no'.  If omitted, it defaults to `both'.
-AC_DEFUN([AC_LIBTOOL_PICMODE],
-[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
-pic_mode=ifelse($#,1,$1,default)
-])# AC_LIBTOOL_PICMODE
-
-
-# AC_PROG_EGREP
-# -------------
-# This is predefined starting with Autoconf 2.54, so this conditional
-# definition can be removed once we require Autoconf 2.54 or later.
-m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP],
-[AC_CACHE_CHECK([for egrep], [ac_cv_prog_egrep],
-   [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])
- EGREP=$ac_cv_prog_egrep
- AC_SUBST([EGREP])
-])])
-
-
-# AC_PATH_TOOL_PREFIX
-# -------------------
-# find a file program which can recognise shared library
-AC_DEFUN([AC_PATH_TOOL_PREFIX],
-[AC_REQUIRE([AC_PROG_EGREP])dnl
+# find a file program which can recognize shared library
+AC_DEFUN([_LT_PATH_TOOL_PREFIX],
+[m4_require([_LT_DECL_EGREP])dnl
 AC_MSG_CHECKING([for $1])
 AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
 [case $MAGIC_CMD in
@@ -1899,7 +2752,7 @@ AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
 dnl $ac_dummy forces splitting on constant user-supplied paths.
 dnl POSIX.2 word splitting is done only on the output of word expansions,
 dnl not every word.  This closes a longstanding sh security hole.
-  ac_dummy="ifelse([$2], , $PATH, [$2])"
+  ac_dummy="m4_if([$2], , $PATH, [$2])"
   for ac_dir in $ac_dummy; do
     IFS="$lt_save_ifs"
     test -z "$ac_dir" && ac_dir=.
@@ -1908,13 +2761,13 @@ dnl not every word.  This closes a longstanding sh security hole.
       if test -n "$file_magic_test_file"; then
 	case $deplibs_check_method in
 	"file_magic "*)
-	  file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
+	  file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
 	  MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
 	  if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
 	    $EGREP "$file_magic_regex" > /dev/null; then
 	    :
 	  else
-	    cat <<EOF 1>&2
+	    cat <<_LT_EOF 1>&2
 
 *** Warning: the command libtool uses to detect shared libraries,
 *** $file_magic_cmd, produces output that libtool cannot recognize.
@@ -1925,7 +2778,7 @@ dnl not every word.  This closes a longstanding sh security hole.
 *** may want to report the problem to your system manager and/or to
 *** bug-libtool@gnu.org
 
-EOF
+_LT_EOF
 	  fi ;;
 	esac
       fi
@@ -1942,37 +2795,47 @@ if test -n "$MAGIC_CMD"; then
 else
   AC_MSG_RESULT(no)
 fi
-])# AC_PATH_TOOL_PREFIX
+_LT_DECL([], [MAGIC_CMD], [0],
+	 [Used to examine libraries when file_magic_cmd begins with "file"])dnl
+])# _LT_PATH_TOOL_PREFIX
 
+# Old name:
+AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], [])
 
-# AC_PATH_MAGIC
-# -------------
-# find a file program which can recognise a shared library
-AC_DEFUN([AC_PATH_MAGIC],
-[AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
+
+# _LT_PATH_MAGIC
+# --------------
+# find a file program which can recognize a shared library
+m4_defun([_LT_PATH_MAGIC],
+[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
 if test -z "$lt_cv_path_MAGIC_CMD"; then
   if test -n "$ac_tool_prefix"; then
-    AC_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
+    _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
   else
     MAGIC_CMD=:
   fi
 fi
-])# AC_PATH_MAGIC
+])# _LT_PATH_MAGIC
 
 
-# AC_PROG_LD
+# LT_PATH_LD
 # ----------
 # find the pathname to the GNU or non-GNU linker
-AC_DEFUN([AC_PROG_LD],
-[AC_ARG_WITH([gnu-ld],
-    [AC_HELP_STRING([--with-gnu-ld],
-	[assume the C compiler uses GNU ld @<:@default=no@:>@])],
-    [test "$withval" = no || with_gnu_ld=yes],
-    [with_gnu_ld=no])
-AC_REQUIRE([LT_AC_PROG_SED])dnl
-AC_REQUIRE([AC_PROG_CC])dnl
+AC_DEFUN([LT_PATH_LD],
+[AC_REQUIRE([AC_PROG_CC])dnl
 AC_REQUIRE([AC_CANONICAL_HOST])dnl
 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
+m4_require([_LT_DECL_SED])dnl
+m4_require([_LT_DECL_EGREP])dnl
+
+AC_ARG_WITH([gnu-ld],
+    [AS_HELP_STRING([--with-gnu-ld],
+	[assume the C compiler uses GNU ld @<:@default=no@:>@])],
+    [test "$withval" = no || with_gnu_ld=yes],
+    [with_gnu_ld=no])dnl
+
 ac_prog=ld
 if test "$GCC" = yes; then
   # Check if gcc -print-prog-name=ld gives a path.
@@ -1989,9 +2852,9 @@ if test "$GCC" = yes; then
     [[\\/]]* | ?:[[\\/]]*)
       re_direlt='/[[^/]][[^/]]*/\.\./'
       # Canonicalize the pathname of ld
-      ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'`
-      while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
-	ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"`
+      ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
+      while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
+	ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
       done
       test -z "$LD" && LD="$ac_prog"
       ;;
@@ -2018,7 +2881,7 @@ AC_CACHE_VAL(lt_cv_path_LD,
     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
       lt_cv_path_LD="$ac_dir/$ac_prog"
       # Check to see if the program is GNU ld.  I'd rather use --version,
-      # but apparently some GNU ld's only accept -v.
+      # but apparently some variants of GNU ld only accept -v.
       # Break only if it was the GNU/non-GNU ld that we prefer.
       case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
       *GNU* | *'with BFD'*)
@@ -2041,16 +2904,25 @@ else
   AC_MSG_RESULT(no)
 fi
 test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
-AC_PROG_LD_GNU
-])# AC_PROG_LD
+_LT_PATH_LD_GNU
+AC_SUBST([LD])
 
+_LT_TAGDECL([], [LD], [1], [The linker used to build libraries])
+])# LT_PATH_LD
 
-# AC_PROG_LD_GNU
-# --------------
-AC_DEFUN([AC_PROG_LD_GNU],
-[AC_REQUIRE([AC_PROG_EGREP])dnl
-AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
-[# I'd rather use --version here, but apparently some GNU ld's only accept -v.
+# Old names:
+AU_ALIAS([AM_PROG_LD], [LT_PATH_LD])
+AU_ALIAS([AC_PROG_LD], [LT_PATH_LD])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AM_PROG_LD], [])
+dnl AC_DEFUN([AC_PROG_LD], [])
+
+
+# _LT_PATH_LD_GNU
+#- --------------
+m4_defun([_LT_PATH_LD_GNU],
+[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
+[# I'd rather use --version here, but apparently some GNU lds only accept -v.
 case `$LD -v 2>&1 </dev/null` in
 *GNU* | *'with BFD'*)
   lt_cv_prog_gnu_ld=yes
@@ -2060,14 +2932,14 @@ case `$LD -v 2>&1 </dev/null` in
   ;;
 esac])
 with_gnu_ld=$lt_cv_prog_gnu_ld
-])# AC_PROG_LD_GNU
+])# _LT_PATH_LD_GNU
 
 
-# AC_PROG_LD_RELOAD_FLAG
-# ----------------------
+# _LT_CMD_RELOAD
+# --------------
 # find reload flag for linker
 #   -- PORTME Some linkers may need a different reload flag.
-AC_DEFUN([AC_PROG_LD_RELOAD_FLAG],
+m4_defun([_LT_CMD_RELOAD],
 [AC_CACHE_CHECK([for $LD option to reload object files],
   lt_cv_ld_reload_flag,
   [lt_cv_ld_reload_flag='-r'])
@@ -2077,15 +2949,28 @@ case $reload_flag in
 *) reload_flag=" $reload_flag" ;;
 esac
 reload_cmds='$LD$reload_flag -o $output$reload_objs'
-])# AC_PROG_LD_RELOAD_FLAG
+case $host_os in
+  darwin*)
+    if test "$GCC" = yes; then
+      reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
+    else
+      reload_cmds='$LD$reload_flag -o $output$reload_objs'
+    fi
+    ;;
+esac
+_LT_DECL([], [reload_flag], [1], [How to create reloadable object files])dnl
+_LT_DECL([], [reload_cmds], [2])dnl
+])# _LT_CMD_RELOAD
 
 
-# AC_DEPLIBS_CHECK_METHOD
-# -----------------------
+# _LT_CHECK_MAGIC_METHOD
+# ----------------------
 # how to check for library dependencies
 #  -- PORTME fill in with the dynamic library characteristics
-AC_DEFUN([AC_DEPLIBS_CHECK_METHOD],
-[AC_CACHE_CHECK([how to recognise dependent libraries],
+m4_defun([_LT_CHECK_MAGIC_METHOD],
+[m4_require([_LT_DECL_EGREP])
+m4_require([_LT_DECL_OBJDUMP])
+AC_CACHE_CHECK([how to recognize dependent libraries],
 lt_cv_deplibs_check_method,
 [lt_cv_file_magic_cmd='$MAGIC_CMD'
 lt_cv_file_magic_test_file=
@@ -2102,7 +2987,7 @@ lt_cv_deplibs_check_method='unknown'
 # whether `pass_all' will *always* work, you probably want this one.
 
 case $host_os in
-aix4* | aix5*)
+aix[[4-9]]*)
   lt_cv_deplibs_check_method=pass_all
   ;;
 
@@ -2110,7 +2995,7 @@ beos*)
   lt_cv_deplibs_check_method=pass_all
   ;;
 
-bsdi4*)
+bsdi[[45]]*)
   lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
   lt_cv_file_magic_cmd='/usr/bin/file -L'
   lt_cv_file_magic_test_file=/shlib/libc.so
@@ -2124,8 +3009,20 @@ cygwin*)
 
 mingw* | pw32*)
   # Base MSYS/MinGW do not provide the 'file' command needed by
-  # func_win32_libid shell function, so use a weaker test based on 'objdump'.
-  lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
+  # func_win32_libid shell function, so use a weaker test based on 'objdump',
+  # unless we find 'file', for example because we are cross-compiling.
+  if ( file / ) >/dev/null 2>&1; then
+    lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
+    lt_cv_file_magic_cmd='func_win32_libid'
+  else
+    lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
+    lt_cv_file_magic_cmd='$OBJDUMP -f'
+  fi
+  ;;
+
+cegcc)
+  # use the weaker test based on 'objdump'. See mingw*.
+  lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
   lt_cv_file_magic_cmd='$OBJDUMP -f'
   ;;
 
@@ -2133,13 +3030,13 @@ darwin* | rhapsody*)
   lt_cv_deplibs_check_method=pass_all
   ;;
 
-freebsd* | kfreebsd*-gnu)
-  if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
+freebsd* | dragonfly*)
+  if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
     case $host_cpu in
     i*86 )
       # Not sure whether the presence of OpenBSD here was a mistake.
       # Let's accept both of them until this is cleared up.
-      lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[[3-9]]86 (compact )?demand paged shared library'
+      lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
       lt_cv_file_magic_cmd=/usr/bin/file
       lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
       ;;
@@ -2155,7 +3052,7 @@ gnu*)
 
 hpux10.20* | hpux11*)
   lt_cv_file_magic_cmd=/usr/bin/file
-  case "$host_cpu" in
+  case $host_cpu in
   ia64*)
     lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
     lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
@@ -2171,6 +3068,11 @@ hpux10.20* | hpux11*)
   esac
   ;;
 
+interix[[3-9]]*)
+  # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
+  lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
+  ;;
+
 irix5* | irix6* | nonstopux*)
   case $LD in
   *-32|*"-32 ") libmagic=32-bit;;
@@ -2182,21 +3084,12 @@ irix5* | irix6* | nonstopux*)
   ;;
 
 # This must be Linux ELF.
-linux*)
-  case $host_cpu in
-  alpha*|hppa*|i*86|ia64*|m68*|mips*|powerpc*|sparc*|s390*|sh*)
-    lt_cv_deplibs_check_method=pass_all ;;
-  *)
-    # glibc up to 2.1.1 does not perform some relocations on ARM
-    # this will be overridden with pass_all, but let us keep it just in case
-    lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' ;;
-  esac
-  lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
+linux* | k*bsd*-gnu)
   lt_cv_deplibs_check_method=pass_all
   ;;
 
-netbsd*)
-  if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
+netbsd* | netbsdelf*-gnu)
+  if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
     lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
   else
     lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
@@ -2209,17 +3102,15 @@ newos6*)
   lt_cv_file_magic_test_file=/usr/lib/libnls.so
   ;;
 
-nto-qnx*)
-  lt_cv_deplibs_check_method=unknown
+*nto* | *qnx*)
+  lt_cv_deplibs_check_method=pass_all
   ;;
 
 openbsd*)
-  lt_cv_file_magic_cmd=/usr/bin/file
-  lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
-  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
-    lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB shared object'
+  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
   else
-    lt_cv_deplibs_check_method='file_magic OpenBSD.* shared library'
+    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
   fi
   ;;
 
@@ -2227,7 +3118,7 @@ osf3* | osf4* | osf5*)
   lt_cv_deplibs_check_method=pass_all
   ;;
 
-sco3.2v5*)
+rdos*)
   lt_cv_deplibs_check_method=pass_all
   ;;
 
@@ -2235,7 +3126,11 @@ solaris*)
   lt_cv_deplibs_check_method=pass_all
   ;;
 
-sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
+sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+sysv4 | sysv4.3*)
   case $host_vendor in
   motorola)
     lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib) M[[0-9]][[0-9]]* Version [[0-9]]'
@@ -2256,10 +3151,13 @@ sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
   siemens)
     lt_cv_deplibs_check_method=pass_all
     ;;
+  pc)
+    lt_cv_deplibs_check_method=pass_all
+    ;;
   esac
   ;;
 
-sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7* | sysv4*uw2*)
+tpf*)
   lt_cv_deplibs_check_method=pass_all
   ;;
 esac
@@ -2267,58 +3165,106 @@ esac
 file_magic_cmd=$lt_cv_file_magic_cmd
 deplibs_check_method=$lt_cv_deplibs_check_method
 test -z "$deplibs_check_method" && deplibs_check_method=unknown
-])# AC_DEPLIBS_CHECK_METHOD
+
+_LT_DECL([], [deplibs_check_method], [1],
+    [Method to check whether dependent libraries are shared objects])
+_LT_DECL([], [file_magic_cmd], [1],
+    [Command to use when deplibs_check_method == "file_magic"])
+])# _LT_CHECK_MAGIC_METHOD
 
 
-# AC_PROG_NM
+# LT_PATH_NM
 # ----------
-# find the pathname to a BSD-compatible name lister
-AC_DEFUN([AC_PROG_NM],
-[AC_CACHE_CHECK([for BSD-compatible nm], lt_cv_path_NM,
+# find the pathname to a BSD- or MS-compatible name lister
+AC_DEFUN([LT_PATH_NM],
+[AC_REQUIRE([AC_PROG_CC])dnl
+AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM,
 [if test -n "$NM"; then
   # Let the user override the test.
   lt_cv_path_NM="$NM"
 else
-  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
-  for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
-    IFS="$lt_save_ifs"
-    test -z "$ac_dir" && ac_dir=.
-    tmp_nm="$ac_dir/${ac_tool_prefix}nm"
-    if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
-      # Check to see if the nm accepts a BSD-compat flag.
-      # Adding the `sed 1q' prevents false positives on HP-UX, which says:
-      #   nm: unknown option "B" ignored
-      # Tru64's nm complains that /dev/null is an invalid object file
-      case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
-      */dev/null* | *'Invalid file or object type'*)
-	lt_cv_path_NM="$tmp_nm -B"
-	break
-        ;;
-      *)
-	case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
-	*/dev/null*)
-	  lt_cv_path_NM="$tmp_nm -p"
+  lt_nm_to_check="${ac_tool_prefix}nm"
+  if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
+    lt_nm_to_check="$lt_nm_to_check nm"
+  fi
+  for lt_tmp_nm in $lt_nm_to_check; do
+    lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+    for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
+      IFS="$lt_save_ifs"
+      test -z "$ac_dir" && ac_dir=.
+      tmp_nm="$ac_dir/$lt_tmp_nm"
+      if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
+	# Check to see if the nm accepts a BSD-compat flag.
+	# Adding the `sed 1q' prevents false positives on HP-UX, which says:
+	#   nm: unknown option "B" ignored
+	# Tru64's nm complains that /dev/null is an invalid object file
+	case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
+	*/dev/null* | *'Invalid file or object type'*)
+	  lt_cv_path_NM="$tmp_nm -B"
 	  break
 	  ;;
 	*)
-	  lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
-	  continue # so that we can try to find one that supports BSD flags
+	  case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
+	  */dev/null*)
+	    lt_cv_path_NM="$tmp_nm -p"
+	    break
+	    ;;
+	  *)
+	    lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
+	    continue # so that we can try to find one that supports BSD flags
+	    ;;
+	  esac
 	  ;;
 	esac
-      esac
-    fi
+      fi
+    done
+    IFS="$lt_save_ifs"
   done
-  IFS="$lt_save_ifs"
-  test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
+  : ${lt_cv_path_NM=no}
 fi])
-NM="$lt_cv_path_NM"
-])# AC_PROG_NM
+if test "$lt_cv_path_NM" != "no"; then
+  NM="$lt_cv_path_NM"
+else
+  # Didn't find any BSD compatible name lister, look for dumpbin.
+  AC_CHECK_TOOLS(DUMPBIN, ["dumpbin -symbols" "link -dump -symbols"], :)
+  AC_SUBST([DUMPBIN])
+  if test "$DUMPBIN" != ":"; then
+    NM="$DUMPBIN"
+  fi
+fi
+test -z "$NM" && NM=nm
+AC_SUBST([NM])
+_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl
+
+AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface],
+  [lt_cv_nm_interface="BSD nm"
+  echo "int some_variable = 0;" > conftest.$ac_ext
+  (eval echo "\"\$as_me:__oline__: $ac_compile\"" >&AS_MESSAGE_LOG_FD)
+  (eval "$ac_compile" 2>conftest.err)
+  cat conftest.err >&AS_MESSAGE_LOG_FD
+  (eval echo "\"\$as_me:__oline__: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD)
+  (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
+  cat conftest.err >&AS_MESSAGE_LOG_FD
+  (eval echo "\"\$as_me:__oline__: output\"" >&AS_MESSAGE_LOG_FD)
+  cat conftest.out >&AS_MESSAGE_LOG_FD
+  if $GREP 'External.*some_variable' conftest.out > /dev/null; then
+    lt_cv_nm_interface="MS dumpbin"
+  fi
+  rm -f conftest*])
+])# LT_PATH_NM
 
+# Old names:
+AU_ALIAS([AM_PROG_NM], [LT_PATH_NM])
+AU_ALIAS([AC_PROG_NM], [LT_PATH_NM])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AM_PROG_NM], [])
+dnl AC_DEFUN([AC_PROG_NM], [])
 
-# AC_CHECK_LIBM
-# -------------
+
+# LT_LIB_M
+# --------
 # check for math library
-AC_DEFUN([AC_CHECK_LIBM],
+AC_DEFUN([LT_LIB_M],
 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
 LIBM=
 case $host in
@@ -2333,2011 +3279,46 @@ case $host in
   AC_CHECK_LIB(m, cos, LIBM="-lm")
   ;;
 esac
-])# AC_CHECK_LIBM
-
-
-# AC_LIBLTDL_CONVENIENCE([DIRECTORY])
-# -----------------------------------
-# sets LIBLTDL to the link flags for the libltdl convenience library and
-# LTDLINCL to the include flags for the libltdl header and adds
-# --enable-ltdl-convenience to the configure arguments.  Note that LIBLTDL
-# and LTDLINCL are not AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called.  If
-# DIRECTORY is not provided, it is assumed to be `libltdl'.  LIBLTDL will
-# be prefixed with '${top_builddir}/' and LTDLINCL will be prefixed with
-# '${top_srcdir}/' (note the single quotes!).  If your package is not
-# flat and you're not using automake, define top_builddir and
-# top_srcdir appropriately in the Makefiles.
-AC_DEFUN([AC_LIBLTDL_CONVENIENCE],
-[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
-  case $enable_ltdl_convenience in
-  no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
-  "") enable_ltdl_convenience=yes
-      ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
-  esac
-  LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la
-  LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
-  # For backwards non-gettext consistent compatibility...
-  INCLTDL="$LTDLINCL"
-])# AC_LIBLTDL_CONVENIENCE
-
-
-# AC_LIBLTDL_INSTALLABLE([DIRECTORY])
-# -----------------------------------
-# sets LIBLTDL to the link flags for the libltdl installable library and
-# LTDLINCL to the include flags for the libltdl header and adds
-# --enable-ltdl-install to the configure arguments.  Note that LIBLTDL
-# and LTDLINCL are not AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called.  If
-# DIRECTORY is not provided and an installed libltdl is not found, it is
-# assumed to be `libltdl'.  LIBLTDL will be prefixed with '${top_builddir}/'
-# and LTDLINCL will be prefixed with '${top_srcdir}/' (note the single
-# quotes!).  If your package is not flat and you're not using automake,
-# define top_builddir and top_srcdir appropriately in the Makefiles.
-# In the future, this macro may have to be called after AC_PROG_LIBTOOL.
-AC_DEFUN([AC_LIBLTDL_INSTALLABLE],
-[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
-  AC_CHECK_LIB(ltdl, lt_dlinit,
-  [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
-  [if test x"$enable_ltdl_install" = xno; then
-     AC_MSG_WARN([libltdl not installed, but installation disabled])
-   else
-     enable_ltdl_install=yes
-   fi
-  ])
-  if test x"$enable_ltdl_install" = x"yes"; then
-    ac_configure_args="$ac_configure_args --enable-ltdl-install"
-    LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la
-    LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
-  else
-    ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
-    LIBLTDL="-lltdl"
-    LTDLINCL=
-  fi
-  # For backwards non-gettext consistent compatibility...
-  INCLTDL="$LTDLINCL"
-])# AC_LIBLTDL_INSTALLABLE
-
-
-# AC_LIBTOOL_CXX
-# --------------
-# enable support for C++ libraries
-AC_DEFUN([AC_LIBTOOL_CXX],
-[AC_REQUIRE([_LT_AC_LANG_CXX])
-])# AC_LIBTOOL_CXX
-
-
-# _LT_AC_LANG_CXX
-# ---------------
-AC_DEFUN([_LT_AC_LANG_CXX],
-[AC_REQUIRE([AC_PROG_CXX])
-AC_REQUIRE([AC_PROG_CXXCPP])
-_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}CXX])
-])# _LT_AC_LANG_CXX
-
-
-# AC_LIBTOOL_F77
-# --------------
-# enable support for Fortran 77 libraries
-AC_DEFUN([AC_LIBTOOL_F77],
-[AC_REQUIRE([_LT_AC_LANG_F77])
-])# AC_LIBTOOL_F77
-
-
-# _LT_AC_LANG_F77
-# ---------------
-AC_DEFUN([_LT_AC_LANG_F77],
-[AC_REQUIRE([AC_PROG_F77])
-_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}F77])
-])# _LT_AC_LANG_F77
-
-
-# AC_LIBTOOL_GCJ
-# --------------
-# enable support for GCJ libraries
-AC_DEFUN([AC_LIBTOOL_GCJ],
-[AC_REQUIRE([_LT_AC_LANG_GCJ])
-])# AC_LIBTOOL_GCJ
-
-
-# _LT_AC_LANG_GCJ
-# ---------------
-AC_DEFUN([_LT_AC_LANG_GCJ],
-[AC_PROVIDE_IFELSE([AC_PROG_GCJ],[],
-  [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[],
-    [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],[],
-      [ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])],
-	 [ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])],
-	   [AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])])
-_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}GCJ])
-])# _LT_AC_LANG_GCJ
-
-
-# AC_LIBTOOL_RC
-# --------------
-# enable support for Windows resource files
-AC_DEFUN([AC_LIBTOOL_RC],
-[AC_REQUIRE([LT_AC_PROG_RC])
-_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}RC])
-])# AC_LIBTOOL_RC
-
-
-# AC_LIBTOOL_LANG_C_CONFIG
-# ------------------------
-# Ensure that the configuration vars for the C compiler are
-# suitably defined.  Those variables are subsequently used by
-# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
-AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG], [_LT_AC_LANG_C_CONFIG])
-AC_DEFUN([_LT_AC_LANG_C_CONFIG],
-[lt_save_CC="$CC"
-AC_LANG_PUSH(C)
-
-# Source file extension for C test sources.
-ac_ext=c
-
-# Object file extension for compiled C test sources.
-objext=o
-_LT_AC_TAGVAR(objext, $1)=$objext
-
-# Code to be used in simple compile tests
-lt_simple_compile_test_code="int some_variable = 0;\n"
-
-# Code to be used in simple link tests
-lt_simple_link_test_code='int main(){return(0);}\n'
-
-_LT_AC_SYS_COMPILER
-
-#
-# Check for any special shared library compilation flags.
-#
-_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)=
-if test "$GCC" = no; then
-  case $host_os in
-  sco3.2v5*)
-    _LT_AC_TAGVAR(lt_prog_cc_shlib, $1)='-belf'
-    ;;
-  esac
-fi
-if test -n "$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)"; then
-  AC_MSG_WARN([`$CC' requires `$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)' to build shared libraries])
-  if echo "$old_CC $old_CFLAGS " | grep "[[ 	]]$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)[[ 	]]" >/dev/null; then :
-  else
-    AC_MSG_WARN([add `$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)' to the CC or CFLAGS env variable and reconfigure])
-    _LT_AC_TAGVAR(lt_cv_prog_cc_can_build_shared, $1)=no
-  fi
-fi
-
-
-#
-# Check to make sure the static flag actually works.
-#
-AC_LIBTOOL_LINKER_OPTION([if $compiler static flag $_LT_AC_TAGVAR(lt_prog_compiler_static, $1) works],
-  _LT_AC_TAGVAR(lt_prog_compiler_static_works, $1),
-  $_LT_AC_TAGVAR(lt_prog_compiler_static, $1),
-  [],
-  [_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=])
-
-
-## CAVEAT EMPTOR:
-## There is no encapsulation within the following macros, do not change
-## the running order or otherwise move them around unless you know exactly
-## what you are doing...
-AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
-AC_LIBTOOL_PROG_COMPILER_PIC($1)
-AC_LIBTOOL_PROG_CC_C_O($1)
-AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
-AC_LIBTOOL_PROG_LD_SHLIBS($1)
-AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
-AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
-AC_LIBTOOL_SYS_LIB_STRIP
-AC_LIBTOOL_DLOPEN_SELF($1)
-
-# Report which librarie types wil actually be built
-AC_MSG_CHECKING([if libtool supports shared libraries])
-AC_MSG_RESULT([$can_build_shared])
-
-AC_MSG_CHECKING([whether to build shared libraries])
-test "$can_build_shared" = "no" && enable_shared=no
-
-# On AIX, shared libraries and static libraries use the same namespace, and
-# are all built from PIC.
-case "$host_os" in
-aix3*)
-  test "$enable_shared" = yes && enable_static=no
-  if test -n "$RANLIB"; then
-    archive_cmds="$archive_cmds~\$RANLIB \$lib"
-    postinstall_cmds='$RANLIB $lib'
-  fi
-  ;;
-
-aix4* | aix5*)
-  if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
-    test "$enable_shared" = yes && enable_static=no
-  fi
-  ;;
-  darwin* | rhapsody*)
-  if test "$GCC" = yes; then
-    _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
-    case "$host_os" in
-    rhapsody* | darwin1.[[012]])
-      _LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined suppress'
-      ;;
-    *) # Darwin 1.3 on
-      if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
-      	_LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress'
-      else
-        case ${MACOSX_DEPLOYMENT_TARGET} in
-          10.[[012]])
-            _LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress'
-            ;;
-          10.*)
-            _LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined dynamic_lookup'
-            ;;
-        esac
-      fi
-      ;;
-    esac
-    output_verbose_link_cmd='echo'
-    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs$compiler_flags -install_name $rpath/$soname $verstring'
-    _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
-    # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
-    _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag  -o $lib $libobjs $deplibs$compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
-    _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
-    _LT_AC_TAGVAR(hardcode_direct, $1)=no
-    _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
-    _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
-    _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-all_load $convenience'
-    _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
-  else
-    _LT_AC_TAGVAR(ld_shlibs, $1)=no
-  fi
-    ;;
-esac
-AC_MSG_RESULT([$enable_shared])
-
-AC_MSG_CHECKING([whether to build static libraries])
-# Make sure either enable_shared or enable_static is yes.
-test "$enable_shared" = yes || enable_static=yes
-AC_MSG_RESULT([$enable_static])
-
-AC_LIBTOOL_CONFIG($1)
-
-AC_LANG_POP
-CC="$lt_save_CC"
-])# AC_LIBTOOL_LANG_C_CONFIG
-
-
-# AC_LIBTOOL_LANG_CXX_CONFIG
-# --------------------------
-# Ensure that the configuration vars for the C compiler are
-# suitably defined.  Those variables are subsequently used by
-# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
-AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG], [_LT_AC_LANG_CXX_CONFIG(CXX)])
-AC_DEFUN([_LT_AC_LANG_CXX_CONFIG],
-[AC_LANG_PUSH(C++)
-AC_REQUIRE([AC_PROG_CXX])
-AC_REQUIRE([AC_PROG_CXXCPP])
-
-_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
-_LT_AC_TAGVAR(allow_undefined_flag, $1)=
-_LT_AC_TAGVAR(always_export_symbols, $1)=no
-_LT_AC_TAGVAR(archive_expsym_cmds, $1)=
-_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
-_LT_AC_TAGVAR(hardcode_direct, $1)=no
-_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
-_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
-_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
-_LT_AC_TAGVAR(hardcode_minus_L, $1)=no
-_LT_AC_TAGVAR(hardcode_automatic, $1)=no
-_LT_AC_TAGVAR(module_cmds, $1)=
-_LT_AC_TAGVAR(module_expsym_cmds, $1)=
-_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
-_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
-_LT_AC_TAGVAR(no_undefined_flag, $1)=
-_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
-_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
-
-# Dependencies to place before and after the object being linked:
-_LT_AC_TAGVAR(predep_objects, $1)=
-_LT_AC_TAGVAR(postdep_objects, $1)=
-_LT_AC_TAGVAR(predeps, $1)=
-_LT_AC_TAGVAR(postdeps, $1)=
-_LT_AC_TAGVAR(compiler_lib_search_path, $1)=
-
-# Source file extension for C++ test sources.
-ac_ext=cc
-
-# Object file extension for compiled C++ test sources.
-objext=o
-_LT_AC_TAGVAR(objext, $1)=$objext
-
-# Code to be used in simple compile tests
-lt_simple_compile_test_code="int some_variable = 0;\n"
-
-# Code to be used in simple link tests
-lt_simple_link_test_code='int main(int, char *[]) { return(0); }\n'
-
-# ltmain only uses $CC for tagged configurations so make sure $CC is set.
-_LT_AC_SYS_COMPILER
-
-# Allow CC to be a program name with arguments.
-lt_save_CC=$CC
-lt_save_LD=$LD
-lt_save_GCC=$GCC
-GCC=$GXX
-lt_save_with_gnu_ld=$with_gnu_ld
-lt_save_path_LD=$lt_cv_path_LD
-if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
-  lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
-else
-  unset lt_cv_prog_gnu_ld
-fi
-if test -n "${lt_cv_path_LDCXX+set}"; then
-  lt_cv_path_LD=$lt_cv_path_LDCXX
-else
-  unset lt_cv_path_LD
-fi
-test -z "${LDCXX+set}" || LD=$LDCXX
-CC=${CXX-"c++"}
-compiler=$CC
-_LT_AC_TAGVAR(compiler, $1)=$CC
-cc_basename=`$echo X"$compiler" | $Xsed -e 's%^.*/%%'`
-
-# We don't want -fno-exception wen compiling C++ code, so set the
-# no_builtin_flag separately
-if test "$GXX" = yes; then
-  _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
-else
-  _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
-fi
-
-if test "$GXX" = yes; then
-  # Set up default GNU C++ configuration
-
-  AC_PROG_LD
-
-  # Check if GNU C++ uses GNU ld as the underlying linker, since the
-  # archiving commands below assume that GNU ld is being used.
-  if test "$with_gnu_ld" = yes; then
-    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
-    _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
-
-    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
-    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
-
-    # If archive_cmds runs LD, not CC, wlarc should be empty
-    # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
-    #     investigate it a little bit more. (MM)
-    wlarc='${wl}'
-
-    # ancient GNU ld didn't support --whole-archive et. al.
-    if eval "`$CC -print-prog-name=ld` --help 2>&1" | \
-	grep 'no-whole-archive' > /dev/null; then
-      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
-    else
-      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
-    fi
-  else
-    with_gnu_ld=no
-    wlarc=
-
-    # A generic and very simple default shared library creation
-    # command for GNU C++ for the case where it uses the native
-    # linker, instead of GNU ld.  If possible, this setting should
-    # overridden to take advantage of the native linker features on
-    # the platform it is being used on.
-    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
-  fi
-
-  # Commands to make compiler produce verbose output that lists
-  # what "hidden" libraries, object files and flags are used when
-  # linking a shared library.
-  output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
-
-else
-  GXX=no
-  with_gnu_ld=no
-  wlarc=
-fi
-
-# PORTME: fill in a description of your system's C++ link characteristics
-AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
-_LT_AC_TAGVAR(ld_shlibs, $1)=yes
-case $host_os in
-  aix3*)
-    # FIXME: insert proper C++ library support
-    _LT_AC_TAGVAR(ld_shlibs, $1)=no
-    ;;
-  aix4* | aix5*)
-    if test "$host_cpu" = ia64; then
-      # On IA64, the linker does run time linking by default, so we don't
-      # have to do anything special.
-      aix_use_runtimelinking=no
-      exp_sym_flag='-Bexport'
-      no_entry_flag=""
-    else
-      aix_use_runtimelinking=no
-
-      # Test if we are trying to use run time linking or normal
-      # AIX style linking. If -brtl is somewhere in LDFLAGS, we
-      # need to do runtime linking.
-      case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*)
-	for ld_flag in $LDFLAGS; do
-	  case $ld_flag in
-	  *-brtl*)
-	    aix_use_runtimelinking=yes
-	    break
-	    ;;
-	  esac
-	done
-      esac
-
-      exp_sym_flag='-bexport'
-      no_entry_flag='-bnoentry'
-    fi
-
-    # When large executables or shared objects are built, AIX ld can
-    # have problems creating the table of contents.  If linking a library
-    # or program results in "error TOC overflow" add -mminimal-toc to
-    # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
-    # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
-
-    _LT_AC_TAGVAR(archive_cmds, $1)=''
-    _LT_AC_TAGVAR(hardcode_direct, $1)=yes
-    _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
-    _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
-
-    if test "$GXX" = yes; then
-      case $host_os in aix4.[012]|aix4.[012].*)
-      # We only want to do this on AIX 4.2 and lower, the check
-      # below for broken collect2 doesn't work under 4.3+
-	collect2name=`${CC} -print-prog-name=collect2`
-	if test -f "$collect2name" && \
-	   strings "$collect2name" | grep resolve_lib_name >/dev/null
-	then
-	  # We have reworked collect2
-	  _LT_AC_TAGVAR(hardcode_direct, $1)=yes
-	else
-	  # We have old collect2
-	  _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
-	  # It fails to find uninstalled libraries when the uninstalled
-	  # path is not listed in the libpath.  Setting hardcode_minus_L
-	  # to unsupported forces relinking
-	  _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
-	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
-	  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
-	fi
-      esac
-      shared_flag='-shared'
-    else
-      # not using gcc
-      if test "$host_cpu" = ia64; then
-	# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
-	# chokes on -Wl,-G. The following line is correct:
-	shared_flag='-G'
-      else
-	if test "$aix_use_runtimelinking" = yes; then
-	  shared_flag='${wl}-G'
-	else
-	  shared_flag='${wl}-bM:SRE'
-	fi
-      fi
-    fi
-
-    # It seems that -bexpall does not export symbols beginning with
-    # underscore (_), so it is better to generate a list of symbols to export.
-    _LT_AC_TAGVAR(always_export_symbols, $1)=yes
-    if test "$aix_use_runtimelinking" = yes; then
-      # Warning - without using the other runtime loading flags (-brtl),
-      # -berok will link without error, but may produce a broken library.
-      _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
-      # Determine the default libpath from the value encoded in an empty executable.
-      _LT_AC_SYS_LIBPATH_AIX
-      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
-
-      _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols $shared_flag"
-     else
-      if test "$host_cpu" = ia64; then
-	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
-	_LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
-	_LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"
-      else
-	# Determine the default libpath from the value encoded in an empty executable.
-	_LT_AC_SYS_LIBPATH_AIX
-	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
-	# Warning - without using the other run time loading flags,
-	# -berok will link without error, but may produce a broken library.
-	_LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
-	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
-	# -bexpall does not export symbols beginning with underscore (_)
-	_LT_AC_TAGVAR(always_export_symbols, $1)=yes
-	# Exported symbols can be pulled into shared objects from archives
-	_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=' '
-	_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
-	# This is similar to how AIX traditionally builds it's shared libraries.
-	_LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
-      fi
-    fi
-    ;;
-  chorus*)
-    case $cc_basename in
-      *)
-	# FIXME: insert proper C++ library support
-	_LT_AC_TAGVAR(ld_shlibs, $1)=no
-	;;
-    esac
-    ;;
-
-  cygwin* | mingw* | pw32*)
-    # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
-    # as there is no search path for DLLs.
-    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
-    _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
-    _LT_AC_TAGVAR(always_export_symbols, $1)=no
-    _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
-
-    if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
-      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
-      # If the export-symbols file already is a .def file (1st line
-      # is EXPORTS), use it as is; otherwise, prepend...
-      _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
-	cp $export_symbols $output_objdir/$soname.def;
-      else
-	echo EXPORTS > $output_objdir/$soname.def;
-	cat $export_symbols >> $output_objdir/$soname.def;
-      fi~
-      $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
-    else
-      _LT_AC_TAGVAR(ld_shlibs, $1)=no
-    fi
-  ;;
-
-  darwin* | rhapsody*)
-  if test "$GXX" = yes; then
-    _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
-    case "$host_os" in
-    rhapsody* | darwin1.[[012]])
-      _LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined suppress'
-      ;;
-    *) # Darwin 1.3 on
-      if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
-      	_LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress'
-      else
-        case ${MACOSX_DEPLOYMENT_TARGET} in
-          10.[[012]])
-            _LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress'
-            ;;
-          10.*)
-            _LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined dynamic_lookup'
-            ;;
-        esac
-      fi
-      ;;
-    esac
-    lt_int_apple_cc_single_mod=no
-    output_verbose_link_cmd='echo'
-    if $CC -dumpspecs 2>&1 | grep 'single_module' >/dev/null ; then
-      lt_int_apple_cc_single_mod=yes
-    fi
-    if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
-      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
-    else
-      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
-    fi
-    _LT_AC_TAGVAR(module_cmds, $1)='$CC ${wl}-bind_at_load $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
-
-    # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
-    if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
-      _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
-    else
-      _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
-    fi
-    _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
-    _LT_AC_TAGVAR(hardcode_direct, $1)=no
-    _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
-    _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
-    _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-all_load $convenience'
-    _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
-  else
-    _LT_AC_TAGVAR(ld_shlibs, $1)=no
-  fi
-    ;;
-
-  dgux*)
-    case $cc_basename in
-      ec++)
-	# FIXME: insert proper C++ library support
-	_LT_AC_TAGVAR(ld_shlibs, $1)=no
-	;;
-      ghcx)
-	# Green Hills C++ Compiler
-	# FIXME: insert proper C++ library support
-	_LT_AC_TAGVAR(ld_shlibs, $1)=no
-	;;
-      *)
-	# FIXME: insert proper C++ library support
-	_LT_AC_TAGVAR(ld_shlibs, $1)=no
-	;;
-    esac
-    ;;
-  freebsd[12]*)
-    # C++ shared libraries reported to be fairly broken before switch to ELF
-    _LT_AC_TAGVAR(ld_shlibs, $1)=no
-    ;;
-  freebsd-elf*)
-    _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
-    ;;
-  freebsd* | kfreebsd*-gnu)
-    # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
-    # conventions
-    _LT_AC_TAGVAR(ld_shlibs, $1)=yes
-    ;;
-  gnu*)
-    ;;
-  hpux9*)
-    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
-    _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
-    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
-    _LT_AC_TAGVAR(hardcode_direct, $1)=yes
-    _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
-				# but as the default
-				# location of the library.
-
-    case $cc_basename in
-    CC)
-      # FIXME: insert proper C++ library support
-      _LT_AC_TAGVAR(ld_shlibs, $1)=no
-      ;;
-    aCC)
-      _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
-      # Commands to make compiler produce verbose output that lists
-      # what "hidden" libraries, object files and flags are used when
-      # linking a shared library.
-      #
-      # There doesn't appear to be a way to prevent this compiler from
-      # explicitly linking system object files so we need to strip them
-      # from the output so that they don't get included in the library
-      # dependencies.
-      output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "[-]L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
-      ;;
-    *)
-      if test "$GXX" = yes; then
-        _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
-      else
-        # FIXME: insert proper C++ library support
-        _LT_AC_TAGVAR(ld_shlibs, $1)=no
-      fi
-      ;;
-    esac
-    ;;
-  hpux10*|hpux11*)
-    if test $with_gnu_ld = no; then
-      case "$host_cpu" in
-      hppa*64*)
-	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
-	_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
-	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
-        ;;
-      ia64*)
-	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
-        ;;
-      *)
-	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
-	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
-	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
-        ;;
-      esac
-    fi
-    case "$host_cpu" in
-    hppa*64*)
-      _LT_AC_TAGVAR(hardcode_direct, $1)=no
-      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
-      ;;
-    ia64*)
-      _LT_AC_TAGVAR(hardcode_direct, $1)=no
-      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
-      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
-					      # but as the default
-					      # location of the library.
-      ;;
-    *)
-      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
-      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
-					      # but as the default
-					      # location of the library.
-      ;;
-    esac
-
-    case $cc_basename in
-      CC)
-	# FIXME: insert proper C++ library support
-	_LT_AC_TAGVAR(ld_shlibs, $1)=no
-	;;
-      aCC)
-	case "$host_cpu" in
-	hppa*64*|ia64*)
-	  _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs'
-	  ;;
-	*)
-	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
-	  ;;
-	esac
-	# Commands to make compiler produce verbose output that lists
-	# what "hidden" libraries, object files and flags are used when
-	# linking a shared library.
-	#
-	# There doesn't appear to be a way to prevent this compiler from
-	# explicitly linking system object files so we need to strip them
-	# from the output so that they don't get included in the library
-	# dependencies.
-	output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
-	;;
-      *)
-	if test "$GXX" = yes; then
-	  if test $with_gnu_ld = no; then
-	    case "$host_cpu" in
-	    ia64*|hppa*64*)
-	      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs'
-	      ;;
-	    *)
-	      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
-	      ;;
-	    esac
-	  fi
-	else
-	  # FIXME: insert proper C++ library support
-	  _LT_AC_TAGVAR(ld_shlibs, $1)=no
-	fi
-	;;
-    esac
-    ;;
-  irix5* | irix6*)
-    case $cc_basename in
-      CC)
-	# SGI C++
-	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib'
-
-	# Archives containing C++ object files must be created using
-	# "CC -ar", where "CC" is the IRIX C++ compiler.  This is
-	# necessary to make sure instantiated templates are included
-	# in the archive.
-	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
-	;;
-      *)
-	if test "$GXX" = yes; then
-	  if test "$with_gnu_ld" = no; then
-	    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib'
-	  else
-	    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` -o $lib'
-	  fi
-	fi
-	_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
-	;;
-    esac
-    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
-    _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
-    ;;
-  linux*)
-    case $cc_basename in
-      KCC)
-	# Kuck and Associates, Inc. (KAI) C++ Compiler
-
-	# KCC will only create a shared library if the output file
-	# ends with ".so" (or ".sl" for HP-UX), so rename the library
-	# to its proper name (with version) after linking.
-	_LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
-	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib'
-	# Commands to make compiler produce verbose output that lists
-	# what "hidden" libraries, object files and flags are used when
-	# linking a shared library.
-	#
-	# There doesn't appear to be a way to prevent this compiler from
-	# explicitly linking system object files so we need to strip them
-	# from the output so that they don't get included in the library
-	# dependencies.
-	output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | grep "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
-
-	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath,$libdir'
-	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
-
-	# Archives containing C++ object files must be created using
-	# "CC -Bstatic", where "CC" is the KAI C++ compiler.
-	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
-	;;
-      icpc)
-	# Intel C++
-	with_gnu_ld=yes
-	_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
-	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
-	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
-	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
-	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
-	_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
-	;;
-      cxx)
-	# Compaq C++
-	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
-	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname  -o $lib ${wl}-retain-symbols-file $wl$export_symbols'
-
-	runpath_var=LD_RUN_PATH
-	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
-	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
-
-	# Commands to make compiler produce verbose output that lists
-	# what "hidden" libraries, object files and flags are used when
-	# linking a shared library.
-	#
-	# There doesn't appear to be a way to prevent this compiler from
-	# explicitly linking system object files so we need to strip them
-	# from the output so that they don't get included in the library
-	# dependencies.
-	output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
-	;;
-    esac
-    ;;
-  lynxos*)
-    # FIXME: insert proper C++ library support
-    _LT_AC_TAGVAR(ld_shlibs, $1)=no
-    ;;
-  m88k*)
-    # FIXME: insert proper C++ library support
-    _LT_AC_TAGVAR(ld_shlibs, $1)=no
-    ;;
-  mvs*)
-    case $cc_basename in
-      cxx)
-	# FIXME: insert proper C++ library support
-	_LT_AC_TAGVAR(ld_shlibs, $1)=no
-	;;
-      *)
-	# FIXME: insert proper C++ library support
-	_LT_AC_TAGVAR(ld_shlibs, $1)=no
-	;;
-    esac
-    ;;
-  netbsd*)
-    if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
-      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable  -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
-      wlarc=
-      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
-      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
-      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
-    fi
-    # Workaround some broken pre-1.5 toolchains
-    output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
-    ;;
-  osf3*)
-    case $cc_basename in
-      KCC)
-	# Kuck and Associates, Inc. (KAI) C++ Compiler
-
-	# KCC will only create a shared library if the output file
-	# ends with ".so" (or ".sl" for HP-UX), so rename the library
-	# to its proper name (with version) after linking.
-	_LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
-
-	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
-	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
-
-	# Archives containing C++ object files must be created using
-	# "CC -Bstatic", where "CC" is the KAI C++ compiler.
-	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
-
-	;;
-      RCC)
-	# Rational C++ 2.4.1
-	# FIXME: insert proper C++ library support
-	_LT_AC_TAGVAR(ld_shlibs, $1)=no
-	;;
-      cxx)
-	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
-	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && echo ${wl}-set_version $verstring` -update_registry ${objdir}/so_locations -o $lib'
-
-	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
-	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
-
-	# Commands to make compiler produce verbose output that lists
-	# what "hidden" libraries, object files and flags are used when
-	# linking a shared library.
-	#
-	# There doesn't appear to be a way to prevent this compiler from
-	# explicitly linking system object files so we need to strip them
-	# from the output so that they don't get included in the library
-	# dependencies.
-	output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
-	;;
-      *)
-	if test "$GXX" = yes && test "$with_gnu_ld" = no; then
-	  _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
-	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib'
-
-	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
-	  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
-
-	  # Commands to make compiler produce verbose output that lists
-	  # what "hidden" libraries, object files and flags are used when
-	  # linking a shared library.
-	  output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
-
-	else
-	  # FIXME: insert proper C++ library support
-	  _LT_AC_TAGVAR(ld_shlibs, $1)=no
-	fi
-	;;
-    esac
-    ;;
-  osf4* | osf5*)
-    case $cc_basename in
-      KCC)
-	# Kuck and Associates, Inc. (KAI) C++ Compiler
-
-	# KCC will only create a shared library if the output file
-	# ends with ".so" (or ".sl" for HP-UX), so rename the library
-	# to its proper name (with version) after linking.
-	_LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
-
-	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
-	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
-
-	# Archives containing C++ object files must be created using
-	# the KAI C++ compiler.
-	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs'
-	;;
-      RCC)
-	# Rational C++ 2.4.1
-	# FIXME: insert proper C++ library support
-	_LT_AC_TAGVAR(ld_shlibs, $1)=no
-	;;
-      cxx)
-	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
-	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib'
-	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
-	  echo "-hidden">> $lib.exp~
-	  $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname -Wl,-input -Wl,$lib.exp  `test -n "$verstring" && echo -set_version	$verstring` -update_registry $objdir/so_locations -o $lib~
-	  $rm $lib.exp'
-
-	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
-	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
-
-	# Commands to make compiler produce verbose output that lists
-	# what "hidden" libraries, object files and flags are used when
-	# linking a shared library.
-	#
-	# There doesn't appear to be a way to prevent this compiler from
-	# explicitly linking system object files so we need to strip them
-	# from the output so that they don't get included in the library
-	# dependencies.
-	output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
-	;;
-      *)
-	if test "$GXX" = yes && test "$with_gnu_ld" = no; then
-	  _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
-	 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib'
-
-	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
-	  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
-
-	  # Commands to make compiler produce verbose output that lists
-	  # what "hidden" libraries, object files and flags are used when
-	  # linking a shared library.
-	  output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
-
-	else
-	  # FIXME: insert proper C++ library support
-	  _LT_AC_TAGVAR(ld_shlibs, $1)=no
-	fi
-	;;
-    esac
-    ;;
-  psos*)
-    # FIXME: insert proper C++ library support
-    _LT_AC_TAGVAR(ld_shlibs, $1)=no
-    ;;
-  sco*)
-    _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
-    case $cc_basename in
-      CC)
-	# FIXME: insert proper C++ library support
-	_LT_AC_TAGVAR(ld_shlibs, $1)=no
-	;;
-      *)
-	# FIXME: insert proper C++ library support
-	_LT_AC_TAGVAR(ld_shlibs, $1)=no
-	;;
-    esac
-    ;;
-  sunos4*)
-    case $cc_basename in
-      CC)
-	# Sun C++ 4.x
-	# FIXME: insert proper C++ library support
-	_LT_AC_TAGVAR(ld_shlibs, $1)=no
-	;;
-      lcc)
-	# Lucid
-	# FIXME: insert proper C++ library support
-	_LT_AC_TAGVAR(ld_shlibs, $1)=no
-	;;
-      *)
-	# FIXME: insert proper C++ library support
-	_LT_AC_TAGVAR(ld_shlibs, $1)=no
-	;;
-    esac
-    ;;
-  solaris*)
-    case $cc_basename in
-      CC)
-	# Sun C++ 4.2, 5.x and Centerline C++
-	_LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs'
-	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -nolib -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
-	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
-	$CC -G${allow_undefined_flag} -nolib ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
-
-	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
-	_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
-	case $host_os in
-	  solaris2.[0-5] | solaris2.[0-5].*) ;;
-	  *)
-	    # The C++ compiler is used as linker so we must use $wl
-	    # flag to pass the commands to the underlying system
-	    # linker.
-	    # Supported since Solaris 2.6 (maybe 2.5.1?)
-	    _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
-	    ;;
-	esac
-	_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
-
-	# Commands to make compiler produce verbose output that lists
-	# what "hidden" libraries, object files and flags are used when
-	# linking a shared library.
-	#
-	# There doesn't appear to be a way to prevent this compiler from
-	# explicitly linking system object files so we need to strip them
-	# from the output so that they don't get included in the library
-	# dependencies.
-	output_verbose_link_cmd='templist=`$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep "\-[[LR]]"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
-
-	# Archives containing C++ object files must be created using
-	# "CC -xar", where "CC" is the Sun C++ compiler.  This is
-	# necessary to make sure instantiated templates are included
-	# in the archive.
-	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
-	;;
-      gcx)
-	# Green Hills C++ Compiler
-	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
-
-	# The C++ compiler must be used to create the archive.
-	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
-	;;
-      *)
-	# GNU C++ compiler with Solaris linker
-	if test "$GXX" = yes && test "$with_gnu_ld" = no; then
-	  _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
-	  if $CC --version | grep -v '^2\.7' > /dev/null; then
-	    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
-	    _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
-		$CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
-
-	    # Commands to make compiler produce verbose output that lists
-	    # what "hidden" libraries, object files and flags are used when
-	    # linking a shared library.
-	    output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
-	  else
-	    # g++ 2.7 appears to require `-G' NOT `-shared' on this
-	    # platform.
-	    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
-	    _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
-		$CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
-
-	    # Commands to make compiler produce verbose output that lists
-	    # what "hidden" libraries, object files and flags are used when
-	    # linking a shared library.
-	    output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
-	  fi
-
-	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
-	fi
-	;;
-    esac
-    ;;
-  sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7*)
-    _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
-    ;;
-  tandem*)
-    case $cc_basename in
-      NCC)
-	# NonStop-UX NCC 3.20
-	# FIXME: insert proper C++ library support
-	_LT_AC_TAGVAR(ld_shlibs, $1)=no
-	;;
-      *)
-	# FIXME: insert proper C++ library support
-	_LT_AC_TAGVAR(ld_shlibs, $1)=no
-	;;
-    esac
-    ;;
-  vxworks*)
-    # FIXME: insert proper C++ library support
-    _LT_AC_TAGVAR(ld_shlibs, $1)=no
-    ;;
-  *)
-    # FIXME: insert proper C++ library support
-    _LT_AC_TAGVAR(ld_shlibs, $1)=no
-    ;;
-esac
-AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
-test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
+AC_SUBST([LIBM])
+])# LT_LIB_M
 
-_LT_AC_TAGVAR(GCC, $1)="$GXX"
-_LT_AC_TAGVAR(LD, $1)="$LD"
+# Old name:
+AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_CHECK_LIBM], [])
 
-## CAVEAT EMPTOR:
-## There is no encapsulation within the following macros, do not change
-## the running order or otherwise move them around unless you know exactly
-## what you are doing...
-AC_LIBTOOL_POSTDEP_PREDEP($1)
-AC_LIBTOOL_PROG_COMPILER_PIC($1)
-AC_LIBTOOL_PROG_CC_C_O($1)
-AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
-AC_LIBTOOL_PROG_LD_SHLIBS($1)
-AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
-AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
-AC_LIBTOOL_SYS_LIB_STRIP
-AC_LIBTOOL_DLOPEN_SELF($1)
-
-AC_LIBTOOL_CONFIG($1)
 
-AC_LANG_POP
-CC=$lt_save_CC
-LDCXX=$LD
-LD=$lt_save_LD
-GCC=$lt_save_GCC
-with_gnu_ldcxx=$with_gnu_ld
-with_gnu_ld=$lt_save_with_gnu_ld
-lt_cv_path_LDCXX=$lt_cv_path_LD
-lt_cv_path_LD=$lt_save_path_LD
-lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
-lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
-])# AC_LIBTOOL_LANG_CXX_CONFIG
-
-# AC_LIBTOOL_POSTDEP_PREDEP([TAGNAME])
-# ------------------------
-# Figure out "hidden" library dependencies from verbose
-# compiler output when linking a shared library.
-# Parse the compiler output and extract the necessary
-# objects, libraries and library flags.
-AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP],[
-dnl we can't use the lt_simple_compile_test_code here,
-dnl because it contains code intended for an executable,
-dnl not a library.  It's possible we should let each
-dnl tag define a new lt_????_link_test_code variable,
-dnl but it's only used here...
-ifelse([$1],[],[cat > conftest.$ac_ext <<EOF
-int a;
-void foo (void) { a = 0; }
-EOF
-],[$1],[CXX],[cat > conftest.$ac_ext <<EOF
-class Foo
-{
-public:
-  Foo (void) { a = 0; }
-private:
-  int a;
-};
-EOF
-],[$1],[F77],[cat > conftest.$ac_ext <<EOF
-      subroutine foo
-      implicit none
-      integer*4 a
-      a=0
-      return
-      end
-EOF
-],[$1],[GCJ],[cat > conftest.$ac_ext <<EOF
-public class foo {
-  private int a;
-  public void bar (void) {
-    a = 0;
-  }
-};
-EOF
-])
-dnl Parse the compiler output and extract the necessary
-dnl objects, libraries and library flags.
-if AC_TRY_EVAL(ac_compile); then
-  # Parse the compiler output and extract the necessary
-  # objects, libraries and library flags.
-
-  # Sentinel used to keep track of whether or not we are before
-  # the conftest object file.
-  pre_test_object_deps_done=no
-
-  # The `*' in the case matches for architectures that use `case' in
-  # $output_verbose_cmd can trigger glob expansion during the loop
-  # eval without this substitution.
-  output_verbose_link_cmd="`$echo \"X$output_verbose_link_cmd\" | $Xsed -e \"$no_glob_subst\"`"
-
-  for p in `eval $output_verbose_link_cmd`; do
-    case $p in
-
-    -L* | -R* | -l*)
-       # Some compilers place space between "-{L,R}" and the path.
-       # Remove the space.
-       if test $p = "-L" \
-	  || test $p = "-R"; then
-	 prev=$p
-	 continue
-       else
-	 prev=
-       fi
-
-       if test "$pre_test_object_deps_done" = no; then
-	 case $p in
-	 -L* | -R*)
-	   # Internal compiler library paths should come after those
-	   # provided the user.  The postdeps already come after the
-	   # user supplied libs so there is no need to process them.
-	   if test -z "$_LT_AC_TAGVAR(compiler_lib_search_path, $1)"; then
-	     _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
-	   else
-	     _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${_LT_AC_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
-	   fi
-	   ;;
-	 # The "-l" case would never come before the object being
-	 # linked, so don't bother handling this case.
-	 esac
-       else
-	 if test -z "$_LT_AC_TAGVAR(postdeps, $1)"; then
-	   _LT_AC_TAGVAR(postdeps, $1)="${prev}${p}"
-	 else
-	   _LT_AC_TAGVAR(postdeps, $1)="${_LT_AC_TAGVAR(postdeps, $1)} ${prev}${p}"
-	 fi
-       fi
-       ;;
-
-    *.$objext)
-       # This assumes that the test object file only shows up
-       # once in the compiler output.
-       if test "$p" = "conftest.$objext"; then
-	 pre_test_object_deps_done=yes
-	 continue
-       fi
-
-       if test "$pre_test_object_deps_done" = no; then
-	 if test -z "$_LT_AC_TAGVAR(predep_objects, $1)"; then
-	   _LT_AC_TAGVAR(predep_objects, $1)="$p"
-	 else
-	   _LT_AC_TAGVAR(predep_objects, $1)="$_LT_AC_TAGVAR(predep_objects, $1) $p"
-	 fi
-       else
-	 if test -z "$_LT_AC_TAGVAR(postdep_objects, $1)"; then
-	   _LT_AC_TAGVAR(postdep_objects, $1)="$p"
-	 else
-	   _LT_AC_TAGVAR(postdep_objects, $1)="$_LT_AC_TAGVAR(postdep_objects, $1) $p"
-	 fi
-       fi
-       ;;
-
-    *) ;; # Ignore the rest.
-
-    esac
-  done
-
-  # Clean up.
-  rm -f a.out a.exe
-else
-  echo "libtool.m4: error: problem compiling $1 test program"
-fi
-
-$rm -f confest.$objext
-
-case " $_LT_AC_TAGVAR(postdeps, $1) " in
-*" -lc "*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;;
-esac
-])# AC_LIBTOOL_POSTDEP_PREDEP
-
-# AC_LIBTOOL_LANG_F77_CONFIG
-# ------------------------
-# Ensure that the configuration vars for the C compiler are
-# suitably defined.  Those variables are subsequently used by
-# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
-AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG], [_LT_AC_LANG_F77_CONFIG(F77)])
-AC_DEFUN([_LT_AC_LANG_F77_CONFIG],
-[AC_REQUIRE([AC_PROG_F77])
-AC_LANG_PUSH(Fortran 77)
+# _LT_COMPILER_NO_RTTI([TAGNAME])
+# -------------------------------
+m4_defun([_LT_COMPILER_NO_RTTI],
+[m4_require([_LT_TAG_COMPILER])dnl
 
-_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
-_LT_AC_TAGVAR(allow_undefined_flag, $1)=
-_LT_AC_TAGVAR(always_export_symbols, $1)=no
-_LT_AC_TAGVAR(archive_expsym_cmds, $1)=
-_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
-_LT_AC_TAGVAR(hardcode_direct, $1)=no
-_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
-_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
-_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
-_LT_AC_TAGVAR(hardcode_minus_L, $1)=no
-_LT_AC_TAGVAR(hardcode_automatic, $1)=no
-_LT_AC_TAGVAR(module_cmds, $1)=
-_LT_AC_TAGVAR(module_expsym_cmds, $1)=
-_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
-_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
-_LT_AC_TAGVAR(no_undefined_flag, $1)=
-_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
-_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
-
-# Source file extension for f77 test sources.
-ac_ext=f
-
-# Object file extension for compiled f77 test sources.
-objext=o
-_LT_AC_TAGVAR(objext, $1)=$objext
-
-# Code to be used in simple compile tests
-lt_simple_compile_test_code="      subroutine t\n      return\n      end\n"
-
-# Code to be used in simple link tests
-lt_simple_link_test_code="      program t\n      end\n"
-
-# ltmain only uses $CC for tagged configurations so make sure $CC is set.
-_LT_AC_SYS_COMPILER
-
-# Allow CC to be a program name with arguments.
-lt_save_CC="$CC"
-CC=${F77-"f77"}
-compiler=$CC
-_LT_AC_TAGVAR(compiler, $1)=$CC
-cc_basename=`$echo X"$compiler" | $Xsed -e 's%^.*/%%'`
-
-AC_MSG_CHECKING([if libtool supports shared libraries])
-AC_MSG_RESULT([$can_build_shared])
-
-AC_MSG_CHECKING([whether to build shared libraries])
-test "$can_build_shared" = "no" && enable_shared=no
-
-# On AIX, shared libraries and static libraries use the same namespace, and
-# are all built from PIC.
-case "$host_os" in
-aix3*)
-  test "$enable_shared" = yes && enable_static=no
-  if test -n "$RANLIB"; then
-    archive_cmds="$archive_cmds~\$RANLIB \$lib"
-    postinstall_cmds='$RANLIB $lib'
-  fi
-  ;;
-aix4* | aix5*)
-  test "$enable_shared" = yes && enable_static=no
-  ;;
-esac
-AC_MSG_RESULT([$enable_shared])
-
-AC_MSG_CHECKING([whether to build static libraries])
-# Make sure either enable_shared or enable_static is yes.
-test "$enable_shared" = yes || enable_static=yes
-AC_MSG_RESULT([$enable_static])
-
-test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
-
-_LT_AC_TAGVAR(GCC, $1)="$G77"
-_LT_AC_TAGVAR(LD, $1)="$LD"
-
-AC_LIBTOOL_PROG_COMPILER_PIC($1)
-AC_LIBTOOL_PROG_CC_C_O($1)
-AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
-AC_LIBTOOL_PROG_LD_SHLIBS($1)
-AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
-AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
-AC_LIBTOOL_SYS_LIB_STRIP
-
-
-AC_LIBTOOL_CONFIG($1)
-
-AC_LANG_POP
-CC="$lt_save_CC"
-])# AC_LIBTOOL_LANG_F77_CONFIG
-
-
-# AC_LIBTOOL_LANG_GCJ_CONFIG
-# --------------------------
-# Ensure that the configuration vars for the C compiler are
-# suitably defined.  Those variables are subsequently used by
-# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
-AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG], [_LT_AC_LANG_GCJ_CONFIG(GCJ)])
-AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG],
-[AC_LANG_SAVE
-
-# Source file extension for Java test sources.
-ac_ext=java
-
-# Object file extension for compiled Java test sources.
-objext=o
-_LT_AC_TAGVAR(objext, $1)=$objext
-
-# Code to be used in simple compile tests
-lt_simple_compile_test_code="class foo {}\n"
-
-# Code to be used in simple link tests
-lt_simple_link_test_code='public class conftest { public static void main(String[] argv) {}; }\n'
-
-# ltmain only uses $CC for tagged configurations so make sure $CC is set.
-_LT_AC_SYS_COMPILER
-
-# Allow CC to be a program name with arguments.
-lt_save_CC="$CC"
-CC=${GCJ-"gcj"}
-compiler=$CC
-_LT_AC_TAGVAR(compiler, $1)=$CC
-
-# GCJ did not exist at the time GCC didn't implicitly link libc in.
-_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
-
-## CAVEAT EMPTOR:
-## There is no encapsulation within the following macros, do not change
-## the running order or otherwise move them around unless you know exactly
-## what you are doing...
-AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
-AC_LIBTOOL_PROG_COMPILER_PIC($1)
-AC_LIBTOOL_PROG_CC_C_O($1)
-AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
-AC_LIBTOOL_PROG_LD_SHLIBS($1)
-AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
-AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
-AC_LIBTOOL_SYS_LIB_STRIP
-AC_LIBTOOL_DLOPEN_SELF($1)
-
-AC_LIBTOOL_CONFIG($1)
-
-AC_LANG_RESTORE
-CC="$lt_save_CC"
-])# AC_LIBTOOL_LANG_GCJ_CONFIG
-
-
-# AC_LIBTOOL_LANG_RC_CONFIG
-# --------------------------
-# Ensure that the configuration vars for the Windows resource compiler are
-# suitably defined.  Those variables are subsequently used by
-# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
-AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG], [_LT_AC_LANG_RC_CONFIG(RC)])
-AC_DEFUN([_LT_AC_LANG_RC_CONFIG],
-[AC_LANG_SAVE
-
-# Source file extension for RC test sources.
-ac_ext=rc
-
-# Object file extension for compiled RC test sources.
-objext=o
-_LT_AC_TAGVAR(objext, $1)=$objext
-
-# Code to be used in simple compile tests
-lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }\n'
-
-# Code to be used in simple link tests
-lt_simple_link_test_code="$lt_simple_compile_test_code"
-
-# ltmain only uses $CC for tagged configurations so make sure $CC is set.
-_LT_AC_SYS_COMPILER
-
-# Allow CC to be a program name with arguments.
-lt_save_CC="$CC"
-CC=${RC-"windres"}
-compiler=$CC
-_LT_AC_TAGVAR(compiler, $1)=$CC
-_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
-
-AC_LIBTOOL_CONFIG($1)
-
-AC_LANG_RESTORE
-CC="$lt_save_CC"
-])# AC_LIBTOOL_LANG_RC_CONFIG
-
-
-# AC_LIBTOOL_CONFIG([TAGNAME])
-# ----------------------------
-# If TAGNAME is not passed, then create an initial libtool script
-# with a default configuration from the untagged config vars.  Otherwise
-# add code to config.status for appending the configuration named by
-# TAGNAME from the matching tagged config vars.
-AC_DEFUN([AC_LIBTOOL_CONFIG],
-[# The else clause should only fire when bootstrapping the
-# libtool distribution, otherwise you forgot to ship ltmain.sh
-# with your package, and you will get complaints that there are
-# no rules to generate ltmain.sh.
-if test -f "$ltmain"; then
-  # See if we are running on zsh, and set the options which allow our commands through
-  # without removal of \ escapes.
-  if test -n "${ZSH_VERSION+set}" ; then
-    setopt NO_GLOB_SUBST
-  fi
-  # Now quote all the things that may contain metacharacters while being
-  # careful not to overquote the AC_SUBSTed values.  We take copies of the
-  # variables and quote the copies for generation of the libtool script.
-  for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC NM \
-    SED SHELL STRIP \
-    libname_spec library_names_spec soname_spec extract_expsyms_cmds \
-    old_striplib striplib file_magic_cmd finish_cmds finish_eval \
-    deplibs_check_method reload_flag reload_cmds need_locks \
-    lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \
-    lt_cv_sys_global_symbol_to_c_name_address \
-    sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
-    old_postinstall_cmds old_postuninstall_cmds \
-    _LT_AC_TAGVAR(compiler, $1) \
-    _LT_AC_TAGVAR(CC, $1) \
-    _LT_AC_TAGVAR(LD, $1) \
-    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1) \
-    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1) \
-    _LT_AC_TAGVAR(lt_prog_compiler_static, $1) \
-    _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) \
-    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1) \
-    _LT_AC_TAGVAR(thread_safe_flag_spec, $1) \
-    _LT_AC_TAGVAR(whole_archive_flag_spec, $1) \
-    _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) \
-    _LT_AC_TAGVAR(old_archive_cmds, $1) \
-    _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) \
-    _LT_AC_TAGVAR(predep_objects, $1) \
-    _LT_AC_TAGVAR(postdep_objects, $1) \
-    _LT_AC_TAGVAR(predeps, $1) \
-    _LT_AC_TAGVAR(postdeps, $1) \
-    _LT_AC_TAGVAR(compiler_lib_search_path, $1) \
-    _LT_AC_TAGVAR(archive_cmds, $1) \
-    _LT_AC_TAGVAR(archive_expsym_cmds, $1) \
-    _LT_AC_TAGVAR(postinstall_cmds, $1) \
-    _LT_AC_TAGVAR(postuninstall_cmds, $1) \
-    _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) \
-    _LT_AC_TAGVAR(allow_undefined_flag, $1) \
-    _LT_AC_TAGVAR(no_undefined_flag, $1) \
-    _LT_AC_TAGVAR(export_symbols_cmds, $1) \
-    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) \
-    _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) \
-    _LT_AC_TAGVAR(hardcode_libdir_separator, $1) \
-    _LT_AC_TAGVAR(hardcode_automatic, $1) \
-    _LT_AC_TAGVAR(module_cmds, $1) \
-    _LT_AC_TAGVAR(module_expsym_cmds, $1) \
-    _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) \
-    _LT_AC_TAGVAR(exclude_expsyms, $1) \
-    _LT_AC_TAGVAR(include_expsyms, $1); do
-
-    case $var in
-    _LT_AC_TAGVAR(old_archive_cmds, $1) | \
-    _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) | \
-    _LT_AC_TAGVAR(archive_cmds, $1) | \
-    _LT_AC_TAGVAR(archive_expsym_cmds, $1) | \
-    _LT_AC_TAGVAR(module_cmds, $1) | \
-    _LT_AC_TAGVAR(module_expsym_cmds, $1) | \
-    _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) | \
-    _LT_AC_TAGVAR(export_symbols_cmds, $1) | \
-    extract_expsyms_cmds | reload_cmds | finish_cmds | \
-    postinstall_cmds | postuninstall_cmds | \
-    old_postinstall_cmds | old_postuninstall_cmds | \
-    sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
-      # Double-quote double-evaled strings.
-      eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
-      ;;
-    *)
-      eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
-      ;;
-    esac
-  done
-
-  case $lt_echo in
-  *'\[$]0 --fallback-echo"')
-    lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\[$]0 --fallback-echo"[$]/[$]0 --fallback-echo"/'`
-    ;;
-  esac
-
-ifelse([$1], [],
-  [cfgfile="${ofile}T"
-  trap "$rm \"$cfgfile\"; exit 1" 1 2 15
-  $rm -f "$cfgfile"
-  AC_MSG_NOTICE([creating $ofile])],
-  [cfgfile="$ofile"])
-
-  cat <<__EOF__ >> "$cfgfile"
-ifelse([$1], [],
-[#! $SHELL
-
-# `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
-# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
-# NOTE: Changes made to this file will be lost: look at ltmain.sh.
-#
-# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001
-# Free Software Foundation, Inc.
-#
-# This file is part of GNU Libtool:
-# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
-#
-# This program 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 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful, but
-# WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-# General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02110-1301, USA.
-#
-# As a special exception to the GNU General Public License, if you
-# distribute this file as part of a program that contains a
-# configuration script generated by Autoconf, you may include it under
-# the same distribution terms that you use for the rest of that program.
-
-# A sed program that does not truncate output.
-SED=$lt_SED
-
-# Sed that helps us avoid accidentally triggering echo(1) options like -n.
-Xsed="$SED -e s/^X//"
-
-# The HP-UX ksh and POSIX shell print the target directory to stdout
-# if CDPATH is set.
-if test "X\${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
-
-# The names of the tagged configurations supported by this script.
-available_tags=
-
-# ### BEGIN LIBTOOL CONFIG],
-[# ### BEGIN LIBTOOL TAG CONFIG: $tagname])
-
-# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
-
-# Shell to use when invoking shell scripts.
-SHELL=$lt_SHELL
-
-# Whether or not to build shared libraries.
-build_libtool_libs=$enable_shared
-
-# Whether or not to build static libraries.
-build_old_libs=$enable_static
-
-# Whether or not to add -lc for building shared libraries.
-build_libtool_need_lc=$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)
-
-# Whether or not to disallow shared libs when runtime libs are static
-allow_libtool_libs_with_static_runtimes=$_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)
-
-# Whether or not to optimize for fast installation.
-fast_install=$enable_fast_install
-
-# The host system.
-host_alias=$host_alias
-host=$host
-
-# An echo program that does not interpret backslashes.
-echo=$lt_echo
-
-# The archiver.
-AR=$lt_AR
-AR_FLAGS=$lt_AR_FLAGS
-
-# A C compiler.
-LTCC=$lt_LTCC
-
-# A language-specific compiler.
-CC=$lt_[]_LT_AC_TAGVAR(compiler, $1)
-
-# Is the compiler the GNU C compiler?
-with_gcc=$_LT_AC_TAGVAR(GCC, $1)
-
-# An ERE matcher.
-EGREP=$lt_EGREP
-
-# The linker used to build libraries.
-LD=$lt_[]_LT_AC_TAGVAR(LD, $1)
-
-# Whether we need hard or soft links.
-LN_S=$lt_LN_S
-
-# A BSD-compatible nm program.
-NM=$lt_NM
-
-# A symbol stripping program
-STRIP=$lt_STRIP
-
-# Used to examine libraries when file_magic_cmd begins "file"
-MAGIC_CMD=$MAGIC_CMD
-
-# Used on cygwin: DLL creation program.
-DLLTOOL="$DLLTOOL"
-
-# Used on cygwin: object dumper.
-OBJDUMP="$OBJDUMP"
-
-# Used on cygwin: assembler.
-AS="$AS"
-
-# The name of the directory that contains temporary libtool files.
-objdir=$objdir
-
-# How to create reloadable object files.
-reload_flag=$lt_reload_flag
-reload_cmds=$lt_reload_cmds
-
-# How to pass a linker flag through the compiler.
-wl=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
-
-# Object file suffix (normally "o").
-objext="$ac_objext"
-
-# Old archive suffix (normally "a").
-libext="$libext"
-
-# Shared library suffix (normally ".so").
-shrext_cmds='$shrext_cmds'
-
-# Executable file suffix (normally "").
-exeext="$exeext"
-
-# Additional compiler flags for building library objects.
-pic_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)
-pic_mode=$pic_mode
-
-# What is the maximum length of a command?
-max_cmd_len=$lt_cv_sys_max_cmd_len
-
-# Does compiler simultaneously support -c and -o options?
-compiler_c_o=$lt_[]_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)
-
-# Must we lock files when doing compilation ?
-need_locks=$lt_need_locks
-
-# Do we need the lib prefix for modules?
-need_lib_prefix=$need_lib_prefix
-
-# Do we need a version for libraries?
-need_version=$need_version
-
-# Whether dlopen is supported.
-dlopen_support=$enable_dlopen
-
-# Whether dlopen of programs is supported.
-dlopen_self=$enable_dlopen_self
-
-# Whether dlopen of statically linked programs is supported.
-dlopen_self_static=$enable_dlopen_self_static
-
-# Compiler flag to prevent dynamic linking.
-link_static_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_static, $1)
-
-# Compiler flag to turn off builtin functions.
-no_builtin_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)
-
-# Compiler flag to allow reflexive dlopens.
-export_dynamic_flag_spec=$lt_[]_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)
-
-# Compiler flag to generate shared objects directly from archives.
-whole_archive_flag_spec=$lt_[]_LT_AC_TAGVAR(whole_archive_flag_spec, $1)
-
-# Compiler flag to generate thread-safe objects.
-thread_safe_flag_spec=$lt_[]_LT_AC_TAGVAR(thread_safe_flag_spec, $1)
-
-# Library versioning type.
-version_type=$version_type
-
-# Format of library name prefix.
-libname_spec=$lt_libname_spec
-
-# List of archive names.  First name is the real one, the rest are links.
-# The last name is the one that the linker finds with -lNAME.
-library_names_spec=$lt_library_names_spec
-
-# The coded name of the library, if different from the real name.
-soname_spec=$lt_soname_spec
-
-# Commands used to build and install an old-style archive.
-RANLIB=$lt_RANLIB
-old_archive_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_cmds, $1)
-old_postinstall_cmds=$lt_old_postinstall_cmds
-old_postuninstall_cmds=$lt_old_postuninstall_cmds
-
-# Create an old-style archive from a shared archive.
-old_archive_from_new_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_new_cmds, $1)
-
-# Create a temporary old-style archive to link instead of a shared archive.
-old_archive_from_expsyms_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)
-
-# Commands used to build and install a shared archive.
-archive_cmds=$lt_[]_LT_AC_TAGVAR(archive_cmds, $1)
-archive_expsym_cmds=$lt_[]_LT_AC_TAGVAR(archive_expsym_cmds, $1)
-postinstall_cmds=$lt_postinstall_cmds
-postuninstall_cmds=$lt_postuninstall_cmds
-
-# Commands used to build a loadable module (assumed same as above if empty)
-module_cmds=$lt_[]_LT_AC_TAGVAR(module_cmds, $1)
-module_expsym_cmds=$lt_[]_LT_AC_TAGVAR(module_expsym_cmds, $1)
-
-# Commands to strip libraries.
-old_striplib=$lt_old_striplib
-striplib=$lt_striplib
-
-# Dependencies to place before the objects being linked to create a
-# shared library.
-predep_objects=$lt_[]_LT_AC_TAGVAR(predep_objects, $1)
-
-# Dependencies to place after the objects being linked to create a
-# shared library.
-postdep_objects=$lt_[]_LT_AC_TAGVAR(postdep_objects, $1)
-
-# Dependencies to place before the objects being linked to create a
-# shared library.
-predeps=$lt_[]_LT_AC_TAGVAR(predeps, $1)
-
-# Dependencies to place after the objects being linked to create a
-# shared library.
-postdeps=$lt_[]_LT_AC_TAGVAR(postdeps, $1)
-
-# The library search path used internally by the compiler when linking
-# a shared library.
-compiler_lib_search_path=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1)
-
-# Method to check whether dependent libraries are shared objects.
-deplibs_check_method=$lt_deplibs_check_method
-
-# Command to use when deplibs_check_method == file_magic.
-file_magic_cmd=$lt_file_magic_cmd
-
-# Flag that allows shared libraries with undefined symbols to be built.
-allow_undefined_flag=$lt_[]_LT_AC_TAGVAR(allow_undefined_flag, $1)
-
-# Flag that forces no undefined symbols.
-no_undefined_flag=$lt_[]_LT_AC_TAGVAR(no_undefined_flag, $1)
-
-# Commands used to finish a libtool library installation in a directory.
-finish_cmds=$lt_finish_cmds
-
-# Same as above, but a single script fragment to be evaled but not shown.
-finish_eval=$lt_finish_eval
-
-# Take the output of nm and produce a listing of raw symbols and C names.
-global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
-
-# Transform the output of nm in a proper C declaration
-global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
-
-# Transform the output of nm in a C name address pair
-global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
-
-# This is the shared library runtime path variable.
-runpath_var=$runpath_var
-
-# This is the shared library path variable.
-shlibpath_var=$shlibpath_var
-
-# Is shlibpath searched before the hard-coded library search path?
-shlibpath_overrides_runpath=$shlibpath_overrides_runpath
-
-# How to hardcode a shared library path into an executable.
-hardcode_action=$_LT_AC_TAGVAR(hardcode_action, $1)
-
-# Whether we should hardcode library paths into libraries.
-hardcode_into_libs=$hardcode_into_libs
-
-# Flag to hardcode \$libdir into a binary during linking.
-# This must work even if \$libdir does not exist.
-hardcode_libdir_flag_spec=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)
-
-# If ld is used when linking, flag to hardcode \$libdir into
-# a binary during linking. This must work even if \$libdir does
-# not exist.
-hardcode_libdir_flag_spec_ld=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)
-
-# Whether we need a single -rpath flag with a separated argument.
-hardcode_libdir_separator=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_separator, $1)
-
-# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the
-# resulting binary.
-hardcode_direct=$_LT_AC_TAGVAR(hardcode_direct, $1)
-
-# Set to yes if using the -LDIR flag during linking hardcodes DIR into the
-# resulting binary.
-hardcode_minus_L=$_LT_AC_TAGVAR(hardcode_minus_L, $1)
-
-# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
-# the resulting binary.
-hardcode_shlibpath_var=$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)
-
-# Set to yes if building a shared library automatically hardcodes DIR into the library
-# and all subsequent libraries and executables linked against it.
-hardcode_automatic=$_LT_AC_TAGVAR(hardcode_automatic, $1)
-
-# Variables whose values should be saved in libtool wrapper scripts and
-# restored at relink time.
-variables_saved_for_relink="$variables_saved_for_relink"
-
-# Whether libtool must link a program against all its dependency libraries.
-link_all_deplibs=$_LT_AC_TAGVAR(link_all_deplibs, $1)
-
-# Compile-time system search path for libraries
-sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
-
-# Run-time system search path for libraries
-sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
-
-# Fix the shell variable \$srcfile for the compiler.
-fix_srcfile_path="$_LT_AC_TAGVAR(fix_srcfile_path, $1)"
-
-# Set to yes if exported symbols are required.
-always_export_symbols=$_LT_AC_TAGVAR(always_export_symbols, $1)
-
-# The commands to list exported symbols.
-export_symbols_cmds=$lt_[]_LT_AC_TAGVAR(export_symbols_cmds, $1)
-
-# The commands to extract the exported symbol list from a shared archive.
-extract_expsyms_cmds=$lt_extract_expsyms_cmds
-
-# Symbols that should not be listed in the preloaded symbols.
-exclude_expsyms=$lt_[]_LT_AC_TAGVAR(exclude_expsyms, $1)
-
-# Symbols that must always be exported.
-include_expsyms=$lt_[]_LT_AC_TAGVAR(include_expsyms, $1)
-
-ifelse([$1],[],
-[# ### END LIBTOOL CONFIG],
-[# ### END LIBTOOL TAG CONFIG: $tagname])
-
-__EOF__
-
-ifelse([$1],[], [
-  case $host_os in
-  aix3*)
-    cat <<\EOF >> "$cfgfile"
-
-# AIX sometimes has problems with the GCC collect2 program.  For some
-# reason, if we set the COLLECT_NAMES environment variable, the problems
-# vanish in a puff of smoke.
-if test "X${COLLECT_NAMES+set}" != Xset; then
-  COLLECT_NAMES=
-  export COLLECT_NAMES
-fi
-EOF
-    ;;
-  esac
-
-  # We use sed instead of cat because bash on DJGPP gets confused if
-  # if finds mixed CR/LF and LF-only lines.  Since sed operates in
-  # text mode, it properly converts lines to CR/LF.  This bash problem
-  # is reportedly fixed, but why not run on old versions too?
-  sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1)
-
-  mv -f "$cfgfile" "$ofile" || \
-    (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
-  chmod +x "$ofile"
-])
-else
-  # If there is no Makefile yet, we rely on a make rule to execute
-  # `config.status --recheck' to rerun these tests and create the
-  # libtool script then.
-  ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'`
-  if test -f "$ltmain_in"; then
-    test -f Makefile && make "$ltmain"
-  fi
-fi
-])# AC_LIBTOOL_CONFIG
-
-
-# AC_LIBTOOL_PROG_COMPILER_NO_RTTI([TAGNAME])
-# -------------------------------------------
-AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI],
-[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
-
-_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
+_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
 
 if test "$GCC" = yes; then
-  _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
+  _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
 
-  AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
+  _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
     lt_cv_prog_compiler_rtti_exceptions,
     [-fno-rtti -fno-exceptions], [],
-    [_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
+    [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
 fi
-])# AC_LIBTOOL_PROG_COMPILER_NO_RTTI
+_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1],
+	[Compiler flag to turn off builtin functions])
+])# _LT_COMPILER_NO_RTTI
 
 
-# AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
-# ---------------------------------
-AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE],
-[AC_REQUIRE([AC_CANONICAL_HOST])
-AC_REQUIRE([AC_PROG_NM])
-AC_REQUIRE([AC_OBJEXT])
+# _LT_CMD_GLOBAL_SYMBOLS
+# ----------------------
+m4_defun([_LT_CMD_GLOBAL_SYMBOLS],
+[AC_REQUIRE([AC_CANONICAL_HOST])dnl
+AC_REQUIRE([AC_PROG_CC])dnl
+AC_REQUIRE([LT_PATH_NM])dnl
+AC_REQUIRE([LT_PATH_LD])dnl
+m4_require([_LT_DECL_SED])dnl
+m4_require([_LT_DECL_EGREP])dnl
+m4_require([_LT_TAG_COMPILER])dnl
+
 # Check for command to grab the raw symbol name followed by C symbol from nm.
 AC_MSG_CHECKING([command to parse $NM output from $compiler object])
 AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
@@ -4351,29 +3332,18 @@ symcode='[[BCDEGRST]]'
 # Regexp to match symbols that can be accessed directly from C.
 sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
 
-# Transform the above into a raw symbol and a C symbol.
-symxfrm='\1 \2\3 \3'
-
-# Transform an extracted symbol line into a proper C declaration
-lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'"
-
-# Transform an extracted symbol line into symbol name and symbol address
-lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/  {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode \([[^ ]]*\) \([[^ ]]*\)$/  {\"\2\", (lt_ptr) \&\2},/p'"
-
 # Define system-specific variables.
 case $host_os in
 aix*)
   symcode='[[BCDT]]'
   ;;
-cygwin* | mingw* | pw32*)
+cygwin* | mingw* | pw32* | cegcc*)
   symcode='[[ABCDGISTW]]'
   ;;
-hpux*) # Its linker distinguishes data from code symbols
+hpux*)
   if test "$host_cpu" = ia64; then
     symcode='[[ABCDEGRST]]'
   fi
-  lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
-  lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/  {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/  {\"\2\", (lt_ptr) \&\2},/p'"
   ;;
 irix* | nonstopux*)
   symcode='[[BCDEGRST]]'
@@ -4381,49 +3351,89 @@ irix* | nonstopux*)
 osf*)
   symcode='[[BCDEGQRST]]'
   ;;
-solaris* | sysv5*)
+solaris*)
   symcode='[[BDRT]]'
   ;;
+sco3.2v5*)
+  symcode='[[DT]]'
+  ;;
+sysv4.2uw2*)
+  symcode='[[DT]]'
+  ;;
+sysv5* | sco5v6* | unixware* | OpenUNIX*)
+  symcode='[[ABDT]]'
+  ;;
 sysv4)
   symcode='[[DFNSTU]]'
   ;;
 esac
 
+# If we're using GNU nm, then use its standard symbol codes.
+case `$NM -V 2>&1` in
+*GNU* | *'with BFD'*)
+  symcode='[[ABCDGIRSTW]]' ;;
+esac
+
+# Transform an extracted symbol line into a proper C declaration.
+# Some systems (esp. on ia64) link data and code symbols differently,
+# so use this general approach.
+lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
+
+# Transform an extracted symbol line into symbol name and symbol address
+lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/  {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/  {\"\2\", (void *) \&\2},/p'"
+lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([[^ ]]*\) $/  {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \(lib[[^ ]]*\)$/  {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/  {\"lib\2\", (void *) \&\2},/p'"
+
 # Handle CRLF in mingw tool chain
 opt_cr=
 case $build_os in
 mingw*)
-  opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
+  opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
   ;;
 esac
 
-# If we're using GNU nm, then use its standard symbol codes.
-case `$NM -V 2>&1` in
-*GNU* | *'with BFD'*)
-  symcode='[[ABCDGIRSTW]]' ;;
-esac
-
-# Try without a prefix undercore, then with it.
+# Try without a prefix underscore, then with it.
 for ac_symprfx in "" "_"; do
 
+  # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
+  symxfrm="\\1 $ac_symprfx\\2 \\2"
+
   # Write the raw and C identifiers.
-  lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ 	]]\($symcode$symcode*\)[[ 	]][[ 	]]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'"
+  if test "$lt_cv_nm_interface" = "MS dumpbin"; then
+    # Fake it for dumpbin and say T for any non-static function
+    # and D for any global variable.
+    # Also find C++ and __fastcall symbols from MSVC++,
+    # which start with @ or ?.
+    lt_cv_sys_global_symbol_pipe="$AWK ['"\
+"     {last_section=section; section=\$ 3};"\
+"     /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
+"     \$ 0!~/External *\|/{next};"\
+"     / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
+"     {if(hide[section]) next};"\
+"     {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\
+"     {split(\$ 0, a, /\||\r/); split(a[2], s)};"\
+"     s[1]~/^[@?]/{print s[1], s[1]; next};"\
+"     s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\
+"     ' prfx=^$ac_symprfx]"
+  else
+    lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[	 ]]\($symcode$symcode*\)[[	 ]][[	 ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
+  fi
 
   # Check to see that the pipe works correctly.
   pipe_works=no
 
   rm -f conftest*
-  cat > conftest.$ac_ext <<EOF
+  cat > conftest.$ac_ext <<_LT_EOF
 #ifdef __cplusplus
 extern "C" {
 #endif
 char nm_test_var;
-void nm_test_func(){}
+void nm_test_func(void);
+void nm_test_func(void){}
 #ifdef __cplusplus
 }
 #endif
 int main(){nm_test_var='a';nm_test_func();return(0);}
-EOF
+_LT_EOF
 
   if AC_TRY_EVAL(ac_compile); then
     # Now try to grab the symbols.
@@ -4437,48 +3447,50 @@ EOF
       fi
 
       # Make sure that we snagged all the symbols we need.
-      if grep ' nm_test_var$' "$nlist" >/dev/null; then
-	if grep ' nm_test_func$' "$nlist" >/dev/null; then
-	  cat <<EOF > conftest.$ac_ext
+      if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
+	if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
+	  cat <<_LT_EOF > conftest.$ac_ext
 #ifdef __cplusplus
 extern "C" {
 #endif
 
-EOF
+_LT_EOF
 	  # Now generate the symbol file.
-	  eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext'
+	  eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
 
-	  cat <<EOF >> conftest.$ac_ext
-#if defined (__STDC__) && __STDC__
-# define lt_ptr_t void *
-#else
-# define lt_ptr_t char *
-# define const
-#endif
+	  cat <<_LT_EOF >> conftest.$ac_ext
 
-/* The mapping between symbol names and symbols. */
+/* The mapping between symbol names and symbols.  */
 const struct {
   const char *name;
-  lt_ptr_t address;
+  void       *address;
 }
-lt_preloaded_symbols[[]] =
+lt__PROGRAM__LTX_preloaded_symbols[[]] =
 {
-EOF
-	  $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext
-	  cat <<\EOF >> conftest.$ac_ext
-  {0, (lt_ptr_t) 0}
+  { "@PROGRAM@", (void *) 0 },
+_LT_EOF
+	  $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
+	  cat <<\_LT_EOF >> conftest.$ac_ext
+  {0, (void *) 0}
 };
 
+/* This works around a problem in FreeBSD linker */
+#ifdef FREEBSD_WORKAROUND
+static const void *lt_preloaded_setup() {
+  return lt__PROGRAM__LTX_preloaded_symbols;
+}
+#endif
+
 #ifdef __cplusplus
 }
 #endif
-EOF
+_LT_EOF
 	  # Now try linking the two files.
 	  mv conftest.$ac_objext conftstm.$ac_objext
 	  lt_save_LIBS="$LIBS"
 	  lt_save_CFLAGS="$CFLAGS"
 	  LIBS="conftstm.$ac_objext"
-	  CFLAGS="$CFLAGS$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
+	  CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
 	  if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
 	    pipe_works=yes
 	  fi
@@ -4497,7 +3509,7 @@ EOF
     echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
     cat conftest.$ac_ext >&5
   fi
-  rm -f conftest* conftst*
+  rm -rf conftest* conftst*
 
   # Do not use the global_symbol_pipe unless it works.
   if test "$pipe_works" = yes; then
@@ -4515,127 +3527,162 @@ if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; the
 else
   AC_MSG_RESULT(ok)
 fi
-]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
 
+_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1],
+    [Take the output of nm and produce a listing of raw symbols and C names])
+_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1],
+    [Transform the output of nm in a proper C declaration])
+_LT_DECL([global_symbol_to_c_name_address],
+    [lt_cv_sys_global_symbol_to_c_name_address], [1],
+    [Transform the output of nm in a C name address pair])
+_LT_DECL([global_symbol_to_c_name_address_lib_prefix],
+    [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1],
+    [Transform the output of nm in a C name address pair when lib prefix is needed])
+]) # _LT_CMD_GLOBAL_SYMBOLS
 
-# AC_LIBTOOL_PROG_COMPILER_PIC([TAGNAME])
-# ---------------------------------------
-AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC],
-[_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)=
-_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
-_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=
+
+# _LT_COMPILER_PIC([TAGNAME])
+# ---------------------------
+m4_defun([_LT_COMPILER_PIC],
+[m4_require([_LT_TAG_COMPILER])dnl
+_LT_TAGVAR(lt_prog_compiler_wl, $1)=
+_LT_TAGVAR(lt_prog_compiler_pic, $1)=
+_LT_TAGVAR(lt_prog_compiler_static, $1)=
 
 AC_MSG_CHECKING([for $compiler option to produce PIC])
- ifelse([$1],[CXX],[
+m4_if([$1], [CXX], [
   # C++ specific cases for pic, static, wl, etc.
   if test "$GXX" = yes; then
-    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
-    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
+    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
 
     case $host_os in
     aix*)
       # All AIX code is PIC.
       if test "$host_cpu" = ia64; then
 	# AIX 5 now supports IA64 processor
-	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
       fi
       ;;
+
     amigaos*)
-      # FIXME: we need at least 68020 code to build shared libraries, but
-      # adding the `-m68020' flag to GCC prevents building anything better,
-      # like `-m68040'.
-      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
+      case $host_cpu in
+      powerpc)
+            # see comment about AmigaOS4 .so support
+            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+        ;;
+      m68k)
+            # FIXME: we need at least 68020 code to build shared libraries, but
+            # adding the `-m68020' flag to GCC prevents building anything better,
+            # like `-m68040'.
+            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
+        ;;
+      esac
       ;;
-    beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
+
+    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
       # PIC is the default for these OSes.
       ;;
-    mingw* | os2* | pw32*)
+    mingw* | cygwin* | os2* | pw32* | cegcc*)
       # This hack is so that the source file can tell whether it is being
       # built for inclusion in a dll (and should export symbols for example).
-      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
+      # Although the cygwin gcc ignores -fPIC, still need this for old-style
+      # (--disable-auto-import) libraries
+      m4_if([$1], [GCJ], [],
+	[_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
       ;;
     darwin* | rhapsody*)
       # PIC is the default on this platform
       # Common symbols not allowed in MH_DYLIB files
-      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
+      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
       ;;
     *djgpp*)
       # DJGPP does not support shared libraries at all
-      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
+      _LT_TAGVAR(lt_prog_compiler_pic, $1)=
+      ;;
+    interix[[3-9]]*)
+      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
+      # Instead, we relocate shared libraries at runtime.
       ;;
     sysv4*MP*)
       if test -d /usr/nec; then
-	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
+	_LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
       fi
       ;;
     hpux*)
-      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
-      # not for PA HP-UX.
-      case "$host_cpu" in
-      hppa*64*|ia64*)
+      # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
+      # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag
+      # sets the default TLS model and affects inlining.
+      case $host_cpu in
+      hppa*64*)
 	;;
       *)
-	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
 	;;
       esac
       ;;
+    *qnx* | *nto*)
+      # QNX uses GNU C++, but need to define -shared option too, otherwise
+      # it will coredump.
+      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
+      ;;
     *)
-      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
       ;;
     esac
   else
     case $host_os in
-      aix4* | aix5*)
+      aix[[4-9]]*)
 	# All AIX code is PIC.
 	if test "$host_cpu" = ia64; then
 	  # AIX 5 now supports IA64 processor
-	  _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
 	else
-	  _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
+	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
 	fi
 	;;
       chorus*)
 	case $cc_basename in
-	cxch68)
+	cxch68*)
 	  # Green Hills C++ Compiler
-	  # _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a"
+	  # _LT_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a"
 	  ;;
 	esac
 	;;
       dgux*)
 	case $cc_basename in
-	  ec++)
-	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+	  ec++*)
+	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
 	    ;;
-	  ghcx)
+	  ghcx*)
 	    # Green Hills C++ Compiler
-	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
+	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
 	    ;;
 	  *)
 	    ;;
 	esac
 	;;
-      freebsd* | kfreebsd*-gnu)
+      freebsd* | dragonfly*)
 	# FreeBSD uses GNU C++
 	;;
       hpux9* | hpux10* | hpux11*)
 	case $cc_basename in
-	  CC)
-	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
-	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive"
+	  CC*)
+	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+	    _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
 	    if test "$host_cpu" != ia64; then
-	      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
+	      _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
 	    fi
 	    ;;
-	  aCC)
-	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
-	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive"
-	    case "$host_cpu" in
+	  aCC*)
+	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+	    _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
+	    case $host_cpu in
 	    hppa*64*|ia64*)
 	      # +Z the default
 	      ;;
 	    *)
-	      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
+	      _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
 	      ;;
 	    esac
 	    ;;
@@ -4643,38 +3690,69 @@ AC_MSG_CHECKING([for $compiler option to produce PIC])
 	    ;;
 	esac
 	;;
+      interix*)
+	# This is c89, which is MS Visual C++ (no shared libs)
+	# Anyone wants to do a port?
+	;;
       irix5* | irix6* | nonstopux*)
 	case $cc_basename in
-	  CC)
-	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
-	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
+	  CC*)
+	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
 	    # CC pic flag -KPIC is the default.
 	    ;;
 	  *)
 	    ;;
 	esac
 	;;
-      linux*)
+      linux* | k*bsd*-gnu)
 	case $cc_basename in
-	  KCC)
+	  KCC*)
 	    # KAI C++ Compiler
-	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
-	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
+	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
 	    ;;
-	  icpc)
-	    # Intel C++
-	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
-	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
-	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
+	  ecpc* )
+	    # old Intel C++ for x86_64 which still supported -KPIC.
+	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
+	    ;;
+	  icpc* )
+	    # Intel C++, used to be incompatible with GCC.
+	    # ICC 10 doesn't accept -KPIC any more.
+	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
 	    ;;
-	  cxx)
+	  pgCC* | pgcpp*)
+	    # Portland Group C++ compiler
+	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
+	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+	    ;;
+	  cxx*)
 	    # Compaq C++
 	    # Make sure the PIC flag is empty.  It appears that all Alpha
 	    # Linux and Compaq Tru64 Unix objects are PIC.
-	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
-	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
+	    _LT_TAGVAR(lt_prog_compiler_pic, $1)=
+	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
+	    ;;
+	  xlc* | xlC*)
+	    # IBM XL 8.0 on PPC
+	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
+	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
 	    ;;
 	  *)
+	    case `$CC -V 2>&1 | sed 5q` in
+	    *Sun\ C*)
+	      # Sun C++ 5.9
+	      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+	      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+	      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
+	      ;;
+	    esac
 	    ;;
 	esac
 	;;
@@ -4684,31 +3762,36 @@ AC_MSG_CHECKING([for $compiler option to produce PIC])
 	;;
       mvs*)
 	case $cc_basename in
-	  cxx)
-	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
+	  cxx*)
+	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
 	    ;;
 	  *)
 	    ;;
 	esac
 	;;
-      netbsd*)
+      netbsd* | netbsdelf*-gnu)
 	;;
+      *qnx* | *nto*)
+        # QNX uses GNU C++, but need to define -shared option too, otherwise
+        # it will coredump.
+        _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
+        ;;
       osf3* | osf4* | osf5*)
 	case $cc_basename in
-	  KCC)
-	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
+	  KCC*)
+	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
 	    ;;
-	  RCC)
+	  RCC*)
 	    # Rational C++ 2.4.1
-	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
+	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
 	    ;;
-	  cxx)
+	  cxx*)
 	    # Digital/Compaq C++
-	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 	    # Make sure the PIC flag is empty.  It appears that all Alpha
 	    # Linux and Compaq Tru64 Unix objects are PIC.
-	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
-	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
+	    _LT_TAGVAR(lt_prog_compiler_pic, $1)=
+	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
 	    ;;
 	  *)
 	    ;;
@@ -4716,26 +3799,17 @@ AC_MSG_CHECKING([for $compiler option to produce PIC])
 	;;
       psos*)
 	;;
-      sco*)
-	case $cc_basename in
-	  CC)
-	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
-	    ;;
-	  *)
-	    ;;
-	esac
-	;;
       solaris*)
 	case $cc_basename in
-	  CC)
+	  CC*)
 	    # Sun C++ 4.2, 5.x and Centerline C++
-	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
-	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
-	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
+	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
 	    ;;
-	  gcx)
+	  gcx*)
 	    # Green Hills C++ Compiler
-	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
+	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
 	    ;;
 	  *)
 	    ;;
@@ -4743,309 +3817,436 @@ AC_MSG_CHECKING([for $compiler option to produce PIC])
 	;;
       sunos4*)
 	case $cc_basename in
-	  CC)
+	  CC*)
 	    # Sun C++ 4.x
-	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
-	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
+	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
 	    ;;
-	  lcc)
+	  lcc*)
 	    # Lucid
-	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
+	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
 	    ;;
 	  *)
 	    ;;
 	esac
 	;;
+      sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
+	case $cc_basename in
+	  CC*)
+	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+	    ;;
+	esac
+	;;
       tandem*)
 	case $cc_basename in
-	  NCC)
+	  NCC*)
 	    # NonStop-UX NCC 3.20
-	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
 	    ;;
 	  *)
 	    ;;
 	esac
 	;;
-      unixware*)
-	;;
       vxworks*)
 	;;
       *)
-	_LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
+	_LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
 	;;
     esac
   fi
 ],
 [
   if test "$GCC" = yes; then
-    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
-    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
+    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
 
     case $host_os in
       aix*)
       # All AIX code is PIC.
       if test "$host_cpu" = ia64; then
 	# AIX 5 now supports IA64 processor
-	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
       fi
       ;;
 
     amigaos*)
-      # FIXME: we need at least 68020 code to build shared libraries, but
-      # adding the `-m68020' flag to GCC prevents building anything better,
-      # like `-m68040'.
-      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
+      case $host_cpu in
+      powerpc)
+            # see comment about AmigaOS4 .so support
+            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+        ;;
+      m68k)
+            # FIXME: we need at least 68020 code to build shared libraries, but
+            # adding the `-m68020' flag to GCC prevents building anything better,
+            # like `-m68040'.
+            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
+        ;;
+      esac
       ;;
 
-    beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
+    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
       # PIC is the default for these OSes.
       ;;
 
-    mingw* | pw32* | os2*)
+    mingw* | cygwin* | pw32* | os2* | cegcc*)
       # This hack is so that the source file can tell whether it is being
       # built for inclusion in a dll (and should export symbols for example).
-      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
+      # Although the cygwin gcc ignores -fPIC, still need this for old-style
+      # (--disable-auto-import) libraries
+      m4_if([$1], [GCJ], [],
+	[_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
       ;;
 
     darwin* | rhapsody*)
       # PIC is the default on this platform
       # Common symbols not allowed in MH_DYLIB files
-      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
+      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
+      ;;
+
+    hpux*)
+      # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
+      # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag
+      # sets the default TLS model and affects inlining.
+      case $host_cpu in
+      hppa*64*)
+	# +Z the default
+	;;
+      *)
+	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+	;;
+      esac
+      ;;
+
+    interix[[3-9]]*)
+      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
+      # Instead, we relocate shared libraries at runtime.
       ;;
 
     msdosdjgpp*)
       # Just because we use GCC doesn't mean we suddenly get shared libraries
       # on systems that don't support them.
-      _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
+      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
       enable_shared=no
       ;;
 
+    *nto* | *qnx*)
+      # QNX uses GNU C++, but need to define -shared option too, otherwise
+      # it will coredump.
+      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
+      ;;
+
     sysv4*MP*)
       if test -d /usr/nec; then
-	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
+	_LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
       fi
       ;;
 
-    hpux*)
-      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
-      # not for PA HP-UX.
-      case "$host_cpu" in
-      hppa*64*|ia64*)
-	# +Z the default
-	;;
-      *)
-	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
-	;;
-      esac
-      ;;
-
     *)
-      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
       ;;
     esac
   else
     # PORTME Check for flag to pass linker flags through the system compiler.
     case $host_os in
     aix*)
-      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
       if test "$host_cpu" = ia64; then
 	# AIX 5 now supports IA64 processor
-	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
       else
-	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
+	_LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
       fi
       ;;
 
-    mingw* | pw32* | os2*)
+    mingw* | cygwin* | pw32* | os2* | cegcc*)
       # This hack is so that the source file can tell whether it is being
       # built for inclusion in a dll (and should export symbols for example).
-      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
+      m4_if([$1], [GCJ], [],
+	[_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
       ;;
 
     hpux9* | hpux10* | hpux11*)
-      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
       # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
       # not for PA HP-UX.
-      case "$host_cpu" in
+      case $host_cpu in
       hppa*64*|ia64*)
 	# +Z the default
 	;;
       *)
-	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
+	_LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
 	;;
       esac
       # Is there a better lt_prog_compiler_static that works with the bundled CC?
-      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
+      _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
       ;;
 
     irix5* | irix6* | nonstopux*)
-      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
       # PIC (with -KPIC) is the default.
-      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
+      _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
       ;;
 
-    newsos6)
-      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
-      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
-      ;;
-
-    linux*)
-      case $CC in
-      icc* | ecc*)
-	_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
-	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
-	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
+    linux* | k*bsd*-gnu)
+      case $cc_basename in
+      # old Intel for x86_64 which still supported -KPIC.
+      ecc*)
+	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+	_LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
+        ;;
+      # icc used to be incompatible with GCC.
+      # ICC 10 doesn't accept -KPIC any more.
+      icc* | ifort*)
+	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+	_LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
+        ;;
+      # Lahey Fortran 8.1.
+      lf95*)
+	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+	_LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared'
+	_LT_TAGVAR(lt_prog_compiler_static, $1)='--static'
+	;;
+      pgcc* | pgf77* | pgf90* | pgf95*)
+        # Portland Group compilers (*not* the Pentium gcc compiler,
+	# which looks to be a dead project)
+	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
+	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
         ;;
       ccc*)
-        _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+        _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
         # All Alpha code is PIC.
-        _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
+        _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
         ;;
+      xl*)
+	# IBM XL C 8.0/Fortran 10.1 on PPC
+	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
+	_LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
+	;;
+      *)
+	case `$CC -V 2>&1 | sed 5q` in
+	*Sun\ C*)
+	  # Sun C 5.9
+	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+	  _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+	  ;;
+	*Sun\ F*)
+	  # Sun Fortran 8.3 passes all unrecognized flags to the linker
+	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+	  _LT_TAGVAR(lt_prog_compiler_wl, $1)=''
+	  ;;
+	esac
+	;;
       esac
       ;;
 
+    newsos6)
+      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+      ;;
+
+    *nto* | *qnx*)
+      # QNX uses GNU C++, but need to define -shared option too, otherwise
+      # it will coredump.
+      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
+      ;;
+
     osf3* | osf4* | osf5*)
-      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
       # All OSF/1 code is PIC.
-      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
+      _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
       ;;
 
-    sco3.2v5*)
-      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kpic'
-      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-dn'
+    rdos*)
+      _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
       ;;
 
     solaris*)
-      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
-      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
-      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+      case $cc_basename in
+      f77* | f90* | f95*)
+	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
+      *)
+	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
+      esac
       ;;
 
     sunos4*)
-      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
-      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
-      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
+      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
+      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
       ;;
 
-    sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
-      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
-      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
-      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+    sysv4 | sysv4.2uw2* | sysv4.3*)
+      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
       ;;
 
     sysv4*MP*)
       if test -d /usr/nec ;then
-	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
-	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
+	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
       fi
       ;;
 
+    sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
+      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+      ;;
+
+    unicos*)
+      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
+      ;;
+
     uts4*)
-      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
-      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
+      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
       ;;
 
     *)
-      _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
+      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
       ;;
     esac
   fi
 ])
-AC_MSG_RESULT([$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)])
+case $host_os in
+  # For platforms which do not support PIC, -DPIC is meaningless:
+  *djgpp*)
+    _LT_TAGVAR(lt_prog_compiler_pic, $1)=
+    ;;
+  *)
+    _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])"
+    ;;
+esac
+AC_MSG_RESULT([$_LT_TAGVAR(lt_prog_compiler_pic, $1)])
+_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1],
+	[How to pass a linker flag through the compiler])
 
 #
 # Check to make sure the PIC flag actually works.
 #
-if test -n "$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)"; then
-  AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) works],
-    _LT_AC_TAGVAR(lt_prog_compiler_pic_works, $1),
-    [$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])], [],
-    [case $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) in
+if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
+  _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works],
+    [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)],
+    [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [],
+    [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in
      "" | " "*) ;;
-     *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)" ;;
+     *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;;
      esac],
-    [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
-     _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
+    [_LT_TAGVAR(lt_prog_compiler_pic, $1)=
+     _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
 fi
-case "$host_os" in
-  # For platforms which do not support PIC, -DPIC is meaningless:
-  *djgpp*)
-    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
-    ;;
-  *)
-    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])"
-    ;;
-esac
-])
+_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1],
+	[Additional compiler flags for building library objects])
 
+#
+# Check to make sure the static flag actually works.
+#
+wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\"
+_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
+  _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1),
+  $lt_tmp_static_flag,
+  [],
+  [_LT_TAGVAR(lt_prog_compiler_static, $1)=])
+_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1],
+	[Compiler flag to prevent dynamic linking])
+])# _LT_COMPILER_PIC
 
-# AC_LIBTOOL_PROG_LD_SHLIBS([TAGNAME])
-# ------------------------------------
+
+# _LT_LINKER_SHLIBS([TAGNAME])
+# ----------------------------
 # See if the linker supports building shared libraries.
-AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS],
-[AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
-ifelse([$1],[CXX],[
-  _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
+m4_defun([_LT_LINKER_SHLIBS],
+[AC_REQUIRE([LT_PATH_LD])dnl
+AC_REQUIRE([LT_PATH_NM])dnl
+m4_require([_LT_FILEUTILS_DEFAULTS])dnl
+m4_require([_LT_DECL_EGREP])dnl
+m4_require([_LT_DECL_SED])dnl
+m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
+m4_require([_LT_TAG_COMPILER])dnl
+AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
+m4_if([$1], [CXX], [
+  _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
   case $host_os in
-  aix4* | aix5*)
+  aix[[4-9]]*)
     # If we're using GNU nm, then we don't want the "-C" option.
     # -C means demangle to AIX nm, but means don't demangle with GNU nm
-    if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
-      _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols'
+    if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
+      _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
     else
-      _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols'
+      _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
     fi
     ;;
   pw32*)
-    _LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
+    _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
   ;;
-  cygwin* | mingw*)
-    _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGS]] /s/.* \([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]] /s/.* //'\'' | sort | uniq > $export_symbols'
+  cygwin* | mingw* | cegcc*)
+    _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;/^.*[[ ]]__nm__/s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols'
+  ;;
+  linux* | k*bsd*-gnu)
+    _LT_TAGVAR(link_all_deplibs, $1)=no
   ;;
   *)
-    _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
+    _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
   ;;
   esac
-],[
+  _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
+], [
   runpath_var=
-  _LT_AC_TAGVAR(allow_undefined_flag, $1)=
-  _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
-  _LT_AC_TAGVAR(archive_cmds, $1)=
-  _LT_AC_TAGVAR(archive_expsym_cmds, $1)=
-  _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)=
-  _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)=
-  _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
-  _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
-  _LT_AC_TAGVAR(thread_safe_flag_spec, $1)=
-  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
-  _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
-  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
-  _LT_AC_TAGVAR(hardcode_direct, $1)=no
-  _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
-  _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
-  _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
-  _LT_AC_TAGVAR(hardcode_automatic, $1)=no
-  _LT_AC_TAGVAR(module_cmds, $1)=
-  _LT_AC_TAGVAR(module_expsym_cmds, $1)=
-  _LT_AC_TAGVAR(always_export_symbols, $1)=no
-  _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
+  _LT_TAGVAR(allow_undefined_flag, $1)=
+  _LT_TAGVAR(always_export_symbols, $1)=no
+  _LT_TAGVAR(archive_cmds, $1)=
+  _LT_TAGVAR(archive_expsym_cmds, $1)=
+  _LT_TAGVAR(compiler_needs_object, $1)=no
+  _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
+  _LT_TAGVAR(export_dynamic_flag_spec, $1)=
+  _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
+  _LT_TAGVAR(hardcode_automatic, $1)=no
+  _LT_TAGVAR(hardcode_direct, $1)=no
+  _LT_TAGVAR(hardcode_direct_absolute, $1)=no
+  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
+  _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
+  _LT_TAGVAR(hardcode_libdir_separator, $1)=
+  _LT_TAGVAR(hardcode_minus_L, $1)=no
+  _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
+  _LT_TAGVAR(inherit_rpath, $1)=no
+  _LT_TAGVAR(link_all_deplibs, $1)=unknown
+  _LT_TAGVAR(module_cmds, $1)=
+  _LT_TAGVAR(module_expsym_cmds, $1)=
+  _LT_TAGVAR(old_archive_from_new_cmds, $1)=
+  _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)=
+  _LT_TAGVAR(thread_safe_flag_spec, $1)=
+  _LT_TAGVAR(whole_archive_flag_spec, $1)=
   # include_expsyms should be a list of space-separated symbols to be *always*
   # included in the symbol list
-  _LT_AC_TAGVAR(include_expsyms, $1)=
+  _LT_TAGVAR(include_expsyms, $1)=
   # exclude_expsyms can be an extended regexp of symbols to exclude
   # it will be wrapped by ` (' and `)$', so one must not match beginning or
   # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
   # as well as any symbol that contains `d'.
-  _LT_AC_TAGVAR(exclude_expsyms, $1)="_GLOBAL_OFFSET_TABLE_"
+  _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
   # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
   # platforms (ab)use it in PIC code, but their linkers get confused if
   # the symbol is explicitly referenced.  Since portable code cannot
   # rely on this symbol name, it's probably fine to never include it in
   # preloaded symbol tables.
+  # Exclude shared library initialization/finalization symbols.
+dnl Note also adjust exclude_expsyms for C++ above.
   extract_expsyms_cmds=
 
   case $host_os in
-  cygwin* | mingw* | pw32*)
+  cygwin* | mingw* | pw32* | cegcc*)
     # FIXME: the MSVC++ port hasn't been tested in a loooong time
     # When not using gcc, we currently assume that we are using
     # Microsoft Visual C++.
@@ -5053,23 +4254,51 @@ ifelse([$1],[CXX],[
       with_gnu_ld=no
     fi
     ;;
+  interix*)
+    # we just hope/assume this is gcc and not c89 (= MSVC++)
+    with_gnu_ld=yes
+    ;;
   openbsd*)
     with_gnu_ld=no
     ;;
+  linux* | k*bsd*-gnu)
+    _LT_TAGVAR(link_all_deplibs, $1)=no
+    ;;
   esac
 
-  _LT_AC_TAGVAR(ld_shlibs, $1)=yes
+  _LT_TAGVAR(ld_shlibs, $1)=yes
   if test "$with_gnu_ld" = yes; then
     # If archive_cmds runs LD, not CC, wlarc should be empty
     wlarc='${wl}'
 
+    # Set some defaults for GNU ld with shared library support. These
+    # are reset later if shared libraries are not supported. Putting them
+    # here allows them to be overridden if necessary.
+    runpath_var=LD_RUN_PATH
+    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
+    # ancient GNU ld didn't support --whole-archive et. al.
+    if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
+      _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
+    else
+      _LT_TAGVAR(whole_archive_flag_spec, $1)=
+    fi
+    supports_anon_versioning=no
+    case `$LD -v 2>&1` in
+      *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
+      *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
+      *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
+      *\ 2.11.*) ;; # other 2.11 versions
+      *) supports_anon_versioning=yes ;;
+    esac
+
     # See if GNU ld supports shared libraries.
     case $host_os in
-    aix3* | aix4* | aix5*)
+    aix[[3-9]]*)
       # On AIX/PPC, the GNU linker is very broken
       if test "$host_cpu" != ia64; then
-	_LT_AC_TAGVAR(ld_shlibs, $1)=no
-	cat <<EOF 1>&2
+	_LT_TAGVAR(ld_shlibs, $1)=no
+	cat <<_LT_EOF 1>&2
 
 *** Warning: the GNU linker, at least up to release 2.9.1, is reported
 *** to be unable to reliably create shared libraries on AIX.
@@ -5077,74 +4306,160 @@ ifelse([$1],[CXX],[
 *** really care for shared libraries, you may want to modify your PATH
 *** so that a non-GNU linker is found, and then restart.
 
-EOF
+_LT_EOF
       fi
       ;;
 
     amigaos*)
-      _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
-      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
-      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
-
-      # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
-      # that the semantics of dynamic libraries on AmigaOS, at least up
-      # to version 4, is to share data among multiple programs linked
-      # with the same dynamic library.  Since this doesn't match the
-      # behavior of shared libraries on other platforms, we can't use
-      # them.
-      _LT_AC_TAGVAR(ld_shlibs, $1)=no
+      case $host_cpu in
+      powerpc)
+            # see comment about AmigaOS4 .so support
+            _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+            _LT_TAGVAR(archive_expsym_cmds, $1)=''
+        ;;
+      m68k)
+            _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
+            _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+            _LT_TAGVAR(hardcode_minus_L, $1)=yes
+        ;;
+      esac
       ;;
 
     beos*)
-      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
-	_LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
+      if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
+	_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
 	# Joseph Beckenbach <jrb3@best.com> says some releases of gcc
 	# support --undefined.  This deserves some investigation.  FIXME
-	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+	_LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
       else
-	_LT_AC_TAGVAR(ld_shlibs, $1)=no
+	_LT_TAGVAR(ld_shlibs, $1)=no
       fi
       ;;
 
-    cygwin* | mingw* | pw32*)
-      # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
+    cygwin* | mingw* | pw32* | cegcc*)
+      # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
       # as there is no search path for DLLs.
-      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
-      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
-      _LT_AC_TAGVAR(always_export_symbols, $1)=no
-      _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
-      _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGS]] /s/.* \([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]] /s/.* //'\'' | sort | uniq > $export_symbols'
-
-      if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
-        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
+      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
+      _LT_TAGVAR(always_export_symbols, $1)=no
+      _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
+      _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols'
+
+      if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
+        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
 	# If the export-symbols file already is a .def file (1st line
 	# is EXPORTS), use it as is; otherwise, prepend...
-	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
+	_LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
 	  cp $export_symbols $output_objdir/$soname.def;
 	else
 	  echo EXPORTS > $output_objdir/$soname.def;
 	  cat $export_symbols >> $output_objdir/$soname.def;
 	fi~
-	$CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000  ${wl}--out-implib,$lib'
+	$CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
       else
-	ld_shlibs=no
+	_LT_TAGVAR(ld_shlibs, $1)=no
       fi
       ;;
 
-    netbsd*)
-      if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
-	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
+    interix[[3-9]]*)
+      _LT_TAGVAR(hardcode_direct, $1)=no
+      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+      # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
+      # Instead, shared libraries are loaded at an image base (0x10000000 by
+      # default) and relocated if they conflict, which is a slow very memory
+      # consuming and fragmenting process.  To avoid this, we pick a random,
+      # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
+      # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
+      _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+      _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+      ;;
+
+    gnu* | linux* | tpf* | k*bsd*-gnu)
+      tmp_diet=no
+      if test "$host_os" = linux-dietlibc; then
+	case $cc_basename in
+	  diet\ *) tmp_diet=yes;;	# linux-dietlibc with static linking (!diet-dyn)
+	esac
+      fi
+      if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
+	 && test "$tmp_diet" = no
+      then
+	tmp_addflag=
+	tmp_sharedflag='-shared'
+	case $cc_basename,$host_cpu in
+        pgcc*)				# Portland Group C compiler
+	  _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
+	  tmp_addflag=' $pic_flag'
+	  ;;
+	pgf77* | pgf90* | pgf95*)	# Portland Group f77 and f90 compilers
+	  _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
+	  tmp_addflag=' $pic_flag -Mnomain' ;;
+	ecc*,ia64* | icc*,ia64*)	# Intel C compiler on ia64
+	  tmp_addflag=' -i_dynamic' ;;
+	efc*,ia64* | ifort*,ia64*)	# Intel Fortran compiler on ia64
+	  tmp_addflag=' -i_dynamic -nofor_main' ;;
+	ifc* | ifort*)			# Intel Fortran compiler
+	  tmp_addflag=' -nofor_main' ;;
+	lf95*)				# Lahey Fortran 8.1
+	  _LT_TAGVAR(whole_archive_flag_spec, $1)=
+	  tmp_sharedflag='--shared' ;;
+	xl[[cC]]*)			# IBM XL C 8.0 on PPC (deal with xlf below)
+	  tmp_sharedflag='-qmkshrobj'
+	  tmp_addflag= ;;
+	esac
+	case `$CC -V 2>&1 | sed 5q` in
+	*Sun\ C*)			# Sun C 5.9
+	  _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
+	  _LT_TAGVAR(compiler_needs_object, $1)=yes
+	  tmp_sharedflag='-G' ;;
+	*Sun\ F*)			# Sun Fortran 8.3
+	  tmp_sharedflag='-G' ;;
+	esac
+	_LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+
+        if test "x$supports_anon_versioning" = xyes; then
+          _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
+	    cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
+	    echo "local: *; };" >> $output_objdir/$libname.ver~
+	    $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
+        fi
+
+	case $cc_basename in
+	xlf*)
+	  # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
+	  _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive'
+	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
+	  _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir'
+	  _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $compiler_flags -soname $soname -o $lib'
+	  if test "x$supports_anon_versioning" = xyes; then
+	    _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
+	      cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
+	      echo "local: *; };" >> $output_objdir/$libname.ver~
+	      $LD -shared $libobjs $deplibs $compiler_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
+	  fi
+	  ;;
+	esac
+      else
+        _LT_TAGVAR(ld_shlibs, $1)=no
+      fi
+      ;;
+
+    netbsd* | netbsdelf*-gnu)
+      if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
+	_LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
 	wlarc=
       else
-	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
-	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
       fi
       ;;
 
-    solaris* | sysv5*)
-      if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then
-	_LT_AC_TAGVAR(ld_shlibs, $1)=no
-	cat <<EOF 1>&2
+    solaris*)
+      if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
+	_LT_TAGVAR(ld_shlibs, $1)=no
+	cat <<_LT_EOF 1>&2
 
 *** Warning: The releases 2.8.* of the GNU linker cannot reliably
 *** create shared libraries on Solaris systems.  Therefore, libtool
@@ -5153,86 +4468,87 @@ EOF
 *** your PATH or compiler configuration so that the native linker is
 *** used, and then restart.
 
-EOF
-      elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
-	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
-	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+_LT_EOF
+      elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
+	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
       else
-	_LT_AC_TAGVAR(ld_shlibs, $1)=no
+	_LT_TAGVAR(ld_shlibs, $1)=no
       fi
       ;;
 
+    sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
+      case `$LD -v 2>&1` in
+        *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*)
+	_LT_TAGVAR(ld_shlibs, $1)=no
+	cat <<_LT_EOF 1>&2
+
+*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
+*** reliably create shared libraries on SCO systems.  Therefore, libtool
+*** is disabling shared libraries support.  We urge you to upgrade GNU
+*** binutils to release 2.16.91.0.3 or newer.  Another option is to modify
+*** your PATH or compiler configuration so that the native linker is
+*** used, and then restart.
+
+_LT_EOF
+	;;
+	*)
+	  # For security reasons, it is highly recommended that you always
+	  # use absolute paths for naming shared libraries, and exclude the
+	  # DT_RUNPATH tag from executables and libraries.  But doing so
+	  # requires that you compile everything twice, which is a pain.
+	  if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
+	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+	    _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+	  else
+	    _LT_TAGVAR(ld_shlibs, $1)=no
+	  fi
+	;;
+      esac
+      ;;
+
     sunos4*)
-      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+      _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
       wlarc=
-      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
-      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+      _LT_TAGVAR(hardcode_direct, $1)=yes
+      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
       ;;
 
-  linux*)
-    if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
-        tmp_archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
-	_LT_AC_TAGVAR(archive_cmds, $1)="$tmp_archive_cmds"
-      supports_anon_versioning=no
-      case `$LD -v 2>/dev/null` in
-        *\ [01].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
-        *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
-        *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
-        *\ 2.11.*) ;; # other 2.11 versions
-        *) supports_anon_versioning=yes ;;
-      esac
-      if test $supports_anon_versioning = yes; then
-        _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $output_objdir/$libname.ver~
-cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
-$echo "local: *; };" >> $output_objdir/$libname.ver~
-        $CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
-      else
-        _LT_AC_TAGVAR(archive_expsym_cmds, $1)="$tmp_archive_cmds"
-      fi
-    else
-      _LT_AC_TAGVAR(ld_shlibs, $1)=no
-    fi
-    ;;
-
     *)
-      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
-	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
-	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+      if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
+	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
       else
-	_LT_AC_TAGVAR(ld_shlibs, $1)=no
+	_LT_TAGVAR(ld_shlibs, $1)=no
       fi
       ;;
     esac
 
-    if test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = yes; then
-      runpath_var=LD_RUN_PATH
-      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
-      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
-      # ancient GNU ld didn't support --whole-archive et. al.
-      if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then
- 	_LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
-      else
-  	_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
-      fi
+    if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then
+      runpath_var=
+      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
+      _LT_TAGVAR(export_dynamic_flag_spec, $1)=
+      _LT_TAGVAR(whole_archive_flag_spec, $1)=
     fi
   else
     # PORTME fill in a description of your system's linker (not GNU ld)
     case $host_os in
     aix3*)
-      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
-      _LT_AC_TAGVAR(always_export_symbols, $1)=yes
-      _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'
+      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
+      _LT_TAGVAR(always_export_symbols, $1)=yes
+      _LT_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'
       # Note: this linker hardcodes the directories in LIBPATH if there
       # are no directories specified by -L.
-      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
-      if test "$GCC" = yes && test -z "$link_static_flag"; then
+      _LT_TAGVAR(hardcode_minus_L, $1)=yes
+      if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
 	# Neither direct hardcoding nor static linking is supported with a
 	# broken collect2.
-	_LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
+	_LT_TAGVAR(hardcode_direct, $1)=unsupported
       fi
       ;;
 
-    aix4* | aix5*)
+    aix[[4-9]]*)
       if test "$host_cpu" = ia64; then
 	# On IA64, the linker does run time linking by default, so we don't
 	# have to do anything special.
@@ -5242,23 +4558,24 @@ $echo "local: *; };" >> $output_objdir/$libname.ver~
       else
 	# If we're using GNU nm, then we don't want the "-C" option.
 	# -C means demangle to AIX nm, but means don't demangle with GNU nm
-	if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
-	  _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols'
+	if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
+	  _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
 	else
-	  _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols'
+	  _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
 	fi
 	aix_use_runtimelinking=no
 
 	# Test if we are trying to use run time linking or normal
 	# AIX style linking. If -brtl is somewhere in LDFLAGS, we
 	# need to do runtime linking.
-	case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*)
+	case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
 	  for ld_flag in $LDFLAGS; do
-  	  if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
-  	    aix_use_runtimelinking=yes
-  	    break
-  	  fi
+	  if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
+	    aix_use_runtimelinking=yes
+	    break
+	  fi
 	  done
+	  ;;
 	esac
 
 	exp_sym_flag='-bexport'
@@ -5271,174 +4588,143 @@ $echo "local: *; };" >> $output_objdir/$libname.ver~
       # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
       # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
 
-      _LT_AC_TAGVAR(archive_cmds, $1)=''
-      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
-      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
-      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
+      _LT_TAGVAR(archive_cmds, $1)=''
+      _LT_TAGVAR(hardcode_direct, $1)=yes
+      _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
+      _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
+      _LT_TAGVAR(link_all_deplibs, $1)=yes
+      _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
 
       if test "$GCC" = yes; then
-	case $host_os in aix4.[012]|aix4.[012].*)
+	case $host_os in aix4.[[012]]|aix4.[[012]].*)
 	# We only want to do this on AIX 4.2 and lower, the check
 	# below for broken collect2 doesn't work under 4.3+
 	  collect2name=`${CC} -print-prog-name=collect2`
-	  if test -f "$collect2name" && \
-  	   strings "$collect2name" | grep resolve_lib_name >/dev/null
+	  if test -f "$collect2name" &&
+	   strings "$collect2name" | $GREP resolve_lib_name >/dev/null
 	  then
-  	  # We have reworked collect2
-  	  _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+	  # We have reworked collect2
+	  :
 	  else
-  	  # We have old collect2
-  	  _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
-  	  # It fails to find uninstalled libraries when the uninstalled
-  	  # path is not listed in the libpath.  Setting hardcode_minus_L
-  	  # to unsupported forces relinking
-  	  _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
-  	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
-  	  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
+	  # We have old collect2
+	  _LT_TAGVAR(hardcode_direct, $1)=unsupported
+	  # It fails to find uninstalled libraries when the uninstalled
+	  # path is not listed in the libpath.  Setting hardcode_minus_L
+	  # to unsupported forces relinking
+	  _LT_TAGVAR(hardcode_minus_L, $1)=yes
+	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+	  _LT_TAGVAR(hardcode_libdir_separator, $1)=
 	  fi
+	  ;;
 	esac
 	shared_flag='-shared'
+	if test "$aix_use_runtimelinking" = yes; then
+	  shared_flag="$shared_flag "'${wl}-G'
+	fi
+	_LT_TAGVAR(link_all_deplibs, $1)=no
       else
 	# not using gcc
 	if test "$host_cpu" = ia64; then
-  	# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
-  	# chokes on -Wl,-G. The following line is correct:
+	# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
+	# chokes on -Wl,-G. The following line is correct:
 	  shared_flag='-G'
 	else
-  	if test "$aix_use_runtimelinking" = yes; then
+	  if test "$aix_use_runtimelinking" = yes; then
 	    shared_flag='${wl}-G'
 	  else
 	    shared_flag='${wl}-bM:SRE'
-  	fi
+	  fi
 	fi
       fi
 
+      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
       # It seems that -bexpall does not export symbols beginning with
       # underscore (_), so it is better to generate a list of symbols to export.
-      _LT_AC_TAGVAR(always_export_symbols, $1)=yes
+      _LT_TAGVAR(always_export_symbols, $1)=yes
       if test "$aix_use_runtimelinking" = yes; then
 	# Warning - without using the other runtime loading flags (-brtl),
 	# -berok will link without error, but may produce a broken library.
-	_LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
-       # Determine the default libpath from the value encoded in an empty executable.
-       _LT_AC_SYS_LIBPATH_AIX
-       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
-	_LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols $shared_flag"
-       else
+	_LT_TAGVAR(allow_undefined_flag, $1)='-berok'
+        # Determine the default libpath from the value encoded in an
+        # empty executable.
+        _LT_SYS_MODULE_PATH_AIX
+        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
+        _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
+      else
 	if test "$host_cpu" = ia64; then
-	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
-	  _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
-	  _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"
+	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
+	  _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
+	  _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
 	else
-	 # Determine the default libpath from the value encoded in an empty executable.
-	 _LT_AC_SYS_LIBPATH_AIX
-	 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
+	 # Determine the default libpath from the value encoded in an
+	 # empty executable.
+	 _LT_SYS_MODULE_PATH_AIX
+	 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
 	  # Warning - without using the other run time loading flags,
 	  # -berok will link without error, but may produce a broken library.
-	  _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
-	  _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
-	  # -bexpall does not export symbols beginning with underscore (_)
-	  _LT_AC_TAGVAR(always_export_symbols, $1)=yes
+	  _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
+	  _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
 	  # Exported symbols can be pulled into shared objects from archives
-	  _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=' '
-	  _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
-	  # This is similar to how AIX traditionally builds it's shared libraries.
-	  _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
+	  _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
+	  _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
+	  # This is similar to how AIX traditionally builds its shared libraries.
+	  _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
 	fi
       fi
       ;;
 
     amigaos*)
-      _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
-      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
-      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
-      # see comment about different semantics on the GNU ld section
-      _LT_AC_TAGVAR(ld_shlibs, $1)=no
+      case $host_cpu in
+      powerpc)
+            # see comment about AmigaOS4 .so support
+            _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+            _LT_TAGVAR(archive_expsym_cmds, $1)=''
+        ;;
+      m68k)
+            _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
+            _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+            _LT_TAGVAR(hardcode_minus_L, $1)=yes
+        ;;
+      esac
       ;;
 
-    bsdi4*)
-      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
+    bsdi[[45]]*)
+      _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
       ;;
 
-    cygwin* | mingw* | pw32*)
+    cygwin* | mingw* | pw32* | cegcc*)
       # When not using gcc, we currently assume that we are using
       # Microsoft Visual C++.
       # hardcode_libdir_flag_spec is actually meaningless, as there is
       # no search path for DLLs.
-      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
-      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
+      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
+      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
       # Tell ltmain to make .lib files, not .a files.
       libext=lib
       # Tell ltmain to make .dll files, not .so files.
       shrext_cmds=".dll"
       # FIXME: Setting linknames here is a bad hack.
-      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames='
+      _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `$ECHO "X$deplibs" | $Xsed -e '\''s/ -lc$//'\''` -link -dll~linknames='
       # The linker will automatically build a .lib file if we build a DLL.
-      _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='true'
+      _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
       # FIXME: Should let the user specify the lib program.
-      _LT_AC_TAGVAR(old_archive_cmds, $1)='lib /OUT:$oldlib$oldobjs$old_deplibs'
-      fix_srcfile_path='`cygpath -w "$srcfile"`'
-      _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
+      _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs'
+      _LT_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`'
+      _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
       ;;
 
     darwin* | rhapsody*)
-    if test "$GXX" = yes ; then
-      _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
-      case "$host_os" in
-      rhapsody* | darwin1.[[012]])
-	_LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined suppress'
-	;;
-      *) # Darwin 1.3 on
-      if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
-      	_LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress'
-      else
-        case ${MACOSX_DEPLOYMENT_TARGET} in
-          10.[[012]])
-            _LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress'
-            ;;
-          10.*)
-            _LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined dynamic_lookup'
-            ;;
-        esac
-      fi
-	;;
-      esac
-    	lt_int_apple_cc_single_mod=no
-    	output_verbose_link_cmd='echo'
-    	if $CC -dumpspecs 2>&1 | grep 'single_module' >/dev/null ; then
-    	  lt_int_apple_cc_single_mod=yes
-    	fi
-    	if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
-    	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
-    	else
-        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
-      fi
-      _LT_AC_TAGVAR(module_cmds, $1)='$CC ${wl}-bind_at_load $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
-      # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
-        if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
-          _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
-        else
-          _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
-        fi
-          _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
-      _LT_AC_TAGVAR(hardcode_direct, $1)=no
-      _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
-      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
-      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-all_load $convenience'
-      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
-    else
-      _LT_AC_TAGVAR(ld_shlibs, $1)=no
-    fi
+      _LT_DARWIN_LINKER_FEATURES($1)
       ;;
 
     dgux*)
-      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
-      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
-      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
       ;;
 
     freebsd1*)
-      _LT_AC_TAGVAR(ld_shlibs, $1)=no
+      _LT_TAGVAR(ld_shlibs, $1)=no
       ;;
 
     # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
@@ -5446,91 +4732,106 @@ $echo "local: *; };" >> $output_objdir/$libname.ver~
     # does not break anything, and helps significantly (at the cost of a little
     # extra space).
     freebsd2.2*)
-      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
-      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
-      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
-      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+      _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
+      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+      _LT_TAGVAR(hardcode_direct, $1)=yes
+      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
       ;;
 
     # Unfortunately, older versions of FreeBSD 2 do not have this feature.
     freebsd2*)
-      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
-      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
-      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
-      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+      _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+      _LT_TAGVAR(hardcode_direct, $1)=yes
+      _LT_TAGVAR(hardcode_minus_L, $1)=yes
+      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
       ;;
 
     # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
-    freebsd* | kfreebsd*-gnu)
-      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
-      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
-      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
-      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+    freebsd* | dragonfly*)
+      _LT_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
+      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+      _LT_TAGVAR(hardcode_direct, $1)=yes
+      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
       ;;
 
     hpux9*)
       if test "$GCC" = yes; then
-	_LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+	_LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
       else
-	_LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+	_LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
       fi
-      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
-      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
-      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
+      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+      _LT_TAGVAR(hardcode_direct, $1)=yes
 
       # hardcode_minus_L: Not really in the search PATH,
       # but as the default location of the library.
-      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
-      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+      _LT_TAGVAR(hardcode_minus_L, $1)=yes
+      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
       ;;
 
-    hpux10* | hpux11*)
+    hpux10*)
       if test "$GCC" = yes -a "$with_gnu_ld" = no; then
-	case "$host_cpu" in
-	hppa*64*|ia64*)
-	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+	_LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+      else
+	_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
+      fi
+      if test "$with_gnu_ld" = no; then
+	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
+	_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
+	_LT_TAGVAR(hardcode_libdir_separator, $1)=:
+	_LT_TAGVAR(hardcode_direct, $1)=yes
+	_LT_TAGVAR(hardcode_direct_absolute, $1)=yes
+	_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+	# hardcode_minus_L: Not really in the search PATH,
+	# but as the default location of the library.
+	_LT_TAGVAR(hardcode_minus_L, $1)=yes
+      fi
+      ;;
+
+    hpux11*)
+      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
+	case $host_cpu in
+	hppa*64*)
+	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+	  ;;
+	ia64*)
+	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
 	  ;;
 	*)
-	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
 	  ;;
 	esac
       else
-	case "$host_cpu" in
-	hppa*64*|ia64*)
-	  _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $libobjs $deplibs $linker_flags'
+	case $host_cpu in
+	hppa*64*)
+	  _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+	  ;;
+	ia64*)
+	  _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
 	  ;;
 	*)
-	  _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
+	  _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
 	  ;;
 	esac
       fi
       if test "$with_gnu_ld" = no; then
-	case "$host_cpu" in
-	hppa*64*)
-	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
-	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
-	  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
-	  _LT_AC_TAGVAR(hardcode_direct, $1)=no
-	  _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
-	  ;;
-	ia64*)
-	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
-	  _LT_AC_TAGVAR(hardcode_direct, $1)=no
-	  _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
+	_LT_TAGVAR(hardcode_libdir_separator, $1)=:
 
-	  # hardcode_minus_L: Not really in the search PATH,
-	  # but as the default location of the library.
-	  _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
+	case $host_cpu in
+	hppa*64*|ia64*)
+	  _LT_TAGVAR(hardcode_direct, $1)=no
+	  _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
 	  ;;
 	*)
-	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
-	  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
-	  _LT_AC_TAGVAR(hardcode_direct, $1)=yes
-	  _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+	  _LT_TAGVAR(hardcode_direct, $1)=yes
+	  _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
+	  _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
 
 	  # hardcode_minus_L: Not really in the search PATH,
 	  # but as the default location of the library.
-	  _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
+	  _LT_TAGVAR(hardcode_minus_L, $1)=yes
 	  ;;
 	esac
       fi
@@ -5538,236 +4839,290 @@ $echo "local: *; };" >> $output_objdir/$libname.ver~
 
     irix5* | irix6* | nonstopux*)
       if test "$GCC" = yes; then
-	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+	# Try to use the -exported_symbol ld option, if it does not
+	# work, assume that -exports_file does not work either and
+	# implicitly export all symbols.
+        save_LDFLAGS="$LDFLAGS"
+        LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
+        AC_LINK_IFELSE(int foo(void) {},
+          _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib'
+        )
+        LDFLAGS="$save_LDFLAGS"
       else
-	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
-	_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir'
+	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
+	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib'
       fi
-      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
-      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
-      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
+      _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
+      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+      _LT_TAGVAR(inherit_rpath, $1)=yes
+      _LT_TAGVAR(link_all_deplibs, $1)=yes
       ;;
 
-    netbsd*)
-      if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
-	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
+    netbsd* | netbsdelf*-gnu)
+      if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
+	_LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
       else
-	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
+	_LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
       fi
-      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
-      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
-      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+      _LT_TAGVAR(hardcode_direct, $1)=yes
+      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
       ;;
 
     newsos6)
-      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
-      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
-      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
-      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
-      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+      _LT_TAGVAR(hardcode_direct, $1)=yes
+      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+      ;;
+
+    *nto* | *qnx*)
       ;;
 
     openbsd*)
-      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
-      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
-      if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
-	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
-	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
-	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+      if test -f /usr/libexec/ld.so; then
+	_LT_TAGVAR(hardcode_direct, $1)=yes
+	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+	_LT_TAGVAR(hardcode_direct_absolute, $1)=yes
+	if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+	  _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
+	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+	  _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+	else
+	  case $host_os in
+	   openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
+	     _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+	     _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+	     ;;
+	   *)
+	     _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+	     _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+	     ;;
+	  esac
+	fi
       else
-       case $host_os in
-	 openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
-	   _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
-	   _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
-	   ;;
-	 *)
-	   _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
-	   _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
-	   ;;
-       esac
+	_LT_TAGVAR(ld_shlibs, $1)=no
       fi
       ;;
 
     os2*)
-      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
-      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
-      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
-      _LT_AC_TAGVAR(archive_cmds, $1)='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
-      _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
+      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+      _LT_TAGVAR(hardcode_minus_L, $1)=yes
+      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
+      _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$ECHO DATA >> $output_objdir/$libname.def~$ECHO " SINGLE NONSHARED" >> $output_objdir/$libname.def~$ECHO EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
+      _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
       ;;
 
     osf3*)
       if test "$GCC" = yes; then
-	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
-	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+	_LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
+	_LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
       else
-	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
-	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
+	_LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
+	_LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
       fi
-      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
-      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+      _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
+      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
       ;;
 
     osf4* | osf5*)	# as osf3* with the addition of -msym flag
       if test "$GCC" = yes; then
-	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
-	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
-	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+	_LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
+	_LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
       else
-	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
-	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
-	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
-	$LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib~$rm $lib.exp'
+	_LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
+	_LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
+	_LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~
+	$CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp'
 
 	# Both c and cxx compiler support -rpath directly
-	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
+	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
       fi
-      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
-      ;;
-
-    sco3.2v5*)
-      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
-      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
-      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
-      runpath_var=LD_RUN_PATH
-      hardcode_runpath_var=yes
+      _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
+      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
       ;;
 
     solaris*)
-      _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text'
+      _LT_TAGVAR(no_undefined_flag, $1)=' -z defs'
       if test "$GCC" = yes; then
-	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
-	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
-	  $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp'
+	wlarc='${wl}'
+	_LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+	_LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
+	  $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
       else
-	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
-	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
-  	$LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
+	case `$CC -V 2>&1` in
+	*"Compilers 5.0"*)
+	  wlarc=''
+	  _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
+	  _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
+	  $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
+	  ;;
+	*)
+	  wlarc='${wl}'
+	  _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags'
+	  _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
+	  $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
+	  ;;
+	esac
       fi
-      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
-      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
       case $host_os in
       solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
-      *) # Supported since Solaris 2.6 (maybe 2.5.1?)
-	_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;;
+      *)
+	# The compiler driver will combine and reorder linker options,
+	# but understands `-z linker_flag'.  GCC discards it without `$wl',
+	# but is careful enough not to reorder.
+	# Supported since Solaris 2.6 (maybe 2.5.1?)
+	if test "$GCC" = yes; then
+	  _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
+	else
+	  _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
+	fi
+	;;
       esac
-      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
+      _LT_TAGVAR(link_all_deplibs, $1)=yes
       ;;
 
     sunos4*)
       if test "x$host_vendor" = xsequent; then
 	# Use $CC to link under sequent, because it throws in some extra .o
 	# files that make .init and .fini sections work.
-	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
+	_LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
       else
-	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
+	_LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
       fi
-      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
-      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
-      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
-      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+      _LT_TAGVAR(hardcode_direct, $1)=yes
+      _LT_TAGVAR(hardcode_minus_L, $1)=yes
+      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
       ;;
 
     sysv4)
       case $host_vendor in
 	sni)
-	  _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
-	  _LT_AC_TAGVAR(hardcode_direct, $1)=yes # is this really true???
+	  _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+	  _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true???
 	;;
 	siemens)
 	  ## LD is ld it makes a PLAMLIB
 	  ## CC just makes a GrossModule.
-	  _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
-	  _LT_AC_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
-	  _LT_AC_TAGVAR(hardcode_direct, $1)=no
+	  _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
+	  _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
+	  _LT_TAGVAR(hardcode_direct, $1)=no
         ;;
 	motorola)
-	  _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
-	  _LT_AC_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
+	  _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+	  _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
 	;;
       esac
       runpath_var='LD_RUN_PATH'
-      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
       ;;
 
     sysv4.3*)
-      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
-      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
-      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
+      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+      _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
       ;;
 
     sysv4*MP*)
       if test -d /usr/nec; then
-	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
-	_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+	_LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
 	runpath_var=LD_RUN_PATH
 	hardcode_runpath_var=yes
-	_LT_AC_TAGVAR(ld_shlibs, $1)=yes
+	_LT_TAGVAR(ld_shlibs, $1)=yes
       fi
       ;;
 
-    sysv4.2uw2*)
-      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
-      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
-      _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
-      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
-      hardcode_runpath_var=yes
-      runpath_var=LD_RUN_PATH
-      ;;
+    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
+      _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
+      _LT_TAGVAR(archive_cmds_need_lc, $1)=no
+      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+      runpath_var='LD_RUN_PATH'
 
-   sysv5OpenUNIX8* | sysv5UnixWare7* |  sysv5uw[[78]]* | unixware7*)
-      _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z ${wl}text'
       if test "$GCC" = yes; then
-	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+	_LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
       else
-	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+	_LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
       fi
-      runpath_var='LD_RUN_PATH'
-      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
       ;;
 
-    sysv5*)
-      _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text'
-      # $CC -shared without GNU ld will not create a library from C++
-      # object files and a static libstdc++, better avoid it by now
-      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
-      _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
-  		$LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
-      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
-      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+    sysv5* | sco3.2v5* | sco5v6*)
+      # Note: We can NOT use -z defs as we might desire, because we do not
+      # link with -lc, and that would cause any symbols used from libc to
+      # always be unresolved, which means just about no library would
+      # ever link correctly.  If we're not using GNU ld we use -z text
+      # though, which does catch some bad symbols but isn't as heavy-handed
+      # as -z defs.
+      _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
+      _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
+      _LT_TAGVAR(archive_cmds_need_lc, $1)=no
+      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
+      _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
+      _LT_TAGVAR(link_all_deplibs, $1)=yes
+      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
       runpath_var='LD_RUN_PATH'
+
+      if test "$GCC" = yes; then
+	_LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+      else
+	_LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+      fi
       ;;
 
     uts4*)
-      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
-      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
-      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
       ;;
 
     *)
-      _LT_AC_TAGVAR(ld_shlibs, $1)=no
+      _LT_TAGVAR(ld_shlibs, $1)=no
       ;;
     esac
+
+    if test x$host_vendor = xsni; then
+      case $host in
+      sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
+	_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym'
+	;;
+      esac
+    fi
   fi
 ])
-AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
-test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
+AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
+test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
 
-variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
-if test "$GCC" = yes; then
-  variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
-fi
+_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld
+
+_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl
+_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl
+_LT_DECL([], [extract_expsyms_cmds], [2],
+    [The commands to extract the exported symbol list from a shared archive])
 
 #
 # Do we need to explicitly link libc?
 #
-case "x$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)" in
+case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in
 x|xyes)
   # Assume -lc should be added
-  _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
+  _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
 
   if test "$enable_shared" = yes && test "$GCC" = yes; then
-    case $_LT_AC_TAGVAR(archive_cmds, $1) in
+    case $_LT_TAGVAR(archive_cmds, $1) in
     *'~'*)
       # FIXME: we may have to deal with multi-command sequences.
       ;;
@@ -5776,120 +5131,1934 @@ x|xyes)
       # systems, -lgcc has to come before -lc. If gcc already passes -lc
       # to ld, don't add -lc before -lgcc.
       AC_MSG_CHECKING([whether -lc should be explicitly linked in])
-      $rm conftest*
-      printf "$lt_simple_compile_test_code" > conftest.$ac_ext
+      $RM conftest*
+      echo "$lt_simple_compile_test_code" > conftest.$ac_ext
 
       if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
         soname=conftest
         lib=conftest
         libobjs=conftest.$ac_objext
         deplibs=
-        wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
+        wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1)
+	pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1)
         compiler_flags=-v
         linker_flags=-v
         verstring=
         output_objdir=.
         libname=conftest
-        lt_save_allow_undefined_flag=$_LT_AC_TAGVAR(allow_undefined_flag, $1)
-        _LT_AC_TAGVAR(allow_undefined_flag, $1)=
-        if AC_TRY_EVAL(_LT_AC_TAGVAR(archive_cmds, $1) 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1)
+        lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1)
+        _LT_TAGVAR(allow_undefined_flag, $1)=
+        if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1)
         then
-	  _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
+	  _LT_TAGVAR(archive_cmds_need_lc, $1)=no
         else
-	  _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
+	  _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
         fi
-        _LT_AC_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
+        _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
       else
         cat conftest.err 1>&5
       fi
-      $rm conftest*
-      AC_MSG_RESULT([$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)])
+      $RM conftest*
+      AC_MSG_RESULT([$_LT_TAGVAR(archive_cmds_need_lc, $1)])
       ;;
     esac
   fi
   ;;
 esac
-])# AC_LIBTOOL_PROG_LD_SHLIBS
 
+_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0],
+    [Whether or not to add -lc for building shared libraries])
+_LT_TAGDECL([allow_libtool_libs_with_static_runtimes],
+    [enable_shared_with_static_runtimes], [0],
+    [Whether or not to disallow shared libs when runtime libs are static])
+_LT_TAGDECL([], [export_dynamic_flag_spec], [1],
+    [Compiler flag to allow reflexive dlopens])
+_LT_TAGDECL([], [whole_archive_flag_spec], [1],
+    [Compiler flag to generate shared objects directly from archives])
+_LT_TAGDECL([], [compiler_needs_object], [1],
+    [Whether the compiler copes with passing no objects directly])
+_LT_TAGDECL([], [old_archive_from_new_cmds], [2],
+    [Create an old-style archive from a shared archive])
+_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2],
+    [Create a temporary old-style archive to link instead of a shared archive])
+_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive])
+_LT_TAGDECL([], [archive_expsym_cmds], [2])
+_LT_TAGDECL([], [module_cmds], [2],
+    [Commands used to build a loadable module if different from building
+    a shared archive.])
+_LT_TAGDECL([], [module_expsym_cmds], [2])
+_LT_TAGDECL([], [with_gnu_ld], [1],
+    [Whether we are building with GNU ld or not])
+_LT_TAGDECL([], [allow_undefined_flag], [1],
+    [Flag that allows shared libraries with undefined symbols to be built])
+_LT_TAGDECL([], [no_undefined_flag], [1],
+    [Flag that enforces no undefined symbols])
+_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1],
+    [Flag to hardcode $libdir into a binary during linking.
+    This must work even if $libdir does not exist])
+_LT_TAGDECL([], [hardcode_libdir_flag_spec_ld], [1],
+    [[If ld is used when linking, flag to hardcode $libdir into a binary
+    during linking.  This must work even if $libdir does not exist]])
+_LT_TAGDECL([], [hardcode_libdir_separator], [1],
+    [Whether we need a single "-rpath" flag with a separated argument])
+_LT_TAGDECL([], [hardcode_direct], [0],
+    [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
+    DIR into the resulting binary])
+_LT_TAGDECL([], [hardcode_direct_absolute], [0],
+    [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
+    DIR into the resulting binary and the resulting library dependency is
+    "absolute", i.e impossible to change by setting ${shlibpath_var} if the
+    library is relocated])
+_LT_TAGDECL([], [hardcode_minus_L], [0],
+    [Set to "yes" if using the -LDIR flag during linking hardcodes DIR
+    into the resulting binary])
+_LT_TAGDECL([], [hardcode_shlibpath_var], [0],
+    [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
+    into the resulting binary])
+_LT_TAGDECL([], [hardcode_automatic], [0],
+    [Set to "yes" if building a shared library automatically hardcodes DIR
+    into the library and all subsequent libraries and executables linked
+    against it])
+_LT_TAGDECL([], [inherit_rpath], [0],
+    [Set to yes if linker adds runtime paths of dependent libraries
+    to runtime path list])
+_LT_TAGDECL([], [link_all_deplibs], [0],
+    [Whether libtool must link a program against all its dependency libraries])
+_LT_TAGDECL([], [fix_srcfile_path], [1],
+    [Fix the shell variable $srcfile for the compiler])
+_LT_TAGDECL([], [always_export_symbols], [0],
+    [Set to "yes" if exported symbols are required])
+_LT_TAGDECL([], [export_symbols_cmds], [2],
+    [The commands to list exported symbols])
+_LT_TAGDECL([], [exclude_expsyms], [1],
+    [Symbols that should not be listed in the preloaded symbols])
+_LT_TAGDECL([], [include_expsyms], [1],
+    [Symbols that must always be exported])
+_LT_TAGDECL([], [prelink_cmds], [2],
+    [Commands necessary for linking programs (against libraries) with templates])
+_LT_TAGDECL([], [file_list_spec], [1],
+    [Specify filename containing input files])
+dnl FIXME: Not yet implemented
+dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1],
+dnl    [Compiler flag to generate thread safe objects])
+])# _LT_LINKER_SHLIBS
+
+
+# _LT_LANG_C_CONFIG([TAG])
+# ------------------------
+# Ensure that the configuration variables for a C compiler are suitably
+# defined.  These variables are subsequently used by _LT_CONFIG to write
+# the compiler configuration to `libtool'.
+m4_defun([_LT_LANG_C_CONFIG],
+[m4_require([_LT_DECL_EGREP])dnl
+lt_save_CC="$CC"
+AC_LANG_PUSH(C)
 
-# _LT_AC_FILE_LTDLL_C
-# -------------------
-# Be careful that the start marker always follows a newline.
-AC_DEFUN([_LT_AC_FILE_LTDLL_C], [
-# /* ltdll.c starts here */
-# #define WIN32_LEAN_AND_MEAN
-# #include <windows.h>
-# #undef WIN32_LEAN_AND_MEAN
-# #include <stdio.h>
-#
-# #ifndef __CYGWIN__
-# #  ifdef __CYGWIN32__
-# #    define __CYGWIN__ __CYGWIN32__
-# #  endif
-# #endif
-#
-# #ifdef __cplusplus
-# extern "C" {
-# #endif
-# BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
-# #ifdef __cplusplus
-# }
-# #endif
-#
-# #ifdef __CYGWIN__
-# #include <cygwin/cygwin_dll.h>
-# DECLARE_CYGWIN_DLL( DllMain );
-# #endif
-# HINSTANCE __hDllInstance_base;
-#
-# BOOL APIENTRY
-# DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
-# {
-#   __hDllInstance_base = hInst;
-#   return TRUE;
-# }
-# /* ltdll.c ends here */
-])# _LT_AC_FILE_LTDLL_C
+# Source file extension for C test sources.
+ac_ext=c
+
+# Object file extension for compiled C test sources.
+objext=o
+_LT_TAGVAR(objext, $1)=$objext
+
+# Code to be used in simple compile tests
+lt_simple_compile_test_code="int some_variable = 0;"
+
+# Code to be used in simple link tests
+lt_simple_link_test_code='int main(){return(0);}'
+
+_LT_TAG_COMPILER
+# Save the default compiler, since it gets overwritten when the other
+# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
+compiler_DEFAULT=$CC
+
+# save warnings/boilerplate of simple test code
+_LT_COMPILER_BOILERPLATE
+_LT_LINKER_BOILERPLATE
+
+## CAVEAT EMPTOR:
+## There is no encapsulation within the following macros, do not change
+## the running order or otherwise move them around unless you know exactly
+## what you are doing...
+if test -n "$compiler"; then
+  _LT_COMPILER_NO_RTTI($1)
+  _LT_COMPILER_PIC($1)
+  _LT_COMPILER_C_O($1)
+  _LT_COMPILER_FILE_LOCKS($1)
+  _LT_LINKER_SHLIBS($1)
+  _LT_SYS_DYNAMIC_LINKER($1)
+  _LT_LINKER_HARDCODE_LIBPATH($1)
+  LT_SYS_DLOPEN_SELF
+  _LT_CMD_STRIPLIB
+
+  # Report which library types will actually be built
+  AC_MSG_CHECKING([if libtool supports shared libraries])
+  AC_MSG_RESULT([$can_build_shared])
+
+  AC_MSG_CHECKING([whether to build shared libraries])
+  test "$can_build_shared" = "no" && enable_shared=no
+
+  # On AIX, shared libraries and static libraries use the same namespace, and
+  # are all built from PIC.
+  case $host_os in
+  aix3*)
+    test "$enable_shared" = yes && enable_static=no
+    if test -n "$RANLIB"; then
+      archive_cmds="$archive_cmds~\$RANLIB \$lib"
+      postinstall_cmds='$RANLIB $lib'
+    fi
+    ;;
+
+  aix[[4-9]]*)
+    if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
+      test "$enable_shared" = yes && enable_static=no
+    fi
+    ;;
+  esac
+  AC_MSG_RESULT([$enable_shared])
+
+  AC_MSG_CHECKING([whether to build static libraries])
+  # Make sure either enable_shared or enable_static is yes.
+  test "$enable_shared" = yes || enable_static=yes
+  AC_MSG_RESULT([$enable_static])
+
+  _LT_CONFIG($1)
+fi
+AC_LANG_POP
+CC="$lt_save_CC"
+])# _LT_LANG_C_CONFIG
+
+
+# _LT_PROG_CXX
+# ------------
+# Since AC_PROG_CXX is broken, in that it returns g++ if there is no c++
+# compiler, we have our own version here.
+m4_defun([_LT_PROG_CXX],
+[
+pushdef([AC_MSG_ERROR], [_lt_caught_CXX_error=yes])
+AC_PROG_CXX
+if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
+    ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
+    (test "X$CXX" != "Xg++"))) ; then
+  AC_PROG_CXXCPP
+else
+  _lt_caught_CXX_error=yes
+fi
+popdef([AC_MSG_ERROR])
+])# _LT_PROG_CXX
+
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([_LT_PROG_CXX], [])
+
+
+# _LT_LANG_CXX_CONFIG([TAG])
+# --------------------------
+# Ensure that the configuration variables for a C++ compiler are suitably
+# defined.  These variables are subsequently used by _LT_CONFIG to write
+# the compiler configuration to `libtool'.
+m4_defun([_LT_LANG_CXX_CONFIG],
+[AC_REQUIRE([_LT_PROG_CXX])dnl
+m4_require([_LT_FILEUTILS_DEFAULTS])dnl
+m4_require([_LT_DECL_EGREP])dnl
+
+AC_LANG_PUSH(C++)
+_LT_TAGVAR(archive_cmds_need_lc, $1)=no
+_LT_TAGVAR(allow_undefined_flag, $1)=
+_LT_TAGVAR(always_export_symbols, $1)=no
+_LT_TAGVAR(archive_expsym_cmds, $1)=
+_LT_TAGVAR(compiler_needs_object, $1)=no
+_LT_TAGVAR(export_dynamic_flag_spec, $1)=
+_LT_TAGVAR(hardcode_direct, $1)=no
+_LT_TAGVAR(hardcode_direct_absolute, $1)=no
+_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
+_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
+_LT_TAGVAR(hardcode_libdir_separator, $1)=
+_LT_TAGVAR(hardcode_minus_L, $1)=no
+_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
+_LT_TAGVAR(hardcode_automatic, $1)=no
+_LT_TAGVAR(inherit_rpath, $1)=no
+_LT_TAGVAR(module_cmds, $1)=
+_LT_TAGVAR(module_expsym_cmds, $1)=
+_LT_TAGVAR(link_all_deplibs, $1)=unknown
+_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
+_LT_TAGVAR(no_undefined_flag, $1)=
+_LT_TAGVAR(whole_archive_flag_spec, $1)=
+_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
+
+# Source file extension for C++ test sources.
+ac_ext=cpp
+
+# Object file extension for compiled C++ test sources.
+objext=o
+_LT_TAGVAR(objext, $1)=$objext
+
+# No sense in running all these tests if we already determined that
+# the CXX compiler isn't working.  Some variables (like enable_shared)
+# are currently assumed to apply to all compilers on this platform,
+# and will be corrupted by setting them based on a non-working compiler.
+if test "$_lt_caught_CXX_error" != yes; then
+  # Code to be used in simple compile tests
+  lt_simple_compile_test_code="int some_variable = 0;"
+
+  # Code to be used in simple link tests
+  lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }'
+
+  # ltmain only uses $CC for tagged configurations so make sure $CC is set.
+  _LT_TAG_COMPILER
+
+  # save warnings/boilerplate of simple test code
+  _LT_COMPILER_BOILERPLATE
+  _LT_LINKER_BOILERPLATE
+
+  # Allow CC to be a program name with arguments.
+  lt_save_CC=$CC
+  lt_save_LD=$LD
+  lt_save_GCC=$GCC
+  GCC=$GXX
+  lt_save_with_gnu_ld=$with_gnu_ld
+  lt_save_path_LD=$lt_cv_path_LD
+  if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
+    lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
+  else
+    $as_unset lt_cv_prog_gnu_ld
+  fi
+  if test -n "${lt_cv_path_LDCXX+set}"; then
+    lt_cv_path_LD=$lt_cv_path_LDCXX
+  else
+    $as_unset lt_cv_path_LD
+  fi
+  test -z "${LDCXX+set}" || LD=$LDCXX
+  CC=${CXX-"c++"}
+  compiler=$CC
+  _LT_TAGVAR(compiler, $1)=$CC
+  _LT_CC_BASENAME([$compiler])
+
+  if test -n "$compiler"; then
+    # We don't want -fno-exception when compiling C++ code, so set the
+    # no_builtin_flag separately
+    if test "$GXX" = yes; then
+      _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
+    else
+      _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
+    fi
+
+    if test "$GXX" = yes; then
+      # Set up default GNU C++ configuration
+
+      LT_PATH_LD
+
+      # Check if GNU C++ uses GNU ld as the underlying linker, since the
+      # archiving commands below assume that GNU ld is being used.
+      if test "$with_gnu_ld" = yes; then
+        _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
+        _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
 
+        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+        _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
 
-# _LT_AC_TAGVAR(VARNAME, [TAGNAME])
+        # If archive_cmds runs LD, not CC, wlarc should be empty
+        # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
+        #     investigate it a little bit more. (MM)
+        wlarc='${wl}'
+
+        # ancient GNU ld didn't support --whole-archive et. al.
+        if eval "`$CC -print-prog-name=ld` --help 2>&1" |
+	  $GREP 'no-whole-archive' > /dev/null; then
+          _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
+        else
+          _LT_TAGVAR(whole_archive_flag_spec, $1)=
+        fi
+      else
+        with_gnu_ld=no
+        wlarc=
+
+        # A generic and very simple default shared library creation
+        # command for GNU C++ for the case where it uses the native
+        # linker, instead of GNU ld.  If possible, this setting should
+        # overridden to take advantage of the native linker features on
+        # the platform it is being used on.
+        _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
+      fi
+
+      # Commands to make compiler produce verbose output that lists
+      # what "hidden" libraries, object files and flags are used when
+      # linking a shared library.
+      output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
+
+    else
+      GXX=no
+      with_gnu_ld=no
+      wlarc=
+    fi
+
+    # PORTME: fill in a description of your system's C++ link characteristics
+    AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
+    _LT_TAGVAR(ld_shlibs, $1)=yes
+    case $host_os in
+      aix3*)
+        # FIXME: insert proper C++ library support
+        _LT_TAGVAR(ld_shlibs, $1)=no
+        ;;
+      aix[[4-9]]*)
+        if test "$host_cpu" = ia64; then
+          # On IA64, the linker does run time linking by default, so we don't
+          # have to do anything special.
+          aix_use_runtimelinking=no
+          exp_sym_flag='-Bexport'
+          no_entry_flag=""
+        else
+          aix_use_runtimelinking=no
+
+          # Test if we are trying to use run time linking or normal
+          # AIX style linking. If -brtl is somewhere in LDFLAGS, we
+          # need to do runtime linking.
+          case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
+	    for ld_flag in $LDFLAGS; do
+	      case $ld_flag in
+	      *-brtl*)
+	        aix_use_runtimelinking=yes
+	        break
+	        ;;
+	      esac
+	    done
+	    ;;
+          esac
+
+          exp_sym_flag='-bexport'
+          no_entry_flag='-bnoentry'
+        fi
+
+        # When large executables or shared objects are built, AIX ld can
+        # have problems creating the table of contents.  If linking a library
+        # or program results in "error TOC overflow" add -mminimal-toc to
+        # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
+        # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
+
+        _LT_TAGVAR(archive_cmds, $1)=''
+        _LT_TAGVAR(hardcode_direct, $1)=yes
+        _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
+        _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
+        _LT_TAGVAR(link_all_deplibs, $1)=yes
+        _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
+
+        if test "$GXX" = yes; then
+          case $host_os in aix4.[[012]]|aix4.[[012]].*)
+          # We only want to do this on AIX 4.2 and lower, the check
+          # below for broken collect2 doesn't work under 4.3+
+	  collect2name=`${CC} -print-prog-name=collect2`
+	  if test -f "$collect2name" &&
+	     strings "$collect2name" | $GREP resolve_lib_name >/dev/null
+	  then
+	    # We have reworked collect2
+	    :
+	  else
+	    # We have old collect2
+	    _LT_TAGVAR(hardcode_direct, $1)=unsupported
+	    # It fails to find uninstalled libraries when the uninstalled
+	    # path is not listed in the libpath.  Setting hardcode_minus_L
+	    # to unsupported forces relinking
+	    _LT_TAGVAR(hardcode_minus_L, $1)=yes
+	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+	    _LT_TAGVAR(hardcode_libdir_separator, $1)=
+	  fi
+          esac
+          shared_flag='-shared'
+	  if test "$aix_use_runtimelinking" = yes; then
+	    shared_flag="$shared_flag "'${wl}-G'
+	  fi
+        else
+          # not using gcc
+          if test "$host_cpu" = ia64; then
+	  # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
+	  # chokes on -Wl,-G. The following line is correct:
+	  shared_flag='-G'
+          else
+	    if test "$aix_use_runtimelinking" = yes; then
+	      shared_flag='${wl}-G'
+	    else
+	      shared_flag='${wl}-bM:SRE'
+	    fi
+          fi
+        fi
+
+        _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
+        # It seems that -bexpall does not export symbols beginning with
+        # underscore (_), so it is better to generate a list of symbols to
+	# export.
+        _LT_TAGVAR(always_export_symbols, $1)=yes
+        if test "$aix_use_runtimelinking" = yes; then
+          # Warning - without using the other runtime loading flags (-brtl),
+          # -berok will link without error, but may produce a broken library.
+          _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
+          # Determine the default libpath from the value encoded in an empty
+          # executable.
+          _LT_SYS_MODULE_PATH_AIX
+          _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
+
+          _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
+        else
+          if test "$host_cpu" = ia64; then
+	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
+	    _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
+	    _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
+          else
+	    # Determine the default libpath from the value encoded in an
+	    # empty executable.
+	    _LT_SYS_MODULE_PATH_AIX
+	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
+	    # Warning - without using the other run time loading flags,
+	    # -berok will link without error, but may produce a broken library.
+	    _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
+	    _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
+	    # Exported symbols can be pulled into shared objects from archives
+	    _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
+	    _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
+	    # This is similar to how AIX traditionally builds its shared
+	    # libraries.
+	    _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
+          fi
+        fi
+        ;;
+
+      beos*)
+	if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
+	  _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
+	  # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
+	  # support --undefined.  This deserves some investigation.  FIXME
+	  _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+	else
+	  _LT_TAGVAR(ld_shlibs, $1)=no
+	fi
+	;;
+
+      chorus*)
+        case $cc_basename in
+          *)
+	  # FIXME: insert proper C++ library support
+	  _LT_TAGVAR(ld_shlibs, $1)=no
+	  ;;
+        esac
+        ;;
+
+      cygwin* | mingw* | pw32* | cegcc*)
+        # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
+        # as there is no search path for DLLs.
+        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+        _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
+        _LT_TAGVAR(always_export_symbols, $1)=no
+        _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
+
+        if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
+          _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+          # If the export-symbols file already is a .def file (1st line
+          # is EXPORTS), use it as is; otherwise, prepend...
+          _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
+	    cp $export_symbols $output_objdir/$soname.def;
+          else
+	    echo EXPORTS > $output_objdir/$soname.def;
+	    cat $export_symbols >> $output_objdir/$soname.def;
+          fi~
+          $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+        else
+          _LT_TAGVAR(ld_shlibs, $1)=no
+        fi
+        ;;
+      darwin* | rhapsody*)
+        _LT_DARWIN_LINKER_FEATURES($1)
+	;;
+
+      dgux*)
+        case $cc_basename in
+          ec++*)
+	    # FIXME: insert proper C++ library support
+	    _LT_TAGVAR(ld_shlibs, $1)=no
+	    ;;
+          ghcx*)
+	    # Green Hills C++ Compiler
+	    # FIXME: insert proper C++ library support
+	    _LT_TAGVAR(ld_shlibs, $1)=no
+	    ;;
+          *)
+	    # FIXME: insert proper C++ library support
+	    _LT_TAGVAR(ld_shlibs, $1)=no
+	    ;;
+        esac
+        ;;
+
+      freebsd[[12]]*)
+        # C++ shared libraries reported to be fairly broken before
+	# switch to ELF
+        _LT_TAGVAR(ld_shlibs, $1)=no
+        ;;
+
+      freebsd-elf*)
+        _LT_TAGVAR(archive_cmds_need_lc, $1)=no
+        ;;
+
+      freebsd* | dragonfly*)
+        # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
+        # conventions
+        _LT_TAGVAR(ld_shlibs, $1)=yes
+        ;;
+
+      gnu*)
+        ;;
+
+      hpux9*)
+        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
+        _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+        _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+        _LT_TAGVAR(hardcode_direct, $1)=yes
+        _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
+				             # but as the default
+				             # location of the library.
+
+        case $cc_basename in
+          CC*)
+            # FIXME: insert proper C++ library support
+            _LT_TAGVAR(ld_shlibs, $1)=no
+            ;;
+          aCC*)
+            _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+            # Commands to make compiler produce verbose output that lists
+            # what "hidden" libraries, object files and flags are used when
+            # linking a shared library.
+            #
+            # There doesn't appear to be a way to prevent this compiler from
+            # explicitly linking system object files so we need to strip them
+            # from the output so that they don't get included in the library
+            # dependencies.
+            output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
+            ;;
+          *)
+            if test "$GXX" = yes; then
+              _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+            else
+              # FIXME: insert proper C++ library support
+              _LT_TAGVAR(ld_shlibs, $1)=no
+            fi
+            ;;
+        esac
+        ;;
+
+      hpux10*|hpux11*)
+        if test $with_gnu_ld = no; then
+	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
+	  _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+
+          case $host_cpu in
+            hppa*64*|ia64*)
+              ;;
+            *)
+	      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+              ;;
+          esac
+        fi
+        case $host_cpu in
+          hppa*64*|ia64*)
+            _LT_TAGVAR(hardcode_direct, $1)=no
+            _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+            ;;
+          *)
+            _LT_TAGVAR(hardcode_direct, $1)=yes
+            _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
+            _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
+					         # but as the default
+					         # location of the library.
+            ;;
+        esac
+
+        case $cc_basename in
+          CC*)
+	    # FIXME: insert proper C++ library support
+	    _LT_TAGVAR(ld_shlibs, $1)=no
+	    ;;
+          aCC*)
+	    case $host_cpu in
+	      hppa*64*)
+	        _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+	        ;;
+	      ia64*)
+	        _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+	        ;;
+	      *)
+	        _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+	        ;;
+	    esac
+	    # Commands to make compiler produce verbose output that lists
+	    # what "hidden" libraries, object files and flags are used when
+	    # linking a shared library.
+	    #
+	    # There doesn't appear to be a way to prevent this compiler from
+	    # explicitly linking system object files so we need to strip them
+	    # from the output so that they don't get included in the library
+	    # dependencies.
+	    output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
+	    ;;
+          *)
+	    if test "$GXX" = yes; then
+	      if test $with_gnu_ld = no; then
+	        case $host_cpu in
+	          hppa*64*)
+	            _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+	            ;;
+	          ia64*)
+	            _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+	            ;;
+	          *)
+	            _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+	            ;;
+	        esac
+	      fi
+	    else
+	      # FIXME: insert proper C++ library support
+	      _LT_TAGVAR(ld_shlibs, $1)=no
+	    fi
+	    ;;
+        esac
+        ;;
+
+      interix[[3-9]]*)
+	_LT_TAGVAR(hardcode_direct, $1)=no
+	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+	_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+	# Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
+	# Instead, shared libraries are loaded at an image base (0x10000000 by
+	# default) and relocated if they conflict, which is a slow very memory
+	# consuming and fragmenting process.  To avoid this, we pick a random,
+	# 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
+	# time.  Moving up from 0x10000000 also allows more sbrk(2) space.
+	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+	_LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+	;;
+      irix5* | irix6*)
+        case $cc_basename in
+          CC*)
+	    # SGI C++
+	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
+
+	    # Archives containing C++ object files must be created using
+	    # "CC -ar", where "CC" is the IRIX C++ compiler.  This is
+	    # necessary to make sure instantiated templates are included
+	    # in the archive.
+	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
+	    ;;
+          *)
+	    if test "$GXX" = yes; then
+	      if test "$with_gnu_ld" = no; then
+	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+	      else
+	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` -o $lib'
+	      fi
+	    fi
+	    _LT_TAGVAR(link_all_deplibs, $1)=yes
+	    ;;
+        esac
+        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+        _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+        _LT_TAGVAR(inherit_rpath, $1)=yes
+        ;;
+
+      linux* | k*bsd*-gnu)
+        case $cc_basename in
+          KCC*)
+	    # Kuck and Associates, Inc. (KAI) C++ Compiler
+
+	    # KCC will only create a shared library if the output file
+	    # ends with ".so" (or ".sl" for HP-UX), so rename the library
+	    # to its proper name (with version) after linking.
+	    _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
+	    _LT_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib'
+	    # Commands to make compiler produce verbose output that lists
+	    # what "hidden" libraries, object files and flags are used when
+	    # linking a shared library.
+	    #
+	    # There doesn't appear to be a way to prevent this compiler from
+	    # explicitly linking system object files so we need to strip them
+	    # from the output so that they don't get included in the library
+	    # dependencies.
+	    output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
+
+	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
+
+	    # Archives containing C++ object files must be created using
+	    # "CC -Bstatic", where "CC" is the KAI C++ compiler.
+	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
+	    ;;
+	  icpc* | ecpc* )
+	    # Intel C++
+	    with_gnu_ld=yes
+	    # version 8.0 and above of icpc choke on multiply defined symbols
+	    # if we add $predep_objects and $postdep_objects, however 7.1 and
+	    # earlier do not add the objects themselves.
+	    case `$CC -V 2>&1` in
+	      *"Version 7."*)
+	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
+		_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+		;;
+	      *)  # Version 8.0 or newer
+	        tmp_idyn=
+	        case $host_cpu in
+		  ia64*) tmp_idyn=' -i_dynamic';;
+		esac
+	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+		_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+		;;
+	    esac
+	    _LT_TAGVAR(archive_cmds_need_lc, $1)=no
+	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
+	    _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
+	    ;;
+          pgCC* | pgcpp*)
+            # Portland Group C++ compiler
+	    case `$CC -V` in
+	    *pgCC\ [[1-5]]* | *pgcpp\ [[1-5]]*)
+	      _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~
+		rm -rf $tpldir~
+		$CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
+		compile_command="$compile_command `find $tpldir -name \*.o | $NL2SP`"'
+	      _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~
+		rm -rf $tpldir~
+		$CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~
+		$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | $NL2SP`~
+		$RANLIB $oldlib'
+	      _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~
+		rm -rf $tpldir~
+		$CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
+		$CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
+	      _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~
+		rm -rf $tpldir~
+		$CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
+		$CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
+	      ;;
+	    *) # Version 6 will use weak symbols
+	      _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
+	      _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
+	      ;;
+	    esac
+
+	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
+	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
+	    _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
+            ;;
+	  cxx*)
+	    # Compaq C++
+	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
+	    _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname  -o $lib ${wl}-retain-symbols-file $wl$export_symbols'
+
+	    runpath_var=LD_RUN_PATH
+	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
+	    _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+
+	    # Commands to make compiler produce verbose output that lists
+	    # what "hidden" libraries, object files and flags are used when
+	    # linking a shared library.
+	    #
+	    # There doesn't appear to be a way to prevent this compiler from
+	    # explicitly linking system object files so we need to strip them
+	    # from the output so that they don't get included in the library
+	    # dependencies.
+	    output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`$ECHO "X$templist" | $Xsed -e "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
+	    ;;
+	  xl*)
+	    # IBM XL 8.0 on PPC, with GNU ld
+	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
+	    _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+	    if test "x$supports_anon_versioning" = xyes; then
+	      _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
+		cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
+		echo "local: *; };" >> $output_objdir/$libname.ver~
+		$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
+	    fi
+	    ;;
+	  *)
+	    case `$CC -V 2>&1 | sed 5q` in
+	    *Sun\ C*)
+	      # Sun C++ 5.9
+	      _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
+	      _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+	      _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols'
+	      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+	      _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
+	      _LT_TAGVAR(compiler_needs_object, $1)=yes
+
+	      # Not sure whether something based on
+	      # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
+	      # would be better.
+	      output_verbose_link_cmd='echo'
+
+	      # Archives containing C++ object files must be created using
+	      # "CC -xar", where "CC" is the Sun C++ compiler.  This is
+	      # necessary to make sure instantiated templates are included
+	      # in the archive.
+	      _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
+	      ;;
+	    esac
+	    ;;
+	esac
+	;;
+
+      lynxos*)
+        # FIXME: insert proper C++ library support
+	_LT_TAGVAR(ld_shlibs, $1)=no
+	;;
+
+      m88k*)
+        # FIXME: insert proper C++ library support
+        _LT_TAGVAR(ld_shlibs, $1)=no
+	;;
+
+      mvs*)
+        case $cc_basename in
+          cxx*)
+	    # FIXME: insert proper C++ library support
+	    _LT_TAGVAR(ld_shlibs, $1)=no
+	    ;;
+	  *)
+	    # FIXME: insert proper C++ library support
+	    _LT_TAGVAR(ld_shlibs, $1)=no
+	    ;;
+	esac
+	;;
+
+      netbsd*)
+        if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
+	  _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable  -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
+	  wlarc=
+	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+	  _LT_TAGVAR(hardcode_direct, $1)=yes
+	  _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+	fi
+	# Workaround some broken pre-1.5 toolchains
+	output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
+	;;
+
+      *nto* | *qnx*)
+        _LT_TAGVAR(ld_shlibs, $1)=yes
+	;;
+
+      openbsd2*)
+        # C++ shared libraries are fairly broken
+	_LT_TAGVAR(ld_shlibs, $1)=no
+	;;
+
+      openbsd*)
+	if test -f /usr/libexec/ld.so; then
+	  _LT_TAGVAR(hardcode_direct, $1)=yes
+	  _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+	  _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
+	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
+	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+	  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+	    _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib'
+	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+	    _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
+	  fi
+	  output_verbose_link_cmd=echo
+	else
+	  _LT_TAGVAR(ld_shlibs, $1)=no
+	fi
+	;;
+
+      osf3* | osf4* | osf5*)
+        case $cc_basename in
+          KCC*)
+	    # Kuck and Associates, Inc. (KAI) C++ Compiler
+
+	    # KCC will only create a shared library if the output file
+	    # ends with ".so" (or ".sl" for HP-UX), so rename the library
+	    # to its proper name (with version) after linking.
+	    _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
+
+	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+	    _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+
+	    # Archives containing C++ object files must be created using
+	    # the KAI C++ compiler.
+	    case $host in
+	      osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;;
+	      *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;;
+	    esac
+	    ;;
+          RCC*)
+	    # Rational C++ 2.4.1
+	    # FIXME: insert proper C++ library support
+	    _LT_TAGVAR(ld_shlibs, $1)=no
+	    ;;
+          cxx*)
+	    case $host in
+	      osf3*)
+	        _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
+	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && $ECHO "X${wl}-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
+	        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+		;;
+	      *)
+	        _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
+	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
+	        _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
+	          echo "-hidden">> $lib.exp~
+	          $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname ${wl}-input ${wl}$lib.exp  `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~
+	          $RM $lib.exp'
+	        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
+		;;
+	    esac
+
+	    _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+
+	    # Commands to make compiler produce verbose output that lists
+	    # what "hidden" libraries, object files and flags are used when
+	    # linking a shared library.
+	    #
+	    # There doesn't appear to be a way to prevent this compiler from
+	    # explicitly linking system object files so we need to strip them
+	    # from the output so that they don't get included in the library
+	    # dependencies.
+	    output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`$ECHO "X$templist" | $Xsed -e "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
+	    ;;
+	  *)
+	    if test "$GXX" = yes && test "$with_gnu_ld" = no; then
+	      _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
+	      case $host in
+	        osf3*)
+	          _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+		  ;;
+	        *)
+	          _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+		  ;;
+	      esac
+
+	      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+	      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+
+	      # Commands to make compiler produce verbose output that lists
+	      # what "hidden" libraries, object files and flags are used when
+	      # linking a shared library.
+	      output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
+
+	    else
+	      # FIXME: insert proper C++ library support
+	      _LT_TAGVAR(ld_shlibs, $1)=no
+	    fi
+	    ;;
+        esac
+        ;;
+
+      psos*)
+        # FIXME: insert proper C++ library support
+        _LT_TAGVAR(ld_shlibs, $1)=no
+        ;;
+
+      sunos4*)
+        case $cc_basename in
+          CC*)
+	    # Sun C++ 4.x
+	    # FIXME: insert proper C++ library support
+	    _LT_TAGVAR(ld_shlibs, $1)=no
+	    ;;
+          lcc*)
+	    # Lucid
+	    # FIXME: insert proper C++ library support
+	    _LT_TAGVAR(ld_shlibs, $1)=no
+	    ;;
+          *)
+	    # FIXME: insert proper C++ library support
+	    _LT_TAGVAR(ld_shlibs, $1)=no
+	    ;;
+        esac
+        ;;
+
+      solaris*)
+        case $cc_basename in
+          CC*)
+	    # Sun C++ 4.2, 5.x and Centerline C++
+            _LT_TAGVAR(archive_cmds_need_lc,$1)=yes
+	    _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
+	    _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag}  -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+	    _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
+	      $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
+
+	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+	    _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+	    case $host_os in
+	      solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
+	      *)
+		# The compiler driver will combine and reorder linker options,
+		# but understands `-z linker_flag'.
+	        # Supported since Solaris 2.6 (maybe 2.5.1?)
+		_LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
+	        ;;
+	    esac
+	    _LT_TAGVAR(link_all_deplibs, $1)=yes
+
+	    output_verbose_link_cmd='echo'
+
+	    # Archives containing C++ object files must be created using
+	    # "CC -xar", where "CC" is the Sun C++ compiler.  This is
+	    # necessary to make sure instantiated templates are included
+	    # in the archive.
+	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
+	    ;;
+          gcx*)
+	    # Green Hills C++ Compiler
+	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
+
+	    # The C++ compiler must be used to create the archive.
+	    _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
+	    ;;
+          *)
+	    # GNU C++ compiler with Solaris linker
+	    if test "$GXX" = yes && test "$with_gnu_ld" = no; then
+	      _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
+	      if $CC --version | $GREP -v '^2\.7' > /dev/null; then
+	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
+	        _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
+		  $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
+
+	        # Commands to make compiler produce verbose output that lists
+	        # what "hidden" libraries, object files and flags are used when
+	        # linking a shared library.
+	        output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
+	      else
+	        # g++ 2.7 appears to require `-G' NOT `-shared' on this
+	        # platform.
+	        _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
+	        _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
+		  $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
+
+	        # Commands to make compiler produce verbose output that lists
+	        # what "hidden" libraries, object files and flags are used when
+	        # linking a shared library.
+	        output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
+	      fi
+
+	      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
+	      case $host_os in
+		solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
+		*)
+		  _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
+		  ;;
+	      esac
+	    fi
+	    ;;
+        esac
+        ;;
+
+    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
+      _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
+      _LT_TAGVAR(archive_cmds_need_lc, $1)=no
+      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+      runpath_var='LD_RUN_PATH'
+
+      case $cc_basename in
+        CC*)
+	  _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	  _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	  ;;
+	*)
+	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	  _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	  ;;
+      esac
+      ;;
+
+      sysv5* | sco3.2v5* | sco5v6*)
+	# Note: We can NOT use -z defs as we might desire, because we do not
+	# link with -lc, and that would cause any symbols used from libc to
+	# always be unresolved, which means just about no library would
+	# ever link correctly.  If we're not using GNU ld we use -z text
+	# though, which does catch some bad symbols but isn't as heavy-handed
+	# as -z defs.
+	_LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
+	_LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
+	_LT_TAGVAR(archive_cmds_need_lc, $1)=no
+	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
+	_LT_TAGVAR(hardcode_libdir_separator, $1)=':'
+	_LT_TAGVAR(link_all_deplibs, $1)=yes
+	_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
+	runpath_var='LD_RUN_PATH'
+
+	case $cc_basename in
+          CC*)
+	    _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	    _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	    ;;
+	  *)
+	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	    _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	    ;;
+	esac
+      ;;
+
+      tandem*)
+        case $cc_basename in
+          NCC*)
+	    # NonStop-UX NCC 3.20
+	    # FIXME: insert proper C++ library support
+	    _LT_TAGVAR(ld_shlibs, $1)=no
+	    ;;
+          *)
+	    # FIXME: insert proper C++ library support
+	    _LT_TAGVAR(ld_shlibs, $1)=no
+	    ;;
+        esac
+        ;;
+
+      vxworks*)
+        # FIXME: insert proper C++ library support
+        _LT_TAGVAR(ld_shlibs, $1)=no
+        ;;
+
+      *)
+        # FIXME: insert proper C++ library support
+        _LT_TAGVAR(ld_shlibs, $1)=no
+        ;;
+    esac
+
+    AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
+    test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
+
+    _LT_TAGVAR(GCC, $1)="$GXX"
+    _LT_TAGVAR(LD, $1)="$LD"
+
+    ## CAVEAT EMPTOR:
+    ## There is no encapsulation within the following macros, do not change
+    ## the running order or otherwise move them around unless you know exactly
+    ## what you are doing...
+    _LT_SYS_HIDDEN_LIBDEPS($1)
+    _LT_COMPILER_PIC($1)
+    _LT_COMPILER_C_O($1)
+    _LT_COMPILER_FILE_LOCKS($1)
+    _LT_LINKER_SHLIBS($1)
+    _LT_SYS_DYNAMIC_LINKER($1)
+    _LT_LINKER_HARDCODE_LIBPATH($1)
+
+    _LT_CONFIG($1)
+  fi # test -n "$compiler"
+
+  CC=$lt_save_CC
+  LDCXX=$LD
+  LD=$lt_save_LD
+  GCC=$lt_save_GCC
+  with_gnu_ld=$lt_save_with_gnu_ld
+  lt_cv_path_LDCXX=$lt_cv_path_LD
+  lt_cv_path_LD=$lt_save_path_LD
+  lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
+  lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
+fi # test "$_lt_caught_CXX_error" != yes
+
+AC_LANG_POP
+])# _LT_LANG_CXX_CONFIG
+
+
+# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME])
 # ---------------------------------
-AC_DEFUN([_LT_AC_TAGVAR], [ifelse([$2], [], [$1], [$1_$2])])
+# Figure out "hidden" library dependencies from verbose
+# compiler output when linking a shared library.
+# Parse the compiler output and extract the necessary
+# objects, libraries and library flags.
+m4_defun([_LT_SYS_HIDDEN_LIBDEPS],
+[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
+# Dependencies to place before and after the object being linked:
+_LT_TAGVAR(predep_objects, $1)=
+_LT_TAGVAR(postdep_objects, $1)=
+_LT_TAGVAR(predeps, $1)=
+_LT_TAGVAR(postdeps, $1)=
+_LT_TAGVAR(compiler_lib_search_path, $1)=
 
+dnl we can't use the lt_simple_compile_test_code here,
+dnl because it contains code intended for an executable,
+dnl not a library.  It's possible we should let each
+dnl tag define a new lt_????_link_test_code variable,
+dnl but it's only used here...
+m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF
+int a;
+void foo (void) { a = 0; }
+_LT_EOF
+], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF
+class Foo
+{
+public:
+  Foo (void) { a = 0; }
+private:
+  int a;
+};
+_LT_EOF
+], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF
+      subroutine foo
+      implicit none
+      integer*4 a
+      a=0
+      return
+      end
+_LT_EOF
+], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF
+      subroutine foo
+      implicit none
+      integer a
+      a=0
+      return
+      end
+_LT_EOF
+], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF
+public class foo {
+  private int a;
+  public void bar (void) {
+    a = 0;
+  }
+};
+_LT_EOF
+])
+dnl Parse the compiler output and extract the necessary
+dnl objects, libraries and library flags.
+if AC_TRY_EVAL(ac_compile); then
+  # Parse the compiler output and extract the necessary
+  # objects, libraries and library flags.
 
-# old names
-AC_DEFUN([AM_PROG_LIBTOOL],   [AC_PROG_LIBTOOL])
-AC_DEFUN([AM_ENABLE_SHARED],  [AC_ENABLE_SHARED($@)])
-AC_DEFUN([AM_ENABLE_STATIC],  [AC_ENABLE_STATIC($@)])
-AC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
-AC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
-AC_DEFUN([AM_PROG_LD],        [AC_PROG_LD])
-AC_DEFUN([AM_PROG_NM],        [AC_PROG_NM])
+  # Sentinel used to keep track of whether or not we are before
+  # the conftest object file.
+  pre_test_object_deps_done=no
 
-# This is just to silence aclocal about the macro not being used
-ifelse([AC_DISABLE_FAST_INSTALL])
+  for p in `eval "$output_verbose_link_cmd"`; do
+    case $p in
+
+    -L* | -R* | -l*)
+       # Some compilers place space between "-{L,R}" and the path.
+       # Remove the space.
+       if test $p = "-L" ||
+          test $p = "-R"; then
+	 prev=$p
+	 continue
+       else
+	 prev=
+       fi
 
-AC_DEFUN([LT_AC_PROG_GCJ],
-[AC_CHECK_TOOL(GCJ, gcj, no)
-  test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
-  AC_SUBST(GCJFLAGS)
+       if test "$pre_test_object_deps_done" = no; then
+	 case $p in
+	 -L* | -R*)
+	   # Internal compiler library paths should come after those
+	   # provided the user.  The postdeps already come after the
+	   # user supplied libs so there is no need to process them.
+	   if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then
+	     _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
+	   else
+	     _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
+	   fi
+	   ;;
+	 # The "-l" case would never come before the object being
+	 # linked, so don't bother handling this case.
+	 esac
+       else
+	 if test -z "$_LT_TAGVAR(postdeps, $1)"; then
+	   _LT_TAGVAR(postdeps, $1)="${prev}${p}"
+	 else
+	   _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}"
+	 fi
+       fi
+       ;;
+
+    *.$objext)
+       # This assumes that the test object file only shows up
+       # once in the compiler output.
+       if test "$p" = "conftest.$objext"; then
+	 pre_test_object_deps_done=yes
+	 continue
+       fi
+
+       if test "$pre_test_object_deps_done" = no; then
+	 if test -z "$_LT_TAGVAR(predep_objects, $1)"; then
+	   _LT_TAGVAR(predep_objects, $1)="$p"
+	 else
+	   _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p"
+	 fi
+       else
+	 if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then
+	   _LT_TAGVAR(postdep_objects, $1)="$p"
+	 else
+	   _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p"
+	 fi
+       fi
+       ;;
+
+    *) ;; # Ignore the rest.
+
+    esac
+  done
+
+  # Clean up.
+  rm -f a.out a.exe
+else
+  echo "libtool.m4: error: problem compiling $1 test program"
+fi
+
+$RM -f confest.$objext
+
+# PORTME: override above test on systems where it is broken
+m4_if([$1], [CXX],
+[case $host_os in
+interix[[3-9]]*)
+  # Interix 3.5 installs completely hosed .la files for C++, so rather than
+  # hack all around it, let's just trust "g++" to DTRT.
+  _LT_TAGVAR(predep_objects,$1)=
+  _LT_TAGVAR(postdep_objects,$1)=
+  _LT_TAGVAR(postdeps,$1)=
+  ;;
+
+linux*)
+  case `$CC -V 2>&1 | sed 5q` in
+  *Sun\ C*)
+    # Sun C++ 5.9
+
+    # The more standards-conforming stlport4 library is
+    # incompatible with the Cstd library. Avoid specifying
+    # it if it's in CXXFLAGS. Ignore libCrun as
+    # -library=stlport4 depends on it.
+    case " $CXX $CXXFLAGS " in
+    *" -library=stlport4 "*)
+      solaris_use_stlport4=yes
+      ;;
+    esac
+
+    if test "$solaris_use_stlport4" != yes; then
+      _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
+    fi
+    ;;
+  esac
+  ;;
+
+solaris*)
+  case $cc_basename in
+  CC*)
+    # The more standards-conforming stlport4 library is
+    # incompatible with the Cstd library. Avoid specifying
+    # it if it's in CXXFLAGS. Ignore libCrun as
+    # -library=stlport4 depends on it.
+    case " $CXX $CXXFLAGS " in
+    *" -library=stlport4 "*)
+      solaris_use_stlport4=yes
+      ;;
+    esac
+
+    # Adding this requires a known-good setup of shared libraries for
+    # Sun compiler versions before 5.6, else PIC objects from an old
+    # archive will be linked into the output, leading to subtle bugs.
+    if test "$solaris_use_stlport4" != yes; then
+      _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
+    fi
+    ;;
+  esac
+  ;;
+esac
 ])
 
-AC_DEFUN([LT_AC_PROG_RC],
-[AC_CHECK_TOOL(RC, windres, no)
+case " $_LT_TAGVAR(postdeps, $1) " in
+*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;;
+esac
+ _LT_TAGVAR(compiler_lib_search_dirs, $1)=
+if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then
+ _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'`
+fi
+_LT_TAGDECL([], [compiler_lib_search_dirs], [1],
+    [The directories searched by this compiler when creating a shared library])
+_LT_TAGDECL([], [predep_objects], [1],
+    [Dependencies to place before and after the objects being linked to
+    create a shared library])
+_LT_TAGDECL([], [postdep_objects], [1])
+_LT_TAGDECL([], [predeps], [1])
+_LT_TAGDECL([], [postdeps], [1])
+_LT_TAGDECL([], [compiler_lib_search_path], [1],
+    [The library search path used internally by the compiler when linking
+    a shared library])
+])# _LT_SYS_HIDDEN_LIBDEPS
+
+
+# _LT_PROG_F77
+# ------------
+# Since AC_PROG_F77 is broken, in that it returns the empty string
+# if there is no fortran compiler, we have our own version here.
+m4_defun([_LT_PROG_F77],
+[
+pushdef([AC_MSG_ERROR], [_lt_disable_F77=yes])
+AC_PROG_F77
+if test -z "$F77" || test "X$F77" = "Xno"; then
+  _lt_disable_F77=yes
+fi
+popdef([AC_MSG_ERROR])
+])# _LT_PROG_F77
+
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([_LT_PROG_F77], [])
+
+
+# _LT_LANG_F77_CONFIG([TAG])
+# --------------------------
+# Ensure that the configuration variables for a Fortran 77 compiler are
+# suitably defined.  These variables are subsequently used by _LT_CONFIG
+# to write the compiler configuration to `libtool'.
+m4_defun([_LT_LANG_F77_CONFIG],
+[AC_REQUIRE([_LT_PROG_F77])dnl
+AC_LANG_PUSH(Fortran 77)
+
+_LT_TAGVAR(archive_cmds_need_lc, $1)=no
+_LT_TAGVAR(allow_undefined_flag, $1)=
+_LT_TAGVAR(always_export_symbols, $1)=no
+_LT_TAGVAR(archive_expsym_cmds, $1)=
+_LT_TAGVAR(export_dynamic_flag_spec, $1)=
+_LT_TAGVAR(hardcode_direct, $1)=no
+_LT_TAGVAR(hardcode_direct_absolute, $1)=no
+_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
+_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
+_LT_TAGVAR(hardcode_libdir_separator, $1)=
+_LT_TAGVAR(hardcode_minus_L, $1)=no
+_LT_TAGVAR(hardcode_automatic, $1)=no
+_LT_TAGVAR(inherit_rpath, $1)=no
+_LT_TAGVAR(module_cmds, $1)=
+_LT_TAGVAR(module_expsym_cmds, $1)=
+_LT_TAGVAR(link_all_deplibs, $1)=unknown
+_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
+_LT_TAGVAR(no_undefined_flag, $1)=
+_LT_TAGVAR(whole_archive_flag_spec, $1)=
+_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
+
+# Source file extension for f77 test sources.
+ac_ext=f
+
+# Object file extension for compiled f77 test sources.
+objext=o
+_LT_TAGVAR(objext, $1)=$objext
+
+# No sense in running all these tests if we already determined that
+# the F77 compiler isn't working.  Some variables (like enable_shared)
+# are currently assumed to apply to all compilers on this platform,
+# and will be corrupted by setting them based on a non-working compiler.
+if test "$_lt_disable_F77" != yes; then
+  # Code to be used in simple compile tests
+  lt_simple_compile_test_code="\
+      subroutine t
+      return
+      end
+"
+
+  # Code to be used in simple link tests
+  lt_simple_link_test_code="\
+      program t
+      end
+"
+
+  # ltmain only uses $CC for tagged configurations so make sure $CC is set.
+  _LT_TAG_COMPILER
+
+  # save warnings/boilerplate of simple test code
+  _LT_COMPILER_BOILERPLATE
+  _LT_LINKER_BOILERPLATE
+
+  # Allow CC to be a program name with arguments.
+  lt_save_CC="$CC"
+  lt_save_GCC=$GCC
+  CC=${F77-"f77"}
+  compiler=$CC
+  _LT_TAGVAR(compiler, $1)=$CC
+  _LT_CC_BASENAME([$compiler])
+  GCC=$G77
+  if test -n "$compiler"; then
+    AC_MSG_CHECKING([if libtool supports shared libraries])
+    AC_MSG_RESULT([$can_build_shared])
+
+    AC_MSG_CHECKING([whether to build shared libraries])
+    test "$can_build_shared" = "no" && enable_shared=no
+
+    # On AIX, shared libraries and static libraries use the same namespace, and
+    # are all built from PIC.
+    case $host_os in
+      aix3*)
+        test "$enable_shared" = yes && enable_static=no
+        if test -n "$RANLIB"; then
+          archive_cmds="$archive_cmds~\$RANLIB \$lib"
+          postinstall_cmds='$RANLIB $lib'
+        fi
+        ;;
+      aix[[4-9]]*)
+	if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
+	  test "$enable_shared" = yes && enable_static=no
+	fi
+        ;;
+    esac
+    AC_MSG_RESULT([$enable_shared])
+
+    AC_MSG_CHECKING([whether to build static libraries])
+    # Make sure either enable_shared or enable_static is yes.
+    test "$enable_shared" = yes || enable_static=yes
+    AC_MSG_RESULT([$enable_static])
+
+    _LT_TAGVAR(GCC, $1)="$G77"
+    _LT_TAGVAR(LD, $1)="$LD"
+
+    ## CAVEAT EMPTOR:
+    ## There is no encapsulation within the following macros, do not change
+    ## the running order or otherwise move them around unless you know exactly
+    ## what you are doing...
+    _LT_COMPILER_PIC($1)
+    _LT_COMPILER_C_O($1)
+    _LT_COMPILER_FILE_LOCKS($1)
+    _LT_LINKER_SHLIBS($1)
+    _LT_SYS_DYNAMIC_LINKER($1)
+    _LT_LINKER_HARDCODE_LIBPATH($1)
+
+    _LT_CONFIG($1)
+  fi # test -n "$compiler"
+
+  GCC=$lt_save_GCC
+  CC="$lt_save_CC"
+fi # test "$_lt_disable_F77" != yes
+
+AC_LANG_POP
+])# _LT_LANG_F77_CONFIG
+
+
+# _LT_PROG_FC
+# -----------
+# Since AC_PROG_FC is broken, in that it returns the empty string
+# if there is no fortran compiler, we have our own version here.
+m4_defun([_LT_PROG_FC],
+[
+pushdef([AC_MSG_ERROR], [_lt_disable_FC=yes])
+AC_PROG_FC
+if test -z "$FC" || test "X$FC" = "Xno"; then
+  _lt_disable_FC=yes
+fi
+popdef([AC_MSG_ERROR])
+])# _LT_PROG_FC
+
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([_LT_PROG_FC], [])
+
+
+# _LT_LANG_FC_CONFIG([TAG])
+# -------------------------
+# Ensure that the configuration variables for a Fortran compiler are
+# suitably defined.  These variables are subsequently used by _LT_CONFIG
+# to write the compiler configuration to `libtool'.
+m4_defun([_LT_LANG_FC_CONFIG],
+[AC_REQUIRE([_LT_PROG_FC])dnl
+AC_LANG_PUSH(Fortran)
+
+_LT_TAGVAR(archive_cmds_need_lc, $1)=no
+_LT_TAGVAR(allow_undefined_flag, $1)=
+_LT_TAGVAR(always_export_symbols, $1)=no
+_LT_TAGVAR(archive_expsym_cmds, $1)=
+_LT_TAGVAR(export_dynamic_flag_spec, $1)=
+_LT_TAGVAR(hardcode_direct, $1)=no
+_LT_TAGVAR(hardcode_direct_absolute, $1)=no
+_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
+_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
+_LT_TAGVAR(hardcode_libdir_separator, $1)=
+_LT_TAGVAR(hardcode_minus_L, $1)=no
+_LT_TAGVAR(hardcode_automatic, $1)=no
+_LT_TAGVAR(inherit_rpath, $1)=no
+_LT_TAGVAR(module_cmds, $1)=
+_LT_TAGVAR(module_expsym_cmds, $1)=
+_LT_TAGVAR(link_all_deplibs, $1)=unknown
+_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
+_LT_TAGVAR(no_undefined_flag, $1)=
+_LT_TAGVAR(whole_archive_flag_spec, $1)=
+_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
+
+# Source file extension for fc test sources.
+ac_ext=${ac_fc_srcext-f}
+
+# Object file extension for compiled fc test sources.
+objext=o
+_LT_TAGVAR(objext, $1)=$objext
+
+# No sense in running all these tests if we already determined that
+# the FC compiler isn't working.  Some variables (like enable_shared)
+# are currently assumed to apply to all compilers on this platform,
+# and will be corrupted by setting them based on a non-working compiler.
+if test "$_lt_disable_FC" != yes; then
+  # Code to be used in simple compile tests
+  lt_simple_compile_test_code="\
+      subroutine t
+      return
+      end
+"
+
+  # Code to be used in simple link tests
+  lt_simple_link_test_code="\
+      program t
+      end
+"
+
+  # ltmain only uses $CC for tagged configurations so make sure $CC is set.
+  _LT_TAG_COMPILER
+
+  # save warnings/boilerplate of simple test code
+  _LT_COMPILER_BOILERPLATE
+  _LT_LINKER_BOILERPLATE
+
+  # Allow CC to be a program name with arguments.
+  lt_save_CC="$CC"
+  lt_save_GCC=$GCC
+  CC=${FC-"f95"}
+  compiler=$CC
+  GCC=$ac_cv_fc_compiler_gnu
+
+  _LT_TAGVAR(compiler, $1)=$CC
+  _LT_CC_BASENAME([$compiler])
+
+  if test -n "$compiler"; then
+    AC_MSG_CHECKING([if libtool supports shared libraries])
+    AC_MSG_RESULT([$can_build_shared])
+
+    AC_MSG_CHECKING([whether to build shared libraries])
+    test "$can_build_shared" = "no" && enable_shared=no
+
+    # On AIX, shared libraries and static libraries use the same namespace, and
+    # are all built from PIC.
+    case $host_os in
+      aix3*)
+        test "$enable_shared" = yes && enable_static=no
+        if test -n "$RANLIB"; then
+          archive_cmds="$archive_cmds~\$RANLIB \$lib"
+          postinstall_cmds='$RANLIB $lib'
+        fi
+        ;;
+      aix[[4-9]]*)
+	if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
+	  test "$enable_shared" = yes && enable_static=no
+	fi
+        ;;
+    esac
+    AC_MSG_RESULT([$enable_shared])
+
+    AC_MSG_CHECKING([whether to build static libraries])
+    # Make sure either enable_shared or enable_static is yes.
+    test "$enable_shared" = yes || enable_static=yes
+    AC_MSG_RESULT([$enable_static])
+
+    _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu"
+    _LT_TAGVAR(LD, $1)="$LD"
+
+    ## CAVEAT EMPTOR:
+    ## There is no encapsulation within the following macros, do not change
+    ## the running order or otherwise move them around unless you know exactly
+    ## what you are doing...
+    _LT_SYS_HIDDEN_LIBDEPS($1)
+    _LT_COMPILER_PIC($1)
+    _LT_COMPILER_C_O($1)
+    _LT_COMPILER_FILE_LOCKS($1)
+    _LT_LINKER_SHLIBS($1)
+    _LT_SYS_DYNAMIC_LINKER($1)
+    _LT_LINKER_HARDCODE_LIBPATH($1)
+
+    _LT_CONFIG($1)
+  fi # test -n "$compiler"
+
+  GCC=$lt_save_GCC
+  CC="$lt_save_CC"
+fi # test "$_lt_disable_FC" != yes
+
+AC_LANG_POP
+])# _LT_LANG_FC_CONFIG
+
+
+# _LT_LANG_GCJ_CONFIG([TAG])
+# --------------------------
+# Ensure that the configuration variables for the GNU Java Compiler compiler
+# are suitably defined.  These variables are subsequently used by _LT_CONFIG
+# to write the compiler configuration to `libtool'.
+m4_defun([_LT_LANG_GCJ_CONFIG],
+[AC_REQUIRE([LT_PROG_GCJ])dnl
+AC_LANG_SAVE
+
+# Source file extension for Java test sources.
+ac_ext=java
+
+# Object file extension for compiled Java test sources.
+objext=o
+_LT_TAGVAR(objext, $1)=$objext
+
+# Code to be used in simple compile tests
+lt_simple_compile_test_code="class foo {}"
+
+# Code to be used in simple link tests
+lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }'
+
+# ltmain only uses $CC for tagged configurations so make sure $CC is set.
+_LT_TAG_COMPILER
+
+# save warnings/boilerplate of simple test code
+_LT_COMPILER_BOILERPLATE
+_LT_LINKER_BOILERPLATE
+
+# Allow CC to be a program name with arguments.
+lt_save_CC="$CC"
+lt_save_GCC=$GCC
+GCC=yes
+CC=${GCJ-"gcj"}
+compiler=$CC
+_LT_TAGVAR(compiler, $1)=$CC
+_LT_TAGVAR(LD, $1)="$LD"
+_LT_CC_BASENAME([$compiler])
+
+# GCJ did not exist at the time GCC didn't implicitly link libc in.
+_LT_TAGVAR(archive_cmds_need_lc, $1)=no
+
+_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
+
+## CAVEAT EMPTOR:
+## There is no encapsulation within the following macros, do not change
+## the running order or otherwise move them around unless you know exactly
+## what you are doing...
+if test -n "$compiler"; then
+  _LT_COMPILER_NO_RTTI($1)
+  _LT_COMPILER_PIC($1)
+  _LT_COMPILER_C_O($1)
+  _LT_COMPILER_FILE_LOCKS($1)
+  _LT_LINKER_SHLIBS($1)
+  _LT_LINKER_HARDCODE_LIBPATH($1)
+
+  _LT_CONFIG($1)
+fi
+
+AC_LANG_RESTORE
+
+GCC=$lt_save_GCC
+CC="$lt_save_CC"
+])# _LT_LANG_GCJ_CONFIG
+
+
+# _LT_LANG_RC_CONFIG([TAG])
+# -------------------------
+# Ensure that the configuration variables for the Windows resource compiler
+# are suitably defined.  These variables are subsequently used by _LT_CONFIG
+# to write the compiler configuration to `libtool'.
+m4_defun([_LT_LANG_RC_CONFIG],
+[AC_REQUIRE([LT_PROG_RC])dnl
+AC_LANG_SAVE
+
+# Source file extension for RC test sources.
+ac_ext=rc
+
+# Object file extension for compiled RC test sources.
+objext=o
+_LT_TAGVAR(objext, $1)=$objext
+
+# Code to be used in simple compile tests
+lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }'
+
+# Code to be used in simple link tests
+lt_simple_link_test_code="$lt_simple_compile_test_code"
+
+# ltmain only uses $CC for tagged configurations so make sure $CC is set.
+_LT_TAG_COMPILER
+
+# save warnings/boilerplate of simple test code
+_LT_COMPILER_BOILERPLATE
+_LT_LINKER_BOILERPLATE
+
+# Allow CC to be a program name with arguments.
+lt_save_CC="$CC"
+lt_save_GCC=$GCC
+GCC=
+CC=${RC-"windres"}
+compiler=$CC
+_LT_TAGVAR(compiler, $1)=$CC
+_LT_CC_BASENAME([$compiler])
+_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
+
+if test -n "$compiler"; then
+  :
+  _LT_CONFIG($1)
+fi
+
+GCC=$lt_save_GCC
+AC_LANG_RESTORE
+CC="$lt_save_CC"
+])# _LT_LANG_RC_CONFIG
+
+
+# LT_PROG_GCJ
+# -----------
+AC_DEFUN([LT_PROG_GCJ],
+[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ],
+  [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ],
+    [AC_CHECK_TOOL(GCJ, gcj,)
+      test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
+      AC_SUBST(GCJFLAGS)])])[]dnl
 ])
 
+# Old name:
+AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([LT_AC_PROG_GCJ], [])
+
+
+# LT_PROG_RC
+# ----------
+AC_DEFUN([LT_PROG_RC],
+[AC_CHECK_TOOL(RC, windres,)
+])
+
+# Old name:
+AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([LT_AC_PROG_RC], [])
+
+
+# _LT_DECL_EGREP
+# --------------
+# If we don't have a new enough Autoconf to choose the best grep
+# available, choose the one first in the user's PATH.
+m4_defun([_LT_DECL_EGREP],
+[AC_REQUIRE([AC_PROG_EGREP])dnl
+AC_REQUIRE([AC_PROG_FGREP])dnl
+test -z "$GREP" && GREP=grep
+_LT_DECL([], [GREP], [1], [A grep program that handles long lines])
+_LT_DECL([], [EGREP], [1], [An ERE matcher])
+_LT_DECL([], [FGREP], [1], [A literal string matcher])
+dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too
+AC_SUBST([GREP])
+])
+
+
+# _LT_DECL_OBJDUMP
+# --------------
+# If we don't have a new enough Autoconf to choose the best objdump
+# available, choose the one first in the user's PATH.
+m4_defun([_LT_DECL_OBJDUMP],
+[AC_CHECK_TOOL(OBJDUMP, objdump, false)
+test -z "$OBJDUMP" && OBJDUMP=objdump
+_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper])
+AC_SUBST([OBJDUMP])
+])
+
+
+# _LT_DECL_SED
+# ------------
+# Check for a fully-functional sed program, that truncates
+# as few characters as possible.  Prefer GNU sed if found.
+m4_defun([_LT_DECL_SED],
+[AC_PROG_SED
+test -z "$SED" && SED=sed
+Xsed="$SED -e 1s/^X//"
+_LT_DECL([], [SED], [1], [A sed program that does not truncate output])
+_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"],
+    [Sed that helps us avoid accidentally triggering echo(1) options like -n])
+])# _LT_DECL_SED
+
+m4_ifndef([AC_PROG_SED], [
 ############################################################
 # NOTE: This macro has been submitted for inclusion into   #
 #  GNU Autoconf as AC_PROG_SED.  When it is available in   #
 #  a released version of Autoconf we should remove this    #
 #  macro and use it instead.                               #
 ############################################################
-# LT_AC_PROG_SED
-# --------------
-# Check for a fully-functional sed program, that truncates
-# as few characters as possible.  Prefer GNU sed if found.
-AC_DEFUN([LT_AC_PROG_SED],
+
+m4_defun([AC_PROG_SED],
 [AC_MSG_CHECKING([for a sed that does not truncate output])
 AC_CACHE_VAL(lt_cv_path_SED,
 [# Loop through the user's path and test for sed and gsed.
@@ -5907,12 +7076,13 @@ do
     done
   done
 done
+IFS=$as_save_IFS
 lt_ac_max=0
 lt_ac_count=0
 # Add /usr/xpg4/bin/sed as it is typically found on Solaris
 # along with /bin/sed that truncates output.
 for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
-  test ! -f $lt_ac_sed && break
+  test ! -f $lt_ac_sed && continue
   cat /dev/null > conftest.in
   lt_ac_count=0
   echo $ECHO_N "0123456789$ECHO_C" >conftest.in
@@ -5937,7 +7107,270 @@ for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
     fi
   done
 done
-SED=$lt_cv_path_SED
 ])
+SED=$lt_cv_path_SED
+AC_SUBST([SED])
 AC_MSG_RESULT([$SED])
+])#AC_PROG_SED
+])#m4_ifndef
+
+# Old name:
+AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([LT_AC_PROG_SED], [])
+
+
+# _LT_CHECK_SHELL_FEATURES
+# ------------------------
+# Find out whether the shell is Bourne or XSI compatible,
+# or has some other useful features.
+m4_defun([_LT_CHECK_SHELL_FEATURES],
+[AC_MSG_CHECKING([whether the shell understands some XSI constructs])
+# Try some XSI features
+xsi_shell=no
+( _lt_dummy="a/b/c"
+  test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \
+      = c,a/b,, \
+    && eval 'test $(( 1 + 1 )) -eq 2 \
+    && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \
+  && xsi_shell=yes
+AC_MSG_RESULT([$xsi_shell])
+_LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell'])
+
+AC_MSG_CHECKING([whether the shell understands "+="])
+lt_shell_append=no
+( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \
+    >/dev/null 2>&1 \
+  && lt_shell_append=yes
+AC_MSG_RESULT([$lt_shell_append])
+_LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append'])
+
+if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
+  lt_unset=unset
+else
+  lt_unset=false
+fi
+_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl
+
+# test EBCDIC or ASCII
+case `echo X|tr X '\101'` in
+ A) # ASCII based system
+    # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
+  lt_SP2NL='tr \040 \012'
+  lt_NL2SP='tr \015\012 \040\040'
+  ;;
+ *) # EBCDIC based system
+  lt_SP2NL='tr \100 \n'
+  lt_NL2SP='tr \r\n \100\100'
+  ;;
+esac
+_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl
+_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl
+])# _LT_CHECK_SHELL_FEATURES
+
+
+# _LT_PROG_XSI_SHELLFNS
+# ---------------------
+# Bourne and XSI compatible variants of some useful shell functions.
+m4_defun([_LT_PROG_XSI_SHELLFNS],
+[case $xsi_shell in
+  yes)
+    cat << \_LT_EOF >> "$cfgfile"
+
+# func_dirname file append nondir_replacement
+# Compute the dirname of FILE.  If nonempty, add APPEND to the result,
+# otherwise set result to NONDIR_REPLACEMENT.
+func_dirname ()
+{
+  case ${1} in
+    */*) func_dirname_result="${1%/*}${2}" ;;
+    *  ) func_dirname_result="${3}" ;;
+  esac
+}
+
+# func_basename file
+func_basename ()
+{
+  func_basename_result="${1##*/}"
+}
+
+# func_dirname_and_basename file append nondir_replacement
+# perform func_basename and func_dirname in a single function
+# call:
+#   dirname:  Compute the dirname of FILE.  If nonempty,
+#             add APPEND to the result, otherwise set result
+#             to NONDIR_REPLACEMENT.
+#             value returned in "$func_dirname_result"
+#   basename: Compute filename of FILE.
+#             value retuned in "$func_basename_result"
+# Implementation must be kept synchronized with func_dirname
+# and func_basename. For efficiency, we do not delegate to
+# those functions but instead duplicate the functionality here.
+func_dirname_and_basename ()
+{
+  case ${1} in
+    */*) func_dirname_result="${1%/*}${2}" ;;
+    *  ) func_dirname_result="${3}" ;;
+  esac
+  func_basename_result="${1##*/}"
+}
+
+# func_stripname prefix suffix name
+# strip PREFIX and SUFFIX off of NAME.
+# PREFIX and SUFFIX must not contain globbing or regex special
+# characters, hashes, percent signs, but SUFFIX may contain a leading
+# dot (in which case that matches only a dot).
+func_stripname ()
+{
+  # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are
+  # positional parameters, so assign one to ordinary parameter first.
+  func_stripname_result=${3}
+  func_stripname_result=${func_stripname_result#"${1}"}
+  func_stripname_result=${func_stripname_result%"${2}"}
+}
+
+# func_opt_split
+func_opt_split ()
+{
+  func_opt_split_opt=${1%%=*}
+  func_opt_split_arg=${1#*=}
+}
+
+# func_lo2o object
+func_lo2o ()
+{
+  case ${1} in
+    *.lo) func_lo2o_result=${1%.lo}.${objext} ;;
+    *)    func_lo2o_result=${1} ;;
+  esac
+}
+
+# func_xform libobj-or-source
+func_xform ()
+{
+  func_xform_result=${1%.*}.lo
+}
+
+# func_arith arithmetic-term...
+func_arith ()
+{
+  func_arith_result=$(( $[*] ))
+}
+
+# func_len string
+# STRING may not start with a hyphen.
+func_len ()
+{
+  func_len_result=${#1}
+}
+
+_LT_EOF
+    ;;
+  *) # Bourne compatible functions.
+    cat << \_LT_EOF >> "$cfgfile"
+
+# func_dirname file append nondir_replacement
+# Compute the dirname of FILE.  If nonempty, add APPEND to the result,
+# otherwise set result to NONDIR_REPLACEMENT.
+func_dirname ()
+{
+  # Extract subdirectory from the argument.
+  func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"`
+  if test "X$func_dirname_result" = "X${1}"; then
+    func_dirname_result="${3}"
+  else
+    func_dirname_result="$func_dirname_result${2}"
+  fi
+}
+
+# func_basename file
+func_basename ()
+{
+  func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"`
+}
+
+dnl func_dirname_and_basename
+dnl A portable version of this function is already defined in general.m4sh
+dnl so there is no need for it here.
+
+# func_stripname prefix suffix name
+# strip PREFIX and SUFFIX off of NAME.
+# PREFIX and SUFFIX must not contain globbing or regex special
+# characters, hashes, percent signs, but SUFFIX may contain a leading
+# dot (in which case that matches only a dot).
+# func_strip_suffix prefix name
+func_stripname ()
+{
+  case ${2} in
+    .*) func_stripname_result=`$ECHO "X${3}" \
+           | $Xsed -e "s%^${1}%%" -e "s%\\\\${2}\$%%"`;;
+    *)  func_stripname_result=`$ECHO "X${3}" \
+           | $Xsed -e "s%^${1}%%" -e "s%${2}\$%%"`;;
+  esac
+}
+
+# sed scripts:
+my_sed_long_opt='1s/^\(-[[^=]]*\)=.*/\1/;q'
+my_sed_long_arg='1s/^-[[^=]]*=//'
+
+# func_opt_split
+func_opt_split ()
+{
+  func_opt_split_opt=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_opt"`
+  func_opt_split_arg=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_arg"`
+}
+
+# func_lo2o object
+func_lo2o ()
+{
+  func_lo2o_result=`$ECHO "X${1}" | $Xsed -e "$lo2o"`
+}
+
+# func_xform libobj-or-source
+func_xform ()
+{
+  func_xform_result=`$ECHO "X${1}" | $Xsed -e 's/\.[[^.]]*$/.lo/'`
+}
+
+# func_arith arithmetic-term...
+func_arith ()
+{
+  func_arith_result=`expr "$[@]"`
+}
+
+# func_len string
+# STRING may not start with a hyphen.
+func_len ()
+{
+  func_len_result=`expr "$[1]" : ".*" 2>/dev/null || echo $max_cmd_len`
+}
+
+_LT_EOF
+esac
+
+case $lt_shell_append in
+  yes)
+    cat << \_LT_EOF >> "$cfgfile"
+
+# func_append var value
+# Append VALUE to the end of shell variable VAR.
+func_append ()
+{
+  eval "$[1]+=\$[2]"
+}
+_LT_EOF
+    ;;
+  *)
+    cat << \_LT_EOF >> "$cfgfile"
+
+# func_append var value
+# Append VALUE to the end of shell variable VAR.
+func_append ()
+{
+  eval "$[1]=\$$[1]\$[2]"
+}
+
+_LT_EOF
+    ;;
+  esac
 ])
diff --git a/myserver/m4/libxml.m4 b/myserver/m4/libxml.m4
deleted file mode 100644
index 68cd824..0000000
--- a/myserver/m4/libxml.m4
+++ /dev/null
@@ -1,188 +0,0 @@
-# Configure paths for LIBXML2
-# Mike Hommey 2004-06-19
-# use CPPFLAGS instead of CFLAGS
-# Toshio Kuratomi 2001-04-21
-# Adapted from:
-# Configure paths for GLIB
-# Owen Taylor     97-11-3
-
-dnl AM_PATH_XML2([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])
-dnl Test for XML, and define XML_CPPFLAGS and XML_LIBS
-dnl
-AC_DEFUN([AM_PATH_XML2],[ 
-AC_ARG_WITH(xml-prefix,
-            [  --with-xml-prefix=PFX   Prefix where libxml is installed (optional)],
-            xml_config_prefix="$withval", xml_config_prefix="")
-AC_ARG_WITH(xml-exec-prefix,
-            [  --with-xml-exec-prefix=PFX Exec prefix where libxml is installed (optional)],
-            xml_config_exec_prefix="$withval", xml_config_exec_prefix="")
-AC_ARG_ENABLE(xmltest,
-              [  --disable-xmltest       Do not try to compile and run a test LIBXML program],,
-              enable_xmltest=yes)
-
-  if test x$xml_config_exec_prefix != x ; then
-     xml_config_args="$xml_config_args"
-     if test x${XML2_CONFIG+set} != xset ; then
-        XML2_CONFIG=$xml_config_exec_prefix/bin/xml2-config
-     fi
-  fi
-  if test x$xml_config_prefix != x ; then
-     xml_config_args="$xml_config_args --prefix=$xml_config_prefix"
-     if test x${XML2_CONFIG+set} != xset ; then
-        XML2_CONFIG=$xml_config_prefix/bin/xml2-config
-     fi
-  fi
-
-  AC_PATH_PROG(XML2_CONFIG, xml2-config, no)
-  min_xml_version=ifelse([$1], ,2.0.0,[$1])
-  AC_MSG_CHECKING(for libxml - version >= $min_xml_version)
-  no_xml=""
-  if test "$XML2_CONFIG" = "no" ; then
-    no_xml=yes
-  else
-    XML_CPPFLAGS=`$XML2_CONFIG $xml_config_args --cflags`
-    XML_LIBS=`$XML2_CONFIG $xml_config_args --libs`
-    xml_config_major_version=`$XML2_CONFIG $xml_config_args --version | \
-           sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
-    xml_config_minor_version=`$XML2_CONFIG $xml_config_args --version | \
-           sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
-    xml_config_micro_version=`$XML2_CONFIG $xml_config_args --version | \
-           sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
-    if test "x$enable_xmltest" = "xyes" ; then
-      ac_save_CPPFLAGS="$CPPFLAGS"
-      ac_save_LIBS="$LIBS"
-      CPPFLAGS="$CPPFLAGS $XML_CPPFLAGS"
-      LIBS="$XML_LIBS $LIBS"
-dnl
-dnl Now check if the installed libxml is sufficiently new.
-dnl (Also sanity checks the results of xml2-config to some extent)
-dnl
-      rm -f conf.xmltest
-      AC_TRY_RUN([
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
-#include <libxml/xmlversion.h>
-
-int 
-main()
-{
-  int xml_major_version, xml_minor_version, xml_micro_version;
-  int major, minor, micro;
-  char *tmp_version;
-
-  system("touch conf.xmltest");
-
-  /* Capture xml2-config output via autoconf/configure variables */
-  /* HP/UX 9 (%@#!) writes to sscanf strings */
-  tmp_version = (char *)strdup("$min_xml_version");
-  if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, &micro) != 3) {
-     printf("%s, bad version string from xml2-config\n", "$min_xml_version");
-     exit(1);
-   }
-   free(tmp_version);
-
-   /* Capture the version information from the header files */
-   tmp_version = (char *)strdup(LIBXML_DOTTED_VERSION);
-   if (sscanf(tmp_version, "%d.%d.%d", &xml_major_version, &xml_minor_version, &xml_micro_version) != 3) {
-     printf("%s, bad version string from libxml includes\n", "LIBXML_DOTTED_VERSION");
-     exit(1);
-   }
-   free(tmp_version);
-
- /* Compare xml2-config output to the libxml headers */
-  if ((xml_major_version != $xml_config_major_version) ||
-      (xml_minor_version != $xml_config_minor_version) ||
-      (xml_micro_version != $xml_config_micro_version))
-    {
-      printf("*** libxml header files (version %d.%d.%d) do not match\n",
-         xml_major_version, xml_minor_version, xml_micro_version);
-      printf("*** xml2-config (version %d.%d.%d)\n",
-         $xml_config_major_version, $xml_config_minor_version, $xml_config_micro_version);
-      return 1;
-    } 
-/* Compare the headers to the library to make sure we match */
-  /* Less than ideal -- doesn't provide us with return value feedback, 
-   * only exits if there's a serious mismatch between header and library.
-   */
-    LIBXML_TEST_VERSION;
-
-    /* Test that the library is greater than our minimum version */
-    if ((xml_major_version > major) ||
-        ((xml_major_version == major) && (xml_minor_version > minor)) ||
-        ((xml_major_version == major) && (xml_minor_version == minor) &&
-        (xml_micro_version >= micro)))
-      {
-        return 0;
-       }
-     else
-      {
-        printf("\n*** An old version of libxml (%d.%d.%d) was found.\n",
-               xml_major_version, xml_minor_version, xml_micro_version);
-        printf("*** You need a version of libxml newer than %d.%d.%d. The latest version of\n",
-           major, minor, micro);
-        printf("*** libxml is always available from ftp://ftp.xmlsoft.org.\n");
-        printf("***\n");
-        printf("*** If you have already installed a sufficiently new version, this error\n");
-        printf("*** probably means that the wrong copy of the xml2-config shell script is\n");
-        printf("*** being found. The easiest way to fix this is to remove the old version\n");
-        printf("*** of LIBXML, but you can also set the XML2_CONFIG environment to point to the\n");
-        printf("*** correct copy of xml2-config. (In this case, you will have to\n");
-        printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n");
-        printf("*** so that the correct libraries are found at run-time))\n");
-    }
-  return 1;
-}
-],, no_xml=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
-       CPPFLAGS="$ac_save_CPPFLAGS"
-       LIBS="$ac_save_LIBS"
-     fi
-  fi
-
-  if test "x$no_xml" = x ; then
-     AC_MSG_RESULT(yes (version $xml_config_major_version.$xml_config_minor_version.$xml_config_micro_version))
-     ifelse([$2], , :, [$2])     
-  else
-     AC_MSG_RESULT(no)
-     if test "$XML2_CONFIG" = "no" ; then
-       echo "*** The xml2-config script installed by LIBXML could not be found"
-       echo "*** If libxml was installed in PREFIX, make sure PREFIX/bin is in"
-       echo "*** your path, or set the XML2_CONFIG environment variable to the"
-       echo "*** full path to xml2-config."
-     else
-       if test -f conf.xmltest ; then
-        :
-       else
-          echo "*** Could not run libxml test program, checking why..."
-          CPPFLAGS="$CPPFLAGS $XML_CPPFLAGS"
-          LIBS="$LIBS $XML_LIBS"
-          AC_TRY_LINK([
-#include <libxml/xmlversion.h>
-#include <stdio.h>
-],      [ LIBXML_TEST_VERSION; return 0;],
-        [ echo "*** The test program compiled, but did not run. This usually means"
-          echo "*** that the run-time linker is not finding LIBXML or finding the wrong"
-          echo "*** version of LIBXML. If it is not finding LIBXML, you'll need to set your"
-          echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
-          echo "*** to the installed location  Also, make sure you have run ldconfig if that"
-          echo "*** is required on your system"
-          echo "***"
-          echo "*** If you have an old version installed, it is best to remove it, although"
-          echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH" ],
-        [ echo "*** The test program failed to compile or link. See the file config.log for the"
-          echo "*** exact error that occured. This usually means LIBXML was incorrectly installed"
-          echo "*** or that you have moved LIBXML since it was installed. In the latter case, you"
-          echo "*** may want to edit the xml2-config script: $XML2_CONFIG" ])
-          CPPFLAGS="$ac_save_CPPFLAGS"
-          LIBS="$ac_save_LIBS"
-       fi
-     fi
-
-     XML_CPPFLAGS=""
-     XML_LIBS=""
-     ifelse([$3], , :, [$3])
-  fi
-  AC_SUBST(XML_CPPFLAGS)
-  AC_SUBST(XML_LIBS)
-  rm -f conf.xmltest
-])
diff --git a/myserver/m4/progtest.m4 b/myserver/m4/progtest.m4
deleted file mode 100644
index a56365c..0000000
--- a/myserver/m4/progtest.m4
+++ /dev/null
@@ -1,92 +0,0 @@
-# progtest.m4 serial 4 (gettext-0.14.2)
-dnl Copyright (C) 1996-2003, 2005 Free Software Foundation, Inc.
-dnl This file is free software; the Free Software Foundation
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-dnl
-dnl This file can can be used in projects which are not available under
-dnl the GNU General Public License or the GNU Library General Public
-dnl License but which still want to provide support for the GNU gettext
-dnl functionality.
-dnl Please note that the actual code of the GNU gettext library is covered
-dnl by the GNU Library General Public License, and the rest of the GNU
-dnl gettext package package is covered by the GNU General Public License.
-dnl They are *not* in the public domain.
-
-dnl Authors:
-dnl   Ulrich Drepper <drepper@cygnus.com>, 1996.
-
-AC_PREREQ(2.50)
-
-# Search path for a program which passes the given test.
-
-dnl AM_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
-dnl   TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
-AC_DEFUN([AM_PATH_PROG_WITH_TEST],
-[
-# Prepare PATH_SEPARATOR.
-# 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
-
-# Find out how to test for executable files. Don't use a zero-byte file,
-# as systems may use methods other than mode bits to determine executability.
-cat >conf$$.file <<_ASEOF
-#! /bin/sh
-exit 0
-_ASEOF
-chmod +x conf$$.file
-if test -x conf$$.file >/dev/null 2>&1; then
-  ac_executable_p="test -x"
-else
-  ac_executable_p="test -f"
-fi
-rm -f conf$$.file
-
-# Extract the first word of "$2", so it can be a program name with args.
-set dummy $2; ac_word=[$]2
-AC_MSG_CHECKING([for $ac_word])
-AC_CACHE_VAL(ac_cv_path_$1,
-[case "[$]$1" in
-  [[\\/]]* | ?:[[\\/]]*)
-    ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
-    ;;
-  *)
-    ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
-    for ac_dir in ifelse([$5], , $PATH, [$5]); do
-      IFS="$ac_save_IFS"
-      test -z "$ac_dir" && ac_dir=.
-      for ac_exec_ext in '' $ac_executable_extensions; do
-        if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then
-          echo "$as_me: trying $ac_dir/$ac_word..." >&AS_MESSAGE_LOG_FD
-          if [$3]; then
-            ac_cv_path_$1="$ac_dir/$ac_word$ac_exec_ext"
-            break 2
-          fi
-        fi
-      done
-    done
-    IFS="$ac_save_IFS"
-dnl If no 4th arg is given, leave the cache variable unset,
-dnl so AC_PATH_PROGS will keep looking.
-ifelse([$4], , , [  test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
-])dnl
-    ;;
-esac])dnl
-$1="$ac_cv_path_$1"
-if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then
-  AC_MSG_RESULT([$]$1)
-else
-  AC_MSG_RESULT(no)
-fi
-AC_SUBST($1)dnl
-])
diff --git a/myserver/missing b/myserver/missing
deleted file mode 100755
index 1c8ff70..0000000
--- a/myserver/missing
+++ /dev/null
@@ -1,367 +0,0 @@
-#! /bin/sh
-# Common stub for a few missing GNU programs while installing.
-
-scriptversion=2006-05-10.23
-
-# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006
-#   Free Software Foundation, Inc.
-# Originally by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
-
-# This program 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.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
-# 02110-1301, USA.
-
-# As a special exception to the GNU General Public License, if you
-# distribute this file as part of a program that contains a
-# configuration script generated by Autoconf, you may include it under
-# the same distribution terms that you use for the rest of that program.
-
-if test $# -eq 0; then
-  echo 1>&2 "Try \`$0 --help' for more information"
-  exit 1
-fi
-
-run=:
-sed_output='s/.* --output[ =]\([^ ]*\).*/\1/p'
-sed_minuso='s/.* -o \([^ ]*\).*/\1/p'
-
-# In the cases where this matters, `missing' is being run in the
-# srcdir already.
-if test -f configure.ac; then
-  configure_ac=configure.ac
-else
-  configure_ac=configure.in
-fi
-
-msg="missing on your system"
-
-case $1 in
---run)
-  # Try to run requested program, and just exit if it succeeds.
-  run=
-  shift
-  "$@" && exit 0
-  # Exit code 63 means version mismatch.  This often happens
-  # when the user try to use an ancient version of a tool on
-  # a file that requires a minimum version.  In this case we
-  # we should proceed has if the program had been absent, or
-  # if --run hadn't been passed.
-  if test $? = 63; then
-    run=:
-    msg="probably too old"
-  fi
-  ;;
-
-  -h|--h|--he|--hel|--help)
-    echo "\
-$0 [OPTION]... PROGRAM [ARGUMENT]...
-
-Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an
-error status if there is no known handling for PROGRAM.
-
-Options:
-  -h, --help      display this help and exit
-  -v, --version   output version information and exit
-  --run           try to run the given command, and emulate it if it fails
-
-Supported PROGRAM values:
-  aclocal      touch file \`aclocal.m4'
-  autoconf     touch file \`configure'
-  autoheader   touch file \`config.h.in'
-  autom4te     touch the output file, or create a stub one
-  automake     touch all \`Makefile.in' files
-  bison        create \`y.tab.[ch]', if possible, from existing .[ch]
-  flex         create \`lex.yy.c', if possible, from existing .c
-  help2man     touch the output file
-  lex          create \`lex.yy.c', if possible, from existing .c
-  makeinfo     touch the output file
-  tar          try tar, gnutar, gtar, then tar without non-portable flags
-  yacc         create \`y.tab.[ch]', if possible, from existing .[ch]
-
-Send bug reports to <bug-automake@gnu.org>."
-    exit $?
-    ;;
-
-  -v|--v|--ve|--ver|--vers|--versi|--versio|--version)
-    echo "missing $scriptversion (GNU Automake)"
-    exit $?
-    ;;
-
-  -*)
-    echo 1>&2 "$0: Unknown \`$1' option"
-    echo 1>&2 "Try \`$0 --help' for more information"
-    exit 1
-    ;;
-
-esac
-
-# Now exit if we have it, but it failed.  Also exit now if we
-# don't have it and --version was passed (most likely to detect
-# the program).
-case $1 in
-  lex|yacc)
-    # Not GNU programs, they don't have --version.
-    ;;
-
-  tar)
-    if test -n "$run"; then
-       echo 1>&2 "ERROR: \`tar' requires --run"
-       exit 1
-    elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
-       exit 1
-    fi
-    ;;
-
-  *)
-    if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
-       # We have it, but it failed.
-       exit 1
-    elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
-       # Could not run --version or --help.  This is probably someone
-       # running `$TOOL --version' or `$TOOL --help' to check whether
-       # $TOOL exists and not knowing $TOOL uses missing.
-       exit 1
-    fi
-    ;;
-esac
-
-# If it does not exist, or fails to run (possibly an outdated version),
-# try to emulate it.
-case $1 in
-  aclocal*)
-    echo 1>&2 "\
-WARNING: \`$1' is $msg.  You should only need it if
-         you modified \`acinclude.m4' or \`${configure_ac}'.  You might want
-         to install the \`Automake' and \`Perl' packages.  Grab them from
-         any GNU archive site."
-    touch aclocal.m4
-    ;;
-
-  autoconf)
-    echo 1>&2 "\
-WARNING: \`$1' is $msg.  You should only need it if
-         you modified \`${configure_ac}'.  You might want to install the
-         \`Autoconf' and \`GNU m4' packages.  Grab them from any GNU
-         archive site."
-    touch configure
-    ;;
-
-  autoheader)
-    echo 1>&2 "\
-WARNING: \`$1' is $msg.  You should only need it if
-         you modified \`acconfig.h' or \`${configure_ac}'.  You might want
-         to install the \`Autoconf' and \`GNU m4' packages.  Grab them
-         from any GNU archive site."
-    files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}`
-    test -z "$files" && files="config.h"
-    touch_files=
-    for f in $files; do
-      case $f in
-      *:*) touch_files="$touch_files "`echo "$f" |
-				       sed -e 's/^[^:]*://' -e 's/:.*//'`;;
-      *) touch_files="$touch_files $f.in";;
-      esac
-    done
-    touch $touch_files
-    ;;
-
-  automake*)
-    echo 1>&2 "\
-WARNING: \`$1' is $msg.  You should only need it if
-         you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'.
-         You might want to install the \`Automake' and \`Perl' packages.
-         Grab them from any GNU archive site."
-    find . -type f -name Makefile.am -print |
-	   sed 's/\.am$/.in/' |
-	   while read f; do touch "$f"; done
-    ;;
-
-  autom4te)
-    echo 1>&2 "\
-WARNING: \`$1' is needed, but is $msg.
-         You might have modified some files without having the
-         proper tools for further handling them.
-         You can get \`$1' as part of \`Autoconf' from any GNU
-         archive site."
-
-    file=`echo "$*" | sed -n "$sed_output"`
-    test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
-    if test -f "$file"; then
-	touch $file
-    else
-	test -z "$file" || exec >$file
-	echo "#! /bin/sh"
-	echo "# Created by GNU Automake missing as a replacement of"
-	echo "#  $ $@"
-	echo "exit 0"
-	chmod +x $file
-	exit 1
-    fi
-    ;;
-
-  bison|yacc)
-    echo 1>&2 "\
-WARNING: \`$1' $msg.  You should only need it if
-         you modified a \`.y' file.  You may need the \`Bison' package
-         in order for those modifications to take effect.  You can get
-         \`Bison' from any GNU archive site."
-    rm -f y.tab.c y.tab.h
-    if test $# -ne 1; then
-        eval LASTARG="\${$#}"
-	case $LASTARG in
-	*.y)
-	    SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'`
-	    if test -f "$SRCFILE"; then
-	         cp "$SRCFILE" y.tab.c
-	    fi
-	    SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'`
-	    if test -f "$SRCFILE"; then
-	         cp "$SRCFILE" y.tab.h
-	    fi
-	  ;;
-	esac
-    fi
-    if test ! -f y.tab.h; then
-	echo >y.tab.h
-    fi
-    if test ! -f y.tab.c; then
-	echo 'main() { return 0; }' >y.tab.c
-    fi
-    ;;
-
-  lex|flex)
-    echo 1>&2 "\
-WARNING: \`$1' is $msg.  You should only need it if
-         you modified a \`.l' file.  You may need the \`Flex' package
-         in order for those modifications to take effect.  You can get
-         \`Flex' from any GNU archive site."
-    rm -f lex.yy.c
-    if test $# -ne 1; then
-        eval LASTARG="\${$#}"
-	case $LASTARG in
-	*.l)
-	    SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'`
-	    if test -f "$SRCFILE"; then
-	         cp "$SRCFILE" lex.yy.c
-	    fi
-	  ;;
-	esac
-    fi
-    if test ! -f lex.yy.c; then
-	echo 'main() { return 0; }' >lex.yy.c
-    fi
-    ;;
-
-  help2man)
-    echo 1>&2 "\
-WARNING: \`$1' is $msg.  You should only need it if
-	 you modified a dependency of a manual page.  You may need the
-	 \`Help2man' package in order for those modifications to take
-	 effect.  You can get \`Help2man' from any GNU archive site."
-
-    file=`echo "$*" | sed -n "$sed_output"`
-    test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
-    if test -f "$file"; then
-	touch $file
-    else
-	test -z "$file" || exec >$file
-	echo ".ab help2man is required to generate this page"
-	exit 1
-    fi
-    ;;
-
-  makeinfo)
-    echo 1>&2 "\
-WARNING: \`$1' is $msg.  You should only need it if
-         you modified a \`.texi' or \`.texinfo' file, or any other file
-         indirectly affecting the aspect of the manual.  The spurious
-         call might also be the consequence of using a buggy \`make' (AIX,
-         DU, IRIX).  You might want to install the \`Texinfo' package or
-         the \`GNU make' package.  Grab either from any GNU archive site."
-    # The file to touch is that specified with -o ...
-    file=`echo "$*" | sed -n "$sed_output"`
-    test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
-    if test -z "$file"; then
-      # ... or it is the one specified with @setfilename ...
-      infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'`
-      file=`sed -n '
-	/^@setfilename/{
-	  s/.* \([^ ]*\) *$/\1/
-	  p
-	  q
-	}' $infile`
-      # ... or it is derived from the source name (dir/f.texi becomes f.info)
-      test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info
-    fi
-    # If the file does not exist, the user really needs makeinfo;
-    # let's fail without touching anything.
-    test -f $file || exit 1
-    touch $file
-    ;;
-
-  tar)
-    shift
-
-    # We have already tried tar in the generic part.
-    # Look for gnutar/gtar before invocation to avoid ugly error
-    # messages.
-    if (gnutar --version > /dev/null 2>&1); then
-       gnutar "$@" && exit 0
-    fi
-    if (gtar --version > /dev/null 2>&1); then
-       gtar "$@" && exit 0
-    fi
-    firstarg="$1"
-    if shift; then
-	case $firstarg in
-	*o*)
-	    firstarg=`echo "$firstarg" | sed s/o//`
-	    tar "$firstarg" "$@" && exit 0
-	    ;;
-	esac
-	case $firstarg in
-	*h*)
-	    firstarg=`echo "$firstarg" | sed s/h//`
-	    tar "$firstarg" "$@" && exit 0
-	    ;;
-	esac
-    fi
-
-    echo 1>&2 "\
-WARNING: I can't seem to be able to run \`tar' with the given arguments.
-         You may want to install GNU tar or Free paxutils, or check the
-         command line arguments."
-    exit 1
-    ;;
-
-  *)
-    echo 1>&2 "\
-WARNING: \`$1' is needed, and is $msg.
-         You might have modified some files without having the
-         proper tools for further handling them.  Check the \`README' file,
-         it often tells you about the needed prerequisites for installing
-         this package.  You may also peek at any GNU archive site, in case
-         some other package would contain this missing \`$1' program."
-    exit 1
-    ;;
-esac
-
-exit 0
-
-# Local variables:
-# eval: (add-hook 'write-file-hooks 'time-stamp)
-# time-stamp-start: "scriptversion="
-# time-stamp-format: "%:y-%02m-%02d.%02H"
-# time-stamp-end: "$"
-# End:
diff --git a/myserver/src/Makefile.am b/myserver/src/Makefile.am
index c12a693..d130cd5 100644
--- a/myserver/src/Makefile.am
+++ b/myserver/src/Makefile.am
@@ -1,7 +1,7 @@
 # Makefile for MyServer (./src)
 SUBDIRS = base conf connection connections_scheduler filter http_handler \
 	log plugin protocol server
-INCLUDES = $(all_includes)
+AM_CPPFLAGS = $(all_includes)
 bin_PROGRAMS = myserver
 myserver_SOURCES = myserver.cpp
 myserver_CXXFLAGS = $(CXXFLAGS) $(XML_CFLAGS) -DHOST_STR=\"$(build)\" -DPREFIX=\"$(prefix)\"
diff --git a/myserver/src/base/Makefile.am b/myserver/src/base/Makefile.am
index aa8e6f4..7e6f1df 100644
--- a/myserver/src/base/Makefile.am
+++ b/myserver/src/base/Makefile.am
@@ -1,7 +1,7 @@
 lib_LIBRARIES = libbase.a
 libbase_a_SOURCES = utility.cpp
 SUBDIRS = base64 bitvec dynamic_lib file files_cache find_data hash_map home_dir md5 mem_buff multicast pipe process regex safetime slab socket socket_pair ssl string sync thread xml unix_socket
-INCLUDES = $(all_includes)
+AM_CPPFLAGS = $(all_includes)
 
 install:
 # Do not do anything.
diff --git a/myserver/src/base/base64/Makefile.am b/myserver/src/base/base64/Makefile.am
index 143cdcf..27f66c7 100644
--- a/myserver/src/base/base64/Makefile.am
+++ b/myserver/src/base/base64/Makefile.am
@@ -1,5 +1,5 @@
 lib_LIBRARIES = libbase64.a
 libbase64_a_SOURCES = mime_utils.cpp
 SUBDIRS =
-INCLUDES = $(all_includes)
+AM_CPPFLAGS = $(all_includes)
 
diff --git a/myserver/src/base/bitvec/Makefile.am b/myserver/src/base/bitvec/Makefile.am
index 1475674..09724ff 100644
--- a/myserver/src/base/bitvec/Makefile.am
+++ b/myserver/src/base/bitvec/Makefile.am
@@ -1,4 +1,4 @@
 lib_LIBRARIES = libbitvec.a
 libbitvec_a_SOURCES = bitvec.cpp
 SUBDIRS =
-INCLUDES = $(all_includes)
+AM_CPPFLAGS = $(all_includes)
diff --git a/myserver/src/base/dynamic_lib/Makefile.am b/myserver/src/base/dynamic_lib/Makefile.am
index 9d21ff9..3820ed3 100644
--- a/myserver/src/base/dynamic_lib/Makefile.am
+++ b/myserver/src/base/dynamic_lib/Makefile.am
@@ -1,5 +1,5 @@
 lib_LIBRARIES = libdynamic_lib.a
 libdynamic_lib_a_SOURCES = dynamiclib.cpp
 SUBDIRS =
-INCLUDES = $(all_includes)
+AM_CPPFLAGS = $(all_includes)
 
diff --git a/myserver/src/base/file/Makefile.am b/myserver/src/base/file/Makefile.am
index c8f5f06..5128274 100644
--- a/myserver/src/base/file/Makefile.am
+++ b/myserver/src/base/file/Makefile.am
@@ -1,5 +1,5 @@
 lib_LIBRARIES = libfile.a
 libfile_a_SOURCES = file.cpp files_utility.cpp
 SUBDIRS =
-INCLUDES = $(all_includes)
+AM_CPPFLAGS = $(all_includes)
 
diff --git a/myserver/src/base/files_cache/Makefile.am b/myserver/src/base/files_cache/Makefile.am
index 108995e..0e78be2 100644
--- a/myserver/src/base/files_cache/Makefile.am
+++ b/myserver/src/base/files_cache/Makefile.am
@@ -1,5 +1,5 @@
 lib_LIBRARIES = libfiles_cache.a
 libfiles_cache_a_SOURCES = cached_file_buffer.cpp cached_file.cpp cached_file_factory.cpp
 SUBDIRS =
-INCLUDES = $(all_includes)
+AM_CPPFLAGS = $(all_includes)
 
diff --git a/myserver/src/base/find_data/Makefile.am b/myserver/src/base/find_data/Makefile.am
index 10ef03c..1e44764 100644
--- a/myserver/src/base/find_data/Makefile.am
+++ b/myserver/src/base/find_data/Makefile.am
@@ -1,5 +1,5 @@
 lib_LIBRARIES = libfind_data.a
 libfind_data_a_SOURCES = find_data.cpp
 SUBDIRS =
-INCLUDES = $(all_includes)
+AM_CPPFLAGS = $(all_includes)
 
diff --git a/myserver/src/base/hash_map/Makefile.am b/myserver/src/base/hash_map/Makefile.am
index 5675a35..57daef1 100644
--- a/myserver/src/base/hash_map/Makefile.am
+++ b/myserver/src/base/hash_map/Makefile.am
@@ -1,5 +1,5 @@
 lib_LIBRARIES = libhash_map.a
 libhash_map_a_SOURCES = hash_map.cpp
 SUBDIRS =
-INCLUDES = $(all_includes)
+AM_CPPFLAGS = $(all_includes)
 
diff --git a/myserver/src/base/home_dir/Makefile.am b/myserver/src/base/home_dir/Makefile.am
index cfa3bcb..5a5f4be 100644
--- a/myserver/src/base/home_dir/Makefile.am
+++ b/myserver/src/base/home_dir/Makefile.am
@@ -1,5 +1,5 @@
 lib_LIBRARIES = libhome_dir.a
 libhome_dir_a_SOURCES = home_dir.cpp
 SUBDIRS =
-INCLUDES = $(all_includes)
+AM_CPPFLAGS = $(all_includes)
 
diff --git a/myserver/src/base/md5/Makefile.am b/myserver/src/base/md5/Makefile.am
index 6850212..ac10bc8 100644
--- a/myserver/src/base/md5/Makefile.am
+++ b/myserver/src/base/md5/Makefile.am
@@ -1,5 +1,5 @@
 lib_LIBRARIES = libmd5.a
 libmd5_a_SOURCES = md5.cpp
 SUBDIRS =
-INCLUDES = $(all_includes)
+AM_CPPFLAGS = $(all_includes)
 
diff --git a/myserver/src/base/mem_buff/Makefile.am b/myserver/src/base/mem_buff/Makefile.am
index 6e400fa..a33e97e 100644
--- a/myserver/src/base/mem_buff/Makefile.am
+++ b/myserver/src/base/mem_buff/Makefile.am
@@ -1,5 +1,5 @@
 lib_LIBRARIES = libmem_buff.a
 libmem_buff_a_SOURCES = mem_buff.cpp
 SUBDIRS =
-INCLUDES = $(all_includes)
+AM_CPPFLAGS = $(all_includes)
 
diff --git a/myserver/src/base/multicast/Makefile.am b/myserver/src/base/multicast/Makefile.am
index ad0e06e..f6e3bd8 100644
--- a/myserver/src/base/multicast/Makefile.am
+++ b/myserver/src/base/multicast/Makefile.am
@@ -1,5 +1,5 @@
 lib_LIBRARIES = libmulticast.a
 libmulticast_a_SOURCES = multicast.cpp
 SUBDIRS =
-INCLUDES = $(all_includes)
+AM_CPPFLAGS = $(all_includes)
 
diff --git a/myserver/src/base/pipe/Makefile.am b/myserver/src/base/pipe/Makefile.am
index ac85046..74a5394 100644
--- a/myserver/src/base/pipe/Makefile.am
+++ b/myserver/src/base/pipe/Makefile.am
@@ -1,5 +1,5 @@
 lib_LIBRARIES = libpipe.a
 libpipe_a_SOURCES = pipe.cpp
 SUBDIRS =
-INCLUDES = $(all_includes)
+AM_CPPFLAGS = $(all_includes)
 
diff --git a/myserver/src/base/process/Makefile.am b/myserver/src/base/process/Makefile.am
index 4b04628..72f1ad2 100644
--- a/myserver/src/base/process/Makefile.am
+++ b/myserver/src/base/process/Makefile.am
@@ -1,5 +1,5 @@
 lib_LIBRARIES = libprocess.a
 libprocess_a_SOURCES = fork_server.cpp process.cpp process_server_manager.cpp
 SUBDIRS =
-INCLUDES = $(all_includes)
+AM_CPPFLAGS = $(all_includes)
 
diff --git a/myserver/src/base/regex/Makefile.am b/myserver/src/base/regex/Makefile.am
index 3d962f2..2c5a53b 100644
--- a/myserver/src/base/regex/Makefile.am
+++ b/myserver/src/base/regex/Makefile.am
@@ -1,5 +1,5 @@
 lib_LIBRARIES = libregex.a
 libregex_a_SOURCES = myserver_regex.cpp
 SUBDIRS =
-INCLUDES = $(all_includes)
+AM_CPPFLAGS = $(all_includes)
 
diff --git a/myserver/src/base/safetime/Makefile.am b/myserver/src/base/safetime/Makefile.am
index 7a4dce4..023c390 100644
--- a/myserver/src/base/safetime/Makefile.am
+++ b/myserver/src/base/safetime/Makefile.am
@@ -1,5 +1,5 @@
 lib_LIBRARIES = libsafetime.a
 libsafetime_a_SOURCES = safetime.cpp
 SUBDIRS =
-INCLUDES = $(all_includes)
+AM_CPPFLAGS = $(all_includes)
 
diff --git a/myserver/src/base/slab/Makefile.am b/myserver/src/base/slab/Makefile.am
index d8df8f4..d6129fa 100644
--- a/myserver/src/base/slab/Makefile.am
+++ b/myserver/src/base/slab/Makefile.am
@@ -1,4 +1,4 @@
 lib_LIBRARIES = libslab.a
 libslab_a_SOURCES = slab.cpp
 SUBDIRS =
-INCLUDES = $(all_includes)
+AM_CPPFLAGS = $(all_includes)
diff --git a/myserver/src/base/socket/Makefile.am b/myserver/src/base/socket/Makefile.am
index d8fd8ad..cddd4d7 100644
--- a/myserver/src/base/socket/Makefile.am
+++ b/myserver/src/base/socket/Makefile.am
@@ -1,5 +1,5 @@
 lib_LIBRARIES = libsocket.a
 libsocket_a_SOURCES = socket.cpp ssl_socket.cpp
 SUBDIRS =
-INCLUDES = $(all_includes)
+AM_CPPFLAGS = $(all_includes)
 
diff --git a/myserver/src/base/socket_pair/Makefile.am b/myserver/src/base/socket_pair/Makefile.am
index 0f38c23..30c3ec8 100644
--- a/myserver/src/base/socket_pair/Makefile.am
+++ b/myserver/src/base/socket_pair/Makefile.am
@@ -1,5 +1,5 @@
 lib_LIBRARIES = libsocket_pair.a
 libsocket_pair_a_SOURCES = socket_pair.cpp
 SUBDIRS =
-INCLUDES = $(all_includes)
+AM_CPPFLAGS = $(all_includes)
 
diff --git a/myserver/src/base/ssl/Makefile.am b/myserver/src/base/ssl/Makefile.am
index 31aa370..da79543 100644
--- a/myserver/src/base/ssl/Makefile.am
+++ b/myserver/src/base/ssl/Makefile.am
@@ -1,5 +1,5 @@
 lib_LIBRARIES = libssl.a
 libssl_a_SOURCES = ssl.cpp
 SUBDIRS =
-INCLUDES = $(all_includes)
+AM_CPPFLAGS = $(all_includes)
 
diff --git a/myserver/src/base/string/Makefile.am b/myserver/src/base/string/Makefile.am
index 2edd1d4..665bb06 100644
--- a/myserver/src/base/string/Makefile.am
+++ b/myserver/src/base/string/Makefile.am
@@ -1,5 +1,5 @@
 lib_LIBRARIES = libstring.a
 libstring_a_SOURCES = securestr.cpp stringutils.cpp
 SUBDIRS =
-INCLUDES = $(all_includes)
+AM_CPPFLAGS = $(all_includes)
 
diff --git a/myserver/src/base/sync/Makefile.am b/myserver/src/base/sync/Makefile.am
index a93e94d..d3bc558 100644
--- a/myserver/src/base/sync/Makefile.am
+++ b/myserver/src/base/sync/Makefile.am
@@ -1,5 +1,5 @@
 lib_LIBRARIES = libsync.a
 libsync_a_SOURCES = event.cpp mutex.cpp read_write_lock.cpp recursive_mutex.cpp semaphore.cpp
 SUBDIRS =
-INCLUDES = $(all_includes)
+AM_CPPFLAGS = $(all_includes)
 
diff --git a/myserver/src/base/thread/Makefile.am b/myserver/src/base/thread/Makefile.am
index 02f0130..44a7710 100644
--- a/myserver/src/base/thread/Makefile.am
+++ b/myserver/src/base/thread/Makefile.am
@@ -1,5 +1,5 @@
 lib_LIBRARIES = libthread.a
 libthread_a_SOURCES = thread.cpp
 SUBDIRS =
-INCLUDES = $(all_includes)
+AM_CPPFLAGS = $(all_includes)
 
diff --git a/myserver/src/base/unix_socket/Makefile.am b/myserver/src/base/unix_socket/Makefile.am
index b0d6fc4..7aaed0d 100644
--- a/myserver/src/base/unix_socket/Makefile.am
+++ b/myserver/src/base/unix_socket/Makefile.am
@@ -1,5 +1,5 @@
 lib_LIBRARIES = libunix_socket.a
 libunix_socket_a_SOURCES = unix_socket.cpp
 SUBDIRS =
-INCLUDES = $(all_includes)
+AM_CPPFLAGS = $(all_includes)
 
diff --git a/myserver/src/base/xml/Makefile.am b/myserver/src/base/xml/Makefile.am
index 446cf6e..05aea1d 100644
--- a/myserver/src/base/xml/Makefile.am
+++ b/myserver/src/base/xml/Makefile.am
@@ -1,5 +1,5 @@
 lib_LIBRARIES = libxml.a
 libxml_a_SOURCES = xml_parser.cpp
 SUBDIRS =
-INCLUDES = $(all_includes)
+AM_CPPFLAGS = $(all_includes)
 
diff --git a/myserver/src/conf/Makefile.am b/myserver/src/conf/Makefile.am
index daf1b1e..00cd655 100644
--- a/myserver/src/conf/Makefile.am
+++ b/myserver/src/conf/Makefile.am
@@ -1,7 +1,7 @@
 lib_LIBRARIES = libconf.a
 libconf_a_SOURCES = nodetree.cpp xml_conf.cpp
 SUBDIRS = mime security vhost
-INCLUDES = $(all_includes)
+AM_CPPFLAGS = $(all_includes)
 
 install:
 # Do not do anything.
diff --git a/myserver/src/conf/mime/Makefile.am b/myserver/src/conf/mime/Makefile.am
index 6dc4baf..a05690f 100644
--- a/myserver/src/conf/mime/Makefile.am
+++ b/myserver/src/conf/mime/Makefile.am
@@ -1,5 +1,5 @@
 lib_LIBRARIES = libmime.a
 libmime_a_SOURCES = mime_manager.cpp
 SUBDIRS =
-INCLUDES = $(all_includes)
+AM_CPPFLAGS = $(all_includes)
 
diff --git a/myserver/src/conf/security/Makefile.am b/myserver/src/conf/security/Makefile.am
index 935b9ee..ade38ec 100644
--- a/myserver/src/conf/security/Makefile.am
+++ b/myserver/src/conf/security/Makefile.am
@@ -1,4 +1,4 @@
 lib_LIBRARIES = libsecurity.a
 libsecurity_a_SOURCES = auth_domain.cpp auth_method.cpp auth_method_factory.cpp security_cache.cpp security_domain.cpp security_manager.cpp security_token.cpp validator.cpp validator_factory.cpp xml_validator.cpp
 SUBDIRS =
-INCLUDES = $(all_includes)
+AM_CPPFLAGS = $(all_includes)
diff --git a/myserver/src/conf/vhost/Makefile.am b/myserver/src/conf/vhost/Makefile.am
index 500358d..eae6e17 100644
--- a/myserver/src/conf/vhost/Makefile.am
+++ b/myserver/src/conf/vhost/Makefile.am
@@ -1,5 +1,5 @@
 lib_LIBRARIES = libvhost.a
 libvhost_a_SOURCES = vhost.cpp vhost_manager.cpp ip.cpp
 SUBDIRS =
-INCLUDES = $(all_includes)
+AM_CPPFLAGS = $(all_includes)
 
diff --git a/myserver/src/connection/Makefile.am b/myserver/src/connection/Makefile.am
index 62368ae..41c9695 100644
--- a/myserver/src/connection/Makefile.am
+++ b/myserver/src/connection/Makefile.am
@@ -1,7 +1,7 @@
 lib_LIBRARIES = libconnection.a
 libconnection_a_SOURCES = connection.cpp
 SUBDIRS =
-INCLUDES = $(all_includes)
+AM_CPPFLAGS = $(all_includes)
 
 install:
 # Do not do anything.
diff --git a/myserver/src/connections_scheduler/Makefile.am b/myserver/src/connections_scheduler/Makefile.am
index 5fde48a..ebcdf2e 100644
--- a/myserver/src/connections_scheduler/Makefile.am
+++ b/myserver/src/connections_scheduler/Makefile.am
@@ -1,7 +1,7 @@
 lib_LIBRARIES = libconnections_scheduler.a
 libconnections_scheduler_a_SOURCES = connections_scheduler.cpp listen_threads.cpp
 SUBDIRS =
-INCLUDES = $(all_includes)
+AM_CPPFLAGS = $(all_includes)
 
 install:
 # Do not do anything.
diff --git a/myserver/src/filter/Makefile.am b/myserver/src/filter/Makefile.am
index f877709..fdc8b39 100644
--- a/myserver/src/filter/Makefile.am
+++ b/myserver/src/filter/Makefile.am
@@ -2,7 +2,7 @@ lib_LIBRARIES = libfilter.a
 libfilter_a_SOURCES = filter.cpp filters_chain.cpp filters_factory.cpp memory_stream.cpp stream.cpp \
 			console.cpp
 SUBDIRS = gzip
-INCLUDES = $(all_includes)
+AM_CPPFLAGS = $(all_includes)
 
 install:
 # Do not do anything.
diff --git a/myserver/src/filter/gzip/Makefile.am b/myserver/src/filter/gzip/Makefile.am
index ab72823..8a6f8a7 100644
--- a/myserver/src/filter/gzip/Makefile.am
+++ b/myserver/src/filter/gzip/Makefile.am
@@ -1,5 +1,5 @@
 lib_LIBRARIES = libgzip.a
 libgzip_a_SOURCES = gzip.cpp gzip_decompress.cpp
 SUBDIRS =
-INCLUDES = $(all_includes)
+AM_CPPFLAGS = $(all_includes)
 
diff --git a/myserver/src/http_handler/Makefile.am b/myserver/src/http_handler/Makefile.am
index 88924f6..768d3ae 100644
--- a/myserver/src/http_handler/Makefile.am
+++ b/myserver/src/http_handler/Makefile.am
@@ -1,7 +1,7 @@
 lib_LIBRARIES = libhttp_handler.a
 libhttp_handler_a_SOURCES =
 SUBDIRS = cgi fastcgi http_dir http_file isapi mscgi proxy scgi wincgi
-INCLUDES = $(all_includes)
+AM_CPPFLAGS = $(all_includes)
 
 install:
 # Do not do anything.
diff --git a/myserver/src/http_handler/cgi/Makefile.am b/myserver/src/http_handler/cgi/Makefile.am
index bfdca15..29f3ce9 100644
--- a/myserver/src/http_handler/cgi/Makefile.am
+++ b/myserver/src/http_handler/cgi/Makefile.am
@@ -1,5 +1,5 @@
 lib_LIBRARIES = libcgi.a
 libcgi_a_SOURCES = cgi.cpp
 SUBDIRS =
-INCLUDES = $(all_includes)
+AM_CPPFLAGS = $(all_includes)
 
diff --git a/myserver/src/http_handler/fastcgi/Makefile.am b/myserver/src/http_handler/fastcgi/Makefile.am
index 1abe196..9050525 100644
--- a/myserver/src/http_handler/fastcgi/Makefile.am
+++ b/myserver/src/http_handler/fastcgi/Makefile.am
@@ -1,5 +1,5 @@
 lib_LIBRARIES = libfastcgi.a
 libfastcgi_a_SOURCES = fastcgi.cpp
 SUBDIRS =
-INCLUDES = $(all_includes)
+AM_CPPFLAGS = $(all_includes)
 
diff --git a/myserver/src/http_handler/http_dir/Makefile.am b/myserver/src/http_handler/http_dir/Makefile.am
index 29be925..1847a1a 100644
--- a/myserver/src/http_handler/http_dir/Makefile.am
+++ b/myserver/src/http_handler/http_dir/Makefile.am
@@ -1,5 +1,5 @@
 lib_LIBRARIES = libhttp_dir.a
 libhttp_dir_a_SOURCES = http_dir.cpp
 SUBDIRS =
-INCLUDES = $(all_includes)
+AM_CPPFLAGS = $(all_includes)
 
diff --git a/myserver/src/http_handler/http_file/Makefile.am b/myserver/src/http_handler/http_file/Makefile.am
index bdd220f..faa8264 100644
--- a/myserver/src/http_handler/http_file/Makefile.am
+++ b/myserver/src/http_handler/http_file/Makefile.am
@@ -1,5 +1,5 @@
 lib_LIBRARIES = libhttp_file.a
 libhttp_file_a_SOURCES = http_file.cpp
 SUBDIRS =
-INCLUDES = $(all_includes)
+AM_CPPFLAGS = $(all_includes)
 
diff --git a/myserver/src/http_handler/isapi/Makefile.am b/myserver/src/http_handler/isapi/Makefile.am
index 182b265..44e5b1c 100644
--- a/myserver/src/http_handler/isapi/Makefile.am
+++ b/myserver/src/http_handler/isapi/Makefile.am
@@ -1,5 +1,5 @@
 lib_LIBRARIES = libisapi.a
 libisapi_a_SOURCES = isapi.cpp
 SUBDIRS =
-INCLUDES = $(all_includes)
+AM_CPPFLAGS = $(all_includes)
 
diff --git a/myserver/src/http_handler/mscgi/Makefile.am b/myserver/src/http_handler/mscgi/Makefile.am
index 11754cb..30ba86f 100644
--- a/myserver/src/http_handler/mscgi/Makefile.am
+++ b/myserver/src/http_handler/mscgi/Makefile.am
@@ -1,5 +1,5 @@
 lib_LIBRARIES = libmscgi.a
 libmscgi_a_SOURCES = mscgi.cpp mscgi_manager.cpp
 SUBDIRS =
-INCLUDES = $(all_includes)
+AM_CPPFLAGS = $(all_includes)
 
diff --git a/myserver/src/http_handler/proxy/Makefile.am b/myserver/src/http_handler/proxy/Makefile.am
index 0988911..c36f808 100644
--- a/myserver/src/http_handler/proxy/Makefile.am
+++ b/myserver/src/http_handler/proxy/Makefile.am
@@ -1,5 +1,5 @@
 lib_LIBRARIES = libproxy.a
 libproxy_a_SOURCES = proxy.cpp
 SUBDIRS =
-INCLUDES = $(all_includes)
+AM_CPPFLAGS = $(all_includes)
 
diff --git a/myserver/src/http_handler/scgi/Makefile.am b/myserver/src/http_handler/scgi/Makefile.am
index 5837f96..667faf5 100644
--- a/myserver/src/http_handler/scgi/Makefile.am
+++ b/myserver/src/http_handler/scgi/Makefile.am
@@ -1,5 +1,5 @@
 lib_LIBRARIES = libscgi.a
 libscgi_a_SOURCES = scgi.cpp
 SUBDIRS =
-INCLUDES = $(all_includes)
+AM_CPPFLAGS = $(all_includes)
 
diff --git a/myserver/src/http_handler/wincgi/Makefile.am b/myserver/src/http_handler/wincgi/Makefile.am
index 4d9e0c7..ae01189 100644
--- a/myserver/src/http_handler/wincgi/Makefile.am
+++ b/myserver/src/http_handler/wincgi/Makefile.am
@@ -1,5 +1,5 @@
 lib_LIBRARIES = libwincgi.a
 libwincgi_a_SOURCES = wincgi.cpp
 SUBDIRS =
-INCLUDES = $(all_includes)
+AM_CPPFLAGS = $(all_includes)
 
diff --git a/myserver/src/log/Makefile.am b/myserver/src/log/Makefile.am
index d151f4b..62c95d1 100644
--- a/myserver/src/log/Makefile.am
+++ b/myserver/src/log/Makefile.am
@@ -1,7 +1,7 @@
 lib_LIBRARIES = liblog.a
 liblog_a_SOURCES = log_manager.cpp
 SUBDIRS = stream
-INCLUDES = $(all_includes)
+AM_CPPFLAGS = $(all_includes)
 
 install:
 # Do not do anything.
diff --git a/myserver/src/plugin/Makefile.am b/myserver/src/plugin/Makefile.am
index b14f28b..7638bc5 100644
--- a/myserver/src/plugin/Makefile.am
+++ b/myserver/src/plugin/Makefile.am
@@ -1,6 +1,6 @@
 lib_LIBRARIES = libplugin.a
 libplugin_a_SOURCES =  plugin.cpp plugin_info.cpp plugins_manager.cpp 
-INCLUDES = $(all_includes)
+AM_CPPFLAGS = $(all_includes)
 
 install:
 # Do not do anything.
diff --git a/myserver/src/protocol/Makefile.am b/myserver/src/protocol/Makefile.am
index 6ff0348..c6faa03 100644
--- a/myserver/src/protocol/Makefile.am
+++ b/myserver/src/protocol/Makefile.am
@@ -1,7 +1,7 @@
 lib_LIBRARIES = libprotocol.a
 libprotocol_a_SOURCES = protocol_buffer.cpp protocol.cpp protocols_manager.cpp url.cpp
 SUBDIRS = control ftp http https
-INCLUDES = $(all_includes)
+AM_CPPFLAGS = $(all_includes)
 
 install:
 # Do not do anything.
diff --git a/myserver/src/protocol/control/Makefile.am b/myserver/src/protocol/control/Makefile.am
index 730e575..aae9807 100644
--- a/myserver/src/protocol/control/Makefile.am
+++ b/myserver/src/protocol/control/Makefile.am
@@ -1,5 +1,5 @@
 lib_LIBRARIES = libcontrol.a
 libcontrol_a_SOURCES = control_header.cpp control_protocol.cpp
 SUBDIRS =
-INCLUDES = $(all_includes)
+AM_CPPFLAGS = $(all_includes)
 
diff --git a/myserver/src/protocol/ftp/Makefile.am b/myserver/src/protocol/ftp/Makefile.am
index 0f473d0..bb36ba7 100644
--- a/myserver/src/protocol/ftp/Makefile.am
+++ b/myserver/src/protocol/ftp/Makefile.am
@@ -1,7 +1,7 @@
 lib_LIBRARIES = libftp.a
 libftp_a_SOURCES = ftp.cpp ftp_lexer.cpp ftp_parser.cpp
 SUBDIRS =
-INCLUDES = $(all_includes)
+AM_CPPFLAGS = $(all_includes)
 
 build_parser: ftp_lexer.lpp ftp_parser.ypp
 	$(YACC) $(YFLAGS) --defines=../../../include/protocol/ftp/ftp_parser.h \
diff --git a/myserver/src/protocol/http/Makefile.am b/myserver/src/protocol/http/Makefile.am
index 41a3c10..98b480d 100644
--- a/myserver/src/protocol/http/Makefile.am
+++ b/myserver/src/protocol/http/Makefile.am
@@ -1,5 +1,5 @@
 lib_LIBRARIES = libhttp.a
 libhttp_a_SOURCES = http.cpp http_data_handler.cpp http_data_read.cpp http_errors.cpp http_headers.cpp http_request.cpp http_req_security_domain.cpp http_response.cpp http_thread_context.cpp dyn_http_manager.cpp dyn_http_manager_list.cpp dyn_http_command.cpp dyn_http_command_manager.cpp
 SUBDIRS = env
-INCLUDES = $(all_includes)
+AM_CPPFLAGS = $(all_includes)
 
diff --git a/myserver/src/protocol/http/env/Makefile.am b/myserver/src/protocol/http/env/Makefile.am
index db91f24..c8a1d92 100644
--- a/myserver/src/protocol/http/env/Makefile.am
+++ b/myserver/src/protocol/http/env/Makefile.am
@@ -1,5 +1,5 @@
 lib_LIBRARIES = libenv.a
 libenv_a_SOURCES = env.cpp
 SUBDIRS =
-INCLUDES = $(all_includes)
+AM_CPPFLAGS = $(all_includes)
 
diff --git a/myserver/src/protocol/https/Makefile.am b/myserver/src/protocol/https/Makefile.am
index 0930872..9e05691 100644
--- a/myserver/src/protocol/https/Makefile.am
+++ b/myserver/src/protocol/https/Makefile.am
@@ -1,5 +1,5 @@
 lib_LIBRARIES = libhttps.a
 libhttps_a_SOURCES = https.cpp
 SUBDIRS =
-INCLUDES = $(all_includes)
+AM_CPPFLAGS = $(all_includes)
 
diff --git a/myserver/src/server/Makefile.am b/myserver/src/server/Makefile.am
index fba8cf5..d74c9c6 100644
--- a/myserver/src/server/Makefile.am
+++ b/myserver/src/server/Makefile.am
@@ -1,7 +1,7 @@
 lib_LIBRARIES = libserver.a
 libserver_a_SOURCES = clients_thread.cpp server.cpp
 SUBDIRS =
-INCLUDES = $(all_includes)
+AM_CPPFLAGS = $(all_includes)
 
 install:
 # Do not do anything.



commit f42d766aca5c956573d6b9ec186e0bf4b6ef8d24
Author: Giuseppe Scrivano <gscrivano@gnu.org>
Date:   Fri Aug 21 14:46:07 2009 +0200

    Added missing files ABOUT-NLS and config.rpath

diff --git a/myserver/ABOUT-NLS b/myserver/ABOUT-NLS
new file mode 100644
index 0000000..83bc72e
--- /dev/null
+++ b/myserver/ABOUT-NLS
@@ -0,0 +1,1068 @@
+1 Notes on the Free Translation Project
+***************************************
+
+Free software is going international!  The Free Translation Project is
+a way to get maintainers of free software, translators, and users all
+together, so that free software will gradually become able to speak many
+languages.  A few packages already provide translations for their
+messages.
+
+   If you found this `ABOUT-NLS' file inside a distribution, you may
+assume that the distributed package does use GNU `gettext' internally,
+itself available at your nearest GNU archive site.  But you do _not_
+need to install GNU `gettext' prior to configuring, installing or using
+this package with messages translated.
+
+   Installers will find here some useful hints.  These notes also
+explain how users should proceed for getting the programs to use the
+available translations.  They tell how people wanting to contribute and
+work on translations can contact the appropriate team.
+
+   When reporting bugs in the `intl/' directory or bugs which may be
+related to internationalization, you should tell about the version of
+`gettext' which is used.  The information can be found in the
+`intl/VERSION' file, in internationalized packages.
+
+1.1 Quick configuration advice
+==============================
+
+If you want to exploit the full power of internationalization, you
+should configure it using
+
+     ./configure --with-included-gettext
+
+to force usage of internationalizing routines provided within this
+package, despite the existence of internationalizing capabilities in the
+operating system where this package is being installed.  So far, only
+the `gettext' implementation in the GNU C library version 2 provides as
+many features (such as locale alias, message inheritance, automatic
+charset conversion or plural form handling) as the implementation here.
+It is also not possible to offer this additional functionality on top
+of a `catgets' implementation.  Future versions of GNU `gettext' will
+very likely convey even more functionality.  So it might be a good idea
+to change to GNU `gettext' as soon as possible.
+
+   So you need _not_ provide this option if you are using GNU libc 2 or
+you have installed a recent copy of the GNU gettext package with the
+included `libintl'.
+
+1.2 INSTALL Matters
+===================
+
+Some packages are "localizable" when properly installed; the programs
+they contain can be made to speak your own native language.  Most such
+packages use GNU `gettext'.  Other packages have their own ways to
+internationalization, predating GNU `gettext'.
+
+   By default, this package will be installed to allow translation of
+messages.  It will automatically detect whether the system already
+provides the GNU `gettext' functions.  If not, the included GNU
+`gettext' library will be used.  This library is wholly contained
+within this package, usually in the `intl/' subdirectory, so prior
+installation of the GNU `gettext' package is _not_ required.
+Installers may use special options at configuration time for changing
+the default behaviour.  The commands:
+
+     ./configure --with-included-gettext
+     ./configure --disable-nls
+
+will, respectively, bypass any pre-existing `gettext' to use the
+internationalizing routines provided within this package, or else,
+_totally_ disable translation of messages.
+
+   When you already have GNU `gettext' installed on your system and run
+configure without an option for your new package, `configure' will
+probably detect the previously built and installed `libintl.a' file and
+will decide to use this.  This might not be desirable.  You should use
+the more recent version of the GNU `gettext' library.  I.e. if the file
+`intl/VERSION' shows that the library which comes with this package is
+more recent, you should use
+
+     ./configure --with-included-gettext
+
+to prevent auto-detection.
+
+   The configuration process will not test for the `catgets' function
+and therefore it will not be used.  The reason is that even an
+emulation of `gettext' on top of `catgets' could not provide all the
+extensions of the GNU `gettext' library.
+
+   Internationalized packages usually have many `po/LL.po' files, where
+LL gives an ISO 639 two-letter code identifying the language.  Unless
+translations have been forbidden at `configure' time by using the
+`--disable-nls' switch, all available translations are installed
+together with the package.  However, the environment variable `LINGUAS'
+may be set, prior to configuration, to limit the installed set.
+`LINGUAS' should then contain a space separated list of two-letter
+codes, stating which languages are allowed.
+
+1.3 Using This Package
+======================
+
+As a user, if your language has been installed for this package, you
+only have to set the `LANG' environment variable to the appropriate
+`LL_CC' combination.  If you happen to have the `LC_ALL' or some other
+`LC_xxx' environment variables set, you should unset them before
+setting `LANG', otherwise the setting of `LANG' will not have the
+desired effect.  Here `LL' is an ISO 639 two-letter language code, and
+`CC' is an ISO 3166 two-letter country code.  For example, let's
+suppose that you speak German and live in Germany.  At the shell
+prompt, merely execute `setenv LANG de_DE' (in `csh'),
+`export LANG; LANG=de_DE' (in `sh') or `export LANG=de_DE' (in `bash').
+This can be done from your `.login' or `.profile' file, once and for
+all.
+
+   You might think that the country code specification is redundant.
+But in fact, some languages have dialects in different countries.  For
+example, `de_AT' is used for Austria, and `pt_BR' for Brazil.  The
+country code serves to distinguish the dialects.
+
+   The locale naming convention of `LL_CC', with `LL' denoting the
+language and `CC' denoting the country, is the one use on systems based
+on GNU libc.  On other systems, some variations of this scheme are
+used, such as `LL' or `LL_CC.ENCODING'.  You can get the list of
+locales supported by your system for your language by running the
+command `locale -a | grep '^LL''.
+
+   Not all programs have translations for all languages.  By default, an
+English message is shown in place of a nonexistent translation.  If you
+understand other languages, you can set up a priority list of languages.
+This is done through a different environment variable, called
+`LANGUAGE'.  GNU `gettext' gives preference to `LANGUAGE' over `LANG'
+for the purpose of message handling, but you still need to have `LANG'
+set to the primary language; this is required by other parts of the
+system libraries.  For example, some Swedish users who would rather
+read translations in German than English for when Swedish is not
+available, set `LANGUAGE' to `sv:de' while leaving `LANG' to `sv_SE'.
+
+   Special advice for Norwegian users: The language code for Norwegian
+bokma*l changed from `no' to `nb' recently (in 2003).  During the
+transition period, while some message catalogs for this language are
+installed under `nb' and some older ones under `no', it's recommended
+for Norwegian users to set `LANGUAGE' to `nb:no' so that both newer and
+older translations are used.
+
+   In the `LANGUAGE' environment variable, but not in the `LANG'
+environment variable, `LL_CC' combinations can be abbreviated as `LL'
+to denote the language's main dialect.  For example, `de' is equivalent
+to `de_DE' (German as spoken in Germany), and `pt' to `pt_PT'
+(Portuguese as spoken in Portugal) in this context.
+
+1.4 Translating Teams
+=====================
+
+For the Free Translation Project to be a success, we need interested
+people who like their own language and write it well, and who are also
+able to synergize with other translators speaking the same language.
+Each translation team has its own mailing list.  The up-to-date list of
+teams can be found at the Free Translation Project's homepage,
+`http://translationproject.org/', in the "Teams" area.
+
+   If you'd like to volunteer to _work_ at translating messages, you
+should become a member of the translating team for your own language.
+The subscribing address is _not_ the same as the list itself, it has
+`-request' appended.  For example, speakers of Swedish can send a
+message to `sv-request@li.org', having this message body:
+
+     subscribe
+
+   Keep in mind that team members are expected to participate
+_actively_ in translations, or at solving translational difficulties,
+rather than merely lurking around.  If your team does not exist yet and
+you want to start one, or if you are unsure about what to do or how to
+get started, please write to `coordinator@translationproject.org' to
+reach the coordinator for all translator teams.
+
+   The English team is special.  It works at improving and uniformizing
+the terminology in use.  Proven linguistic skills are praised more than
+programming skills, here.
+
+1.5 Available Packages
+======================
+
+Languages are not equally supported in all packages.  The following
+matrix shows the current state of internationalization, as of November
+2007.  The matrix shows, in regard of each package, for which languages
+PO files have been submitted to translation coordination, with a
+translation percentage of at least 50%.
+
+     Ready PO files       af am ar az be bg bs ca cs cy da de el en en_GB eo
+                        +----------------------------------------------------+
+     Compendium         |                      []       [] []        []      |
+     a2ps               |             []                [] [] []     []      |
+     aegis              |                                  ()                |
+     ant-phone          |                                  ()                |
+     anubis             |                                  []                |
+     ap-utils           |                                                    |
+     aspell             |                      [] []    [] []        []      |
+     bash               |                                                 [] |
+     bfd                |                                                    |
+     bibshelf           |                                  []                |
+     binutils           |                                                    |
+     bison              |                               [] []                |
+     bison-runtime      |                                  []                |
+     bluez-pin          | []                      []       [] []          [] |
+     cflow              |                               []                   |
+     clisp              |                               [] []    []          |
+     console-tools      |                         []       []                |
+     coreutils          |                []    [] []       []                |
+     cpio               |                                                    |
+     cpplib             |                      []       [] []                |
+     cryptonit          |                                  []                |
+     dialog             |                                                    |
+     diffutils          |                      [] []    [] [] []          [] |
+     doodle             |                                  []                |
+     e2fsprogs          |                         []       []                |
+     enscript           |                      []       [] []        []      |
+     fetchmail          |                      []       [] () []     []      |
+     findutils          |                []                                  |
+     findutils_stable   |                []    []       []                   |
+     flex               |                      []       [] []                |
+     fslint             |                                                    |
+     gas                |                                                    |
+     gawk               |                      []       [] []                |
+     gcal               |                      []                            |
+     gcc                |                                  []                |
+     gettext-examples   | []                   []          [] []          [] |
+     gettext-runtime    |             []       []       [] []             [] |
+     gettext-tools      |                      []          []                |
+     gip                |                []                                  |
+     gliv               |                []                []                |
+     glunarclock        |                []                                  |
+     gmult              | []                               []                |
+     gnubiff            |                                  ()                |
+     gnucash            |                      [] []       () ()     []      |
+     gnuedu             |                                                    |
+     gnulib             |                []                                  |
+     gnunet             |                                                    |
+     gnunet-gtk         |                                                    |
+     gnutls             |                                  []                |
+     gpe-aerial         |                         []       []                |
+     gpe-beam           |                         []       []                |
+     gpe-calendar       |                                                    |
+     gpe-clock          |                         []       []                |
+     gpe-conf           |                         []       []                |
+     gpe-contacts       |                                                    |
+     gpe-edit           |                         []                         |
+     gpe-filemanager    |                                                    |
+     gpe-go             |                         []                         |
+     gpe-login          |                         []       []                |
+     gpe-ownerinfo      |                         []       []                |
+     gpe-package        |                                                    |
+     gpe-sketchbook     |                         []       []                |
+     gpe-su             |                         []       []                |
+     gpe-taskmanager    |                         []       []                |
+     gpe-timesheet      |                         []                         |
+     gpe-today          |                         []       []                |
+     gpe-todo           |                                                    |
+     gphoto2            |                         []    [] []        []      |
+     gprof              |                               [] []                |
+     gpsdrive           |                                                    |
+     gramadoir          | []                               []                |
+     grep               |                         []                      [] |
+     gretl              |                                  ()                |
+     gsasl              |                                                    |
+     gss                |                                                    |
+     gst-plugins-bad    |                []             []                   |
+     gst-plugins-base   |                []             []                   |
+     gst-plugins-good   |                []    []       []                   |
+     gst-plugins-ugly   |                []             []                   |
+     gstreamer          | []             []    [] []    [] []        []      |
+     gtick              |                                  ()                |
+     gtkam              |             []          []    [] []                |
+     gtkorphan          |                []                []                |
+     gtkspell           |             []                   [] []          [] |
+     gutenprint         |                               []                   |
+     hello              |                []    []       [] []             [] |
+     herrie             |                                  []                |
+     hylafax            |                                                    |
+     idutils            |                               [] []                |
+     indent             |                      [] []       []             [] |
+     iso_15924          |                                                    |
+     iso_3166           |       []    [] [] [] [] [] [] [] [] []          [] |
+     iso_3166_2         |                                                    |
+     iso_4217           |                         []    [] []                |
+     iso_639            |                         []    [] []             [] |
+     jpilot             |                         []                         |
+     jtag               |                                                    |
+     jwhois             |                                                    |
+     kbd                |                         []    [] [] []             |
+     keytouch           |                      []          []                |
+     keytouch-editor    |                                  []                |
+     keytouch-keyboa... |                      []                            |
+     latrine            |                                  ()                |
+     ld                 |                               []                   |
+     leafpad            |                []    [] []       [] []             |
+     libc               |                      [] []    [] []                |
+     libexif            |                                  []                |
+     libextractor       |                                  []                |
+     libgpewidget       |                         []    [] []                |
+     libgpg-error       |                                  []                |
+     libgphoto2         |                               [] []                |
+     libgphoto2_port    |                               [] []                |
+     libgsasl           |                                                    |
+     libiconv           |                                  []             [] |
+     libidn             |                         []    []                [] |
+     lifelines          |                               [] ()                |
+     lilypond           |                                  []                |
+     lingoteach         |                                                    |
+     lprng              |                                                    |
+     lynx               |                      [] []    [] []                |
+     m4                 |                         []    [] [] []             |
+     mailfromd          |                                                    |
+     mailutils          |                      []                            |
+     make               |                               [] []                |
+     man-db             |                      []       [] []                |
+     minicom            |                         []    [] []                |
+     nano               |                []    []          []                |
+     opcodes            |                                  []                |
+     parted             |                         []       []                |
+     pilot-qof          |                                                    |
+     popt               |                         []    [] []                |
+     psmisc             |                []                                  |
+     pwdutils           |                                                    |
+     qof                |                                                    |
+     radius             |                      []                            |
+     recode             |             []       []       [] [] []          [] |
+     rpm                |                               []                   |
+     screem             |                                                    |
+     scrollkeeper       |          [] []       [] [] [] [] []        []      |
+     sed                |                      []          []             [] |
+     shared-mime-info   |                []    [] []    [] () []     []   [] |
+     sharutils          |                []    [] []    [] [] []             |
+     shishi             |                                                    |
+     skencil            |                               [] ()                |
+     solfege            |                                                    |
+     soundtracker       |                               [] []                |
+     sp                 |                                  []                |
+     system-tools-ba... |       []       [] [] [] []    [] [] []     []      |
+     tar                |                []                []                |
+     texinfo            |                               [] []             [] |
+     tin                |                                  ()        ()      |
+     tuxpaint           | []             []             [] []        []   [] |
+     unicode-han-tra... |                                                    |
+     unicode-transla... |                                                    |
+     util-linux         |                      [] []    [] []                |
+     util-linux-ng      |                      [] []    [] []                |
+     vorbis-tools       |                         []                         |
+     wastesedge         |                                  ()                |
+     wdiff              |                      []       [] []        []      |
+     wget               |                      [] []       []                |
+     xchat              |             [] []    [] []       [] []     []      |
+     xkeyboard-config   |                []                                  |
+     xpad               |                []             []           []      |
+                        +----------------------------------------------------+
+                          af am ar az be bg bs ca cs cy da de el en en_GB eo
+                           6  0  2  1  8 26  2 40 48  2 56 88 15  1  15   18
+
+                          es et eu fa fi fr  ga gl gu he hi hr hu id is it
+                        +--------------------------------------------------+
+     Compendium         | []          [] []  []                []          |
+     a2ps               |    []       [] []                             () |
+     aegis              |                                                  |
+     ant-phone          |                []                                |
+     anubis             |                []                                |
+     ap-utils           |             [] []                                |
+     aspell             |                []  []                         [] |
+     bash               | []                                               |
+     bfd                | []          []                                   |
+     bibshelf           | []                 []                         [] |
+     binutils           | []          [] []                                |
+     bison              | [] []          []  []                   []    [] |
+     bison-runtime      |    []          []  []                   []    [] |
+     bluez-pin          |             [] []  []                [] []       |
+     cflow              |                    []                            |
+     clisp              | []             []                                |
+     console-tools      |                                                  |
+     coreutils          | [] []       [] []  []                []          |
+     cpio               | []             []  []                            |
+     cpplib             | []             []                                |
+     cryptonit          |                []                                |
+     dialog             |       []           []                         [] |
+     diffutils          | []          [] []  [] []    []       [] []    [] |
+     doodle             |                    []                         [] |
+     e2fsprogs          | []             []                             [] |
+     enscript           |                []  []             []             |
+     fetchmail          | []                                               |
+     findutils          |    []              []                []          |
+     findutils_stable   |    []          []  []                []          |
+     flex               | []             []  []                            |
+     fslint             |                                                  |
+     gas                | []             []                                |
+     gawk               | []             []  []       []                () |
+     gcal               | []             []                                |
+     gcc                | []                                               |
+     gettext-examples   | []          [] []  []                [] []    [] |
+     gettext-runtime    | []          [] []  []                   []    [] |
+     gettext-tools      | []    []       []                             [] |
+     gip                | []    []       []  []                            |
+     gliv               |                ()                                |
+     glunarclock        |             []     []                []          |
+     gmult              |       []       []                             [] |
+     gnubiff            |                ()                             () |
+     gnucash            | ()             ()                    ()          |
+     gnuedu             | []                                               |
+     gnulib             | [] []              []                            |
+     gnunet             |                                                  |
+     gnunet-gtk         |                                                  |
+     gnutls             |                                                  |
+     gpe-aerial         | []             []                                |
+     gpe-beam           | []             []                                |
+     gpe-calendar       |                                                  |
+     gpe-clock          | []          [] []                    []          |
+     gpe-conf           |                []                                |
+     gpe-contacts       | []             []                                |
+     gpe-edit           | []             []                    [] []       |
+     gpe-filemanager    | []                                               |
+     gpe-go             | []             []                    []          |
+     gpe-login          | []             []                    []          |
+     gpe-ownerinfo      | []          [] []                    [] []       |
+     gpe-package        | []                                               |
+     gpe-sketchbook     | []             []                                |
+     gpe-su             | []          [] []                    []          |
+     gpe-taskmanager    | []          [] []                                |
+     gpe-timesheet      | []             []  []                   []       |
+     gpe-today          | []          [] []  []                            |
+     gpe-todo           | []                                               |
+     gphoto2            | []          [] []                    []       [] |
+     gprof              | []          [] []  []                   []       |
+     gpsdrive           |    []                                            |
+     gramadoir          |                []  []                            |
+     grep               | []          []     []                            |
+     gretl              | []    []       []                             () |
+     gsasl              |                    []                   []       |
+     gss                |                []  []                            |
+     gst-plugins-bad    | []          []                       []       [] |
+     gst-plugins-base   | []          []                       []       [] |
+     gst-plugins-good   | []    []    []                       []       [] |
+     gst-plugins-ugly   | []          []                       []       [] |
+     gstreamer          |             []                       []       [] |
+     gtick              |             []     []                         [] |
+     gtkam              | []             []                    []       [] |
+     gtkorphan          |                []                             [] |
+     gtkspell           | []    []    [] []  []                []       [] |
+     gutenprint         |                                      []          |
+     hello              | [] [] [] [] [] []  [] []    []    [] [] []    [] |
+     herrie             |                    []                            |
+     hylafax            |                                                  |
+     idutils            |                []  []                [] []    [] |
+     indent             | [] [] []    [] []  [] []             [] []    [] |
+     iso_15924          |                []                                |
+     iso_3166           | [] [] []    [] []     [] [] [] [] [] [] []    [] |
+     iso_3166_2         |                []                                |
+     iso_4217           | [] []       [] []                    []       [] |
+     iso_639            | []       [] [] []  []                []          |
+     jpilot             | []             []                                |
+     jtag               |                []                                |
+     jwhois             | []             []                    [] []    [] |
+     kbd                | []             []                                |
+     keytouch           |                []  []                         [] |
+     keytouch-editor    |                    []                            |
+     keytouch-keyboa... |                    []                         [] |
+     latrine            |                    []                         [] |
+     ld                 | []          [] []  []                            |
+     leafpad            | []             []  []       []       []       [] |
+     libc               | []          [] []     []             []          |
+     libexif            | []                                               |
+     libextractor       |                    []                            |
+     libgpewidget       | []             []  []                [] []       |
+     libgpg-error       |                []                                |
+     libgphoto2         | []             []                             [] |
+     libgphoto2_port    |                []                             [] |
+     libgsasl           |                []  []                            |
+     libiconv           |    []       []     []                            |
+     libidn             |                []                             [] |
+     lifelines          |                ()                                |
+     lilypond           | []          [] []                                |
+     lingoteach         |                []                       []    [] |
+     lprng              |                                                  |
+     lynx               |    []                                []       [] |
+     m4                 |                []  [] []                []       |
+     mailfromd          |                                                  |
+     mailutils          | []             []                                |
+     make               | []          [] []  [] []    []    []    []       |
+     man-db             |                                               [] |
+     minicom            | []          [] []                    []          |
+     nano               | []    []       []  [] []             []       [] |
+     opcodes            | []          [] []  []                            |
+     parted             |                []                       []    [] |
+     pilot-qof          |                                                  |
+     popt               |                []  [] []                   []    |
+     psmisc             |                                      []       [] |
+     pwdutils           |                                                  |
+     qof                |                                         []       |
+     radius             | []             []                                |
+     recode             | []             []  [] []    []       [] []    [] |
+     rpm                |                []                       []       |
+     screem             |                                                  |
+     scrollkeeper       | []          []                       []          |
+     sed                | [] []          []  []                []          |
+     shared-mime-info   | []    []    [] []                    []       [] |
+     sharutils          | [] []       [] []  [] []             []       [] |
+     shishi             |                []                                |
+     skencil            | []             []                                |
+     solfege            |                                               [] |
+     soundtracker       | []             []                             [] |
+     sp                 |                []                                |
+     system-tools-ba... | []    []    [] []  []             [] [] []    [] |
+     tar                |    [] []    []     []                []          |
+     texinfo            |                []           []       []          |
+     tin                |    []          ()                                |
+     tuxpaint           |                    []                []          |
+     unicode-han-tra... |                                                  |
+     unicode-transla... |                []  []                            |
+     util-linux         | [] []       [] []                    [] []    [] |
+     util-linux-ng      | [] []       [] []                    [] []    [] |
+     vorbis-tools       |                                                  |
+     wastesedge         |                ()                                |
+     wdiff              | [] []          []  [] []             [] []    [] |
+     wget               |    []       [] []  []             [] [] []    [] |
+     xchat              | []          [] []        []    []    []       [] |
+     xkeyboard-config   | []          [] []                    []          |
+     xpad               | []                 []                []          |
+                        +--------------------------------------------------+
+                          es et eu fa fi fr  ga gl gu he hi hr hu id is it
+                          85 22 14  2 48 101 61 12  2  8  2  6 53 29  1 52
+
+                          ja ka ko ku ky lg lt lv mk mn ms mt nb ne nl  nn
+                        +--------------------------------------------------+
+     Compendium         |                                           []     |
+     a2ps               |       ()                      []          []     |
+     aegis              |                                           ()     |
+     ant-phone          |                                           []     |
+     anubis             |                               []    []    []     |
+     ap-utils           |                               []                 |
+     aspell             |                            []             []     |
+     bash               |                                           []     |
+     bfd                |                                                  |
+     bibshelf           |                               []                 |
+     binutils           |                                                  |
+     bison              |                               []    []    []     |
+     bison-runtime      |                               []    []    []     |
+     bluez-pin          |          []                   []          []     |
+     cflow              |                                                  |
+     clisp              |                                           []     |
+     console-tools      |                                                  |
+     coreutils          |                                           []     |
+     cpio               |                                           []     |
+     cpplib             |                                           []     |
+     cryptonit          |                                           []     |
+     dialog             |                               []          []     |
+     diffutils          | []                            []          []     |
+     doodle             |                                                  |
+     e2fsprogs          |                                           []     |
+     enscript           |                                           []     |
+     fetchmail          | []                                        []     |
+     findutils          |                                           []     |
+     findutils_stable   |                                           []     |
+     flex               |       []                                  []     |
+     fslint             |                                                  |
+     gas                |                                                  |
+     gawk               | []                                        []     |
+     gcal               |                                                  |
+     gcc                |                                                  |
+     gettext-examples   | []                            []          []     |
+     gettext-runtime    | []    []                                  []     |
+     gettext-tools      | []    []                                         |
+     gip                |                               []          []     |
+     gliv               |                                           []     |
+     glunarclock        |                               []          []     |
+     gmult              | []                            []          []     |
+     gnubiff            |                                                  |
+     gnucash            | ()                                  () ()        |
+     gnuedu             |                                                  |
+     gnulib             | []                                        []     |
+     gnunet             |                                                  |
+     gnunet-gtk         |                                                  |
+     gnutls             |                               []                 |
+     gpe-aerial         |                                           []     |
+     gpe-beam           |                                           []     |
+     gpe-calendar       | []                                               |
+     gpe-clock          | []    []                                  []     |
+     gpe-conf           | []    []                                  []     |
+     gpe-contacts       |       []                                         |
+     gpe-edit           | []    []                                  []     |
+     gpe-filemanager    | []    []                                         |
+     gpe-go             | []    []                                  []     |
+     gpe-login          | []    []                                  []     |
+     gpe-ownerinfo      | []                                        []     |
+     gpe-package        | []    []                                         |
+     gpe-sketchbook     |       []                                  []     |
+     gpe-su             | []    []                                  []     |
+     gpe-taskmanager    | []    [] []                               []     |
+     gpe-timesheet      |                                           []     |
+     gpe-today          | []                                        []     |
+     gpe-todo           | []                                               |
+     gphoto2            | []                                        []     |
+     gprof              |                               []                 |
+     gpsdrive           |                                           []     |
+     gramadoir          |                                           ()     |
+     grep               |             []                            []     |
+     gretl              |                                                  |
+     gsasl              |                                           []     |
+     gss                |                                                  |
+     gst-plugins-bad    |                                           []     |
+     gst-plugins-base   |                                           []     |
+     gst-plugins-good   |                                           []     |
+     gst-plugins-ugly   |                                           []     |
+     gstreamer          |                                           []     |
+     gtick              |                                           []     |
+     gtkam              | []                                        []     |
+     gtkorphan          |                                           []     |
+     gtkspell           |                            []             []     |
+     gutenprint         |                                           []     |
+     hello              | [] [] []                      []    []    []  [] |
+     herrie             |                                           []     |
+     hylafax            |                                                  |
+     idutils            |                                           []     |
+     indent             | []                                        []     |
+     iso_15924          |                                           []     |
+     iso_3166           | []    [] []       []    []          []    []  [] |
+     iso_3166_2         |                                           []     |
+     iso_4217           | []                []                      []     |
+     iso_639            | []                []                      []  [] |
+     jpilot             | ()                                        ()     |
+     jtag               |                                                  |
+     jwhois             |                                           []     |
+     kbd                |                                           []     |
+     keytouch           |                                           []     |
+     keytouch-editor    |                                           []     |
+     keytouch-keyboa... |                                                  |
+     latrine            |                                           []     |
+     ld                 |                                                  |
+     leafpad            | []                []                             |
+     libc               | []    []                                  []     |
+     libexif            |                                                  |
+     libextractor       |                                                  |
+     libgpewidget       |                                           []     |
+     libgpg-error       |                                                  |
+     libgphoto2         | []                                               |
+     libgphoto2_port    | []                                               |
+     libgsasl           |                                           []     |
+     libiconv           |                                           []     |
+     libidn             | []                                        []     |
+     lifelines          |                                           []     |
+     lilypond           |                                           []     |
+     lingoteach         |                                           []     |
+     lprng              |                                                  |
+     lynx               | []                                        []     |
+     m4                 | []                                        []     |
+     mailfromd          |                                                  |
+     mailutils          |                                                  |
+     make               | []    []                                  []     |
+     man-db             |                                                  |
+     minicom            | []                                               |
+     nano               |                               []    []    []     |
+     opcodes            |                                           []     |
+     parted             | []                                        []     |
+     pilot-qof          |                                                  |
+     popt               | []    []                                  []     |
+     psmisc             | []                                  []    []     |
+     pwdutils           |                                                  |
+     qof                |                                                  |
+     radius             |                                                  |
+     recode             |                                           []     |
+     rpm                | []    []                                         |
+     screem             | []                                               |
+     scrollkeeper       |                                     [] [] []  [] |
+     sed                | []                                        []     |
+     shared-mime-info   | []    []          []          []    []    []  [] |
+     sharutils          | []                                        []     |
+     shishi             |                                                  |
+     skencil            |                                                  |
+     solfege            |                                     ()        () |
+     soundtracker       |                                                  |
+     sp                 | ()                                               |
+     system-tools-ba... | []    []          []                      []     |
+     tar                | []          []                            []     |
+     texinfo            |                                     []    []     |
+     tin                |                                                  |
+     tuxpaint           |                                     ()    []  [] |
+     unicode-han-tra... |                                                  |
+     unicode-transla... |                                                  |
+     util-linux         | []                                        []     |
+     util-linux-ng      | []                                        []     |
+     vorbis-tools       |                                                  |
+     wastesedge         |                                           []     |
+     wdiff              |                               []    []           |
+     wget               | []                                        []     |
+     xchat              | []    []                []                []     |
+     xkeyboard-config   |    [] []                                  []     |
+     xpad               |       []                      []          []     |
+                        +--------------------------------------------------+
+                          ja ka ko ku ky lg lt lv mk mn ms mt nb ne nl  nn
+                          51  2 25  3  2  0  6  0  2  2 20  0 11  1 103  6
+
+                          or pa pl pt pt_BR rm ro ru rw sk sl sq sr sv  ta
+                        +--------------------------------------------------+
+     Compendium         |          []  []      []       []          []     |
+     a2ps               |       ()     []      [] []       []    [] []     |
+     aegis              |                      () ()                       |
+     ant-phone          |                      []                   []     |
+     anubis             |       []             [] []                       |
+     ap-utils           |       ()                                         |
+     aspell             |                      [] []    []                 |
+     bash               |       []                      []                 |
+     bfd                |                                                  |
+     bibshelf           |                                           []     |
+     binutils           |                         []    []                 |
+     bison              |       []     []      [] []                []     |
+     bison-runtime      |       []     []      []          []       []     |
+     bluez-pin          |       []     []   [] [] []    [] []    [] []     |
+     cflow              |       []                                         |
+     clisp              |                         []                       |
+     console-tools      |                         []                       |
+     coreutils          |       []                []       []       []     |
+     cpio               |       []                []                []     |
+     cpplib             |                                           []     |
+     cryptonit          |              []                           []     |
+     dialog             |                                           []     |
+     diffutils          |       []     []      [] []             [] []     |
+     doodle             |                                     []    []     |
+     e2fsprogs          |       []                                  []     |
+     enscript           |              []      [] []       []       []     |
+     fetchmail          |       []                []          []           |
+     findutils          |       [] []                               []     |
+     findutils_stable   |       [] []          []       [] []       []     |
+     flex               |       []     []      [] []                []     |
+     fslint             |                                           []     |
+     gas                |                                                  |
+     gawk               |       []     []      []                   []     |
+     gcal               |                                           []     |
+     gcc                |                                        [] []     |
+     gettext-examples   |       [] []          [] []    [] []    [] []     |
+     gettext-runtime    |       [] []          [] []    [] []    [] []     |
+     gettext-tools      |       []             [] []    [] []    [] []     |
+     gip                |                   []          []       [] []     |
+     gliv               |       []     []      [] []    []          []     |
+     glunarclock        |              []      [] []    []       [] []     |
+     gmult              |                   [] []                [] []     |
+     gnubiff            |                      ()                   []     |
+     gnucash            |       ()                                  []     |
+     gnuedu             |                                                  |
+     gnulib             |       []                         []       []     |
+     gnunet             |                                                  |
+     gnunet-gtk         |                                           []     |
+     gnutls             |       []                                  []     |
+     gpe-aerial         |          []  []      [] []       []    [] []     |
+     gpe-beam           |          []  []      [] []       []    [] []     |
+     gpe-calendar       |                         []       []    [] []     |
+     gpe-clock          |          []  []      [] []    [] []    [] []     |
+     gpe-conf           |          []  []      [] []    [] []       []     |
+     gpe-contacts       |                      [] []       []    [] []     |
+     gpe-edit           |       [] []  []      [] []    [] []    [] []     |
+     gpe-filemanager    |                                  []       []     |
+     gpe-go             |       []     []      [] []    [] []    [] []     |
+     gpe-login          |          []  []      [] []    [] []    [] []     |
+     gpe-ownerinfo      |          []  []      [] []    [] []    [] []     |
+     gpe-package        |                                  []       []     |
+     gpe-sketchbook     |          []  []      [] []    [] []    [] []     |
+     gpe-su             |          []  []      [] []    [] []    [] []     |
+     gpe-taskmanager    |          []  []      [] []    [] []    [] []     |
+     gpe-timesheet      |          []  []      [] []    [] []    [] []     |
+     gpe-today          |          []  []      [] []    [] []    [] []     |
+     gpe-todo           |                         []       []    [] []     |
+     gphoto2            |    [] []             []       []       [] []     |
+     gprof              |              []      []                   []     |
+     gpsdrive           |                         []                []     |
+     gramadoir          |                               []          []     |
+     grep               |       []                      [] []       []     |
+     gretl              |       [] []  []                                  |
+     gsasl              |       []                               [] []     |
+     gss                |       []             []       []          []     |
+     gst-plugins-bad    |       []     []                           []     |
+     gst-plugins-base   |       []                                  []     |
+     gst-plugins-good   |       []                                  []     |
+     gst-plugins-ugly   |       []     []                           []     |
+     gstreamer          |       []                            [] [] []     |
+     gtick              |                         []                       |
+     gtkam              |    [] []     []         []                []     |
+     gtkorphan          |                                           []     |
+     gtkspell           |              []   [] [] []    [] []    [] []     |
+     gutenprint         |                                           []     |
+     hello              |       []     []      [] []    [] []    [] []     |
+     herrie             |       []                []                []     |
+     hylafax            |                                                  |
+     idutils            |       []     []      [] []                []     |
+     indent             |       []     []      [] []    []       [] []     |
+     iso_15924          |                                                  |
+     iso_3166           |    [] [] []  []      [] [] [] [] [] [] [] []  [] |
+     iso_3166_2         |                                                  |
+     iso_4217           |       [] []             [] []    []    [] []     |
+     iso_639            |       []                [] [] [] []    [] []     |
+     jpilot             |                                                  |
+     jtag               |                               []                 |
+     jwhois             |       []     []      []                   []     |
+     kbd                |       []             []                   []     |
+     keytouch           |                                           []     |
+     keytouch-editor    |                                           []     |
+     keytouch-keyboa... |                                           []     |
+     latrine            |                                                  |
+     ld                 |                                           []     |
+     leafpad            |       [] []             []    []          []  [] |
+     libc               |       []                []    []          []     |
+     libexif            |       []                      []                 |
+     libextractor       |                      []                   []     |
+     libgpewidget       |       [] []  []      []       [] []    [] []     |
+     libgpg-error       |       []             []                   []     |
+     libgphoto2         |       []                                         |
+     libgphoto2_port    |       []                []                []     |
+     libgsasl           |       []             []                [] []     |
+     libiconv           |                                  []    [] []     |
+     libidn             |       []                               [] ()     |
+     lifelines          |       []                                  []     |
+     lilypond           |                                                  |
+     lingoteach         |              []                                  |
+     lprng              |       []                                         |
+     lynx               |              []         []                []     |
+     m4                 |       []     []      [] []                []     |
+     mailfromd          |       []                                         |
+     mailutils          |       []                []                []     |
+     make               |       []     []         []                []     |
+     man-db             |       []             [] []                []     |
+     minicom            |       []     []      [] []                []     |
+     nano               |              []      [] []                []     |
+     opcodes            |                      []                   []     |
+     parted             |       []                                         |
+     pilot-qof          |                                                  |
+     popt               |       [] []             []                []     |
+     psmisc             |       []                                  []     |
+     pwdutils           |       []                                  []     |
+     qof                |              []                           []     |
+     radius             |       []                []                       |
+     recode             |       [] []  []      [] []       []       []     |
+     rpm                |       [] []             []                []     |
+     screem             |                                                  |
+     scrollkeeper       |       []             [] []    []    [] [] []     |
+     sed                |       [] []  []      [] []    [] []    [] []     |
+     shared-mime-info   |       [] []  []                     [] [] []     |
+     sharutils          |       []                []             [] []     |
+     shishi             |       []                                         |
+     skencil            |          []  []                           []     |
+     solfege            |              []                                  |
+     soundtracker       |                               []          []     |
+     sp                 |                                                  |
+     system-tools-ba... |    [] [] []  []      []             [] [] []  [] |
+     tar                |       []                []       []       []     |
+     texinfo            |       []             [] []                []     |
+     tin                |                         ()                       |
+     tuxpaint           |       [] []                      [] [] [] []     |
+     unicode-han-tra... |                                                  |
+     unicode-transla... |                                                  |
+     util-linux         |              []         []       []       []     |
+     util-linux-ng      |              []         []       []       []     |
+     vorbis-tools       |                         []                       |
+     wastesedge         |                                                  |
+     wdiff              |       []     []      [] []    [] []       []     |
+     wget               |          []             []    []          []     |
+     xchat              |    []                   []    [] [] [] [] []     |
+     xkeyboard-config   |                               [] []       []     |
+     xpad               |                               [] []       []     |
+                        +--------------------------------------------------+
+                          or pa pl pt pt_BR rm ro ru rw sk sl sq sr sv  ta
+                           0  5 77 31  53    4 58 72  3 45 46  9 45 122  3
+
+                          tg th tk tr uk ven vi  wa xh zh_CN zh_HK zh_TW zu
+                        +---------------------------------------------------+
+     Compendium         |          []        []         []          []      | 19
+     a2ps               |          [] []     []                             | 19
+     aegis              |                    []                             |  1
+     ant-phone          |          []        []                             |  6
+     anubis             |          [] []     []                             | 11
+     ap-utils           |             ()     []                             |  4
+     aspell             |             []     []  []                         | 16
+     bash               |          []                                       |  6
+     bfd                |                                                   |  2
+     bibshelf           |                    []                             |  7
+     binutils           |          [] []     []                     []      |  9
+     bison              |          [] []     []                     []      | 20
+     bison-runtime      |             []     []         []          []      | 18
+     bluez-pin          |          [] []     []  []     []          []      | 28
+     cflow              |             []     []                             |  5
+     clisp              |                                                   |  9
+     console-tools      |          []        []                             |  5
+     coreutils          |          [] []     []                             | 18
+     cpio               |          [] []     []         []                  | 11
+     cpplib             |          [] []     []         []          []      | 12
+     cryptonit          |                    []                             |  6
+     dialog             |                    []  []     []                  |  9
+     diffutils          |          [] []     []         []          []      | 29
+     doodle             |                    []                             |  6
+     e2fsprogs          |          []        []                             | 10
+     enscript           |          [] []     []                             | 16
+     fetchmail          |          []        []                             | 12
+     findutils          |          [] []     []                             | 11
+     findutils_stable   |          [] []     []                     []      | 18
+     flex               |          []        []                             | 15
+     fslint             |                    []                             |  2
+     gas                |          []                                       |  3
+     gawk               |          []        []         []                  | 16
+     gcal               |          []                                       |  5
+     gcc                |          []                   []          []      |  7
+     gettext-examples   |          [] []     []         []    []    []      | 29
+     gettext-runtime    |          [] []     []         []    []    []      | 28
+     gettext-tools      |          [] []     []         []          []      | 20
+     gip                |                    []                     []      | 13
+     gliv               |          []        []                             | 11
+     glunarclock        |                    []  []                 []      | 15
+     gmult              |          []        []         []          []      | 16
+     gnubiff            |                    []                             |  2
+     gnucash            |          () []                                    |  5
+     gnuedu             |                    []                             |  2
+     gnulib             |                    []                             | 10
+     gnunet             |                                                   |  0
+     gnunet-gtk         |          []        []                             |  3
+     gnutls             |                                                   |  4
+     gpe-aerial         |                    []         []                  | 14
+     gpe-beam           |                    []         []                  | 14
+     gpe-calendar       |                    []  []                         |  7
+     gpe-clock          |          []        []  []     []                  | 21
+     gpe-conf           |                    []  []     []                  | 16
+     gpe-contacts       |                    []         []                  | 10
+     gpe-edit           |          []        []  []     []          []      | 22
+     gpe-filemanager    |                    []  []                         |  7
+     gpe-go             |          []        []  []     []                  | 19
+     gpe-login          |          []        []  []     []          []      | 21
+     gpe-ownerinfo      |          []        []         []          []      | 21
+     gpe-package        |                    []                             |  6
+     gpe-sketchbook     |          []        []                             | 16
+     gpe-su             |          []        []  []     []                  | 21
+     gpe-taskmanager    |          []        []  []     []                  | 21
+     gpe-timesheet      |          []        []         []          []      | 18
+     gpe-today          |          []        []  []     []          []      | 21
+     gpe-todo           |                    []  []                         |  8
+     gphoto2            |             []     []         []          []      | 21
+     gprof              |          []        []                             | 13
+     gpsdrive           |                    []                             |  5
+     gramadoir          |                    []                             |  7
+     grep               |                    []                             | 12
+     gretl              |                                                   |  6
+     gsasl              |                    []         []          []      |  9
+     gss                |                    []                             |  7
+     gst-plugins-bad    |             []     []         []                  | 13
+     gst-plugins-base   |             []     []                             | 11
+     gst-plugins-good   |             []     []         []    []    []      | 16
+     gst-plugins-ugly   |             []     []         []                  | 13
+     gstreamer          |          [] []     []                             | 18
+     gtick              |             []     []                             |  7
+     gtkam              |                    []                             | 16
+     gtkorphan          |                    []                             |  7
+     gtkspell           |             []     []  []     []    []    []      | 27
+     gutenprint         |                                                   |  4
+     hello              |          [] []     []         []          []      | 38
+     herrie             |          []        []                             |  8
+     hylafax            |                                                   |  0
+     idutils            |          []        []                             | 15
+     indent             |          [] []     []         []          []      | 28
+     iso_15924          |                    []         []                  |  4
+     iso_3166           |    [] [] [] []     []  []     []    []    []      | 54
+     iso_3166_2         |                    []         []                  |  4
+     iso_4217           |    []    []        []         []    []            | 24
+     iso_639            |             []     []  []     []    []            | 26
+     jpilot             |          [] []     []         []                  |  7
+     jtag               |                    []                             |  3
+     jwhois             |          []        []                     []      | 13
+     kbd                |          [] []     []                             | 13
+     keytouch           |                    []                             |  8
+     keytouch-editor    |                    []                             |  5
+     keytouch-keyboa... |                    []                             |  5
+     latrine            |          []        []                             |  5
+     ld                 |          []        []         []          []      | 10
+     leafpad            |          [] []     []         []          []      | 24
+     libc               |          []                   []          []      | 19
+     libexif            |                    []                             |  5
+     libextractor       |                    []                             |  5
+     libgpewidget       |                    []  []     []                  | 20
+     libgpg-error       |                    []                             |  6
+     libgphoto2         |             []     []                             |  9
+     libgphoto2_port    |             []     []                     []      | 11
+     libgsasl           |                    []                             |  8
+     libiconv           |                    []  []                         | 11
+     libidn             |                    []         []                  | 11
+     lifelines          |                                                   |  4
+     lilypond           |                    []                             |  6
+     lingoteach         |                    []                             |  6
+     lprng              |                    []                             |  2
+     lynx               |          [] []     []                             | 15
+     m4                 |                    []         []          []      | 18
+     mailfromd          |             []     []                             |  3
+     mailutils          |             []     []                             |  8
+     make               |          []        []         []                  | 20
+     man-db             |                    []                             |  9
+     minicom            |                    []                             | 14
+     nano               |                    []         []          []      | 20
+     opcodes            |          []        []                             | 10
+     parted             |          [] []                            []      | 11
+     pilot-qof          |                    []                             |  1
+     popt               |          []        []         []          []      | 18
+     psmisc             |                    []         []                  | 10
+     pwdutils           |                    []                             |  3
+     qof                |                    []                             |  4
+     radius             |             []     []                             |  7
+     recode             |          []        []         []                  | 25
+     rpm                |          [] []     []                     []      | 13
+     screem             |                    []                             |  2
+     scrollkeeper       |          [] []     []                     []      | 26
+     sed                |          []        []         []          []      | 23
+     shared-mime-info   |             []     []         []                  | 29
+     sharutils          |          []        []                     []      | 23
+     shishi             |                    []                             |  3
+     skencil            |                    []                             |  7
+     solfege            |                    []                             |  3
+     soundtracker       |          []        []                             |  9
+     sp                 |          []                                       |  3
+     system-tools-ba... |    []    [] []     []     []  []          []      | 38
+     tar                |          [] []     []                             | 17
+     texinfo            |          []        []         []                  | 15
+     tin                |                                                   |  1
+     tuxpaint           |                    []  []                 []      | 19
+     unicode-han-tra... |                                                   |  0
+     unicode-transla... |                                                   |  2
+     util-linux         |          [] []     []                             | 20
+     util-linux-ng      |          [] []     []                             | 20
+     vorbis-tools       |             []     []                             |  4
+     wastesedge         |                                                   |  1
+     wdiff              |          []        []                             | 23
+     wget               |          []        []                     []      | 20
+     xchat              |             []     []         []          []      | 29
+     xkeyboard-config   |          [] []     []                             | 14
+     xpad               |                    []         []          []      | 15
+                        +---------------------------------------------------+
+       76 teams           tg th tk tr uk ven vi  wa xh zh_CN zh_HK zh_TW zu
+      163 domains          0  3  1 74 51  0  143 21  1  57     7    45    0  2036
+
+   Some counters in the preceding matrix are higher than the number of
+visible blocks let us expect.  This is because a few extra PO files are
+used for implementing regional variants of languages, or language
+dialects.
+
+   For a PO file in the matrix above to be effective, the package to
+which it applies should also have been internationalized and
+distributed as such by its maintainer.  There might be an observable
+lag between the mere existence a PO file and its wide availability in a
+distribution.
+
+   If November 2007 seems to be old, you may fetch a more recent copy
+of this `ABOUT-NLS' file on most GNU archive sites.  The most
+up-to-date matrix with full percentage details can be found at
+`http://translationproject.org/extra/matrix.html'.
+
+1.6 Using `gettext' in new packages
+===================================
+
+If you are writing a freely available program and want to
+internationalize it you are welcome to use GNU `gettext' in your
+package.  Of course you have to respect the GNU Library General Public
+License which covers the use of the GNU `gettext' library.  This means
+in particular that even non-free programs can use `libintl' as a shared
+library, whereas only free software can use `libintl' as a static
+library or use modified versions of `libintl'.
+
+   Once the sources are changed appropriately and the setup can handle
+the use of `gettext' the only thing missing are the translations.  The
+Free Translation Project is also available for packages which are not
+developed inside the GNU project.  Therefore the information given above
+applies also for every other Free Software Project.  Contact
+`coordinator@translationproject.org' to make the `.pot' files available
+to the translation teams.
+
diff --git a/myserver/config.rpath b/myserver/config.rpath
new file mode 100755
index 0000000..c547c68
--- /dev/null
+++ b/myserver/config.rpath
@@ -0,0 +1,666 @@
+#! /bin/sh
+# Output a system dependent set of variables, describing how to set the
+# run time search path of shared libraries in an executable.
+#
+#   Copyright 1996-2007 Free Software Foundation, Inc.
+#   Taken from GNU libtool, 2001
+#   Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
+#
+#   This file is free software; the Free Software Foundation gives
+#   unlimited permission to copy and/or distribute it, with or without
+#   modifications, as long as this notice is preserved.
+#
+# The first argument passed to this file is the canonical host specification,
+#    CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
+# or
+#    CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
+# The environment variables CC, GCC, LDFLAGS, LD, with_gnu_ld
+# should be set by the caller.
+#
+# The set of defined variables is at the end of this script.
+
+# Known limitations:
+# - On IRIX 6.5 with CC="cc", the run time search patch must not be longer
+#   than 256 bytes, otherwise the compiler driver will dump core. The only
+#   known workaround is to choose shorter directory names for the build
+#   directory and/or the installation directory.
+
+# All known linkers require a `.a' archive for static linking (except MSVC,
+# which needs '.lib').
+libext=a
+shrext=.so
+
+host="$1"
+host_cpu=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
+host_vendor=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
+host_os=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
+
+# Code taken from libtool.m4's _LT_CC_BASENAME.
+
+for cc_temp in $CC""; do
+  case $cc_temp in
+    compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
+    distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
+    \-*) ;;
+    *) break;;
+  esac
+done
+cc_basename=`echo "$cc_temp" | sed -e 's%^.*/%%'`
+
+# Code taken from libtool.m4's AC_LIBTOOL_PROG_COMPILER_PIC.
+
+wl=
+if test "$GCC" = yes; then
+  wl='-Wl,'
+else
+  case "$host_os" in
+    aix*)
+      wl='-Wl,'
+      ;;
+    darwin*)
+      case $cc_basename in
+        xlc*)
+          wl='-Wl,'
+          ;;
+      esac
+      ;;
+    mingw* | cygwin* | pw32* | os2*)
+      ;;
+    hpux9* | hpux10* | hpux11*)
+      wl='-Wl,'
+      ;;
+    irix5* | irix6* | nonstopux*)
+      wl='-Wl,'
+      ;;
+    newsos6)
+      ;;
+    linux* | k*bsd*-gnu)
+      case $cc_basename in
+        icc* | ecc*)
+          wl='-Wl,'
+          ;;
+        pgcc | pgf77 | pgf90)
+          wl='-Wl,'
+          ;;
+        ccc*)
+          wl='-Wl,'
+          ;;
+        como)
+          wl='-lopt='
+          ;;
+        *)
+          case `$CC -V 2>&1 | sed 5q` in
+            *Sun\ C*)
+              wl='-Wl,'
+              ;;
+          esac
+          ;;
+      esac
+      ;;
+    osf3* | osf4* | osf5*)
+      wl='-Wl,'
+      ;;
+    rdos*)
+      ;;
+    solaris*)
+      wl='-Wl,'
+      ;;
+    sunos4*)
+      wl='-Qoption ld '
+      ;;
+    sysv4 | sysv4.2uw2* | sysv4.3*)
+      wl='-Wl,'
+      ;;
+    sysv4*MP*)
+      ;;
+    sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
+      wl='-Wl,'
+      ;;
+    unicos*)
+      wl='-Wl,'
+      ;;
+    uts4*)
+      ;;
+  esac
+fi
+
+# Code taken from libtool.m4's AC_LIBTOOL_PROG_LD_SHLIBS.
+
+hardcode_libdir_flag_spec=
+hardcode_libdir_separator=
+hardcode_direct=no
+hardcode_minus_L=no
+
+case "$host_os" in
+  cygwin* | mingw* | pw32*)
+    # FIXME: the MSVC++ port hasn't been tested in a loooong time
+    # When not using gcc, we currently assume that we are using
+    # Microsoft Visual C++.
+    if test "$GCC" != yes; then
+      with_gnu_ld=no
+    fi
+    ;;
+  interix*)
+    # we just hope/assume this is gcc and not c89 (= MSVC++)
+    with_gnu_ld=yes
+    ;;
+  openbsd*)
+    with_gnu_ld=no
+    ;;
+esac
+
+ld_shlibs=yes
+if test "$with_gnu_ld" = yes; then
+  # Set some defaults for GNU ld with shared library support. These
+  # are reset later if shared libraries are not supported. Putting them
+  # here allows them to be overridden if necessary.
+  # Unlike libtool, we use -rpath here, not --rpath, since the documented
+  # option of GNU ld is called -rpath, not --rpath.
+  hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+  case "$host_os" in
+    aix3* | aix4* | aix5*)
+      # On AIX/PPC, the GNU linker is very broken
+      if test "$host_cpu" != ia64; then
+        ld_shlibs=no
+      fi
+      ;;
+    amigaos*)
+      hardcode_libdir_flag_spec='-L$libdir'
+      hardcode_minus_L=yes
+      # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
+      # that the semantics of dynamic libraries on AmigaOS, at least up
+      # to version 4, is to share data among multiple programs linked
+      # with the same dynamic library.  Since this doesn't match the
+      # behavior of shared libraries on other platforms, we cannot use
+      # them.
+      ld_shlibs=no
+      ;;
+    beos*)
+      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+        :
+      else
+        ld_shlibs=no
+      fi
+      ;;
+    cygwin* | mingw* | pw32*)
+      # hardcode_libdir_flag_spec is actually meaningless, as there is
+      # no search path for DLLs.
+      hardcode_libdir_flag_spec='-L$libdir'
+      if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
+        :
+      else
+        ld_shlibs=no
+      fi
+      ;;
+    interix[3-9]*)
+      hardcode_direct=no
+      hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
+      ;;
+    gnu* | linux* | k*bsd*-gnu)
+      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+        :
+      else
+        ld_shlibs=no
+      fi
+      ;;
+    netbsd*)
+      ;;
+    solaris*)
+      if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then
+        ld_shlibs=no
+      elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+        :
+      else
+        ld_shlibs=no
+      fi
+      ;;
+    sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
+      case `$LD -v 2>&1` in
+        *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*)
+          ld_shlibs=no
+          ;;
+        *)
+          if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+            hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`'
+          else
+            ld_shlibs=no
+          fi
+          ;;
+      esac
+      ;;
+    sunos4*)
+      hardcode_direct=yes
+      ;;
+    *)
+      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+        :
+      else
+        ld_shlibs=no
+      fi
+      ;;
+  esac
+  if test "$ld_shlibs" = no; then
+    hardcode_libdir_flag_spec=
+  fi
+else
+  case "$host_os" in
+    aix3*)
+      # Note: this linker hardcodes the directories in LIBPATH if there
+      # are no directories specified by -L.
+      hardcode_minus_L=yes
+      if test "$GCC" = yes; then
+        # Neither direct hardcoding nor static linking is supported with a
+        # broken collect2.
+        hardcode_direct=unsupported
+      fi
+      ;;
+    aix4* | aix5*)
+      if test "$host_cpu" = ia64; then
+        # On IA64, the linker does run time linking by default, so we don't
+        # have to do anything special.
+        aix_use_runtimelinking=no
+      else
+        aix_use_runtimelinking=no
+        # Test if we are trying to use run time linking or normal
+        # AIX style linking. If -brtl is somewhere in LDFLAGS, we
+        # need to do runtime linking.
+        case $host_os in aix4.[23]|aix4.[23].*|aix5*)
+          for ld_flag in $LDFLAGS; do
+            if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
+              aix_use_runtimelinking=yes
+              break
+            fi
+          done
+          ;;
+        esac
+      fi
+      hardcode_direct=yes
+      hardcode_libdir_separator=':'
+      if test "$GCC" = yes; then
+        case $host_os in aix4.[012]|aix4.[012].*)
+          collect2name=`${CC} -print-prog-name=collect2`
+          if test -f "$collect2name" && \
+            strings "$collect2name" | grep resolve_lib_name >/dev/null
+          then
+            # We have reworked collect2
+            :
+          else
+            # We have old collect2
+            hardcode_direct=unsupported
+            hardcode_minus_L=yes
+            hardcode_libdir_flag_spec='-L$libdir'
+            hardcode_libdir_separator=
+          fi
+          ;;
+        esac
+      fi
+      # Begin _LT_AC_SYS_LIBPATH_AIX.
+      echo 'int main () { return 0; }' > conftest.c
+      ${CC} ${LDFLAGS} conftest.c -o conftest
+      aix_libpath=`dump -H conftest 2>/dev/null | sed -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
+}'`
+      if test -z "$aix_libpath"; then
+        aix_libpath=`dump -HX64 conftest 2>/dev/null | sed -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
+}'`
+      fi
+      if test -z "$aix_libpath"; then
+        aix_libpath="/usr/lib:/lib"
+      fi
+      rm -f conftest.c conftest
+      # End _LT_AC_SYS_LIBPATH_AIX.
+      if test "$aix_use_runtimelinking" = yes; then
+        hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
+      else
+        if test "$host_cpu" = ia64; then
+          hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
+        else
+          hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
+        fi
+      fi
+      ;;
+    amigaos*)
+      hardcode_libdir_flag_spec='-L$libdir'
+      hardcode_minus_L=yes
+      # see comment about different semantics on the GNU ld section
+      ld_shlibs=no
+      ;;
+    bsdi[45]*)
+      ;;
+    cygwin* | mingw* | pw32*)
+      # When not using gcc, we currently assume that we are using
+      # Microsoft Visual C++.
+      # hardcode_libdir_flag_spec is actually meaningless, as there is
+      # no search path for DLLs.
+      hardcode_libdir_flag_spec=' '
+      libext=lib
+      ;;
+    darwin* | rhapsody*)
+      hardcode_direct=no
+      if test "$GCC" = yes ; then
+        :
+      else
+        case $cc_basename in
+          xlc*)
+            ;;
+          *)
+            ld_shlibs=no
+            ;;
+        esac
+      fi
+      ;;
+    dgux*)
+      hardcode_libdir_flag_spec='-L$libdir'
+      ;;
+    freebsd1*)
+      ld_shlibs=no
+      ;;
+    freebsd2.2*)
+      hardcode_libdir_flag_spec='-R$libdir'
+      hardcode_direct=yes
+      ;;
+    freebsd2*)
+      hardcode_direct=yes
+      hardcode_minus_L=yes
+      ;;
+    freebsd* | dragonfly*)
+      hardcode_libdir_flag_spec='-R$libdir'
+      hardcode_direct=yes
+      ;;
+    hpux9*)
+      hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
+      hardcode_libdir_separator=:
+      hardcode_direct=yes
+      # hardcode_minus_L: Not really in the search PATH,
+      # but as the default location of the library.
+      hardcode_minus_L=yes
+      ;;
+    hpux10*)
+      if test "$with_gnu_ld" = no; then
+        hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
+        hardcode_libdir_separator=:
+        hardcode_direct=yes
+        # hardcode_minus_L: Not really in the search PATH,
+        # but as the default location of the library.
+        hardcode_minus_L=yes
+      fi
+      ;;
+    hpux11*)
+      if test "$with_gnu_ld" = no; then
+        hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
+        hardcode_libdir_separator=:
+        case $host_cpu in
+          hppa*64*|ia64*)
+            hardcode_direct=no
+            ;;
+          *)
+            hardcode_direct=yes
+            # hardcode_minus_L: Not really in the search PATH,
+            # but as the default location of the library.
+            hardcode_minus_L=yes
+            ;;
+        esac
+      fi
+      ;;
+    irix5* | irix6* | nonstopux*)
+      hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+      hardcode_libdir_separator=:
+      ;;
+    netbsd*)
+      hardcode_libdir_flag_spec='-R$libdir'
+      hardcode_direct=yes
+      ;;
+    newsos6)
+      hardcode_direct=yes
+      hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+      hardcode_libdir_separator=:
+      ;;
+    openbsd*)
+      if test -f /usr/libexec/ld.so; then
+        hardcode_direct=yes
+        if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+          hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
+        else
+          case "$host_os" in
+            openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
+              hardcode_libdir_flag_spec='-R$libdir'
+              ;;
+            *)
+              hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
+              ;;
+          esac
+        fi
+      else
+        ld_shlibs=no
+      fi
+      ;;
+    os2*)
+      hardcode_libdir_flag_spec='-L$libdir'
+      hardcode_minus_L=yes
+      ;;
+    osf3*)
+      hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+      hardcode_libdir_separator=:
+      ;;
+    osf4* | osf5*)
+      if test "$GCC" = yes; then
+        hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+      else
+        # Both cc and cxx compiler support -rpath directly
+        hardcode_libdir_flag_spec='-rpath $libdir'
+      fi
+      hardcode_libdir_separator=:
+      ;;
+    solaris*)
+      hardcode_libdir_flag_spec='-R$libdir'
+      ;;
+    sunos4*)
+      hardcode_libdir_flag_spec='-L$libdir'
+      hardcode_direct=yes
+      hardcode_minus_L=yes
+      ;;
+    sysv4)
+      case $host_vendor in
+        sni)
+          hardcode_direct=yes # is this really true???
+          ;;
+        siemens)
+          hardcode_direct=no
+          ;;
+        motorola)
+          hardcode_direct=no #Motorola manual says yes, but my tests say they lie
+          ;;
+      esac
+      ;;
+    sysv4.3*)
+      ;;
+    sysv4*MP*)
+      if test -d /usr/nec; then
+        ld_shlibs=yes
+      fi
+      ;;
+    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*)
+      ;;
+    sysv5* | sco3.2v5* | sco5v6*)
+      hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`'
+      hardcode_libdir_separator=':'
+      ;;
+    uts4*)
+      hardcode_libdir_flag_spec='-L$libdir'
+      ;;
+    *)
+      ld_shlibs=no
+      ;;
+  esac
+fi
+
+# Check dynamic linker characteristics
+# Code taken from libtool.m4's AC_LIBTOOL_SYS_DYNAMIC_LINKER.
+# Unlike libtool.m4, here we don't care about _all_ names of the library, but
+# only about the one the linker finds when passed -lNAME. This is the last
+# element of library_names_spec in libtool.m4, or possibly two of them if the
+# linker has special search rules.
+library_names_spec=      # the last element of library_names_spec in libtool.m4
+libname_spec='lib$name'
+case "$host_os" in
+  aix3*)
+    library_names_spec='$libname.a'
+    ;;
+  aix4* | aix5*)
+    library_names_spec='$libname$shrext'
+    ;;
+  amigaos*)
+    library_names_spec='$libname.a'
+    ;;
+  beos*)
+    library_names_spec='$libname$shrext'
+    ;;
+  bsdi[45]*)
+    library_names_spec='$libname$shrext'
+    ;;
+  cygwin* | mingw* | pw32*)
+    shrext=.dll
+    library_names_spec='$libname.dll.a $libname.lib'
+    ;;
+  darwin* | rhapsody*)
+    shrext=.dylib
+    library_names_spec='$libname$shrext'
+    ;;
+  dgux*)
+    library_names_spec='$libname$shrext'
+    ;;
+  freebsd1*)
+    ;;
+  freebsd* | dragonfly*)
+    case "$host_os" in
+      freebsd[123]*)
+        library_names_spec='$libname$shrext$versuffix' ;;
+      *)
+        library_names_spec='$libname$shrext' ;;
+    esac
+    ;;
+  gnu*)
+    library_names_spec='$libname$shrext'
+    ;;
+  hpux9* | hpux10* | hpux11*)
+    case $host_cpu in
+      ia64*)
+        shrext=.so
+        ;;
+      hppa*64*)
+        shrext=.sl
+        ;;
+      *)
+        shrext=.sl
+        ;;
+    esac
+    library_names_spec='$libname$shrext'
+    ;;
+  interix[3-9]*)
+    library_names_spec='$libname$shrext'
+    ;;
+  irix5* | irix6* | nonstopux*)
+    library_names_spec='$libname$shrext'
+    case "$host_os" in
+      irix5* | nonstopux*)
+        libsuff= shlibsuff=
+        ;;
+      *)
+        case $LD in
+          *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= ;;
+          *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 ;;
+          *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 ;;
+          *) libsuff= shlibsuff= ;;
+        esac
+        ;;
+    esac
+    ;;
+  linux*oldld* | linux*aout* | linux*coff*)
+    ;;
+  linux* | k*bsd*-gnu)
+    library_names_spec='$libname$shrext'
+    ;;
+  knetbsd*-gnu)
+    library_names_spec='$libname$shrext'
+    ;;
+  netbsd*)
+    library_names_spec='$libname$shrext'
+    ;;
+  newsos6)
+    library_names_spec='$libname$shrext'
+    ;;
+  nto-qnx*)
+    library_names_spec='$libname$shrext'
+    ;;
+  openbsd*)
+    library_names_spec='$libname$shrext$versuffix'
+    ;;
+  os2*)
+    libname_spec='$name'
+    shrext=.dll
+    library_names_spec='$libname.a'
+    ;;
+  osf3* | osf4* | osf5*)
+    library_names_spec='$libname$shrext'
+    ;;
+  rdos*)
+    ;;
+  solaris*)
+    library_names_spec='$libname$shrext'
+    ;;
+  sunos4*)
+    library_names_spec='$libname$shrext$versuffix'
+    ;;
+  sysv4 | sysv4.3*)
+    library_names_spec='$libname$shrext'
+    ;;
+  sysv4*MP*)
+    library_names_spec='$libname$shrext'
+    ;;
+  sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
+    library_names_spec='$libname$shrext'
+    ;;
+  uts4*)
+    library_names_spec='$libname$shrext'
+    ;;
+esac
+
+sed_quote_subst='s/\(["`$\\]\)/\\\1/g'
+escaped_wl=`echo "X$wl" | sed -e 's/^X//' -e "$sed_quote_subst"`
+shlibext=`echo "$shrext" | sed -e 's,^\.,,'`
+escaped_libname_spec=`echo "X$libname_spec" | sed -e 's/^X//' -e "$sed_quote_subst"`
+escaped_library_names_spec=`echo "X$library_names_spec" | sed -e 's/^X//' -e "$sed_quote_subst"`
+escaped_hardcode_libdir_flag_spec=`echo "X$hardcode_libdir_flag_spec" | sed -e 's/^X//' -e "$sed_quote_subst"`
+
+LC_ALL=C sed -e 's/^\([a-zA-Z0-9_]*\)=/acl_cv_\1=/' <<EOF
+
+# How to pass a linker flag through the compiler.
+wl="$escaped_wl"
+
+# Static library suffix (normally "a").
+libext="$libext"
+
+# Shared library suffix (normally "so").
+shlibext="$shlibext"
+
+# Format of library name prefix.
+libname_spec="$escaped_libname_spec"
+
+# Library names that the linker finds when passed -lNAME.
+library_names_spec="$escaped_library_names_spec"
+
+# Flag to hardcode \$libdir into a binary during linking.
+# This must work even if \$libdir does not exist.
+hardcode_libdir_flag_spec="$escaped_hardcode_libdir_flag_spec"
+
+# Whether we need a single -rpath flag with a separated argument.
+hardcode_libdir_separator="$hardcode_libdir_separator"
+
+# Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the
+# resulting binary.
+hardcode_direct="$hardcode_direct"
+
+# Set to yes if using the -LDIR flag during linking hardcodes DIR into the
+# resulting binary.
+hardcode_minus_L="$hardcode_minus_L"
+
+EOF

-----------------------------------------------------------------------

Summary of changes:
 myserver/ABOUT-NLS                                 | 1068 +++
 myserver/INSTALL                                   |  316 +-
 myserver/Makefile.am                               |    8 +-
 myserver/autogen.sh                                |   39 +-
 myserver/binaries/Makefile.am                      |    2 +-
 myserver/binaries/certificates/Makefile.am         |    4 +-
 myserver/binaries/logs/Makefile.am                 |    2 +-
 myserver/binaries/web/Makefile.am                  |    2 +-
 myserver/binaries/web/cgi-bin/Makefile.am          |    3 +-
 myserver/binaries/web/cgi-src/math_sum/Makefile.am |    4 +-
 myserver/binaries/web/cgi-src/post/Makefile.am     |    4 +-
 myserver/config.guess                              | 1516 ----
 myserver/config.rpath                              |  666 ++
 myserver/config.sub                                | 1626 ----
 myserver/{configure.in => configure.ac}            |   48 +-
 myserver/depcomp                                   |  423 -
 myserver/install-sh                                |  507 --
 myserver/ltmain.sh                                 | 6928 ---------------
 myserver/m4/gnome-pthread-check.m4                 |   17 -
 myserver/m4/iconv.m4                               |  180 -
 myserver/m4/lib-ld.m4                              |  110 -
 myserver/m4/lib-link.m4                            |  709 --
 myserver/m4/lib-prefix.m4                          |  185 -
 myserver/m4/libtool.m4                             | 8831 ++++++++++++--------
 myserver/m4/libxml.m4                              |  188 -
 myserver/m4/progtest.m4                            |   92 -
 myserver/missing                                   |  367 -
 myserver/src/Makefile.am                           |    2 +-
 myserver/src/base/Makefile.am                      |    2 +-
 myserver/src/base/base64/Makefile.am               |    2 +-
 myserver/src/base/bitvec/Makefile.am               |    2 +-
 myserver/src/base/dynamic_lib/Makefile.am          |    2 +-
 myserver/src/base/file/Makefile.am                 |    2 +-
 myserver/src/base/files_cache/Makefile.am          |    2 +-
 myserver/src/base/find_data/Makefile.am            |    2 +-
 myserver/src/base/hash_map/Makefile.am             |    2 +-
 myserver/src/base/home_dir/Makefile.am             |    2 +-
 myserver/src/base/md5/Makefile.am                  |    2 +-
 myserver/src/base/mem_buff/Makefile.am             |    2 +-
 myserver/src/base/multicast/Makefile.am            |    2 +-
 myserver/src/base/pipe/Makefile.am                 |    2 +-
 myserver/src/base/process/Makefile.am              |    2 +-
 myserver/src/base/regex/Makefile.am                |    2 +-
 myserver/src/base/safetime/Makefile.am             |    2 +-
 myserver/src/base/slab/Makefile.am                 |    2 +-
 myserver/src/base/socket/Makefile.am               |    2 +-
 myserver/src/base/socket_pair/Makefile.am          |    2 +-
 myserver/src/base/ssl/Makefile.am                  |    2 +-
 myserver/src/base/string/Makefile.am               |    2 +-
 myserver/src/base/sync/Makefile.am                 |    2 +-
 myserver/src/base/thread/Makefile.am               |    2 +-
 myserver/src/base/unix_socket/Makefile.am          |    2 +-
 myserver/src/base/xml/Makefile.am                  |    2 +-
 myserver/src/conf/Makefile.am                      |    2 +-
 myserver/src/conf/mime/Makefile.am                 |    2 +-
 myserver/src/conf/security/Makefile.am             |    2 +-
 myserver/src/conf/vhost/Makefile.am                |    2 +-
 myserver/src/connection/Makefile.am                |    2 +-
 myserver/src/connections_scheduler/Makefile.am     |    2 +-
 myserver/src/filter/Makefile.am                    |    2 +-
 myserver/src/filter/gzip/Makefile.am               |    2 +-
 myserver/src/http_handler/Makefile.am              |    2 +-
 myserver/src/http_handler/cgi/Makefile.am          |    2 +-
 myserver/src/http_handler/fastcgi/Makefile.am      |    2 +-
 myserver/src/http_handler/http_dir/Makefile.am     |    2 +-
 myserver/src/http_handler/http_file/Makefile.am    |    2 +-
 myserver/src/http_handler/isapi/Makefile.am        |    2 +-
 myserver/src/http_handler/mscgi/Makefile.am        |    2 +-
 myserver/src/http_handler/proxy/Makefile.am        |    2 +-
 myserver/src/http_handler/scgi/Makefile.am         |    2 +-
 myserver/src/http_handler/wincgi/Makefile.am       |    2 +-
 myserver/src/log/Makefile.am                       |    2 +-
 myserver/src/plugin/Makefile.am                    |    2 +-
 myserver/src/protocol/Makefile.am                  |    2 +-
 myserver/src/protocol/control/Makefile.am          |    2 +-
 myserver/src/protocol/ftp/Makefile.am              |    2 +-
 myserver/src/protocol/http/Makefile.am             |    2 +-
 myserver/src/protocol/http/env/Makefile.am         |    2 +-
 myserver/src/protocol/https/Makefile.am            |    2 +-
 myserver/src/server/Makefile.am                    |    2 +-
 80 files changed, 7246 insertions(+), 16705 deletions(-)
 create mode 100644 myserver/ABOUT-NLS
 delete mode 100755 myserver/config.guess
 create mode 100755 myserver/config.rpath
 delete mode 100755 myserver/config.sub
 rename myserver/{configure.in => configure.ac} (96%)
 delete mode 100755 myserver/depcomp
 delete mode 100755 myserver/install-sh
 delete mode 100755 myserver/ltmain.sh
 delete mode 100644 myserver/m4/gnome-pthread-check.m4
 delete mode 100644 myserver/m4/iconv.m4
 delete mode 100644 myserver/m4/lib-ld.m4
 delete mode 100644 myserver/m4/lib-link.m4
 delete mode 100644 myserver/m4/lib-prefix.m4
 delete mode 100644 myserver/m4/libxml.m4
 delete mode 100644 myserver/m4/progtest.m4
 delete mode 100755 myserver/missing


hooks/post-receive
-- 
GNU MyServer



From MAILER-DAEMON Fri Aug 21 16:21:00 2009
Received: from mailman by lists.gnu.org with archive (Exim 4.43)
	id 1Meabc-0002qP-1x
	for mharc-myserver-commit@gnu.org; Fri, 21 Aug 2009 16:21:00 -0400
Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43)
	id 1MeabX-0002lR-F1
	for myserver-commit@gnu.org; Fri, 21 Aug 2009 16:20:55 -0400
Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43)
	id 1MeabW-0002lG-OJ
	for myserver-commit@gnu.org; Fri, 21 Aug 2009 16:20:54 -0400
Received: from [199.232.76.173] (port=36684 helo=monty-python.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43) id 1MeabW-0002lD-Ix
	for myserver-commit@gnu.org; Fri, 21 Aug 2009 16:20:54 -0400
Received: from savannah.gnu.org ([199.232.41.3]:50867 helo=sv.gnu.org)
	by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32)
	(Exim 4.60) (envelope-from <gscrivano@gnu.org>) id 1MeabT-0003DY-GP
	for myserver-commit@gnu.org; Fri, 21 Aug 2009 16:20:54 -0400
Received: from download.savannah.gnu.org ([199.232.41.75]
	helo=cvs.savannah.gnu.org) by sv.gnu.org with esmtp (Exim 4.69)
	(envelope-from <gscrivano@gnu.org>) id 1MeabS-0006XZ-O6
	for myserver-commit@gnu.org; Fri, 21 Aug 2009 20:20:50 +0000
Received: from gscrivano by cvs.savannah.gnu.org with local (Exim 4.69)
	(envelope-from <gscrivano@savannah.gnu.org>) id 1MeabO-0006Wv-UZ
	for myserver-commit@gnu.org; Fri, 21 Aug 2009 20:20:50 +0000
To: myserver-commit@gnu.org
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: 2b2688341a4c6138b6ee3856b2456e95818505db
X-Git-Newrev: 0875df6e43e49dae7f882c57f9a32cc693e9b856
Message-Id: <E1MeabO-0006Wv-UZ@cvs.savannah.gnu.org>
From: Giuseppe Scrivano <gscrivano@gnu.org>
Date: Fri, 21 Aug 2009 20:20:48 +0000
X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2)
Subject: [myserver-commit] [SCM] GNU MyServer branch, master,
	updated. 0875df6e43e49dae7f882c57f9a32cc693e9b856
X-BeenThere: myserver-commit@gnu.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: myserver-commit.gnu.org
List-Unsubscribe: <http://lists.gnu.org/mailman/listinfo/myserver-commit>,
	<mailto:myserver-commit-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/pipermail/myserver-commit>
List-Post: <mailto:myserver-commit@gnu.org>
List-Help: <mailto:myserver-commit-request@gnu.org?subject=help>
List-Subscribe: <http://lists.gnu.org/mailman/listinfo/myserver-commit>,
	<mailto:myserver-commit-request@gnu.org?subject=subscribe>
X-List-Received-Date: Fri, 21 Aug 2009 20:20:55 -0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU MyServer".

The branch, master has been updated
       via  0875df6e43e49dae7f882c57f9a32cc693e9b856 (commit)
       via  92b8ed8f16ce2530d40cda90f4dc57d0af5e73b9 (commit)
       via  d5bb378596d37550f340bca4d837d924c75f3bac (commit)
       via  5cab7c9139df5d1cc6401da254b2f74f4001f756 (commit)
      from  2b2688341a4c6138b6ee3856b2456e95818505db (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------


commit 0875df6e43e49dae7f882c57f9a32cc693e9b856
Author: Giuseppe Scrivano <gscrivano@gnu.org>
Date:   Fri Aug 21 22:18:59 2009 +0200

    Documentation mentions how change the MIME types handler.

diff --git a/myserver/documentation/mime_types.texi b/myserver/documentation/mime_types.texi
index f7c4324..7208e59 100644
--- a/myserver/documentation/mime_types.texi
+++ b/myserver/documentation/mime_types.texi
@@ -139,3 +139,15 @@ line in the @file{myserver.xml} file.
 @end example
 
 By default MyServer doesn't follow symbolic links.
+
+@section Different MIME type handlers
+It is possible to use different handlers to determine the file MIME
+type.  Additional handlers can be supported by external plugins.
+
+The definition of external handlers can be done per vhost or globally
+in the main configuration file changing the value of the variable
+@code{mime.handler}.
+
+@example
+	<DEFINE name="mime.handler" value="mime_magic" />
+@end example
diff --git a/myserver/src/protocol/http/http.cpp b/myserver/src/protocol/http/http.cpp
index 54d60c2..a86ce26 100644
--- a/myserver/src/protocol/http/http.cpp
+++ b/myserver/src/protocol/http/http.cpp
@@ -1554,7 +1554,6 @@ Internal Server Error\n\
  */
 MimeRecord* Http::getMIME (string &filename)
 {
-  /*TODO: document the "mime.handler" option.  */
   const char *handler = td->securityToken.getHashedData ("mime.handler",
                       MYSERVER_VHOST_CONF | MYSERVER_SERVER_CONF, NULL);
 



commit 92b8ed8f16ce2530d40cda90f4dc57d0af5e73b9
Author: Giuseppe Scrivano <gscrivano@gnu.org>
Date:   Fri Aug 21 21:50:00 2009 +0200

    Specify the Emacs mode to use

diff --git a/myserver/include/conf/security/auth_method_factory.h b/myserver/include/conf/security/auth_method_factory.h
index 37853af..8d054e1 100644
--- a/myserver/include/conf/security/auth_method_factory.h
+++ b/myserver/include/conf/security/auth_method_factory.h
@@ -1,6 +1,7 @@
+/* -*- mode: c++ -*- */
 /*
 MyServer
-Copyright (C) 2008 Free Software Foundation, Inc.
+Copyright (C) 2008, 2009 Free Software Foundation, Inc.
 This program 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 3 of the License, or
diff --git a/myserver/include/conf/security/validator_factory.h b/myserver/include/conf/security/validator_factory.h
index 9ea5342..62feebf 100644
--- a/myserver/include/conf/security/validator_factory.h
+++ b/myserver/include/conf/security/validator_factory.h
@@ -1,6 +1,7 @@
+/* -*- mode: c++ -*- */
 /*
 MyServer
-Copyright (C) 2008 Free Software Foundation, Inc.
+Copyright (C) 2008, 2009 Free Software Foundation, Inc.
 This program 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 3 of the License, or
@@ -26,7 +27,6 @@ using namespace std;
 
 class Validator;
 
-
 class ValidatorFactory
 {
 public:
diff --git a/myserver/include/server/clients_thread.h b/myserver/include/server/clients_thread.h
index 39fba2d..406de83 100644
--- a/myserver/include/server/clients_thread.h
+++ b/myserver/include/server/clients_thread.h
@@ -23,14 +23,12 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #include <include/connection/connection.h>
 #include <include/base/mem_buff/mem_buff.h>
 
-
-class  FtpProtocol;
-class  HttpProtocol;
-class  HttpsProtocol;
-class  ControlProtocol;
+class FtpProtocol;
+class HttpProtocol;
+class HttpsProtocol;
+class ControlProtocol;
 class Server;
 
-
 class  ClientsThread
 {
   friend class Server;
@@ -41,16 +39,16 @@ public:
   enum RETURN_CODE
   {
     /*!
-     *Delete the current connection from the connections pool.  
+     *Delete the current connection from the connections pool.
      */
     DELETE_CONNECTION = 0,
     /*!
-     *Keep the connection in the connections pool waiting for new data.  
+     *Keep the connection in the connections pool waiting for new data.
      */
     KEEP_CONNECTION = 1,
     /*!
      *The request present in the connection buffer is not complete, keep
-     *data in the buffer and append to it.  
+     *data in the buffer and append to it.
      */
     INCOMPLETE_REQUEST = 2,
     /*!
@@ -101,12 +99,6 @@ private:
   u_long nBytesToRead;
 };
 
-#ifdef WIN32
-unsigned int __stdcall clients_thread(void* pParam); 
-#endif
-
-#ifdef HAVE_PTHREAD
-void* clients_thread(void* pParam);
-#endif
+DEFINE_THREAD(clients_thread, pParam);
 
 #endif



commit d5bb378596d37550f340bca4d837d924c75f3bac
Author: Giuseppe Scrivano <gscrivano@gnu.org>
Date:   Fri Aug 21 21:19:35 2009 +0200

    Code refactoring: fix indentation and formatting

diff --git a/myserver/include/base/files_cache/cached_file_factory.h b/myserver/include/base/files_cache/cached_file_factory.h
index 12b6789..a34a9dc 100644
--- a/myserver/include/base/files_cache/cached_file_factory.h
+++ b/myserver/include/base/files_cache/cached_file_factory.h
@@ -1,7 +1,7 @@
 /* -*- mode: c++ -*- */
 /*
 MyServer
-Copyright (C) 2006, 2007, 2008 Free Software Foundation, Inc.
+Copyright (C) 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
 This program 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 3 of the License, or
@@ -34,27 +34,26 @@ using namespace std;
 class CachedFileFactory
 {
 public:
-  CachedFileFactory();
-  ~CachedFileFactory();
-  CachedFileFactory(u_long m);
-  void initialize(u_long size);
-  void clean();
-  void setSize(u_long m){size = m;}
-  u_long getSize(){return size;}
-  u_long getUsedSize(){return usedSize;}
-  u_long getUsed(){return used;}
-
-  File *open(const char* file);
-  void nullReferences(CachedFileBuffer* cfb);
-
-  void setMaxSize(u_long maxSize);
-  void setMinSize(u_long minSize);
-  u_long getMaxSize();
-  u_long getMinSize();
-protected:
-
-  u_long purgeRecords();
+  CachedFileFactory ();
+  ~CachedFileFactory ();
+  CachedFileFactory (u_long m);
+  void initialize (u_long size);
+  void clean ();
+  void setSize (u_long m){size = m;}
+  u_long getSize (){return size;}
+  u_long getUsedSize (){return usedSize;}
+  u_long getUsed (){return used;}
+
+  File *open (const char* file);
+  void nullReferences (CachedFileBuffer* cfb);
+
+  void setMaxSize (u_long maxSize);
+  void setMinSize (u_long minSize);
+  u_long getMaxSize ();
+  u_long getMinSize ();
 
+protected:
+  u_long purgeRecords ();
 
   Mutex mutex;
 
diff --git a/myserver/src/base/files_cache/cached_file.cpp b/myserver/src/base/files_cache/cached_file.cpp
index 5dc037d..555854f 100644
--- a/myserver/src/base/files_cache/cached_file.cpp
+++ b/myserver/src/base/files_cache/cached_file.cpp
@@ -23,18 +23,19 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #include <include/base/files_cache/cached_file.h>
 
 #ifndef WIN32
-extern "C" {
-#include <fcntl.h>
-#include <unistd.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <errno.h>
-#include <stdio.h>
-#include <fcntl.h>
-#include <stdlib.h>
-#include <string.h>
-#include <math.h>
-#include <time.h>
+extern "C"
+{
+# include <fcntl.h>
+# include <unistd.h>
+# include <sys/types.h>
+# include <sys/stat.h>
+# include <errno.h>
+# include <stdio.h>
+# include <fcntl.h>
+# include <stdlib.h>
+# include <string.h>
+# include <math.h>
+# include <time.h>
 }
 #endif
 
@@ -44,20 +45,20 @@ extern "C" {
 using namespace std;
 
 /*!
- *Costructor of the class.
+ * Costructor of the class.
  */
-CachedFile::CachedFile(CachedFileBuffer* cfb)
+CachedFile::CachedFile (CachedFileBuffer* cfb)
 {
-  File::File();
+  File::File ();
   buffer = cfb;
   fseek = 0;
-  cfb->addRef();
+  cfb->addRef ();
 }
 
 /*!
- *Write data to a file is not supported by a CachedFile, return immediately -1.
- *Inherithed by File.
- *\see File#writeToFile.
+ * Write data to a file is not supported by a CachedFile, return immediately -1.
+ * Inherithed by File.
+ * \see File#writeToFile.
  */
 int CachedFile::writeToFile(const char* buffer, u_long buffersize, u_long* nbw)
 {
@@ -65,71 +66,69 @@ int CachedFile::writeToFile(const char* buffer, u_long buffersize, u_long* nbw)
 }
 
 /*!
- *A CachedFile can't be opened directly, use a factory instead.
- *If the function have success the return value is nonzero.
- *\param nfilename Filename to open.
- *\param opt Specify how open the file.
- *\return 0 if the call was successfull, any other value on errors.
+ * A CachedFile can't be opened directly, use a factory instead.
+ * If the function have success the return value is nonzero.
+ * \param nfilename Filename to open.
+ * \param opt Specify how open the file.
+ * \return 0 if the call was successfull, any other value on errors.
  */
-int CachedFile::openFile(const char* nfilename, u_long opt)
+int CachedFile::openFile (const char* nfilename, u_long opt)
 {
   return -1;
 }
 
 /*!
- *Returns the base/file/file.handle.
+ * Returns the base/file/file.handle.
  */
-Handle CachedFile::getHandle()
+Handle CachedFile::getHandle ()
 {
   return (Handle)-1;
 }
 
 /*!
- *Set the base/file/file.handle.
- *Return a non null-value on errors.
- *\param hl The new base/file/file.handle.
+ * Set the base/file/file.handle.
+ * Return a non null-value on errors.
+ * \param hl The new base/file/file.handle.
  */
-int CachedFile::setHandle(Handle hl)
+int CachedFile::setHandle (Handle hl)
 {
   return -1;
 }
 
 /*!
- *define the operator =.
- *\param f The file to copy.
+ * define the operator =.
+ * \param f The file to copy.
  */
 int CachedFile::operator =(CachedFile f)
 {
   setHandle (f.getHandle ());
-  if(f.filename.length())
-  {
-    filename.assign(f.filename);
-  }
+  if (f.filename.length ())
+    filename.assign (f.filename);
   else
-  {
-    filename.clear();
-    handle = 0;
-  }
+    {
+      filename.clear ();
+      handle = 0;
+    }
   fseek = f.fseek;
   return 0;
 }
 
 /*!
- *Read data from a file to a buffer.
- *Return 1 on errors.
- *Return 0 on success.
- *\param buffer The buffer where write.
- *\param buffersize The length of the buffer in bytes.
- *\param nbr How many bytes were read to the buffer.
+ * Read data from a file to a buffer.
+ * Return 1 on errors.
+ * Return 0 on success.
+ * \param buffer The buffer where write.
+ * \param buffersize The length of the buffer in bytes.
+ * \param nbr How many bytes were read to the buffer.
  */
-int CachedFile::read(char* buffer, u_long buffersize, u_long* nbr)
+int CachedFile::read (char* buffer, u_long buffersize, u_long* nbr)
 {
-  u_long toRead = std::min(buffersize, this->buffer->getFileSize() - fseek);
+  u_long toRead = std::min (buffersize, this->buffer->getFileSize () - fseek);
   const char* src = &(this->buffer->getBuffer()[fseek]);
-  if(nbr)
+  if (nbr)
     *nbr = toRead;
 
-  memcpy(buffer, src, toRead);
+  memcpy (buffer, src, toRead);
 
   fseek += toRead;
 
@@ -141,7 +140,7 @@ int CachedFile::read(char* buffer, u_long buffersize, u_long* nbr)
  *Create a temporary file.
  *\param filename The new temporary file name.
  */
-int CachedFile::createTemporaryFile(const char* filename)
+int CachedFile::createTemporaryFile (const char* filename)
 { 
   return -1;
 }
@@ -149,9 +148,9 @@ int CachedFile::createTemporaryFile(const char* filename)
 /*!
  *Close an open base/file/file.handle.
  */
-int CachedFile::close()
+int CachedFile::close ()
 {
-  buffer->decRef();
+  buffer->decRef ();
   return 0;
 }
 
@@ -170,12 +169,10 @@ u_long CachedFile::getFileSize ()
  */
 int CachedFile::seek (u_long initialByte)
 {
-  if(initialByte <= buffer->getFileSize())
+  if (initialByte <= buffer->getFileSize())
     fseek = initialByte;
   else
     return -1;
-
-  return 0;
 }
 
 /*!
diff --git a/myserver/src/base/files_cache/cached_file_buffer.cpp b/myserver/src/base/files_cache/cached_file_buffer.cpp
index 55fc8b7..9de5337 100644
--- a/myserver/src/base/files_cache/cached_file_buffer.cpp
+++ b/myserver/src/base/files_cache/cached_file_buffer.cpp
@@ -25,18 +25,19 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #include <include/base/files_cache/cached_file_factory.h>
 
 #ifndef WIN32
-extern "C" {
-#include <fcntl.h>
-#include <unistd.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <errno.h>
-#include <stdio.h>
-#include <fcntl.h>
-#include <stdlib.h>
-#include <string.h>
-#include <math.h>
-#include <time.h>
+extern "C"
+{
+# include <fcntl.h>
+# include <unistd.h>
+# include <sys/types.h>
+# include <sys/stat.h>
+# include <errno.h>
+# include <stdio.h>
+# include <fcntl.h>
+# include <stdlib.h>
+# include <string.h>
+# include <math.h>
+# include <time.h>
 }
 #endif
 
@@ -44,84 +45,82 @@ extern "C" {
 #include <sstream>
 
 /*!
- *Load a file in the buffer.
- *\param filename The name of the file.
+ * Load a file in the buffer.
+ * \param filename The name of the file.
  */
-CachedFileBuffer::CachedFileBuffer(const char* filename)
+CachedFileBuffer::CachedFileBuffer (const char* filename)
 {
   File file;
   u_long nbw;
-  mutex.init();
+  mutex.init ();
   factoryToNotify = 0;
   refCounter = 0;
-  this->filename.assign(filename);
+  this->filename.assign (filename);
 
-  file.openFile(filename, File::OPEN_IF_EXISTS | 
-                File::READ);
+  file.openFile (filename, File::OPEN_IF_EXISTS | File::READ);
 
   fileSize = file.getFileSize();
   buffer = new char[fileSize];
 
-  file.read(buffer, fileSize, &nbw);
+  file.read (buffer, fileSize, &nbw);
 
-  file.close();
+  file.close ();
 }
 
 /*!
- *Increment the reference counter for this buffer.
+ * Increment the reference counter for this buffer.
  */
-void CachedFileBuffer::addRef()
+void CachedFileBuffer::addRef ()
 {
-  mutex.lock();
+  mutex.lock ();
   refCounter++;
-  mutex.unlock();
+  mutex.unlock ();
 }
 
 /*!
- *Set the factory object to be notified when the object will have a reference
- *counter null.
+ * Set the factory object to be notified when the object will have a reference
+ * counter null.
  */
-void CachedFileBuffer::setFactoryToNotify(CachedFileFactory *cff)
+void CachedFileBuffer::setFactoryToNotify (CachedFileFactory *cff)
 {
   factoryToNotify = cff;
 }
 
 /*!
- *Decrement the reference counter for this buffer.
+ * Decrement the reference counter for this buffer.
  */
-void CachedFileBuffer::decRef()
+void CachedFileBuffer::decRef ()
 {
   bool isZero = false;
-  mutex.lock();
+  mutex.lock ();
   refCounter--;
-  if(refCounter == 0)
+  if (refCounter == 0)
     isZero = true;
 
-  mutex.unlock();
+  mutex.unlock ();
 
-  if(isZero && factoryToNotify)
-    factoryToNotify->nullReferences(this);
+  if (isZero && factoryToNotify)
+    factoryToNotify->nullReferences (this);
 }
 
 /*!
  *Get the number of references to this object.
  */
-u_long CachedFileBuffer::getReferenceCounter()
+u_long CachedFileBuffer::getReferenceCounter ()
 {
   u_long ret;
-  mutex.lock();
+  mutex.lock ();
   ret = refCounter;
-  mutex.unlock();
-
+  mutex.unlock ();
   return ret;
 }
 
 /*!
- *Load a file in the buffer from a memory location.
- *\param buffer The buffer to copy.
- *\param size The memory buffer size.
+ * Load a file in the buffer from a memory location.
+ * \param buffer The buffer to copy.
+ * \param size The memory buffer size.
  */
-CachedFileBuffer::CachedFileBuffer(const char* buffer, u_long size)
+CachedFileBuffer::CachedFileBuffer (const char* buffer, u_long size)
 {
   factoryToNotify = 0;
   refCounter = 0;
@@ -133,10 +132,10 @@ CachedFileBuffer::CachedFileBuffer(const char* buffer, u_long size)
 }
 
 /*!
- *Load a file in the buffer.
- *\param file The file object.
+ * Load a file in the buffer.
+ * \param file The file object.
  */
-CachedFileBuffer::CachedFileBuffer(File* file)
+CachedFileBuffer::CachedFileBuffer (File* file)
 {
   u_long nbr;
   factoryToNotify = 0;
@@ -149,10 +148,10 @@ CachedFileBuffer::CachedFileBuffer(File* file)
 }
 
 /*!
- *Destroy the object.
+ * Destroy the object.
  */
-CachedFileBuffer::~CachedFileBuffer()
+CachedFileBuffer::~CachedFileBuffer ()
 {
-  mutex.destroy();
+  mutex.destroy ();
   delete [] buffer;
 }
diff --git a/myserver/src/base/files_cache/cached_file_factory.cpp b/myserver/src/base/files_cache/cached_file_factory.cpp
index 83976b0..ff2ec8c 100644
--- a/myserver/src/base/files_cache/cached_file_factory.cpp
+++ b/myserver/src/base/files_cache/cached_file_factory.cpp
@@ -23,113 +23,114 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #include <include/base/files_cache/cached_file_factory.h>
 
 #ifndef WIN32
-extern "C" {
-#include <fcntl.h>
-#include <unistd.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <errno.h>
-#include <stdio.h>
-#include <fcntl.h>
-#include <stdlib.h>
-#include <string.h>
-#include <math.h>
-#include <time.h>
+extern "C"
+{
+# include <fcntl.h>
+# include <unistd.h>
+# include <sys/types.h>
+# include <sys/stat.h>
+# include <errno.h>
+# include <stdio.h>
+# include <fcntl.h>
+# include <stdlib.h>
+# include <string.h>
+# include <math.h>
+# include <time.h>
 }
 #endif
 
 /*!
- *Default constructor.
+ * Default constructor.
  */
-CachedFileFactory::CachedFileFactory()
+CachedFileFactory::CachedFileFactory ()
 {
-  initialize(1 << 23);
+  initialize (1 << 23);
 }
 
 /*!
- *Destructor.
+ * Destructor.
  */
-CachedFileFactory::~CachedFileFactory()
+CachedFileFactory::~CachedFileFactory ()
 {
-  clean();
+  clean ();
 }
 
 /*!
- *Class constructor.
+ * Class constructor.
  *\param size Max size to use for the cache.
  */
-CachedFileFactory::CachedFileFactory(u_long size)
+CachedFileFactory::CachedFileFactory (u_long size)
 {
-  initialize(size);
+  initialize (size);
 }
 
 /*!
- *Clean the used resources.
+ * Clean the used resources.
  */
-void CachedFileFactory::clean()
+void CachedFileFactory::clean ()
 {
-  mutex.lock();
-
-  HashMap<char*, CachedFileFactoryRecord*>::Iterator it = buffers.begin();
-  for(; it != buffers.end(); it++)
-  {
-    delete (*it)->buffer;
-    delete (*it);
-  }
-  buffers.clear();
-  
-  mutex.unlock();
-   mutex.destroy();
+  mutex.lock ();
+
+  HashMap<char*, CachedFileFactoryRecord*>::Iterator it = buffers.begin ();
+  for (; it != buffers.end (); it++)
+    {
+      delete (*it)->buffer;
+      delete (*it);
+    }
+  buffers.clear ();
+
+  mutex.unlock ();
+  mutex.destroy ();
 }
 
 /*!
- *Set the max dimension for a file in the cache.
- *\param maxSize The new value.
+ * Set the max dimension for a file in the cache.
+ * \param maxSize The new value.
  */
-void CachedFileFactory::setMaxSize(u_long maxSize)
+void CachedFileFactory::setMaxSize (u_long maxSize)
 {
   this->maxSize = maxSize;
 }
 
 /*!
- *Set the min dimension for a file in the cache.
- *\param minSize The new value.
+ * Set the min dimension for a file in the cache.
+ * \param minSize The new value.
  */
-void CachedFileFactory::setMinSize(u_long minSize)
+void CachedFileFactory::setMinSize (u_long minSize)
 {
   this->minSize = minSize;
 }
 
 /*!
- *Get the max dimension for a file in the cache.
- *\return The current max value.
+ * Get the max dimension for a file in the cache.
+ * \return The current max value.
  */
-u_long CachedFileFactory::getMaxSize()
+u_long CachedFileFactory::getMaxSize ()
 {
   return maxSize;
 }
 
 /*!
- *Get the min dimension for a file in the cache.
- *\return The current min value.
+ * Get the min dimension for a file in the cache.
+ * \return The current min value.
  */
-u_long CachedFileFactory::getMinSize()
+u_long CachedFileFactory::getMinSize ()
 {
   return minSize;
 }
 
 /*!
- *Initialize the structure.
+ * Initialize the structure.
  */
-void CachedFileFactory::initialize(u_long size)
+void CachedFileFactory::initialize (u_long size)
 {
-  setSize(size);
+  setSize (size);
   used = 0;
   maxSize = 0;
   minSize = 0;
   usedSize = 0;
-  created = getTicks();
-  mutex.init();
+  created = getTicks ();
+  mutex.init ();
 }
 
 /*!
@@ -137,175 +138,167 @@ void CachedFileFactory::initialize(u_long size)
  *use the cache instead of a real file.
  *\param filename The file name.
  */
-File* CachedFileFactory::open(const char* filename)
+File* CachedFileFactory::open (const char* filename)
 {
   CachedFileFactoryRecord *record;
   CachedFileBuffer *buffer;
   CachedFile* cachedFile;
   u_long ticks;
 
-  mutex.lock();
-  
-  ticks = getTicks();
-  record = buffers.get(filename);
+  mutex.lock ();
+
+  ticks = getTicks ();
+  record = buffers.get (filename);
   buffer = record ? record->buffer : 0;
 
   used++;
 
   /*!
-   *If the file on the file system has a different mtime then don't use
-   *the cache, in this way when opened instance of this file will be closed
-   *the null reference callback can be called and the file reloaded.
+   * If the file on the file system has a different mtime then don't use
+   * the cache, in this way when opened instance of this file will be closed
+   * the null reference callback can be called and the file reloaded.
    */
-  if(record)
-  {
-    
-    if(ticks - record->lastModTimeCheck > MYSERVER_SEC(5))
-    {
-      record->invalidCache = (FilesUtility::getLastModTime(filename) != 
-                              record->mtime);
-      record->lastModTimeCheck = ticks;
-    }
-
-    if(record->invalidCache)
-    {
-      File *file;
-      mutex.unlock();
-      
-      file = new File();
-      if(file->openFile(filename, File::OPEN_IF_EXISTS | 
-                        File::READ))
-      {
-        delete file;
-        return 0;
-      }
-      return file;
-    }
-  }
-
-  if(buffer == 0)
-  {
-    u_long fileSize;
-    File *file = new File();
-    if(file->openFile(filename, File::OPEN_IF_EXISTS | 
-                      File::READ))
+  if (record)
     {
-      mutex.unlock();
-      delete file;
-      return 0;
+      if (ticks - record->lastModTimeCheck > MYSERVER_SEC (5))
+        {
+          record->invalidCache = FilesUtility::getLastModTime (filename)
+                                 != record->mtime;
+          record->lastModTimeCheck = ticks;
+        }
+
+      if (record->invalidCache)
+        {
+          mutex.unlock ();
+
+          File *file = new File ();
+          if (file->openFile (filename, File::OPEN_IF_EXISTS |
+                              File::READ))
+            {
+              delete file;
+              return NULL;
+            }
+          return file;
+        }
     }
-    fileSize = file->getFileSize();
 
-    if((minSize != 0 && fileSize < minSize) ||
-       (maxSize != 0 && fileSize > maxSize)  ||
-       (fileSize > size - usedSize + purgeRecords()))
+  if (buffer == NULL)
     {
-      mutex.unlock();
-      return file;
+      u_long fileSize;
+      File *file = new File();
+      if (file->openFile (filename, File::OPEN_IF_EXISTS | File::READ))
+        {
+          mutex.unlock ();
+          delete file;
+          return NULL;
+        }
+      fileSize = file->getFileSize ();
+      purgeRecords ();
+      if ((minSize != 0 && fileSize < minSize) ||
+          (maxSize != 0 && fileSize > maxSize)  ||
+          (fileSize > size - usedSize))
+        {
+          mutex.unlock ();
+          return file;
+        }
+      else
+        {
+          record = new CachedFileFactoryRecord ();
+          if (!record)
+            {
+              delete record;
+              file->close();
+              delete file;
+              mutex.unlock();
+              return 0;
+            }
+
+          buffer = new CachedFileBuffer (file);
+          record->mtime = file->getLastModTime ();
+          file->close  ();
+          delete file;
+
+          if (!buffer)
+            {
+              delete record;
+              mutex.unlock ();
+              return 0;
+            }
+          buffer->setFactoryToNotify (this);
+          record->created = ticks;
+          record->buffer = buffer;
+          buffers.put ((char *)filename, record);
+          usedSize += fileSize;
+        }
     }
-    else
-    {
-      record = new CachedFileFactoryRecord();
-
-      if(record == 0)
-      {
-        delete record;
-        file->close();
-        delete file;
-        mutex.unlock();
-        return 0;
-      }
-
-      buffer = new CachedFileBuffer(file);
-      record->mtime = file->getLastModTime();
-
-      
-      file->close();
-      delete file;
-
-      if(buffer == 0)
-      {
-        delete record;
-        mutex.unlock();
-        return 0;
-      }
-      buffer->setFactoryToNotify(this);
-      record->created = ticks;
-      record->buffer = buffer;
-
-      buffers.put((char *)filename, record);
-      usedSize += fileSize;
-    }
-  }
   record->used++;
 
-  cachedFile = new CachedFile(buffer);
+  cachedFile = new CachedFile (buffer);
+
+  mutex.unlock ();
 
-  mutex.unlock();
-  
   return cachedFile;
 }
 
 /*!
- *Called by CachedFileBuffer when its counter reaches zero references.
- *\param cfb A pointer to the source CachedFileBuffer object.
+ * Called by CachedFileBuffer when its counter reaches zero references.
+ * \param cfb A pointer to the source CachedFileBuffer object.
  */
-void CachedFileFactory::nullReferences(CachedFileBuffer* cfb)
+void CachedFileFactory::nullReferences (CachedFileBuffer* cfb)
 {
   CachedFileFactoryRecord* record;
   float averageUsage;
   float bufferAverageUsage;
   float spaceUsage;
   u_long ticks;
-  mutex.lock();
-
-  ticks = getTicks();
-  record = buffers.get(cfb->getFilename());
-  if(record == 0)
-  {
-    mutex.unlock();
-    return;
-  }
-  
+  mutex.lock ();
+
+  ticks = getTicks ();
+  record = buffers.get (cfb->getFilename ());
+  if (!record)
+    {
+      mutex.unlock ();
+      return;
+    }
+
   spaceUsage = (float)usedSize / size;
   averageUsage = (float)used * 1000.0f / (ticks - created);
-  bufferAverageUsage = (float)record->used * 1000.0f / 
-    (getTicks() - record->created);
-
-  if(((spaceUsage > 0.65f) && (bufferAverageUsage < averageUsage) 
-       && ((ticks - record->created) > 10000)) 
-     || (spaceUsage > 0.9f)
-     || record->invalidCache)
-  {
-    record = buffers.remove(cfb->getFilename());
-    if(record)
-      buffersToRemove.push_back(record);
-  }
-    
-  mutex.unlock();
+  bufferAverageUsage = (float)record->used * 1000.0f /
+    (getTicks () - record->created);
+
+  if (((spaceUsage > 0.65f) && (bufferAverageUsage < averageUsage)
+       && ((ticks - record->created) > 10000))
+      || (spaceUsage > 0.9f)
+      || record->invalidCache)
+    {
+      record = buffers.remove (cfb->getFilename ());
+      if (record)
+        buffersToRemove.push_back (record);
+    }
+  mutex.unlock ();
 }
 
 /*!
- *Remove pending records from the list.
+ * Remove pending records from the list.
  */
-u_long CachedFileFactory::purgeRecords()
+u_long CachedFileFactory::purgeRecords ()
 {
-  list<CachedFileFactoryRecord*>::iterator it = buffersToRemove.begin();
+  list<CachedFileFactoryRecord*>::iterator it = buffersToRemove.begin ();
   u_long ret = 0;
 
-  while(it != buffersToRemove.end())
-  {
-    CachedFileFactoryRecord* rec = *it;
-    if(!rec->buffer->getReferenceCounter())
+  while (it != buffersToRemove.end ())
     {
-      ret += rec->buffer->getFileSize();
-      it = buffersToRemove.erase(it);
-      delete rec->buffer;
-      delete rec;
+      CachedFileFactoryRecord* rec = *it;
+      if (rec->buffer->getReferenceCounter ())
+        it++;
+      else
+        {
+          ret += rec->buffer->getFileSize ();
+          it = buffersToRemove.erase (it);
+          delete rec->buffer;
+          delete rec;
+        }
     }
-    else
-      it++;
-  }
   usedSize -= ret;
   return ret;
 }



commit 5cab7c9139df5d1cc6401da254b2f74f4001f756
Author: Giuseppe Scrivano <gscrivano@gnu.org>
Date:   Fri Aug 21 21:17:31 2009 +0200

    Remove files that are generated automatically.

diff --git a/myserver/INSTALL b/myserver/INSTALL
deleted file mode 100644
index 2550dab..0000000
--- a/myserver/INSTALL
+++ /dev/null
@@ -1,302 +0,0 @@
-Installation Instructions
-*************************
-
-Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005,
-2006, 2007, 2008, 2009 Free Software Foundation, Inc.
-
-   This file is free documentation; the Free Software Foundation gives
-unlimited permission to copy, distribute and modify it.
-
-Basic Installation
-==================
-
-   Briefly, the shell commands `./configure; make; make install' should
-configure, build, and install this package.  The following
-more-detailed instructions are generic; see the `README' file for
-instructions specific to this package.
-
-   The `configure' shell script attempts to guess correct values for
-various system-dependent variables used during compilation.  It uses
-those values to create a `Makefile' in each directory of the package.
-It may also create one or more `.h' files containing system-dependent
-definitions.  Finally, it creates a shell script `config.status' that
-you can run in the future to recreate the current configuration, and a
-file `config.log' containing compiler output (useful mainly for
-debugging `configure').
-
-   It can also use an optional file (typically called `config.cache'
-and enabled with `--cache-file=config.cache' or simply `-C') that saves
-the results of its tests to speed up reconfiguring.  Caching is
-disabled by default to prevent problems with accidental use of stale
-cache files.
-
-   If you need to do unusual things to compile the package, please try
-to figure out how `configure' could check whether to do them, and mail
-diffs or instructions to the address given in the `README' so they can
-be considered for the next release.  If you are using the cache, and at
-some point `config.cache' contains results you don't want to keep, you
-may remove or edit it.
-
-   The file `configure.ac' (or `configure.in') is used to create
-`configure' by a program called `autoconf'.  You need `configure.ac' if
-you want to change it or regenerate `configure' using a newer version
-of `autoconf'.
-
-The simplest way to compile this package is:
-
-  1. `cd' to the directory containing the package's source code and type
-     `./configure' to configure the package for your system.
-
-     Running `configure' might take a while.  While running, it prints
-     some messages telling which features it is checking for.
-
-  2. Type `make' to compile the package.
-
-  3. Optionally, type `make check' to run any self-tests that come with
-     the package.
-
-  4. Type `make install' to install the programs and any data files and
-     documentation.
-
-  5. You can remove the program binaries and object files from the
-     source code directory by typing `make clean'.  To also remove the
-     files that `configure' created (so you can compile the package for
-     a different kind of computer), type `make distclean'.  There is
-     also a `make maintainer-clean' target, but that is intended mainly
-     for the package's developers.  If you use it, you may have to get
-     all sorts of other programs in order to regenerate files that came
-     with the distribution.
-
-  6. Often, you can also type `make uninstall' to remove the installed
-     files again.
-
-Compilers and Options
-=====================
-
-   Some systems require unusual options for compilation or linking that
-the `configure' script does not know about.  Run `./configure --help'
-for details on some of the pertinent environment variables.
-
-   You can give `configure' initial values for configuration parameters
-by setting variables in the command line or in the environment.  Here
-is an example:
-
-     ./configure CC=c99 CFLAGS=-g LIBS=-lposix
-
-   *Note Defining Variables::, for more details.
-
-Compiling For Multiple Architectures
-====================================
-
-   You can compile the package for more than one kind of computer at the
-same time, by placing the object files for each architecture in their
-own directory.  To do this, you can use GNU `make'.  `cd' to the
-directory where you want the object files and executables to go and run
-the `configure' script.  `configure' automatically checks for the
-source code in the directory that `configure' is in and in `..'.
-
-   With a non-GNU `make', it is safer to compile the package for one
-architecture at a time in the source code directory.  After you have
-installed the package for one architecture, use `make distclean' before
-reconfiguring for another architecture.
-
-   On MacOS X 10.5 and later systems, you can create libraries and
-executables that work on multiple system types--known as "fat" or
-"universal" binaries--by specifying multiple `-arch' options to the
-compiler but only a single `-arch' option to the preprocessor.  Like
-this:
-
-     ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
-                 CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
-                 CPP="gcc -E" CXXCPP="g++ -E"
-
-   This is not guaranteed to produce working output in all cases, you
-may have to build one architecture at a time and combine the results
-using the `lipo' tool if you have problems.
-
-Installation Names
-==================
-
-   By default, `make install' installs the package's commands under
-`/usr/local/bin', include files under `/usr/local/include', etc.  You
-can specify an installation prefix other than `/usr/local' by giving
-`configure' the option `--prefix=PREFIX'.
-
-   You can specify separate installation prefixes for
-architecture-specific files and architecture-independent files.  If you
-pass the option `--exec-prefix=PREFIX' to `configure', the package uses
-PREFIX as the prefix for installing programs and libraries.
-Documentation and other data files still use the regular prefix.
-
-   In addition, if you use an unusual directory layout you can give
-options like `--bindir=DIR' to specify different values for particular
-kinds of files.  Run `configure --help' for a list of the directories
-you can set and what kinds of files go in them.
-
-   If the package supports it, you can cause programs to be installed
-with an extra prefix or suffix on their names by giving `configure' the
-option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
-
-Optional Features
-=================
-
-   Some packages pay attention to `--enable-FEATURE' options to
-`configure', where FEATURE indicates an optional part of the package.
-They may also pay attention to `--with-PACKAGE' options, where PACKAGE
-is something like `gnu-as' or `x' (for the X Window System).  The
-`README' should mention any `--enable-' and `--with-' options that the
-package recognizes.
-
-   For packages that use the X Window System, `configure' can usually
-find the X include and library files automatically, but if it doesn't,
-you can use the `configure' options `--x-includes=DIR' and
-`--x-libraries=DIR' to specify their locations.
-
-Particular systems
-==================
-
-   On HP-UX, the default C compiler is not ANSI C compatible.  If GNU
-CC is not installed, it is recommended to use the following options in
-order to use an ANSI C compiler:
-
-     ./configure CC="cc -Ae -D_XOPEN_SOURCE=500"
-
-and if that doesn't work, install pre-built binaries of GCC for HP-UX.
-
-   On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot
-parse its `<wchar.h>' header file.  The option `-nodtk' can be used as
-a workaround.  If GNU CC is not installed, it is therefore recommended
-to try
-
-     ./configure CC="cc"
-
-and if that doesn't work, try
-
-     ./configure CC="cc -nodtk"
-
-   On Solaris, don't put `/usr/ucb' early in your `PATH'.  This
-directory contains several dysfunctional programs; working variants of
-these programs are available in `/usr/bin'.  So, if you need `/usr/ucb'
-in your `PATH', put it _after_ `/usr/bin'.
-
-   On Haiku, software installed for all users goes in `/boot/common',
-not `/usr/local'.  It is recommended to use the following options:
-
-     ./configure --prefix=/boot/common
-
-Specifying the System Type
-==========================
-
-   There may be some features `configure' cannot figure out
-automatically, but needs to determine by the type of machine the package
-will run on.  Usually, assuming the package is built to be run on the
-_same_ architectures, `configure' can figure that out, but if it prints
-a message saying it cannot guess the machine type, give it the
-`--build=TYPE' option.  TYPE can either be a short name for the system
-type, such as `sun4', or a canonical name which has the form:
-
-     CPU-COMPANY-SYSTEM
-
-where SYSTEM can have one of these forms:
-
-     OS
-     KERNEL-OS
-
-   See the file `config.sub' for the possible values of each field.  If
-`config.sub' isn't included in this package, then this package doesn't
-need to know the machine type.
-
-   If you are _building_ compiler tools for cross-compiling, you should
-use the option `--target=TYPE' to select the type of system they will
-produce code for.
-
-   If you want to _use_ a cross compiler, that generates code for a
-platform different from the build platform, you should specify the
-"host" platform (i.e., that on which the generated programs will
-eventually be run) with `--host=TYPE'.
-
-Sharing Defaults
-================
-
-   If you want to set default values for `configure' scripts to share,
-you can create a site shell script called `config.site' that gives
-default values for variables like `CC', `cache_file', and `prefix'.
-`configure' looks for `PREFIX/share/config.site' if it exists, then
-`PREFIX/etc/config.site' if it exists.  Or, you can set the
-`CONFIG_SITE' environment variable to the location of the site script.
-A warning: not all `configure' scripts look for a site script.
-
-Defining Variables
-==================
-
-   Variables not defined in a site shell script can be set in the
-environment passed to `configure'.  However, some packages may run
-configure again during the build, and the customized values of these
-variables may be lost.  In order to avoid this problem, you should set
-them in the `configure' command line, using `VAR=value'.  For example:
-
-     ./configure CC=/usr/local2/bin/gcc
-
-causes the specified `gcc' to be used as the C compiler (unless it is
-overridden in the site shell script).
-
-Unfortunately, this technique does not work for `CONFIG_SHELL' due to
-an Autoconf bug.  Until the bug is fixed you can use this workaround:
-
-     CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash
-
-`configure' Invocation
-======================
-
-   `configure' recognizes the following options to control how it
-operates.
-
-`--help'
-`-h'
-     Print a summary of all of the options to `configure', and exit.
-
-`--help=short'
-`--help=recursive'
-     Print a summary of the options unique to this package's
-     `configure', and exit.  The `short' variant lists options used
-     only in the top level, while the `recursive' variant lists options
-     also present in any nested packages.
-
-`--version'
-`-V'
-     Print the version of Autoconf used to generate the `configure'
-     script, and exit.
-
-`--cache-file=FILE'
-     Enable the cache: use and save the results of the tests in FILE,
-     traditionally `config.cache'.  FILE defaults to `/dev/null' to
-     disable caching.
-
-`--config-cache'
-`-C'
-     Alias for `--cache-file=config.cache'.
-
-`--quiet'
-`--silent'
-`-q'
-     Do not print messages saying which checks are being made.  To
-     suppress all normal output, redirect it to `/dev/null' (any error
-     messages will still be shown).
-
-`--srcdir=DIR'
-     Look for the package's source code in directory DIR.  Usually
-     `configure' can determine that directory automatically.
-
-`--prefix=DIR'
-     Use DIR as the installation prefix.  *Note Installation Names::
-     for more details, including other options available for fine-tuning
-     the installation locations.
-
-`--no-create'
-`-n'
-     Run the configure checks, but stop before creating any output
-     files.
-
-`configure' also accepts some other, not widely useful, options.  Run
-`configure --help' for more details.
-
diff --git a/myserver/autogen.sh b/myserver/autogen.sh
index 72d0902..91b17ff 100755
--- a/myserver/autogen.sh
+++ b/myserver/autogen.sh
@@ -19,6 +19,5 @@
 
 
 echo "Creating configuration files for MyServer. Please wait..."
-echo;
 
 autoreconf -fis
diff --git a/myserver/m4/libtool.m4 b/myserver/m4/libtool.m4
deleted file mode 100644
index 1e7ea47..0000000
--- a/myserver/m4/libtool.m4
+++ /dev/null
@@ -1,7376 +0,0 @@
-# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
-#
-#   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
-#                 2006, 2007, 2008 Free Software Foundation, Inc.
-#   Written by Gordon Matzigkeit, 1996
-#
-# This file is free software; the Free Software Foundation gives
-# unlimited permission to copy and/or distribute it, with or without
-# modifications, as long as this notice is preserved.
-
-m4_define([_LT_COPYING], [dnl
-#   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
-#                 2006, 2007, 2008 Free Software Foundation, Inc.
-#   Written by Gordon Matzigkeit, 1996
-#
-#   This file is part of GNU Libtool.
-#
-# GNU Libtool 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 of
-# the License, or (at your option) any later version.
-#
-# As a special exception to the GNU General Public License,
-# if you distribute this file as part of a program or library that
-# is built using GNU Libtool, you may include this file under the
-# same distribution terms that you use for the rest of that program.
-#
-# GNU Libtool 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 GNU Libtool; see the file COPYING.  If not, a copy
-# can be downloaded from http://www.gnu.org/licenses/gpl.html, or
-# obtained by writing to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-])
-
-# serial 56 LT_INIT
-
-
-# LT_PREREQ(VERSION)
-# ------------------
-# Complain and exit if this libtool version is less that VERSION.
-m4_defun([LT_PREREQ],
-[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1,
-       [m4_default([$3],
-		   [m4_fatal([Libtool version $1 or higher is required],
-		             63)])],
-       [$2])])
-
-
-# _LT_CHECK_BUILDDIR
-# ------------------
-# Complain if the absolute build directory name contains unusual characters
-m4_defun([_LT_CHECK_BUILDDIR],
-[case `pwd` in
-  *\ * | *\	*)
-    AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;;
-esac
-])
-
-
-# LT_INIT([OPTIONS])
-# ------------------
-AC_DEFUN([LT_INIT],
-[AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT
-AC_BEFORE([$0], [LT_LANG])dnl
-AC_BEFORE([$0], [LT_OUTPUT])dnl
-AC_BEFORE([$0], [LTDL_INIT])dnl
-m4_require([_LT_CHECK_BUILDDIR])dnl
-
-dnl Autoconf doesn't catch unexpanded LT_ macros by default:
-m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl
-m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl
-dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4
-dnl unless we require an AC_DEFUNed macro:
-AC_REQUIRE([LTOPTIONS_VERSION])dnl
-AC_REQUIRE([LTSUGAR_VERSION])dnl
-AC_REQUIRE([LTVERSION_VERSION])dnl
-AC_REQUIRE([LTOBSOLETE_VERSION])dnl
-m4_require([_LT_PROG_LTMAIN])dnl
-
-dnl Parse OPTIONS
-_LT_SET_OPTIONS([$0], [$1])
-
-# This can be used to rebuild libtool when needed
-LIBTOOL_DEPS="$ltmain"
-
-# Always use our own libtool.
-LIBTOOL='$(SHELL) $(top_builddir)/libtool'
-AC_SUBST(LIBTOOL)dnl
-
-_LT_SETUP
-
-# Only expand once:
-m4_define([LT_INIT])
-])# LT_INIT
-
-# Old names:
-AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT])
-AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT])
-dnl aclocal-1.4 backwards compatibility:
-dnl AC_DEFUN([AC_PROG_LIBTOOL], [])
-dnl AC_DEFUN([AM_PROG_LIBTOOL], [])
-
-
-# _LT_CC_BASENAME(CC)
-# -------------------
-# Calculate cc_basename.  Skip known compiler wrappers and cross-prefix.
-m4_defun([_LT_CC_BASENAME],
-[for cc_temp in $1""; do
-  case $cc_temp in
-    compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
-    distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
-    \-*) ;;
-    *) break;;
-  esac
-done
-cc_basename=`$ECHO "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
-])
-
-
-# _LT_FILEUTILS_DEFAULTS
-# ----------------------
-# It is okay to use these file commands and assume they have been set
-# sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'.
-m4_defun([_LT_FILEUTILS_DEFAULTS],
-[: ${CP="cp -f"}
-: ${MV="mv -f"}
-: ${RM="rm -f"}
-])# _LT_FILEUTILS_DEFAULTS
-
-
-# _LT_SETUP
-# ---------
-m4_defun([_LT_SETUP],
-[AC_REQUIRE([AC_CANONICAL_HOST])dnl
-AC_REQUIRE([AC_CANONICAL_BUILD])dnl
-_LT_DECL([], [host_alias], [0], [The host system])dnl
-_LT_DECL([], [host], [0])dnl
-_LT_DECL([], [host_os], [0])dnl
-dnl
-_LT_DECL([], [build_alias], [0], [The build system])dnl
-_LT_DECL([], [build], [0])dnl
-_LT_DECL([], [build_os], [0])dnl
-dnl
-AC_REQUIRE([AC_PROG_CC])dnl
-AC_REQUIRE([LT_PATH_LD])dnl
-AC_REQUIRE([LT_PATH_NM])dnl
-dnl
-AC_REQUIRE([AC_PROG_LN_S])dnl
-test -z "$LN_S" && LN_S="ln -s"
-_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl
-dnl
-AC_REQUIRE([LT_CMD_MAX_LEN])dnl
-_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl
-_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl
-dnl
-m4_require([_LT_FILEUTILS_DEFAULTS])dnl
-m4_require([_LT_CHECK_SHELL_FEATURES])dnl
-m4_require([_LT_CMD_RELOAD])dnl
-m4_require([_LT_CHECK_MAGIC_METHOD])dnl
-m4_require([_LT_CMD_OLD_ARCHIVE])dnl
-m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
-
-_LT_CONFIG_LIBTOOL_INIT([
-# See if we are running on zsh, and set the options which allow our
-# commands through without removal of \ escapes INIT.
-if test -n "\${ZSH_VERSION+set}" ; then
-   setopt NO_GLOB_SUBST
-fi
-])
-if test -n "${ZSH_VERSION+set}" ; then
-   setopt NO_GLOB_SUBST
-fi
-
-_LT_CHECK_OBJDIR
-
-m4_require([_LT_TAG_COMPILER])dnl
-_LT_PROG_ECHO_BACKSLASH
-
-case $host_os in
-aix3*)
-  # AIX sometimes has problems with the GCC collect2 program.  For some
-  # reason, if we set the COLLECT_NAMES environment variable, the problems
-  # vanish in a puff of smoke.
-  if test "X${COLLECT_NAMES+set}" != Xset; then
-    COLLECT_NAMES=
-    export COLLECT_NAMES
-  fi
-  ;;
-esac
-
-# Sed substitution that helps us do robust quoting.  It backslashifies
-# metacharacters that are still active within double-quoted strings.
-sed_quote_subst='s/\([["`$\\]]\)/\\\1/g'
-
-# Same as above, but do not quote variable references.
-double_quote_subst='s/\([["`\\]]\)/\\\1/g'
-
-# Sed substitution to delay expansion of an escaped shell variable in a
-# double_quote_subst'ed string.
-delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
-
-# Sed substitution to delay expansion of an escaped single quote.
-delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
-
-# Sed substitution to avoid accidental globbing in evaled expressions
-no_glob_subst='s/\*/\\\*/g'
-
-# Global variables:
-ofile=libtool
-can_build_shared=yes
-
-# All known linkers require a `.a' archive for static linking (except MSVC,
-# which needs '.lib').
-libext=a
-
-with_gnu_ld="$lt_cv_prog_gnu_ld"
-
-old_CC="$CC"
-old_CFLAGS="$CFLAGS"
-
-# Set sane defaults for various variables
-test -z "$CC" && CC=cc
-test -z "$LTCC" && LTCC=$CC
-test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
-test -z "$LD" && LD=ld
-test -z "$ac_objext" && ac_objext=o
-
-_LT_CC_BASENAME([$compiler])
-
-# Only perform the check for file, if the check method requires it
-test -z "$MAGIC_CMD" && MAGIC_CMD=file
-case $deplibs_check_method in
-file_magic*)
-  if test "$file_magic_cmd" = '$MAGIC_CMD'; then
-    _LT_PATH_MAGIC
-  fi
-  ;;
-esac
-
-# Use C for the default configuration in the libtool script
-LT_SUPPORTED_TAG([CC])
-_LT_LANG_C_CONFIG
-_LT_LANG_DEFAULT_CONFIG
-_LT_CONFIG_COMMANDS
-])# _LT_SETUP
-
-
-# _LT_PROG_LTMAIN
-# ---------------
-# Note that this code is called both from `configure', and `config.status'
-# now that we use AC_CONFIG_COMMANDS to generate libtool.  Notably,
-# `config.status' has no value for ac_aux_dir unless we are using Automake,
-# so we pass a copy along to make sure it has a sensible value anyway.
-m4_defun([_LT_PROG_LTMAIN],
-[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl
-_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir'])
-ltmain="$ac_aux_dir/ltmain.sh"
-])# _LT_PROG_LTMAIN
-
-
-## ------------------------------------- ##
-## Accumulate code for creating libtool. ##
-## ------------------------------------- ##
-
-# So that we can recreate a full libtool script including additional
-# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS
-# in macros and then make a single call at the end using the `libtool'
-# label.
-
-
-# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS])
-# ----------------------------------------
-# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later.
-m4_define([_LT_CONFIG_LIBTOOL_INIT],
-[m4_ifval([$1],
-          [m4_append([_LT_OUTPUT_LIBTOOL_INIT],
-                     [$1
-])])])
-
-# Initialize.
-m4_define([_LT_OUTPUT_LIBTOOL_INIT])
-
-
-# _LT_CONFIG_LIBTOOL([COMMANDS])
-# ------------------------------
-# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later.
-m4_define([_LT_CONFIG_LIBTOOL],
-[m4_ifval([$1],
-          [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS],
-                     [$1
-])])])
-
-# Initialize.
-m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS])
-
-
-# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS])
-# -----------------------------------------------------
-m4_defun([_LT_CONFIG_SAVE_COMMANDS],
-[_LT_CONFIG_LIBTOOL([$1])
-_LT_CONFIG_LIBTOOL_INIT([$2])
-])
-
-
-# _LT_FORMAT_COMMENT([COMMENT])
-# -----------------------------
-# Add leading comment marks to the start of each line, and a trailing
-# full-stop to the whole comment if one is not present already.
-m4_define([_LT_FORMAT_COMMENT],
-[m4_ifval([$1], [
-m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])],
-              [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.])
-)])
-
-
-
-## ------------------------ ##
-## FIXME: Eliminate VARNAME ##
-## ------------------------ ##
-
-
-# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?])
-# -------------------------------------------------------------------
-# CONFIGNAME is the name given to the value in the libtool script.
-# VARNAME is the (base) name used in the configure script.
-# VALUE may be 0, 1 or 2 for a computed quote escaped value based on
-# VARNAME.  Any other value will be used directly.
-m4_define([_LT_DECL],
-[lt_if_append_uniq([lt_decl_varnames], [$2], [, ],
-    [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name],
-	[m4_ifval([$1], [$1], [$2])])
-    lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3])
-    m4_ifval([$4],
-	[lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])])
-    lt_dict_add_subkey([lt_decl_dict], [$2],
-	[tagged?], [m4_ifval([$5], [yes], [no])])])
-])
-
-
-# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION])
-# --------------------------------------------------------
-m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])])
-
-
-# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...])
-# ------------------------------------------------
-m4_define([lt_decl_tag_varnames],
-[_lt_decl_filter([tagged?], [yes], $@)])
-
-
-# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..])
-# ---------------------------------------------------------
-m4_define([_lt_decl_filter],
-[m4_case([$#],
-  [0], [m4_fatal([$0: too few arguments: $#])],
-  [1], [m4_fatal([$0: too few arguments: $#: $1])],
-  [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)],
-  [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)],
-  [lt_dict_filter([lt_decl_dict], $@)])[]dnl
-])
-
-
-# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...])
-# --------------------------------------------------
-m4_define([lt_decl_quote_varnames],
-[_lt_decl_filter([value], [1], $@)])
-
-
-# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...])
-# ---------------------------------------------------
-m4_define([lt_decl_dquote_varnames],
-[_lt_decl_filter([value], [2], $@)])
-
-
-# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...])
-# ---------------------------------------------------
-m4_define([lt_decl_varnames_tagged],
-[m4_assert([$# <= 2])dnl
-_$0(m4_quote(m4_default([$1], [[, ]])),
-    m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]),
-    m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))])
-m4_define([_lt_decl_varnames_tagged],
-[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])])
-
-
-# lt_decl_all_varnames([SEPARATOR], [VARNAME1...])
-# ------------------------------------------------
-m4_define([lt_decl_all_varnames],
-[_$0(m4_quote(m4_default([$1], [[, ]])),
-     m4_if([$2], [],
-	   m4_quote(lt_decl_varnames),
-	m4_quote(m4_shift($@))))[]dnl
-])
-m4_define([_lt_decl_all_varnames],
-[lt_join($@, lt_decl_varnames_tagged([$1],
-			lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl
-])
-
-
-# _LT_CONFIG_STATUS_DECLARE([VARNAME])
-# ------------------------------------
-# Quote a variable value, and forward it to `config.status' so that its
-# declaration there will have the same value as in `configure'.  VARNAME
-# must have a single quote delimited value for this to work.
-m4_define([_LT_CONFIG_STATUS_DECLARE],
-[$1='`$ECHO "X$][$1" | $Xsed -e "$delay_single_quote_subst"`'])
-
-
-# _LT_CONFIG_STATUS_DECLARATIONS
-# ------------------------------
-# We delimit libtool config variables with single quotes, so when
-# we write them to config.status, we have to be sure to quote all
-# embedded single quotes properly.  In configure, this macro expands
-# each variable declared with _LT_DECL (and _LT_TAGDECL) into:
-#
-#    <var>='`$ECHO "X$<var>" | $Xsed -e "$delay_single_quote_subst"`'
-m4_defun([_LT_CONFIG_STATUS_DECLARATIONS],
-[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames),
-    [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])])
-
-
-# _LT_LIBTOOL_TAGS
-# ----------------
-# Output comment and list of tags supported by the script
-m4_defun([_LT_LIBTOOL_TAGS],
-[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl
-available_tags="_LT_TAGS"dnl
-])
-
-
-# _LT_LIBTOOL_DECLARE(VARNAME, [TAG])
-# -----------------------------------
-# Extract the dictionary values for VARNAME (optionally with TAG) and
-# expand to a commented shell variable setting:
-#
-#    # Some comment about what VAR is for.
-#    visible_name=$lt_internal_name
-m4_define([_LT_LIBTOOL_DECLARE],
-[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1],
-					   [description])))[]dnl
-m4_pushdef([_libtool_name],
-    m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl
-m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])),
-    [0], [_libtool_name=[$]$1],
-    [1], [_libtool_name=$lt_[]$1],
-    [2], [_libtool_name=$lt_[]$1],
-    [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl
-m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl
-])
-
-
-# _LT_LIBTOOL_CONFIG_VARS
-# -----------------------
-# Produce commented declarations of non-tagged libtool config variables
-# suitable for insertion in the LIBTOOL CONFIG section of the `libtool'
-# script.  Tagged libtool config variables (even for the LIBTOOL CONFIG
-# section) are produced by _LT_LIBTOOL_TAG_VARS.
-m4_defun([_LT_LIBTOOL_CONFIG_VARS],
-[m4_foreach([_lt_var],
-    m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)),
-    [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])])
-
-
-# _LT_LIBTOOL_TAG_VARS(TAG)
-# -------------------------
-m4_define([_LT_LIBTOOL_TAG_VARS],
-[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames),
-    [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])])
-
-
-# _LT_TAGVAR(VARNAME, [TAGNAME])
-# ------------------------------
-m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])])
-
-
-# _LT_CONFIG_COMMANDS
-# -------------------
-# Send accumulated output to $CONFIG_STATUS.  Thanks to the lists of
-# variables for single and double quote escaping we saved from calls
-# to _LT_DECL, we can put quote escaped variables declarations
-# into `config.status', and then the shell code to quote escape them in
-# for loops in `config.status'.  Finally, any additional code accumulated
-# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded.
-m4_defun([_LT_CONFIG_COMMANDS],
-[AC_PROVIDE_IFELSE([LT_OUTPUT],
-	dnl If the libtool generation code has been placed in $CONFIG_LT,
-	dnl instead of duplicating it all over again into config.status,
-	dnl then we will have config.status run $CONFIG_LT later, so it
-	dnl needs to know what name is stored there:
-        [AC_CONFIG_COMMANDS([libtool],
-            [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])],
-    dnl If the libtool generation code is destined for config.status,
-    dnl expand the accumulated commands and init code now:
-    [AC_CONFIG_COMMANDS([libtool],
-        [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])])
-])#_LT_CONFIG_COMMANDS
-
-
-# Initialize.
-m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT],
-[
-
-# The HP-UX ksh and POSIX shell print the target directory to stdout
-# if CDPATH is set.
-(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
-
-sed_quote_subst='$sed_quote_subst'
-double_quote_subst='$double_quote_subst'
-delay_variable_subst='$delay_variable_subst'
-_LT_CONFIG_STATUS_DECLARATIONS
-LTCC='$LTCC'
-LTCFLAGS='$LTCFLAGS'
-compiler='$compiler_DEFAULT'
-
-# Quote evaled strings.
-for var in lt_decl_all_varnames([[ \
-]], lt_decl_quote_varnames); do
-    case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in
-    *[[\\\\\\\`\\"\\\$]]*)
-      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$sed_quote_subst\\"\\\`\\\\\\""
-      ;;
-    *)
-      eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
-      ;;
-    esac
-done
-
-# Double-quote double-evaled strings.
-for var in lt_decl_all_varnames([[ \
-]], lt_decl_dquote_varnames); do
-    case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in
-    *[[\\\\\\\`\\"\\\$]]*)
-      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\""
-      ;;
-    *)
-      eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
-      ;;
-    esac
-done
-
-# Fix-up fallback echo if it was mangled by the above quoting rules.
-case \$lt_ECHO in
-*'\\\[$]0 --fallback-echo"')dnl "
-  lt_ECHO=\`\$ECHO "X\$lt_ECHO" | \$Xsed -e 's/\\\\\\\\\\\\\\\[$]0 --fallback-echo"\[$]/\[$]0 --fallback-echo"/'\`
-  ;;
-esac
-
-_LT_OUTPUT_LIBTOOL_INIT
-])
-
-
-# LT_OUTPUT
-# ---------
-# This macro allows early generation of the libtool script (before
-# AC_OUTPUT is called), incase it is used in configure for compilation
-# tests.
-AC_DEFUN([LT_OUTPUT],
-[: ${CONFIG_LT=./config.lt}
-AC_MSG_NOTICE([creating $CONFIG_LT])
-cat >"$CONFIG_LT" <<_LTEOF
-#! $SHELL
-# Generated by $as_me.
-# Run this file to recreate a libtool stub with the current configuration.
-
-lt_cl_silent=false
-SHELL=\${CONFIG_SHELL-$SHELL}
-_LTEOF
-
-cat >>"$CONFIG_LT" <<\_LTEOF
-AS_SHELL_SANITIZE
-_AS_PREPARE
-
-exec AS_MESSAGE_FD>&1
-exec AS_MESSAGE_LOG_FD>>config.log
-{
-  echo
-  AS_BOX([Running $as_me.])
-} >&AS_MESSAGE_LOG_FD
-
-lt_cl_help="\
-\`$as_me' creates a local libtool stub from the current configuration,
-for use in further configure time tests before the real libtool is
-generated.
-
-Usage: $[0] [[OPTIONS]]
-
-  -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
-
-Report bugs to <bug-libtool@gnu.org>."
-
-lt_cl_version="\
-m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl
-m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION])
-configured by $[0], generated by m4_PACKAGE_STRING.
-
-Copyright (C) 2008 Free Software Foundation, Inc.
-This config.lt script is free software; the Free Software Foundation
-gives unlimited permision to copy, distribute and modify it."
-
-while test $[#] != 0
-do
-  case $[1] in
-    --version | --v* | -V )
-      echo "$lt_cl_version"; exit 0 ;;
-    --help | --h* | -h )
-      echo "$lt_cl_help"; exit 0 ;;
-    --debug | --d* | -d )
-      debug=: ;;
-    --quiet | --q* | --silent | --s* | -q )
-      lt_cl_silent=: ;;
-
-    -*) AC_MSG_ERROR([unrecognized option: $[1]
-Try \`$[0] --help' for more information.]) ;;
-
-    *) AC_MSG_ERROR([unrecognized argument: $[1]
-Try \`$[0] --help' for more information.]) ;;
-  esac
-  shift
-done
-
-if $lt_cl_silent; then
-  exec AS_MESSAGE_FD>/dev/null
-fi
-_LTEOF
-
-cat >>"$CONFIG_LT" <<_LTEOF
-_LT_OUTPUT_LIBTOOL_COMMANDS_INIT
-_LTEOF
-
-cat >>"$CONFIG_LT" <<\_LTEOF
-AC_MSG_NOTICE([creating $ofile])
-_LT_OUTPUT_LIBTOOL_COMMANDS
-AS_EXIT(0)
-_LTEOF
-chmod +x "$CONFIG_LT"
-
-# configure is writing to config.log, but config.lt does its own redirection,
-# appending to config.log, which fails on DOS, as config.log is still kept
-# open by configure.  Here we exec the FD to /dev/null, effectively closing
-# config.log, so it can be properly (re)opened and appended to by config.lt.
-if test "$no_create" != yes; then
-  lt_cl_success=:
-  test "$silent" = yes &&
-    lt_config_lt_args="$lt_config_lt_args --quiet"
-  exec AS_MESSAGE_LOG_FD>/dev/null
-  $SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false
-  exec AS_MESSAGE_LOG_FD>>config.log
-  $lt_cl_success || AS_EXIT(1)
-fi
-])# LT_OUTPUT
-
-
-# _LT_CONFIG(TAG)
-# ---------------
-# If TAG is the built-in tag, create an initial libtool script with a
-# default configuration from the untagged config vars.  Otherwise add code
-# to config.status for appending the configuration named by TAG from the
-# matching tagged config vars.
-m4_defun([_LT_CONFIG],
-[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
-_LT_CONFIG_SAVE_COMMANDS([
-  m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl
-  m4_if(_LT_TAG, [C], [
-    # See if we are running on zsh, and set the options which allow our
-    # commands through without removal of \ escapes.
-    if test -n "${ZSH_VERSION+set}" ; then
-      setopt NO_GLOB_SUBST
-    fi
-
-    cfgfile="${ofile}T"
-    trap "$RM \"$cfgfile\"; exit 1" 1 2 15
-    $RM "$cfgfile"
-
-    cat <<_LT_EOF >> "$cfgfile"
-#! $SHELL
-
-# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
-# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION
-# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
-# NOTE: Changes made to this file will be lost: look at ltmain.sh.
-#
-_LT_COPYING
-_LT_LIBTOOL_TAGS
-
-# ### BEGIN LIBTOOL CONFIG
-_LT_LIBTOOL_CONFIG_VARS
-_LT_LIBTOOL_TAG_VARS
-# ### END LIBTOOL CONFIG
-
-_LT_EOF
-
-  case $host_os in
-  aix3*)
-    cat <<\_LT_EOF >> "$cfgfile"
-# AIX sometimes has problems with the GCC collect2 program.  For some
-# reason, if we set the COLLECT_NAMES environment variable, the problems
-# vanish in a puff of smoke.
-if test "X${COLLECT_NAMES+set}" != Xset; then
-  COLLECT_NAMES=
-  export COLLECT_NAMES
-fi
-_LT_EOF
-    ;;
-  esac
-
-  _LT_PROG_LTMAIN
-
-  # We use sed instead of cat because bash on DJGPP gets confused if
-  # if finds mixed CR/LF and LF-only lines.  Since sed operates in
-  # text mode, it properly converts lines to CR/LF.  This bash problem
-  # is reportedly fixed, but why not run on old versions too?
-  sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \
-    || (rm -f "$cfgfile"; exit 1)
-
-  _LT_PROG_XSI_SHELLFNS
-
-  sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \
-    || (rm -f "$cfgfile"; exit 1)
-
-  mv -f "$cfgfile" "$ofile" ||
-    (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
-  chmod +x "$ofile"
-],
-[cat <<_LT_EOF >> "$ofile"
-
-dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded
-dnl in a comment (ie after a #).
-# ### BEGIN LIBTOOL TAG CONFIG: $1
-_LT_LIBTOOL_TAG_VARS(_LT_TAG)
-# ### END LIBTOOL TAG CONFIG: $1
-_LT_EOF
-])dnl /m4_if
-],
-[m4_if([$1], [], [
-    PACKAGE='$PACKAGE'
-    VERSION='$VERSION'
-    TIMESTAMP='$TIMESTAMP'
-    RM='$RM'
-    ofile='$ofile'], [])
-])dnl /_LT_CONFIG_SAVE_COMMANDS
-])# _LT_CONFIG
-
-
-# LT_SUPPORTED_TAG(TAG)
-# ---------------------
-# Trace this macro to discover what tags are supported by the libtool
-# --tag option, using:
-#    autoconf --trace 'LT_SUPPORTED_TAG:$1'
-AC_DEFUN([LT_SUPPORTED_TAG], [])
-
-
-# C support is built-in for now
-m4_define([_LT_LANG_C_enabled], [])
-m4_define([_LT_TAGS], [])
-
-
-# LT_LANG(LANG)
-# -------------
-# Enable libtool support for the given language if not already enabled.
-AC_DEFUN([LT_LANG],
-[AC_BEFORE([$0], [LT_OUTPUT])dnl
-m4_case([$1],
-  [C],			[_LT_LANG(C)],
-  [C++],		[_LT_LANG(CXX)],
-  [Java],		[_LT_LANG(GCJ)],
-  [Fortran 77],		[_LT_LANG(F77)],
-  [Fortran],		[_LT_LANG(FC)],
-  [Windows Resource],	[_LT_LANG(RC)],
-  [m4_ifdef([_LT_LANG_]$1[_CONFIG],
-    [_LT_LANG($1)],
-    [m4_fatal([$0: unsupported language: "$1"])])])dnl
-])# LT_LANG
-
-
-# _LT_LANG(LANGNAME)
-# ------------------
-m4_defun([_LT_LANG],
-[m4_ifdef([_LT_LANG_]$1[_enabled], [],
-  [LT_SUPPORTED_TAG([$1])dnl
-  m4_append([_LT_TAGS], [$1 ])dnl
-  m4_define([_LT_LANG_]$1[_enabled], [])dnl
-  _LT_LANG_$1_CONFIG($1)])dnl
-])# _LT_LANG
-
-
-# _LT_LANG_DEFAULT_CONFIG
-# -----------------------
-m4_defun([_LT_LANG_DEFAULT_CONFIG],
-[AC_PROVIDE_IFELSE([AC_PROG_CXX],
-  [LT_LANG(CXX)],
-  [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])])
-
-AC_PROVIDE_IFELSE([AC_PROG_F77],
-  [LT_LANG(F77)],
-  [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])])
-
-AC_PROVIDE_IFELSE([AC_PROG_FC],
-  [LT_LANG(FC)],
-  [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])])
-
-dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal
-dnl pulling things in needlessly.
-AC_PROVIDE_IFELSE([AC_PROG_GCJ],
-  [LT_LANG(GCJ)],
-  [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
-    [LT_LANG(GCJ)],
-    [AC_PROVIDE_IFELSE([LT_PROG_GCJ],
-      [LT_LANG(GCJ)],
-      [m4_ifdef([AC_PROG_GCJ],
-	[m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])])
-       m4_ifdef([A][M_PROG_GCJ],
-	[m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])])
-       m4_ifdef([LT_PROG_GCJ],
-	[m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])])
-
-AC_PROVIDE_IFELSE([LT_PROG_RC],
-  [LT_LANG(RC)],
-  [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])])
-])# _LT_LANG_DEFAULT_CONFIG
-
-# Obsolete macros:
-AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)])
-AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)])
-AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)])
-AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)])
-dnl aclocal-1.4 backwards compatibility:
-dnl AC_DEFUN([AC_LIBTOOL_CXX], [])
-dnl AC_DEFUN([AC_LIBTOOL_F77], [])
-dnl AC_DEFUN([AC_LIBTOOL_FC], [])
-dnl AC_DEFUN([AC_LIBTOOL_GCJ], [])
-
-
-# _LT_TAG_COMPILER
-# ----------------
-m4_defun([_LT_TAG_COMPILER],
-[AC_REQUIRE([AC_PROG_CC])dnl
-
-_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl
-_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl
-_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl
-_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl
-
-# If no C compiler was specified, use CC.
-LTCC=${LTCC-"$CC"}
-
-# If no C compiler flags were specified, use CFLAGS.
-LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
-
-# Allow CC to be a program name with arguments.
-compiler=$CC
-])# _LT_TAG_COMPILER
-
-
-# _LT_COMPILER_BOILERPLATE
-# ------------------------
-# Check for compiler boilerplate output or warnings with
-# the simple compiler test code.
-m4_defun([_LT_COMPILER_BOILERPLATE],
-[m4_require([_LT_DECL_SED])dnl
-ac_outfile=conftest.$ac_objext
-echo "$lt_simple_compile_test_code" >conftest.$ac_ext
-eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
-_lt_compiler_boilerplate=`cat conftest.err`
-$RM conftest*
-])# _LT_COMPILER_BOILERPLATE
-
-
-# _LT_LINKER_BOILERPLATE
-# ----------------------
-# Check for linker boilerplate output or warnings with
-# the simple link test code.
-m4_defun([_LT_LINKER_BOILERPLATE],
-[m4_require([_LT_DECL_SED])dnl
-ac_outfile=conftest.$ac_objext
-echo "$lt_simple_link_test_code" >conftest.$ac_ext
-eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
-_lt_linker_boilerplate=`cat conftest.err`
-$RM -r conftest*
-])# _LT_LINKER_BOILERPLATE
-
-# _LT_REQUIRED_DARWIN_CHECKS
-# -------------------------
-m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
-  case $host_os in
-    rhapsody* | darwin*)
-    AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:])
-    AC_CHECK_TOOL([NMEDIT], [nmedit], [:])
-    AC_CHECK_TOOL([LIPO], [lipo], [:])
-    AC_CHECK_TOOL([OTOOL], [otool], [:])
-    AC_CHECK_TOOL([OTOOL64], [otool64], [:])
-    _LT_DECL([], [DSYMUTIL], [1],
-      [Tool to manipulate archived DWARF debug symbol files on Mac OS X])
-    _LT_DECL([], [NMEDIT], [1],
-      [Tool to change global to local symbols on Mac OS X])
-    _LT_DECL([], [LIPO], [1],
-      [Tool to manipulate fat objects and archives on Mac OS X])
-    _LT_DECL([], [OTOOL], [1],
-      [ldd/readelf like tool for Mach-O binaries on Mac OS X])
-    _LT_DECL([], [OTOOL64], [1],
-      [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4])
-
-    AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod],
-      [lt_cv_apple_cc_single_mod=no
-      if test -z "${LT_MULTI_MODULE}"; then
-	# By default we will add the -single_module flag. You can override
-	# by either setting the environment variable LT_MULTI_MODULE
-	# non-empty at configure time, or by adding -multi_module to the
-	# link flags.
-	rm -rf libconftest.dylib*
-	echo "int foo(void){return 1;}" > conftest.c
-	echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
--dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD
-	$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
-	  -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
-        _lt_result=$?
-	if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then
-	  lt_cv_apple_cc_single_mod=yes
-	else
-	  cat conftest.err >&AS_MESSAGE_LOG_FD
-	fi
-	rm -rf libconftest.dylib*
-	rm -f conftest.*
-      fi])
-    AC_CACHE_CHECK([for -exported_symbols_list linker flag],
-      [lt_cv_ld_exported_symbols_list],
-      [lt_cv_ld_exported_symbols_list=no
-      save_LDFLAGS=$LDFLAGS
-      echo "_main" > conftest.sym
-      LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
-      AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
-	[lt_cv_ld_exported_symbols_list=yes],
-	[lt_cv_ld_exported_symbols_list=no])
-	LDFLAGS="$save_LDFLAGS"
-    ])
-    case $host_os in
-    rhapsody* | darwin1.[[012]])
-      _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
-    darwin1.*)
-      _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
-    darwin*) # darwin 5.x on
-      # if running on 10.5 or later, the deployment target defaults
-      # to the OS version, if on x86, and 10.4, the deployment
-      # target defaults to 10.4. Don't you love it?
-      case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
-	10.0,*86*-darwin8*|10.0,*-darwin[[91]]*)
-	  _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
-	10.[[012]]*)
-	  _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
-	10.*)
-	  _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
-      esac
-    ;;
-  esac
-    if test "$lt_cv_apple_cc_single_mod" = "yes"; then
-      _lt_dar_single_mod='$single_module'
-    fi
-    if test "$lt_cv_ld_exported_symbols_list" = "yes"; then
-      _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym'
-    else
-      _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}'
-    fi
-    if test "$DSYMUTIL" != ":"; then
-      _lt_dsymutil='~$DSYMUTIL $lib || :'
-    else
-      _lt_dsymutil=
-    fi
-    ;;
-  esac
-])
-
-
-# _LT_DARWIN_LINKER_FEATURES
-# --------------------------
-# Checks for linker and compiler features on darwin
-m4_defun([_LT_DARWIN_LINKER_FEATURES],
-[
-  m4_require([_LT_REQUIRED_DARWIN_CHECKS])
-  _LT_TAGVAR(archive_cmds_need_lc, $1)=no
-  _LT_TAGVAR(hardcode_direct, $1)=no
-  _LT_TAGVAR(hardcode_automatic, $1)=yes
-  _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
-  _LT_TAGVAR(whole_archive_flag_spec, $1)=''
-  _LT_TAGVAR(link_all_deplibs, $1)=yes
-  _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined"
-  case $cc_basename in
-     ifort*) _lt_dar_can_shared=yes ;;
-     *) _lt_dar_can_shared=$GCC ;;
-  esac
-  if test "$_lt_dar_can_shared" = "yes"; then
-    output_verbose_link_cmd=echo
-    _LT_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}"
-    _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
-    _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}"
-    _LT_TAGVAR(module_expsym_cmds, $1)="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}"
-    m4_if([$1], [CXX],
-[   if test "$lt_cv_apple_cc_single_mod" != "yes"; then
-      _LT_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}"
-      _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}"
-    fi
-],[])
-  else
-  _LT_TAGVAR(ld_shlibs, $1)=no
-  fi
-])
-
-# _LT_SYS_MODULE_PATH_AIX
-# -----------------------
-# Links a minimal program and checks the executable
-# for the system default hardcoded library path. In most cases,
-# this is /usr/lib:/lib, but when the MPI compilers are used
-# the location of the communication and MPI libs are included too.
-# If we don't find anything, use the default library path according
-# to the aix ld manual.
-m4_defun([_LT_SYS_MODULE_PATH_AIX],
-[m4_require([_LT_DECL_SED])dnl
-AC_LINK_IFELSE(AC_LANG_PROGRAM,[
-lt_aix_libpath_sed='
-    /Import File Strings/,/^$/ {
-	/^0/ {
-	    s/^0  *\(.*\)$/\1/
-	    p
-	}
-    }'
-aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
-# Check for a 64-bit object if we didn't find anything.
-if test -z "$aix_libpath"; then
-  aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
-fi],[])
-if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
-])# _LT_SYS_MODULE_PATH_AIX
-
-
-# _LT_SHELL_INIT(ARG)
-# -------------------
-m4_define([_LT_SHELL_INIT],
-[ifdef([AC_DIVERSION_NOTICE],
-	     [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
-	 [AC_DIVERT_PUSH(NOTICE)])
-$1
-AC_DIVERT_POP
-])# _LT_SHELL_INIT
-
-
-# _LT_PROG_ECHO_BACKSLASH
-# -----------------------
-# Add some code to the start of the generated configure script which
-# will find an echo command which doesn't interpret backslashes.
-m4_defun([_LT_PROG_ECHO_BACKSLASH],
-[_LT_SHELL_INIT([
-# Check that we are running under the correct shell.
-SHELL=${CONFIG_SHELL-/bin/sh}
-
-case X$lt_ECHO in
-X*--fallback-echo)
-  # Remove one level of quotation (which was required for Make).
-  ECHO=`echo "$lt_ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
-  ;;
-esac
-
-ECHO=${lt_ECHO-echo}
-if test "X[$]1" = X--no-reexec; then
-  # Discard the --no-reexec flag, and continue.
-  shift
-elif test "X[$]1" = X--fallback-echo; then
-  # Avoid inline document here, it may be left over
-  :
-elif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' ; then
-  # Yippee, $ECHO works!
-  :
-else
-  # Restart under the correct shell.
-  exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
-fi
-
-if test "X[$]1" = X--fallback-echo; then
-  # used as fallback echo
-  shift
-  cat <<_LT_EOF
-[$]*
-_LT_EOF
-  exit 0
-fi
-
-# The HP-UX ksh and POSIX shell print the target directory to stdout
-# if CDPATH is set.
-(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
-
-if test -z "$lt_ECHO"; then
-  if test "X${echo_test_string+set}" != Xset; then
-    # find a string as large as possible, as long as the shell can cope with it
-    for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
-      # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
-      if { echo_test_string=`eval $cmd`; } 2>/dev/null &&
-	 { test "X$echo_test_string" = "X$echo_test_string"; } 2>/dev/null
-      then
-        break
-      fi
-    done
-  fi
-
-  if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' &&
-     echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` &&
-     test "X$echo_testing_string" = "X$echo_test_string"; then
-    :
-  else
-    # The Solaris, AIX, and Digital Unix default echo programs unquote
-    # backslashes.  This makes it impossible to quote backslashes using
-    #   echo "$something" | sed 's/\\/\\\\/g'
-    #
-    # So, first we look for a working echo in the user's PATH.
-
-    lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
-    for dir in $PATH /usr/ucb; do
-      IFS="$lt_save_ifs"
-      if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
-         test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
-         echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
-         test "X$echo_testing_string" = "X$echo_test_string"; then
-        ECHO="$dir/echo"
-        break
-      fi
-    done
-    IFS="$lt_save_ifs"
-
-    if test "X$ECHO" = Xecho; then
-      # We didn't find a better echo, so look for alternatives.
-      if test "X`{ print -r '\t'; } 2>/dev/null`" = 'X\t' &&
-         echo_testing_string=`{ print -r "$echo_test_string"; } 2>/dev/null` &&
-         test "X$echo_testing_string" = "X$echo_test_string"; then
-        # This shell has a builtin print -r that does the trick.
-        ECHO='print -r'
-      elif { test -f /bin/ksh || test -f /bin/ksh$ac_exeext; } &&
-	   test "X$CONFIG_SHELL" != X/bin/ksh; then
-        # If we have ksh, try running configure again with it.
-        ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
-        export ORIGINAL_CONFIG_SHELL
-        CONFIG_SHELL=/bin/ksh
-        export CONFIG_SHELL
-        exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
-      else
-        # Try using printf.
-        ECHO='printf %s\n'
-        if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' &&
-	   echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` &&
-	   test "X$echo_testing_string" = "X$echo_test_string"; then
-	  # Cool, printf works
-	  :
-        elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
-	     test "X$echo_testing_string" = 'X\t' &&
-	     echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
-	     test "X$echo_testing_string" = "X$echo_test_string"; then
-	  CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
-	  export CONFIG_SHELL
-	  SHELL="$CONFIG_SHELL"
-	  export SHELL
-	  ECHO="$CONFIG_SHELL [$]0 --fallback-echo"
-        elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
-	     test "X$echo_testing_string" = 'X\t' &&
-	     echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
-	     test "X$echo_testing_string" = "X$echo_test_string"; then
-	  ECHO="$CONFIG_SHELL [$]0 --fallback-echo"
-        else
-	  # maybe with a smaller string...
-	  prev=:
-
-	  for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do
-	    if { test "X$echo_test_string" = "X`eval $cmd`"; } 2>/dev/null
-	    then
-	      break
-	    fi
-	    prev="$cmd"
-	  done
-
-	  if test "$prev" != 'sed 50q "[$]0"'; then
-	    echo_test_string=`eval $prev`
-	    export echo_test_string
-	    exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"}
-	  else
-	    # Oops.  We lost completely, so just stick with echo.
-	    ECHO=echo
-	  fi
-        fi
-      fi
-    fi
-  fi
-fi
-
-# Copy echo and quote the copy suitably for passing to libtool from
-# the Makefile, instead of quoting the original, which is used later.
-lt_ECHO=$ECHO
-if test "X$lt_ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
-   lt_ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
-fi
-
-AC_SUBST(lt_ECHO)
-])
-_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts])
-_LT_DECL([], [ECHO], [1],
-    [An echo program that does not interpret backslashes])
-])# _LT_PROG_ECHO_BACKSLASH
-
-
-# _LT_ENABLE_LOCK
-# ---------------
-m4_defun([_LT_ENABLE_LOCK],
-[AC_ARG_ENABLE([libtool-lock],
-  [AS_HELP_STRING([--disable-libtool-lock],
-    [avoid locking (might break parallel builds)])])
-test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
-
-# Some flags need to be propagated to the compiler or linker for good
-# libtool support.
-case $host in
-ia64-*-hpux*)
-  # Find out which ABI we are using.
-  echo 'int i;' > conftest.$ac_ext
-  if AC_TRY_EVAL(ac_compile); then
-    case `/usr/bin/file conftest.$ac_objext` in
-      *ELF-32*)
-	HPUX_IA64_MODE="32"
-	;;
-      *ELF-64*)
-	HPUX_IA64_MODE="64"
-	;;
-    esac
-  fi
-  rm -rf conftest*
-  ;;
-*-*-irix6*)
-  # Find out which ABI we are using.
-  echo '[#]line __oline__ "configure"' > conftest.$ac_ext
-  if AC_TRY_EVAL(ac_compile); then
-    if test "$lt_cv_prog_gnu_ld" = yes; then
-      case `/usr/bin/file conftest.$ac_objext` in
-	*32-bit*)
-	  LD="${LD-ld} -melf32bsmip"
-	  ;;
-	*N32*)
-	  LD="${LD-ld} -melf32bmipn32"
-	  ;;
-	*64-bit*)
-	  LD="${LD-ld} -melf64bmip"
-	;;
-      esac
-    else
-      case `/usr/bin/file conftest.$ac_objext` in
-	*32-bit*)
-	  LD="${LD-ld} -32"
-	  ;;
-	*N32*)
-	  LD="${LD-ld} -n32"
-	  ;;
-	*64-bit*)
-	  LD="${LD-ld} -64"
-	  ;;
-      esac
-    fi
-  fi
-  rm -rf conftest*
-  ;;
-
-x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
-s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
-  # Find out which ABI we are using.
-  echo 'int i;' > conftest.$ac_ext
-  if AC_TRY_EVAL(ac_compile); then
-    case `/usr/bin/file conftest.o` in
-      *32-bit*)
-	case $host in
-	  x86_64-*kfreebsd*-gnu)
-	    LD="${LD-ld} -m elf_i386_fbsd"
-	    ;;
-	  x86_64-*linux*)
-	    LD="${LD-ld} -m elf_i386"
-	    ;;
-	  ppc64-*linux*|powerpc64-*linux*)
-	    LD="${LD-ld} -m elf32ppclinux"
-	    ;;
-	  s390x-*linux*)
-	    LD="${LD-ld} -m elf_s390"
-	    ;;
-	  sparc64-*linux*)
-	    LD="${LD-ld} -m elf32_sparc"
-	    ;;
-	esac
-	;;
-      *64-bit*)
-	case $host in
-	  x86_64-*kfreebsd*-gnu)
-	    LD="${LD-ld} -m elf_x86_64_fbsd"
-	    ;;
-	  x86_64-*linux*)
-	    LD="${LD-ld} -m elf_x86_64"
-	    ;;
-	  ppc*-*linux*|powerpc*-*linux*)
-	    LD="${LD-ld} -m elf64ppc"
-	    ;;
-	  s390*-*linux*|s390*-*tpf*)
-	    LD="${LD-ld} -m elf64_s390"
-	    ;;
-	  sparc*-*linux*)
-	    LD="${LD-ld} -m elf64_sparc"
-	    ;;
-	esac
-	;;
-    esac
-  fi
-  rm -rf conftest*
-  ;;
-
-*-*-sco3.2v5*)
-  # On SCO OpenServer 5, we need -belf to get full-featured binaries.
-  SAVE_CFLAGS="$CFLAGS"
-  CFLAGS="$CFLAGS -belf"
-  AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
-    [AC_LANG_PUSH(C)
-     AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
-     AC_LANG_POP])
-  if test x"$lt_cv_cc_needs_belf" != x"yes"; then
-    # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
-    CFLAGS="$SAVE_CFLAGS"
-  fi
-  ;;
-sparc*-*solaris*)
-  # Find out which ABI we are using.
-  echo 'int i;' > conftest.$ac_ext
-  if AC_TRY_EVAL(ac_compile); then
-    case `/usr/bin/file conftest.o` in
-    *64-bit*)
-      case $lt_cv_prog_gnu_ld in
-      yes*) LD="${LD-ld} -m elf64_sparc" ;;
-      *)
-	if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
-	  LD="${LD-ld} -64"
-	fi
-	;;
-      esac
-      ;;
-    esac
-  fi
-  rm -rf conftest*
-  ;;
-esac
-
-need_locks="$enable_libtool_lock"
-])# _LT_ENABLE_LOCK
-
-
-# _LT_CMD_OLD_ARCHIVE
-# -------------------
-m4_defun([_LT_CMD_OLD_ARCHIVE],
-[AC_CHECK_TOOL(AR, ar, false)
-test -z "$AR" && AR=ar
-test -z "$AR_FLAGS" && AR_FLAGS=cru
-_LT_DECL([], [AR], [1], [The archiver])
-_LT_DECL([], [AR_FLAGS], [1])
-
-AC_CHECK_TOOL(STRIP, strip, :)
-test -z "$STRIP" && STRIP=:
-_LT_DECL([], [STRIP], [1], [A symbol stripping program])
-
-AC_CHECK_TOOL(RANLIB, ranlib, :)
-test -z "$RANLIB" && RANLIB=:
-_LT_DECL([], [RANLIB], [1],
-    [Commands used to install an old-style archive])
-
-# Determine commands to create old-style static archives.
-old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
-old_postinstall_cmds='chmod 644 $oldlib'
-old_postuninstall_cmds=
-
-if test -n "$RANLIB"; then
-  case $host_os in
-  openbsd*)
-    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib"
-    ;;
-  *)
-    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
-    ;;
-  esac
-  old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
-fi
-_LT_DECL([], [old_postinstall_cmds], [2])
-_LT_DECL([], [old_postuninstall_cmds], [2])
-_LT_TAGDECL([], [old_archive_cmds], [2],
-    [Commands used to build an old-style archive])
-])# _LT_CMD_OLD_ARCHIVE
-
-
-# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
-#		[OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
-# ----------------------------------------------------------------
-# Check whether the given compiler option works
-AC_DEFUN([_LT_COMPILER_OPTION],
-[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
-m4_require([_LT_DECL_SED])dnl
-AC_CACHE_CHECK([$1], [$2],
-  [$2=no
-   m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
-   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
-   lt_compiler_flag="$3"
-   # Insert the option either (1) after the last *FLAGS variable, or
-   # (2) before a word containing "conftest.", or (3) at the end.
-   # Note that $ac_compile itself does not contain backslashes and begins
-   # with a dollar sign (not a hyphen), so the echo should work correctly.
-   # The option is referenced via a variable to avoid confusing sed.
-   lt_compile=`echo "$ac_compile" | $SED \
-   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
-   -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
-   (eval "$lt_compile" 2>conftest.err)
-   ac_status=$?
-   cat conftest.err >&AS_MESSAGE_LOG_FD
-   echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
-   if (exit $ac_status) && test -s "$ac_outfile"; then
-     # The compiler can only warn and ignore the option if not recognized
-     # So say no if there are warnings other than the usual output.
-     $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
-     $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
-     if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
-       $2=yes
-     fi
-   fi
-   $RM conftest*
-])
-
-if test x"[$]$2" = xyes; then
-    m4_if([$5], , :, [$5])
-else
-    m4_if([$6], , :, [$6])
-fi
-])# _LT_COMPILER_OPTION
-
-# Old name:
-AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION])
-dnl aclocal-1.4 backwards compatibility:
-dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], [])
-
-
-# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
-#                  [ACTION-SUCCESS], [ACTION-FAILURE])
-# ----------------------------------------------------
-# Check whether the given linker option works
-AC_DEFUN([_LT_LINKER_OPTION],
-[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
-m4_require([_LT_DECL_SED])dnl
-AC_CACHE_CHECK([$1], [$2],
-  [$2=no
-   save_LDFLAGS="$LDFLAGS"
-   LDFLAGS="$LDFLAGS $3"
-   echo "$lt_simple_link_test_code" > conftest.$ac_ext
-   if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
-     # The linker can only warn and ignore the option if not recognized
-     # So say no if there are warnings
-     if test -s conftest.err; then
-       # Append any errors to the config.log.
-       cat conftest.err 1>&AS_MESSAGE_LOG_FD
-       $ECHO "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
-       $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
-       if diff conftest.exp conftest.er2 >/dev/null; then
-         $2=yes
-       fi
-     else
-       $2=yes
-     fi
-   fi
-   $RM -r conftest*
-   LDFLAGS="$save_LDFLAGS"
-])
-
-if test x"[$]$2" = xyes; then
-    m4_if([$4], , :, [$4])
-else
-    m4_if([$5], , :, [$5])
-fi
-])# _LT_LINKER_OPTION
-
-# Old name:
-AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION])
-dnl aclocal-1.4 backwards compatibility:
-dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], [])
-
-
-# LT_CMD_MAX_LEN
-#---------------
-AC_DEFUN([LT_CMD_MAX_LEN],
-[AC_REQUIRE([AC_CANONICAL_HOST])dnl
-# find the maximum length of command line arguments
-AC_MSG_CHECKING([the maximum length of command line arguments])
-AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
-  i=0
-  teststring="ABCD"
-
-  case $build_os in
-  msdosdjgpp*)
-    # On DJGPP, this test can blow up pretty badly due to problems in libc
-    # (any single argument exceeding 2000 bytes causes a buffer overrun
-    # during glob expansion).  Even if it were fixed, the result of this
-    # check would be larger than it should be.
-    lt_cv_sys_max_cmd_len=12288;    # 12K is about right
-    ;;
-
-  gnu*)
-    # Under GNU Hurd, this test is not required because there is
-    # no limit to the length of command line arguments.
-    # Libtool will interpret -1 as no limit whatsoever
-    lt_cv_sys_max_cmd_len=-1;
-    ;;
-
-  cygwin* | mingw* | cegcc*)
-    # On Win9x/ME, this test blows up -- it succeeds, but takes
-    # about 5 minutes as the teststring grows exponentially.
-    # Worse, since 9x/ME are not pre-emptively multitasking,
-    # you end up with a "frozen" computer, even though with patience
-    # the test eventually succeeds (with a max line length of 256k).
-    # Instead, let's just punt: use the minimum linelength reported by
-    # all of the supported platforms: 8192 (on NT/2K/XP).
-    lt_cv_sys_max_cmd_len=8192;
-    ;;
-
-  amigaos*)
-    # On AmigaOS with pdksh, this test takes hours, literally.
-    # So we just punt and use a minimum line length of 8192.
-    lt_cv_sys_max_cmd_len=8192;
-    ;;
-
-  netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
-    # This has been around since 386BSD, at least.  Likely further.
-    if test -x /sbin/sysctl; then
-      lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
-    elif test -x /usr/sbin/sysctl; then
-      lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
-    else
-      lt_cv_sys_max_cmd_len=65536	# usable default for all BSDs
-    fi
-    # And add a safety zone
-    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
-    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
-    ;;
-
-  interix*)
-    # We know the value 262144 and hardcode it with a safety zone (like BSD)
-    lt_cv_sys_max_cmd_len=196608
-    ;;
-
-  osf*)
-    # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
-    # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
-    # nice to cause kernel panics so lets avoid the loop below.
-    # First set a reasonable default.
-    lt_cv_sys_max_cmd_len=16384
-    #
-    if test -x /sbin/sysconfig; then
-      case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
-        *1*) lt_cv_sys_max_cmd_len=-1 ;;
-      esac
-    fi
-    ;;
-  sco3.2v5*)
-    lt_cv_sys_max_cmd_len=102400
-    ;;
-  sysv5* | sco5v6* | sysv4.2uw2*)
-    kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
-    if test -n "$kargmax"; then
-      lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[	 ]]//'`
-    else
-      lt_cv_sys_max_cmd_len=32768
-    fi
-    ;;
-  *)
-    lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
-    if test -n "$lt_cv_sys_max_cmd_len"; then
-      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
-      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
-    else
-      # Make teststring a little bigger before we do anything with it.
-      # a 1K string should be a reasonable start.
-      for i in 1 2 3 4 5 6 7 8 ; do
-        teststring=$teststring$teststring
-      done
-      SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
-      # If test is not a shell built-in, we'll probably end up computing a
-      # maximum length that is only half of the actual maximum length, but
-      # we can't tell.
-      while { test "X"`$SHELL [$]0 --fallback-echo "X$teststring$teststring" 2>/dev/null` \
-	         = "XX$teststring$teststring"; } >/dev/null 2>&1 &&
-	      test $i != 17 # 1/2 MB should be enough
-      do
-        i=`expr $i + 1`
-        teststring=$teststring$teststring
-      done
-      # Only check the string length outside the loop.
-      lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
-      teststring=
-      # Add a significant safety factor because C++ compilers can tack on
-      # massive amounts of additional arguments before passing them to the
-      # linker.  It appears as though 1/2 is a usable value.
-      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
-    fi
-    ;;
-  esac
-])
-if test -n $lt_cv_sys_max_cmd_len ; then
-  AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
-else
-  AC_MSG_RESULT(none)
-fi
-max_cmd_len=$lt_cv_sys_max_cmd_len
-_LT_DECL([], [max_cmd_len], [0],
-    [What is the maximum length of a command?])
-])# LT_CMD_MAX_LEN
-
-# Old name:
-AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN])
-dnl aclocal-1.4 backwards compatibility:
-dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], [])
-
-
-# _LT_HEADER_DLFCN
-# ----------------
-m4_defun([_LT_HEADER_DLFCN],
-[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl
-])# _LT_HEADER_DLFCN
-
-
-# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
-#                      ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
-# ----------------------------------------------------------------
-m4_defun([_LT_TRY_DLOPEN_SELF],
-[m4_require([_LT_HEADER_DLFCN])dnl
-if test "$cross_compiling" = yes; then :
-  [$4]
-else
-  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
-  lt_status=$lt_dlunknown
-  cat > conftest.$ac_ext <<_LT_EOF
-[#line __oline__ "configure"
-#include "confdefs.h"
-
-#if HAVE_DLFCN_H
-#include <dlfcn.h>
-#endif
-
-#include <stdio.h>
-
-#ifdef RTLD_GLOBAL
-#  define LT_DLGLOBAL		RTLD_GLOBAL
-#else
-#  ifdef DL_GLOBAL
-#    define LT_DLGLOBAL		DL_GLOBAL
-#  else
-#    define LT_DLGLOBAL		0
-#  endif
-#endif
-
-/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
-   find out it does not work in some platform. */
-#ifndef LT_DLLAZY_OR_NOW
-#  ifdef RTLD_LAZY
-#    define LT_DLLAZY_OR_NOW		RTLD_LAZY
-#  else
-#    ifdef DL_LAZY
-#      define LT_DLLAZY_OR_NOW		DL_LAZY
-#    else
-#      ifdef RTLD_NOW
-#        define LT_DLLAZY_OR_NOW	RTLD_NOW
-#      else
-#        ifdef DL_NOW
-#          define LT_DLLAZY_OR_NOW	DL_NOW
-#        else
-#          define LT_DLLAZY_OR_NOW	0
-#        endif
-#      endif
-#    endif
-#  endif
-#endif
-
-void fnord() { int i=42;}
-int main ()
-{
-  void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
-  int status = $lt_dlunknown;
-
-  if (self)
-    {
-      if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
-      else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
-      /* dlclose (self); */
-    }
-  else
-    puts (dlerror ());
-
-  return status;
-}]
-_LT_EOF
-  if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
-    (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
-    lt_status=$?
-    case x$lt_status in
-      x$lt_dlno_uscore) $1 ;;
-      x$lt_dlneed_uscore) $2 ;;
-      x$lt_dlunknown|x*) $3 ;;
-    esac
-  else :
-    # compilation failed
-    $3
-  fi
-fi
-rm -fr conftest*
-])# _LT_TRY_DLOPEN_SELF
-
-
-# LT_SYS_DLOPEN_SELF
-# ------------------
-AC_DEFUN([LT_SYS_DLOPEN_SELF],
-[m4_require([_LT_HEADER_DLFCN])dnl
-if test "x$enable_dlopen" != xyes; then
-  enable_dlopen=unknown
-  enable_dlopen_self=unknown
-  enable_dlopen_self_static=unknown
-else
-  lt_cv_dlopen=no
-  lt_cv_dlopen_libs=
-
-  case $host_os in
-  beos*)
-    lt_cv_dlopen="load_add_on"
-    lt_cv_dlopen_libs=
-    lt_cv_dlopen_self=yes
-    ;;
-
-  mingw* | pw32* | cegcc*)
-    lt_cv_dlopen="LoadLibrary"
-    lt_cv_dlopen_libs=
-    ;;
-
-  cygwin*)
-    lt_cv_dlopen="dlopen"
-    lt_cv_dlopen_libs=
-    ;;
-
-  darwin*)
-  # if libdl is installed we need to link against it
-    AC_CHECK_LIB([dl], [dlopen],
-		[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
-    lt_cv_dlopen="dyld"
-    lt_cv_dlopen_libs=
-    lt_cv_dlopen_self=yes
-    ])
-    ;;
-
-  *)
-    AC_CHECK_FUNC([shl_load],
-	  [lt_cv_dlopen="shl_load"],
-      [AC_CHECK_LIB([dld], [shl_load],
-	    [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"],
-	[AC_CHECK_FUNC([dlopen],
-	      [lt_cv_dlopen="dlopen"],
-	  [AC_CHECK_LIB([dl], [dlopen],
-		[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
-	    [AC_CHECK_LIB([svld], [dlopen],
-		  [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
-	      [AC_CHECK_LIB([dld], [dld_link],
-		    [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"])
-	      ])
-	    ])
-	  ])
-	])
-      ])
-    ;;
-  esac
-
-  if test "x$lt_cv_dlopen" != xno; then
-    enable_dlopen=yes
-  else
-    enable_dlopen=no
-  fi
-
-  case $lt_cv_dlopen in
-  dlopen)
-    save_CPPFLAGS="$CPPFLAGS"
-    test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
-
-    save_LDFLAGS="$LDFLAGS"
-    wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
-
-    save_LIBS="$LIBS"
-    LIBS="$lt_cv_dlopen_libs $LIBS"
-
-    AC_CACHE_CHECK([whether a program can dlopen itself],
-	  lt_cv_dlopen_self, [dnl
-	  _LT_TRY_DLOPEN_SELF(
-	    lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
-	    lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
-    ])
-
-    if test "x$lt_cv_dlopen_self" = xyes; then
-      wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
-      AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
-	  lt_cv_dlopen_self_static, [dnl
-	  _LT_TRY_DLOPEN_SELF(
-	    lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
-	    lt_cv_dlopen_self_static=no,  lt_cv_dlopen_self_static=cross)
-      ])
-    fi
-
-    CPPFLAGS="$save_CPPFLAGS"
-    LDFLAGS="$save_LDFLAGS"
-    LIBS="$save_LIBS"
-    ;;
-  esac
-
-  case $lt_cv_dlopen_self in
-  yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
-  *) enable_dlopen_self=unknown ;;
-  esac
-
-  case $lt_cv_dlopen_self_static in
-  yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
-  *) enable_dlopen_self_static=unknown ;;
-  esac
-fi
-_LT_DECL([dlopen_support], [enable_dlopen], [0],
-	 [Whether dlopen is supported])
-_LT_DECL([dlopen_self], [enable_dlopen_self], [0],
-	 [Whether dlopen of programs is supported])
-_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0],
-	 [Whether dlopen of statically linked programs is supported])
-])# LT_SYS_DLOPEN_SELF
-
-# Old name:
-AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF])
-dnl aclocal-1.4 backwards compatibility:
-dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], [])
-
-
-# _LT_COMPILER_C_O([TAGNAME])
-# ---------------------------
-# Check to see if options -c and -o are simultaneously supported by compiler.
-# This macro does not hard code the compiler like AC_PROG_CC_C_O.
-m4_defun([_LT_COMPILER_C_O],
-[m4_require([_LT_DECL_SED])dnl
-m4_require([_LT_FILEUTILS_DEFAULTS])dnl
-m4_require([_LT_TAG_COMPILER])dnl
-AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
-  [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
-  [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
-   $RM -r conftest 2>/dev/null
-   mkdir conftest
-   cd conftest
-   mkdir out
-   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
-
-   lt_compiler_flag="-o out/conftest2.$ac_objext"
-   # Insert the option either (1) after the last *FLAGS variable, or
-   # (2) before a word containing "conftest.", or (3) at the end.
-   # Note that $ac_compile itself does not contain backslashes and begins
-   # with a dollar sign (not a hyphen), so the echo should work correctly.
-   lt_compile=`echo "$ac_compile" | $SED \
-   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
-   -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
-   (eval "$lt_compile" 2>out/conftest.err)
-   ac_status=$?
-   cat out/conftest.err >&AS_MESSAGE_LOG_FD
-   echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
-   if (exit $ac_status) && test -s out/conftest2.$ac_objext
-   then
-     # The compiler can only warn and ignore the option if not recognized
-     # So say no if there are warnings
-     $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
-     $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
-     if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
-       _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
-     fi
-   fi
-   chmod u+w . 2>&AS_MESSAGE_LOG_FD
-   $RM conftest*
-   # SGI C++ compiler will create directory out/ii_files/ for
-   # template instantiation
-   test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
-   $RM out/* && rmdir out
-   cd ..
-   $RM -r conftest
-   $RM conftest*
-])
-_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1],
-	[Does compiler simultaneously support -c and -o options?])
-])# _LT_COMPILER_C_O
-
-
-# _LT_COMPILER_FILE_LOCKS([TAGNAME])
-# ----------------------------------
-# Check to see if we can do hard links to lock some files if needed
-m4_defun([_LT_COMPILER_FILE_LOCKS],
-[m4_require([_LT_ENABLE_LOCK])dnl
-m4_require([_LT_FILEUTILS_DEFAULTS])dnl
-_LT_COMPILER_C_O([$1])
-
-hard_links="nottested"
-if test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
-  # do not overwrite the value of need_locks provided by the user
-  AC_MSG_CHECKING([if we can lock with hard links])
-  hard_links=yes
-  $RM conftest*
-  ln conftest.a conftest.b 2>/dev/null && hard_links=no
-  touch conftest.a
-  ln conftest.a conftest.b 2>&5 || hard_links=no
-  ln conftest.a conftest.b 2>/dev/null && hard_links=no
-  AC_MSG_RESULT([$hard_links])
-  if test "$hard_links" = no; then
-    AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
-    need_locks=warn
-  fi
-else
-  need_locks=no
-fi
-_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?])
-])# _LT_COMPILER_FILE_LOCKS
-
-
-# _LT_CHECK_OBJDIR
-# ----------------
-m4_defun([_LT_CHECK_OBJDIR],
-[AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
-[rm -f .libs 2>/dev/null
-mkdir .libs 2>/dev/null
-if test -d .libs; then
-  lt_cv_objdir=.libs
-else
-  # MS-DOS does not allow filenames that begin with a dot.
-  lt_cv_objdir=_libs
-fi
-rmdir .libs 2>/dev/null])
-objdir=$lt_cv_objdir
-_LT_DECL([], [objdir], [0],
-         [The name of the directory that contains temporary libtool files])dnl
-m4_pattern_allow([LT_OBJDIR])dnl
-AC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/",
-  [Define to the sub-directory in which libtool stores uninstalled libraries.])
-])# _LT_CHECK_OBJDIR
-
-
-# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME])
-# --------------------------------------
-# Check hardcoding attributes.
-m4_defun([_LT_LINKER_HARDCODE_LIBPATH],
-[AC_MSG_CHECKING([how to hardcode library paths into programs])
-_LT_TAGVAR(hardcode_action, $1)=
-if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" ||
-   test -n "$_LT_TAGVAR(runpath_var, $1)" ||
-   test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then
-
-  # We can hardcode non-existent directories.
-  if test "$_LT_TAGVAR(hardcode_direct, $1)" != no &&
-     # If the only mechanism to avoid hardcoding is shlibpath_var, we
-     # have to relink, otherwise we might link with an installed library
-     # when we should be linking with a yet-to-be-installed one
-     ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
-     test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then
-    # Linking always hardcodes the temporary library directory.
-    _LT_TAGVAR(hardcode_action, $1)=relink
-  else
-    # We can link without hardcoding, and we can hardcode nonexisting dirs.
-    _LT_TAGVAR(hardcode_action, $1)=immediate
-  fi
-else
-  # We cannot hardcode anything, or else we can only hardcode existing
-  # directories.
-  _LT_TAGVAR(hardcode_action, $1)=unsupported
-fi
-AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)])
-
-if test "$_LT_TAGVAR(hardcode_action, $1)" = relink ||
-   test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then
-  # Fast installation is not supported
-  enable_fast_install=no
-elif test "$shlibpath_overrides_runpath" = yes ||
-     test "$enable_shared" = no; then
-  # Fast installation is not necessary
-  enable_fast_install=needless
-fi
-_LT_TAGDECL([], [hardcode_action], [0],
-    [How to hardcode a shared library path into an executable])
-])# _LT_LINKER_HARDCODE_LIBPATH
-
-
-# _LT_CMD_STRIPLIB
-# ----------------
-m4_defun([_LT_CMD_STRIPLIB],
-[m4_require([_LT_DECL_EGREP])
-striplib=
-old_striplib=
-AC_MSG_CHECKING([whether stripping libraries is possible])
-if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
-  test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
-  test -z "$striplib" && striplib="$STRIP --strip-unneeded"
-  AC_MSG_RESULT([yes])
-else
-# FIXME - insert some real tests, host_os isn't really good enough
-  case $host_os in
-  darwin*)
-    if test -n "$STRIP" ; then
-      striplib="$STRIP -x"
-      old_striplib="$STRIP -S"
-      AC_MSG_RESULT([yes])
-    else
-      AC_MSG_RESULT([no])
-    fi
-    ;;
-  *)
-    AC_MSG_RESULT([no])
-    ;;
-  esac
-fi
-_LT_DECL([], [old_striplib], [1], [Commands to strip libraries])
-_LT_DECL([], [striplib], [1])
-])# _LT_CMD_STRIPLIB
-
-
-# _LT_SYS_DYNAMIC_LINKER([TAG])
-# -----------------------------
-# PORTME Fill in your ld.so characteristics
-m4_defun([_LT_SYS_DYNAMIC_LINKER],
-[AC_REQUIRE([AC_CANONICAL_HOST])dnl
-m4_require([_LT_DECL_EGREP])dnl
-m4_require([_LT_FILEUTILS_DEFAULTS])dnl
-m4_require([_LT_DECL_OBJDUMP])dnl
-m4_require([_LT_DECL_SED])dnl
-AC_MSG_CHECKING([dynamic linker characteristics])
-m4_if([$1],
-	[], [
-if test "$GCC" = yes; then
-  case $host_os in
-    darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
-    *) lt_awk_arg="/^libraries:/" ;;
-  esac
-  lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"`
-  if $ECHO "$lt_search_path_spec" | $GREP ';' >/dev/null ; then
-    # if the path contains ";" then we assume it to be the separator
-    # otherwise default to the standard path separator (i.e. ":") - it is
-    # assumed that no part of a normal pathname contains ";" but that should
-    # okay in the real world where ";" in dirpaths is itself problematic.
-    lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e 's/;/ /g'`
-  else
-    lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
-  fi
-  # Ok, now we have the path, separated by spaces, we can step through it
-  # and add multilib dir if necessary.
-  lt_tmp_lt_search_path_spec=
-  lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
-  for lt_sys_path in $lt_search_path_spec; do
-    if test -d "$lt_sys_path/$lt_multi_os_dir"; then
-      lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir"
-    else
-      test -d "$lt_sys_path" && \
-	lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
-    fi
-  done
-  lt_search_path_spec=`$ECHO $lt_tmp_lt_search_path_spec | awk '
-BEGIN {RS=" "; FS="/|\n";} {
-  lt_foo="";
-  lt_count=0;
-  for (lt_i = NF; lt_i > 0; lt_i--) {
-    if ($lt_i != "" && $lt_i != ".") {
-      if ($lt_i == "..") {
-        lt_count++;
-      } else {
-        if (lt_count == 0) {
-          lt_foo="/" $lt_i lt_foo;
-        } else {
-          lt_count--;
-        }
-      }
-    }
-  }
-  if (lt_foo != "") { lt_freq[[lt_foo]]++; }
-  if (lt_freq[[lt_foo]] == 1) { print lt_foo; }
-}'`
-  sys_lib_search_path_spec=`$ECHO $lt_search_path_spec`
-else
-  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
-fi])
-library_names_spec=
-libname_spec='lib$name'
-soname_spec=
-shrext_cmds=".so"
-postinstall_cmds=
-postuninstall_cmds=
-finish_cmds=
-finish_eval=
-shlibpath_var=
-shlibpath_overrides_runpath=unknown
-version_type=none
-dynamic_linker="$host_os ld.so"
-sys_lib_dlsearch_path_spec="/lib /usr/lib"
-need_lib_prefix=unknown
-hardcode_into_libs=no
-
-# when you set need_version to no, make sure it does not cause -set_version
-# flags to be left without arguments
-need_version=unknown
-
-case $host_os in
-aix3*)
-  version_type=linux
-  library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
-  shlibpath_var=LIBPATH
-
-  # AIX 3 has no versioning support, so we append a major version to the name.
-  soname_spec='${libname}${release}${shared_ext}$major'
-  ;;
-
-aix[[4-9]]*)
-  version_type=linux
-  need_lib_prefix=no
-  need_version=no
-  hardcode_into_libs=yes
-  if test "$host_cpu" = ia64; then
-    # AIX 5 supports IA64
-    library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
-    shlibpath_var=LD_LIBRARY_PATH
-  else
-    # With GCC up to 2.95.x, collect2 would create an import file
-    # for dependence libraries.  The import file would start with
-    # the line `#! .'.  This would cause the generated library to
-    # depend on `.', always an invalid library.  This was fixed in
-    # development snapshots of GCC prior to 3.0.
-    case $host_os in
-      aix4 | aix4.[[01]] | aix4.[[01]].*)
-      if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
-	   echo ' yes '
-	   echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then
-	:
-      else
-	can_build_shared=no
-      fi
-      ;;
-    esac
-    # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
-    # soname into executable. Probably we can add versioning support to
-    # collect2, so additional links can be useful in future.
-    if test "$aix_use_runtimelinking" = yes; then
-      # If using run time linking (on AIX 4.2 or later) use lib<name>.so
-      # instead of lib<name>.a to let people know that these are not
-      # typical AIX shared libraries.
-      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-    else
-      # We preserve .a as extension for shared libraries through AIX4.2
-      # and later when we are not doing run time linking.
-      library_names_spec='${libname}${release}.a $libname.a'
-      soname_spec='${libname}${release}${shared_ext}$major'
-    fi
-    shlibpath_var=LIBPATH
-  fi
-  ;;
-
-amigaos*)
-  case $host_cpu in
-  powerpc)
-    # Since July 2007 AmigaOS4 officially supports .so libraries.
-    # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
-    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-    ;;
-  m68k)
-    library_names_spec='$libname.ixlibrary $libname.a'
-    # Create ${libname}_ixlibrary.a entries in /sys/libs.
-    finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$ECHO "X$lib" | $Xsed -e '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
-    ;;
-  esac
-  ;;
-
-beos*)
-  library_names_spec='${libname}${shared_ext}'
-  dynamic_linker="$host_os ld.so"
-  shlibpath_var=LIBRARY_PATH
-  ;;
-
-bsdi[[45]]*)
-  version_type=linux
-  need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
-  finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
-  shlibpath_var=LD_LIBRARY_PATH
-  sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
-  sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
-  # the default ld.so.conf also contains /usr/contrib/lib and
-  # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
-  # libtool to hard-code these into programs
-  ;;
-
-cygwin* | mingw* | pw32* | cegcc*)
-  version_type=windows
-  shrext_cmds=".dll"
-  need_version=no
-  need_lib_prefix=no
-
-  case $GCC,$host_os in
-  yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*)
-    library_names_spec='$libname.dll.a'
-    # DLL is installed to $(libdir)/../bin by postinstall_cmds
-    postinstall_cmds='base_file=`basename \${file}`~
-      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
-      dldir=$destdir/`dirname \$dlpath`~
-      test -d \$dldir || mkdir -p \$dldir~
-      $install_prog $dir/$dlname \$dldir/$dlname~
-      chmod a+x \$dldir/$dlname~
-      if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
-        eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
-      fi'
-    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
-      dlpath=$dir/\$dldll~
-       $RM \$dlpath'
-    shlibpath_overrides_runpath=yes
-
-    case $host_os in
-    cygwin*)
-      # Cygwin DLLs use 'cyg' prefix rather than 'lib'
-      soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
-      sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
-      ;;
-    mingw* | cegcc*)
-      # MinGW DLLs use traditional 'lib' prefix
-      soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
-      sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
-      if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then
-        # It is most probably a Windows format PATH printed by
-        # mingw gcc, but we are running on Cygwin. Gcc prints its search
-        # path with ; separators, and with drive letters. We can handle the
-        # drive letters (cygwin fileutils understands them), so leave them,
-        # especially as we might pass files found there to a mingw objdump,
-        # which wouldn't understand a cygwinified path. Ahh.
-        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
-      else
-        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
-      fi
-      ;;
-    pw32*)
-      # pw32 DLLs use 'pw' prefix rather than 'lib'
-      library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
-      ;;
-    esac
-    ;;
-
-  *)
-    library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
-    ;;
-  esac
-  dynamic_linker='Win32 ld.exe'
-  # FIXME: first we should search . and the directory the executable is in
-  shlibpath_var=PATH
-  ;;
-
-darwin* | rhapsody*)
-  dynamic_linker="$host_os dyld"
-  version_type=darwin
-  need_lib_prefix=no
-  need_version=no
-  library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext'
-  soname_spec='${libname}${release}${major}$shared_ext'
-  shlibpath_overrides_runpath=yes
-  shlibpath_var=DYLD_LIBRARY_PATH
-  shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
-m4_if([$1], [],[
-  sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"])
-  sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
-  ;;
-
-dgux*)
-  version_type=linux
-  need_lib_prefix=no
-  need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
-  soname_spec='${libname}${release}${shared_ext}$major'
-  shlibpath_var=LD_LIBRARY_PATH
-  ;;
-
-freebsd1*)
-  dynamic_linker=no
-  ;;
-
-freebsd* | dragonfly*)
-  # DragonFly does not have aout.  When/if they implement a new
-  # versioning mechanism, adjust this.
-  if test -x /usr/bin/objformat; then
-    objformat=`/usr/bin/objformat`
-  else
-    case $host_os in
-    freebsd[[123]]*) objformat=aout ;;
-    *) objformat=elf ;;
-    esac
-  fi
-  version_type=freebsd-$objformat
-  case $version_type in
-    freebsd-elf*)
-      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
-      need_version=no
-      need_lib_prefix=no
-      ;;
-    freebsd-*)
-      library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
-      need_version=yes
-      ;;
-  esac
-  shlibpath_var=LD_LIBRARY_PATH
-  case $host_os in
-  freebsd2*)
-    shlibpath_overrides_runpath=yes
-    ;;
-  freebsd3.[[01]]* | freebsdelf3.[[01]]*)
-    shlibpath_overrides_runpath=yes
-    hardcode_into_libs=yes
-    ;;
-  freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
-  freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
-    shlibpath_overrides_runpath=no
-    hardcode_into_libs=yes
-    ;;
-  *) # from 4.6 on, and DragonFly
-    shlibpath_overrides_runpath=yes
-    hardcode_into_libs=yes
-    ;;
-  esac
-  ;;
-
-gnu*)
-  version_type=linux
-  need_lib_prefix=no
-  need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
-  shlibpath_var=LD_LIBRARY_PATH
-  hardcode_into_libs=yes
-  ;;
-
-hpux9* | hpux10* | hpux11*)
-  # Give a soname corresponding to the major version so that dld.sl refuses to
-  # link against other versions.
-  version_type=sunos
-  need_lib_prefix=no
-  need_version=no
-  case $host_cpu in
-  ia64*)
-    shrext_cmds='.so'
-    hardcode_into_libs=yes
-    dynamic_linker="$host_os dld.so"
-    shlibpath_var=LD_LIBRARY_PATH
-    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
-    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-    soname_spec='${libname}${release}${shared_ext}$major'
-    if test "X$HPUX_IA64_MODE" = X32; then
-      sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
-    else
-      sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
-    fi
-    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
-    ;;
-  hppa*64*)
-    shrext_cmds='.sl'
-    hardcode_into_libs=yes
-    dynamic_linker="$host_os dld.sl"
-    shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
-    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
-    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-    soname_spec='${libname}${release}${shared_ext}$major'
-    sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
-    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
-    ;;
-  *)
-    shrext_cmds='.sl'
-    dynamic_linker="$host_os dld.sl"
-    shlibpath_var=SHLIB_PATH
-    shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
-    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-    soname_spec='${libname}${release}${shared_ext}$major'
-    ;;
-  esac
-  # HP-UX runs *really* slowly unless shared libraries are mode 555.
-  postinstall_cmds='chmod 555 $lib'
-  ;;
-
-interix[[3-9]]*)
-  version_type=linux
-  need_lib_prefix=no
-  need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
-  dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
-  shlibpath_var=LD_LIBRARY_PATH
-  shlibpath_overrides_runpath=no
-  hardcode_into_libs=yes
-  ;;
-
-irix5* | irix6* | nonstopux*)
-  case $host_os in
-    nonstopux*) version_type=nonstopux ;;
-    *)
-	if test "$lt_cv_prog_gnu_ld" = yes; then
-		version_type=linux
-	else
-		version_type=irix
-	fi ;;
-  esac
-  need_lib_prefix=no
-  need_version=no
-  soname_spec='${libname}${release}${shared_ext}$major'
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
-  case $host_os in
-  irix5* | nonstopux*)
-    libsuff= shlibsuff=
-    ;;
-  *)
-    case $LD in # libtool.m4 will add one of these switches to LD
-    *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
-      libsuff= shlibsuff= libmagic=32-bit;;
-    *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
-      libsuff=32 shlibsuff=N32 libmagic=N32;;
-    *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
-      libsuff=64 shlibsuff=64 libmagic=64-bit;;
-    *) libsuff= shlibsuff= libmagic=never-match;;
-    esac
-    ;;
-  esac
-  shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
-  shlibpath_overrides_runpath=no
-  sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
-  sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
-  hardcode_into_libs=yes
-  ;;
-
-# No shared lib support for Linux oldld, aout, or coff.
-linux*oldld* | linux*aout* | linux*coff*)
-  dynamic_linker=no
-  ;;
-
-# This must be Linux ELF.
-linux* | k*bsd*-gnu)
-  version_type=linux
-  need_lib_prefix=no
-  need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
-  finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
-  shlibpath_var=LD_LIBRARY_PATH
-  shlibpath_overrides_runpath=no
-  # Some binutils ld are patched to set DT_RUNPATH
-  save_LDFLAGS=$LDFLAGS
-  save_libdir=$libdir
-  eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \
-       LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\""
-  AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
-    [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null],
-       [shlibpath_overrides_runpath=yes])])
-  LDFLAGS=$save_LDFLAGS
-  libdir=$save_libdir
-
-  # This implies no fast_install, which is unacceptable.
-  # Some rework will be needed to allow for fast_install
-  # before this can be enabled.
-  hardcode_into_libs=yes
-
-  # Append ld.so.conf contents to the search path
-  if test -f /etc/ld.so.conf; then
-    lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[	 ]*hwcap[	 ]/d;s/[:,	]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
-    sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
-  fi
-
-  # We used to test for /lib/ld.so.1 and disable shared libraries on
-  # powerpc, because MkLinux only supported shared libraries with the
-  # GNU dynamic linker.  Since this was broken with cross compilers,
-  # most powerpc-linux boxes support dynamic linking these days and
-  # people can always --disable-shared, the test was removed, and we
-  # assume the GNU/Linux dynamic linker is in use.
-  dynamic_linker='GNU/Linux ld.so'
-  ;;
-
-netbsdelf*-gnu)
-  version_type=linux
-  need_lib_prefix=no
-  need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
-  shlibpath_var=LD_LIBRARY_PATH
-  shlibpath_overrides_runpath=no
-  hardcode_into_libs=yes
-  dynamic_linker='NetBSD ld.elf_so'
-  ;;
-
-netbsd*)
-  version_type=sunos
-  need_lib_prefix=no
-  need_version=no
-  if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
-    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
-    finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
-    dynamic_linker='NetBSD (a.out) ld.so'
-  else
-    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
-    soname_spec='${libname}${release}${shared_ext}$major'
-    dynamic_linker='NetBSD ld.elf_so'
-  fi
-  shlibpath_var=LD_LIBRARY_PATH
-  shlibpath_overrides_runpath=yes
-  hardcode_into_libs=yes
-  ;;
-
-newsos6)
-  version_type=linux
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-  shlibpath_var=LD_LIBRARY_PATH
-  shlibpath_overrides_runpath=yes
-  ;;
-
-*nto* | *qnx*)
-  version_type=qnx
-  need_lib_prefix=no
-  need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
-  shlibpath_var=LD_LIBRARY_PATH
-  shlibpath_overrides_runpath=no
-  hardcode_into_libs=yes
-  dynamic_linker='ldqnx.so'
-  ;;
-
-openbsd*)
-  version_type=sunos
-  sys_lib_dlsearch_path_spec="/usr/lib"
-  need_lib_prefix=no
-  # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
-  case $host_os in
-    openbsd3.3 | openbsd3.3.*)	need_version=yes ;;
-    *)				need_version=no  ;;
-  esac
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
-  finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
-  shlibpath_var=LD_LIBRARY_PATH
-  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
-    case $host_os in
-      openbsd2.[[89]] | openbsd2.[[89]].*)
-	shlibpath_overrides_runpath=no
-	;;
-      *)
-	shlibpath_overrides_runpath=yes
-	;;
-      esac
-  else
-    shlibpath_overrides_runpath=yes
-  fi
-  ;;
-
-os2*)
-  libname_spec='$name'
-  shrext_cmds=".dll"
-  need_lib_prefix=no
-  library_names_spec='$libname${shared_ext} $libname.a'
-  dynamic_linker='OS/2 ld.exe'
-  shlibpath_var=LIBPATH
-  ;;
-
-osf3* | osf4* | osf5*)
-  version_type=osf
-  need_lib_prefix=no
-  need_version=no
-  soname_spec='${libname}${release}${shared_ext}$major'
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-  shlibpath_var=LD_LIBRARY_PATH
-  sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
-  sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
-  ;;
-
-rdos*)
-  dynamic_linker=no
-  ;;
-
-solaris*)
-  version_type=linux
-  need_lib_prefix=no
-  need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
-  shlibpath_var=LD_LIBRARY_PATH
-  shlibpath_overrides_runpath=yes
-  hardcode_into_libs=yes
-  # ldd complains unless libraries are executable
-  postinstall_cmds='chmod +x $lib'
-  ;;
-
-sunos4*)
-  version_type=sunos
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
-  finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
-  shlibpath_var=LD_LIBRARY_PATH
-  shlibpath_overrides_runpath=yes
-  if test "$with_gnu_ld" = yes; then
-    need_lib_prefix=no
-  fi
-  need_version=yes
-  ;;
-
-sysv4 | sysv4.3*)
-  version_type=linux
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
-  shlibpath_var=LD_LIBRARY_PATH
-  case $host_vendor in
-    sni)
-      shlibpath_overrides_runpath=no
-      need_lib_prefix=no
-      runpath_var=LD_RUN_PATH
-      ;;
-    siemens)
-      need_lib_prefix=no
-      ;;
-    motorola)
-      need_lib_prefix=no
-      need_version=no
-      shlibpath_overrides_runpath=no
-      sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
-      ;;
-  esac
-  ;;
-
-sysv4*MP*)
-  if test -d /usr/nec ;then
-    version_type=linux
-    library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
-    soname_spec='$libname${shared_ext}.$major'
-    shlibpath_var=LD_LIBRARY_PATH
-  fi
-  ;;
-
-sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
-  version_type=freebsd-elf
-  need_lib_prefix=no
-  need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
-  shlibpath_var=LD_LIBRARY_PATH
-  shlibpath_overrides_runpath=yes
-  hardcode_into_libs=yes
-  if test "$with_gnu_ld" = yes; then
-    sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
-  else
-    sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
-    case $host_os in
-      sco3.2v5*)
-        sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
-	;;
-    esac
-  fi
-  sys_lib_dlsearch_path_spec='/usr/lib'
-  ;;
-
-tpf*)
-  # TPF is a cross-target only.  Preferred cross-host = GNU/Linux.
-  version_type=linux
-  need_lib_prefix=no
-  need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-  shlibpath_var=LD_LIBRARY_PATH
-  shlibpath_overrides_runpath=no
-  hardcode_into_libs=yes
-  ;;
-
-uts4*)
-  version_type=linux
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
-  shlibpath_var=LD_LIBRARY_PATH
-  ;;
-
-*)
-  dynamic_linker=no
-  ;;
-esac
-AC_MSG_RESULT([$dynamic_linker])
-test "$dynamic_linker" = no && can_build_shared=no
-
-variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
-if test "$GCC" = yes; then
-  variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
-fi
-
-if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then
-  sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
-fi
-if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then
-  sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
-fi
-
-_LT_DECL([], [variables_saved_for_relink], [1],
-    [Variables whose values should be saved in libtool wrapper scripts and
-    restored at link time])
-_LT_DECL([], [need_lib_prefix], [0],
-    [Do we need the "lib" prefix for modules?])
-_LT_DECL([], [need_version], [0], [Do we need a version for libraries?])
-_LT_DECL([], [version_type], [0], [Library versioning type])
-_LT_DECL([], [runpath_var], [0],  [Shared library runtime path variable])
-_LT_DECL([], [shlibpath_var], [0],[Shared library path variable])
-_LT_DECL([], [shlibpath_overrides_runpath], [0],
-    [Is shlibpath searched before the hard-coded library search path?])
-_LT_DECL([], [libname_spec], [1], [Format of library name prefix])
-_LT_DECL([], [library_names_spec], [1],
-    [[List of archive names.  First name is the real one, the rest are links.
-    The last name is the one that the linker finds with -lNAME]])
-_LT_DECL([], [soname_spec], [1],
-    [[The coded name of the library, if different from the real name]])
-_LT_DECL([], [postinstall_cmds], [2],
-    [Command to use after installation of a shared archive])
-_LT_DECL([], [postuninstall_cmds], [2],
-    [Command to use after uninstallation of a shared archive])
-_LT_DECL([], [finish_cmds], [2],
-    [Commands used to finish a libtool library installation in a directory])
-_LT_DECL([], [finish_eval], [1],
-    [[As "finish_cmds", except a single script fragment to be evaled but
-    not shown]])
-_LT_DECL([], [hardcode_into_libs], [0],
-    [Whether we should hardcode library paths into libraries])
-_LT_DECL([], [sys_lib_search_path_spec], [2],
-    [Compile-time system search path for libraries])
-_LT_DECL([], [sys_lib_dlsearch_path_spec], [2],
-    [Run-time system search path for libraries])
-])# _LT_SYS_DYNAMIC_LINKER
-
-
-# _LT_PATH_TOOL_PREFIX(TOOL)
-# --------------------------
-# find a file program which can recognize shared library
-AC_DEFUN([_LT_PATH_TOOL_PREFIX],
-[m4_require([_LT_DECL_EGREP])dnl
-AC_MSG_CHECKING([for $1])
-AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
-[case $MAGIC_CMD in
-[[\\/*] |  ?:[\\/]*])
-  lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
-  ;;
-*)
-  lt_save_MAGIC_CMD="$MAGIC_CMD"
-  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
-dnl $ac_dummy forces splitting on constant user-supplied paths.
-dnl POSIX.2 word splitting is done only on the output of word expansions,
-dnl not every word.  This closes a longstanding sh security hole.
-  ac_dummy="m4_if([$2], , $PATH, [$2])"
-  for ac_dir in $ac_dummy; do
-    IFS="$lt_save_ifs"
-    test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/$1; then
-      lt_cv_path_MAGIC_CMD="$ac_dir/$1"
-      if test -n "$file_magic_test_file"; then
-	case $deplibs_check_method in
-	"file_magic "*)
-	  file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
-	  MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
-	  if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
-	    $EGREP "$file_magic_regex" > /dev/null; then
-	    :
-	  else
-	    cat <<_LT_EOF 1>&2
-
-*** Warning: the command libtool uses to detect shared libraries,
-*** $file_magic_cmd, produces output that libtool cannot recognize.
-*** The result is that libtool may fail to recognize shared libraries
-*** as such.  This will affect the creation of libtool libraries that
-*** depend on shared libraries, but programs linked with such libtool
-*** libraries will work regardless of this problem.  Nevertheless, you
-*** may want to report the problem to your system manager and/or to
-*** bug-libtool@gnu.org
-
-_LT_EOF
-	  fi ;;
-	esac
-      fi
-      break
-    fi
-  done
-  IFS="$lt_save_ifs"
-  MAGIC_CMD="$lt_save_MAGIC_CMD"
-  ;;
-esac])
-MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
-if test -n "$MAGIC_CMD"; then
-  AC_MSG_RESULT($MAGIC_CMD)
-else
-  AC_MSG_RESULT(no)
-fi
-_LT_DECL([], [MAGIC_CMD], [0],
-	 [Used to examine libraries when file_magic_cmd begins with "file"])dnl
-])# _LT_PATH_TOOL_PREFIX
-
-# Old name:
-AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX])
-dnl aclocal-1.4 backwards compatibility:
-dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], [])
-
-
-# _LT_PATH_MAGIC
-# --------------
-# find a file program which can recognize a shared library
-m4_defun([_LT_PATH_MAGIC],
-[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
-if test -z "$lt_cv_path_MAGIC_CMD"; then
-  if test -n "$ac_tool_prefix"; then
-    _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
-  else
-    MAGIC_CMD=:
-  fi
-fi
-])# _LT_PATH_MAGIC
-
-
-# LT_PATH_LD
-# ----------
-# find the pathname to the GNU or non-GNU linker
-AC_DEFUN([LT_PATH_LD],
-[AC_REQUIRE([AC_PROG_CC])dnl
-AC_REQUIRE([AC_CANONICAL_HOST])dnl
-AC_REQUIRE([AC_CANONICAL_BUILD])dnl
-m4_require([_LT_DECL_SED])dnl
-m4_require([_LT_DECL_EGREP])dnl
-
-AC_ARG_WITH([gnu-ld],
-    [AS_HELP_STRING([--with-gnu-ld],
-	[assume the C compiler uses GNU ld @<:@default=no@:>@])],
-    [test "$withval" = no || with_gnu_ld=yes],
-    [with_gnu_ld=no])dnl
-
-ac_prog=ld
-if test "$GCC" = yes; then
-  # Check if gcc -print-prog-name=ld gives a path.
-  AC_MSG_CHECKING([for ld used by $CC])
-  case $host in
-  *-*-mingw*)
-    # gcc leaves a trailing carriage return which upsets mingw
-    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
-  *)
-    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
-  esac
-  case $ac_prog in
-    # Accept absolute paths.
-    [[\\/]]* | ?:[[\\/]]*)
-      re_direlt='/[[^/]][[^/]]*/\.\./'
-      # Canonicalize the pathname of ld
-      ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
-      while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
-	ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
-      done
-      test -z "$LD" && LD="$ac_prog"
-      ;;
-  "")
-    # If it fails, then pretend we aren't using GCC.
-    ac_prog=ld
-    ;;
-  *)
-    # If it is relative, then search for the first ld in PATH.
-    with_gnu_ld=unknown
-    ;;
-  esac
-elif test "$with_gnu_ld" = yes; then
-  AC_MSG_CHECKING([for GNU ld])
-else
-  AC_MSG_CHECKING([for non-GNU ld])
-fi
-AC_CACHE_VAL(lt_cv_path_LD,
-[if test -z "$LD"; then
-  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
-  for ac_dir in $PATH; do
-    IFS="$lt_save_ifs"
-    test -z "$ac_dir" && ac_dir=.
-    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
-      lt_cv_path_LD="$ac_dir/$ac_prog"
-      # Check to see if the program is GNU ld.  I'd rather use --version,
-      # but apparently some variants of GNU ld only accept -v.
-      # Break only if it was the GNU/non-GNU ld that we prefer.
-      case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
-      *GNU* | *'with BFD'*)
-	test "$with_gnu_ld" != no && break
-	;;
-      *)
-	test "$with_gnu_ld" != yes && break
-	;;
-      esac
-    fi
-  done
-  IFS="$lt_save_ifs"
-else
-  lt_cv_path_LD="$LD" # Let the user override the test with a path.
-fi])
-LD="$lt_cv_path_LD"
-if test -n "$LD"; then
-  AC_MSG_RESULT($LD)
-else
-  AC_MSG_RESULT(no)
-fi
-test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
-_LT_PATH_LD_GNU
-AC_SUBST([LD])
-
-_LT_TAGDECL([], [LD], [1], [The linker used to build libraries])
-])# LT_PATH_LD
-
-# Old names:
-AU_ALIAS([AM_PROG_LD], [LT_PATH_LD])
-AU_ALIAS([AC_PROG_LD], [LT_PATH_LD])
-dnl aclocal-1.4 backwards compatibility:
-dnl AC_DEFUN([AM_PROG_LD], [])
-dnl AC_DEFUN([AC_PROG_LD], [])
-
-
-# _LT_PATH_LD_GNU
-#- --------------
-m4_defun([_LT_PATH_LD_GNU],
-[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
-[# I'd rather use --version here, but apparently some GNU lds only accept -v.
-case `$LD -v 2>&1 </dev/null` in
-*GNU* | *'with BFD'*)
-  lt_cv_prog_gnu_ld=yes
-  ;;
-*)
-  lt_cv_prog_gnu_ld=no
-  ;;
-esac])
-with_gnu_ld=$lt_cv_prog_gnu_ld
-])# _LT_PATH_LD_GNU
-
-
-# _LT_CMD_RELOAD
-# --------------
-# find reload flag for linker
-#   -- PORTME Some linkers may need a different reload flag.
-m4_defun([_LT_CMD_RELOAD],
-[AC_CACHE_CHECK([for $LD option to reload object files],
-  lt_cv_ld_reload_flag,
-  [lt_cv_ld_reload_flag='-r'])
-reload_flag=$lt_cv_ld_reload_flag
-case $reload_flag in
-"" | " "*) ;;
-*) reload_flag=" $reload_flag" ;;
-esac
-reload_cmds='$LD$reload_flag -o $output$reload_objs'
-case $host_os in
-  darwin*)
-    if test "$GCC" = yes; then
-      reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
-    else
-      reload_cmds='$LD$reload_flag -o $output$reload_objs'
-    fi
-    ;;
-esac
-_LT_DECL([], [reload_flag], [1], [How to create reloadable object files])dnl
-_LT_DECL([], [reload_cmds], [2])dnl
-])# _LT_CMD_RELOAD
-
-
-# _LT_CHECK_MAGIC_METHOD
-# ----------------------
-# how to check for library dependencies
-#  -- PORTME fill in with the dynamic library characteristics
-m4_defun([_LT_CHECK_MAGIC_METHOD],
-[m4_require([_LT_DECL_EGREP])
-m4_require([_LT_DECL_OBJDUMP])
-AC_CACHE_CHECK([how to recognize dependent libraries],
-lt_cv_deplibs_check_method,
-[lt_cv_file_magic_cmd='$MAGIC_CMD'
-lt_cv_file_magic_test_file=
-lt_cv_deplibs_check_method='unknown'
-# Need to set the preceding variable on all platforms that support
-# interlibrary dependencies.
-# 'none' -- dependencies not supported.
-# `unknown' -- same as none, but documents that we really don't know.
-# 'pass_all' -- all dependencies passed with no checks.
-# 'test_compile' -- check by making test program.
-# 'file_magic [[regex]]' -- check by looking for files in library path
-# which responds to the $file_magic_cmd with a given extended regex.
-# If you have `file' or equivalent on your system and you're not sure
-# whether `pass_all' will *always* work, you probably want this one.
-
-case $host_os in
-aix[[4-9]]*)
-  lt_cv_deplibs_check_method=pass_all
-  ;;
-
-beos*)
-  lt_cv_deplibs_check_method=pass_all
-  ;;
-
-bsdi[[45]]*)
-  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
-  lt_cv_file_magic_cmd='/usr/bin/file -L'
-  lt_cv_file_magic_test_file=/shlib/libc.so
-  ;;
-
-cygwin*)
-  # func_win32_libid is a shell function defined in ltmain.sh
-  lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
-  lt_cv_file_magic_cmd='func_win32_libid'
-  ;;
-
-mingw* | pw32*)
-  # Base MSYS/MinGW do not provide the 'file' command needed by
-  # func_win32_libid shell function, so use a weaker test based on 'objdump',
-  # unless we find 'file', for example because we are cross-compiling.
-  if ( file / ) >/dev/null 2>&1; then
-    lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
-    lt_cv_file_magic_cmd='func_win32_libid'
-  else
-    lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
-    lt_cv_file_magic_cmd='$OBJDUMP -f'
-  fi
-  ;;
-
-cegcc)
-  # use the weaker test based on 'objdump'. See mingw*.
-  lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
-  lt_cv_file_magic_cmd='$OBJDUMP -f'
-  ;;
-
-darwin* | rhapsody*)
-  lt_cv_deplibs_check_method=pass_all
-  ;;
-
-freebsd* | dragonfly*)
-  if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
-    case $host_cpu in
-    i*86 )
-      # Not sure whether the presence of OpenBSD here was a mistake.
-      # Let's accept both of them until this is cleared up.
-      lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
-      lt_cv_file_magic_cmd=/usr/bin/file
-      lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
-      ;;
-    esac
-  else
-    lt_cv_deplibs_check_method=pass_all
-  fi
-  ;;
-
-gnu*)
-  lt_cv_deplibs_check_method=pass_all
-  ;;
-
-hpux10.20* | hpux11*)
-  lt_cv_file_magic_cmd=/usr/bin/file
-  case $host_cpu in
-  ia64*)
-    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
-    lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
-    ;;
-  hppa*64*)
-    [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]']
-    lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
-    ;;
-  *)
-    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library'
-    lt_cv_file_magic_test_file=/usr/lib/libc.sl
-    ;;
-  esac
-  ;;
-
-interix[[3-9]]*)
-  # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
-  lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
-  ;;
-
-irix5* | irix6* | nonstopux*)
-  case $LD in
-  *-32|*"-32 ") libmagic=32-bit;;
-  *-n32|*"-n32 ") libmagic=N32;;
-  *-64|*"-64 ") libmagic=64-bit;;
-  *) libmagic=never-match;;
-  esac
-  lt_cv_deplibs_check_method=pass_all
-  ;;
-
-# This must be Linux ELF.
-linux* | k*bsd*-gnu)
-  lt_cv_deplibs_check_method=pass_all
-  ;;
-
-netbsd* | netbsdelf*-gnu)
-  if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
-    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
-  else
-    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
-  fi
-  ;;
-
-newos6*)
-  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
-  lt_cv_file_magic_cmd=/usr/bin/file
-  lt_cv_file_magic_test_file=/usr/lib/libnls.so
-  ;;
-
-*nto* | *qnx*)
-  lt_cv_deplibs_check_method=pass_all
-  ;;
-
-openbsd*)
-  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
-    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
-  else
-    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
-  fi
-  ;;
-
-osf3* | osf4* | osf5*)
-  lt_cv_deplibs_check_method=pass_all
-  ;;
-
-rdos*)
-  lt_cv_deplibs_check_method=pass_all
-  ;;
-
-solaris*)
-  lt_cv_deplibs_check_method=pass_all
-  ;;
-
-sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
-  lt_cv_deplibs_check_method=pass_all
-  ;;
-
-sysv4 | sysv4.3*)
-  case $host_vendor in
-  motorola)
-    lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib) M[[0-9]][[0-9]]* Version [[0-9]]'
-    lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
-    ;;
-  ncr)
-    lt_cv_deplibs_check_method=pass_all
-    ;;
-  sequent)
-    lt_cv_file_magic_cmd='/bin/file'
-    lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
-    ;;
-  sni)
-    lt_cv_file_magic_cmd='/bin/file'
-    lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
-    lt_cv_file_magic_test_file=/lib/libc.so
-    ;;
-  siemens)
-    lt_cv_deplibs_check_method=pass_all
-    ;;
-  pc)
-    lt_cv_deplibs_check_method=pass_all
-    ;;
-  esac
-  ;;
-
-tpf*)
-  lt_cv_deplibs_check_method=pass_all
-  ;;
-esac
-])
-file_magic_cmd=$lt_cv_file_magic_cmd
-deplibs_check_method=$lt_cv_deplibs_check_method
-test -z "$deplibs_check_method" && deplibs_check_method=unknown
-
-_LT_DECL([], [deplibs_check_method], [1],
-    [Method to check whether dependent libraries are shared objects])
-_LT_DECL([], [file_magic_cmd], [1],
-    [Command to use when deplibs_check_method == "file_magic"])
-])# _LT_CHECK_MAGIC_METHOD
-
-
-# LT_PATH_NM
-# ----------
-# find the pathname to a BSD- or MS-compatible name lister
-AC_DEFUN([LT_PATH_NM],
-[AC_REQUIRE([AC_PROG_CC])dnl
-AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM,
-[if test -n "$NM"; then
-  # Let the user override the test.
-  lt_cv_path_NM="$NM"
-else
-  lt_nm_to_check="${ac_tool_prefix}nm"
-  if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
-    lt_nm_to_check="$lt_nm_to_check nm"
-  fi
-  for lt_tmp_nm in $lt_nm_to_check; do
-    lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
-    for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
-      IFS="$lt_save_ifs"
-      test -z "$ac_dir" && ac_dir=.
-      tmp_nm="$ac_dir/$lt_tmp_nm"
-      if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
-	# Check to see if the nm accepts a BSD-compat flag.
-	# Adding the `sed 1q' prevents false positives on HP-UX, which says:
-	#   nm: unknown option "B" ignored
-	# Tru64's nm complains that /dev/null is an invalid object file
-	case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
-	*/dev/null* | *'Invalid file or object type'*)
-	  lt_cv_path_NM="$tmp_nm -B"
-	  break
-	  ;;
-	*)
-	  case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
-	  */dev/null*)
-	    lt_cv_path_NM="$tmp_nm -p"
-	    break
-	    ;;
-	  *)
-	    lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
-	    continue # so that we can try to find one that supports BSD flags
-	    ;;
-	  esac
-	  ;;
-	esac
-      fi
-    done
-    IFS="$lt_save_ifs"
-  done
-  : ${lt_cv_path_NM=no}
-fi])
-if test "$lt_cv_path_NM" != "no"; then
-  NM="$lt_cv_path_NM"
-else
-  # Didn't find any BSD compatible name lister, look for dumpbin.
-  AC_CHECK_TOOLS(DUMPBIN, ["dumpbin -symbols" "link -dump -symbols"], :)
-  AC_SUBST([DUMPBIN])
-  if test "$DUMPBIN" != ":"; then
-    NM="$DUMPBIN"
-  fi
-fi
-test -z "$NM" && NM=nm
-AC_SUBST([NM])
-_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl
-
-AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface],
-  [lt_cv_nm_interface="BSD nm"
-  echo "int some_variable = 0;" > conftest.$ac_ext
-  (eval echo "\"\$as_me:__oline__: $ac_compile\"" >&AS_MESSAGE_LOG_FD)
-  (eval "$ac_compile" 2>conftest.err)
-  cat conftest.err >&AS_MESSAGE_LOG_FD
-  (eval echo "\"\$as_me:__oline__: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD)
-  (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
-  cat conftest.err >&AS_MESSAGE_LOG_FD
-  (eval echo "\"\$as_me:__oline__: output\"" >&AS_MESSAGE_LOG_FD)
-  cat conftest.out >&AS_MESSAGE_LOG_FD
-  if $GREP 'External.*some_variable' conftest.out > /dev/null; then
-    lt_cv_nm_interface="MS dumpbin"
-  fi
-  rm -f conftest*])
-])# LT_PATH_NM
-
-# Old names:
-AU_ALIAS([AM_PROG_NM], [LT_PATH_NM])
-AU_ALIAS([AC_PROG_NM], [LT_PATH_NM])
-dnl aclocal-1.4 backwards compatibility:
-dnl AC_DEFUN([AM_PROG_NM], [])
-dnl AC_DEFUN([AC_PROG_NM], [])
-
-
-# LT_LIB_M
-# --------
-# check for math library
-AC_DEFUN([LT_LIB_M],
-[AC_REQUIRE([AC_CANONICAL_HOST])dnl
-LIBM=
-case $host in
-*-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*)
-  # These system don't have libm, or don't need it
-  ;;
-*-ncr-sysv4.3*)
-  AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
-  AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
-  ;;
-*)
-  AC_CHECK_LIB(m, cos, LIBM="-lm")
-  ;;
-esac
-AC_SUBST([LIBM])
-])# LT_LIB_M
-
-# Old name:
-AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M])
-dnl aclocal-1.4 backwards compatibility:
-dnl AC_DEFUN([AC_CHECK_LIBM], [])
-
-
-# _LT_COMPILER_NO_RTTI([TAGNAME])
-# -------------------------------
-m4_defun([_LT_COMPILER_NO_RTTI],
-[m4_require([_LT_TAG_COMPILER])dnl
-
-_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
-
-if test "$GCC" = yes; then
-  _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
-
-  _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
-    lt_cv_prog_compiler_rtti_exceptions,
-    [-fno-rtti -fno-exceptions], [],
-    [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
-fi
-_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1],
-	[Compiler flag to turn off builtin functions])
-])# _LT_COMPILER_NO_RTTI
-
-
-# _LT_CMD_GLOBAL_SYMBOLS
-# ----------------------
-m4_defun([_LT_CMD_GLOBAL_SYMBOLS],
-[AC_REQUIRE([AC_CANONICAL_HOST])dnl
-AC_REQUIRE([AC_PROG_CC])dnl
-AC_REQUIRE([LT_PATH_NM])dnl
-AC_REQUIRE([LT_PATH_LD])dnl
-m4_require([_LT_DECL_SED])dnl
-m4_require([_LT_DECL_EGREP])dnl
-m4_require([_LT_TAG_COMPILER])dnl
-
-# Check for command to grab the raw symbol name followed by C symbol from nm.
-AC_MSG_CHECKING([command to parse $NM output from $compiler object])
-AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
-[
-# These are sane defaults that work on at least a few old systems.
-# [They come from Ultrix.  What could be older than Ultrix?!! ;)]
-
-# Character class describing NM global symbol codes.
-symcode='[[BCDEGRST]]'
-
-# Regexp to match symbols that can be accessed directly from C.
-sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
-
-# Define system-specific variables.
-case $host_os in
-aix*)
-  symcode='[[BCDT]]'
-  ;;
-cygwin* | mingw* | pw32* | cegcc*)
-  symcode='[[ABCDGISTW]]'
-  ;;
-hpux*)
-  if test "$host_cpu" = ia64; then
-    symcode='[[ABCDEGRST]]'
-  fi
-  ;;
-irix* | nonstopux*)
-  symcode='[[BCDEGRST]]'
-  ;;
-osf*)
-  symcode='[[BCDEGQRST]]'
-  ;;
-solaris*)
-  symcode='[[BDRT]]'
-  ;;
-sco3.2v5*)
-  symcode='[[DT]]'
-  ;;
-sysv4.2uw2*)
-  symcode='[[DT]]'
-  ;;
-sysv5* | sco5v6* | unixware* | OpenUNIX*)
-  symcode='[[ABDT]]'
-  ;;
-sysv4)
-  symcode='[[DFNSTU]]'
-  ;;
-esac
-
-# If we're using GNU nm, then use its standard symbol codes.
-case `$NM -V 2>&1` in
-*GNU* | *'with BFD'*)
-  symcode='[[ABCDGIRSTW]]' ;;
-esac
-
-# Transform an extracted symbol line into a proper C declaration.
-# Some systems (esp. on ia64) link data and code symbols differently,
-# so use this general approach.
-lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
-
-# Transform an extracted symbol line into symbol name and symbol address
-lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/  {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/  {\"\2\", (void *) \&\2},/p'"
-lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([[^ ]]*\) $/  {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \(lib[[^ ]]*\)$/  {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/  {\"lib\2\", (void *) \&\2},/p'"
-
-# Handle CRLF in mingw tool chain
-opt_cr=
-case $build_os in
-mingw*)
-  opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
-  ;;
-esac
-
-# Try without a prefix underscore, then with it.
-for ac_symprfx in "" "_"; do
-
-  # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
-  symxfrm="\\1 $ac_symprfx\\2 \\2"
-
-  # Write the raw and C identifiers.
-  if test "$lt_cv_nm_interface" = "MS dumpbin"; then
-    # Fake it for dumpbin and say T for any non-static function
-    # and D for any global variable.
-    # Also find C++ and __fastcall symbols from MSVC++,
-    # which start with @ or ?.
-    lt_cv_sys_global_symbol_pipe="$AWK ['"\
-"     {last_section=section; section=\$ 3};"\
-"     /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
-"     \$ 0!~/External *\|/{next};"\
-"     / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
-"     {if(hide[section]) next};"\
-"     {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\
-"     {split(\$ 0, a, /\||\r/); split(a[2], s)};"\
-"     s[1]~/^[@?]/{print s[1], s[1]; next};"\
-"     s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\
-"     ' prfx=^$ac_symprfx]"
-  else
-    lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[	 ]]\($symcode$symcode*\)[[	 ]][[	 ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
-  fi
-
-  # Check to see that the pipe works correctly.
-  pipe_works=no
-
-  rm -f conftest*
-  cat > conftest.$ac_ext <<_LT_EOF
-#ifdef __cplusplus
-extern "C" {
-#endif
-char nm_test_var;
-void nm_test_func(void);
-void nm_test_func(void){}
-#ifdef __cplusplus
-}
-#endif
-int main(){nm_test_var='a';nm_test_func();return(0);}
-_LT_EOF
-
-  if AC_TRY_EVAL(ac_compile); then
-    # Now try to grab the symbols.
-    nlist=conftest.nm
-    if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then
-      # Try sorting and uniquifying the output.
-      if sort "$nlist" | uniq > "$nlist"T; then
-	mv -f "$nlist"T "$nlist"
-      else
-	rm -f "$nlist"T
-      fi
-
-      # Make sure that we snagged all the symbols we need.
-      if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
-	if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
-	  cat <<_LT_EOF > conftest.$ac_ext
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-_LT_EOF
-	  # Now generate the symbol file.
-	  eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
-
-	  cat <<_LT_EOF >> conftest.$ac_ext
-
-/* The mapping between symbol names and symbols.  */
-const struct {
-  const char *name;
-  void       *address;
-}
-lt__PROGRAM__LTX_preloaded_symbols[[]] =
-{
-  { "@PROGRAM@", (void *) 0 },
-_LT_EOF
-	  $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
-	  cat <<\_LT_EOF >> conftest.$ac_ext
-  {0, (void *) 0}
-};
-
-/* This works around a problem in FreeBSD linker */
-#ifdef FREEBSD_WORKAROUND
-static const void *lt_preloaded_setup() {
-  return lt__PROGRAM__LTX_preloaded_symbols;
-}
-#endif
-
-#ifdef __cplusplus
-}
-#endif
-_LT_EOF
-	  # Now try linking the two files.
-	  mv conftest.$ac_objext conftstm.$ac_objext
-	  lt_save_LIBS="$LIBS"
-	  lt_save_CFLAGS="$CFLAGS"
-	  LIBS="conftstm.$ac_objext"
-	  CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
-	  if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
-	    pipe_works=yes
-	  fi
-	  LIBS="$lt_save_LIBS"
-	  CFLAGS="$lt_save_CFLAGS"
-	else
-	  echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
-	fi
-      else
-	echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
-      fi
-    else
-      echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
-    fi
-  else
-    echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
-    cat conftest.$ac_ext >&5
-  fi
-  rm -rf conftest* conftst*
-
-  # Do not use the global_symbol_pipe unless it works.
-  if test "$pipe_works" = yes; then
-    break
-  else
-    lt_cv_sys_global_symbol_pipe=
-  fi
-done
-])
-if test -z "$lt_cv_sys_global_symbol_pipe"; then
-  lt_cv_sys_global_symbol_to_cdecl=
-fi
-if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
-  AC_MSG_RESULT(failed)
-else
-  AC_MSG_RESULT(ok)
-fi
-
-_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1],
-    [Take the output of nm and produce a listing of raw symbols and C names])
-_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1],
-    [Transform the output of nm in a proper C declaration])
-_LT_DECL([global_symbol_to_c_name_address],
-    [lt_cv_sys_global_symbol_to_c_name_address], [1],
-    [Transform the output of nm in a C name address pair])
-_LT_DECL([global_symbol_to_c_name_address_lib_prefix],
-    [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1],
-    [Transform the output of nm in a C name address pair when lib prefix is needed])
-]) # _LT_CMD_GLOBAL_SYMBOLS
-
-
-# _LT_COMPILER_PIC([TAGNAME])
-# ---------------------------
-m4_defun([_LT_COMPILER_PIC],
-[m4_require([_LT_TAG_COMPILER])dnl
-_LT_TAGVAR(lt_prog_compiler_wl, $1)=
-_LT_TAGVAR(lt_prog_compiler_pic, $1)=
-_LT_TAGVAR(lt_prog_compiler_static, $1)=
-
-AC_MSG_CHECKING([for $compiler option to produce PIC])
-m4_if([$1], [CXX], [
-  # C++ specific cases for pic, static, wl, etc.
-  if test "$GXX" = yes; then
-    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
-    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
-
-    case $host_os in
-    aix*)
-      # All AIX code is PIC.
-      if test "$host_cpu" = ia64; then
-	# AIX 5 now supports IA64 processor
-	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
-      fi
-      ;;
-
-    amigaos*)
-      case $host_cpu in
-      powerpc)
-            # see comment about AmigaOS4 .so support
-            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
-        ;;
-      m68k)
-            # FIXME: we need at least 68020 code to build shared libraries, but
-            # adding the `-m68020' flag to GCC prevents building anything better,
-            # like `-m68040'.
-            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
-        ;;
-      esac
-      ;;
-
-    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
-      # PIC is the default for these OSes.
-      ;;
-    mingw* | cygwin* | os2* | pw32* | cegcc*)
-      # This hack is so that the source file can tell whether it is being
-      # built for inclusion in a dll (and should export symbols for example).
-      # Although the cygwin gcc ignores -fPIC, still need this for old-style
-      # (--disable-auto-import) libraries
-      m4_if([$1], [GCJ], [],
-	[_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
-      ;;
-    darwin* | rhapsody*)
-      # PIC is the default on this platform
-      # Common symbols not allowed in MH_DYLIB files
-      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
-      ;;
-    *djgpp*)
-      # DJGPP does not support shared libraries at all
-      _LT_TAGVAR(lt_prog_compiler_pic, $1)=
-      ;;
-    interix[[3-9]]*)
-      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
-      # Instead, we relocate shared libraries at runtime.
-      ;;
-    sysv4*MP*)
-      if test -d /usr/nec; then
-	_LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
-      fi
-      ;;
-    hpux*)
-      # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
-      # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag
-      # sets the default TLS model and affects inlining.
-      case $host_cpu in
-      hppa*64*)
-	;;
-      *)
-	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
-	;;
-      esac
-      ;;
-    *qnx* | *nto*)
-      # QNX uses GNU C++, but need to define -shared option too, otherwise
-      # it will coredump.
-      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
-      ;;
-    *)
-      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
-      ;;
-    esac
-  else
-    case $host_os in
-      aix[[4-9]]*)
-	# All AIX code is PIC.
-	if test "$host_cpu" = ia64; then
-	  # AIX 5 now supports IA64 processor
-	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
-	else
-	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
-	fi
-	;;
-      chorus*)
-	case $cc_basename in
-	cxch68*)
-	  # Green Hills C++ Compiler
-	  # _LT_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a"
-	  ;;
-	esac
-	;;
-      dgux*)
-	case $cc_basename in
-	  ec++*)
-	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
-	    ;;
-	  ghcx*)
-	    # Green Hills C++ Compiler
-	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
-	    ;;
-	  *)
-	    ;;
-	esac
-	;;
-      freebsd* | dragonfly*)
-	# FreeBSD uses GNU C++
-	;;
-      hpux9* | hpux10* | hpux11*)
-	case $cc_basename in
-	  CC*)
-	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
-	    _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
-	    if test "$host_cpu" != ia64; then
-	      _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
-	    fi
-	    ;;
-	  aCC*)
-	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
-	    _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
-	    case $host_cpu in
-	    hppa*64*|ia64*)
-	      # +Z the default
-	      ;;
-	    *)
-	      _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
-	      ;;
-	    esac
-	    ;;
-	  *)
-	    ;;
-	esac
-	;;
-      interix*)
-	# This is c89, which is MS Visual C++ (no shared libs)
-	# Anyone wants to do a port?
-	;;
-      irix5* | irix6* | nonstopux*)
-	case $cc_basename in
-	  CC*)
-	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
-	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
-	    # CC pic flag -KPIC is the default.
-	    ;;
-	  *)
-	    ;;
-	esac
-	;;
-      linux* | k*bsd*-gnu)
-	case $cc_basename in
-	  KCC*)
-	    # KAI C++ Compiler
-	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
-	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
-	    ;;
-	  ecpc* )
-	    # old Intel C++ for x86_64 which still supported -KPIC.
-	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
-	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
-	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
-	    ;;
-	  icpc* )
-	    # Intel C++, used to be incompatible with GCC.
-	    # ICC 10 doesn't accept -KPIC any more.
-	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
-	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
-	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
-	    ;;
-	  pgCC* | pgcpp*)
-	    # Portland Group C++ compiler
-	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
-	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
-	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
-	    ;;
-	  cxx*)
-	    # Compaq C++
-	    # Make sure the PIC flag is empty.  It appears that all Alpha
-	    # Linux and Compaq Tru64 Unix objects are PIC.
-	    _LT_TAGVAR(lt_prog_compiler_pic, $1)=
-	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
-	    ;;
-	  xlc* | xlC*)
-	    # IBM XL 8.0 on PPC
-	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
-	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
-	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
-	    ;;
-	  *)
-	    case `$CC -V 2>&1 | sed 5q` in
-	    *Sun\ C*)
-	      # Sun C++ 5.9
-	      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
-	      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
-	      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
-	      ;;
-	    esac
-	    ;;
-	esac
-	;;
-      lynxos*)
-	;;
-      m88k*)
-	;;
-      mvs*)
-	case $cc_basename in
-	  cxx*)
-	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
-	    ;;
-	  *)
-	    ;;
-	esac
-	;;
-      netbsd* | netbsdelf*-gnu)
-	;;
-      *qnx* | *nto*)
-        # QNX uses GNU C++, but need to define -shared option too, otherwise
-        # it will coredump.
-        _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
-        ;;
-      osf3* | osf4* | osf5*)
-	case $cc_basename in
-	  KCC*)
-	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
-	    ;;
-	  RCC*)
-	    # Rational C++ 2.4.1
-	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
-	    ;;
-	  cxx*)
-	    # Digital/Compaq C++
-	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
-	    # Make sure the PIC flag is empty.  It appears that all Alpha
-	    # Linux and Compaq Tru64 Unix objects are PIC.
-	    _LT_TAGVAR(lt_prog_compiler_pic, $1)=
-	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
-	    ;;
-	  *)
-	    ;;
-	esac
-	;;
-      psos*)
-	;;
-      solaris*)
-	case $cc_basename in
-	  CC*)
-	    # Sun C++ 4.2, 5.x and Centerline C++
-	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
-	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
-	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
-	    ;;
-	  gcx*)
-	    # Green Hills C++ Compiler
-	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
-	    ;;
-	  *)
-	    ;;
-	esac
-	;;
-      sunos4*)
-	case $cc_basename in
-	  CC*)
-	    # Sun C++ 4.x
-	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
-	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
-	    ;;
-	  lcc*)
-	    # Lucid
-	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
-	    ;;
-	  *)
-	    ;;
-	esac
-	;;
-      sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
-	case $cc_basename in
-	  CC*)
-	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
-	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
-	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
-	    ;;
-	esac
-	;;
-      tandem*)
-	case $cc_basename in
-	  NCC*)
-	    # NonStop-UX NCC 3.20
-	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
-	    ;;
-	  *)
-	    ;;
-	esac
-	;;
-      vxworks*)
-	;;
-      *)
-	_LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
-	;;
-    esac
-  fi
-],
-[
-  if test "$GCC" = yes; then
-    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
-    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
-
-    case $host_os in
-      aix*)
-      # All AIX code is PIC.
-      if test "$host_cpu" = ia64; then
-	# AIX 5 now supports IA64 processor
-	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
-      fi
-      ;;
-
-    amigaos*)
-      case $host_cpu in
-      powerpc)
-            # see comment about AmigaOS4 .so support
-            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
-        ;;
-      m68k)
-            # FIXME: we need at least 68020 code to build shared libraries, but
-            # adding the `-m68020' flag to GCC prevents building anything better,
-            # like `-m68040'.
-            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
-        ;;
-      esac
-      ;;
-
-    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
-      # PIC is the default for these OSes.
-      ;;
-
-    mingw* | cygwin* | pw32* | os2* | cegcc*)
-      # This hack is so that the source file can tell whether it is being
-      # built for inclusion in a dll (and should export symbols for example).
-      # Although the cygwin gcc ignores -fPIC, still need this for old-style
-      # (--disable-auto-import) libraries
-      m4_if([$1], [GCJ], [],
-	[_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
-      ;;
-
-    darwin* | rhapsody*)
-      # PIC is the default on this platform
-      # Common symbols not allowed in MH_DYLIB files
-      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
-      ;;
-
-    hpux*)
-      # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
-      # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag
-      # sets the default TLS model and affects inlining.
-      case $host_cpu in
-      hppa*64*)
-	# +Z the default
-	;;
-      *)
-	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
-	;;
-      esac
-      ;;
-
-    interix[[3-9]]*)
-      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
-      # Instead, we relocate shared libraries at runtime.
-      ;;
-
-    msdosdjgpp*)
-      # Just because we use GCC doesn't mean we suddenly get shared libraries
-      # on systems that don't support them.
-      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
-      enable_shared=no
-      ;;
-
-    *nto* | *qnx*)
-      # QNX uses GNU C++, but need to define -shared option too, otherwise
-      # it will coredump.
-      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
-      ;;
-
-    sysv4*MP*)
-      if test -d /usr/nec; then
-	_LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
-      fi
-      ;;
-
-    *)
-      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
-      ;;
-    esac
-  else
-    # PORTME Check for flag to pass linker flags through the system compiler.
-    case $host_os in
-    aix*)
-      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
-      if test "$host_cpu" = ia64; then
-	# AIX 5 now supports IA64 processor
-	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
-      else
-	_LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
-      fi
-      ;;
-
-    mingw* | cygwin* | pw32* | os2* | cegcc*)
-      # This hack is so that the source file can tell whether it is being
-      # built for inclusion in a dll (and should export symbols for example).
-      m4_if([$1], [GCJ], [],
-	[_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
-      ;;
-
-    hpux9* | hpux10* | hpux11*)
-      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
-      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
-      # not for PA HP-UX.
-      case $host_cpu in
-      hppa*64*|ia64*)
-	# +Z the default
-	;;
-      *)
-	_LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
-	;;
-      esac
-      # Is there a better lt_prog_compiler_static that works with the bundled CC?
-      _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
-      ;;
-
-    irix5* | irix6* | nonstopux*)
-      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
-      # PIC (with -KPIC) is the default.
-      _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
-      ;;
-
-    linux* | k*bsd*-gnu)
-      case $cc_basename in
-      # old Intel for x86_64 which still supported -KPIC.
-      ecc*)
-	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
-	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
-	_LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
-        ;;
-      # icc used to be incompatible with GCC.
-      # ICC 10 doesn't accept -KPIC any more.
-      icc* | ifort*)
-	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
-	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
-	_LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
-        ;;
-      # Lahey Fortran 8.1.
-      lf95*)
-	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
-	_LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared'
-	_LT_TAGVAR(lt_prog_compiler_static, $1)='--static'
-	;;
-      pgcc* | pgf77* | pgf90* | pgf95*)
-        # Portland Group compilers (*not* the Pentium gcc compiler,
-	# which looks to be a dead project)
-	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
-	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
-	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
-        ;;
-      ccc*)
-        _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
-        # All Alpha code is PIC.
-        _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
-        ;;
-      xl*)
-	# IBM XL C 8.0/Fortran 10.1 on PPC
-	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
-	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
-	_LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
-	;;
-      *)
-	case `$CC -V 2>&1 | sed 5q` in
-	*Sun\ C*)
-	  # Sun C 5.9
-	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
-	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
-	  _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
-	  ;;
-	*Sun\ F*)
-	  # Sun Fortran 8.3 passes all unrecognized flags to the linker
-	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
-	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
-	  _LT_TAGVAR(lt_prog_compiler_wl, $1)=''
-	  ;;
-	esac
-	;;
-      esac
-      ;;
-
-    newsos6)
-      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
-      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
-      ;;
-
-    *nto* | *qnx*)
-      # QNX uses GNU C++, but need to define -shared option too, otherwise
-      # it will coredump.
-      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
-      ;;
-
-    osf3* | osf4* | osf5*)
-      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
-      # All OSF/1 code is PIC.
-      _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
-      ;;
-
-    rdos*)
-      _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
-      ;;
-
-    solaris*)
-      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
-      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
-      case $cc_basename in
-      f77* | f90* | f95*)
-	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
-      *)
-	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
-      esac
-      ;;
-
-    sunos4*)
-      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
-      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
-      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
-      ;;
-
-    sysv4 | sysv4.2uw2* | sysv4.3*)
-      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
-      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
-      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
-      ;;
-
-    sysv4*MP*)
-      if test -d /usr/nec ;then
-	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
-	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
-      fi
-      ;;
-
-    sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
-      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
-      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
-      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
-      ;;
-
-    unicos*)
-      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
-      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
-      ;;
-
-    uts4*)
-      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
-      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
-      ;;
-
-    *)
-      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
-      ;;
-    esac
-  fi
-])
-case $host_os in
-  # For platforms which do not support PIC, -DPIC is meaningless:
-  *djgpp*)
-    _LT_TAGVAR(lt_prog_compiler_pic, $1)=
-    ;;
-  *)
-    _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])"
-    ;;
-esac
-AC_MSG_RESULT([$_LT_TAGVAR(lt_prog_compiler_pic, $1)])
-_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1],
-	[How to pass a linker flag through the compiler])
-
-#
-# Check to make sure the PIC flag actually works.
-#
-if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
-  _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works],
-    [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)],
-    [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [],
-    [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in
-     "" | " "*) ;;
-     *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;;
-     esac],
-    [_LT_TAGVAR(lt_prog_compiler_pic, $1)=
-     _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
-fi
-_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1],
-	[Additional compiler flags for building library objects])
-
-#
-# Check to make sure the static flag actually works.
-#
-wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\"
-_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
-  _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1),
-  $lt_tmp_static_flag,
-  [],
-  [_LT_TAGVAR(lt_prog_compiler_static, $1)=])
-_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1],
-	[Compiler flag to prevent dynamic linking])
-])# _LT_COMPILER_PIC
-
-
-# _LT_LINKER_SHLIBS([TAGNAME])
-# ----------------------------
-# See if the linker supports building shared libraries.
-m4_defun([_LT_LINKER_SHLIBS],
-[AC_REQUIRE([LT_PATH_LD])dnl
-AC_REQUIRE([LT_PATH_NM])dnl
-m4_require([_LT_FILEUTILS_DEFAULTS])dnl
-m4_require([_LT_DECL_EGREP])dnl
-m4_require([_LT_DECL_SED])dnl
-m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
-m4_require([_LT_TAG_COMPILER])dnl
-AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
-m4_if([$1], [CXX], [
-  _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
-  case $host_os in
-  aix[[4-9]]*)
-    # If we're using GNU nm, then we don't want the "-C" option.
-    # -C means demangle to AIX nm, but means don't demangle with GNU nm
-    if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
-      _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
-    else
-      _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
-    fi
-    ;;
-  pw32*)
-    _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
-  ;;
-  cygwin* | mingw* | cegcc*)
-    _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;/^.*[[ ]]__nm__/s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols'
-  ;;
-  linux* | k*bsd*-gnu)
-    _LT_TAGVAR(link_all_deplibs, $1)=no
-  ;;
-  *)
-    _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
-  ;;
-  esac
-  _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
-], [
-  runpath_var=
-  _LT_TAGVAR(allow_undefined_flag, $1)=
-  _LT_TAGVAR(always_export_symbols, $1)=no
-  _LT_TAGVAR(archive_cmds, $1)=
-  _LT_TAGVAR(archive_expsym_cmds, $1)=
-  _LT_TAGVAR(compiler_needs_object, $1)=no
-  _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
-  _LT_TAGVAR(export_dynamic_flag_spec, $1)=
-  _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
-  _LT_TAGVAR(hardcode_automatic, $1)=no
-  _LT_TAGVAR(hardcode_direct, $1)=no
-  _LT_TAGVAR(hardcode_direct_absolute, $1)=no
-  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
-  _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
-  _LT_TAGVAR(hardcode_libdir_separator, $1)=
-  _LT_TAGVAR(hardcode_minus_L, $1)=no
-  _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
-  _LT_TAGVAR(inherit_rpath, $1)=no
-  _LT_TAGVAR(link_all_deplibs, $1)=unknown
-  _LT_TAGVAR(module_cmds, $1)=
-  _LT_TAGVAR(module_expsym_cmds, $1)=
-  _LT_TAGVAR(old_archive_from_new_cmds, $1)=
-  _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)=
-  _LT_TAGVAR(thread_safe_flag_spec, $1)=
-  _LT_TAGVAR(whole_archive_flag_spec, $1)=
-  # include_expsyms should be a list of space-separated symbols to be *always*
-  # included in the symbol list
-  _LT_TAGVAR(include_expsyms, $1)=
-  # exclude_expsyms can be an extended regexp of symbols to exclude
-  # it will be wrapped by ` (' and `)$', so one must not match beginning or
-  # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
-  # as well as any symbol that contains `d'.
-  _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
-  # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
-  # platforms (ab)use it in PIC code, but their linkers get confused if
-  # the symbol is explicitly referenced.  Since portable code cannot
-  # rely on this symbol name, it's probably fine to never include it in
-  # preloaded symbol tables.
-  # Exclude shared library initialization/finalization symbols.
-dnl Note also adjust exclude_expsyms for C++ above.
-  extract_expsyms_cmds=
-
-  case $host_os in
-  cygwin* | mingw* | pw32* | cegcc*)
-    # FIXME: the MSVC++ port hasn't been tested in a loooong time
-    # When not using gcc, we currently assume that we are using
-    # Microsoft Visual C++.
-    if test "$GCC" != yes; then
-      with_gnu_ld=no
-    fi
-    ;;
-  interix*)
-    # we just hope/assume this is gcc and not c89 (= MSVC++)
-    with_gnu_ld=yes
-    ;;
-  openbsd*)
-    with_gnu_ld=no
-    ;;
-  linux* | k*bsd*-gnu)
-    _LT_TAGVAR(link_all_deplibs, $1)=no
-    ;;
-  esac
-
-  _LT_TAGVAR(ld_shlibs, $1)=yes
-  if test "$with_gnu_ld" = yes; then
-    # If archive_cmds runs LD, not CC, wlarc should be empty
-    wlarc='${wl}'
-
-    # Set some defaults for GNU ld with shared library support. These
-    # are reset later if shared libraries are not supported. Putting them
-    # here allows them to be overridden if necessary.
-    runpath_var=LD_RUN_PATH
-    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
-    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
-    # ancient GNU ld didn't support --whole-archive et. al.
-    if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
-      _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
-    else
-      _LT_TAGVAR(whole_archive_flag_spec, $1)=
-    fi
-    supports_anon_versioning=no
-    case `$LD -v 2>&1` in
-      *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
-      *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
-      *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
-      *\ 2.11.*) ;; # other 2.11 versions
-      *) supports_anon_versioning=yes ;;
-    esac
-
-    # See if GNU ld supports shared libraries.
-    case $host_os in
-    aix[[3-9]]*)
-      # On AIX/PPC, the GNU linker is very broken
-      if test "$host_cpu" != ia64; then
-	_LT_TAGVAR(ld_shlibs, $1)=no
-	cat <<_LT_EOF 1>&2
-
-*** Warning: the GNU linker, at least up to release 2.9.1, is reported
-*** to be unable to reliably create shared libraries on AIX.
-*** Therefore, libtool is disabling shared libraries support.  If you
-*** really care for shared libraries, you may want to modify your PATH
-*** so that a non-GNU linker is found, and then restart.
-
-_LT_EOF
-      fi
-      ;;
-
-    amigaos*)
-      case $host_cpu in
-      powerpc)
-            # see comment about AmigaOS4 .so support
-            _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
-            _LT_TAGVAR(archive_expsym_cmds, $1)=''
-        ;;
-      m68k)
-            _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
-            _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
-            _LT_TAGVAR(hardcode_minus_L, $1)=yes
-        ;;
-      esac
-      ;;
-
-    beos*)
-      if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
-	_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
-	# Joseph Beckenbach <jrb3@best.com> says some releases of gcc
-	# support --undefined.  This deserves some investigation.  FIXME
-	_LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
-      else
-	_LT_TAGVAR(ld_shlibs, $1)=no
-      fi
-      ;;
-
-    cygwin* | mingw* | pw32* | cegcc*)
-      # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
-      # as there is no search path for DLLs.
-      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
-      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
-      _LT_TAGVAR(always_export_symbols, $1)=no
-      _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
-      _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols'
-
-      if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
-        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
-	# If the export-symbols file already is a .def file (1st line
-	# is EXPORTS), use it as is; otherwise, prepend...
-	_LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
-	  cp $export_symbols $output_objdir/$soname.def;
-	else
-	  echo EXPORTS > $output_objdir/$soname.def;
-	  cat $export_symbols >> $output_objdir/$soname.def;
-	fi~
-	$CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
-      else
-	_LT_TAGVAR(ld_shlibs, $1)=no
-      fi
-      ;;
-
-    interix[[3-9]]*)
-      _LT_TAGVAR(hardcode_direct, $1)=no
-      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
-      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
-      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
-      # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
-      # Instead, shared libraries are loaded at an image base (0x10000000 by
-      # default) and relocated if they conflict, which is a slow very memory
-      # consuming and fragmenting process.  To avoid this, we pick a random,
-      # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
-      # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
-      _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
-      _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
-      ;;
-
-    gnu* | linux* | tpf* | k*bsd*-gnu)
-      tmp_diet=no
-      if test "$host_os" = linux-dietlibc; then
-	case $cc_basename in
-	  diet\ *) tmp_diet=yes;;	# linux-dietlibc with static linking (!diet-dyn)
-	esac
-      fi
-      if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
-	 && test "$tmp_diet" = no
-      then
-	tmp_addflag=
-	tmp_sharedflag='-shared'
-	case $cc_basename,$host_cpu in
-        pgcc*)				# Portland Group C compiler
-	  _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
-	  tmp_addflag=' $pic_flag'
-	  ;;
-	pgf77* | pgf90* | pgf95*)	# Portland Group f77 and f90 compilers
-	  _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
-	  tmp_addflag=' $pic_flag -Mnomain' ;;
-	ecc*,ia64* | icc*,ia64*)	# Intel C compiler on ia64
-	  tmp_addflag=' -i_dynamic' ;;
-	efc*,ia64* | ifort*,ia64*)	# Intel Fortran compiler on ia64
-	  tmp_addflag=' -i_dynamic -nofor_main' ;;
-	ifc* | ifort*)			# Intel Fortran compiler
-	  tmp_addflag=' -nofor_main' ;;
-	lf95*)				# Lahey Fortran 8.1
-	  _LT_TAGVAR(whole_archive_flag_spec, $1)=
-	  tmp_sharedflag='--shared' ;;
-	xl[[cC]]*)			# IBM XL C 8.0 on PPC (deal with xlf below)
-	  tmp_sharedflag='-qmkshrobj'
-	  tmp_addflag= ;;
-	esac
-	case `$CC -V 2>&1 | sed 5q` in
-	*Sun\ C*)			# Sun C 5.9
-	  _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
-	  _LT_TAGVAR(compiler_needs_object, $1)=yes
-	  tmp_sharedflag='-G' ;;
-	*Sun\ F*)			# Sun Fortran 8.3
-	  tmp_sharedflag='-G' ;;
-	esac
-	_LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
-
-        if test "x$supports_anon_versioning" = xyes; then
-          _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
-	    cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
-	    echo "local: *; };" >> $output_objdir/$libname.ver~
-	    $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
-        fi
-
-	case $cc_basename in
-	xlf*)
-	  # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
-	  _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive'
-	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
-	  _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir'
-	  _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $compiler_flags -soname $soname -o $lib'
-	  if test "x$supports_anon_versioning" = xyes; then
-	    _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
-	      cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
-	      echo "local: *; };" >> $output_objdir/$libname.ver~
-	      $LD -shared $libobjs $deplibs $compiler_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
-	  fi
-	  ;;
-	esac
-      else
-        _LT_TAGVAR(ld_shlibs, $1)=no
-      fi
-      ;;
-
-    netbsd* | netbsdelf*-gnu)
-      if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
-	_LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
-	wlarc=
-      else
-	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
-	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
-      fi
-      ;;
-
-    solaris*)
-      if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
-	_LT_TAGVAR(ld_shlibs, $1)=no
-	cat <<_LT_EOF 1>&2
-
-*** Warning: The releases 2.8.* of the GNU linker cannot reliably
-*** create shared libraries on Solaris systems.  Therefore, libtool
-*** is disabling shared libraries support.  We urge you to upgrade GNU
-*** binutils to release 2.9.1 or newer.  Another option is to modify
-*** your PATH or compiler configuration so that the native linker is
-*** used, and then restart.
-
-_LT_EOF
-      elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
-	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
-	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
-      else
-	_LT_TAGVAR(ld_shlibs, $1)=no
-      fi
-      ;;
-
-    sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
-      case `$LD -v 2>&1` in
-        *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*)
-	_LT_TAGVAR(ld_shlibs, $1)=no
-	cat <<_LT_EOF 1>&2
-
-*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
-*** reliably create shared libraries on SCO systems.  Therefore, libtool
-*** is disabling shared libraries support.  We urge you to upgrade GNU
-*** binutils to release 2.16.91.0.3 or newer.  Another option is to modify
-*** your PATH or compiler configuration so that the native linker is
-*** used, and then restart.
-
-_LT_EOF
-	;;
-	*)
-	  # For security reasons, it is highly recommended that you always
-	  # use absolute paths for naming shared libraries, and exclude the
-	  # DT_RUNPATH tag from executables and libraries.  But doing so
-	  # requires that you compile everything twice, which is a pain.
-	  if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
-	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
-	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
-	    _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
-	  else
-	    _LT_TAGVAR(ld_shlibs, $1)=no
-	  fi
-	;;
-      esac
-      ;;
-
-    sunos4*)
-      _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
-      wlarc=
-      _LT_TAGVAR(hardcode_direct, $1)=yes
-      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
-      ;;
-
-    *)
-      if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
-	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
-	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
-      else
-	_LT_TAGVAR(ld_shlibs, $1)=no
-      fi
-      ;;
-    esac
-
-    if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then
-      runpath_var=
-      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
-      _LT_TAGVAR(export_dynamic_flag_spec, $1)=
-      _LT_TAGVAR(whole_archive_flag_spec, $1)=
-    fi
-  else
-    # PORTME fill in a description of your system's linker (not GNU ld)
-    case $host_os in
-    aix3*)
-      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
-      _LT_TAGVAR(always_export_symbols, $1)=yes
-      _LT_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'
-      # Note: this linker hardcodes the directories in LIBPATH if there
-      # are no directories specified by -L.
-      _LT_TAGVAR(hardcode_minus_L, $1)=yes
-      if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
-	# Neither direct hardcoding nor static linking is supported with a
-	# broken collect2.
-	_LT_TAGVAR(hardcode_direct, $1)=unsupported
-      fi
-      ;;
-
-    aix[[4-9]]*)
-      if test "$host_cpu" = ia64; then
-	# On IA64, the linker does run time linking by default, so we don't
-	# have to do anything special.
-	aix_use_runtimelinking=no
-	exp_sym_flag='-Bexport'
-	no_entry_flag=""
-      else
-	# If we're using GNU nm, then we don't want the "-C" option.
-	# -C means demangle to AIX nm, but means don't demangle with GNU nm
-	if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
-	  _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
-	else
-	  _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
-	fi
-	aix_use_runtimelinking=no
-
-	# Test if we are trying to use run time linking or normal
-	# AIX style linking. If -brtl is somewhere in LDFLAGS, we
-	# need to do runtime linking.
-	case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
-	  for ld_flag in $LDFLAGS; do
-	  if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
-	    aix_use_runtimelinking=yes
-	    break
-	  fi
-	  done
-	  ;;
-	esac
-
-	exp_sym_flag='-bexport'
-	no_entry_flag='-bnoentry'
-      fi
-
-      # When large executables or shared objects are built, AIX ld can
-      # have problems creating the table of contents.  If linking a library
-      # or program results in "error TOC overflow" add -mminimal-toc to
-      # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
-      # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
-
-      _LT_TAGVAR(archive_cmds, $1)=''
-      _LT_TAGVAR(hardcode_direct, $1)=yes
-      _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
-      _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
-      _LT_TAGVAR(link_all_deplibs, $1)=yes
-      _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
-
-      if test "$GCC" = yes; then
-	case $host_os in aix4.[[012]]|aix4.[[012]].*)
-	# We only want to do this on AIX 4.2 and lower, the check
-	# below for broken collect2 doesn't work under 4.3+
-	  collect2name=`${CC} -print-prog-name=collect2`
-	  if test -f "$collect2name" &&
-	   strings "$collect2name" | $GREP resolve_lib_name >/dev/null
-	  then
-	  # We have reworked collect2
-	  :
-	  else
-	  # We have old collect2
-	  _LT_TAGVAR(hardcode_direct, $1)=unsupported
-	  # It fails to find uninstalled libraries when the uninstalled
-	  # path is not listed in the libpath.  Setting hardcode_minus_L
-	  # to unsupported forces relinking
-	  _LT_TAGVAR(hardcode_minus_L, $1)=yes
-	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
-	  _LT_TAGVAR(hardcode_libdir_separator, $1)=
-	  fi
-	  ;;
-	esac
-	shared_flag='-shared'
-	if test "$aix_use_runtimelinking" = yes; then
-	  shared_flag="$shared_flag "'${wl}-G'
-	fi
-	_LT_TAGVAR(link_all_deplibs, $1)=no
-      else
-	# not using gcc
-	if test "$host_cpu" = ia64; then
-	# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
-	# chokes on -Wl,-G. The following line is correct:
-	  shared_flag='-G'
-	else
-	  if test "$aix_use_runtimelinking" = yes; then
-	    shared_flag='${wl}-G'
-	  else
-	    shared_flag='${wl}-bM:SRE'
-	  fi
-	fi
-      fi
-
-      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
-      # It seems that -bexpall does not export symbols beginning with
-      # underscore (_), so it is better to generate a list of symbols to export.
-      _LT_TAGVAR(always_export_symbols, $1)=yes
-      if test "$aix_use_runtimelinking" = yes; then
-	# Warning - without using the other runtime loading flags (-brtl),
-	# -berok will link without error, but may produce a broken library.
-	_LT_TAGVAR(allow_undefined_flag, $1)='-berok'
-        # Determine the default libpath from the value encoded in an
-        # empty executable.
-        _LT_SYS_MODULE_PATH_AIX
-        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
-        _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
-      else
-	if test "$host_cpu" = ia64; then
-	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
-	  _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
-	  _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
-	else
-	 # Determine the default libpath from the value encoded in an
-	 # empty executable.
-	 _LT_SYS_MODULE_PATH_AIX
-	 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
-	  # Warning - without using the other run time loading flags,
-	  # -berok will link without error, but may produce a broken library.
-	  _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
-	  _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
-	  # Exported symbols can be pulled into shared objects from archives
-	  _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
-	  _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
-	  # This is similar to how AIX traditionally builds its shared libraries.
-	  _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
-	fi
-      fi
-      ;;
-
-    amigaos*)
-      case $host_cpu in
-      powerpc)
-            # see comment about AmigaOS4 .so support
-            _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
-            _LT_TAGVAR(archive_expsym_cmds, $1)=''
-        ;;
-      m68k)
-            _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
-            _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
-            _LT_TAGVAR(hardcode_minus_L, $1)=yes
-        ;;
-      esac
-      ;;
-
-    bsdi[[45]]*)
-      _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
-      ;;
-
-    cygwin* | mingw* | pw32* | cegcc*)
-      # When not using gcc, we currently assume that we are using
-      # Microsoft Visual C++.
-      # hardcode_libdir_flag_spec is actually meaningless, as there is
-      # no search path for DLLs.
-      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
-      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
-      # Tell ltmain to make .lib files, not .a files.
-      libext=lib
-      # Tell ltmain to make .dll files, not .so files.
-      shrext_cmds=".dll"
-      # FIXME: Setting linknames here is a bad hack.
-      _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `$ECHO "X$deplibs" | $Xsed -e '\''s/ -lc$//'\''` -link -dll~linknames='
-      # The linker will automatically build a .lib file if we build a DLL.
-      _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
-      # FIXME: Should let the user specify the lib program.
-      _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs'
-      _LT_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`'
-      _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
-      ;;
-
-    darwin* | rhapsody*)
-      _LT_DARWIN_LINKER_FEATURES($1)
-      ;;
-
-    dgux*)
-      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
-      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
-      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
-      ;;
-
-    freebsd1*)
-      _LT_TAGVAR(ld_shlibs, $1)=no
-      ;;
-
-    # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
-    # support.  Future versions do this automatically, but an explicit c++rt0.o
-    # does not break anything, and helps significantly (at the cost of a little
-    # extra space).
-    freebsd2.2*)
-      _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
-      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
-      _LT_TAGVAR(hardcode_direct, $1)=yes
-      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
-      ;;
-
-    # Unfortunately, older versions of FreeBSD 2 do not have this feature.
-    freebsd2*)
-      _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
-      _LT_TAGVAR(hardcode_direct, $1)=yes
-      _LT_TAGVAR(hardcode_minus_L, $1)=yes
-      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
-      ;;
-
-    # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
-    freebsd* | dragonfly*)
-      _LT_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
-      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
-      _LT_TAGVAR(hardcode_direct, $1)=yes
-      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
-      ;;
-
-    hpux9*)
-      if test "$GCC" = yes; then
-	_LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
-      else
-	_LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
-      fi
-      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
-      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
-      _LT_TAGVAR(hardcode_direct, $1)=yes
-
-      # hardcode_minus_L: Not really in the search PATH,
-      # but as the default location of the library.
-      _LT_TAGVAR(hardcode_minus_L, $1)=yes
-      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
-      ;;
-
-    hpux10*)
-      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
-	_LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
-      else
-	_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
-      fi
-      if test "$with_gnu_ld" = no; then
-	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
-	_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
-	_LT_TAGVAR(hardcode_libdir_separator, $1)=:
-	_LT_TAGVAR(hardcode_direct, $1)=yes
-	_LT_TAGVAR(hardcode_direct_absolute, $1)=yes
-	_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
-	# hardcode_minus_L: Not really in the search PATH,
-	# but as the default location of the library.
-	_LT_TAGVAR(hardcode_minus_L, $1)=yes
-      fi
-      ;;
-
-    hpux11*)
-      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
-	case $host_cpu in
-	hppa*64*)
-	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
-	  ;;
-	ia64*)
-	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
-	  ;;
-	*)
-	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
-	  ;;
-	esac
-      else
-	case $host_cpu in
-	hppa*64*)
-	  _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
-	  ;;
-	ia64*)
-	  _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
-	  ;;
-	*)
-	  _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
-	  ;;
-	esac
-      fi
-      if test "$with_gnu_ld" = no; then
-	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
-	_LT_TAGVAR(hardcode_libdir_separator, $1)=:
-
-	case $host_cpu in
-	hppa*64*|ia64*)
-	  _LT_TAGVAR(hardcode_direct, $1)=no
-	  _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
-	  ;;
-	*)
-	  _LT_TAGVAR(hardcode_direct, $1)=yes
-	  _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
-	  _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
-
-	  # hardcode_minus_L: Not really in the search PATH,
-	  # but as the default location of the library.
-	  _LT_TAGVAR(hardcode_minus_L, $1)=yes
-	  ;;
-	esac
-      fi
-      ;;
-
-    irix5* | irix6* | nonstopux*)
-      if test "$GCC" = yes; then
-	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
-	# Try to use the -exported_symbol ld option, if it does not
-	# work, assume that -exports_file does not work either and
-	# implicitly export all symbols.
-        save_LDFLAGS="$LDFLAGS"
-        LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
-        AC_LINK_IFELSE(int foo(void) {},
-          _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib'
-        )
-        LDFLAGS="$save_LDFLAGS"
-      else
-	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
-	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib'
-      fi
-      _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
-      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
-      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
-      _LT_TAGVAR(inherit_rpath, $1)=yes
-      _LT_TAGVAR(link_all_deplibs, $1)=yes
-      ;;
-
-    netbsd* | netbsdelf*-gnu)
-      if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
-	_LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
-      else
-	_LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
-      fi
-      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
-      _LT_TAGVAR(hardcode_direct, $1)=yes
-      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
-      ;;
-
-    newsos6)
-      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
-      _LT_TAGVAR(hardcode_direct, $1)=yes
-      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
-      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
-      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
-      ;;
-
-    *nto* | *qnx*)
-      ;;
-
-    openbsd*)
-      if test -f /usr/libexec/ld.so; then
-	_LT_TAGVAR(hardcode_direct, $1)=yes
-	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
-	_LT_TAGVAR(hardcode_direct_absolute, $1)=yes
-	if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
-	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
-	  _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
-	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
-	  _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
-	else
-	  case $host_os in
-	   openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
-	     _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
-	     _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
-	     ;;
-	   *)
-	     _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
-	     _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
-	     ;;
-	  esac
-	fi
-      else
-	_LT_TAGVAR(ld_shlibs, $1)=no
-      fi
-      ;;
-
-    os2*)
-      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
-      _LT_TAGVAR(hardcode_minus_L, $1)=yes
-      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
-      _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$ECHO DATA >> $output_objdir/$libname.def~$ECHO " SINGLE NONSHARED" >> $output_objdir/$libname.def~$ECHO EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
-      _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
-      ;;
-
-    osf3*)
-      if test "$GCC" = yes; then
-	_LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
-	_LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
-      else
-	_LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
-	_LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
-      fi
-      _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
-      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
-      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
-      ;;
-
-    osf4* | osf5*)	# as osf3* with the addition of -msym flag
-      if test "$GCC" = yes; then
-	_LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
-	_LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
-	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
-      else
-	_LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
-	_LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
-	_LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~
-	$CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp'
-
-	# Both c and cxx compiler support -rpath directly
-	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
-      fi
-      _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
-      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
-      ;;
-
-    solaris*)
-      _LT_TAGVAR(no_undefined_flag, $1)=' -z defs'
-      if test "$GCC" = yes; then
-	wlarc='${wl}'
-	_LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
-	_LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
-	  $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
-      else
-	case `$CC -V 2>&1` in
-	*"Compilers 5.0"*)
-	  wlarc=''
-	  _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
-	  _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
-	  $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
-	  ;;
-	*)
-	  wlarc='${wl}'
-	  _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags'
-	  _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
-	  $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
-	  ;;
-	esac
-      fi
-      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
-      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
-      case $host_os in
-      solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
-      *)
-	# The compiler driver will combine and reorder linker options,
-	# but understands `-z linker_flag'.  GCC discards it without `$wl',
-	# but is careful enough not to reorder.
-	# Supported since Solaris 2.6 (maybe 2.5.1?)
-	if test "$GCC" = yes; then
-	  _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
-	else
-	  _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
-	fi
-	;;
-      esac
-      _LT_TAGVAR(link_all_deplibs, $1)=yes
-      ;;
-
-    sunos4*)
-      if test "x$host_vendor" = xsequent; then
-	# Use $CC to link under sequent, because it throws in some extra .o
-	# files that make .init and .fini sections work.
-	_LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
-      else
-	_LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
-      fi
-      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
-      _LT_TAGVAR(hardcode_direct, $1)=yes
-      _LT_TAGVAR(hardcode_minus_L, $1)=yes
-      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
-      ;;
-
-    sysv4)
-      case $host_vendor in
-	sni)
-	  _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
-	  _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true???
-	;;
-	siemens)
-	  ## LD is ld it makes a PLAMLIB
-	  ## CC just makes a GrossModule.
-	  _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
-	  _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
-	  _LT_TAGVAR(hardcode_direct, $1)=no
-        ;;
-	motorola)
-	  _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
-	  _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
-	;;
-      esac
-      runpath_var='LD_RUN_PATH'
-      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
-      ;;
-
-    sysv4.3*)
-      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
-      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
-      _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
-      ;;
-
-    sysv4*MP*)
-      if test -d /usr/nec; then
-	_LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
-	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
-	runpath_var=LD_RUN_PATH
-	hardcode_runpath_var=yes
-	_LT_TAGVAR(ld_shlibs, $1)=yes
-      fi
-      ;;
-
-    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
-      _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
-      _LT_TAGVAR(archive_cmds_need_lc, $1)=no
-      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
-      runpath_var='LD_RUN_PATH'
-
-      if test "$GCC" = yes; then
-	_LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
-	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
-      else
-	_LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
-	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
-      fi
-      ;;
-
-    sysv5* | sco3.2v5* | sco5v6*)
-      # Note: We can NOT use -z defs as we might desire, because we do not
-      # link with -lc, and that would cause any symbols used from libc to
-      # always be unresolved, which means just about no library would
-      # ever link correctly.  If we're not using GNU ld we use -z text
-      # though, which does catch some bad symbols but isn't as heavy-handed
-      # as -z defs.
-      _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
-      _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
-      _LT_TAGVAR(archive_cmds_need_lc, $1)=no
-      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
-      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
-      _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
-      _LT_TAGVAR(link_all_deplibs, $1)=yes
-      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
-      runpath_var='LD_RUN_PATH'
-
-      if test "$GCC" = yes; then
-	_LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
-	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
-      else
-	_LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
-	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
-      fi
-      ;;
-
-    uts4*)
-      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
-      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
-      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
-      ;;
-
-    *)
-      _LT_TAGVAR(ld_shlibs, $1)=no
-      ;;
-    esac
-
-    if test x$host_vendor = xsni; then
-      case $host in
-      sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
-	_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym'
-	;;
-      esac
-    fi
-  fi
-])
-AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
-test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
-
-_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld
-
-_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl
-_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl
-_LT_DECL([], [extract_expsyms_cmds], [2],
-    [The commands to extract the exported symbol list from a shared archive])
-
-#
-# Do we need to explicitly link libc?
-#
-case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in
-x|xyes)
-  # Assume -lc should be added
-  _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
-
-  if test "$enable_shared" = yes && test "$GCC" = yes; then
-    case $_LT_TAGVAR(archive_cmds, $1) in
-    *'~'*)
-      # FIXME: we may have to deal with multi-command sequences.
-      ;;
-    '$CC '*)
-      # Test whether the compiler implicitly links with -lc since on some
-      # systems, -lgcc has to come before -lc. If gcc already passes -lc
-      # to ld, don't add -lc before -lgcc.
-      AC_MSG_CHECKING([whether -lc should be explicitly linked in])
-      $RM conftest*
-      echo "$lt_simple_compile_test_code" > conftest.$ac_ext
-
-      if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
-        soname=conftest
-        lib=conftest
-        libobjs=conftest.$ac_objext
-        deplibs=
-        wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1)
-	pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1)
-        compiler_flags=-v
-        linker_flags=-v
-        verstring=
-        output_objdir=.
-        libname=conftest
-        lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1)
-        _LT_TAGVAR(allow_undefined_flag, $1)=
-        if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1)
-        then
-	  _LT_TAGVAR(archive_cmds_need_lc, $1)=no
-        else
-	  _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
-        fi
-        _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
-      else
-        cat conftest.err 1>&5
-      fi
-      $RM conftest*
-      AC_MSG_RESULT([$_LT_TAGVAR(archive_cmds_need_lc, $1)])
-      ;;
-    esac
-  fi
-  ;;
-esac
-
-_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0],
-    [Whether or not to add -lc for building shared libraries])
-_LT_TAGDECL([allow_libtool_libs_with_static_runtimes],
-    [enable_shared_with_static_runtimes], [0],
-    [Whether or not to disallow shared libs when runtime libs are static])
-_LT_TAGDECL([], [export_dynamic_flag_spec], [1],
-    [Compiler flag to allow reflexive dlopens])
-_LT_TAGDECL([], [whole_archive_flag_spec], [1],
-    [Compiler flag to generate shared objects directly from archives])
-_LT_TAGDECL([], [compiler_needs_object], [1],
-    [Whether the compiler copes with passing no objects directly])
-_LT_TAGDECL([], [old_archive_from_new_cmds], [2],
-    [Create an old-style archive from a shared archive])
-_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2],
-    [Create a temporary old-style archive to link instead of a shared archive])
-_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive])
-_LT_TAGDECL([], [archive_expsym_cmds], [2])
-_LT_TAGDECL([], [module_cmds], [2],
-    [Commands used to build a loadable module if different from building
-    a shared archive.])
-_LT_TAGDECL([], [module_expsym_cmds], [2])
-_LT_TAGDECL([], [with_gnu_ld], [1],
-    [Whether we are building with GNU ld or not])
-_LT_TAGDECL([], [allow_undefined_flag], [1],
-    [Flag that allows shared libraries with undefined symbols to be built])
-_LT_TAGDECL([], [no_undefined_flag], [1],
-    [Flag that enforces no undefined symbols])
-_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1],
-    [Flag to hardcode $libdir into a binary during linking.
-    This must work even if $libdir does not exist])
-_LT_TAGDECL([], [hardcode_libdir_flag_spec_ld], [1],
-    [[If ld is used when linking, flag to hardcode $libdir into a binary
-    during linking.  This must work even if $libdir does not exist]])
-_LT_TAGDECL([], [hardcode_libdir_separator], [1],
-    [Whether we need a single "-rpath" flag with a separated argument])
-_LT_TAGDECL([], [hardcode_direct], [0],
-    [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
-    DIR into the resulting binary])
-_LT_TAGDECL([], [hardcode_direct_absolute], [0],
-    [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
-    DIR into the resulting binary and the resulting library dependency is
-    "absolute", i.e impossible to change by setting ${shlibpath_var} if the
-    library is relocated])
-_LT_TAGDECL([], [hardcode_minus_L], [0],
-    [Set to "yes" if using the -LDIR flag during linking hardcodes DIR
-    into the resulting binary])
-_LT_TAGDECL([], [hardcode_shlibpath_var], [0],
-    [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
-    into the resulting binary])
-_LT_TAGDECL([], [hardcode_automatic], [0],
-    [Set to "yes" if building a shared library automatically hardcodes DIR
-    into the library and all subsequent libraries and executables linked
-    against it])
-_LT_TAGDECL([], [inherit_rpath], [0],
-    [Set to yes if linker adds runtime paths of dependent libraries
-    to runtime path list])
-_LT_TAGDECL([], [link_all_deplibs], [0],
-    [Whether libtool must link a program against all its dependency libraries])
-_LT_TAGDECL([], [fix_srcfile_path], [1],
-    [Fix the shell variable $srcfile for the compiler])
-_LT_TAGDECL([], [always_export_symbols], [0],
-    [Set to "yes" if exported symbols are required])
-_LT_TAGDECL([], [export_symbols_cmds], [2],
-    [The commands to list exported symbols])
-_LT_TAGDECL([], [exclude_expsyms], [1],
-    [Symbols that should not be listed in the preloaded symbols])
-_LT_TAGDECL([], [include_expsyms], [1],
-    [Symbols that must always be exported])
-_LT_TAGDECL([], [prelink_cmds], [2],
-    [Commands necessary for linking programs (against libraries) with templates])
-_LT_TAGDECL([], [file_list_spec], [1],
-    [Specify filename containing input files])
-dnl FIXME: Not yet implemented
-dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1],
-dnl    [Compiler flag to generate thread safe objects])
-])# _LT_LINKER_SHLIBS
-
-
-# _LT_LANG_C_CONFIG([TAG])
-# ------------------------
-# Ensure that the configuration variables for a C compiler are suitably
-# defined.  These variables are subsequently used by _LT_CONFIG to write
-# the compiler configuration to `libtool'.
-m4_defun([_LT_LANG_C_CONFIG],
-[m4_require([_LT_DECL_EGREP])dnl
-lt_save_CC="$CC"
-AC_LANG_PUSH(C)
-
-# Source file extension for C test sources.
-ac_ext=c
-
-# Object file extension for compiled C test sources.
-objext=o
-_LT_TAGVAR(objext, $1)=$objext
-
-# Code to be used in simple compile tests
-lt_simple_compile_test_code="int some_variable = 0;"
-
-# Code to be used in simple link tests
-lt_simple_link_test_code='int main(){return(0);}'
-
-_LT_TAG_COMPILER
-# Save the default compiler, since it gets overwritten when the other
-# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
-compiler_DEFAULT=$CC
-
-# save warnings/boilerplate of simple test code
-_LT_COMPILER_BOILERPLATE
-_LT_LINKER_BOILERPLATE
-
-## CAVEAT EMPTOR:
-## There is no encapsulation within the following macros, do not change
-## the running order or otherwise move them around unless you know exactly
-## what you are doing...
-if test -n "$compiler"; then
-  _LT_COMPILER_NO_RTTI($1)
-  _LT_COMPILER_PIC($1)
-  _LT_COMPILER_C_O($1)
-  _LT_COMPILER_FILE_LOCKS($1)
-  _LT_LINKER_SHLIBS($1)
-  _LT_SYS_DYNAMIC_LINKER($1)
-  _LT_LINKER_HARDCODE_LIBPATH($1)
-  LT_SYS_DLOPEN_SELF
-  _LT_CMD_STRIPLIB
-
-  # Report which library types will actually be built
-  AC_MSG_CHECKING([if libtool supports shared libraries])
-  AC_MSG_RESULT([$can_build_shared])
-
-  AC_MSG_CHECKING([whether to build shared libraries])
-  test "$can_build_shared" = "no" && enable_shared=no
-
-  # On AIX, shared libraries and static libraries use the same namespace, and
-  # are all built from PIC.
-  case $host_os in
-  aix3*)
-    test "$enable_shared" = yes && enable_static=no
-    if test -n "$RANLIB"; then
-      archive_cmds="$archive_cmds~\$RANLIB \$lib"
-      postinstall_cmds='$RANLIB $lib'
-    fi
-    ;;
-
-  aix[[4-9]]*)
-    if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
-      test "$enable_shared" = yes && enable_static=no
-    fi
-    ;;
-  esac
-  AC_MSG_RESULT([$enable_shared])
-
-  AC_MSG_CHECKING([whether to build static libraries])
-  # Make sure either enable_shared or enable_static is yes.
-  test "$enable_shared" = yes || enable_static=yes
-  AC_MSG_RESULT([$enable_static])
-
-  _LT_CONFIG($1)
-fi
-AC_LANG_POP
-CC="$lt_save_CC"
-])# _LT_LANG_C_CONFIG
-
-
-# _LT_PROG_CXX
-# ------------
-# Since AC_PROG_CXX is broken, in that it returns g++ if there is no c++
-# compiler, we have our own version here.
-m4_defun([_LT_PROG_CXX],
-[
-pushdef([AC_MSG_ERROR], [_lt_caught_CXX_error=yes])
-AC_PROG_CXX
-if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
-    ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
-    (test "X$CXX" != "Xg++"))) ; then
-  AC_PROG_CXXCPP
-else
-  _lt_caught_CXX_error=yes
-fi
-popdef([AC_MSG_ERROR])
-])# _LT_PROG_CXX
-
-dnl aclocal-1.4 backwards compatibility:
-dnl AC_DEFUN([_LT_PROG_CXX], [])
-
-
-# _LT_LANG_CXX_CONFIG([TAG])
-# --------------------------
-# Ensure that the configuration variables for a C++ compiler are suitably
-# defined.  These variables are subsequently used by _LT_CONFIG to write
-# the compiler configuration to `libtool'.
-m4_defun([_LT_LANG_CXX_CONFIG],
-[AC_REQUIRE([_LT_PROG_CXX])dnl
-m4_require([_LT_FILEUTILS_DEFAULTS])dnl
-m4_require([_LT_DECL_EGREP])dnl
-
-AC_LANG_PUSH(C++)
-_LT_TAGVAR(archive_cmds_need_lc, $1)=no
-_LT_TAGVAR(allow_undefined_flag, $1)=
-_LT_TAGVAR(always_export_symbols, $1)=no
-_LT_TAGVAR(archive_expsym_cmds, $1)=
-_LT_TAGVAR(compiler_needs_object, $1)=no
-_LT_TAGVAR(export_dynamic_flag_spec, $1)=
-_LT_TAGVAR(hardcode_direct, $1)=no
-_LT_TAGVAR(hardcode_direct_absolute, $1)=no
-_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
-_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
-_LT_TAGVAR(hardcode_libdir_separator, $1)=
-_LT_TAGVAR(hardcode_minus_L, $1)=no
-_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
-_LT_TAGVAR(hardcode_automatic, $1)=no
-_LT_TAGVAR(inherit_rpath, $1)=no
-_LT_TAGVAR(module_cmds, $1)=
-_LT_TAGVAR(module_expsym_cmds, $1)=
-_LT_TAGVAR(link_all_deplibs, $1)=unknown
-_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
-_LT_TAGVAR(no_undefined_flag, $1)=
-_LT_TAGVAR(whole_archive_flag_spec, $1)=
-_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
-
-# Source file extension for C++ test sources.
-ac_ext=cpp
-
-# Object file extension for compiled C++ test sources.
-objext=o
-_LT_TAGVAR(objext, $1)=$objext
-
-# No sense in running all these tests if we already determined that
-# the CXX compiler isn't working.  Some variables (like enable_shared)
-# are currently assumed to apply to all compilers on this platform,
-# and will be corrupted by setting them based on a non-working compiler.
-if test "$_lt_caught_CXX_error" != yes; then
-  # Code to be used in simple compile tests
-  lt_simple_compile_test_code="int some_variable = 0;"
-
-  # Code to be used in simple link tests
-  lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }'
-
-  # ltmain only uses $CC for tagged configurations so make sure $CC is set.
-  _LT_TAG_COMPILER
-
-  # save warnings/boilerplate of simple test code
-  _LT_COMPILER_BOILERPLATE
-  _LT_LINKER_BOILERPLATE
-
-  # Allow CC to be a program name with arguments.
-  lt_save_CC=$CC
-  lt_save_LD=$LD
-  lt_save_GCC=$GCC
-  GCC=$GXX
-  lt_save_with_gnu_ld=$with_gnu_ld
-  lt_save_path_LD=$lt_cv_path_LD
-  if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
-    lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
-  else
-    $as_unset lt_cv_prog_gnu_ld
-  fi
-  if test -n "${lt_cv_path_LDCXX+set}"; then
-    lt_cv_path_LD=$lt_cv_path_LDCXX
-  else
-    $as_unset lt_cv_path_LD
-  fi
-  test -z "${LDCXX+set}" || LD=$LDCXX
-  CC=${CXX-"c++"}
-  compiler=$CC
-  _LT_TAGVAR(compiler, $1)=$CC
-  _LT_CC_BASENAME([$compiler])
-
-  if test -n "$compiler"; then
-    # We don't want -fno-exception when compiling C++ code, so set the
-    # no_builtin_flag separately
-    if test "$GXX" = yes; then
-      _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
-    else
-      _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
-    fi
-
-    if test "$GXX" = yes; then
-      # Set up default GNU C++ configuration
-
-      LT_PATH_LD
-
-      # Check if GNU C++ uses GNU ld as the underlying linker, since the
-      # archiving commands below assume that GNU ld is being used.
-      if test "$with_gnu_ld" = yes; then
-        _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
-        _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
-
-        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
-        _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
-
-        # If archive_cmds runs LD, not CC, wlarc should be empty
-        # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
-        #     investigate it a little bit more. (MM)
-        wlarc='${wl}'
-
-        # ancient GNU ld didn't support --whole-archive et. al.
-        if eval "`$CC -print-prog-name=ld` --help 2>&1" |
-	  $GREP 'no-whole-archive' > /dev/null; then
-          _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
-        else
-          _LT_TAGVAR(whole_archive_flag_spec, $1)=
-        fi
-      else
-        with_gnu_ld=no
-        wlarc=
-
-        # A generic and very simple default shared library creation
-        # command for GNU C++ for the case where it uses the native
-        # linker, instead of GNU ld.  If possible, this setting should
-        # overridden to take advantage of the native linker features on
-        # the platform it is being used on.
-        _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
-      fi
-
-      # Commands to make compiler produce verbose output that lists
-      # what "hidden" libraries, object files and flags are used when
-      # linking a shared library.
-      output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
-
-    else
-      GXX=no
-      with_gnu_ld=no
-      wlarc=
-    fi
-
-    # PORTME: fill in a description of your system's C++ link characteristics
-    AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
-    _LT_TAGVAR(ld_shlibs, $1)=yes
-    case $host_os in
-      aix3*)
-        # FIXME: insert proper C++ library support
-        _LT_TAGVAR(ld_shlibs, $1)=no
-        ;;
-      aix[[4-9]]*)
-        if test "$host_cpu" = ia64; then
-          # On IA64, the linker does run time linking by default, so we don't
-          # have to do anything special.
-          aix_use_runtimelinking=no
-          exp_sym_flag='-Bexport'
-          no_entry_flag=""
-        else
-          aix_use_runtimelinking=no
-
-          # Test if we are trying to use run time linking or normal
-          # AIX style linking. If -brtl is somewhere in LDFLAGS, we
-          # need to do runtime linking.
-          case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
-	    for ld_flag in $LDFLAGS; do
-	      case $ld_flag in
-	      *-brtl*)
-	        aix_use_runtimelinking=yes
-	        break
-	        ;;
-	      esac
-	    done
-	    ;;
-          esac
-
-          exp_sym_flag='-bexport'
-          no_entry_flag='-bnoentry'
-        fi
-
-        # When large executables or shared objects are built, AIX ld can
-        # have problems creating the table of contents.  If linking a library
-        # or program results in "error TOC overflow" add -mminimal-toc to
-        # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
-        # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
-
-        _LT_TAGVAR(archive_cmds, $1)=''
-        _LT_TAGVAR(hardcode_direct, $1)=yes
-        _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
-        _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
-        _LT_TAGVAR(link_all_deplibs, $1)=yes
-        _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
-
-        if test "$GXX" = yes; then
-          case $host_os in aix4.[[012]]|aix4.[[012]].*)
-          # We only want to do this on AIX 4.2 and lower, the check
-          # below for broken collect2 doesn't work under 4.3+
-	  collect2name=`${CC} -print-prog-name=collect2`
-	  if test -f "$collect2name" &&
-	     strings "$collect2name" | $GREP resolve_lib_name >/dev/null
-	  then
-	    # We have reworked collect2
-	    :
-	  else
-	    # We have old collect2
-	    _LT_TAGVAR(hardcode_direct, $1)=unsupported
-	    # It fails to find uninstalled libraries when the uninstalled
-	    # path is not listed in the libpath.  Setting hardcode_minus_L
-	    # to unsupported forces relinking
-	    _LT_TAGVAR(hardcode_minus_L, $1)=yes
-	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
-	    _LT_TAGVAR(hardcode_libdir_separator, $1)=
-	  fi
-          esac
-          shared_flag='-shared'
-	  if test "$aix_use_runtimelinking" = yes; then
-	    shared_flag="$shared_flag "'${wl}-G'
-	  fi
-        else
-          # not using gcc
-          if test "$host_cpu" = ia64; then
-	  # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
-	  # chokes on -Wl,-G. The following line is correct:
-	  shared_flag='-G'
-          else
-	    if test "$aix_use_runtimelinking" = yes; then
-	      shared_flag='${wl}-G'
-	    else
-	      shared_flag='${wl}-bM:SRE'
-	    fi
-          fi
-        fi
-
-        _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
-        # It seems that -bexpall does not export symbols beginning with
-        # underscore (_), so it is better to generate a list of symbols to
-	# export.
-        _LT_TAGVAR(always_export_symbols, $1)=yes
-        if test "$aix_use_runtimelinking" = yes; then
-          # Warning - without using the other runtime loading flags (-brtl),
-          # -berok will link without error, but may produce a broken library.
-          _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
-          # Determine the default libpath from the value encoded in an empty
-          # executable.
-          _LT_SYS_MODULE_PATH_AIX
-          _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
-
-          _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
-        else
-          if test "$host_cpu" = ia64; then
-	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
-	    _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
-	    _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
-          else
-	    # Determine the default libpath from the value encoded in an
-	    # empty executable.
-	    _LT_SYS_MODULE_PATH_AIX
-	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
-	    # Warning - without using the other run time loading flags,
-	    # -berok will link without error, but may produce a broken library.
-	    _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
-	    _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
-	    # Exported symbols can be pulled into shared objects from archives
-	    _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
-	    _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
-	    # This is similar to how AIX traditionally builds its shared
-	    # libraries.
-	    _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
-          fi
-        fi
-        ;;
-
-      beos*)
-	if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
-	  _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
-	  # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
-	  # support --undefined.  This deserves some investigation.  FIXME
-	  _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
-	else
-	  _LT_TAGVAR(ld_shlibs, $1)=no
-	fi
-	;;
-
-      chorus*)
-        case $cc_basename in
-          *)
-	  # FIXME: insert proper C++ library support
-	  _LT_TAGVAR(ld_shlibs, $1)=no
-	  ;;
-        esac
-        ;;
-
-      cygwin* | mingw* | pw32* | cegcc*)
-        # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
-        # as there is no search path for DLLs.
-        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
-        _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
-        _LT_TAGVAR(always_export_symbols, $1)=no
-        _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
-
-        if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
-          _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
-          # If the export-symbols file already is a .def file (1st line
-          # is EXPORTS), use it as is; otherwise, prepend...
-          _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
-	    cp $export_symbols $output_objdir/$soname.def;
-          else
-	    echo EXPORTS > $output_objdir/$soname.def;
-	    cat $export_symbols >> $output_objdir/$soname.def;
-          fi~
-          $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
-        else
-          _LT_TAGVAR(ld_shlibs, $1)=no
-        fi
-        ;;
-      darwin* | rhapsody*)
-        _LT_DARWIN_LINKER_FEATURES($1)
-	;;
-
-      dgux*)
-        case $cc_basename in
-          ec++*)
-	    # FIXME: insert proper C++ library support
-	    _LT_TAGVAR(ld_shlibs, $1)=no
-	    ;;
-          ghcx*)
-	    # Green Hills C++ Compiler
-	    # FIXME: insert proper C++ library support
-	    _LT_TAGVAR(ld_shlibs, $1)=no
-	    ;;
-          *)
-	    # FIXME: insert proper C++ library support
-	    _LT_TAGVAR(ld_shlibs, $1)=no
-	    ;;
-        esac
-        ;;
-
-      freebsd[[12]]*)
-        # C++ shared libraries reported to be fairly broken before
-	# switch to ELF
-        _LT_TAGVAR(ld_shlibs, $1)=no
-        ;;
-
-      freebsd-elf*)
-        _LT_TAGVAR(archive_cmds_need_lc, $1)=no
-        ;;
-
-      freebsd* | dragonfly*)
-        # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
-        # conventions
-        _LT_TAGVAR(ld_shlibs, $1)=yes
-        ;;
-
-      gnu*)
-        ;;
-
-      hpux9*)
-        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
-        _LT_TAGVAR(hardcode_libdir_separator, $1)=:
-        _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
-        _LT_TAGVAR(hardcode_direct, $1)=yes
-        _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
-				             # but as the default
-				             # location of the library.
-
-        case $cc_basename in
-          CC*)
-            # FIXME: insert proper C++ library support
-            _LT_TAGVAR(ld_shlibs, $1)=no
-            ;;
-          aCC*)
-            _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
-            # Commands to make compiler produce verbose output that lists
-            # what "hidden" libraries, object files and flags are used when
-            # linking a shared library.
-            #
-            # There doesn't appear to be a way to prevent this compiler from
-            # explicitly linking system object files so we need to strip them
-            # from the output so that they don't get included in the library
-            # dependencies.
-            output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
-            ;;
-          *)
-            if test "$GXX" = yes; then
-              _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
-            else
-              # FIXME: insert proper C++ library support
-              _LT_TAGVAR(ld_shlibs, $1)=no
-            fi
-            ;;
-        esac
-        ;;
-
-      hpux10*|hpux11*)
-        if test $with_gnu_ld = no; then
-	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
-	  _LT_TAGVAR(hardcode_libdir_separator, $1)=:
-
-          case $host_cpu in
-            hppa*64*|ia64*)
-              ;;
-            *)
-	      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
-              ;;
-          esac
-        fi
-        case $host_cpu in
-          hppa*64*|ia64*)
-            _LT_TAGVAR(hardcode_direct, $1)=no
-            _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
-            ;;
-          *)
-            _LT_TAGVAR(hardcode_direct, $1)=yes
-            _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
-            _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
-					         # but as the default
-					         # location of the library.
-            ;;
-        esac
-
-        case $cc_basename in
-          CC*)
-	    # FIXME: insert proper C++ library support
-	    _LT_TAGVAR(ld_shlibs, $1)=no
-	    ;;
-          aCC*)
-	    case $host_cpu in
-	      hppa*64*)
-	        _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
-	        ;;
-	      ia64*)
-	        _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
-	        ;;
-	      *)
-	        _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
-	        ;;
-	    esac
-	    # Commands to make compiler produce verbose output that lists
-	    # what "hidden" libraries, object files and flags are used when
-	    # linking a shared library.
-	    #
-	    # There doesn't appear to be a way to prevent this compiler from
-	    # explicitly linking system object files so we need to strip them
-	    # from the output so that they don't get included in the library
-	    # dependencies.
-	    output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
-	    ;;
-          *)
-	    if test "$GXX" = yes; then
-	      if test $with_gnu_ld = no; then
-	        case $host_cpu in
-	          hppa*64*)
-	            _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
-	            ;;
-	          ia64*)
-	            _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
-	            ;;
-	          *)
-	            _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
-	            ;;
-	        esac
-	      fi
-	    else
-	      # FIXME: insert proper C++ library support
-	      _LT_TAGVAR(ld_shlibs, $1)=no
-	    fi
-	    ;;
-        esac
-        ;;
-
-      interix[[3-9]]*)
-	_LT_TAGVAR(hardcode_direct, $1)=no
-	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
-	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
-	_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
-	# Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
-	# Instead, shared libraries are loaded at an image base (0x10000000 by
-	# default) and relocated if they conflict, which is a slow very memory
-	# consuming and fragmenting process.  To avoid this, we pick a random,
-	# 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
-	# time.  Moving up from 0x10000000 also allows more sbrk(2) space.
-	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
-	_LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
-	;;
-      irix5* | irix6*)
-        case $cc_basename in
-          CC*)
-	    # SGI C++
-	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
-
-	    # Archives containing C++ object files must be created using
-	    # "CC -ar", where "CC" is the IRIX C++ compiler.  This is
-	    # necessary to make sure instantiated templates are included
-	    # in the archive.
-	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
-	    ;;
-          *)
-	    if test "$GXX" = yes; then
-	      if test "$with_gnu_ld" = no; then
-	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
-	      else
-	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` -o $lib'
-	      fi
-	    fi
-	    _LT_TAGVAR(link_all_deplibs, $1)=yes
-	    ;;
-        esac
-        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
-        _LT_TAGVAR(hardcode_libdir_separator, $1)=:
-        _LT_TAGVAR(inherit_rpath, $1)=yes
-        ;;
-
-      linux* | k*bsd*-gnu)
-        case $cc_basename in
-          KCC*)
-	    # Kuck and Associates, Inc. (KAI) C++ Compiler
-
-	    # KCC will only create a shared library if the output file
-	    # ends with ".so" (or ".sl" for HP-UX), so rename the library
-	    # to its proper name (with version) after linking.
-	    _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
-	    _LT_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib'
-	    # Commands to make compiler produce verbose output that lists
-	    # what "hidden" libraries, object files and flags are used when
-	    # linking a shared library.
-	    #
-	    # There doesn't appear to be a way to prevent this compiler from
-	    # explicitly linking system object files so we need to strip them
-	    # from the output so that they don't get included in the library
-	    # dependencies.
-	    output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
-
-	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
-	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
-
-	    # Archives containing C++ object files must be created using
-	    # "CC -Bstatic", where "CC" is the KAI C++ compiler.
-	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
-	    ;;
-	  icpc* | ecpc* )
-	    # Intel C++
-	    with_gnu_ld=yes
-	    # version 8.0 and above of icpc choke on multiply defined symbols
-	    # if we add $predep_objects and $postdep_objects, however 7.1 and
-	    # earlier do not add the objects themselves.
-	    case `$CC -V 2>&1` in
-	      *"Version 7."*)
-	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
-		_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
-		;;
-	      *)  # Version 8.0 or newer
-	        tmp_idyn=
-	        case $host_cpu in
-		  ia64*) tmp_idyn=' -i_dynamic';;
-		esac
-	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
-		_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
-		;;
-	    esac
-	    _LT_TAGVAR(archive_cmds_need_lc, $1)=no
-	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
-	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
-	    _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
-	    ;;
-          pgCC* | pgcpp*)
-            # Portland Group C++ compiler
-	    case `$CC -V` in
-	    *pgCC\ [[1-5]]* | *pgcpp\ [[1-5]]*)
-	      _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~
-		rm -rf $tpldir~
-		$CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
-		compile_command="$compile_command `find $tpldir -name \*.o | $NL2SP`"'
-	      _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~
-		rm -rf $tpldir~
-		$CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~
-		$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | $NL2SP`~
-		$RANLIB $oldlib'
-	      _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~
-		rm -rf $tpldir~
-		$CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
-		$CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
-	      _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~
-		rm -rf $tpldir~
-		$CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
-		$CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
-	      ;;
-	    *) # Version 6 will use weak symbols
-	      _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
-	      _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
-	      ;;
-	    esac
-
-	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
-	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
-	    _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
-            ;;
-	  cxx*)
-	    # Compaq C++
-	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
-	    _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname  -o $lib ${wl}-retain-symbols-file $wl$export_symbols'
-
-	    runpath_var=LD_RUN_PATH
-	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
-	    _LT_TAGVAR(hardcode_libdir_separator, $1)=:
-
-	    # Commands to make compiler produce verbose output that lists
-	    # what "hidden" libraries, object files and flags are used when
-	    # linking a shared library.
-	    #
-	    # There doesn't appear to be a way to prevent this compiler from
-	    # explicitly linking system object files so we need to strip them
-	    # from the output so that they don't get included in the library
-	    # dependencies.
-	    output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`$ECHO "X$templist" | $Xsed -e "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
-	    ;;
-	  xl*)
-	    # IBM XL 8.0 on PPC, with GNU ld
-	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
-	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
-	    _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
-	    if test "x$supports_anon_versioning" = xyes; then
-	      _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
-		cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
-		echo "local: *; };" >> $output_objdir/$libname.ver~
-		$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
-	    fi
-	    ;;
-	  *)
-	    case `$CC -V 2>&1 | sed 5q` in
-	    *Sun\ C*)
-	      # Sun C++ 5.9
-	      _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
-	      _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
-	      _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols'
-	      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
-	      _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
-	      _LT_TAGVAR(compiler_needs_object, $1)=yes
-
-	      # Not sure whether something based on
-	      # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
-	      # would be better.
-	      output_verbose_link_cmd='echo'
-
-	      # Archives containing C++ object files must be created using
-	      # "CC -xar", where "CC" is the Sun C++ compiler.  This is
-	      # necessary to make sure instantiated templates are included
-	      # in the archive.
-	      _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
-	      ;;
-	    esac
-	    ;;
-	esac
-	;;
-
-      lynxos*)
-        # FIXME: insert proper C++ library support
-	_LT_TAGVAR(ld_shlibs, $1)=no
-	;;
-
-      m88k*)
-        # FIXME: insert proper C++ library support
-        _LT_TAGVAR(ld_shlibs, $1)=no
-	;;
-
-      mvs*)
-        case $cc_basename in
-          cxx*)
-	    # FIXME: insert proper C++ library support
-	    _LT_TAGVAR(ld_shlibs, $1)=no
-	    ;;
-	  *)
-	    # FIXME: insert proper C++ library support
-	    _LT_TAGVAR(ld_shlibs, $1)=no
-	    ;;
-	esac
-	;;
-
-      netbsd*)
-        if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
-	  _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable  -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
-	  wlarc=
-	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
-	  _LT_TAGVAR(hardcode_direct, $1)=yes
-	  _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
-	fi
-	# Workaround some broken pre-1.5 toolchains
-	output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
-	;;
-
-      *nto* | *qnx*)
-        _LT_TAGVAR(ld_shlibs, $1)=yes
-	;;
-
-      openbsd2*)
-        # C++ shared libraries are fairly broken
-	_LT_TAGVAR(ld_shlibs, $1)=no
-	;;
-
-      openbsd*)
-	if test -f /usr/libexec/ld.so; then
-	  _LT_TAGVAR(hardcode_direct, $1)=yes
-	  _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
-	  _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
-	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
-	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
-	  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
-	    _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib'
-	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
-	    _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
-	  fi
-	  output_verbose_link_cmd=echo
-	else
-	  _LT_TAGVAR(ld_shlibs, $1)=no
-	fi
-	;;
-
-      osf3* | osf4* | osf5*)
-        case $cc_basename in
-          KCC*)
-	    # Kuck and Associates, Inc. (KAI) C++ Compiler
-
-	    # KCC will only create a shared library if the output file
-	    # ends with ".so" (or ".sl" for HP-UX), so rename the library
-	    # to its proper name (with version) after linking.
-	    _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
-
-	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
-	    _LT_TAGVAR(hardcode_libdir_separator, $1)=:
-
-	    # Archives containing C++ object files must be created using
-	    # the KAI C++ compiler.
-	    case $host in
-	      osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;;
-	      *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;;
-	    esac
-	    ;;
-          RCC*)
-	    # Rational C++ 2.4.1
-	    # FIXME: insert proper C++ library support
-	    _LT_TAGVAR(ld_shlibs, $1)=no
-	    ;;
-          cxx*)
-	    case $host in
-	      osf3*)
-	        _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
-	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && $ECHO "X${wl}-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
-	        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
-		;;
-	      *)
-	        _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
-	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
-	        _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
-	          echo "-hidden">> $lib.exp~
-	          $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname ${wl}-input ${wl}$lib.exp  `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~
-	          $RM $lib.exp'
-	        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
-		;;
-	    esac
-
-	    _LT_TAGVAR(hardcode_libdir_separator, $1)=:
-
-	    # Commands to make compiler produce verbose output that lists
-	    # what "hidden" libraries, object files and flags are used when
-	    # linking a shared library.
-	    #
-	    # There doesn't appear to be a way to prevent this compiler from
-	    # explicitly linking system object files so we need to strip them
-	    # from the output so that they don't get included in the library
-	    # dependencies.
-	    output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`$ECHO "X$templist" | $Xsed -e "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
-	    ;;
-	  *)
-	    if test "$GXX" = yes && test "$with_gnu_ld" = no; then
-	      _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
-	      case $host in
-	        osf3*)
-	          _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
-		  ;;
-	        *)
-	          _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
-		  ;;
-	      esac
-
-	      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
-	      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
-
-	      # Commands to make compiler produce verbose output that lists
-	      # what "hidden" libraries, object files and flags are used when
-	      # linking a shared library.
-	      output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
-
-	    else
-	      # FIXME: insert proper C++ library support
-	      _LT_TAGVAR(ld_shlibs, $1)=no
-	    fi
-	    ;;
-        esac
-        ;;
-
-      psos*)
-        # FIXME: insert proper C++ library support
-        _LT_TAGVAR(ld_shlibs, $1)=no
-        ;;
-
-      sunos4*)
-        case $cc_basename in
-          CC*)
-	    # Sun C++ 4.x
-	    # FIXME: insert proper C++ library support
-	    _LT_TAGVAR(ld_shlibs, $1)=no
-	    ;;
-          lcc*)
-	    # Lucid
-	    # FIXME: insert proper C++ library support
-	    _LT_TAGVAR(ld_shlibs, $1)=no
-	    ;;
-          *)
-	    # FIXME: insert proper C++ library support
-	    _LT_TAGVAR(ld_shlibs, $1)=no
-	    ;;
-        esac
-        ;;
-
-      solaris*)
-        case $cc_basename in
-          CC*)
-	    # Sun C++ 4.2, 5.x and Centerline C++
-            _LT_TAGVAR(archive_cmds_need_lc,$1)=yes
-	    _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
-	    _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag}  -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
-	    _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
-	      $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
-
-	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
-	    _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
-	    case $host_os in
-	      solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
-	      *)
-		# The compiler driver will combine and reorder linker options,
-		# but understands `-z linker_flag'.
-	        # Supported since Solaris 2.6 (maybe 2.5.1?)
-		_LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
-	        ;;
-	    esac
-	    _LT_TAGVAR(link_all_deplibs, $1)=yes
-
-	    output_verbose_link_cmd='echo'
-
-	    # Archives containing C++ object files must be created using
-	    # "CC -xar", where "CC" is the Sun C++ compiler.  This is
-	    # necessary to make sure instantiated templates are included
-	    # in the archive.
-	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
-	    ;;
-          gcx*)
-	    # Green Hills C++ Compiler
-	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
-
-	    # The C++ compiler must be used to create the archive.
-	    _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
-	    ;;
-          *)
-	    # GNU C++ compiler with Solaris linker
-	    if test "$GXX" = yes && test "$with_gnu_ld" = no; then
-	      _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
-	      if $CC --version | $GREP -v '^2\.7' > /dev/null; then
-	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
-	        _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
-		  $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
-
-	        # Commands to make compiler produce verbose output that lists
-	        # what "hidden" libraries, object files and flags are used when
-	        # linking a shared library.
-	        output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
-	      else
-	        # g++ 2.7 appears to require `-G' NOT `-shared' on this
-	        # platform.
-	        _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
-	        _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
-		  $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
-
-	        # Commands to make compiler produce verbose output that lists
-	        # what "hidden" libraries, object files and flags are used when
-	        # linking a shared library.
-	        output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
-	      fi
-
-	      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
-	      case $host_os in
-		solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
-		*)
-		  _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
-		  ;;
-	      esac
-	    fi
-	    ;;
-        esac
-        ;;
-
-    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
-      _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
-      _LT_TAGVAR(archive_cmds_need_lc, $1)=no
-      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
-      runpath_var='LD_RUN_PATH'
-
-      case $cc_basename in
-        CC*)
-	  _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
-	  _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
-	  ;;
-	*)
-	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
-	  _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
-	  ;;
-      esac
-      ;;
-
-      sysv5* | sco3.2v5* | sco5v6*)
-	# Note: We can NOT use -z defs as we might desire, because we do not
-	# link with -lc, and that would cause any symbols used from libc to
-	# always be unresolved, which means just about no library would
-	# ever link correctly.  If we're not using GNU ld we use -z text
-	# though, which does catch some bad symbols but isn't as heavy-handed
-	# as -z defs.
-	_LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
-	_LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
-	_LT_TAGVAR(archive_cmds_need_lc, $1)=no
-	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
-	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
-	_LT_TAGVAR(hardcode_libdir_separator, $1)=':'
-	_LT_TAGVAR(link_all_deplibs, $1)=yes
-	_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
-	runpath_var='LD_RUN_PATH'
-
-	case $cc_basename in
-          CC*)
-	    _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
-	    _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
-	    ;;
-	  *)
-	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
-	    _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
-	    ;;
-	esac
-      ;;
-
-      tandem*)
-        case $cc_basename in
-          NCC*)
-	    # NonStop-UX NCC 3.20
-	    # FIXME: insert proper C++ library support
-	    _LT_TAGVAR(ld_shlibs, $1)=no
-	    ;;
-          *)
-	    # FIXME: insert proper C++ library support
-	    _LT_TAGVAR(ld_shlibs, $1)=no
-	    ;;
-        esac
-        ;;
-
-      vxworks*)
-        # FIXME: insert proper C++ library support
-        _LT_TAGVAR(ld_shlibs, $1)=no
-        ;;
-
-      *)
-        # FIXME: insert proper C++ library support
-        _LT_TAGVAR(ld_shlibs, $1)=no
-        ;;
-    esac
-
-    AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
-    test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
-
-    _LT_TAGVAR(GCC, $1)="$GXX"
-    _LT_TAGVAR(LD, $1)="$LD"
-
-    ## CAVEAT EMPTOR:
-    ## There is no encapsulation within the following macros, do not change
-    ## the running order or otherwise move them around unless you know exactly
-    ## what you are doing...
-    _LT_SYS_HIDDEN_LIBDEPS($1)
-    _LT_COMPILER_PIC($1)
-    _LT_COMPILER_C_O($1)
-    _LT_COMPILER_FILE_LOCKS($1)
-    _LT_LINKER_SHLIBS($1)
-    _LT_SYS_DYNAMIC_LINKER($1)
-    _LT_LINKER_HARDCODE_LIBPATH($1)
-
-    _LT_CONFIG($1)
-  fi # test -n "$compiler"
-
-  CC=$lt_save_CC
-  LDCXX=$LD
-  LD=$lt_save_LD
-  GCC=$lt_save_GCC
-  with_gnu_ld=$lt_save_with_gnu_ld
-  lt_cv_path_LDCXX=$lt_cv_path_LD
-  lt_cv_path_LD=$lt_save_path_LD
-  lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
-  lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
-fi # test "$_lt_caught_CXX_error" != yes
-
-AC_LANG_POP
-])# _LT_LANG_CXX_CONFIG
-
-
-# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME])
-# ---------------------------------
-# Figure out "hidden" library dependencies from verbose
-# compiler output when linking a shared library.
-# Parse the compiler output and extract the necessary
-# objects, libraries and library flags.
-m4_defun([_LT_SYS_HIDDEN_LIBDEPS],
-[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
-# Dependencies to place before and after the object being linked:
-_LT_TAGVAR(predep_objects, $1)=
-_LT_TAGVAR(postdep_objects, $1)=
-_LT_TAGVAR(predeps, $1)=
-_LT_TAGVAR(postdeps, $1)=
-_LT_TAGVAR(compiler_lib_search_path, $1)=
-
-dnl we can't use the lt_simple_compile_test_code here,
-dnl because it contains code intended for an executable,
-dnl not a library.  It's possible we should let each
-dnl tag define a new lt_????_link_test_code variable,
-dnl but it's only used here...
-m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF
-int a;
-void foo (void) { a = 0; }
-_LT_EOF
-], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF
-class Foo
-{
-public:
-  Foo (void) { a = 0; }
-private:
-  int a;
-};
-_LT_EOF
-], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF
-      subroutine foo
-      implicit none
-      integer*4 a
-      a=0
-      return
-      end
-_LT_EOF
-], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF
-      subroutine foo
-      implicit none
-      integer a
-      a=0
-      return
-      end
-_LT_EOF
-], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF
-public class foo {
-  private int a;
-  public void bar (void) {
-    a = 0;
-  }
-};
-_LT_EOF
-])
-dnl Parse the compiler output and extract the necessary
-dnl objects, libraries and library flags.
-if AC_TRY_EVAL(ac_compile); then
-  # Parse the compiler output and extract the necessary
-  # objects, libraries and library flags.
-
-  # Sentinel used to keep track of whether or not we are before
-  # the conftest object file.
-  pre_test_object_deps_done=no
-
-  for p in `eval "$output_verbose_link_cmd"`; do
-    case $p in
-
-    -L* | -R* | -l*)
-       # Some compilers place space between "-{L,R}" and the path.
-       # Remove the space.
-       if test $p = "-L" ||
-          test $p = "-R"; then
-	 prev=$p
-	 continue
-       else
-	 prev=
-       fi
-
-       if test "$pre_test_object_deps_done" = no; then
-	 case $p in
-	 -L* | -R*)
-	   # Internal compiler library paths should come after those
-	   # provided the user.  The postdeps already come after the
-	   # user supplied libs so there is no need to process them.
-	   if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then
-	     _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
-	   else
-	     _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
-	   fi
-	   ;;
-	 # The "-l" case would never come before the object being
-	 # linked, so don't bother handling this case.
-	 esac
-       else
-	 if test -z "$_LT_TAGVAR(postdeps, $1)"; then
-	   _LT_TAGVAR(postdeps, $1)="${prev}${p}"
-	 else
-	   _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}"
-	 fi
-       fi
-       ;;
-
-    *.$objext)
-       # This assumes that the test object file only shows up
-       # once in the compiler output.
-       if test "$p" = "conftest.$objext"; then
-	 pre_test_object_deps_done=yes
-	 continue
-       fi
-
-       if test "$pre_test_object_deps_done" = no; then
-	 if test -z "$_LT_TAGVAR(predep_objects, $1)"; then
-	   _LT_TAGVAR(predep_objects, $1)="$p"
-	 else
-	   _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p"
-	 fi
-       else
-	 if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then
-	   _LT_TAGVAR(postdep_objects, $1)="$p"
-	 else
-	   _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p"
-	 fi
-       fi
-       ;;
-
-    *) ;; # Ignore the rest.
-
-    esac
-  done
-
-  # Clean up.
-  rm -f a.out a.exe
-else
-  echo "libtool.m4: error: problem compiling $1 test program"
-fi
-
-$RM -f confest.$objext
-
-# PORTME: override above test on systems where it is broken
-m4_if([$1], [CXX],
-[case $host_os in
-interix[[3-9]]*)
-  # Interix 3.5 installs completely hosed .la files for C++, so rather than
-  # hack all around it, let's just trust "g++" to DTRT.
-  _LT_TAGVAR(predep_objects,$1)=
-  _LT_TAGVAR(postdep_objects,$1)=
-  _LT_TAGVAR(postdeps,$1)=
-  ;;
-
-linux*)
-  case `$CC -V 2>&1 | sed 5q` in
-  *Sun\ C*)
-    # Sun C++ 5.9
-
-    # The more standards-conforming stlport4 library is
-    # incompatible with the Cstd library. Avoid specifying
-    # it if it's in CXXFLAGS. Ignore libCrun as
-    # -library=stlport4 depends on it.
-    case " $CXX $CXXFLAGS " in
-    *" -library=stlport4 "*)
-      solaris_use_stlport4=yes
-      ;;
-    esac
-
-    if test "$solaris_use_stlport4" != yes; then
-      _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
-    fi
-    ;;
-  esac
-  ;;
-
-solaris*)
-  case $cc_basename in
-  CC*)
-    # The more standards-conforming stlport4 library is
-    # incompatible with the Cstd library. Avoid specifying
-    # it if it's in CXXFLAGS. Ignore libCrun as
-    # -library=stlport4 depends on it.
-    case " $CXX $CXXFLAGS " in
-    *" -library=stlport4 "*)
-      solaris_use_stlport4=yes
-      ;;
-    esac
-
-    # Adding this requires a known-good setup of shared libraries for
-    # Sun compiler versions before 5.6, else PIC objects from an old
-    # archive will be linked into the output, leading to subtle bugs.
-    if test "$solaris_use_stlport4" != yes; then
-      _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
-    fi
-    ;;
-  esac
-  ;;
-esac
-])
-
-case " $_LT_TAGVAR(postdeps, $1) " in
-*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;;
-esac
- _LT_TAGVAR(compiler_lib_search_dirs, $1)=
-if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then
- _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'`
-fi
-_LT_TAGDECL([], [compiler_lib_search_dirs], [1],
-    [The directories searched by this compiler when creating a shared library])
-_LT_TAGDECL([], [predep_objects], [1],
-    [Dependencies to place before and after the objects being linked to
-    create a shared library])
-_LT_TAGDECL([], [postdep_objects], [1])
-_LT_TAGDECL([], [predeps], [1])
-_LT_TAGDECL([], [postdeps], [1])
-_LT_TAGDECL([], [compiler_lib_search_path], [1],
-    [The library search path used internally by the compiler when linking
-    a shared library])
-])# _LT_SYS_HIDDEN_LIBDEPS
-
-
-# _LT_PROG_F77
-# ------------
-# Since AC_PROG_F77 is broken, in that it returns the empty string
-# if there is no fortran compiler, we have our own version here.
-m4_defun([_LT_PROG_F77],
-[
-pushdef([AC_MSG_ERROR], [_lt_disable_F77=yes])
-AC_PROG_F77
-if test -z "$F77" || test "X$F77" = "Xno"; then
-  _lt_disable_F77=yes
-fi
-popdef([AC_MSG_ERROR])
-])# _LT_PROG_F77
-
-dnl aclocal-1.4 backwards compatibility:
-dnl AC_DEFUN([_LT_PROG_F77], [])
-
-
-# _LT_LANG_F77_CONFIG([TAG])
-# --------------------------
-# Ensure that the configuration variables for a Fortran 77 compiler are
-# suitably defined.  These variables are subsequently used by _LT_CONFIG
-# to write the compiler configuration to `libtool'.
-m4_defun([_LT_LANG_F77_CONFIG],
-[AC_REQUIRE([_LT_PROG_F77])dnl
-AC_LANG_PUSH(Fortran 77)
-
-_LT_TAGVAR(archive_cmds_need_lc, $1)=no
-_LT_TAGVAR(allow_undefined_flag, $1)=
-_LT_TAGVAR(always_export_symbols, $1)=no
-_LT_TAGVAR(archive_expsym_cmds, $1)=
-_LT_TAGVAR(export_dynamic_flag_spec, $1)=
-_LT_TAGVAR(hardcode_direct, $1)=no
-_LT_TAGVAR(hardcode_direct_absolute, $1)=no
-_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
-_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
-_LT_TAGVAR(hardcode_libdir_separator, $1)=
-_LT_TAGVAR(hardcode_minus_L, $1)=no
-_LT_TAGVAR(hardcode_automatic, $1)=no
-_LT_TAGVAR(inherit_rpath, $1)=no
-_LT_TAGVAR(module_cmds, $1)=
-_LT_TAGVAR(module_expsym_cmds, $1)=
-_LT_TAGVAR(link_all_deplibs, $1)=unknown
-_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
-_LT_TAGVAR(no_undefined_flag, $1)=
-_LT_TAGVAR(whole_archive_flag_spec, $1)=
-_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
-
-# Source file extension for f77 test sources.
-ac_ext=f
-
-# Object file extension for compiled f77 test sources.
-objext=o
-_LT_TAGVAR(objext, $1)=$objext
-
-# No sense in running all these tests if we already determined that
-# the F77 compiler isn't working.  Some variables (like enable_shared)
-# are currently assumed to apply to all compilers on this platform,
-# and will be corrupted by setting them based on a non-working compiler.
-if test "$_lt_disable_F77" != yes; then
-  # Code to be used in simple compile tests
-  lt_simple_compile_test_code="\
-      subroutine t
-      return
-      end
-"
-
-  # Code to be used in simple link tests
-  lt_simple_link_test_code="\
-      program t
-      end
-"
-
-  # ltmain only uses $CC for tagged configurations so make sure $CC is set.
-  _LT_TAG_COMPILER
-
-  # save warnings/boilerplate of simple test code
-  _LT_COMPILER_BOILERPLATE
-  _LT_LINKER_BOILERPLATE
-
-  # Allow CC to be a program name with arguments.
-  lt_save_CC="$CC"
-  lt_save_GCC=$GCC
-  CC=${F77-"f77"}
-  compiler=$CC
-  _LT_TAGVAR(compiler, $1)=$CC
-  _LT_CC_BASENAME([$compiler])
-  GCC=$G77
-  if test -n "$compiler"; then
-    AC_MSG_CHECKING([if libtool supports shared libraries])
-    AC_MSG_RESULT([$can_build_shared])
-
-    AC_MSG_CHECKING([whether to build shared libraries])
-    test "$can_build_shared" = "no" && enable_shared=no
-
-    # On AIX, shared libraries and static libraries use the same namespace, and
-    # are all built from PIC.
-    case $host_os in
-      aix3*)
-        test "$enable_shared" = yes && enable_static=no
-        if test -n "$RANLIB"; then
-          archive_cmds="$archive_cmds~\$RANLIB \$lib"
-          postinstall_cmds='$RANLIB $lib'
-        fi
-        ;;
-      aix[[4-9]]*)
-	if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
-	  test "$enable_shared" = yes && enable_static=no
-	fi
-        ;;
-    esac
-    AC_MSG_RESULT([$enable_shared])
-
-    AC_MSG_CHECKING([whether to build static libraries])
-    # Make sure either enable_shared or enable_static is yes.
-    test "$enable_shared" = yes || enable_static=yes
-    AC_MSG_RESULT([$enable_static])
-
-    _LT_TAGVAR(GCC, $1)="$G77"
-    _LT_TAGVAR(LD, $1)="$LD"
-
-    ## CAVEAT EMPTOR:
-    ## There is no encapsulation within the following macros, do not change
-    ## the running order or otherwise move them around unless you know exactly
-    ## what you are doing...
-    _LT_COMPILER_PIC($1)
-    _LT_COMPILER_C_O($1)
-    _LT_COMPILER_FILE_LOCKS($1)
-    _LT_LINKER_SHLIBS($1)
-    _LT_SYS_DYNAMIC_LINKER($1)
-    _LT_LINKER_HARDCODE_LIBPATH($1)
-
-    _LT_CONFIG($1)
-  fi # test -n "$compiler"
-
-  GCC=$lt_save_GCC
-  CC="$lt_save_CC"
-fi # test "$_lt_disable_F77" != yes
-
-AC_LANG_POP
-])# _LT_LANG_F77_CONFIG
-
-
-# _LT_PROG_FC
-# -----------
-# Since AC_PROG_FC is broken, in that it returns the empty string
-# if there is no fortran compiler, we have our own version here.
-m4_defun([_LT_PROG_FC],
-[
-pushdef([AC_MSG_ERROR], [_lt_disable_FC=yes])
-AC_PROG_FC
-if test -z "$FC" || test "X$FC" = "Xno"; then
-  _lt_disable_FC=yes
-fi
-popdef([AC_MSG_ERROR])
-])# _LT_PROG_FC
-
-dnl aclocal-1.4 backwards compatibility:
-dnl AC_DEFUN([_LT_PROG_FC], [])
-
-
-# _LT_LANG_FC_CONFIG([TAG])
-# -------------------------
-# Ensure that the configuration variables for a Fortran compiler are
-# suitably defined.  These variables are subsequently used by _LT_CONFIG
-# to write the compiler configuration to `libtool'.
-m4_defun([_LT_LANG_FC_CONFIG],
-[AC_REQUIRE([_LT_PROG_FC])dnl
-AC_LANG_PUSH(Fortran)
-
-_LT_TAGVAR(archive_cmds_need_lc, $1)=no
-_LT_TAGVAR(allow_undefined_flag, $1)=
-_LT_TAGVAR(always_export_symbols, $1)=no
-_LT_TAGVAR(archive_expsym_cmds, $1)=
-_LT_TAGVAR(export_dynamic_flag_spec, $1)=
-_LT_TAGVAR(hardcode_direct, $1)=no
-_LT_TAGVAR(hardcode_direct_absolute, $1)=no
-_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
-_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
-_LT_TAGVAR(hardcode_libdir_separator, $1)=
-_LT_TAGVAR(hardcode_minus_L, $1)=no
-_LT_TAGVAR(hardcode_automatic, $1)=no
-_LT_TAGVAR(inherit_rpath, $1)=no
-_LT_TAGVAR(module_cmds, $1)=
-_LT_TAGVAR(module_expsym_cmds, $1)=
-_LT_TAGVAR(link_all_deplibs, $1)=unknown
-_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
-_LT_TAGVAR(no_undefined_flag, $1)=
-_LT_TAGVAR(whole_archive_flag_spec, $1)=
-_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
-
-# Source file extension for fc test sources.
-ac_ext=${ac_fc_srcext-f}
-
-# Object file extension for compiled fc test sources.
-objext=o
-_LT_TAGVAR(objext, $1)=$objext
-
-# No sense in running all these tests if we already determined that
-# the FC compiler isn't working.  Some variables (like enable_shared)
-# are currently assumed to apply to all compilers on this platform,
-# and will be corrupted by setting them based on a non-working compiler.
-if test "$_lt_disable_FC" != yes; then
-  # Code to be used in simple compile tests
-  lt_simple_compile_test_code="\
-      subroutine t
-      return
-      end
-"
-
-  # Code to be used in simple link tests
-  lt_simple_link_test_code="\
-      program t
-      end
-"
-
-  # ltmain only uses $CC for tagged configurations so make sure $CC is set.
-  _LT_TAG_COMPILER
-
-  # save warnings/boilerplate of simple test code
-  _LT_COMPILER_BOILERPLATE
-  _LT_LINKER_BOILERPLATE
-
-  # Allow CC to be a program name with arguments.
-  lt_save_CC="$CC"
-  lt_save_GCC=$GCC
-  CC=${FC-"f95"}
-  compiler=$CC
-  GCC=$ac_cv_fc_compiler_gnu
-
-  _LT_TAGVAR(compiler, $1)=$CC
-  _LT_CC_BASENAME([$compiler])
-
-  if test -n "$compiler"; then
-    AC_MSG_CHECKING([if libtool supports shared libraries])
-    AC_MSG_RESULT([$can_build_shared])
-
-    AC_MSG_CHECKING([whether to build shared libraries])
-    test "$can_build_shared" = "no" && enable_shared=no
-
-    # On AIX, shared libraries and static libraries use the same namespace, and
-    # are all built from PIC.
-    case $host_os in
-      aix3*)
-        test "$enable_shared" = yes && enable_static=no
-        if test -n "$RANLIB"; then
-          archive_cmds="$archive_cmds~\$RANLIB \$lib"
-          postinstall_cmds='$RANLIB $lib'
-        fi
-        ;;
-      aix[[4-9]]*)
-	if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
-	  test "$enable_shared" = yes && enable_static=no
-	fi
-        ;;
-    esac
-    AC_MSG_RESULT([$enable_shared])
-
-    AC_MSG_CHECKING([whether to build static libraries])
-    # Make sure either enable_shared or enable_static is yes.
-    test "$enable_shared" = yes || enable_static=yes
-    AC_MSG_RESULT([$enable_static])
-
-    _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu"
-    _LT_TAGVAR(LD, $1)="$LD"
-
-    ## CAVEAT EMPTOR:
-    ## There is no encapsulation within the following macros, do not change
-    ## the running order or otherwise move them around unless you know exactly
-    ## what you are doing...
-    _LT_SYS_HIDDEN_LIBDEPS($1)
-    _LT_COMPILER_PIC($1)
-    _LT_COMPILER_C_O($1)
-    _LT_COMPILER_FILE_LOCKS($1)
-    _LT_LINKER_SHLIBS($1)
-    _LT_SYS_DYNAMIC_LINKER($1)
-    _LT_LINKER_HARDCODE_LIBPATH($1)
-
-    _LT_CONFIG($1)
-  fi # test -n "$compiler"
-
-  GCC=$lt_save_GCC
-  CC="$lt_save_CC"
-fi # test "$_lt_disable_FC" != yes
-
-AC_LANG_POP
-])# _LT_LANG_FC_CONFIG
-
-
-# _LT_LANG_GCJ_CONFIG([TAG])
-# --------------------------
-# Ensure that the configuration variables for the GNU Java Compiler compiler
-# are suitably defined.  These variables are subsequently used by _LT_CONFIG
-# to write the compiler configuration to `libtool'.
-m4_defun([_LT_LANG_GCJ_CONFIG],
-[AC_REQUIRE([LT_PROG_GCJ])dnl
-AC_LANG_SAVE
-
-# Source file extension for Java test sources.
-ac_ext=java
-
-# Object file extension for compiled Java test sources.
-objext=o
-_LT_TAGVAR(objext, $1)=$objext
-
-# Code to be used in simple compile tests
-lt_simple_compile_test_code="class foo {}"
-
-# Code to be used in simple link tests
-lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }'
-
-# ltmain only uses $CC for tagged configurations so make sure $CC is set.
-_LT_TAG_COMPILER
-
-# save warnings/boilerplate of simple test code
-_LT_COMPILER_BOILERPLATE
-_LT_LINKER_BOILERPLATE
-
-# Allow CC to be a program name with arguments.
-lt_save_CC="$CC"
-lt_save_GCC=$GCC
-GCC=yes
-CC=${GCJ-"gcj"}
-compiler=$CC
-_LT_TAGVAR(compiler, $1)=$CC
-_LT_TAGVAR(LD, $1)="$LD"
-_LT_CC_BASENAME([$compiler])
-
-# GCJ did not exist at the time GCC didn't implicitly link libc in.
-_LT_TAGVAR(archive_cmds_need_lc, $1)=no
-
-_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
-
-## CAVEAT EMPTOR:
-## There is no encapsulation within the following macros, do not change
-## the running order or otherwise move them around unless you know exactly
-## what you are doing...
-if test -n "$compiler"; then
-  _LT_COMPILER_NO_RTTI($1)
-  _LT_COMPILER_PIC($1)
-  _LT_COMPILER_C_O($1)
-  _LT_COMPILER_FILE_LOCKS($1)
-  _LT_LINKER_SHLIBS($1)
-  _LT_LINKER_HARDCODE_LIBPATH($1)
-
-  _LT_CONFIG($1)
-fi
-
-AC_LANG_RESTORE
-
-GCC=$lt_save_GCC
-CC="$lt_save_CC"
-])# _LT_LANG_GCJ_CONFIG
-
-
-# _LT_LANG_RC_CONFIG([TAG])
-# -------------------------
-# Ensure that the configuration variables for the Windows resource compiler
-# are suitably defined.  These variables are subsequently used by _LT_CONFIG
-# to write the compiler configuration to `libtool'.
-m4_defun([_LT_LANG_RC_CONFIG],
-[AC_REQUIRE([LT_PROG_RC])dnl
-AC_LANG_SAVE
-
-# Source file extension for RC test sources.
-ac_ext=rc
-
-# Object file extension for compiled RC test sources.
-objext=o
-_LT_TAGVAR(objext, $1)=$objext
-
-# Code to be used in simple compile tests
-lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }'
-
-# Code to be used in simple link tests
-lt_simple_link_test_code="$lt_simple_compile_test_code"
-
-# ltmain only uses $CC for tagged configurations so make sure $CC is set.
-_LT_TAG_COMPILER
-
-# save warnings/boilerplate of simple test code
-_LT_COMPILER_BOILERPLATE
-_LT_LINKER_BOILERPLATE
-
-# Allow CC to be a program name with arguments.
-lt_save_CC="$CC"
-lt_save_GCC=$GCC
-GCC=
-CC=${RC-"windres"}
-compiler=$CC
-_LT_TAGVAR(compiler, $1)=$CC
-_LT_CC_BASENAME([$compiler])
-_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
-
-if test -n "$compiler"; then
-  :
-  _LT_CONFIG($1)
-fi
-
-GCC=$lt_save_GCC
-AC_LANG_RESTORE
-CC="$lt_save_CC"
-])# _LT_LANG_RC_CONFIG
-
-
-# LT_PROG_GCJ
-# -----------
-AC_DEFUN([LT_PROG_GCJ],
-[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ],
-  [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ],
-    [AC_CHECK_TOOL(GCJ, gcj,)
-      test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
-      AC_SUBST(GCJFLAGS)])])[]dnl
-])
-
-# Old name:
-AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ])
-dnl aclocal-1.4 backwards compatibility:
-dnl AC_DEFUN([LT_AC_PROG_GCJ], [])
-
-
-# LT_PROG_RC
-# ----------
-AC_DEFUN([LT_PROG_RC],
-[AC_CHECK_TOOL(RC, windres,)
-])
-
-# Old name:
-AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC])
-dnl aclocal-1.4 backwards compatibility:
-dnl AC_DEFUN([LT_AC_PROG_RC], [])
-
-
-# _LT_DECL_EGREP
-# --------------
-# If we don't have a new enough Autoconf to choose the best grep
-# available, choose the one first in the user's PATH.
-m4_defun([_LT_DECL_EGREP],
-[AC_REQUIRE([AC_PROG_EGREP])dnl
-AC_REQUIRE([AC_PROG_FGREP])dnl
-test -z "$GREP" && GREP=grep
-_LT_DECL([], [GREP], [1], [A grep program that handles long lines])
-_LT_DECL([], [EGREP], [1], [An ERE matcher])
-_LT_DECL([], [FGREP], [1], [A literal string matcher])
-dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too
-AC_SUBST([GREP])
-])
-
-
-# _LT_DECL_OBJDUMP
-# --------------
-# If we don't have a new enough Autoconf to choose the best objdump
-# available, choose the one first in the user's PATH.
-m4_defun([_LT_DECL_OBJDUMP],
-[AC_CHECK_TOOL(OBJDUMP, objdump, false)
-test -z "$OBJDUMP" && OBJDUMP=objdump
-_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper])
-AC_SUBST([OBJDUMP])
-])
-
-
-# _LT_DECL_SED
-# ------------
-# Check for a fully-functional sed program, that truncates
-# as few characters as possible.  Prefer GNU sed if found.
-m4_defun([_LT_DECL_SED],
-[AC_PROG_SED
-test -z "$SED" && SED=sed
-Xsed="$SED -e 1s/^X//"
-_LT_DECL([], [SED], [1], [A sed program that does not truncate output])
-_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"],
-    [Sed that helps us avoid accidentally triggering echo(1) options like -n])
-])# _LT_DECL_SED
-
-m4_ifndef([AC_PROG_SED], [
-############################################################
-# NOTE: This macro has been submitted for inclusion into   #
-#  GNU Autoconf as AC_PROG_SED.  When it is available in   #
-#  a released version of Autoconf we should remove this    #
-#  macro and use it instead.                               #
-############################################################
-
-m4_defun([AC_PROG_SED],
-[AC_MSG_CHECKING([for a sed that does not truncate output])
-AC_CACHE_VAL(lt_cv_path_SED,
-[# Loop through the user's path and test for sed and gsed.
-# Then use that list of sed's as ones to test for truncation.
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  for lt_ac_prog in sed gsed; do
-    for ac_exec_ext in '' $ac_executable_extensions; do
-      if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
-        lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
-      fi
-    done
-  done
-done
-IFS=$as_save_IFS
-lt_ac_max=0
-lt_ac_count=0
-# Add /usr/xpg4/bin/sed as it is typically found on Solaris
-# along with /bin/sed that truncates output.
-for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
-  test ! -f $lt_ac_sed && continue
-  cat /dev/null > conftest.in
-  lt_ac_count=0
-  echo $ECHO_N "0123456789$ECHO_C" >conftest.in
-  # Check for GNU sed and select it if it is found.
-  if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
-    lt_cv_path_SED=$lt_ac_sed
-    break
-  fi
-  while true; do
-    cat conftest.in conftest.in >conftest.tmp
-    mv conftest.tmp conftest.in
-    cp conftest.in conftest.nl
-    echo >>conftest.nl
-    $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
-    cmp -s conftest.out conftest.nl || break
-    # 10000 chars as input seems more than enough
-    test $lt_ac_count -gt 10 && break
-    lt_ac_count=`expr $lt_ac_count + 1`
-    if test $lt_ac_count -gt $lt_ac_max; then
-      lt_ac_max=$lt_ac_count
-      lt_cv_path_SED=$lt_ac_sed
-    fi
-  done
-done
-])
-SED=$lt_cv_path_SED
-AC_SUBST([SED])
-AC_MSG_RESULT([$SED])
-])#AC_PROG_SED
-])#m4_ifndef
-
-# Old name:
-AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED])
-dnl aclocal-1.4 backwards compatibility:
-dnl AC_DEFUN([LT_AC_PROG_SED], [])
-
-
-# _LT_CHECK_SHELL_FEATURES
-# ------------------------
-# Find out whether the shell is Bourne or XSI compatible,
-# or has some other useful features.
-m4_defun([_LT_CHECK_SHELL_FEATURES],
-[AC_MSG_CHECKING([whether the shell understands some XSI constructs])
-# Try some XSI features
-xsi_shell=no
-( _lt_dummy="a/b/c"
-  test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \
-      = c,a/b,, \
-    && eval 'test $(( 1 + 1 )) -eq 2 \
-    && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \
-  && xsi_shell=yes
-AC_MSG_RESULT([$xsi_shell])
-_LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell'])
-
-AC_MSG_CHECKING([whether the shell understands "+="])
-lt_shell_append=no
-( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \
-    >/dev/null 2>&1 \
-  && lt_shell_append=yes
-AC_MSG_RESULT([$lt_shell_append])
-_LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append'])
-
-if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
-  lt_unset=unset
-else
-  lt_unset=false
-fi
-_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl
-
-# test EBCDIC or ASCII
-case `echo X|tr X '\101'` in
- A) # ASCII based system
-    # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
-  lt_SP2NL='tr \040 \012'
-  lt_NL2SP='tr \015\012 \040\040'
-  ;;
- *) # EBCDIC based system
-  lt_SP2NL='tr \100 \n'
-  lt_NL2SP='tr \r\n \100\100'
-  ;;
-esac
-_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl
-_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl
-])# _LT_CHECK_SHELL_FEATURES
-
-
-# _LT_PROG_XSI_SHELLFNS
-# ---------------------
-# Bourne and XSI compatible variants of some useful shell functions.
-m4_defun([_LT_PROG_XSI_SHELLFNS],
-[case $xsi_shell in
-  yes)
-    cat << \_LT_EOF >> "$cfgfile"
-
-# func_dirname file append nondir_replacement
-# Compute the dirname of FILE.  If nonempty, add APPEND to the result,
-# otherwise set result to NONDIR_REPLACEMENT.
-func_dirname ()
-{
-  case ${1} in
-    */*) func_dirname_result="${1%/*}${2}" ;;
-    *  ) func_dirname_result="${3}" ;;
-  esac
-}
-
-# func_basename file
-func_basename ()
-{
-  func_basename_result="${1##*/}"
-}
-
-# func_dirname_and_basename file append nondir_replacement
-# perform func_basename and func_dirname in a single function
-# call:
-#   dirname:  Compute the dirname of FILE.  If nonempty,
-#             add APPEND to the result, otherwise set result
-#             to NONDIR_REPLACEMENT.
-#             value returned in "$func_dirname_result"
-#   basename: Compute filename of FILE.
-#             value retuned in "$func_basename_result"
-# Implementation must be kept synchronized with func_dirname
-# and func_basename. For efficiency, we do not delegate to
-# those functions but instead duplicate the functionality here.
-func_dirname_and_basename ()
-{
-  case ${1} in
-    */*) func_dirname_result="${1%/*}${2}" ;;
-    *  ) func_dirname_result="${3}" ;;
-  esac
-  func_basename_result="${1##*/}"
-}
-
-# func_stripname prefix suffix name
-# strip PREFIX and SUFFIX off of NAME.
-# PREFIX and SUFFIX must not contain globbing or regex special
-# characters, hashes, percent signs, but SUFFIX may contain a leading
-# dot (in which case that matches only a dot).
-func_stripname ()
-{
-  # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are
-  # positional parameters, so assign one to ordinary parameter first.
-  func_stripname_result=${3}
-  func_stripname_result=${func_stripname_result#"${1}"}
-  func_stripname_result=${func_stripname_result%"${2}"}
-}
-
-# func_opt_split
-func_opt_split ()
-{
-  func_opt_split_opt=${1%%=*}
-  func_opt_split_arg=${1#*=}
-}
-
-# func_lo2o object
-func_lo2o ()
-{
-  case ${1} in
-    *.lo) func_lo2o_result=${1%.lo}.${objext} ;;
-    *)    func_lo2o_result=${1} ;;
-  esac
-}
-
-# func_xform libobj-or-source
-func_xform ()
-{
-  func_xform_result=${1%.*}.lo
-}
-
-# func_arith arithmetic-term...
-func_arith ()
-{
-  func_arith_result=$(( $[*] ))
-}
-
-# func_len string
-# STRING may not start with a hyphen.
-func_len ()
-{
-  func_len_result=${#1}
-}
-
-_LT_EOF
-    ;;
-  *) # Bourne compatible functions.
-    cat << \_LT_EOF >> "$cfgfile"
-
-# func_dirname file append nondir_replacement
-# Compute the dirname of FILE.  If nonempty, add APPEND to the result,
-# otherwise set result to NONDIR_REPLACEMENT.
-func_dirname ()
-{
-  # Extract subdirectory from the argument.
-  func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"`
-  if test "X$func_dirname_result" = "X${1}"; then
-    func_dirname_result="${3}"
-  else
-    func_dirname_result="$func_dirname_result${2}"
-  fi
-}
-
-# func_basename file
-func_basename ()
-{
-  func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"`
-}
-
-dnl func_dirname_and_basename
-dnl A portable version of this function is already defined in general.m4sh
-dnl so there is no need for it here.
-
-# func_stripname prefix suffix name
-# strip PREFIX and SUFFIX off of NAME.
-# PREFIX and SUFFIX must not contain globbing or regex special
-# characters, hashes, percent signs, but SUFFIX may contain a leading
-# dot (in which case that matches only a dot).
-# func_strip_suffix prefix name
-func_stripname ()
-{
-  case ${2} in
-    .*) func_stripname_result=`$ECHO "X${3}" \
-           | $Xsed -e "s%^${1}%%" -e "s%\\\\${2}\$%%"`;;
-    *)  func_stripname_result=`$ECHO "X${3}" \
-           | $Xsed -e "s%^${1}%%" -e "s%${2}\$%%"`;;
-  esac
-}
-
-# sed scripts:
-my_sed_long_opt='1s/^\(-[[^=]]*\)=.*/\1/;q'
-my_sed_long_arg='1s/^-[[^=]]*=//'
-
-# func_opt_split
-func_opt_split ()
-{
-  func_opt_split_opt=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_opt"`
-  func_opt_split_arg=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_arg"`
-}
-
-# func_lo2o object
-func_lo2o ()
-{
-  func_lo2o_result=`$ECHO "X${1}" | $Xsed -e "$lo2o"`
-}
-
-# func_xform libobj-or-source
-func_xform ()
-{
-  func_xform_result=`$ECHO "X${1}" | $Xsed -e 's/\.[[^.]]*$/.lo/'`
-}
-
-# func_arith arithmetic-term...
-func_arith ()
-{
-  func_arith_result=`expr "$[@]"`
-}
-
-# func_len string
-# STRING may not start with a hyphen.
-func_len ()
-{
-  func_len_result=`expr "$[1]" : ".*" 2>/dev/null || echo $max_cmd_len`
-}
-
-_LT_EOF
-esac
-
-case $lt_shell_append in
-  yes)
-    cat << \_LT_EOF >> "$cfgfile"
-
-# func_append var value
-# Append VALUE to the end of shell variable VAR.
-func_append ()
-{
-  eval "$[1]+=\$[2]"
-}
-_LT_EOF
-    ;;
-  *)
-    cat << \_LT_EOF >> "$cfgfile"
-
-# func_append var value
-# Append VALUE to the end of shell variable VAR.
-func_append ()
-{
-  eval "$[1]=\$$[1]\$[2]"
-}
-
-_LT_EOF
-    ;;
-  esac
-])

-----------------------------------------------------------------------

Summary of changes:
 myserver/INSTALL                                   |  302 -
 myserver/autogen.sh                                |    1 -
 myserver/documentation/mime_types.texi             |   12 +
 .../include/base/files_cache/cached_file_factory.h |   41 +-
 .../include/conf/security/auth_method_factory.h    |    3 +-
 myserver/include/conf/security/validator_factory.h |    4 +-
 myserver/include/server/clients_thread.h           |   24 +-
 myserver/m4/libtool.m4                             | 7376 --------------------
 myserver/src/base/files_cache/cached_file.cpp      |  111 +-
 .../src/base/files_cache/cached_file_buffer.cpp    |   97 +-
 .../src/base/files_cache/cached_file_factory.cpp   |  351 +-
 myserver/src/protocol/http/http.cpp                |    1 -
 12 files changed, 318 insertions(+), 8005 deletions(-)
 delete mode 100644 myserver/INSTALL
 delete mode 100644 myserver/m4/libtool.m4


hooks/post-receive
-- 
GNU MyServer



From MAILER-DAEMON Sun Aug 23 07:11:51 2009
Received: from mailman by lists.gnu.org with archive (Exim 4.43)
	id 1MfAzH-0006ly-0M
	for mharc-myserver-commit@gnu.org; Sun, 23 Aug 2009 07:11:51 -0400
Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43)
	id 1MfAzE-0006i5-Cm
	for myserver-commit@gnu.org; Sun, 23 Aug 2009 07:11:48 -0400
Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43)
	id 1MfAzD-0006gD-Dy
	for myserver-commit@gnu.org; Sun, 23 Aug 2009 07:11:47 -0400
Received: from [199.232.76.173] (port=58062 helo=monty-python.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43) id 1MfAzD-0006fw-3n
	for myserver-commit@gnu.org; Sun, 23 Aug 2009 07:11:47 -0400
Received: from savannah.gnu.org ([199.232.41.3]:50806 helo=sv.gnu.org)
	by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32)
	(Exim 4.60) (envelope-from <gscrivano@gnu.org>) id 1MfAz8-0007vL-Op
	for myserver-commit@gnu.org; Sun, 23 Aug 2009 07:11:46 -0400
Received: from download.savannah.gnu.org ([199.232.41.75]
	helo=cvs.savannah.gnu.org) by sv.gnu.org with esmtp (Exim 4.69)
	(envelope-from <gscrivano@gnu.org>) id 1MfAz8-0007CP-E9
	for myserver-commit@gnu.org; Sun, 23 Aug 2009 11:11:42 +0000
Received: from gscrivano by cvs.savannah.gnu.org with local (Exim 4.69)
	(envelope-from <gscrivano@savannah.gnu.org>) id 1MfAz5-0007BH-Sl
	for myserver-commit@gnu.org; Sun, 23 Aug 2009 11:11:42 +0000
To: myserver-commit@gnu.org
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: 0875df6e43e49dae7f882c57f9a32cc693e9b856
X-Git-Newrev: 5d3d08dda187d4b4e9344c9d8d56a013734b3ef6
Message-Id: <E1MfAz5-0007BH-Sl@cvs.savannah.gnu.org>
From: Giuseppe Scrivano <gscrivano@gnu.org>
Date: Sun, 23 Aug 2009 11:11:41 +0000
X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2)
Subject: [myserver-commit] [SCM] GNU MyServer branch, master,
	updated. 5d3d08dda187d4b4e9344c9d8d56a013734b3ef6
X-BeenThere: myserver-commit@gnu.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: myserver-commit.gnu.org
List-Unsubscribe: <http://lists.gnu.org/mailman/listinfo/myserver-commit>,
	<mailto:myserver-commit-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/pipermail/myserver-commit>
List-Post: <mailto:myserver-commit@gnu.org>
List-Help: <mailto:myserver-commit-request@gnu.org?subject=help>
List-Subscribe: <http://lists.gnu.org/mailman/listinfo/myserver-commit>,
	<mailto:myserver-commit-request@gnu.org?subject=subscribe>
X-List-Received-Date: Sun, 23 Aug 2009 11:11:49 -0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU MyServer".

The branch, master has been updated
       via  5d3d08dda187d4b4e9344c9d8d56a013734b3ef6 (commit)
       via  b7b4c13225b272241621135fdfaabc60d0dbda93 (commit)
       via  6da4f27bea1bfcf3113a6401ff815a578f76e754 (commit)
       via  6fcef38af252b8a13b5101a284c5fbacf2334eb2 (commit)
       via  5e9e52af4414077f8cdabc509c829146db17f4e2 (commit)
       via  72de355587d8e3beeb719a6053660abbd774d762 (commit)
      from  0875df6e43e49dae7f882c57f9a32cc693e9b856 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------


commit 5d3d08dda187d4b4e9344c9d8d56a013734b3ef6
Author: Giuseppe Scrivano <gscrivano@gnu.org>
Date:   Sun Aug 23 13:08:39 2009 +0200

    Plugins use the new logging facilities.

diff --git a/plugins/src/http_checker/http_checker.cpp b/plugins/src/http_checker/http_checker.cpp
index ba2ceee..3bc77f2 100644
--- a/plugins/src/http_checker/http_checker.cpp
+++ b/plugins/src/http_checker/http_checker.cpp
@@ -239,7 +239,7 @@ EXPORTABLE(int) load(void* server,void* parser)
 
   if(!staticData)
     {
-      serverInstance->logWriteln("HttpChecker: Invalid HTTP static data");
+      serverInstance->log (MYSERVER_LOG_MSG_ERROR, _("HttpChecker: invalid HTTP static data"));
       return -1;
     }
 
@@ -247,7 +247,7 @@ EXPORTABLE(int) load(void* server,void* parser)
 
   if(!python)
     {
-      serverInstance->logWriteln("HttpChecker: Cannot find executors::python");
+      serverInstance->log (MYSERVER_LOG_MSG_ERROR, _("HttpChecker: cannot find executors::python"));
       return -1;
     }
   observer.setPythonExecutor(python);
@@ -258,7 +258,7 @@ EXPORTABLE(int) load(void* server,void* parser)
 
   if(!init)
     {
-      serverInstance->logWriteln("HttpChecker: Cannot find method initModule in executors::python");
+      serverInstance->log (MYSERVER_LOG_MSG_ERROR, _("HttpChecker: cannot find method initModule in executors::python"));
       return -1;
     }
 
@@ -289,7 +289,7 @@ EXPORTABLE(int) load(void* server,void* parser)
 
 	  if(!data)
 	    {
-	      serverInstance->logWriteln("HttpChecker: Invalid rule");
+        serverInstance->log (MYSERVER_LOG_MSG_ERROR, _("HttpChecker: invalid rule"));
 	      return -1;
 	    }
 
diff --git a/plugins/src/mime_magic/mime_magic.cpp b/plugins/src/mime_magic/mime_magic.cpp
index ea4a5a2..b5da922 100755
--- a/plugins/src/mime_magic/mime_magic.cpp
+++ b/plugins/src/mime_magic/mime_magic.cpp
@@ -118,7 +118,7 @@ EXPORTABLE(int) postLoad(void* server)
   MagicHandler *handler = new MagicHandler;
   if (handler->load ())
     {
-      serverInstance->logWriteln (MYSERVER_LOG_MSG_ERROR,
+      serverInstance->log (MYSERVER_LOG_MSG_ERROR,
                                   _("cannot load mime magic configuration"));
       return 1;
     }
diff --git a/plugins/src/php/php.cpp b/plugins/src/php/php.cpp
index 621f64f..ab17b3c 100644
--- a/plugins/src/php/php.cpp
+++ b/plugins/src/php/php.cpp
@@ -293,11 +293,11 @@ int load(void* server)
 {
 	::server = (Server*)server;
 	const char *data;
-	data = ::server->getHashedData("PHP_NO_REBOOT");
+	data = ::server->getData("PHP_NO_REBOOT");
 
 	if(!(::server->isRebooting() && !(data && !strcmpi(data, "YES"))))
 	{
-		data = ::server->getHashedData("PHP_SAFE_MODE");
+		data = ::server->getData("PHP_SAFE_MODE");
 
 		if(data && !strcmpi(data, "YES"))
 			singleRequest = 1;
@@ -317,7 +317,7 @@ extern "C"
 int postLoad(void* server)
 {
 	const char *data;
-	data = ::server->getHashedData("PHP_NO_REBOOT");
+	data = ::server->getData("PHP_NO_REBOOT");
 
 	if(!(::server->isRebooting() && !(data && !strcmpi(data, "YES"))))
 	{
@@ -336,7 +336,7 @@ extern "C"
 int unLoad(void* p)
 {
 	const char *data;
-	data = ::server->getHashedData("PHP_NO_REBOOT");
+	data = ::server->getData("PHP_NO_REBOOT");
 
 	if(!(::server->isRebooting() && !(data && !strcmpi(data, "YES"))))
 	{
diff --git a/plugins/src/python/python.cpp b/plugins/src/python/python.cpp
index fa3976b..9fc6ec7 100644
--- a/plugins/src/python/python.cpp
+++ b/plugins/src/python/python.cpp
@@ -56,13 +56,13 @@ void PythonData::clear ()
 int load (void* server)
 {
 	serverInstance = (Server*)server;
-	const char* pathData = serverInstance->getHashedData("PYTHON_PATH");
+	const char* pathData = serverInstance->getData("PYTHON_PATH");
 	PyThreadState * mainThreadState;
 	if (pathData)
-	{	
+	{
 		string path (pathData);
 		FilesUtility::completePath (path);
-		
+
 		setenv ("PYTHONPATH", path.c_str(), 1);
 	}
 	else
@@ -112,7 +112,7 @@ int unLoad (void* p)
 
 	Py_Finalize ();
 
-	
+
 	PyThreadState_Swap (NULL);
 
 
@@ -153,7 +153,7 @@ int executeImpl (char* code, u_long length, PyThreadState *threadState, int newT
 
 
 	PyRun_SimpleString (code);
-	
+
 	PyThreadState_Swap (NULL);
 
   if (newThreadState)
@@ -202,20 +202,13 @@ int executeFromFileImpl(char* filename, PyThreadState *threadState, int newThrea
 
 	if(file == 0)
 	{
-		string msg;
-		msg.assign ("Python: Cannot load file ");
-		msg.append (filename);
-
-
-		serverInstance->logWriteln (msg.c_str ());
-
-
+    serverInstance->log (MYSERVER_LOG_MSG_ERROR, _("Python: cannot load file %s"), filename);
 		ret = -1;
 	}
 	else
 		ret = PyRun_AnyFileEx (file, filename, 1);
 
-	
+
 	PyThreadState_Swap (NULL);
 
   if (newThreadState)
@@ -235,7 +228,7 @@ PyObject* callObject(PyObject *obj, PyObject *args)
   return callObjectImpl(obj, args, NULL, 1);
 }
 
- 
+
 PyObject* callObjectImpl(PyObject *obj, PyObject *args, PyThreadState *threadState, int newThreadState)
 {
 	PyInterpreterState *interpreter = NULL;
diff --git a/plugins/src/python_http_handler/python_http_handler.cpp b/plugins/src/python_http_handler/python_http_handler.cpp
index c6b1134..377e4d7 100644
--- a/plugins/src/python_http_handler/python_http_handler.cpp
+++ b/plugins/src/python_http_handler/python_http_handler.cpp
@@ -161,7 +161,7 @@ static PyObject *log_server_error(PyObject *self, PyObject *args)
 	if (!PyArg_ParseTuple(args, (char*)"s", &msg))
 		return NULL;
 
-  serverInstance->logWriteln(msg);
+  serverInstance->log(MYSERVER_LOG_MSG_ERROR, "%s", msg);
 
 	return NULL;
 }
@@ -357,7 +357,7 @@ public:
 
 		for(it = rules.begin(); it != rules.end(); it++)
 		{
-			if((*it).file) 
+			if((*it).file)
 			{
 				executeFromFilePROC execute = ((executeFromFilePROC)python->getDirectMethod((char*)"executeFromFile"));
 				if (execute)
@@ -365,7 +365,7 @@ public:
 			}else
 			{
 				executePROC execute = ((executePROC)python->getDirectMethod((char*)"execute"));
-				
+
 				if (execute)
 				  execute((char*)(*it).data.c_str(), (*it).data.length());
 			}
@@ -409,17 +409,17 @@ EXPORTABLE(int) load (void* server)
 	XmlParser* configuration;
 	xmlDocPtr xmlDoc;
 	if(!staticData)
-	{
-		serverInstance->logWriteln("PythonHttpHandler: Invalid HTTP static data");
-		return -1;
-	}
-	python = serverInstance->getPluginsManager()->getPlugin(pythonName);
+    {
+      serverInstance->log (MYSERVER_LOG_MSG_ERROR, _("PythonHttpHandler: Invalid HTTP static data"));
+      return -1;
+    }
+	python = serverInstance->getPluginsManager ()->getPlugin (pythonName);
 
 	if(!python)
-	{
-		serverInstance->logWriteln("PythonHttpHandler: Cannot find executors::python");
-		return -1;
-	}
+    {
+      serverInstance->log (MYSERVER_LOG_MSG_ERROR, _("PythonHttpHandler: Cannot find executors::python"));
+      return -1;
+    }
 	observer.setPythonExecutor(python);
 
 	staticData->addMulticast(msg, &observer);
@@ -427,10 +427,10 @@ EXPORTABLE(int) load (void* server)
 	init = (INIT_MODULE) python->getDirectMethod((char*)"initModule");
 
 	if(!init)
-	{
-		serverInstance->logWriteln("PythonHttpHandler: Cannot find method initModule in executors::python");
-		return -1;
-	}
+    {
+      serverInstance->log (MYSERVER_LOG_MSG_ERROR, _("PythonHttpHandler: Cannot find method initModule in executors::python"));
+      return -1;
+    }
 	configuration = serverInstance->getXmlConfiguration();
 	xmlDoc = configuration->getDoc();
 
@@ -438,31 +438,31 @@ EXPORTABLE(int) load (void* server)
 	  {
 	    if(!xmlStrcmp(ptr->name, (const xmlChar *)"PYTHON_HTTP_HANDLER"))
 	      {
-		bool file = false;
-		xmlAttrPtr properties = ptr->properties;
-		char* data = 0;
-		while(properties)
-		  {
-		    if(!xmlStrcmp(properties->name, (const xmlChar *)"file"))
-		      {
-			if(properties->children && properties->children->content)
-			  data = (char*)properties->children->content;
-
-			file = true;
-		      }
-		    properties = properties->next;
-		  }
-
-		if(!file && ptr->children && ptr->children->next && ptr->children->next->content)
-		  data = (char*)ptr->children->next->content;
-
-		if(!data)
-		  {
-		    serverInstance->logWriteln("PythonHttpHandler: Invalid rule");
-		    return -1;
-		  }
-
-		observer.addRule(data, file);
+          bool file = false;
+          xmlAttrPtr properties = ptr->properties;
+          char* data = 0;
+          while(properties)
+            {
+              if(!xmlStrcmp(properties->name, (const xmlChar *)"file"))
+                {
+                  if(properties->children && properties->children->content)
+                    data = (char*)properties->children->content;
+
+                  file = true;
+                }
+              properties = properties->next;
+            }
+
+          if(!file && ptr->children && ptr->children->next && ptr->children->next->content)
+            data = (char*)ptr->children->next->content;
+
+          if(!data)
+            {
+              serverInstance->log (MYSERVER_LOG_MSG_ERROR, _("PythonHttpHandler: Invalid rule"));
+              return -1;
+            }
+
+          observer.addRule (data, file);
 	      }
 
 	  }
diff --git a/plugins/src/rules_checker/rules_checker.cpp b/plugins/src/rules_checker/rules_checker.cpp
index a5d7f05..954d78b 100644
--- a/plugins/src/rules_checker/rules_checker.cpp
+++ b/plugins/src/rules_checker/rules_checker.cpp
@@ -102,7 +102,7 @@ EXPORTABLE(int) load (void* server)
   xmlDocPtr xmlDoc;
   if(!staticData)
     {
-      serverInstance->logWriteln("RulesChecker: Invalid HTTP static data");
+      serverInstance->log("RulesChecker: Invalid HTTP static data");
       return -1;
     }
 
@@ -123,7 +123,7 @@ EXPORTABLE(int) load (void* server)
 
 	  if(!data)
 	    {
-	      serverInstance->logWriteln("RulesChecker: Invalid rule");
+	      serverInstance->log("RulesChecker: Invalid rule");
 	      return -1;
 	    }
 



commit b7b4c13225b272241621135fdfaabc60d0dbda93
Author: Giuseppe Scrivano <gscrivano@gnu.org>
Date:   Sun Aug 23 13:00:45 2009 +0200

    Fix test failure.

diff --git a/myserver/src/base/files_cache/cached_file.cpp b/myserver/src/base/files_cache/cached_file.cpp
index 880dae4..65d529b 100644
--- a/myserver/src/base/files_cache/cached_file.cpp
+++ b/myserver/src/base/files_cache/cached_file.cpp
@@ -169,10 +169,11 @@ u_long CachedFile::getFileSize ()
  */
 int CachedFile::seek (u_long initialByte)
 {
-  if (initialByte <= buffer->getFileSize())
-    fseek = initialByte;
-  else
+  if (initialByte > buffer->getFileSize())
     return -1;
+
+  fseek = initialByte;
+  return 0;
 }
 
 /*!



commit 6da4f27bea1bfcf3113a6401ff815a578f76e754
Author: Giuseppe Scrivano <gscrivano@gnu.org>
Date:   Sun Aug 23 12:48:37 2009 +0200

    Refactoring: rename any `logWriteln' to `log'.

diff --git a/myserver/include/log/log_manager.h b/myserver/include/log/log_manager.h
index b5250b7..e3a4270 100644
--- a/myserver/include/log/log_manager.h
+++ b/myserver/include/log/log_manager.h
@@ -96,7 +96,7 @@ private:
   int add (const void *owner, string type, string location, LogStream* ls);
   int computeNewLine ();
   void associateLoggingLevelsWithNames ();
-  int logWriteln (const string &, LoggingLevel);
+  int log (const string &, LoggingLevel);
 
   LoggingLevel level;
   Mutex* mutex;
diff --git a/myserver/include/server/server.h b/myserver/include/server/server.h
index 5b0eb2f..1c67d51 100644
--- a/myserver/include/server/server.h
+++ b/myserver/include/server/server.h
@@ -130,29 +130,29 @@ public:
   void stop();
   void finalCleanup();
   int terminate();
-  int logWriteln (LoggingLevel level, const char *fmt, ...);
-  int logWriteln(char const*, LoggingLevel level = MYSERVER_LOG_MSG_INFO);
-  int logWriteln(string const &str)
-    {return logWriteln(str.c_str());};
-  int setLogLocation(string);
-  u_long getBuffersize();
-  u_long getBuffersize2();
-  u_long getThrottlingRate();
-  int waitNewConnection(u_long tid, u_long timeout);
-  ListenThreads *getListenThreads(){return &listenThreads;}
-
-  void *getEnvString(){return envString;}
-  VhostManager *getVhosts(){return vhostList;}
-  MimeManager *getMimeManager(){return mimeManager;}
-
-  void setProcessPermissions();
-  ConnectionsScheduler* getConnectionsScheduler(){return &connectionsScheduler;}
-  int deleteConnection(ConnectionPtr);
-
-  int notifyDeleteConnection(ConnectionPtr);
-
-  void increaseFreeThread();
-  void decreaseFreeThread();
+  int log (LoggingLevel level, const char *fmt, ...);
+  int log (char const*, LoggingLevel level = MYSERVER_LOG_MSG_INFO);
+  int log (string const &str)
+  {return log (str.c_str());};
+  int setLogLocation (string);
+  u_long getBuffersize ();
+  u_long getBuffersize2 ();
+  u_long getThrottlingRate ();
+  int waitNewConnection (u_long tid, u_long timeout);
+  ListenThreads *getListenThreads (){return &listenThreads;}
+
+  void *getEnvString (){return envString;}
+  VhostManager *getVhosts (){return vhostList;}
+  MimeManager *getMimeManager (){return mimeManager;}
+
+  void setProcessPermissions ();
+  ConnectionsScheduler* getConnectionsScheduler (){return &connectionsScheduler;}
+  int deleteConnection (ConnectionPtr);
+
+  int notifyDeleteConnection (ConnectionPtr);
+
+  void increaseFreeThread ();
+  void decreaseFreeThread ();
 
   SecurityManager *getSecurityManager (){return &securityManager;}
   AuthMethodFactory *getAuthMethodFactory () {return &authMethodFactory;}
diff --git a/myserver/src/base/process/process_server_manager.cpp b/myserver/src/base/process/process_server_manager.cpp
index 57492b6..701106b 100644
--- a/myserver/src/base/process/process_server_manager.cpp
+++ b/myserver/src/base/process/process_server_manager.cpp
@@ -120,14 +120,14 @@ void ProcessServerManager::load ()
                   ostringstream msg;
                   msg << "Error: incomplete remote PROCESS_SERVER block, "
                       << domain  << ":" << name << " needs a port";
-                  ::Server::getInstance ()->logWriteln (msg.str ().c_str (), MYSERVER_LOG_MSG_ERROR);
+                  ::Server::getInstance ()->log (msg.str ().c_str (), MYSERVER_LOG_MSG_ERROR);
                 }
             }
         }
       else
         {
           const char *msg = "Error: incomplete PROCESS_SERVER block";
-          ::Server::getInstance ()->logWriteln (msg, MYSERVER_LOG_MSG_ERROR);
+          ::Server::getInstance ()->log (msg, MYSERVER_LOG_MSG_ERROR);
         }
     }
 
@@ -401,7 +401,7 @@ int ProcessServerManager::runServer(ProcessServerManager::Server* server,
     ostringstream stream;
     stream << "Cannot run process " << path
            << ": Reached max number of servers";
-    ::Server::getInstance()->logWriteln(stream.str().c_str(), MYSERVER_LOG_MSG_ERROR);
+    ::Server::getInstance()->log(stream.str().c_str(), MYSERVER_LOG_MSG_ERROR);
     return 1;
   }
 
diff --git a/myserver/src/conf/vhost/vhost_manager.cpp b/myserver/src/conf/vhost/vhost_manager.cpp
index acd5790..10820be 100644
--- a/myserver/src/conf/vhost/vhost_manager.cpp
+++ b/myserver/src/conf/vhost/vhost_manager.cpp
@@ -49,7 +49,7 @@ int VhostManager::addVHost(Vhost* vh)
       if (!vh->getProtocolName ())
         {
           vh->setProtocolName("http");
-          Server::getInstance()->logWriteln (MYSERVER_LOG_MSG_WARNING,
+          Server::getInstance()->log (MYSERVER_LOG_MSG_WARNING,
                  _("Protocol not defined for vhost: %s, using HTTP by default"),
                                              vh->getName ());
         }
@@ -201,12 +201,12 @@ void VhostManager::changeLocationsOwner ()
           /* Chown the log files.  */
           err = logManager->chown (vh, "ACCESSLOG", uid, gid);
           if(err)
-            Server::getInstance()->logWriteln (MYSERVER_LOG_MSG_ERROR,
+            Server::getInstance()->log (MYSERVER_LOG_MSG_ERROR,
                     _("Error while changing accesses log locations owner"));
 
           err = logManager->chown (vh, "WARNINGLOG", uid, gid);
           if(err)
-            Server::getInstance()->logWriteln (MYSERVER_LOG_MSG_ERROR,
+            Server::getInstance()->log (MYSERVER_LOG_MSG_ERROR,
                     _("Error while changing log locations owner"));
         }
     }
@@ -285,7 +285,7 @@ VhostManager::loadXMLlogData (string name, Vhost* vh, xmlNode* lcur)
               err = vh->openAccessLog (location, filters, cycle);
               vh->setAccessLogOpt (opt.c_str ());
               if (err)
-                Server::getInstance()->logWriteln (MYSERVER_LOG_MSG_ERROR,
+                Server::getInstance()->log (MYSERVER_LOG_MSG_ERROR,
                                                    _("Error opening %s"), location.c_str ());
             }
           else if (!name.compare ("WARNINGLOG"))
@@ -293,11 +293,11 @@ VhostManager::loadXMLlogData (string name, Vhost* vh, xmlNode* lcur)
               err = vh->openWarningLog (location, filters, cycle);
               vh->setWarningLogOpt (opt.c_str ());
               if (err)
-                Server::getInstance()->logWriteln (MYSERVER_LOG_MSG_ERROR,
+                Server::getInstance()->log (MYSERVER_LOG_MSG_ERROR,
                                                    _("Error opening %s"), location.c_str ());
             }
           else
-            Server::getInstance()->logWriteln (MYSERVER_LOG_MSG_ERROR,
+            Server::getInstance()->log (MYSERVER_LOG_MSG_ERROR,
                                                _(" Unrecognized log type"));
         }
     }
@@ -315,7 +315,7 @@ int VhostManager::loadXMLConfigurationFile(const char *filename)
   xmlNodePtr node;
   if(parser.open(filename))
     {
-      Server::getInstance()->logWriteln (MYSERVER_LOG_MSG_ERROR,
+      Server::getInstance()->log (MYSERVER_LOG_MSG_ERROR,
                                          _("Error opening %s"), filename);
       return -1;
     }
@@ -334,7 +334,7 @@ int VhostManager::loadXMLConfigurationFile(const char *filename)
         {
           parser.close();
           clean();
-          Server::getInstance()->logWriteln (MYSERVER_LOG_MSG_ERROR,
+          Server::getInstance()->log (MYSERVER_LOG_MSG_ERROR,
                                              _("internal error"), filename);
           return -1;
         }
@@ -424,7 +424,7 @@ int VhostManager::loadXMLConfigurationFile(const char *filename)
             {
               int val = atoi ((char*)lcur->children->content);
               if (val > (1 << 16) || strlen ((const char*)lcur->children->content) > 6)
-                Server::getInstance()->logWriteln (MYSERVER_LOG_MSG_ERROR,
+                Server::getInstance()->log (MYSERVER_LOG_MSG_ERROR,
                        _("Specified invalid port %s"), lcur->children->content);
               vh->setPort ((u_short)val);
             }
@@ -494,7 +494,7 @@ int VhostManager::loadXMLConfigurationFile(const char *filename)
 
       if (vh->openLogFiles ())
         {
-          Server::getInstance()->logWriteln (MYSERVER_LOG_MSG_ERROR,
+          Server::getInstance()->log (MYSERVER_LOG_MSG_ERROR,
                                              _("Error opening log files"));
           delete vh;
           vh = 0;
@@ -503,7 +503,7 @@ int VhostManager::loadXMLConfigurationFile(const char *filename)
 
       if (vh->initializeSSL () < 0)
         {
-          Server::getInstance()->logWriteln (MYSERVER_LOG_MSG_ERROR,
+          Server::getInstance()->log (MYSERVER_LOG_MSG_ERROR,
                                              _("Error initializing SSL for %s"),
                                              vh->getName ());
           delete vh;
@@ -513,7 +513,7 @@ int VhostManager::loadXMLConfigurationFile(const char *filename)
 
       if (addVHost (vh))
         {
-          Server::getInstance()->logWriteln (MYSERVER_LOG_MSG_ERROR,
+          Server::getInstance()->log (MYSERVER_LOG_MSG_ERROR,
                                              _("Internal error"));
           delete vh;
           vh = 0;
diff --git a/myserver/src/connections_scheduler/connections_scheduler.cpp b/myserver/src/connections_scheduler/connections_scheduler.cpp
index b15cde0..6a5c05d 100644
--- a/myserver/src/connections_scheduler/connections_scheduler.cpp
+++ b/myserver/src/connections_scheduler/connections_scheduler.cpp
@@ -275,7 +275,7 @@ void ConnectionsScheduler::initialize ()
   if (err == -1)
     {
       if (server)
-        server->logWriteln (MYSERVER_LOG_MSG_ERROR, _("Error initializing socket pair"));
+        server->log (MYSERVER_LOG_MSG_ERROR, _("Error initializing socket pair"));
       return;
     }
 
@@ -287,7 +287,7 @@ void ConnectionsScheduler::initialize ()
   if (Thread::create (&dispatchedThreadId, dispatcher, &dispatcherArg))
     {
       if (server)
-        server->logWriteln (MYSERVER_LOG_MSG_ERROR,
+        server->log (MYSERVER_LOG_MSG_ERROR,
                             _("Error while initializing the dispatcher thread"));
 
       dispatchedThreadId = 0;
diff --git a/myserver/src/connections_scheduler/listen_threads.cpp b/myserver/src/connections_scheduler/listen_threads.cpp
index a5e399d..c6cb761 100644
--- a/myserver/src/connections_scheduler/listen_threads.cpp
+++ b/myserver/src/connections_scheduler/listen_threads.cpp
@@ -91,7 +91,7 @@ int ListenThreads::createServerAndListener(u_short port)
           serverSocketIPv4->socket (AF_INET, SOCK_STREAM, IPPROTO_TCP);
           if (serverSocketIPv4->getHandle() == (Handle)INVALID_SOCKET)
             {
-              server->logWriteln (MYSERVER_LOG_MSG_ERROR,
+              server->log (MYSERVER_LOG_MSG_ERROR,
                             _("Error while creating the server socket"));
               delete serverSocketIPv4;
               serverSocketIPv4 = NULL;
@@ -110,7 +110,7 @@ int ListenThreads::createServerAndListener(u_short port)
                                                 (const char *)&optvalReuseAddr,
                                                 sizeof(optvalReuseAddr)) < 0)
                 {
-                  server->logWriteln (MYSERVER_LOG_MSG_ERROR,
+                  server->log (MYSERVER_LOG_MSG_ERROR,
                                  _("Error while creating the server socket"));
 
                   delete serverSocketIPv4;
@@ -119,15 +119,15 @@ int ListenThreads::createServerAndListener(u_short port)
 #endif
               if (serverSocketIPv4)
                 {
-                  server->logWriteln (MYSERVER_LOG_MSG_INFO,
+                  server->log (MYSERVER_LOG_MSG_INFO,
                                       _("Binding the port"));
 
                   if (!serverSocketIPv4->bind (&sockServerSocketIPv4,
                                               sizeof(sockaddr_in)))
-                    server->logWriteln (MYSERVER_LOG_MSG_INFO, _("Port was bound"));
+                    server->log (MYSERVER_LOG_MSG_INFO, _("Port was bound"));
                   else
                     {
-                      server->logWriteln (MYSERVER_LOG_MSG_ERROR,
+                      server->log (MYSERVER_LOG_MSG_ERROR,
                                           _("Error while creating the server socket"));
                       delete serverSocketIPv4;
                       serverSocketIPv4 = NULL;
@@ -145,7 +145,7 @@ int ListenThreads::createServerAndListener(u_short port)
           serverSocketIPv6->socket (AF_INET6, SOCK_STREAM, IPPROTO_TCP);
           if (serverSocketIPv6->getHandle () == (FileHandle)INVALID_SOCKET)
             {
-              server->logWriteln (MYSERVER_LOG_MSG_ERROR,
+              server->log (MYSERVER_LOG_MSG_ERROR,
                                  _("Error while creating the server socket"));
               delete serverSocketIPv6;
               serverSocketIPv6 = NULL;
@@ -162,7 +162,7 @@ int ListenThreads::createServerAndListener(u_short port)
                                                 (const char *)&optvalReuseAddr,
                                                 sizeof(optvalReuseAddr)) < 0)
                 {
-                  server->logWriteln (MYSERVER_LOG_MSG_ERROR,
+                  server->log (MYSERVER_LOG_MSG_ERROR,
                                  _("Error while creating the server socket"));
                   delete serverSocketIPv6;
                   serverSocketIPv6 = NULL;
@@ -172,7 +172,7 @@ int ListenThreads::createServerAndListener(u_short port)
                                               (const char *)&optvalReuseAddr,
                                               sizeof(optvalReuseAddr)) < 0)
                 {
-                  server->logWriteln (MYSERVER_LOG_MSG_ERROR,
+                  server->log (MYSERVER_LOG_MSG_ERROR,
                                  _("Error while creating the server socket"));
                   delete serverSocketIPv6;
                   serverSocketIPv6 = NULL;
@@ -180,16 +180,16 @@ int ListenThreads::createServerAndListener(u_short port)
 # endif
               if (serverSocketIPv6)
                 {
-                  server->logWriteln (MYSERVER_LOG_MSG_INFO,
+                  server->log (MYSERVER_LOG_MSG_INFO,
                                       _("Binding the port"));
 
                   if (!serverSocketIPv6->bind (&sockServerSocketIPv6,
                                                sizeof(sockaddr_in6)))
-                    server->logWriteln (MYSERVER_LOG_MSG_INFO,
+                    server->log (MYSERVER_LOG_MSG_INFO,
                                         _("Port was bound"));
                   else
                     {
-                      server->logWriteln (MYSERVER_LOG_MSG_ERROR,
+                      server->log (MYSERVER_LOG_MSG_ERROR,
                                  _("Error while creating the server socket"));
                       delete serverSocketIPv6;
                       serverSocketIPv6 = NULL;
@@ -207,7 +207,7 @@ int ListenThreads::createServerAndListener(u_short port)
 
       if (serverSocketIPv4 != NULL && serverSocketIPv4->listen (SOMAXCONN))
         {
-          server->logWriteln (MYSERVER_LOG_MSG_ERROR,
+          server->log (MYSERVER_LOG_MSG_ERROR,
                              _("Error while creating the server socket"));
           delete serverSocketIPv4;
           serverSocketIPv4 = NULL;
@@ -215,7 +215,7 @@ int ListenThreads::createServerAndListener(u_short port)
 
       if (serverSocketIPv6 != NULL && serverSocketIPv6->listen (SOMAXCONN))
         {
-          server->logWriteln (MYSERVER_LOG_MSG_ERROR,
+          server->log (MYSERVER_LOG_MSG_ERROR,
                              _("Error while creating the server socket"));
           delete serverSocketIPv6;
           serverSocketIPv6 = NULL;
@@ -227,7 +227,7 @@ int ListenThreads::createServerAndListener(u_short port)
           return 1;
         }
 
-      server->logWriteln (MYSERVER_LOG_MSG_INFO,
+      server->log (MYSERVER_LOG_MSG_INFO,
                           _("Listening on the port: %i"), port);
 
       si->ipv4 = serverSocketIPv4;
@@ -241,12 +241,12 @@ int ListenThreads::createServerAndListener(u_short port)
     }
   catch(bad_alloc &ba)
     {
-      server->logWriteln (MYSERVER_LOG_MSG_ERROR, _("Bad alloc: %s"),
+      server->log (MYSERVER_LOG_MSG_ERROR, _("Bad alloc: %s"),
                           ba.what ());
     }
   catch(exception &e)
     {
-      server->logWriteln (MYSERVER_LOG_MSG_ERROR, _("Error: %s"),
+      server->log (MYSERVER_LOG_MSG_ERROR, _("Error: %s"),
                           e.what ());
     };
   return 1;
diff --git a/myserver/src/http_handler/isapi/isapi.cpp b/myserver/src/http_handler/isapi/isapi.cpp
index 518ef0b..db701cb 100644
--- a/myserver/src/http_handler/isapi/isapi.cpp
+++ b/myserver/src/http_handler/isapi/isapi.cpp
@@ -52,7 +52,7 @@ BOOL WINAPI ISAPI_ServerSupportFunctionExport(HCONN hConn, DWORD dwHSERRequest,
   Isapi::isapiMutex->unlock();
   if (ConnInfo == NULL)
     {
-      Server::getInstance()->logWriteln("isapi::ServerSupportFunctionExport: invalid hConn");
+      Server::getInstance()->log("isapi::ServerSupportFunctionExport: invalid hConn");
       return 0;
     }
 
@@ -422,7 +422,7 @@ BOOL WINAPI ISAPI_GetServerVariableExport(HCONN hConn,
   Isapi::isapiMutex->unlock();
   if (ConnInfo == NULL)
   {
-    Server::getInstance()->logWriteln(
+    Server::getInstance()->log(
                        "Isapi::GetServerVariableExport: invalid hConn");
     return 0;
   }
diff --git a/myserver/src/log/log_manager.cpp b/myserver/src/log/log_manager.cpp
index ceb0dca..3a9a02a 100644
--- a/myserver/src/log/log_manager.cpp
+++ b/myserver/src/log/log_manager.cpp
@@ -136,7 +136,7 @@ LogManager::add (const void *owner, string type, string location,
       if (!failure && newSize > oldSize)
         {
           oss << "Warning: \'" << location << "\' shared between " << newSize << " objects.";
-          logWriteln (oss.str (), MYSERVER_LOG_MSG_WARNING);
+          log (oss.str (), MYSERVER_LOG_MSG_WARNING);
         }
     }
   mutex->unlock ();
@@ -1121,10 +1121,10 @@ LogManager::getOwnersList (string location, list<const void*>* l)
  * \return 0 on success, 1 on error.
  */
 int
-LogManager::logWriteln (const string & msg, LoggingLevel l)
+LogManager::log (const string & msg, LoggingLevel l)
 {
   if (Server::getInstance ())
-    return Server::getInstance ()->logWriteln (msg.c_str (), l);
+    return Server::getInstance ()->log (msg.c_str (), l);
 
   return 1;
 }
diff --git a/myserver/src/myserver.cpp b/myserver/src/myserver.cpp
index 13c6e30..262b395 100644
--- a/myserver/src/myserver.cpp
+++ b/myserver/src/myserver.cpp
@@ -67,7 +67,7 @@ void registerSignals ();
 #ifndef WIN32
 void Sig_Quit (int signal)
 {
-  Server::getInstance ()->logWriteln("Exiting...");
+  Server::getInstance ()->log("Exiting...");
   sync ();
   Server::getInstance ()->stop();
   registerSignals ();
@@ -84,7 +84,7 @@ void Sig_Hup (int signal)
 #else
 static BOOL SignalHandler (DWORD type)
 {
-  Server::getInstance ()->logWriteln ("Exiting...");
+  Server::getInstance ()->log ("Exiting...");
   Server::getInstance ()->stop ();
   registerSignals ();
 }
@@ -722,7 +722,7 @@ void __stdcall myServerCtrlHandler(u_long fdwControl)
  */
 void runService ()
 {
-  Server::getInstance()->logWriteln ("Running service...");
+  Server::getInstance()->log ("Running service...");
 #ifdef WIN32
   SERVICE_TABLE_ENTRY serviceTable[] =
     {
@@ -733,11 +733,11 @@ void runService ()
   if (!StartServiceCtrlDispatcher (serviceTable))
     {
       if (GetLastError () == ERROR_INVALID_DATA)
-          Server::getInstance ()->logWriteln("Invalid data");
+          Server::getInstance ()->log("Invalid data");
       else if (GetLastError () == ERROR_SERVICE_ALREADY_RUNNING)
-          Server::getInstance ()->logWriteln("Already running");
+          Server::getInstance ()->log("Already running");
       else
-          Server::getInstance ()->logWriteln("Error running service");
+          Server::getInstance ()->log("Error running service");
     }
 #endif
 }
diff --git a/myserver/src/plugin/plugins_manager.cpp b/myserver/src/plugin/plugins_manager.cpp
index b69dda2..bf97140 100755
--- a/myserver/src/plugin/plugins_manager.cpp
+++ b/myserver/src/plugin/plugins_manager.cpp
@@ -110,7 +110,7 @@ PluginsManager::loadOptions (Server *server)
         addPluginInfo (plugin, new PluginInfo (plugin, enabled, global));
       else
         {
-          server->logWriteln (MYSERVER_LOG_MSG_WARNING,
+          server->log (MYSERVER_LOG_MSG_WARNING,
                               _("Invalid plugin name in PLUGIN block."));
           ret = -1;
         }
@@ -143,7 +143,7 @@ PluginsManager::preLoad (Server* server, string& resource)
 
   if (ret == -1)
     {
-      server->logWriteln (MYSERVER_LOG_MSG_ERROR,
+      server->log (MYSERVER_LOG_MSG_ERROR,
                           _("Invalid plugins source"));
       return ret;
     }
@@ -213,7 +213,7 @@ PluginsManager::preLoad (Server* server, string& resource)
               if (!plugin)
                 {
                   ret |= 1;
-                  server->logWriteln (MYSERVER_LOG_MSG_ERROR,
+                  server->log (MYSERVER_LOG_MSG_ERROR,
                                _("Error loading plugin %s"), libname.c_str ());
                 }
               else
@@ -259,7 +259,7 @@ PluginsManager::loadInfo (Server* server, string& name, string& path)
 
   if (xml.open (path, true))
     {
-      server->logWriteln (MYSERVER_LOG_MSG_ERROR,
+      server->log (MYSERVER_LOG_MSG_ERROR,
                           _("Error loading plugin %s"), name.c_str ());
       return NULL;
     }
@@ -273,7 +273,7 @@ PluginsManager::loadInfo (Server* server, string& name, string& path)
 
   if (size != 1)
     {
-      server->logWriteln (MYSERVER_LOG_MSG_ERROR,
+      server->log (MYSERVER_LOG_MSG_ERROR,
                           _("Error loading plugin %s, invalid plugin.xml"),
                           name.c_str ());
       return NULL;
@@ -289,7 +289,7 @@ PluginsManager::loadInfo (Server* server, string& name, string& path)
     }
   else
     {
-      server->logWriteln (MYSERVER_LOG_MSG_ERROR,
+      server->log (MYSERVER_LOG_MSG_ERROR,
                           _("Error loading plugin %s, invalid plugin.xml"),
                           name.c_str ());
       return NULL;
@@ -305,7 +305,7 @@ PluginsManager::loadInfo (Server* server, string& name, string& path)
     }
   else
     {
-      server->logWriteln (MYSERVER_LOG_MSG_ERROR,
+      server->log (MYSERVER_LOG_MSG_ERROR,
                           _("Error loading plugin %s, invalid plugin.xml"),
                           name.c_str ());
       delete xpathRes;
@@ -320,7 +320,7 @@ PluginsManager::loadInfo (Server* server, string& name, string& path)
 
   if (size != 1)
     {
-      server->logWriteln (MYSERVER_LOG_MSG_ERROR,
+      server->log (MYSERVER_LOG_MSG_ERROR,
                           _("Error loading plugin %s, invalid plugin.xml"),
                           name.c_str ());
       delete xpathRes;
@@ -344,7 +344,7 @@ PluginsManager::loadInfo (Server* server, string& name, string& path)
 
   if (size != 1)
     {
-      server->logWriteln (MYSERVER_LOG_MSG_ERROR,
+      server->log (MYSERVER_LOG_MSG_ERROR,
                           _("Error loading plugin %s, invalid plugin.xml"),
                           name.c_str ());
       delete xpathRes;
@@ -358,7 +358,7 @@ PluginsManager::loadInfo (Server* server, string& name, string& path)
     pinfo->setVersion (version);
   else
     {
-      server->logWriteln (MYSERVER_LOG_MSG_ERROR,
+      server->log (MYSERVER_LOG_MSG_ERROR,
                           _("Error loading plugin %s, invalid plugin.xml"),
                           name.c_str ());
       delete xpathRes;
@@ -381,7 +381,7 @@ PluginsManager::loadInfo (Server* server, string& name, string& path)
       if (!xmlHasProp (nodes->nodeTab[i], (const xmlChar*) "min-version") ||
           !xmlHasProp (nodes->nodeTab[i], (const xmlChar*) "max-version"))
         {
-          server->logWriteln (MYSERVER_LOG_MSG_ERROR,
+          server->log (MYSERVER_LOG_MSG_ERROR,
                               _("Error loading plugin %s, invalid plugin.xml"),
                               name.c_str ());
           delete xpathRes;
@@ -398,7 +398,7 @@ PluginsManager::loadInfo (Server* server, string& name, string& path)
 
       if (minVersion == -1 || maxVersion == -1)
         {
-          server->logWriteln (MYSERVER_LOG_MSG_ERROR,
+          server->log (MYSERVER_LOG_MSG_ERROR,
                               _("Error loading plugin %s, invalid plugin.xml"),
                               name.c_str ());
           delete xpathRes;
@@ -430,7 +430,7 @@ PluginsManager::preLoadPlugin (string& file, Server* server, bool global)
 
   if (plugin->preLoad (file, global))
     {
-      server->logWriteln (MYSERVER_LOG_MSG_ERROR,
+      server->log (MYSERVER_LOG_MSG_ERROR,
                           _("Error pre-loading plugin %s"),
                           file.c_str ());
       delete plugin;
@@ -442,7 +442,7 @@ PluginsManager::preLoadPlugin (string& file, Server* server, bool global)
     name.assign (namePtr);
   else
     {
-      server->logWriteln (MYSERVER_LOG_MSG_ERROR,
+      server->log (MYSERVER_LOG_MSG_ERROR,
                           _("Error pre-loading plugin %s"),
                           file.c_str ());
       delete plugin;
@@ -468,7 +468,7 @@ PluginsManager::recursiveDependencesFallDown (Server* server, string &name,
     {
       recursiveDependencesFallDown (server, *lit, remove, dependsOn);
 
-      server->logWriteln (MYSERVER_LOG_MSG_WARNING,
+      server->log (MYSERVER_LOG_MSG_WARNING,
                           _("Missing plugin dependence %s --> %s"),
                           name.c_str (), (*lit).c_str ());
     }
@@ -502,7 +502,7 @@ PluginsManager::load (Server *server)
       int msVersion = PluginInfo::convertVersion (&msversion);
       if (msVersion < pinfo->getMyServerMinVersion ()
           || msVersion > pinfo->getMyServerMaxVersion ())
-        server->logWriteln (MYSERVER_LOG_MSG_WARNING,
+        server->log (MYSERVER_LOG_MSG_WARNING,
                             _("Plugin %s not compatible with this version"),
                             name.c_str ());
       else
@@ -564,7 +564,7 @@ PluginsManager::load (Server *server)
           PluginInfo* dep = getPluginInfo (depN);
           if (!dep || remove.get (depN))
             {
-              server->logWriteln (MYSERVER_LOG_MSG_WARNING,
+              server->log (MYSERVER_LOG_MSG_WARNING,
                                   _("Missing plugin dependence %s --> %s"),
                                   dname.c_str (), depN.c_str ());
               recursiveDependencesFallDown (server, dname, remove, dependsOn);
@@ -577,7 +577,7 @@ PluginsManager::load (Server *server)
               || dep->getVersion () > pdep->second)
             {
               recursiveDependencesFallDown (server, dname, remove, dependsOn);
-              server->logWriteln (MYSERVER_LOG_MSG_WARNING,
+              server->log (MYSERVER_LOG_MSG_WARNING,
                             _("Plugin %s not compatible with this version"),
                             dname.c_str ());
               break;
@@ -611,7 +611,7 @@ PluginsManager::postLoad (Server *server)
       if (plugin)
         {
           plugin->postLoad (server);
-          server->logWriteln (MYSERVER_LOG_MSG_INFO,
+          server->log (MYSERVER_LOG_MSG_INFO,
                               _("Plugin %s loaded"),
                               (*it)->getName ().c_str ());
         }
diff --git a/myserver/src/protocol/http/http.cpp b/myserver/src/protocol/http/http.cpp
index 77dfcfb..bb96053 100644
--- a/myserver/src/protocol/http/http.cpp
+++ b/myserver/src/protocol/http/http.cpp
@@ -987,7 +987,7 @@ int Http::controlConnection (ConnectionPtr a, char* /*b1*/, char* /*b2*/,
                   errMsg.assign ("Invalid virtual host requested from ");
                   errMsg.append (a->getIpAddr ());
 
-                  Server::getInstance ()->logWriteln (errMsg.c_str (), MYSERVER_LOG_MSG_ERROR);
+                  Server::getInstance ()->log (errMsg.c_str (), MYSERVER_LOG_MSG_ERROR);
 
                   raiseHTTPError (400);
                   /*
diff --git a/myserver/src/server/clients_thread.cpp b/myserver/src/server/clients_thread.cpp
index 0629f37..e191201 100644
--- a/myserver/src/server/clients_thread.cpp
+++ b/myserver/src/server/clients_thread.cpp
@@ -184,12 +184,12 @@ DEFINE_THREAD(clients_thread, pParam)
         }
       catch (bad_alloc &ba)
         {
-          ct->server->logWriteln (MYSERVER_LOG_MSG_ERROR, _("Bad alloc: %s"),
+          ct->server->log (MYSERVER_LOG_MSG_ERROR, _("Bad alloc: %s"),
                                   ba.what ());
         }
       catch (exception &e)
         {
-          ct->server->logWriteln (MYSERVER_LOG_MSG_ERROR, _("Error : %s"),
+          ct->server->log (MYSERVER_LOG_MSG_ERROR, _("Error : %s"),
                                   e.what ());
         };
   }
diff --git a/myserver/src/server/server.cpp b/myserver/src/server/server.cpp
index e008880..d627d46 100644
--- a/myserver/src/server/server.cpp
+++ b/myserver/src/server/server.cpp
@@ -150,7 +150,7 @@ int Server::checkConfigurationPaths ()
 
     if (copyConfigurationFromDefault ("myserver.xml"))
     {
-      logWriteln (MYSERVER_LOG_MSG_ERROR, _("Error loading configuration file"));
+      log (MYSERVER_LOG_MSG_ERROR, _("Error loading configuration file"));
       return -1;
     }
   }
@@ -161,7 +161,7 @@ int Server::checkConfigurationPaths ()
 
     if (copyConfigurationFromDefault ("MIMEtypes.xml"))
     {
-      logWriteln (MYSERVER_LOG_MSG_ERROR, _("Error loading MIME configuration file"));
+      log (MYSERVER_LOG_MSG_ERROR, _("Error loading MIME configuration file"));
       return -1;
     }
   }
@@ -172,7 +172,7 @@ int Server::checkConfigurationPaths ()
 
     if (copyConfigurationFromDefault ("virtualhosts.xml") != 0)
     {
-      logWriteln (MYSERVER_LOG_MSG_ERROR, _("Error loading virtual hosts configuration file"));
+      log (MYSERVER_LOG_MSG_ERROR, _("Error loading virtual hosts configuration file"));
       return -1;
     }
   }
@@ -229,7 +229,7 @@ int Server::loadLibraries ()
   gnutls_global_init ();
   if (Socket::startupSocketLib () != 0)
     {
-      logWriteln (MYSERVER_LOG_MSG_ERROR, _("Error loading the socket library"));
+      log (MYSERVER_LOG_MSG_ERROR, _("Error loading the socket library"));
       return 1;
     }
 
@@ -290,7 +290,7 @@ void Server::start (string &mainConf, string &mimeConf, string &vhostConf,
     if (loadLibraries ())
       return;
 
-    logWriteln (MYSERVER_LOG_MSG_INFO, _("Initializing server configuration..."));
+    log (MYSERVER_LOG_MSG_INFO, _("Initializing server configuration..."));
 
     if (!resetConfigurationPaths (mainConf, mimeConf, vhostConf, externPath))
       return;
@@ -306,7 +306,7 @@ void Server::start (string &mainConf, string &mimeConf, string &vhostConf,
     /* Initialize the SSL library.  */
     initializeSSL();
 
-    logWriteln (MYSERVER_LOG_MSG_INFO, _("Loading server configuration..."));
+    log (MYSERVER_LOG_MSG_INFO, _("Loading server configuration..."));
 
     if (postLoad ())
       return;
@@ -314,15 +314,15 @@ void Server::start (string &mainConf, string &mimeConf, string &vhostConf,
     setProcessPermissions ();
 
     if (getGid ()[0])
-      logWriteln (MYSERVER_LOG_MSG_INFO, _("Using gid: %s"), gid.c_str ());
+      log (MYSERVER_LOG_MSG_INFO, _("Using gid: %s"), gid.c_str ());
 
     if (getUid ()[0])
-      logWriteln (MYSERVER_LOG_MSG_INFO, _("Using uid: %s"), uid.c_str ());
+      log (MYSERVER_LOG_MSG_INFO, _("Using uid: %s"), uid.c_str ());
 
-    logWriteln (MYSERVER_LOG_MSG_INFO, _("Server is ready!"));
+    log (MYSERVER_LOG_MSG_INFO, _("Server is ready!"));
 
     if (logLocation.find ("console://") != string::npos)
-      logWriteln (MYSERVER_LOG_MSG_INFO, _("Press Ctrl-C to terminate its execution"));
+      log (MYSERVER_LOG_MSG_INFO, _("Press Ctrl-C to terminate its execution"));
 
     serverReady = true;
 
@@ -332,11 +332,11 @@ void Server::start (string &mainConf, string &mimeConf, string &vhostConf,
   }
   catch(bad_alloc &ba)
     {
-      logWriteln (MYSERVER_LOG_MSG_ERROR, _("Bad alloc: %s"), ba.what ());
+      log (MYSERVER_LOG_MSG_ERROR, _("Bad alloc: %s"), ba.what ());
     }
   catch(exception &e)
     {
-      logWriteln (MYSERVER_LOG_MSG_ERROR, _("Error: %s"), e.what ());
+      log (MYSERVER_LOG_MSG_ERROR, _("Error: %s"), e.what ());
     };
   this->terminate ();
   finalCleanup ();
@@ -358,7 +358,7 @@ int Server::postLoad ()
   memset (serverName, 0, HOST_NAME_MAX+1);
   Socket::gethostname (serverName, HOST_NAME_MAX);
 
-  logWriteln (MYSERVER_LOG_MSG_INFO, _("Host name: %s"), serverName);
+  log (MYSERVER_LOG_MSG_INFO, _("Host name: %s"), serverName);
 
   /* Find the IP addresses of the local machine.  */
   if (ipAddresses)
@@ -367,14 +367,14 @@ int Server::postLoad ()
 
   if (Socket::getLocalIPsList (*ipAddresses))
     {
-      logWriteln (MYSERVER_LOG_MSG_ERROR, _("Error reading IP list"));
+      log (MYSERVER_LOG_MSG_ERROR, _("Error reading IP list"));
       return -1;
     }
 
-  logWriteln (MYSERVER_LOG_MSG_INFO, _("IP: %s"), ipAddresses->c_str ());
+  log (MYSERVER_LOG_MSG_INFO, _("IP: %s"), ipAddresses->c_str ());
 
   /* Load the MIME types.  */
-  logWriteln (MYSERVER_LOG_MSG_INFO, _("Loading MIME types..."));
+  log (MYSERVER_LOG_MSG_INFO, _("Loading MIME types..."));
 
   if (mimeManager)
     delete mimeManager;
@@ -382,11 +382,11 @@ int Server::postLoad ()
   mimeManager = new MimeManager ();
 
   if (int nMIMEtypes = mimeManager->loadXML(mimeConfigurationFile->c_str ()))
-    logWriteln (MYSERVER_LOG_MSG_INFO, _("Using %i MIME types"), nMIMEtypes);
+    log (MYSERVER_LOG_MSG_INFO, _("Using %i MIME types"), nMIMEtypes);
   else
-    logWriteln (MYSERVER_LOG_MSG_ERROR, _("Error while loading MIME types"));
+    log (MYSERVER_LOG_MSG_ERROR, _("Error while loading MIME types"));
 
-  logWriteln (MYSERVER_LOG_MSG_INFO, _("Detected %i CPUs"), (int) getCPUCount ());
+  log (MYSERVER_LOG_MSG_INFO, _("Detected %i CPUs"), (int) getCPUCount ());
 
   connectionsScheduler.restart ();
 
@@ -418,15 +418,15 @@ int Server::postLoad ()
 
   for (u_long i = 0; i < nStaticThreads; i++)
     {
-      logWriteln (MYSERVER_LOG_MSG_INFO, _("Creating thread %i..."), (int) (i + 1));
+      log (MYSERVER_LOG_MSG_INFO, _("Creating thread %i..."), (int) (i + 1));
 
       if (addThread (true))
         {
-          logWriteln (MYSERVER_LOG_MSG_ERROR, _("Error while creating thread"));
+          log (MYSERVER_LOG_MSG_ERROR, _("Error while creating thread"));
           return -1;
         }
 
-      logWriteln (MYSERVER_LOG_MSG_INFO, _("Thread %i created"),  (int)(i + 1));
+      log (MYSERVER_LOG_MSG_INFO, _("Thread %i created"),  (int)(i + 1));
     }
 
 
@@ -448,7 +448,7 @@ void Server::loadPlugins ()
   authMethodFactory.addAuthMethod (xml, (AuthMethod*) xmlV);
 
   if (filtersFactory.insert ("gzip", Gzip::factory))
-    logWriteln (MYSERVER_LOG_MSG_ERROR, _("Error while loading plugins"));
+    log (MYSERVER_LOG_MSG_ERROR, _("Error while loading plugins"));
 
   Protocol *protocolsSet[] = {new HttpProtocol(),
                               new HttpsProtocol(),
@@ -536,11 +536,11 @@ void Server::mainLoop()
                       string beepStr (beep);
                       logManager->log (this, "MAINLOG", logLocation, beepStr);
                     }
-                  logWriteln (MYSERVER_LOG_MSG_INFO, _("Reloading MIME types"));
+                  log (MYSERVER_LOG_MSG_INFO, _("Reloading MIME types"));
 
                   getMimeManager ()->loadXML (getMIMEConfFile ());
 
-                  logWriteln (MYSERVER_LOG_MSG_INFO, _("Reloaded"));
+                  log (MYSERVER_LOG_MSG_INFO, _("Reloaded"));
 
                   mimeConfTime = mimeConfNow;
                 }
@@ -558,7 +558,7 @@ void Server::mainLoop()
                       logManager->log (this, "MAINLOG", logLocation, beepStr);
                     }
 
-                  logWriteln (MYSERVER_LOG_MSG_INFO, _("Rebooting..."));
+                  log (MYSERVER_LOG_MSG_INFO, _("Rebooting..."));
 
                   Socket::stopBlockingOperations (true);
 
@@ -589,7 +589,7 @@ void Server::mainLoop()
                     listenThreads.commitFastReboot ();
 
                   hostsConfTime = hostsConfTimeNow;
-                  logWriteln (MYSERVER_LOG_MSG_INFO, _("Reloaded"));
+                  log (MYSERVER_LOG_MSG_INFO, _("Reloaded"));
                 }
             }
         }//end  if (autoRebootEnabled)
@@ -780,7 +780,7 @@ void Server::stop ()
  */
 int Server::terminate ()
 {
-  logWriteln (MYSERVER_LOG_MSG_INFO, _("Stopping threads"));
+  log (MYSERVER_LOG_MSG_INFO, _("Stopping threads"));
 
   listenThreads.terminate ();
 
@@ -807,9 +807,9 @@ int Server::terminate ()
   /* Clear the home directories data.  */
   homeDir.clear ();
 
-  logWriteln (MYSERVER_LOG_MSG_INFO, _("Threads stopped"));
+  log (MYSERVER_LOG_MSG_INFO, _("Threads stopped"));
 
-  logWriteln (MYSERVER_LOG_MSG_INFO, _("Cleaning memory"));
+  log (MYSERVER_LOG_MSG_INFO, _("Cleaning memory"));
 
   freeHashedData ();
 
@@ -855,7 +855,7 @@ int Server::terminate ()
 
   nStaticThreads = 0;
 
-  logWriteln (MYSERVER_LOG_MSG_INFO, _("MyServer has stopped"));
+  log (MYSERVER_LOG_MSG_INFO, _("MyServer has stopped"));
 
   logManager->clear ();
 
@@ -1504,10 +1504,10 @@ void Server::setProcessPermissions ()
       ostringstream out;
 
       if (Process::setAdditionalGroups (0, 0))
-        logWriteln (MYSERVER_LOG_MSG_ERROR, _("Error setting additional groups"));
+        log (MYSERVER_LOG_MSG_ERROR, _("Error setting additional groups"));
 
       if (Process::setgid (gid.c_str ()))
-        logWriteln (MYSERVER_LOG_MSG_ERROR, _("Error setting gid"));
+        log (MYSERVER_LOG_MSG_ERROR, _("Error setting gid"));
 
       autoRebootEnabled = false;
     }
@@ -1521,7 +1521,7 @@ void Server::setProcessPermissions ()
     {
       ostringstream out;
       if (Process::setuid (uid.c_str ()))
-        logWriteln (MYSERVER_LOG_MSG_ERROR, _("Error setting uid"));
+        log (MYSERVER_LOG_MSG_ERROR, _("Error setting uid"));
 
       autoRebootEnabled = false;
     }
@@ -1563,7 +1563,7 @@ int Server::reboot ()
       logManager->log (this, "MAINLOG", logLocation, beepStr);
     }
 
-  logWriteln (MYSERVER_LOG_MSG_INFO, _("Rebooting"));
+  log (MYSERVER_LOG_MSG_INFO, _("Rebooting"));
 
   if (mustEndServer)
     return 0;
@@ -1586,7 +1586,7 @@ int Server::reboot ()
 
   serverReady = true;
 
-  logWriteln (MYSERVER_LOG_MSG_INFO, _("Restarted"));
+  log (MYSERVER_LOG_MSG_INFO, _("Restarted"));
 
   return 0;
 }
@@ -1740,7 +1740,7 @@ int Server::addThread (bool staticThread)
 
   if (ret)
     {
-      logWriteln (MYSERVER_LOG_MSG_ERROR, _("Error creating thread"));
+      log (MYSERVER_LOG_MSG_ERROR, _("Error creating thread"));
       return -1;
     }
 
@@ -1827,7 +1827,7 @@ int Server::countAvailableThreads ()
  * \see LogManager#log (void*, string, string, LoggingLeve, bool, va_list)
  * \return 0 on success, 1 on error.
  */
-int Server::logWriteln (LoggingLevel level, const char *fmt, ...)
+int Server::log (LoggingLevel level, const char *fmt, ...)
 {
   int failure = 0;
 
@@ -1850,9 +1850,9 @@ int Server::logWriteln (LoggingLevel level, const char *fmt, ...)
 /*!
  * Write a string to the log file and terminate the line.
  */
-int Server::logWriteln (char const* str, LoggingLevel level)
+int Server::log (char const* str, LoggingLevel level)
 {
-  return logWriteln (level, "%s", str);
+  return log (level, "%s", str);
 }
 
 /*!



commit 6fcef38af252b8a13b5101a284c5fbacf2334eb2
Author: Giuseppe Scrivano <gscrivano@gnu.org>
Date:   Sun Aug 23 12:43:46 2009 +0200

    Refactoring: rename any `getHashedData' to `getData'.

diff --git a/myserver/include/conf/mime/mime_manager.h b/myserver/include/conf/mime/mime_manager.h
index 96b35db..4e47d27 100644
--- a/myserver/include/conf/mime/mime_manager.h
+++ b/myserver/include/conf/mime/mime_manager.h
@@ -72,7 +72,7 @@ struct MimeRecord
 	int addFilter (const char*, bool acceptDuplicate = true);
 	~MimeRecord ();
 	void clear ();
-  const char* getHashedData(string &name);
+  const char* getData(string &name);
 };
 
 
diff --git a/myserver/include/conf/security/security_token.h b/myserver/include/conf/security/security_token.h
index 8236991..9a3ef30 100644
--- a/myserver/include/conf/security/security_token.h
+++ b/myserver/include/conf/security/security_token.h
@@ -51,7 +51,7 @@ public:
   SecurityToken();
   void reset();
 
-  const char* getHashedData (const char* name, int domains, const char *def = NULL);
+  const char* getData (const char* name, int domains, const char *def = NULL);
   NodeTree<string>* getNodeTree (string& key, int domains, NodeTree<string>* def = NULL);
 
 
diff --git a/myserver/include/conf/vhost/vhost.h b/myserver/include/conf/vhost/vhost.h
index 95b8ac2..c30064c 100644
--- a/myserver/include/conf/vhost/vhost.h
+++ b/myserver/include/conf/vhost/vhost.h
@@ -140,7 +140,7 @@ public:
   Vhost(LogManager* lm);
   ~Vhost();
 
-  const char* getHashedData (const char* name);
+  const char* getData (const char* name);
 
   NodeTree<string>* getNodeTree (string& key)
   {
diff --git a/myserver/include/protocol/http/http_thread_context.h b/myserver/include/protocol/http/http_thread_context.h
index ab3b477..dcde452 100755
--- a/myserver/include/protocol/http/http_thread_context.h
+++ b/myserver/include/protocol/http/http_thread_context.h
@@ -93,7 +93,7 @@ struct HttpThreadContext
 
 	const char* getVhostDir();
 	const char* getVhostSys();
-	const char* getHashedData (const char *name);
+	const char* getData (const char *name);
 };
 
 #endif
diff --git a/myserver/include/server/server.h b/myserver/include/server/server.h
index a7d92dc..5b0eb2f 100644
--- a/myserver/include/server/server.h
+++ b/myserver/include/server/server.h
@@ -83,7 +83,7 @@ public:
   int loadLibraries();
 
   CachedFileFactory* getCachedFiles();
-  const char* getHashedData(const char* name);
+  const char* getData(const char* name);
 
   void setGlobalData(const char* name, void* data);
   void* getGlobalData(const char* name);
diff --git a/myserver/src/conf/mime/mime_manager.cpp b/myserver/src/conf/mime/mime_manager.cpp
index a83e149..a680c1a 100644
--- a/myserver/src/conf/mime/mime_manager.cpp
+++ b/myserver/src/conf/mime/mime_manager.cpp
@@ -130,7 +130,7 @@ void MimeRecord::clear ()
 /*!
  * Get the value stored in the hash dictionary for the `name' key.
  */
-const char* MimeRecord::getHashedData(string &name)
+const char* MimeRecord::getData(string &name)
 {
   string *str = hashedData.get (name);
   if (str)
diff --git a/myserver/src/conf/security/security_token.cpp b/myserver/src/conf/security/security_token.cpp
index 098f1a8..b9af5c8 100644
--- a/myserver/src/conf/security/security_token.cpp
+++ b/myserver/src/conf/security/security_token.cpp
@@ -112,7 +112,7 @@ NodeTree<string>* SecurityToken::getNodeTree (string& key, int domains, NodeTree
  *\li Global security file.
  *\li Default value.
  */
-const char* SecurityToken::getHashedData (const char* name, int domains, const char *def)
+const char* SecurityToken::getData (const char* name, int domains, const char *def)
 {
   if (domains & MYSERVER_SECURITY_CONF)
   {
@@ -126,7 +126,7 @@ const char* SecurityToken::getHashedData (const char* name, int domains, const c
   if (mimeRecord && (domains & MYSERVER_MIME_CONF))
   {
     string strName (name);
-    const char *ret = mimeRecord->getHashedData (strName);
+    const char *ret = mimeRecord->getData (strName);
 
     if (ret)
       return ret;
@@ -134,7 +134,7 @@ const char* SecurityToken::getHashedData (const char* name, int domains, const c
 
   if (vhost && (domains & MYSERVER_VHOST_CONF))
   {
-    const char* ret = vhost->getHashedData (name);
+    const char* ret = vhost->getData (name);
 
     if (ret)
       return ret;
@@ -142,7 +142,7 @@ const char* SecurityToken::getHashedData (const char* name, int domains, const c
 
   if (server && (domains & MYSERVER_SERVER_CONF))
   {
-    const char* ret = server->getHashedData (name);
+    const char* ret = server->getData (name);
 
     if (ret)
       return ret;
diff --git a/myserver/src/conf/security/xml_validator.cpp b/myserver/src/conf/security/xml_validator.cpp
index bfb1869..5db26f0 100644
--- a/myserver/src/conf/security/xml_validator.cpp
+++ b/myserver/src/conf/security/xml_validator.cpp
@@ -42,7 +42,7 @@ SecurityCache* XmlValidator::getCache (SecurityToken *st)
 {
   if (!secCache)
   {
-    const char *data = st->getHashedData ("SECURITY_CACHE_NODES", MYSERVER_SERVER_CONF, NULL);
+    const char *data = st->getData ("SECURITY_CACHE_NODES", MYSERVER_SERVER_CONF, NULL);
 
     secCache = new SecurityCache ();
 
@@ -68,9 +68,9 @@ XmlParser* XmlValidator::getParser (SecurityToken* st)
   if (!cache)
     return NULL;
 
-  secName = st->getHashedData ("security.filename", MYSERVER_VHOST_CONF | MYSERVER_SERVER_CONF, ".security.xml");
+  secName = st->getData ("security.filename", MYSERVER_VHOST_CONF | MYSERVER_SERVER_CONF, ".security.xml");
 
-  u_long maxSize = atol (st->getHashedData ("security.max_size", MYSERVER_VHOST_CONF | MYSERVER_SERVER_CONF, "0"));
+  u_long maxSize = atol (st->getData ("security.max_size", MYSERVER_VHOST_CONF | MYSERVER_SERVER_CONF, "0"));
 
   return cache->getParser (*(st->getDirectory ()), *(st->getSysDirectory ()), false, secName);
 }
diff --git a/myserver/src/conf/vhost/vhost.cpp b/myserver/src/conf/vhost/vhost.cpp
index 083cc9f..83fb370 100644
--- a/myserver/src/conf/vhost/vhost.cpp
+++ b/myserver/src/conf/vhost/vhost.cpp
@@ -454,7 +454,7 @@ void Vhost::setRef (int n)
  * Get the value for name in the hash dictionary.
  * \param name The hashed entry key.
  */
-const char* Vhost::getHashedData (const char* name)
+const char* Vhost::getData (const char* name)
 {
   NodeTree<string> *s = hashedData.get(name);
 
diff --git a/myserver/src/http_handler/cgi/cgi.cpp b/myserver/src/http_handler/cgi/cgi.cpp
index 25b10d7..df68e9c 100644
--- a/myserver/src/http_handler/cgi/cgi.cpp
+++ b/myserver/src/http_handler/cgi/cgi.cpp
@@ -239,11 +239,11 @@ int Cgi::send (HttpThreadContext* td, const char* scriptpath,
   spi.cmdLine = cmdLine.str ();
   spi.cwd.assign (td->scriptDir);
 
-  spi.gid =  atoi (td->securityToken.getHashedData ("cgi.gid", MYSERVER_VHOST_CONF |
+  spi.gid =  atoi (td->securityToken.getData ("cgi.gid", MYSERVER_VHOST_CONF |
                                                     MYSERVER_MIME_CONF |
                                                     MYSERVER_SECURITY_CONF |
                                                     MYSERVER_SERVER_CONF, "0"));
-  spi.uid =  atoi (td->securityToken.getHashedData ("cgi.uid", MYSERVER_VHOST_CONF |
+  spi.uid =  atoi (td->securityToken.getData ("cgi.uid", MYSERVER_VHOST_CONF |
                                                     MYSERVER_MIME_CONF |
                                                     MYSERVER_SECURITY_CONF |
                                                     MYSERVER_SERVER_CONF, "0"));
diff --git a/myserver/src/http_handler/http_dir/http_dir.cpp b/myserver/src/http_handler/http_dir/http_dir.cpp
index 5c12254..d048d61 100644
--- a/myserver/src/http_handler/http_dir/http_dir.cpp
+++ b/myserver/src/http_handler/http_dir/http_dir.cpp
@@ -308,7 +308,7 @@ int HttpDir::send(HttpThreadContext* td,
   char sortType = 0;
   bool sortReverse = false;
   string linkPrefix;
-  const char *formatString = td->securityToken.getHashedData ("http.dir.format",
+  const char *formatString = td->securityToken.getData ("http.dir.format",
                                                               MYSERVER_SECURITY_CONF |
                                                               MYSERVER_VHOST_CONF |
                                                               MYSERVER_SERVER_CONF, "%f%t%s");
@@ -385,7 +385,7 @@ int HttpDir::send(HttpThreadContext* td,
       sort (files.begin(), files.end(), compareFileStructByName);
   }
 
-  browseDirCSSpath = td->securityToken.getHashedData ("http.dir.css",
+  browseDirCSSpath = td->securityToken.getData ("http.dir.css",
                                                       MYSERVER_SECURITY_CONF | MYSERVER_VHOST_CONF |
                                                       MYSERVER_SERVER_CONF, NULL);
 
diff --git a/myserver/src/http_handler/http_file/http_file.cpp b/myserver/src/http_handler/http_file/http_file.cpp
index 6263aab..98047fe 100644
--- a/myserver/src/http_handler/http_file/http_file.cpp
+++ b/myserver/src/http_handler/http_file/http_file.cpp
@@ -330,7 +330,7 @@ int HttpFile::send (HttpThreadContext* td, const char *filenamePath,
     /*
      * Use GZIP compression to send files bigger than GZIP threshold.
      */
-    const char *val = td->securityToken.getHashedData ("gzip.threshold",
+    const char *val = td->securityToken.getData ("gzip.threshold",
                                                        MYSERVER_SECURITY_CONF
                                                        | MYSERVER_VHOST_CONF
                                                        | MYSERVER_MIME_CONF
diff --git a/myserver/src/http_handler/isapi/isapi.cpp b/myserver/src/http_handler/isapi/isapi.cpp
index 3ff1119..518ef0b 100644
--- a/myserver/src/http_handler/isapi/isapi.cpp
+++ b/myserver/src/http_handler/isapi/isapi.cpp
@@ -705,7 +705,7 @@ BOOL Isapi::buildAllRawHeaders(HttpThreadContext* td,ConnectionPtr a,
 
   if(valLen + 30 < maxLen)
     valLen += sprintf(&ValStr[valLen], "SERVER_ADMIN:%s\n",
-                      td->securityToken.getHashedData ("server.admin", MYSERVER_VHOST_CONF |
+                      td->securityToken.getData ("server.admin", MYSERVER_VHOST_CONF |
                                                        MYSERVER_SERVER_CONF, ""));
   else if(valLen + 30 < maxLen)
     return 0;
diff --git a/myserver/src/http_handler/wincgi/wincgi.cpp b/myserver/src/http_handler/wincgi/wincgi.cpp
index 970c2da..7bd6e15 100644
--- a/myserver/src/http_handler/wincgi/wincgi.cpp
+++ b/myserver/src/http_handler/wincgi/wincgi.cpp
@@ -139,7 +139,7 @@ int WinCgi::send (HttpThreadContext* td, const char* scriptpath,
   DataFileHandle.writeToFile (buffer,26,&nbr);
 
   *td->secondaryBuffer << "Server Admin=" <<
-    td->securityToken.getHashedData ("server.admin", MYSERVER_VHOST_CONF |
+    td->securityToken.getData ("server.admin", MYSERVER_VHOST_CONF |
                                      MYSERVER_SERVER_CONF, "")<< "\r\n";
   DataFileHandle.writeToFile (buffer,td->secondaryBuffer->getLength(),&nbr);
 
diff --git a/myserver/src/protocol/control/control_protocol.cpp b/myserver/src/protocol/control/control_protocol.cpp
index ff65877..f90b6a1 100755
--- a/myserver/src/protocol/control/control_protocol.cpp
+++ b/myserver/src/protocol/control/control_protocol.cpp
@@ -109,26 +109,26 @@ int ControlProtocol::loadProtocol ()
 
   const char *data = 0;
 
-  data = Server::getInstance ()->getHashedData ("control.enabled");
+  data = Server::getInstance ()->getData ("control.enabled");
   if (data && (!strcmpi (data, "YES")))
     controlEnabled = 1;
   else
     controlEnabled = 0;
 
-  data = Server::getInstance ()->getHashedData ("control.admin");
+  data = Server::getInstance ()->getData ("control.admin");
   if (data)
     strncpy (tmpName, data, 64);
 
-  data = Server::getInstance ()->getHashedData ("control.password");
+  data = Server::getInstance ()->getData ("control.password");
   if (data)
     strncpy (tmpPassword, data, 64);
 
-  data = Server::getInstance ()->getHashedData ("control.admin.md5");
+  data = Server::getInstance ()->getData ("control.admin.md5");
   if (data)
     if (strcmpi (data, "YES") == 0)
       adminNameMD5ized = 1;
 
-  data = Server::getInstance ()->getHashedData ("control.password.md5");
+  data = Server::getInstance ()->getData ("control.password.md5");
   if (data)
     if (strcmpi (data, "YES") == 0)
       adminPasswordMD5ized = 1;
diff --git a/myserver/src/protocol/ftp/ftp.cpp b/myserver/src/protocol/ftp/ftp.cpp
index 51a0b2d..fa98a2c 100755
--- a/myserver/src/protocol/ftp/ftp.cpp
+++ b/myserver/src/protocol/ftp/ftp.cpp
@@ -397,27 +397,27 @@ int Ftp::loadProtocolstatic ()
   Server *server = Server::getInstance ();
 
   // allow anonymous access
-  const char *pData = server->getHashedData ("ftp.allow_anonymous");
+  const char *pData = server->getData ("ftp.allow_anonymous");
   if (pData != NULL)
     m_ballowAnonymous = strcmpi ("Yes", pData) == 0 ? true : false;
 
   // request password for anonymous
-  pData = server->getHashedData ("ftp.anonymous_need_pass");
+  pData = server->getData ("ftp.anonymous_need_pass");
   if (pData != NULL)
     m_bAnonymousNeedPass = strcmpi ("Yes", pData) == 0 ? true : false;
 
   // enable asyncronous cmds
-  pData = server->getHashedData ("ftp.allow_asynchronous_cmds");
+  pData = server->getData ("ftp.allow_asynchronous_cmds");
   if (pData != NULL)
     m_ballowAsynchronousCmds = strcmpi ("Yes", pData) == 0 ? true : false;
 
   // enable pipelining
-  pData = server->getHashedData ("ftp.allow_pipelining");
+  pData = server->getData ("ftp.allow_pipelining");
   if (pData != NULL)
     m_bEnablePipelining = strcmpi ("Yes", pData) == 0 ? true : false;
 
   // enable write commands
-  pData = server->getHashedData ("ftp.allow_store");
+  pData = server->getData ("ftp.allow_store");
   if (pData != NULL)
     m_bEnablestoreCmds = strcmpi ("Yes", pData) == 0 ? true : false;
 
@@ -603,7 +603,7 @@ void Ftp::retrstor (bool bretr, bool bappend, const std::string & sPath)
   FilesUtility::splitPath (sLocalPath, sLocalDir, sLocalFileName);
 
   /* The security file doesn't exist in any case.  */
-  const char *secName = td.st.getHashedData ("security.filename",
+  const char *secName = td.st.getData ("security.filename",
                                              MYSERVER_VHOST_CONF |
                                              MYSERVER_SERVER_CONF,
                                              ".security.xml");
@@ -1747,7 +1747,7 @@ Ftp::list (const std::string & sParam /*= ""*/ )
           return;
         }
 
-      const char *secName = td.st.getHashedData ("security.filename",
+      const char *secName = td.st.getData ("security.filename",
                                                  MYSERVER_VHOST_CONF |
                                                  MYSERVER_SERVER_CONF,
                                                  ".security.xml");
@@ -1985,7 +1985,7 @@ Ftp::nlst (const std::string & sParam /* = "" */ )
   MemBuf & secondaryBuffer = *td.secondaryBuffer;
   secondaryBuffer.setLength (0);
 
-  const char *secName = td.st.getHashedData ("security.filename",
+  const char *secName = td.st.getData ("security.filename",
 					     MYSERVER_VHOST_CONF |
 					     MYSERVER_SERVER_CONF,
 					     ".security.xml");
@@ -2272,7 +2272,7 @@ void Ftp::dele (const std::string & sPath)
   FilesUtility::splitPath (sLocalPath, sLocalDir, sLocalFileName);
 
   /* The security file doesn't exist in any case.  */
-  const char *secName = td.st.getHashedData ("security.filename",
+  const char *secName = td.st.getData ("security.filename",
                                              MYSERVER_VHOST_CONF |
                                              MYSERVER_SERVER_CONF,
                                              ".security.xml");
@@ -2402,7 +2402,7 @@ void Ftp::rnfr (const std::string & sPath)
   std::string sLocalDir, sLocalFileName;
   FilesUtility::splitPath (sLocalPath, sLocalDir, sLocalFileName);
 
-  const char *secName = td.st.getHashedData ("security.filename",
+  const char *secName = td.st.getData ("security.filename",
 					     MYSERVER_VHOST_CONF | MYSERVER_SERVER_CONF,
 					     ".security.xml");
 
@@ -2446,7 +2446,7 @@ void Ftp::Rnto (const std::string & sPath)
       return;
     }
 
-  const char *secName = td.st.getHashedData ("security.filename",
+  const char *secName = td.st.getData ("security.filename",
 					     MYSERVER_VHOST_CONF |
 					     MYSERVER_SERVER_CONF,
 					     ".security.xml");
@@ -2496,9 +2496,9 @@ int Ftp::checkRights (const std::string & suser, const std::string & sPass,
   td.st.setResource (&sFileName);
 
   AuthDomain auth (&td.st);
-  string validator (td.st.getHashedData ("sec.validator", MYSERVER_VHOST_CONF
+  string validator (td.st.getData ("sec.validator", MYSERVER_VHOST_CONF
                                          | MYSERVER_SERVER_CONF, "xml"));
-  string authMethod (td.st.getHashedData ("sec.auth_method", MYSERVER_VHOST_CONF
+  string authMethod (td.st.getData ("sec.auth_method", MYSERVER_VHOST_CONF
                                           | MYSERVER_SERVER_CONF, "xml"));
 
   SecurityDomain *domains[] = { &auth, NULL };
@@ -2523,7 +2523,7 @@ void Ftp::size (const std::string & sPath)
   FilesUtility::splitPath (sLocalPath, sLocalDir, sLocalFileName);
 
   /* The security file doesn't exist in any case.  */
-  const char *secName = td.st.getHashedData ("security.filename",
+  const char *secName = td.st.getData ("security.filename",
                                              MYSERVER_VHOST_CONF |
                                              MYSERVER_SERVER_CONF,
                                              ".security.xml");
diff --git a/myserver/src/protocol/http/env/env.cpp b/myserver/src/protocol/http/env/env.cpp
index 08bd0c8..04478e0 100644
--- a/myserver/src/protocol/http/env/env.cpp
+++ b/myserver/src/protocol/http/env/env.cpp
@@ -80,7 +80,7 @@ void Env::buildEnvironmentString(HttpThreadContext* td, char *cgiEnv,
   memCgi << end_str << "SERVER_PORT="<< portBuffer;
 
   memCgi << end_str << "SERVER_ADMIN=";
-  memCgi << td->securityToken.getHashedData ("server.admin",
+  memCgi << td->securityToken.getData ("server.admin",
                                              MYSERVER_VHOST_CONF |
                                              MYSERVER_SERVER_CONF, "");
 
diff --git a/myserver/src/protocol/http/http.cpp b/myserver/src/protocol/http/http.cpp
index 2f38639..77dfcfb 100644
--- a/myserver/src/protocol/http/http.cpp
+++ b/myserver/src/protocol/http/http.cpp
@@ -198,7 +198,7 @@ bool Http::allowMethod (const char *method)
 {
   char name[64];
   sprintf (name, "http.%s.allow", method);
-  const char *allow = td->securityToken.getHashedData (name,
+  const char *allow = td->securityToken.getData (name,
                                                        MYSERVER_VHOST_CONF |
                                                        MYSERVER_SERVER_CONF, "YES");
 
@@ -280,7 +280,7 @@ int Http::getFilePermissions (string& filename, string& directory, string& file,
 
       if (FilesUtility::isLink (td->filenamePath.c_str ()))
         {
-          const char *perm = td->securityToken.getHashedData ("symlinks.follow",
+          const char *perm = td->securityToken.getData ("symlinks.follow",
                               MYSERVER_VHOST_CONF | MYSERVER_SERVER_CONF, "NO");
 
           if (!perm || strcmpi (perm, "YES"))
@@ -330,9 +330,9 @@ int Http::getFilePermissions (string& filename, string& directory, string& file,
       AuthDomain auth (&(td->securityToken));
       HttpReqSecurityDomain httpReqSecDom (&(td->request));
 
-      string validator (td->securityToken.getHashedData ("sec.validator", MYSERVER_VHOST_CONF |
+      string validator (td->securityToken.getData ("sec.validator", MYSERVER_VHOST_CONF |
                                                          MYSERVER_SERVER_CONF, "xml"));
-      string authMethod (td->securityToken.getHashedData ("sec.auth_method", MYSERVER_VHOST_CONF |
+      string authMethod (td->securityToken.getData ("sec.auth_method", MYSERVER_VHOST_CONF |
                                                           MYSERVER_SERVER_CONF, "xml"));
 
 
@@ -341,7 +341,7 @@ int Http::getFilePermissions (string& filename, string& directory, string& file,
       Server::getInstance ()->getSecurityManager ()->getPermissionMask (&(td->securityToken),
                                                          domains, validator, authMethod);
 
-      const char *authType = td->securityToken.getHashedData ("http.auth",
+      const char *authType = td->securityToken.getData ("http.auth",
            MYSERVER_SECURITY_CONF | MYSERVER_VHOST_CONF | MYSERVER_SERVER_CONF);
       *permissions = td->securityToken.getMask ();
 
@@ -377,7 +377,7 @@ int Http::getFilePermissions (string& filename, string& directory, string& file,
       return 500;
     }
 
-  const char *tr = td->securityToken.getHashedData ("connection.throttling",
+  const char *tr = td->securityToken.getData ("connection.throttling",
                                                     MYSERVER_SECURITY_CONF |
                                                     MYSERVER_VHOST_CONF |
                                                     MYSERVER_SERVER_CONF);
@@ -1024,11 +1024,11 @@ int Http::controlConnection (ConnectionPtr a, char* /*b1*/, char* /*b2*/,
 
               if (documentRoot.length ())
                 {
-                  const char *useHomeDir = td->securityToken.getHashedData ("http.use_home_directory",
+                  const char *useHomeDir = td->securityToken.getData ("http.use_home_directory",
                                                    MYSERVER_VHOST_CONF | MYSERVER_SERVER_CONF, "YES");
 
 
-                  const char *homeDir = td->securityToken.getHashedData ("http.home_directory",
+                  const char *homeDir = td->securityToken.getData ("http.home_directory",
                                                    MYSERVER_VHOST_CONF | MYSERVER_SERVER_CONF,
                                                                          "public_html");
 
@@ -1058,7 +1058,7 @@ int Http::controlConnection (ConnectionPtr a, char* /*b1*/, char* /*b2*/,
            *virtual host A value of zero means no limit.
            */
           {
-            const char* val = td->securityToken.getHashedData ("MAX_CONNECTIONS",
+            const char* val = td->securityToken.getData ("MAX_CONNECTIONS",
                                                                MYSERVER_VHOST_CONF |
                                                                MYSERVER_SERVER_CONF, NULL);
 
@@ -1357,7 +1357,7 @@ int Http::raiseHTTPError (int ID)
       int useMessagesFiles = 1;
       HttpRequestHeader::Entry *host = td->request.other.get ("Host");
       HttpRequestHeader::Entry *connection = td->request.other.get ("Connection");
-      const char *useMessagesVal = td->securityToken.getHashedData ("http.use_error_file",
+      const char *useMessagesVal = td->securityToken.getData ("http.use_error_file",
                                                                     MYSERVER_VHOST_CONF |
                                                                     MYSERVER_SERVER_CONF, NULL);
 
@@ -1389,7 +1389,7 @@ int Http::raiseHTTPError (int ID)
       char errorName [32];
       sprintf (errorName, "http.error.file.%i", ID);
 
-      const char *defErrorFile = td->securityToken.getHashedData (errorName,
+      const char *defErrorFile = td->securityToken.getData (errorName,
                                                                   MYSERVER_SECURITY_CONF |
                                                                   MYSERVER_VHOST_CONF |
                                                                   MYSERVER_SERVER_CONF);
@@ -1451,7 +1451,7 @@ int Http::raiseHTTPError (int ID)
 
       /* Send only the header (and the body if specified).  */
       {
-        const char* value = td->securityToken.getHashedData ("http.error_body",
+        const char* value = td->securityToken.getData ("http.error_body",
                                                              MYSERVER_VHOST_CONF |
                                                              MYSERVER_SERVER_CONF, NULL);
 
@@ -1554,7 +1554,7 @@ Internal Server Error\n\
  */
 MimeRecord* Http::getMIME (string &filename)
 {
-  const char *handler = td->securityToken.getHashedData ("mime.handler",
+  const char *handler = td->securityToken.getData ("mime.handler",
                       MYSERVER_VHOST_CONF | MYSERVER_SERVER_CONF, NULL);
 
   if (staticHttp.allowVhostMime && td->connection->host->isMIME ())
@@ -1812,7 +1812,7 @@ int Http::loadProtocolStatic ()
   staticHttp.dynManagerList.addHttpManager ("ISAPI", new Isapi ());
   staticHttp.dynManagerList.addHttpManager ("PROXY", new Proxy ());
 
-  data = Server::getInstance ()->getHashedData ("vhost.allow_mime");
+  data = Server::getInstance ()->getData ("vhost.allow_mime");
   if (data)
     {
 
@@ -1821,7 +1821,7 @@ int Http::loadProtocolStatic ()
       else
         staticHttp.allowVhostMime = 0;
     }
-  data = Server::getInstance ()->getHashedData ("cgi.timeout");
+  data = Server::getInstance ()->getData ("cgi.timeout");
   if (data)
     {
       staticHttp.timeout = MYSERVER_SEC (atoi (data));
diff --git a/myserver/src/protocol/http/http_thread_context.cpp b/myserver/src/protocol/http/http_thread_context.cpp
index 6701d08..8630bfc 100755
--- a/myserver/src/protocol/http/http_thread_context.cpp
+++ b/myserver/src/protocol/http/http_thread_context.cpp
@@ -26,7 +26,7 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
  *is propagated to the virtual host, if it is defined.
  *\param name The key name to look for in the hash map.
  */
-const char* HttpThreadContext::getHashedData (const char *name)
+const char* HttpThreadContext::getData (const char *name)
 {
   Vhost *vh = (Vhost*)connection->host;
 
@@ -35,7 +35,7 @@ const char* HttpThreadContext::getHashedData (const char *name)
   if (ret)
     return ret->c_str ();
   else
-    return vh ? vh->getHashedData (name) : NULL;
+    return vh ? vh->getData (name) : NULL;
 }
 
 /*!
diff --git a/myserver/src/server/server.cpp b/myserver/src/server/server.cpp
index 97ea8cc..e008880 100644
--- a/myserver/src/server/server.cpp
+++ b/myserver/src/server/server.cpp
@@ -917,53 +917,53 @@ int Server::initialize ()
 
       string fullFg ("log_color." + *it + "_fg");
       string fullBg ("log_color." + *it + "_bg");
-      data = getHashedData (fullFg.c_str ());
+      data = getData (fullFg.c_str ());
       if (data)
         consoleColors[fg] = string (data);
 
-      data = getHashedData (fullBg.c_str ());
+      data = getData (fullBg.c_str ());
       if (data)
         consoleColors[bg] = string (data);
     }
 
   initLogManager ();
 
-  data = getHashedData ("server.buffer_size");
+  data = getData ("server.buffer_size");
   if (data)
     buffersize = secondaryBufferSize= (atol(data) > 81920) ?  atol(data) :  81920 ;
 
-  data = getHashedData ("server.connection_timeout");
+  data = getData ("server.connection_timeout");
   if (data)
     connectionTimeout = MYSERVER_SEC ((u_long)atol(data));
 
-  data = getHashedData ("server.static_threads");
+  data = getData ("server.static_threads");
   if (data)
     nStaticThreads = atoi(data);
 
-  data = getHashedData ("server.max_threads");
+  data = getData ("server.max_threads");
   if (data)
     nMaxThreads = atoi(data);
 
   /* Get the max connections number to allow.  */
-  data = getHashedData ("server.max_connections");
+  data = getData ("server.max_connections");
   if (data)
     maxConnections = atoi(data);
 
   /* Get the max connections number to accept.  */
-  data = getHashedData ("server.max_accepted_connections");
+  data = getData ("server.max_accepted_connections");
   if (data)
     maxConnectionsToAccept = atoi(data);
 
-  data = getHashedData ("server.connections_pool.size");
+  data = getData ("server.connections_pool.size");
   if (data)
     connectionsPool.init (atoi (data));
 
   /* Get the default throttling rate to use on connections.  */
-  data = getHashedData ("connection.throttling");
+  data = getData ("connection.throttling");
   if (data)
     throttlingRate = (u_long)atoi(data);
 
-  data = getHashedData ("server.max_log_size");
+  data = getData ("server.max_log_size");
   if (data)
     maxLogFileSize=(u_long)atol(data);
 
@@ -976,7 +976,7 @@ int Server::initialize ()
   else
     cachedFiles.initialize (1 << 23);
 
-  data = getHashedData ("server.temp_directory");
+  data = getData ("server.temp_directory");
   if (data)
     {
       string tmpPath (data);
@@ -986,33 +986,33 @@ int Server::initialize ()
   else
     FilesUtility::resetTmpPath ();
 
-  data = getHashedData ("server.max_file_cache");
+  data = getData ("server.max_file_cache");
   if (data)
     {
       u_long maxSize = (u_long)atol(data);
       cachedFiles.setMaxSize (maxSize);
     }
 
-  data = getHashedData ("server.min_file_cache");
+  data = getData ("server.min_file_cache");
   if (data)
     {
       u_long minSize = (u_long)atol(data);
       cachedFiles.setMinSize (minSize);
     }
 
-  data = getHashedData ("server.uid");
+  data = getData ("server.uid");
   if (data)
     uid.assign (data);
   else
     uid.assign ("");
 
-  data = getHashedData ("server.gid");
+  data = getData ("server.gid");
   if (data)
     gid.assign (data);
   else
     gid.assign ("");
 
-  data = getHashedData ("server.max_servers");
+  data = getData ("server.max_servers");
   if (data)
     {
       int maxServersProcesses = atoi(data);
@@ -1464,7 +1464,7 @@ int Server::freeHashedData ()
 /*!
  * Get the value for name in the hash dictionary.
  */
-const char* Server::getHashedData (const char* name)
+const char* Server::getData (const char* name)
 {
   NodeTree<string> *s = hashedData.get (name);
 



commit 5e9e52af4414077f8cdabc509c829146db17f4e2
Author: Giuseppe Scrivano <gscrivano@gnu.org>
Date:   Sun Aug 23 12:40:58 2009 +0200

    Remove log verbosity as a global server variable.

diff --git a/myserver/include/server/server.h b/myserver/include/server/server.h
index 667cf13..a7d92dc 100644
--- a/myserver/include/server/server.h
+++ b/myserver/include/server/server.h
@@ -124,10 +124,8 @@ public:
   }
 
   const char *getServerName();
-  u_long getVerbosity();
   int getMaxLogFileSize();
   int mustUseLogonOption();
-  void setVerbosity(u_long);
   void start(string &, string &, string &, string &);
   void stop();
   void finalCleanup();
@@ -221,7 +219,6 @@ private:
 
   LogManager* logManager;
   bool serverReady;
-  u_long verbosity;
   u_long throttlingRate;
   u_long buffersize;
   u_long secondaryBufferSize;
diff --git a/myserver/src/server/server.cpp b/myserver/src/server/server.cpp
index 7e4454e..97ea8cc 100644
--- a/myserver/src/server/server.cpp
+++ b/myserver/src/server/server.cpp
@@ -759,22 +759,6 @@ u_long Server::getNumTotalConnections ()
 }
 
 /*!
- * Get the verbosity value.
- */
-u_long Server::getVerbosity ()
-{
-  return verbosity;
-}
-
-/*!
- * Set the verbosity value.
- */
-void  Server::setVerbosity (u_long nv)
-{
-  verbosity=nv;
-}
-
-/*!
  * Return a home directory object.
  */
 HomeDir* Server::getHomeDir ()
@@ -912,7 +896,6 @@ int Server::initialize ()
   freeThreads = 0;
   connectionTimeout = MYSERVER_SEC (180);
   endServer = false;
-  verbosity = 1;
   purgeThreadsThreshold = 1;
   throttlingRate = 0;
   maxConnections = 0;
@@ -945,10 +928,6 @@ int Server::initialize ()
 
   initLogManager ();
 
-  data = getHashedData ("server.verbosity");
-  if (data)
-    verbosity = (u_long)atoi(data);
-
   data = getHashedData ("server.buffer_size");
   if (data)
     buffersize = secondaryBufferSize= (atol(data) > 81920) ?  atol(data) :  81920 ;



commit 72de355587d8e3beeb719a6053660abbd774d762
Author: Giuseppe Scrivano <gscrivano@gnu.org>
Date:   Sun Aug 23 10:48:55 2009 +0200

    Mass update: apply the emacs delete-trailing-whitespace function to every (.cpp|.h)$ file.

diff --git a/myserver/binaries/web/cgi-src/math_sum/math_sum.cpp b/myserver/binaries/web/cgi-src/math_sum/math_sum.cpp
index 7e8fba3..497b07b 100644
--- a/myserver/binaries/web/cgi-src/math_sum/math_sum.cpp
+++ b/myserver/binaries/web/cgi-src/math_sum/math_sum.cpp
@@ -8,18 +8,18 @@ int isNumber(char* s)
     if(!isdigit(s[i]))
       return 0;
   return 1;
-    
+
 }
 #ifdef WIN32
 extern "C" int EXPORTABLE myserver_main (char *cmd, MsCgiData* data)
 #else
 extern "C" int myserver_main (char *cmd, MsCgiData* data)
 #endif
-{     
+{
 	MscgiManager cm(data);
 
-	if(strlen (cmd) == 0)     
-	{  	
+	if(strlen (cmd) == 0)
+	{
 		cm.write("<?xml version=\"1.0\" encoding=\"UTF-8\"?>\r\n<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.1//EN\"\r\n\
 \"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd\">\r\n\
 <html xmlns=\"http://www.w3.org/1999/xhtml\" xml:lang=\"en\">\r\n\
@@ -29,9 +29,9 @@ extern "C" int myserver_main (char *cmd, MsCgiData* data)
 <br />\r\n<img src=\"/logo.png\" alt=\"\" style=\"border: 0px;\" />\r\n<br /><br />\r\n\
 <form action=\"math_sum.mscgi\" method=\"get\" enctype=\"text/plain\">\r\n\
 <div>\r\n<input type=\"text\" name=\"a\" size=\"20\" />\r\n<br /><br />\r\n+<br /><br />\r\n<input type=\"text\" name=\"b\" size=\"20\" />\r\n<br /><br />\r\n<input type=\"submit\" value=\"Compute!\" />\r\n</div>\r\n</form>\r\n<br />\r\n</div>\r\n</body>\r\n</html>");
-	}     
-	else     
-	{ 	
+	}
+	else
+	{
 		u_long dim = 120;
 		char lb[120];
 		int a = 0;
@@ -65,7 +65,7 @@ extern "C" int myserver_main (char *cmd, MsCgiData* data)
       tmp = cm.getParam("a");
       if (tmp && tmp[0] != '\0')
       {
-        if (strlen(tmp) > 11) 
+        if (strlen(tmp) > 11)
           tmp[11] = '\0';
         a = atoi(tmp);
         cm.write(tmp);
@@ -75,7 +75,7 @@ extern "C" int myserver_main (char *cmd, MsCgiData* data)
         cm.write("0");
       }
       cm.write(" + ");
-		
+
       tmp = cm.getParam("b");
 
       if (tmp && tmp[0] != '\0')
@@ -108,23 +108,23 @@ extern "C" int myserver_main (char *cmd, MsCgiData* data)
 		cm.write("(");
 		cm.getenv("HTTP_HOST", lb, &dim);
 		cm.write(lb);
-		
+
 		cm.write(")\r\n</div>\r\n</body>\r\n</html>");
 	}
      cm.clean();
-     return 0; 
-}  
+     return 0;
+}
 #ifdef WIN32
-BOOL APIENTRY DllMain( HANDLE,DWORD ul_reason_for_call,LPVOID) 
-{ 	
-	switch (ul_reason_for_call) 	
-	{ 	
-		case DLL_PROCESS_ATTACH: 	
-		case DLL_THREAD_ATTACH: 	
-		case DLL_THREAD_DETACH: 	
-		case DLL_PROCESS_DETACH: 		
-			break; 	
-	}    
-	return TRUE; 
+BOOL APIENTRY DllMain( HANDLE,DWORD ul_reason_for_call,LPVOID)
+{
+	switch (ul_reason_for_call)
+	{
+		case DLL_PROCESS_ATTACH:
+		case DLL_THREAD_ATTACH:
+		case DLL_THREAD_DETACH:
+		case DLL_PROCESS_DETACH:
+			break;
+	}
+	return TRUE;
 }
 #endif
diff --git a/myserver/binaries/web/cgi-src/post/post.cpp b/myserver/binaries/web/cgi-src/post/post.cpp
index 5a44ae6..844a3e4 100644
--- a/myserver/binaries/web/cgi-src/post/post.cpp
+++ b/myserver/binaries/web/cgi-src/post/post.cpp
@@ -11,7 +11,7 @@ extern "C" int EXPORTABLE myserver_main (char *cmd,MsCgiData* data)
   char *post = cm.postParam("T1");
 
   if(post == NULL)
-    {	
+    {
       cm.write("<?xml version=\"1.0\" encoding=\"UTF-8\"?>\r\n<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.1//EN\"\r\n\
 \"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd\">\r\n\
 <html xmlns=\"http://www.w3.org/1999/xhtml\" xml:lang=\"en\">\r\n\
@@ -42,14 +42,14 @@ extern "C" int EXPORTABLE myserver_main (char *cmd,MsCgiData* data)
 #ifdef WIN32
 BOOL APIENTRY DllMain( HANDLE,DWORD ul_reason_for_call,LPVOID)
 {
-	switch (ul_reason_for_call)	
+	switch (ul_reason_for_call)
     {
-		case DLL_PROCESS_ATTACH:	
-		case DLL_THREAD_ATTACH:	
-		case DLL_THREAD_DETACH:	
+		case DLL_PROCESS_ATTACH:
+		case DLL_THREAD_ATTACH:
+		case DLL_THREAD_DETACH:
 		case DLL_PROCESS_DETACH:
-      break;	
-    }   
+      break;
+    }
 	return TRUE;
 }
 #endif
diff --git a/myserver/include/base/base64/mime_utils.h b/myserver/include/base/base64/mime_utils.h
index 5ebd1af..3a97e57 100644
--- a/myserver/include/base/base64/mime_utils.h
+++ b/myserver/include/base/base64/mime_utils.h
@@ -44,6 +44,6 @@ public:
 	char* decode(char*in);
 	CQPUtils();
 	~CQPUtils();
-}; 
+};
 
 #endif
diff --git a/myserver/include/base/bitvec/bitvec.h b/myserver/include/base/bitvec/bitvec.h
index d59c14c..07e7c63 100644
--- a/myserver/include/base/bitvec/bitvec.h
+++ b/myserver/include/base/bitvec/bitvec.h
@@ -32,7 +32,7 @@ public:
 
   int find ();
 
-  /*! 
+  /*!
    * Set the value of a bit to 1.
    * \param i index of the bit to set.
    */
@@ -41,7 +41,7 @@ public:
     data[i / (sizeof (long int) * 8)] |= 1l << i % (sizeof (long int) * 8);
   }
 
-  /*! 
+  /*!
    * Set the value of a bit to 1.
    * \param i index of the bit to set.
    */
@@ -50,7 +50,7 @@ public:
     data[i / (sizeof (long int) * 8)] &= ~(1l << i % (sizeof (long int) * 8));
   }
 
-  /*! 
+  /*!
    * Get the value of the specified bit.
    * \param i index of the bit to get.
    */
@@ -64,7 +64,7 @@ public:
   {
     delete [] data;
   }
-  
+
   size_t getCapacity ()
   {
     return capacity;
diff --git a/myserver/include/base/dynamic_lib/dynamiclib.h b/myserver/include/base/dynamic_lib/dynamiclib.h
index a5ea966..024a0ca 100644
--- a/myserver/include/base/dynamic_lib/dynamiclib.h
+++ b/myserver/include/base/dynamic_lib/dynamiclib.h
@@ -22,7 +22,7 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 #include <string>
 
-extern "C" 
+extern "C"
 {
 #ifdef WIN32
 #include <direct.h>
diff --git a/myserver/include/base/file/file.h b/myserver/include/base/file/file.h
index 5960f74..44f1724 100644
--- a/myserver/include/base/file/file.h
+++ b/myserver/include/base/file/file.h
@@ -71,7 +71,7 @@ public:
   virtual int read(char* buffer, u_long len, u_long *nbr);
   virtual int write(const char* buffer, u_long len, u_long *nbw);
 
-  virtual int fastCopyToSocket (Socket *dest, u_long offset, 
+  virtual int fastCopyToSocket (Socket *dest, u_long offset,
                                 MemBuf *buf, u_long *nbw);
 
   int truncate (u_long size = 0);
diff --git a/myserver/include/base/files_cache/cached_file.h b/myserver/include/base/files_cache/cached_file.h
index a47ed7d..fca362b 100644
--- a/myserver/include/base/files_cache/cached_file.h
+++ b/myserver/include/base/files_cache/cached_file.h
@@ -47,7 +47,7 @@ public:
 	virtual int operator =(CachedFile);
 	virtual int close();
 
-  virtual int fastCopyToSocket (Socket *dest, u_long offset, 
+  virtual int fastCopyToSocket (Socket *dest, u_long offset,
                                 MemBuf *buf, u_long *nbw);
 
   virtual int write(const char* buffer, u_long len, u_long *nbw);
diff --git a/myserver/include/base/find_data/find_data.h b/myserver/include/base/find_data/find_data.h
index 132e010..b26c2bd 100644
--- a/myserver/include/base/find_data/find_data.h
+++ b/myserver/include/base/find_data/find_data.h
@@ -21,7 +21,7 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 # include "stdafx.h"
 
-extern "C" 
+extern "C"
 {
 # ifdef WIN32
 #  include <io.h>
@@ -55,8 +55,8 @@ using namespace std;
 #  define intptr_t int
 # endif
 
-class FindData 
-{ 
+class FindData
+{
 public:
   char * name;
   int attrib;
diff --git a/myserver/include/base/md5/md5.h b/myserver/include/base/md5/md5.h
index c6cf804..dfac789 100644
--- a/myserver/include/base/md5/md5.h
+++ b/myserver/include/base/md5/md5.h
@@ -6,12 +6,12 @@
  it under the terms of the GNU General Public License as published by
  the Free Software Foundation; either version 3 of the License, or
  (at your option) any later version.
- 
- This program is distributed in the hope that it will be useful, 
+
+ This program is distributed in the hope that it will be useful,
  but WITHOUT ANY WARRANTY; without even the implied warranty of
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  GNU General Public License for more details.
- 
+
  You should have received a copy of the GNU General Public License
  along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
diff --git a/myserver/include/base/mem_buff/mem_buff.h b/myserver/include/base/mem_buff/mem_buff.h
index d0b76e5..0a351fc 100644
--- a/myserver/include/base/mem_buff/mem_buff.h
+++ b/myserver/include/base/mem_buff/mem_buff.h
@@ -104,7 +104,7 @@ public:
 	u_int m_nSizeLimit; // The maximun size that the buffer can reached ; 0 if none
 	u_int m_nBlockLength; // Minimun size of new allocated blocks during addings
 						 // We assume that m_nBlockLength < m_nSizeLimit
- 
+
 	void hashMD5(const void* pAdr, u_int nSize);
 	void hashCRC(const void* pAdr, u_int nSize);
 	void hex(const void* pAdr, u_int nSize);
@@ -118,7 +118,7 @@ public:
 	void hashMD5(MemBuf& membuf);
 	void hashCRC(MemBuf& membuf);
 	void uintToStr(u_int i, char* pBufToUse, u_int nBufSize) ;
-	void xIntToStr(u_int i, int bNegative, char* pBufToUse, u_int nBufSize);	
+	void xIntToStr(u_int i, int bNegative, char* pBufToUse, u_int nBufSize);
 	void intToStr(int i, char* pBufToUse, u_int nBufSize);
 
 protected:
diff --git a/myserver/include/base/multicast/multicast.h b/myserver/include/base/multicast/multicast.h
index 5f2a587..3039657 100644
--- a/myserver/include/base/multicast/multicast.h
+++ b/myserver/include/base/multicast/multicast.h
@@ -26,10 +26,10 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #include <vector>
 using namespace std;
 
-template<typename MSG_TYPE, typename ARG_TYPE, typename RET_TYPE> 
+template<typename MSG_TYPE, typename ARG_TYPE, typename RET_TYPE>
 class MulticastRegistry;
 
-template<typename MSG_TYPE, typename ARG_TYPE, typename RET_TYPE> 
+template<typename MSG_TYPE, typename ARG_TYPE, typename RET_TYPE>
 class Multicast
 {
 public:
@@ -37,7 +37,7 @@ public:
 	virtual ~Multicast(){}
 };
 
-template<typename MSG_TYPE, typename ARG_TYPE, typename RET_TYPE> 
+template<typename MSG_TYPE, typename ARG_TYPE, typename RET_TYPE>
 class MulticastRegistry
 {
 public:
diff --git a/myserver/include/base/process/fork_server.h b/myserver/include/base/process/fork_server.h
index b7379cb..6f92b5e 100644
--- a/myserver/include/base/process/fork_server.h
+++ b/myserver/include/base/process/fork_server.h
@@ -47,7 +47,7 @@ class ForkServer
   int forkServerLoop (UnixSocket *socket);
 
   int executeProcess (StartProcInfo *spi, int flags,
-                      int *pid, int *port, 
+                      int *pid, int *port,
                       bool waitEnd = false);
 
   u_short getPort (){return port;}
diff --git a/myserver/include/base/process/process_server_manager.h b/myserver/include/base/process/process_server_manager.h
index 84a89fc..a071f74 100644
--- a/myserver/include/base/process/process_server_manager.h
+++ b/myserver/include/base/process/process_server_manager.h
@@ -39,8 +39,8 @@ public:
 	{
 		/*! Server executable path.  */
 		string path;
-		
-		union 
+
+		union
 		{
 			unsigned long fileHandle;
 			SocketHandle sock;
@@ -49,7 +49,7 @@ public:
 
 		Socket socket;
 		string host;
-		Process process; 
+		Process process;
 		u_short port;
 		struct ServerDomain* sd;
 		bool isLocal;
@@ -74,7 +74,7 @@ public:
 			clear = 0;
 		}
 	};
-	
+
 	ServerDomain* createDomain(const char* name);
 	ServerDomain* getDomain(const char* name);
 	void clear();
@@ -87,16 +87,16 @@ public:
 	void removeDomain(const char* domain);
 	int domainServers(const char* domain);
 	void load();
-	Server* runAndAddServer(const char* domain, const char* name, 
+	Server* runAndAddServer(const char* domain, const char* name,
                           int uid = 0, int gid = 0, u_short port = 0);
-	Server* addRemoteServer(const char* domain, const char* name, 
+	Server* addRemoteServer(const char* domain, const char* name,
 													const char* host, u_short port);
 private:
 	int maxServers;
 	int nServers;
   Mutex mutex;
 	HashMap<string, ServerDomain*> domains;
-  int runServer(Server* server, const char* path, int uid = 0, 
+  int runServer(Server* server, const char* path, int uid = 0,
                 int gid = 0, u_short port = 0);
 	void addServer(Server* server, const char* domain, const char* name);
 };
diff --git a/myserver/include/base/regex/myserver_regex.h b/myserver/include/base/regex/myserver_regex.h
index 7617a36..f2b4fb6 100644
--- a/myserver/include/base/regex/myserver_regex.h
+++ b/myserver/include/base/regex/myserver_regex.h
@@ -22,7 +22,7 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 # include "stdafx.h"
 
-extern "C" 
+extern "C"
 {
 # include <stdio.h>
 
@@ -52,14 +52,14 @@ public:
   ~Regex();
   int isCompiled();
   int compile(const char *pattern, int flags);
-  int exec(const char *string, size_t nmatch, regmatch_t matchptr [], 
+  int exec(const char *string, size_t nmatch, regmatch_t matchptr [],
 					 int eflags);
   void free();
 
   Regex(string const &pattern, int flags){Regex(pattern.c_str(), flags);}
   int compile(string const &str, int flags){
 		return compile(str.c_str(), flags );}
-  int exec(string const &str, size_t nmatch, regmatch_t matchptr [], 
+  int exec(string const &str, size_t nmatch, regmatch_t matchptr [],
 					 int eflags)
     {return exec(str.c_str(), nmatch, matchptr, eflags);}
 private:
diff --git a/myserver/include/base/socket/socket.h b/myserver/include/base/socket/socket.h
index 5d9ccf5..1dd7bbe 100644
--- a/myserver/include/base/socket/socket.h
+++ b/myserver/include/base/socket/socket.h
@@ -40,7 +40,7 @@ extern "C" {
 #include <sys/types.h>
 #include <sys/socket.h>
 #include <sys/ioctl.h>
-#include <netinet/in.h>  
+#include <netinet/in.h>
 #include <netdb.h>
 #include <stdio.h>
 #include <unistd.h>
diff --git a/myserver/include/base/socket/ssl_socket.h b/myserver/include/base/socket/ssl_socket.h
index f3b10d6..34af34e 100644
--- a/myserver/include/base/socket/ssl_socket.h
+++ b/myserver/include/base/socket/ssl_socket.h
@@ -34,7 +34,7 @@ extern "C" {
 #include <sys/types.h>
 #include <sys/socket.h>
 #include <sys/ioctl.h>
-#include <netinet/in.h>  
+#include <netinet/in.h>
 #include <netdb.h>
 #include <stdio.h>
 #include <unistd.h>
diff --git a/myserver/include/base/thread/thread.h b/myserver/include/base/thread/thread.h
index 7dd388d..b933a60 100755
--- a/myserver/include/base/thread/thread.h
+++ b/myserver/include/base/thread/thread.h
@@ -38,14 +38,14 @@ public:
   static void wait(u_long);
 	static ThreadID threadID();
 #ifdef WIN32
-	static int create(ThreadID*  thread, 
+	static int create(ThreadID*  thread,
              unsigned int (_stdcall *start_routine)(void *), void * arg);
 #endif
 #ifdef HAVE_PTHREAD
-	static int create(ThreadID*  thread, void * (*start_routine)(void *), 
+	static int create(ThreadID*  thread, void * (*start_routine)(void *),
                     void * arg);
 #endif
-	static void terminate();  
+	static void terminate();
 	static int join(ThreadID);
 };
 #endif
diff --git a/myserver/include/base/xml/xml_parser.h b/myserver/include/base/xml/xml_parser.h
index d55aa30..684c0a9 100644
--- a/myserver/include/base/xml/xml_parser.h
+++ b/myserver/include/base/xml/xml_parser.h
@@ -22,11 +22,11 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #include "stdafx.h"
 #include <include/base/file/file.h>
 #include <include/base/mem_buff/mem_buff.h>
-extern "C" 
+extern "C"
 {
 #include <libxml/xmlmemory.h>
 #include <libxml/parser.h>
-#include <libxml/tree.h> 
+#include <libxml/tree.h>
 #include <libxml/xpath.h>
 #include <libxml/xpathInternals.h>
 }
@@ -89,10 +89,10 @@ public:
   {
     setAttr(name.c_str(), value.c_str());
   };
-    
+
   void addLineFeed();
   time_t getLastModTime();
-  
+
   XmlXPathResult* evaluateXpath(string & path){return evaluateXpath(path.c_str());}
   XmlXPathResult* evaluateXpath(const char*);
   bool isXpathEnabled(){return useXpath;}
diff --git a/myserver/include/conf/security/security_cache.h b/myserver/include/conf/security/security_cache.h
index 58ff627..b349be9 100644
--- a/myserver/include/conf/security/security_cache.h
+++ b/myserver/include/conf/security/security_cache.h
@@ -7,7 +7,7 @@ it under the terms of the GNU General Public License as published by
 the Free Software Foundation; either version 3 of the License, or
 (at your option) any later version.
 
-This program is distributed in the hope that it will be useful, 
+This program is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 GNU General Public License for more details.
@@ -46,7 +46,7 @@ public:
 
   /////////OLD NASTY AND DISGUSTING.  TEMPORARY SOLUTION TO DON'T BREAK APIs////////////////////////////////////
   int getPermissionMask (SecurityToken* st){return 0;}
-  int getErrorFileName (const char *root, int error, 
+  int getErrorFileName (const char *root, int error,
                        const char* sysdirectory, string& out){return 0;}
 private:
 
diff --git a/myserver/include/conf/security/security_manager.h b/myserver/include/conf/security/security_manager.h
index fb41426..f181d7b 100644
--- a/myserver/include/conf/security/security_manager.h
+++ b/myserver/include/conf/security/security_manager.h
@@ -71,13 +71,13 @@ public:
   SecurityManager(ValidatorFactory*, AuthMethodFactory*);
   ~SecurityManager();
 
-  int getPermissionMask (SecurityToken* st, 
-                         SecurityDomain **domains, 
+  int getPermissionMask (SecurityToken* st,
+                         SecurityDomain **domains,
                          string& validator,
                          string& authMethod);
 
-  int getPermissionMask (SecurityToken* st, 
-                         list<SecurityDomain*> *domains, 
+  int getPermissionMask (SecurityToken* st,
+                         list<SecurityDomain*> *domains,
                          string& validator,
                          string& authMethod);
 
diff --git a/myserver/include/conf/security/security_token.h b/myserver/include/conf/security/security_token.h
index 7ea7b70..8236991 100644
--- a/myserver/include/conf/security/security_token.h
+++ b/myserver/include/conf/security/security_token.h
@@ -94,7 +94,7 @@ public:
   {
     return providedMask;
   }
-  
+
   string& getNeededPassword ()
   {
     return neededPassword;
@@ -155,7 +155,7 @@ public:
   {
     providedMask = p;
   }
-  
+
   void setNeededPassword (string& pw)
   {
     neededPassword.assign (pw);
@@ -211,7 +211,7 @@ private:
   int mask;
 
   /*!
-   *Password that the user should provide to have access. 
+   *Password that the user should provide to have access.
    *This is used in authorization schemes like the HTTP digest,
    *where the password is not sent in clear on the network.
    */
@@ -219,7 +219,7 @@ private:
 
   /*! The provided password is correct.  */
   bool authenticated;
- 
+
   /*! The obtained mask if password were correct.  */
   int providedMask;
 
diff --git a/myserver/include/conf/security/validator.h b/myserver/include/conf/security/validator.h
index a29817c..2d129a5 100644
--- a/myserver/include/conf/security/validator.h
+++ b/myserver/include/conf/security/validator.h
@@ -36,11 +36,11 @@ public:
   Validator ();
   virtual ~Validator ();
 
-  int getPermissionMask (SecurityToken* st, 
+  int getPermissionMask (SecurityToken* st,
                          SecurityDomain **domains,
                          AuthMethod* authMethod);
 
-  int getPermissionMask (SecurityToken* st, 
+  int getPermissionMask (SecurityToken* st,
                          list<SecurityDomain*> *domains,
                          AuthMethod* authMethod);
 
@@ -59,7 +59,7 @@ protected:
                           hashedDomains->put (name, domain);
                         }
 
-  int getPermissionMaskInt (SecurityToken* st, 
+  int getPermissionMaskInt (SecurityToken* st,
                             HashMap<string, SecurityDomain*> *hashedDomains,
                             AuthMethod* authMethod);
 };
diff --git a/myserver/include/conf/security/xml_validator.h b/myserver/include/conf/security/xml_validator.h
index a51b0fe..c9c9abd 100644
--- a/myserver/include/conf/security/xml_validator.h
+++ b/myserver/include/conf/security/xml_validator.h
@@ -47,24 +47,24 @@ public:
 
 private:
   XmlParser* getParser(SecurityToken* st);
-  bool doCondition (xmlNodePtr node, 
+  bool doCondition (xmlNodePtr node,
                     HashMap<string, SecurityDomain*> *hashedDomains);
 
-  void doReturn (xmlNodePtr node, 
-                 int *cmd, 
+  void doReturn (xmlNodePtr node,
+                 int *cmd,
                  HashMap<string, SecurityDomain*> *hashedDomains);
 
   void doDefine (xmlNodePtr node,
-                 SecurityToken *st, 
+                 SecurityToken *st,
                  HashMap<string, SecurityDomain*> *hashedDomains);
 
   void doPermission (xmlNodePtr node,
-                     SecurityToken *st, 
+                     SecurityToken *st,
                      HashMap<string, SecurityDomain*> *hashedDomains);
 
-  int computeXmlNode (xmlNodePtr node, 
-                      SecurityToken *st, 
-                      int *cmd, 
+  int computeXmlNode (xmlNodePtr node,
+                      SecurityToken *st,
+                      int *cmd,
                       HashMap<string, SecurityDomain*> *hashedDomains);
 
   int getPermissions (xmlAttr* attrs, xmlChar** user = NULL, xmlChar** password = NULL);
diff --git a/myserver/include/connections_scheduler/connections_scheduler.h b/myserver/include/connections_scheduler/connections_scheduler.h
index 8e138a9..f770457 100644
--- a/myserver/include/connections_scheduler/connections_scheduler.h
+++ b/myserver/include/connections_scheduler/connections_scheduler.h
@@ -67,7 +67,7 @@ public:
 
   struct DispatcherArg
   {
-    bool terminated; 
+    bool terminated;
     bool terminate;
     Mutex* mutex;
     event loopEvent;
@@ -123,6 +123,6 @@ private:
   DispatcherArg dispatcherArg;
   bool releasing;
 };
-                                   
+
 
 #endif
diff --git a/myserver/include/filter/filters_factory.h b/myserver/include/filter/filters_factory.h
index 3fcb63f..035b0d9 100644
--- a/myserver/include/filter/filters_factory.h
+++ b/myserver/include/filter/filters_factory.h
@@ -32,7 +32,7 @@ using namespace std;
 typedef Filter* (*FILTERCREATE)(const char* name);
 
 
-class FiltersFactory 
+class FiltersFactory
 {
 public:
 	class FiltersSource
@@ -44,9 +44,9 @@ public:
   int insert(const char*, FILTERCREATE ptr);
   int insert(const char*, FiltersSource* ptr);
   Filter *getFilter(const char*);
-  FiltersChain* chain(list<string> &l, Stream* out, u_long *nbw, 
+  FiltersChain* chain(list<string> &l, Stream* out, u_long *nbw,
 											int onlyNotModifiers = 0);
-  int chain(FiltersChain*, list<string> &l, Stream* out, u_long *nbw, 
+  int chain(FiltersChain*, list<string> &l, Stream* out, u_long *nbw,
              int onlyNotModifiers = 0);
   FiltersFactory();
   ~FiltersFactory();
diff --git a/myserver/include/http_handler/cgi/cgi.h b/myserver/include/http_handler/cgi/cgi.h
index 6baad47..77bbc16 100644
--- a/myserver/include/http_handler/cgi/cgi.h
+++ b/myserver/include/http_handler/cgi/cgi.h
@@ -34,10 +34,10 @@ public:
                     const char* exec = 0, bool execute = false,
                     bool onlyHeader = false);
 private:
-  int sendData (HttpThreadContext* td, Pipe &stdOutFile, FiltersChain& chain, 
+  int sendData (HttpThreadContext* td, Pipe &stdOutFile, FiltersChain& chain,
                 Process& cgiProc, int onlyHeader, bool nph);
-  int sendHeader (HttpThreadContext* td, Pipe &stdOutFile, FiltersChain& chain, 
-                  Process& cgiProc, int onlyHeader, bool nph, u_long procStartTime, 
+  int sendHeader (HttpThreadContext* td, Pipe &stdOutFile, FiltersChain& chain,
+                  Process& cgiProc, int onlyHeader, bool nph, u_long procStartTime,
                   bool keepalive, bool useChunks, int *ret);
 };
 #endif
diff --git a/myserver/include/http_handler/fastcgi/fastcgi.h b/myserver/include/http_handler/fastcgi/fastcgi.h
index 509b63e..c590e83 100644
--- a/myserver/include/http_handler/fastcgi/fastcgi.h
+++ b/myserver/include/http_handler/fastcgi/fastcgi.h
@@ -41,7 +41,7 @@ using namespace std;
  */
 #define FCGI_LISTENSOCK_FILENO 0
 
-typedef struct 
+typedef struct
 {
     unsigned char version;
     unsigned char type;
@@ -79,7 +79,7 @@ typedef struct
 #define FCGIUNKNOWN_TYPE       11
 #define FCGIMAXTYPE (FCGIUNKNOWN_TYPE)
 
-typedef struct 
+typedef struct
 {
     unsigned char roleB1;
     unsigned char roleB0;
@@ -87,7 +87,7 @@ typedef struct
     unsigned char reserved[5];
 } FcgiBeginRequestBody;
 
-typedef struct 
+typedef struct
 {
     FcgiHeader header;
     FcgiBeginRequestBody body;
@@ -105,7 +105,7 @@ typedef struct
 #define FCGIAUTHORIZER 2
 #define FCGIFILTER     3
 
-typedef struct 
+typedef struct
 {
     unsigned char appStatusB3;
     unsigned char appStatusB2;
@@ -115,7 +115,7 @@ typedef struct
     unsigned char reserved[3];
 } FcgiEndRequestBody;
 
-typedef struct 
+typedef struct
 {
     FcgiHeader header;
     FcgiEndRequestBody body;
@@ -129,13 +129,13 @@ typedef struct
 #define FCGIOVERLOADED       2
 #define FCGIUNKNOWN_ROLE     3
 
-typedef struct 
+typedef struct
 {
-    unsigned char type;    
+    unsigned char type;
     unsigned char reserved[7];
 } FcgiUnknownTypeBody;
 
-typedef struct 
+typedef struct
 {
     FcgiHeader header;
     FcgiUnknownTypeBody body;
@@ -174,9 +174,9 @@ private:
 	static int timeout;
 	static int initialized;
 
-  int handleHeader (FcgiContext* con, FiltersChain* chain, 
+  int handleHeader (FcgiContext* con, FiltersChain* chain,
                     bool *responseCompleted);
-  int sendData (FcgiContext* con, u_long dim, 
+  int sendData (FcgiContext* con, u_long dim,
                 u_long timeout, FiltersChain* chain,
                 bool *responseCompleted, int onlyHeader);
   int fastCgiRequest (FcgiContext* con, int id);
diff --git a/myserver/include/http_handler/http_dir/http_dir.h b/myserver/include/http_handler/http_dir/http_dir.h
index 98a608b..fbd69a9 100644
--- a/myserver/include/http_handler/http_dir/http_dir.h
+++ b/myserver/include/http_handler/http_dir/http_dir.h
@@ -52,7 +52,7 @@ private:
   static bool compareFileStructByTime (HttpDir::FileStruct i, HttpDir::FileStruct j);
   static bool compareFileStructBySize (HttpDir::FileStruct i, HttpDir::FileStruct j);
   void getFormattedSize(u_long bytes, string& out);
-  
+
   void generateHeader (MemBuf &out, char sortType, bool sortReverse, const char *formatString);
   void generateElement (MemBuf &out, FileStruct& fs, string &linkPrefix, const char *formatString);
 
diff --git a/myserver/include/http_handler/isapi/isapi.h b/myserver/include/http_handler/isapi/isapi.h
index 0bc3982..bd0ccdb 100644
--- a/myserver/include/http_handler/isapi/isapi.h
+++ b/myserver/include/http_handler/isapi/isapi.h
@@ -67,23 +67,23 @@ typedef LPVOID HCONN;
 
 
 
-typedef struct _HSE_VERSION_INFO 
+typedef struct _HSE_VERSION_INFO
 {
   DWORD dwExtensionVersion;
   CHAR lpszExtensionDesc[HSE_MAX_EXT_DLL_NAME_LEN];
 } HSE_VERSION_INFO, *LPHSE_VERSION_INFO;
 
-typedef struct _HSE_URL_MAPEX_INFO  
+typedef struct _HSE_URL_MAPEX_INFO
 {
-  CHAR   *lpszPath; 
+  CHAR   *lpszPath;
   DWORD  dwFlags;
-  DWORD  cchMatchingPath; 
-  DWORD  cchMatchingURL;  
+  DWORD  cchMatchingPath;
+  DWORD  cchMatchingURL;
   DWORD  dwReserved1;
   DWORD  dwReserved2;
 } HSE_URL_MAPEX_INFO, * LPHSE_URL_MAPEX_INFO;
 
-typedef struct _EXTENSION_CONTROL_BLOCK 
+typedef struct _EXTENSION_CONTROL_BLOCK
 {
   DWORD cbSize;
   DWORD dwVersion;
@@ -100,11 +100,11 @@ typedef struct _EXTENSION_CONTROL_BLOCK
   LPSTR lpszContentType;
   BOOL (WINAPI * GetServerVariable)(HCONN hConn, LPSTR lpszVariableName,
                                     LPVOID lpvBuffer, LPDWORD lpdwSize);
-  BOOL (WINAPI * WriteClient)(HCONN ConnID, LPVOID Buffer, LPDWORD lpdwBytes, 
+  BOOL (WINAPI * WriteClient)(HCONN ConnID, LPVOID Buffer, LPDWORD lpdwBytes,
                               DWORD dwReserved);
   BOOL (WINAPI * ReadClient)(HCONN ConnID, LPVOID lpvBuffer, LPDWORD lpdwSize);
-  BOOL (WINAPI * ServerSupportFunction)(HCONN hConn, DWORD dwHSERRequest, 
-                                        LPVOID lpvBuffer, LPDWORD lpdwSize, 
+  BOOL (WINAPI * ServerSupportFunction)(HCONN hConn, DWORD dwHSERRequest,
+                                        LPVOID lpvBuffer, LPDWORD lpdwSize,
                                         LPDWORD lpdwDataType);
 } EXTENSION_CONTROL_BLOCK, *LPEXTENSION_CONTROL_BLOCK;
 
@@ -129,7 +129,7 @@ typedef DWORD (WINAPI * PFN_HTTPEXTENSIONPROC)(EXTENSION_CONTROL_BLOCK *pECB);
 
 class Isapi  : public HttpDataHandler
 {
-public:  
+public:
 #ifdef WIN32
   static ConnTableRecord *HConnRecord(HCONN hConn);
   int Redirect(HttpThreadContext* td,ConnectionPtr a,char *URL);
@@ -139,7 +139,7 @@ public:
                                   LPVOID output, LPDWORD maxLen);
   static BOOL buildAllRawHeaders(HttpThreadContext* td,ConnectionPtr a,
                                  LPVOID output, LPDWORD maxLen);
-#endif  
+#endif
   Isapi();
   static Mutex *isapiMutex;
   virtual int load ();
@@ -155,12 +155,12 @@ private:
 #endif
 };
 
-#ifdef WIN32  
+#ifdef WIN32
 BOOL WINAPI ISAPI_ServerSupportFunctionExport(HCONN hConn, DWORD dwHSERRequest,
-                                              LPVOID lpvBuffer, LPDWORD lpdwSize, 
+                                              LPVOID lpvBuffer, LPDWORD lpdwSize,
                                               LPDWORD lpdwDataType);
 BOOL WINAPI ISAPI_ReadClientExport(HCONN hConn, LPVOID lpvBuffer, LPDWORD lpdwSize ) ;
-BOOL WINAPI ISAPI_WriteClientExport(HCONN hConn, LPVOID Buffer, LPDWORD lpdwBytes, 
+BOOL WINAPI ISAPI_WriteClientExport(HCONN hConn, LPVOID Buffer, LPDWORD lpdwBytes,
                                     DWORD dwReserved);
 BOOL WINAPI ISAPI_GetServerVariableExport(HCONN, LPSTR, LPVOID, LPDWORD);
 #endif
diff --git a/myserver/include/log/stream/log_stream.h b/myserver/include/log/stream/log_stream.h
index cf83313..14570d2 100644
--- a/myserver/include/log/stream/log_stream.h
+++ b/myserver/include/log/stream/log_stream.h
@@ -32,7 +32,7 @@ using namespace std;
 enum LoggingLevel
   {
     /* The MYSERVER_LOG_MSG_PLAIN is only used within the
-     * LogManager class to print new lines with normal text 
+     * LogManager class to print new lines with normal text
      * attributes over the ConsoleStream.
      */
     MYSERVER_LOG_MSG_PLAIN,
diff --git a/myserver/include/log/stream/socket_stream.h b/myserver/include/log/stream/socket_stream.h
index 4dddbff..f7cd2fb 100644
--- a/myserver/include/log/stream/socket_stream.h
+++ b/myserver/include/log/stream/socket_stream.h
@@ -28,7 +28,7 @@
 class SocketStream : public LogStream
 {
 public:
-  SocketStream (FiltersFactory* filtersFactory, 
+  SocketStream (FiltersFactory* filtersFactory,
                 u_long cycleLog,
                 Stream* outStream,
                 FiltersChain* filtersChain);
diff --git a/myserver/include/plugin/plugin_info.h b/myserver/include/plugin/plugin_info.h
index 3225643..95e3c16 100755
--- a/myserver/include/plugin/plugin_info.h
+++ b/myserver/include/plugin/plugin_info.h
@@ -37,46 +37,46 @@ class PluginInfo
 public:
 
     PluginInfo(string& name, bool enabled = 1, bool global = 0);
-	
+
 	~PluginInfo();
-	
+
 	bool isEnabled();
 	bool isGlobal();
-	
+
 	void addDependence(string, int minVersion, int maxVersion);
-	
+
 	int getVersion();
-	
+
 	void setVersion(int v);
-	
+
 	string getName();
-	
+
 	int getMyServerMinVersion();
-	
+
 	int getMyServerMaxVersion();
-	
+
 	int setMyServerMinVersion(int v);
-	
+
 	int setMyServerMaxVersion(int v);
-	
+
 	HashMap<string, pair<int,int>* >::Iterator begin(){return dependences.begin();}
 	HashMap<string, pair<int,int>* >::Iterator end(){return dependences.end();}
-	
+
 	void setPlugin(Plugin* plugin);
 	Plugin* getPlugin();
 	Plugin* removePlugin();
-	
+
 	void setEnabled(bool enabled);
-	
+
 	pair<int,int>* getDependence(string name);
-	
+
 	static int convertVersion(string* s);
-	
-	
-	
-  
-	
-private:	
+
+
+
+
+
+private:
 	string name;
 	bool enabled;
     bool global;
diff --git a/myserver/include/protocol/control/control_errors.h b/myserver/include/protocol/control/control_errors.h
index 773ffc3..3f6ff5c 100755
--- a/myserver/include/protocol/control/control_errors.h
+++ b/myserver/include/protocol/control/control_errors.h
@@ -24,16 +24,16 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
   /*! The request was accepted and served. */
-#define CONTROL_OK            100    
-  
+#define CONTROL_OK            100
+
   /*! A generic error was encountered. */
-#define CONTROL_ERROR         200    
+#define CONTROL_ERROR         200
 
   /*! An internal server error happened. */
-#define CONTROL_INTERNAL      201  
+#define CONTROL_INTERNAL      201
 
   /*! The Authorization was not accepted. */
-#define CONTROL_AUTH          202    
+#define CONTROL_AUTH          202
 
   /*! A malformed request was sent. */
 #define CONTROL_MALFORMED     203
diff --git a/myserver/include/protocol/ftp/ftp_common.h b/myserver/include/protocol/ftp/ftp_common.h
index de5a49d..fec113e 100644
--- a/myserver/include/protocol/ftp/ftp_common.h
+++ b/myserver/include/protocol/ftp/ftp_common.h
@@ -37,4 +37,4 @@ int getPortNo(const FtpHost &host);
 std::string getPortNo(unsigned int nport);
 std::string getHost(const FtpHost &host);
 
-#endif //__FTP_COMMON_H__ 
+#endif //__FTP_COMMON_H__
diff --git a/myserver/include/protocol/ftp/ftp_lexer.h b/myserver/include/protocol/ftp/ftp_lexer.h
index e85448f..87aef87 100644
--- a/myserver/include/protocol/ftp/ftp_lexer.h
+++ b/myserver/include/protocol/ftp/ftp_lexer.h
@@ -38,7 +38,7 @@
 #if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
 
 /* C99 says to define __STDC_LIMIT_MACROS before including stdint.h,
- * if you want the limit (max/min) macros for int types. 
+ * if you want the limit (max/min) macros for int types.
  */
 #ifndef __STDC_LIMIT_MACROS
 #define __STDC_LIMIT_MACROS 1
@@ -55,7 +55,7 @@ typedef uint32_t flex_uint32_t;
 typedef signed char flex_int8_t;
 typedef short int flex_int16_t;
 typedef int flex_int32_t;
-typedef unsigned char flex_uint8_t; 
+typedef unsigned char flex_uint8_t;
 typedef unsigned short int flex_uint16_t;
 typedef unsigned int flex_uint32_t;
 
@@ -193,7 +193,7 @@ struct yy_buffer_state
 
     int yy_bs_lineno; /**< The line count. */
     int yy_bs_column; /**< The column count. */
-    
+
 	/* Whether to try to fill the input buffer when we reach the
 	 * end of it.
 	 */
@@ -285,9 +285,9 @@ YYSTYPE * yyget_lval (yyscan_t yyscanner );
 void yyset_lval (YYSTYPE * yylval_param ,yyscan_t yyscanner );
 
        YYLTYPE *yyget_lloc (yyscan_t yyscanner );
-    
+
         void yyset_lloc (YYLTYPE * yylloc_param ,yyscan_t yyscanner );
-    
+
 /* Macros after this point can all be overridden by user definitions in
  * section 1.
  */
diff --git a/myserver/include/protocol/ftp/ftp_parser.h b/myserver/include/protocol/ftp/ftp_parser.h
index 3d0b19c..d43b69b 100644
--- a/myserver/include/protocol/ftp/ftp_parser.h
+++ b/myserver/include/protocol/ftp/ftp_parser.h
@@ -2,20 +2,20 @@
 /* A Bison parser, made by GNU Bison 2.4.1.  */
 
 /* Skeleton interface for Bison's Yacc-like parsers in C
-   
+
       Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
    Free Software Foundation, Inc.
-   
+
    This program 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 3 of the License, or
    (at your option) any later version.
-   
+
    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.
-   
+
    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
@@ -28,7 +28,7 @@
    special exception, which will cause the skeleton and the resulting
    Bison output files to be licensed under the GNU General Public
    License without this special exception.
-   
+
    This special exception was added by the Free Software Foundation in
    version 2.2 of Bison.  */
 
diff --git a/myserver/include/protocol/http/dyn_http_command.h b/myserver/include/protocol/http/dyn_http_command.h
index adb7cf2..6ae1a1b 100755
--- a/myserver/include/protocol/http/dyn_http_command.h
+++ b/myserver/include/protocol/http/dyn_http_command.h
@@ -29,15 +29,15 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #include <string>
 using namespace std;
 
-class DynamicHttpCommand 
+class DynamicHttpCommand
 {
 public:
   DynamicHttpCommand(string&);
   virtual ~DynamicHttpCommand();
   string getName();
   virtual int acceptData() = 0;
-  virtual int send(HttpThreadContext* context, ConnectionPtr lpconnection, 
-									 string& Uri, int systemrequest = 0, 
+  virtual int send(HttpThreadContext* context, ConnectionPtr lpconnection,
+									 string& Uri, int systemrequest = 0,
 									 int OnlyHeader = 0, int yetmapped = 0) = 0;
 private:
   string name;
diff --git a/myserver/include/protocol/http/dyn_http_command_manager.h b/myserver/include/protocol/http/dyn_http_command_manager.h
index 9a038d0..132f188 100755
--- a/myserver/include/protocol/http/dyn_http_command_manager.h
+++ b/myserver/include/protocol/http/dyn_http_command_manager.h
@@ -32,19 +32,19 @@ class DynamicHttpCommand;
 
 using namespace std;
 
-class DynHttpCommandManager 
+class DynHttpCommandManager
 {
 public:
   DynHttpCommandManager();
   virtual ~DynHttpCommandManager();
-  
+
   DynamicHttpCommand* getHttpCommand(string& name);
-  
+
   HashMap<string, DynamicHttpCommand*>::Iterator begin(){return dynamicHttpCommands.begin();}
   HashMap<string, DynamicHttpCommand*>::Iterator end(){return dynamicHttpCommands.end();}
-  
+
   void clear ();
-  
+
   void addHttpCommand(string& name, DynamicHttpCommand* httpCommand);
 
   void addHttpCommand(char* name, DynamicHttpCommand* httpCommand)
diff --git a/myserver/include/protocol/http/dyn_http_manager.h b/myserver/include/protocol/http/dyn_http_manager.h
index fa00380..0dc3dca 100755
--- a/myserver/include/protocol/http/dyn_http_manager.h
+++ b/myserver/include/protocol/http/dyn_http_manager.h
@@ -30,7 +30,7 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 using namespace std;
 
 
-class DynamicHttpManager 
+class DynamicHttpManager
 {
 public:
 	DynamicHttpManager();
diff --git a/myserver/include/protocol/http/http.h b/myserver/include/protocol/http/http.h
index f6f5c03..6ac1c98 100644
--- a/myserver/include/protocol/http/http.h
+++ b/myserver/include/protocol/http/http.h
@@ -104,8 +104,8 @@ public:
   int requestAuthorization();
 
   int sendHTTPResource(string& filename,
-                       int systemrequest = 0, 
-                       int onlyHeader = 0, 
+                       int systemrequest = 0,
+                       int onlyHeader = 0,
                        int yetMapped = 0);
 
   int putHTTPRESOURCE(string &filename,
@@ -150,7 +150,7 @@ public:
                      int systemrequest)
   {return getPath(td, filenamePath, filename.c_str(), systemrequest);}
 
-  static int getPath(HttpThreadContext* td, 
+  static int getPath(HttpThreadContext* td,
                      string& filenamePath,
                      const char *filename,
                      int systemrequest);
@@ -165,23 +165,23 @@ public:
   virtual char* registerName(char* out,int len){return registerNameImpl(out, len);}
 
   static char* registerNameImpl(char*, int len);
-  int controlConnection(ConnectionPtr a, 
-                        char *b1, 
-                        char *b2, 
-                        int bs1, 
-                        int bs2, 
-                        u_long nbtr, 
+  int controlConnection(ConnectionPtr a,
+                        char *b1,
+                        char *b2,
+                        int bs1,
+                        int bs2,
+                        u_long nbtr,
                         u_long id);
 
   static int loadProtocolStatic();
   static int unLoadProtocolStatic();
 
   u_long getTimeout ();
-  int preprocessHttpRequest(string& filename, int yetmapped, 
+  int preprocessHttpRequest(string& filename, int yetmapped,
                             int* permissions);
 
-  int getFilePermissions(string& filename, string& directory, 
-                         string& file, string &filenamePath, 
+  int getFilePermissions(string& filename, string& directory,
+                         string& file, string &filenamePath,
                          int yetmapped, int* permissions);
 
   static HttpStaticData* getStaticData();
@@ -235,7 +235,7 @@ public:
   {
     return Http::loadProtocolStatic ();
   }
-  
+
   virtual int unLoadProtocol ()
   {
     return Http::unLoadProtocolStatic ();
diff --git a/myserver/include/protocol/http/http_data_handler.h b/myserver/include/protocol/http/http_data_handler.h
index d714b80..80962a0 100644
--- a/myserver/include/protocol/http/http_data_handler.h
+++ b/myserver/include/protocol/http/http_data_handler.h
@@ -54,12 +54,12 @@ public:
                                       u_long realBufferSize,
                                       MemoryStream *tmpStream);
 
-	static int appendDataToHTTPChannel(HttpThreadContext* td, 
+	static int appendDataToHTTPChannel(HttpThreadContext* td,
                                      char* buffer,
                                      u_long size,
-                                     File* appendFile, 
+                                     File* appendFile,
                                      FiltersChain* chain,
-                                     bool append, 
+                                     bool append,
                                      bool useChunks);
 
 };
diff --git a/myserver/include/protocol/http/http_data_read.h b/myserver/include/protocol/http/http_data_read.h
index 985711b..a50cb11 100644
--- a/myserver/include/protocol/http/http_data_read.h
+++ b/myserver/include/protocol/http/http_data_read.h
@@ -61,7 +61,7 @@ public:
                                  u_long timeout,
                                  Stream* out,
                                  long maxChunks);
-  
+
 };
 
 #endif
diff --git a/myserver/include/protocol/http/http_headers.h b/myserver/include/protocol/http/http_headers.h
index 45570af..26f3a98 100755
--- a/myserver/include/protocol/http/http_headers.h
+++ b/myserver/include/protocol/http/http_headers.h
@@ -50,11 +50,11 @@ public:
 	static int buildHTTPRequestHeaderStruct (const char* input,
                                            u_long inputSize,
                                            u_long* nHeaderChars,
-                                           HttpRequestHeader *request, 
+                                           HttpRequestHeader *request,
                                            Connection* connection);
-  
-	static int buildHTTPResponseHeaderStruct (const char *input, 
-                                           HttpResponseHeader *response, 
+
+	static int buildHTTPResponseHeaderStruct (const char *input,
+                                           HttpResponseHeader *response,
                                            u_long* nbtr);
 
 	static int validHTTPRequest (const char*, u_long, u_long*, u_long*);
@@ -70,13 +70,13 @@ public:
 	static u_long buildHTTPRequestHeader (char*, HttpRequestHeader*);
 
 protected:
-  static int readReqAuthLine (HttpRequestHeader *request, 
-                              Connection *connection, 
+  static int readReqAuthLine (HttpRequestHeader *request,
+                              Connection *connection,
                               const char *token,
                               int *lenOut);
 
-  static int readReqRangeLine (HttpRequestHeader *request, 
-                               Connection *connection, 
+  static int readReqRangeLine (HttpRequestHeader *request,
+                               Connection *connection,
                                const char *token,
                                int *lenOut);
 };
diff --git a/myserver/include/protocol/http/http_request.h b/myserver/include/protocol/http/http_request.h
index f28dbe8..9c968df 100644
--- a/myserver/include/protocol/http/http_request.h
+++ b/myserver/include/protocol/http/http_request.h
@@ -51,7 +51,7 @@ struct HttpRequestHeader : public HttpHeader
 			name = new string();
 			value = new string();
 		}
-		
+
 		Entry(string& n, string& v)
 		{
 			name = new string();
@@ -65,29 +65,29 @@ struct HttpRequestHeader : public HttpHeader
 		{
 			delete name;
 			delete value;
-			
+
 		}
 
   };
-	string cmd;		
-	string ver;		
+	string cmd;
+	string ver;
 	string auth;
 	string contentLength;
 	string uri;
-	string uriOpts;		
-	char *uriOptsPtr;		
-	string rangeType;	
+	string uriOpts;
+	char *uriOptsPtr;
+	string rangeType;
 	u_long rangeByteBegin;
 	u_long rangeByteEnd;
 	int uriEndsWithSlash;
-	
+
 	/*! Digest authorization scheme stuff.  */
 	char digestRealm[48+1];
 	char digestOpaque[48+1];
 	char digestNonce[48+1];
 	char digestCnonce[48+1];
 	char digestUri[1024+1];
-	char digestMethod[16+1];		
+	char digestMethod[16+1];
 	char digestUsername[48+1];
 	char digestResponse[48+1];
 	char digestQop[16+1];
@@ -108,7 +108,7 @@ struct HttpRequestHeader : public HttpHeader
   HttpRequestHeader();
   ~HttpRequestHeader();
   void free();
- 
+
 };
 
 #endif
diff --git a/myserver/include/protocol/http/http_response.h b/myserver/include/protocol/http/http_response.h
index 4b5ec41..414f2bc 100644
--- a/myserver/include/protocol/http/http_response.h
+++ b/myserver/include/protocol/http/http_response.h
@@ -64,11 +64,11 @@ struct HttpResponseHeader : public HttpHeader
 			value = new string();
 		}
 
-		Entry(string& n, string& v) 
+		Entry(string& n, string& v)
 		{
 			name = new string();
 			value = new string();
-			
+
 			name->assign(n);
 			value->assign(v);
 		}
@@ -76,11 +76,11 @@ struct HttpResponseHeader : public HttpHeader
 		{
 			delete name;
 			delete value;
-			
+
 		}
   };
 	int httpStatus;
-	string ver;	
+	string ver;
 	string serverName;
 	string contentType;
 	string connection;
@@ -90,10 +90,10 @@ struct HttpResponseHeader : public HttpHeader
 	string errorType;
 	string lastModified;
 	string location;
-	string date;		
-	string dateExp;	
+	string date;
+	string dateExp;
 	string auth;
-	HashMap<string,HttpResponseHeader::Entry*> other;	
+	HashMap<string,HttpResponseHeader::Entry*> other;
   HttpResponseHeader();
   ~HttpResponseHeader();
 
diff --git a/myserver/include/protocol/http/http_thread_context.h b/myserver/include/protocol/http/http_thread_context.h
index 47921c5..ab3b477 100755
--- a/myserver/include/protocol/http/http_thread_context.h
+++ b/myserver/include/protocol/http/http_thread_context.h
@@ -51,7 +51,7 @@ class MimeRecord;
 struct HttpThreadContext
 {
 	int appendOutputs;
-  
+
   /*! Used by SSI and set by raiseHTTPError.  */
   int lastError;
 
diff --git a/myserver/include/protocol/https/https.h b/myserver/include/protocol/https/https.h
index f1e20a0..afc4dfa 100755
--- a/myserver/include/protocol/https/https.h
+++ b/myserver/include/protocol/https/https.h
@@ -76,7 +76,7 @@ public:
   {
     return Https::loadProtocolStatic(parser);
   }
-  
+
 	virtual int unLoadProtocol(XmlParser* parser)
   {
     return Https::unLoadProtocolStatic(parser);
diff --git a/myserver/include/protocol/protocol.h b/myserver/include/protocol/protocol.h
index d89da41..cabb96a 100755
--- a/myserver/include/protocol/protocol.h
+++ b/myserver/include/protocol/protocol.h
@@ -29,7 +29,7 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 /*!
  *This is the base class to derive other protocols implementations for the server.
  */
-class Protocol 
+class Protocol
 {
 public:
 	Protocol();
diff --git a/myserver/include/protocol/protocols_manager.h b/myserver/include/protocol/protocols_manager.h
index 9f88384..9f66cdf 100755
--- a/myserver/include/protocol/protocols_manager.h
+++ b/myserver/include/protocol/protocols_manager.h
@@ -30,7 +30,7 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 using namespace std;
 
-class ProtocolsManager 
+class ProtocolsManager
 {
 public:
 	ProtocolsManager();
diff --git a/myserver/src/base/base64/mime_utils.cpp b/myserver/src/base/base64/mime_utils.cpp
index 1d9ded1..fbcc4e9 100644
--- a/myserver/src/base/base64/mime_utils.cpp
+++ b/myserver/src/base/base64/mime_utils.cpp
@@ -20,7 +20,7 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #include <include/base/string/stringutils.h>
 #include <include/base/string/securestr.h>
 
-extern "C" 
+extern "C"
 {
 #include <stdio.h>
 #include <stdlib.h>
@@ -103,7 +103,7 @@ const char base64map[] =
 
 
 
-const char hexmap[] = 
+const char hexmap[] =
 {
   SKIP,   SKIP,   SKIP,   SKIP,   SKIP,   SKIP,   SKIP,   SKIP,
   SKIP,   SKIP,   SKIP,   SKIP,   SKIP,   SKIP,   SKIP,   SKIP,
@@ -141,7 +141,7 @@ const char hexmap[] =
 
 
 
-const char QpEncodeMap[] = 
+const char QpEncodeMap[] =
 {
     SKIP,   SKIP,   SKIP,   SKIP,   SKIP,   SKIP,   SKIP,   SKIP,
   SKIP,   SKIP,   NOSKIP,   SKIP,   SKIP,   NOSKIP,   SKIP,   SKIP,
@@ -239,7 +239,7 @@ char* CBase64Utils::mimeDecodeMailHeaderField(char *s)
       int sLen;
       int pos = static_cast<int>(strupos(s1, (char*) "?B?"));
       s1 += pos;
-      if (strlen(s1) < 4) return s; 
+      if (strlen(s1) < 4) return s;
       s1 += 3;
       sLen = static_cast<int>(strlen(s1));
       decodedText = bu.decode(s1, &sLen);
@@ -280,7 +280,7 @@ CBase64Utils::~CBase64Utils()
 char* CBase64Utils::encode(const char *input, int bufsize)
 {
   int alsize = ((bufsize * 4) / 3);
-  char *finalresult = (char*)calloc(alsize + ((alsize / 76) * 2) + 
+  char *finalresult = (char*)calloc(alsize + ((alsize / 76) * 2) +
                                     (10 * sizeof(char)), sizeof(char));
   int count = 0;
   int LineLen = 0;
@@ -470,12 +470,12 @@ CQPUtils::~CQPUtils()
 char* CQPUtils::decode(char *input)
 {
   char *s = input;
-  char *finalresult = (char*)calloc(strlen(input) + sizeof(char), 
+  char *finalresult = (char*)calloc(strlen(input) + sizeof(char),
                                     sizeof(char));
   char *result = finalresult;
   while (*s != '\0')
   {
-    if (*s == '=') 
+    if (*s == '=')
     {
       int i;
       for (i = 0; i < 3; i++)
@@ -529,7 +529,7 @@ char* CQPUtils::decode(char *input)
 
 
 
-char* CQPUtils::expandBuffer(char *buffer, int UsedSize, int *BufSize, 
+char* CQPUtils::expandBuffer(char *buffer, int UsedSize, int *BufSize,
                              int Singlechar)
 {
   int AddVal;
@@ -548,7 +548,7 @@ char* CQPUtils::encode(char *input)
 {
   int BufSize = static_cast<int>(strlen(input) + BufAdd);
   int UsedSize = 0;
-  int LineLen = 0; 
+  int LineLen = 0;
   char *finalresult = (char*)calloc(BufSize, sizeof(char));
   char *fresult = finalresult;
   char *s = input;
diff --git a/myserver/src/base/file/file.cpp b/myserver/src/base/file/file.cpp
index ac4f2f7..1f599c7 100644
--- a/myserver/src/base/file/file.cpp
+++ b/myserver/src/base/file/file.cpp
@@ -170,7 +170,7 @@ int File::openFile (const char* nfilename,u_long opt)
 
   if (opt & File::TEMPORARY)
   {
-    openFlag |= FILE_ATTRIBUTE_TEMPORARY; 
+    openFlag |= FILE_ATTRIBUTE_TEMPORARY;
     attributeFlag |= FILE_FLAG_DELETE_ON_CLOSE;
   }
   if (opt & File::HIDDEN)
@@ -235,7 +235,7 @@ int File::openFile (const char* nfilename,u_long opt)
 
   return handle < 0;
 #endif
-  
+
   return 0;
 }
 
@@ -293,12 +293,12 @@ const char *File::getFilename()
  *\param filename The new temporary file name.
  */
 int File::createTemporaryFile(const char* filename)
-{ 
+{
   if (FilesUtility::fileExists(filename))
     FilesUtility::deleteFile(filename);
 
-  return openFile(filename, File::READ | 
-                  File::WRITE| 
+  return openFile(filename, File::READ |
+                  File::WRITE|
                   File::FILE_CREATE_ALWAYS |
                   File::TEMPORARY |
                   File::NO_INHERIT);
diff --git a/myserver/src/base/file/files_utility.cpp b/myserver/src/base/file/files_utility.cpp
index 03eba95..56be830 100644
--- a/myserver/src/base/file/files_utility.cpp
+++ b/myserver/src/base/file/files_utility.cpp
@@ -199,15 +199,15 @@ int FilesUtility::copyFile (File& src, File& dest)
     return -1;
 #endif
 
-  for (;;) 
+  for (;;)
   {
     ret = src.read (buffer, 4096, &nbr);
     if (ret)
       return -1;
-    
+
     if (!nbr)
       break;
-    
+
     ret = dest.writeToFile (buffer, nbr, &nbw);
     if (ret)
       return -1;
diff --git a/myserver/src/base/files_cache/cached_file.cpp b/myserver/src/base/files_cache/cached_file.cpp
index 555854f..880dae4 100644
--- a/myserver/src/base/files_cache/cached_file.cpp
+++ b/myserver/src/base/files_cache/cached_file.cpp
@@ -141,7 +141,7 @@ int CachedFile::read (char* buffer, u_long buffersize, u_long* nbr)
  *\param filename The new temporary file name.
  */
 int CachedFile::createTemporaryFile (const char* filename)
-{ 
+{
   return -1;
 }
 
@@ -190,9 +190,9 @@ int CachedFile::write (const char* buffer, u_long len, u_long *nbw)
  *\param buf Temporary buffer that can be used by this function.
  *\param nbw Number of bytes sent.
  */
-int CachedFile::fastCopyToSocket (Socket *dest, u_long firstByte, 
+int CachedFile::fastCopyToSocket (Socket *dest, u_long firstByte,
                                   MemBuf *buf, u_long *nbw)
 {
-  return dest->write (&(this->buffer->getBuffer()[firstByte]), 
+  return dest->write (&(this->buffer->getBuffer()[firstByte]),
                       buffer->getFileSize() - firstByte, nbw);
 }
diff --git a/myserver/src/base/find_data/find_data.cpp b/myserver/src/base/find_data/find_data.cpp
index a33d86e..511b593 100644
--- a/myserver/src/base/find_data/find_data.cpp
+++ b/myserver/src/base/find_data/find_data.cpp
@@ -137,9 +137,9 @@ int FindData::findnext ()
 #else
    struct dirent * dirInfo;
    string tempName;
-      
+
    dirInfo = readdir (dh);
-   
+
    if (dirInfo == NULL)
      return -1;
 
diff --git a/myserver/src/base/hash_map/hash_map.cpp b/myserver/src/base/hash_map/hash_map.cpp
index b7eae02..4dd1aa4 100644
--- a/myserver/src/base/hash_map/hash_map.cpp
+++ b/myserver/src/base/hash_map/hash_map.cpp
@@ -937,7 +937,7 @@ ValueType HashMap<string, ValueType>::get(const string& key)
 {
   unsigned int tempHash;
   typename list < Shkv<string, ValueType> >::iterator dataIter;
-  
+
   tempHash=hash(key.c_str(), key.size());
   if(map[tempHash & mask]>=offset)
   {
diff --git a/myserver/src/base/home_dir/home_dir.cpp b/myserver/src/base/home_dir/home_dir.cpp
index fc3c93f..0bc94fb 100755
--- a/myserver/src/base/home_dir/home_dir.cpp
+++ b/myserver/src/base/home_dir/home_dir.cpp
@@ -110,7 +110,7 @@ int HomeDir::load ()
 {
   int ret;
   loadMutex.lock ();
-  
+
   ret = loadImpl ();
 
   loadMutex.unlock ();
@@ -158,7 +158,7 @@ int HomeDir::loadImpl ()
       return 1;
     }
 
-  buffer = new char[size+1]; 
+  buffer = new char[size+1];
 
   usersFile.read (buffer, size, &read);
   buffer[read] = '\0';
diff --git a/myserver/src/base/md5/md5.cpp b/myserver/src/base/md5/md5.cpp
index 1f43559..4d1f061 100644
--- a/myserver/src/base/md5/md5.cpp
+++ b/myserver/src/base/md5/md5.cpp
@@ -5,12 +5,12 @@
  it under the terms of the GNU General Public License as published by
  the Free Software Foundation; either version 3 of the License, or
  (at your option) any later version.
- 
- This program is distributed in the hope that it will be useful, 
+
+ This program is distributed in the hope that it will be useful,
  but WITHOUT ANY WARRANTY; without even the implied warranty of
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  GNU General Public License for more details.
- 
+
  You should have received a copy of the GNU General Public License
  along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
@@ -85,7 +85,7 @@ void Md5::update(unsigned char const *buf, unsigned long len)
     bytes[1]++;  /* Carry from low to high */
 
   t = 64 - (t & 0x3f);  /* Space available in in (at least 1) */
-  if (t > len) 
+  if (t > len)
   {
     memcpy((unsigned char *)in + 64 - t, buf, len);
     return;
@@ -98,7 +98,7 @@ void Md5::update(unsigned char const *buf, unsigned long len)
   len -= t;
 
   /* Process data in 64-byte chunks */
-  while (len >= 64) 
+  while (len >= 64)
   {
     memcpy(in, buf, 64);
     byteSwap(in, 16);
@@ -112,7 +112,7 @@ void Md5::update(unsigned char const *buf, unsigned long len)
 }
 
 /*!
- *Final wrapup - pad to 64-byte boundary with the bit pattern 
+ *Final wrapup - pad to 64-byte boundary with the bit pattern
  *1 0* (64-bit count of bits processed, MSB-first)
  */
 void Md5::final(unsigned char digest[16])
@@ -151,7 +151,7 @@ void Md5::final(unsigned char digest[16])
   for(i = 0; i < 2; i++)
     bytes[i] = 0;
 
-  for(i = 0; i < 16; i++) 
+  for(i = 0; i < 16; i++)
     in[i] = 0;
 
 }
@@ -280,11 +280,11 @@ char* Md5::end(char *buf)
   long i;
   unsigned char digest[16];
   static const char hex[]="0123456789abcdef";
-  
+
   if (!buf)
     return 0;
   final(digest);
-  for ( i = 0; i < 16; i++) 
+  for ( i = 0; i < 16; i++)
   {
     buf[(i << 1)] = hex[digest[i] >> 4];
     buf[(i << 1) + 1] = hex[digest[i] & 0x0f];
diff --git a/myserver/src/base/mem_buff/mem_buff.cpp b/myserver/src/base/mem_buff/mem_buff.cpp
index 05b21a6..5d0a79a 100644
--- a/myserver/src/base/mem_buff/mem_buff.cpp
+++ b/myserver/src/base/mem_buff/mem_buff.cpp
@@ -591,20 +591,20 @@ MemBuf::~MemBuf()
   if(m_buffer != NULL && m_bCanDelete)
     mem_free(m_buffer);
 }
-  
-void MemBuf::addBuffer(MemBuf *nmb) 
+
+void MemBuf::addBuffer(MemBuf *nmb)
 {
   addBuffer(nmb->m_buffer, nmb->m_nSize);
 }
 
 /*! free used memory */
-int MemBuf::free() 
+int MemBuf::free()
 {
-  if(m_buffer != NULL && m_bCanDelete) 
+  if(m_buffer != NULL && m_bCanDelete)
   {
-    mem_free(m_buffer); 
-    m_buffer = NULL; 
-    m_nSize = m_nRealSize = 0; 
+    mem_free(m_buffer);
+    m_buffer = NULL;
+    m_nSize = m_nRealSize = 0;
     return 0;
   }
   return 1;
@@ -617,19 +617,19 @@ u_int MemBuf::getRealLength()
   return m_nRealSize;
 }
 
-u_int MemBuf::find(MemBuf *smb, u_int start) 
+u_int MemBuf::find(MemBuf *smb, u_int start)
 {
   return find(smb->m_buffer, smb->m_nSize, start);
 }
-char& MemBuf::getAt(u_int nIndex) 
+char& MemBuf::getAt(u_int nIndex)
 {
 #ifdef ASSERT
-  ASSERT(m_buffer != NULL); 
-  ASSERT(nIndex <= m_nSize); 
+  ASSERT(m_buffer != NULL);
+  ASSERT(nIndex <= m_nSize);
 #endif
   return *(m_buffer + nIndex);
 }
-char& MemBuf::operator[](u_int nIndex) 
+char& MemBuf::operator[](u_int nIndex)
 {
   return getAt(nIndex);
 }
@@ -639,12 +639,12 @@ u_int MemBuf::getLength()
   return m_nSize;
 }
 
-int MemBuf::isValid() 
+int MemBuf::isValid()
 {
   return ((m_nSize != 0) || (m_buffer != NULL))?1:0;
 }
 
-char* MemBuf::getBuffer() 
+char* MemBuf::getBuffer()
 {
   return ( char*) m_buffer;
 }
@@ -653,71 +653,71 @@ MemBuf::operator const void*()
 {
   return (const void*) m_buffer;
 }
-MemBuf MemBuf::operator+ (MemBuf& src) 
-{  
-  MemBuf temp(*this); 
-  temp.addBuffer(&src); 
+MemBuf MemBuf::operator+ (MemBuf& src)
+{
+  MemBuf temp(*this);
+  temp.addBuffer(&src);
   return temp;
 }
-MemBuf MemBuf::operator+ (const char* src) 
+MemBuf MemBuf::operator+ (const char* src)
 {
-  MemBuf temp(*this); 
-  temp.addBuffer((const void*) src, (u_int)strlen(src)); 
+  MemBuf temp(*this);
+  temp.addBuffer((const void*) src, (u_int)strlen(src));
   return temp;
 }
-const MemBuf& MemBuf::operator+= (MemBuf& add) 
+const MemBuf& MemBuf::operator+= (MemBuf& add)
 {
-  addBuffer(&add); 
+  addBuffer(&add);
   return *this;
 }
-const MemBuf& MemBuf::operator+= (const char* pStr) 
+const MemBuf& MemBuf::operator+= (const char* pStr)
 {
-  addBuffer(pStr, (u_int)strlen(pStr)); 
+  addBuffer(pStr, (u_int)strlen(pStr));
   return *this;
 }
-const MemBuf& MemBuf::operator+= (char c) 
+const MemBuf& MemBuf::operator+= (char c)
 {
-  addBuffer(&c, 1); 
+  addBuffer(&c, 1);
   return *this;
 }
-MemBuf& MemBuf::operator<< (const char* pSrc) 
+MemBuf& MemBuf::operator<< (const char* pSrc)
 {
-  addBuffer(pSrc, (u_int)strlen(pSrc)); 
+  addBuffer(pSrc, (u_int)strlen(pSrc));
   return *this;
 }
-MemBuf& MemBuf::operator<< (int i) 
+MemBuf& MemBuf::operator<< (int i)
 {
-  addBuffer(&i, 4); 
+  addBuffer(&i, 4);
   return *this;
 }
-MemBuf& MemBuf::operator<< (unsigned int i) 
+MemBuf& MemBuf::operator<< (unsigned int i)
 {
-  addBuffer(&i, 4); 
+  addBuffer(&i, 4);
   return *this;
 }
-MemBuf& MemBuf::operator<< (long i) 
+MemBuf& MemBuf::operator<< (long i)
 {
-  addBuffer(&i, 4); 
+  addBuffer(&i, 4);
   return *this;
 }
-MemBuf& MemBuf::operator<< (unsigned long i) 
+MemBuf& MemBuf::operator<< (unsigned long i)
 {
-  addBuffer(&i, 4); 
+  addBuffer(&i, 4);
   return *this;
 }
-MemBuf& MemBuf::operator<< (char c) 
+MemBuf& MemBuf::operator<< (char c)
 {
-  addBuffer(&c, 1); 
+  addBuffer(&c, 1);
   return *this;
 }
-MemBuf& MemBuf::operator<< (unsigned char c) 
+MemBuf& MemBuf::operator<< (unsigned char c)
 {
-  addBuffer(&c, 1); 
+  addBuffer(&c, 1);
   return *this;
 }
-MemBuf& MemBuf::operator<< (const  MemBuf &src) 
+MemBuf& MemBuf::operator<< (const  MemBuf &src)
 {
-  addBuffer(src.m_buffer, src.m_nSize); 
+  addBuffer(src.m_buffer, src.m_nSize);
   return *this;
 }
 MemBuf& MemBuf::operator<< (const string &src)
@@ -727,38 +727,38 @@ MemBuf& MemBuf::operator<< (const string &src)
 }
 MemBuf& MemBuf::operator=(const MemBuf& src)
 {
-  setBuffer(src.m_buffer, src.m_nRealSize); 
+  setBuffer(src.m_buffer, src.m_nRealSize);
   return *this;
 }
-MemBuf& MemBuf::operator=(const char* src) 
+MemBuf& MemBuf::operator=(const char* src)
 {
-  setBuffer((const void*) src, (u_int)strlen(src) + 1); 
+  setBuffer((const void*) src, (u_int)strlen(src) + 1);
   return* this;
 }
-  
-void MemBuf::uintToStr(u_int i) 
+
+void MemBuf::uintToStr(u_int i)
 {
   xIntToStr(i, 0);
 }
 
-void MemBuf::uintToStr(u_int i, char* pBufToUse, u_int nBufSize) 
+void MemBuf::uintToStr(u_int i, char* pBufToUse, u_int nBufSize)
 {
   xIntToStr(i, 0, pBufToUse, nBufSize);
 }
 
 void MemBuf::intToStr(int i)
 {
-  if (i < 0) 
-    xIntToStr( (u_int)(-i), 1); 
-  else 
+  if (i < 0)
+    xIntToStr( (u_int)(-i), 1);
+  else
     xIntToStr( (u_int) i, 0);
 }
 
-void MemBuf::intToStr(int i, char* pBufToUse, u_int nBufSize) 
+void MemBuf::intToStr(int i, char* pBufToUse, u_int nBufSize)
 {
-  if (i < 0) 
-    xIntToStr((u_int)(-i), 1, pBufToUse, nBufSize); 
-  else 
+  if (i < 0)
+    xIntToStr((u_int)(-i), 1, pBufToUse, nBufSize);
+  else
     xIntToStr((u_int) i, 0, pBufToUse, nBufSize);
 }
 
@@ -766,11 +766,11 @@ void MemBuf::hex(MemBuf& membuf)
 {
   hex(membuf.m_buffer, membuf.m_nSize);
 }
-void MemBuf::hashMD5(MemBuf& membuf) 
+void MemBuf::hashMD5(MemBuf& membuf)
 {
   hashMD5(membuf.m_buffer, membuf.m_nSize);
 }
-void MemBuf::hashCRC(MemBuf& membuf) 
+void MemBuf::hashCRC(MemBuf& membuf)
 {
   hashCRC(membuf.m_buffer, membuf.m_nSize);
 }
@@ -780,7 +780,7 @@ void MemBuf::allocBuffer(u_int size)
   if(size > m_nRealSize || m_buffer == NULL)
   {
     free();
-    m_buffer = mem_alloc(size); 
+    m_buffer = mem_alloc(size);
     m_nRealSize = size;
   }
 }
diff --git a/myserver/src/base/multicast/multicast.cpp b/myserver/src/base/multicast/multicast.cpp
index acc39b2..771814a 100644
--- a/myserver/src/base/multicast/multicast.cpp
+++ b/myserver/src/base/multicast/multicast.cpp
@@ -21,7 +21,7 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 /*!
  *Register the handler for the specified message type.
  */
-template<typename MSG_TYPE, typename ARG_TYPE, typename RET_TYPE> 
+template<typename MSG_TYPE, typename ARG_TYPE, typename RET_TYPE>
 void MulticastRegistry<MSG_TYPE, ARG_TYPE, RET_TYPE>::addMulticast(MSG_TYPE msg, Multicast<MSG_TYPE, ARG_TYPE, RET_TYPE>* handler)
 {
   vector<Multicast<MSG_TYPE, ARG_TYPE, RET_TYPE>*> *msgHandlers = handlers.get(msg);
@@ -37,7 +37,7 @@ void MulticastRegistry<MSG_TYPE, ARG_TYPE, RET_TYPE>::addMulticast(MSG_TYPE msg,
 /*!
  *Remove the handler from the vector for a message type.
  */
-template<typename MSG_TYPE, typename ARG_TYPE, typename RET_TYPE> 
+template<typename MSG_TYPE, typename ARG_TYPE, typename RET_TYPE>
 void MulticastRegistry<MSG_TYPE, ARG_TYPE, RET_TYPE>::removeMulticast(MSG_TYPE msg, Multicast<MSG_TYPE, ARG_TYPE, RET_TYPE>* handler)
 {
   vector<Multicast<MSG_TYPE, ARG_TYPE, RET_TYPE>*> *msgHandlers = handlers.get(msg);
@@ -46,7 +46,7 @@ void MulticastRegistry<MSG_TYPE, ARG_TYPE, RET_TYPE>::removeMulticast(MSG_TYPE m
   {
     return;
   }
-  
+
   for(it = msgHandlers->begin(); it != msgHandlers->end(); it++)
     if(*it == handler)
     {
@@ -58,7 +58,7 @@ void MulticastRegistry<MSG_TYPE, ARG_TYPE, RET_TYPE>::removeMulticast(MSG_TYPE m
 /*!
  *Remove all the handlers for a specified message.
  */
-template<typename MSG_TYPE, typename ARG_TYPE, typename RET_TYPE> 
+template<typename MSG_TYPE, typename ARG_TYPE, typename RET_TYPE>
 void MulticastRegistry<MSG_TYPE, ARG_TYPE, RET_TYPE>::removeMulticasts(MSG_TYPE msg)
 {
   vector<Multicast<MSG_TYPE, ARG_TYPE, RET_TYPE>*> *msgHandlers = handlers.remove(msg);
@@ -71,7 +71,7 @@ void MulticastRegistry<MSG_TYPE, ARG_TYPE, RET_TYPE>::removeMulticasts(MSG_TYPE
 /*!
  *Notify the message to all the registered handlers passing an argument.
  */
-template<typename MSG_TYPE, typename ARG_TYPE, typename RET_TYPE> 
+template<typename MSG_TYPE, typename ARG_TYPE, typename RET_TYPE>
 void MulticastRegistry<MSG_TYPE, ARG_TYPE, RET_TYPE>::notifyMulticast(MSG_TYPE& msg, ARG_TYPE arg)
 {
   vector<Multicast<MSG_TYPE, ARG_TYPE, RET_TYPE>*> *msgHandlers = handlers.get(msg);
@@ -90,7 +90,7 @@ void MulticastRegistry<MSG_TYPE, ARG_TYPE, RET_TYPE>::notifyMulticast(MSG_TYPE&
 /*!
  *Get the vector of handlers for a specified message.
  */
-template<typename MSG_TYPE, typename ARG_TYPE, typename RET_TYPE> 
+template<typename MSG_TYPE, typename ARG_TYPE, typename RET_TYPE>
 vector<Multicast<MSG_TYPE, ARG_TYPE, RET_TYPE>*>* MulticastRegistry<MSG_TYPE, ARG_TYPE, RET_TYPE>::getHandlers(MSG_TYPE& msg)
 {
   return handlers.get(msg);
diff --git a/myserver/src/base/process/fork_server.cpp b/myserver/src/base/process/fork_server.cpp
index a60bf5a..05b846c 100644
--- a/myserver/src/base/process/fork_server.cpp
+++ b/myserver/src/base/process/fork_server.cpp
@@ -75,7 +75,7 @@ int ForkServer::writeInt (Socket *socket, int num)
 int ForkServer::readInt (Socket *sock, int *dest)
 {
   u_long nbr;
-  
+
   if (sock->read ((char*)dest, 4, &nbr) || nbr < 4)
     {
       return -1;
@@ -97,7 +97,7 @@ int ForkServer::readString (Socket *sock, char **out)
 {
   int len;
   u_long nbr;
-  
+
   if (sock->read ((char*)&len, 4, &nbr) || nbr < 4)
     {
       return -1;
@@ -109,7 +109,7 @@ int ForkServer::readString (Socket *sock, char **out)
   if (len && (sock->read (*out, len, &nbr) || nbr < len))
     {
       delete [] *out;
-      return -1;      
+      return -1;
     }
 
   return 0;
@@ -136,10 +136,10 @@ int ForkServer::handleRequest (Socket *sock)
 
   if (flags & FLAG_USE_OUT)
     readFileHandle (sock->getHandle (), &stdOut);
-  
+
   if (flags & FLAG_USE_ERR)
     readFileHandle (sock->getHandle (), &stdErr);
-  
+
   readString (sock, &gid);
   readString (sock, &uid);
 
@@ -147,7 +147,7 @@ int ForkServer::handleRequest (Socket *sock)
   readString (sock, &cwd);
 
   readString (sock, &arg);
- 
+
   string argS (arg);
 
   readString (sock, &env);
@@ -207,7 +207,7 @@ int ForkServer::handleRequest (Socket *sock)
 
   if (flags & FLAG_USE_OUT)
     close (stdOut);
-  
+
   if (flags & FLAG_USE_ERR)
     close (stdErr);
 
@@ -231,10 +231,10 @@ int ForkServer::forkServerLoop (UnixSocket *serverSocket)
       try
         {
           Socket socket = serverSocket->accept ();
- 
+
           char command;
           u_long nbr;
-          
+
           if (socket.read (&command, 1, &nbr))
             {
               socket.close ();
@@ -256,7 +256,7 @@ int ForkServer::forkServerLoop (UnixSocket *serverSocket)
                 }
             }
         }
-      /* Don't let the fork server come back from this function 
+      /* Don't let the fork server come back from this function
          in _any_ case.  */
       catch(...)
         {
@@ -279,9 +279,9 @@ int ForkServer::forkServerLoop (UnixSocket *serverSocket)
  *\param waitEnd If true `executeProcess' will wait until
  *the process terminates.
  */
-int ForkServer::executeProcess (StartProcInfo *spi, 
-                                int flags, 
-                                int *pid, 
+int ForkServer::executeProcess (StartProcInfo *spi,
+                                int flags,
+                                int *pid,
                                 int *port,
                                 bool waitEnd)
 {
@@ -298,30 +298,30 @@ int ForkServer::executeProcess (StartProcInfo *spi,
       sock.socket ();
       sock.connect (socketPath.c_str ());
       sock.write ("r", 1, &nbw);
-      
+
       writeInt (&sock, flags);
-      
+
       if (flags & FLAG_USE_IN)
         writeFileHandle (sock.getHandle (), spi->stdIn);
-      
+
       if (flags & FLAG_USE_OUT)
         writeFileHandle (sock.getHandle (), spi->stdOut);
-      
+
       if (flags & FLAG_USE_ERR)
         writeFileHandle (sock.getHandle (), spi->stdError);
-      
+
       writeString (&sock, spi->gid.c_str (), spi->gid.length ());
       writeString (&sock, spi->uid.c_str (), spi->uid.length ());
-      
+
       writeString (&sock, spi->cmd.c_str (), spi->cmd.length ());
       writeString (&sock, spi->cwd.c_str (), spi->cwd.length ());
       writeString (&sock, spi->arg.c_str (), spi->arg.length ());
-      
+
       if (env)
         for (len = 0; env[len] != '\0' || env[len + 1] != '\0' ; len++);
-      
+
       writeString (&sock, env, len);
-      
+
       readInt (&sock, pid);
       readInt (&sock, port);
     }
@@ -334,7 +334,7 @@ int ForkServer::executeProcess (StartProcInfo *spi,
     {
       return waitpid (*pid, NULL, 0);
     }
-  
+
   return 0;
 #endif
 
@@ -352,7 +352,7 @@ void ForkServer::killServer ()
   s.write ("e", 1, &nbw);
   s.close ();
 }
-                  
+
 /*!
  *Initialize the fork server.
  *
@@ -382,7 +382,7 @@ int ForkServer::startForkServer ()
       socket.close ();
       initialized = true;
       break;
-    }  
+    }
 #endif
   return 0;
 }
diff --git a/myserver/src/base/process/process_server_manager.cpp b/myserver/src/base/process/process_server_manager.cpp
index d244f2c..57492b6 100644
--- a/myserver/src/base/process/process_server_manager.cpp
+++ b/myserver/src/base/process/process_server_manager.cpp
@@ -44,7 +44,7 @@ ProcessServerManager::~ProcessServerManager()
  */
 void ProcessServerManager::load ()
 {
- 
+
   string key ("server.process_servers");
   NodeTree<string> *node = ::Server::getInstance()->getNodeTree (key);
 
@@ -137,7 +137,7 @@ void ProcessServerManager::load ()
  *Get a servers process domain by its name.
  *\param name The domain name.
  */
-ProcessServerManager::ServerDomain* 
+ProcessServerManager::ServerDomain*
 ProcessServerManager::getDomain(const char* name)
 {
   ServerDomain* ret;
@@ -151,7 +151,7 @@ ProcessServerManager::getDomain(const char* name)
  *Create a new servers process domain by its name and return it.
  *\param name The domain name.
  */
-ProcessServerManager::ServerDomain* 
+ProcessServerManager::ServerDomain*
 ProcessServerManager::createDomain (const char* name)
 {
   ServerDomain* ret;
@@ -218,7 +218,7 @@ void ProcessServerManager::clear()
  *\param name The server name name.
  *\param seed Random seed to use for choosing a server.
  */
-ProcessServerManager::Server* 
+ProcessServerManager::Server*
 ProcessServerManager::getServer(const char* domain, const char* name, int seed)
 {
   ServerDomain* sd;
@@ -233,7 +233,7 @@ ProcessServerManager::getServer(const char* domain, const char* name, int seed)
       if (slist)
         s = slist->at (seed % slist->size ());
     }
-  
+
   if(s && s->isLocal && !s->process.isProcessAlive())
   {
     s->socket.close();
@@ -242,7 +242,7 @@ ProcessServerManager::getServer(const char* domain, const char* name, int seed)
       s->path.assign(name);
 
     s->port = 0;
-    
+
     if(runServer(s, s->path.c_str(), s->port))
     {
       sd->servers.remove(name);
@@ -261,7 +261,7 @@ ProcessServerManager::getServer(const char* domain, const char* name, int seed)
  *\param domain The server's domain.
  *\param name The server's name.
  */
-void ProcessServerManager::addServer(ProcessServerManager::Server* server, 
+void ProcessServerManager::addServer(ProcessServerManager::Server* server,
                                      const char* domain, const char* name)
 {
   ServerDomain *sd = createDomain (domain);
@@ -289,7 +289,7 @@ void ProcessServerManager::addServer(ProcessServerManager::Server* server,
  *\param host The host name to connect to.
  *\param port The port number to use for the connection.
  */
-ProcessServerManager::Server* 
+ProcessServerManager::Server*
 ProcessServerManager::addRemoteServer (const char* domain, const char* name,
                                        const char* host, u_short port)
 {
@@ -363,7 +363,7 @@ int ProcessServerManager::domainServers(const char* domain)
  *\param gid Group id to use for the new process.
  *\param port Port to use for the server.
  */
-ProcessServerManager::Server* 
+ProcessServerManager::Server*
 ProcessServerManager::runAndAddServer(const char* domain,  const char* path,
                                       int uid, int gid, u_short port)
 {
@@ -385,8 +385,8 @@ ProcessServerManager::runAndAddServer(const char* domain,  const char* path,
  *\param gid Group id to use for the new process.
  *\param port The listening port.
  */
-int ProcessServerManager::runServer(ProcessServerManager::Server* server, 
-                                    const char* path, int uid, int gid, 
+int ProcessServerManager::runServer(ProcessServerManager::Server* server,
+                                    const char* path, int uid, int gid,
                                     u_short port)
 {
   StartProcInfo spi;
@@ -399,7 +399,7 @@ int ProcessServerManager::runServer(ProcessServerManager::Server* server,
   if(nServers >= maxServers)
   {
     ostringstream stream;
-    stream << "Cannot run process " << path 
+    stream << "Cannot run process " << path
            << ": Reached max number of servers";
     ::Server::getInstance()->logWriteln(stream.str().c_str(), MYSERVER_LOG_MSG_ERROR);
     return 1;
@@ -424,14 +424,14 @@ int ProcessServerManager::runServer(ProcessServerManager::Server* server,
       if(path[i] == '"' && path[i - 1] != '\\')
         subString = !subString;
     }
-  
+
   if(i < len)
     {
       string tmpString(path);
       int begin = tmpString[0] == '"' ? 1 : 0;
       int end   = tmpString[i] == '"' ? i + 1 : i ;
       tmpCgiPath.assign(tmpString.substr(begin, end));
-      moreArg.assign(tmpString.substr(i, len));  
+      moreArg.assign(tmpString.substr(i, len));
     }
   else
     {
@@ -440,10 +440,10 @@ int ProcessServerManager::runServer(ProcessServerManager::Server* server,
       tmpCgiPath.assign(&path[begin], end-begin);
       moreArg.assign("");
     }
-  
+
   spi.envString = 0;
   spi.stdOut = spi.stdError = (FileHandle) -1;
-  
+
   spi.cmd.assign(tmpCgiPath);
   spi.arg.assign(moreArg);
   spi.cmdLine.assign(path);
@@ -455,8 +455,8 @@ int ProcessServerManager::runServer(ProcessServerManager::Server* server,
   if (Process::getForkServer ()->isInitialized ())
     {
       int ret, port, pid;
-      ret = Process::getForkServer ()->executeProcess (&spi, 
-                                                       ForkServer::FLAG_STDIN_SOCKET, 
+      ret = Process::getForkServer ()->executeProcess (&spi,
+                                                       ForkServer::FLAG_STDIN_SOCKET,
                                                        &pid,
                                                        &port);
 
@@ -477,9 +477,9 @@ int ProcessServerManager::runServer(ProcessServerManager::Server* server,
 
   ((sockaddr_in *)(&serverSockAddrIn))->sin_family = AF_INET;
 
-  ((sockaddr_in *)(&serverSockAddrIn))->sin_addr.s_addr = 
+  ((sockaddr_in *)(&serverSockAddrIn))->sin_addr.s_addr =
     htonl(INADDR_LOOPBACK);
-  ((sockaddr_in *)(&serverSockAddrIn))->sin_port = 
+  ((sockaddr_in *)(&serverSockAddrIn))->sin_port =
     htons(server->port);
 
   if ( server->socket.bind (&serverSockAddrIn,
@@ -514,7 +514,7 @@ int ProcessServerManager::connect(Socket* sock,
 {
   MYSERVER_SOCKADDRIN serverSock = { 0 };
   socklen_t nLength = sizeof(MYSERVER_SOCKADDRIN);
-  
+
   if (server->socket.getHandle())
     server->socket.getsockname ((MYSERVER_SOCKADDR*)&serverSock, (int*)&nLength);
 
@@ -523,7 +523,7 @@ int ProcessServerManager::connect(Socket* sock,
     /*! Try to create the socket.  */
     if(sock->socket(AF_INET, SOCK_STREAM, 0) == -1)
       return -1;
-    
+
     /*! If the socket was created try to connect.  */
     if(sock->connect(server->host.c_str(), server->port) == -1)
     {
diff --git a/myserver/src/base/regex/myserver_regex.cpp b/myserver/src/base/regex/myserver_regex.cpp
index 0f66108..575b49e 100644
--- a/myserver/src/base/regex/myserver_regex.cpp
+++ b/myserver/src/base/regex/myserver_regex.cpp
@@ -36,7 +36,7 @@ int Regex::compile(const char *p, int f)
 /*!
  * Match the pattern against strings.
  */
-int Regex::exec(const char *text, size_t nmatch, regmatch_t matchptr [], 
+int Regex::exec(const char *text, size_t nmatch, regmatch_t matchptr [],
                 int eflags)
 {
 #ifdef REGEX | TRE
diff --git a/myserver/src/base/safetime/safetime.cpp b/myserver/src/base/safetime/safetime.cpp
index ca15fe9..7e4d8be 100644
--- a/myserver/src/base/safetime/safetime.cpp
+++ b/myserver/src/base/safetime/safetime.cpp
@@ -6,7 +6,7 @@ it under the terms of the GNU General Public License as published by
 the Free Software Foundation; either version 3 of the License,  or
 (at your option) any later version.
 
-This program is distributed in the hope that it will be useful, 
+This program is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 GNU General Public License for more details.
diff --git a/myserver/src/base/socket/socket.cpp b/myserver/src/base/socket/socket.cpp
index 49d84fe..fc0b5db 100644
--- a/myserver/src/base/socket/socket.cpp
+++ b/myserver/src/base/socket/socket.cpp
@@ -292,23 +292,23 @@ int Socket::getLocalIPsList(string &out)
   addrinfo aiHints = { 0 }, *pHostInfo = NULL, *pCrtHostInfo = NULL;
   /* only interested in socket types the that server will listen to.  */
   aiHints.ai_socktype = SOCK_STREAM;
-  if ( getaddrinfo(serverName, NULL, &aiHints, &pHostInfo) == 0 && 
+  if ( getaddrinfo(serverName, NULL, &aiHints, &pHostInfo) == 0 &&
        pHostInfo != NULL )
   {
     sockaddr_storage *pCurrentSockAddr = NULL;
     char straddr[NI_MAXHOST] = "";
     memset(straddr, 0, NI_MAXHOST);
     ostringstream stream;
-    for ( pCrtHostInfo = pHostInfo; pCrtHostInfo != NULL; 
+    for ( pCrtHostInfo = pHostInfo; pCrtHostInfo != NULL;
           pCrtHostInfo = pCrtHostInfo->ai_next )
     {
-      pCurrentSockAddr = 
+      pCurrentSockAddr =
         reinterpret_cast<sockaddr_storage *>(pCrtHostInfo->ai_addr);
       if ( pCurrentSockAddr == NULL )
         continue;
 
-            if ( !getnameinfo(reinterpret_cast<sockaddr *>(pCurrentSockAddr), 
-                              sizeof(sockaddr_storage), straddr, NI_MAXHOST, 
+            if ( !getnameinfo(reinterpret_cast<sockaddr *>(pCurrentSockAddr),
+                              sizeof(sockaddr_storage), straddr, NI_MAXHOST,
                               NULL, 0, NI_NUMERICHOST) )
             {
               stream << ( !stream.str().empty() ? ", " : "" ) << straddr;
@@ -411,14 +411,14 @@ int Socket::send(const char* buffer, int len, int flags)
       /*! When we can send data again?  */
       u_long time = getTicks() + (1000 * 1024 / throttlingRate) ;
       /*! If a throttling rate is specified, send chunks of 1024 bytes.  */
-      ret = rawSend(buffer + (len - toSend), toSend < 1024 ? 
+      ret = rawSend(buffer + (len - toSend), toSend < 1024 ?
                     toSend : 1024, flags);
       /*! On errors returns directly -1.  */
       if(ret < 0)
         return -1;
       toSend -= (u_long)ret;
-      /*! 
-       *If there are other bytes to send wait before cycle again. 
+      /*!
+       *If there are other bytes to send wait before cycle again.
        */
       if(toSend)
       {
@@ -456,7 +456,7 @@ int Socket::connect(const char* host, u_short port)
 {
   if ( host == NULL )
     return -1;
-    
+
 #if ( HAVE_IPV6 )
   MYSERVER_SOCKADDRIN thisSock = { 0 };
   int nLength = sizeof(MYSERVER_SOCKADDRIN);
@@ -470,11 +470,11 @@ int Socket::connect(const char* host, u_short port)
   addrinfo aiHints = { 0 };
 
   /*
-   *If the socket is not created, wait to see what address families 
-   *have this host, than create socket. 
+   *If the socket is not created, wait to see what address families
+   *have this host, than create socket.
    */
-  
-  //getsockname(&thisSock, &nLength); 
+
+  //getsockname(&thisSock, &nLength);
   if ( getsockname(&thisSock, &nLength) == 0 )
   {
     aiHints.ai_family = thisSock.ss_family;
@@ -491,19 +491,19 @@ int Socket::connect(const char* host, u_short port)
   if (nGetaddrinfoRet != 0 || pHostInfo == NULL )
     return -1;
 
-  for ( pCrtHostInfo = pHostInfo; pCrtHostInfo != NULL; 
+  for ( pCrtHostInfo = pHostInfo; pCrtHostInfo != NULL;
         pCrtHostInfo = pCrtHostInfo->ai_next )
   {
     pCurrentSockAddr = reinterpret_cast<sockaddr_storage *>
       (pCrtHostInfo->ai_addr);
-    if ( pCurrentSockAddr == NULL || 
-        (thisSock.ss_family != 0 && 
+    if ( pCurrentSockAddr == NULL ||
+        (thisSock.ss_family != 0 &&
          pCurrentSockAddr->ss_family != thisSock.ss_family) )
       continue;
 
     if ( thisSock.ss_family == 0 )// socket not created yet
     {
-      //so try to create one now based on 'pCurrentSockAddr' 
+      //so try to create one now based on 'pCurrentSockAddr'
       if ( pCurrentSockAddr->ss_family == AF_INET )
       {
         if(Socket::socket(AF_INET, SOCK_STREAM, 0) == -1)
@@ -520,15 +520,15 @@ int Socket::connect(const char* host, u_short port)
 
     memset(&connectionSockAddrIn, 0, sizeof(connectionSockAddrIn));
     connectionSockAddrIn.ss_family = pCurrentSockAddr->ss_family;
-  
-     if ( connectionSockAddrIn.ss_family != AF_INET && 
+
+     if ( connectionSockAddrIn.ss_family != AF_INET &&
          connectionSockAddrIn.ss_family != AF_INET6 )
          continue;
-         
+
     if ( connectionSockAddrIn.ss_family == AF_INET )
     {
       nSockLen = sizeof(sockaddr_in);
-      memcpy((sockaddr_in *)&connectionSockAddrIn, 
+      memcpy((sockaddr_in *)&connectionSockAddrIn,
              (sockaddr_in *)pCurrentSockAddr, nSockLen);
       ((sockaddr_in *)(&connectionSockAddrIn))->sin_port = htons(port);
 
@@ -536,12 +536,12 @@ int Socket::connect(const char* host, u_short port)
     else// if ( connectionSockAddrIn.ss_family == AF_INET6 )
     {
       nSockLen = sizeof(sockaddr_in6);
-      memcpy((sockaddr_in6 *)&connectionSockAddrIn, 
+      memcpy((sockaddr_in6 *)&connectionSockAddrIn,
              (sockaddr_in6 *)pCurrentSockAddr, nSockLen);
       ((sockaddr_in6 *)&connectionSockAddrIn)->sin6_port = htons(port);
     }
 
-    if(Socket::connect((MYSERVER_SOCKADDR*)(&connectionSockAddrIn), 
+    if(Socket::connect((MYSERVER_SOCKADDR*)(&connectionSockAddrIn),
                        nSockLen) == -1)
     {
       Socket::close();
@@ -568,7 +568,7 @@ int Socket::connect(const char* host, u_short port)
     if(Socket::socket(AF_INET, SOCK_STREAM, 0) == -1)
     {
       return -1;
-    }                  
+    }
   }
   sockLen = sizeof(sockAddr);
   memset(&sockAddr, 0, sizeof(sockAddr));
@@ -593,13 +593,13 @@ int Socket::connect (MYSERVER_SOCKADDR* sa, int na)
   if ( sa == NULL )
     return -1;
 
-  if ( (sa->ss_family == AF_INET && na != sizeof(sockaddr_in)) 
+  if ( (sa->ss_family == AF_INET && na != sizeof(sockaddr_in))
 #if HAVE_IPV6
     || (sa->ss_family == AF_INET6 && na != sizeof(sockaddr_in6))
 #endif
  )
     return -1;
-  
+
 #ifdef WIN32
   return ::connect((SOCKET)socketHandle,(const sockaddr *)sa, na);
 #else
diff --git a/myserver/src/base/socket/ssl_socket.cpp b/myserver/src/base/socket/ssl_socket.cpp
index 55a9387..db9b74d 100644
--- a/myserver/src/base/socket/ssl_socket.cpp
+++ b/myserver/src/base/socket/ssl_socket.cpp
@@ -122,7 +122,7 @@ int SslSocket::connect(MYSERVER_SOCKADDR* sa, int na)
   sslContext = SSL_CTX_new(sslMethod);
   if(sslContext == 0)
     return -1;
-  
+
   /*! Do the TCP connection. */
   if(::connect((int)socketHandle,(const sockaddr *)sa, na))
   {
@@ -214,7 +214,7 @@ int SslSocket::sslAccept()
     close();
     return -1;
   }
-  
+
   do
   {
     sslAccept = SSL_accept (sslConnection);
@@ -254,7 +254,7 @@ int SslSocket::recv(char* buffer, int len, int flags)
         break;
 
       sslError = SSL_get_error (sslConnection, err);
-      
+
       if ((sslError != SSL_ERROR_WANT_READ) &&
           (sslError != SSL_ERROR_WANT_WRITE))
         break;
diff --git a/myserver/src/base/socket_pair/socket_pair.cpp b/myserver/src/base/socket_pair/socket_pair.cpp
index 81b7e1c..29b9042 100644
--- a/myserver/src/base/socket_pair/socket_pair.cpp
+++ b/myserver/src/base/socket_pair/socket_pair.cpp
@@ -83,7 +83,7 @@ int SocketPair::create ()
   int e;
   int addrlen = sizeof(addr);
   DWORD flags = 0;
-  
+
   if (handles == 0)
     return -1;
 
@@ -104,14 +104,14 @@ int SocketPair::create ()
       closesocket (listener);
       return -1;
     }
-  
+
   e = ::getsockname(listener, (struct sockaddr*) &addr, &addrlen);
   if (e == SOCKET_ERROR)
     {
       closesocket (listener);
       return -1;
     }
-  
+
   do
     {
       if (::listen (listener, 1) == SOCKET_ERROR)
@@ -122,17 +122,17 @@ int SocketPair::create ()
         break;
       if ((handles[1] = ::accept (listener, NULL, NULL)) == INVALID_SOCKET)
         break;
-    
+
       socketHandle = handles[0];
 
       closesocket (listener);
       return 0;
     } while (0);
-  
+
   closesocket (listener);
   closesocket (handles[0]);
   closesocket (handles[1]);
-  
+
   return -1;
 #endif
 
diff --git a/myserver/src/base/ssl/ssl.cpp b/myserver/src/base/ssl/ssl.cpp
index 2e93e63..8781e26 100644
--- a/myserver/src/base/ssl/ssl.cpp
+++ b/myserver/src/base/ssl/ssl.cpp
@@ -85,7 +85,7 @@ int SslContext::initialize ()
     return -1;
 
   return 1;
-}  
+}
 
 int SslContext::free ()
 {
@@ -96,7 +96,7 @@ int SslContext::free ()
       ret = 1;
       context = 0;
     }
-  else 
+  else
     ret = 0;
   certificateFile.assign ("");
   privateKeyFile.assign ("");
diff --git a/myserver/src/base/sync/event.cpp b/myserver/src/base/sync/event.cpp
index e73675e..347bfc2 100755
--- a/myserver/src/base/sync/event.cpp
+++ b/myserver/src/base/sync/event.cpp
@@ -83,7 +83,7 @@ int Event::init(bool broadcast)
 /*!
  *Wait for the event.
  *\param id The calling thread id.
- *\param timeout Timeout value in milliseconds. 
+ *\param timeout Timeout value in milliseconds.
  */
 int Event::wait(u_long id, u_long timeout)
 {
@@ -124,13 +124,13 @@ int Event::wait(u_long id, u_long timeout)
 
   return -1;
 #endif
-  
+
 }
 
 /*!
  *Signal the event.
  *The behaviour of this message is influenced by the broadcast flag, if this
- *is a broadcast event then the event will be signaled to all the waiting 
+ *is a broadcast event then the event will be signaled to all the waiting
  *threads otherwise only one thread will be signaled.
  *\param id The calling thread id.
  */
@@ -157,7 +157,7 @@ int Event::signal(u_long id)
 
   /* Reset the event for later reusability.  */
   ResetEvent(event);
-  
+
 #endif
   return 0;
 }
diff --git a/myserver/src/base/sync/mutex.cpp b/myserver/src/base/sync/mutex.cpp
index 8050e0d..172ffad 100755
--- a/myserver/src/base/sync/mutex.cpp
+++ b/myserver/src/base/sync/mutex.cpp
@@ -113,7 +113,7 @@ int Mutex::lock(u_long /*id*/)
   }
 #endif
 
-#else  
+#else
   WaitForSingleObject(mutex, INFINITE);
 #endif
   locked = true;
@@ -121,7 +121,7 @@ int Mutex::lock(u_long /*id*/)
 }
 
 /*!
- *Check if the mutex is already locked. 
+ *Check if the mutex is already locked.
  *
  *\return Return true if the mutex is currently locked.
  */
@@ -138,7 +138,7 @@ int Mutex::unlock(u_long/*! id*/)
 #ifdef HAVE_PTHREAD
   int err;
   err = pthread_mutex_unlock(&mutex);
-#else  
+#else
   ReleaseMutex(mutex);
 #endif
   locked = false;
diff --git a/myserver/src/base/sync/semaphore.cpp b/myserver/src/base/sync/semaphore.cpp
index 4eeb08e..cd9b739 100755
--- a/myserver/src/base/sync/semaphore.cpp
+++ b/myserver/src/base/sync/semaphore.cpp
@@ -109,7 +109,7 @@ int Semaphore::lock(u_long /*id*/)
     Thread::wait(1);
 #endif
 
-#else  
+#else
   err = (WaitForSingleObject(semaphore, INFINITE) == WAIT_FAILED) ? 1 : 0;
 #endif
   return err;
@@ -123,7 +123,7 @@ int Semaphore::unlock(u_long/*! id*/)
   int err;
 #ifdef HAVE_PTHREAD
   err = sem_post(&semaphore);
-#else  
+#else
   err = (ReleaseSemaphore(semaphore, 1, NULL) == FALSE) ? 1 : 0;
 #endif
   return err;
diff --git a/myserver/src/base/xml/xml_parser.cpp b/myserver/src/base/xml/xml_parser.cpp
index dec0aef..0c12f07 100644
--- a/myserver/src/base/xml/xml_parser.cpp
+++ b/myserver/src/base/xml/xml_parser.cpp
@@ -19,7 +19,7 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #include <include/base/utility.h>
 #include <include/base/file/files_utility.h>
 
-extern "C" 
+extern "C"
 {
 #include <string.h>
 }
@@ -52,7 +52,7 @@ static int MemBufCloseCallback(void * context)
 /**
  * Initializes the libxml2 library
  * Calls xmlInitParser()
- * @return Returns true 
+ * @return Returns true
  */
 bool XmlParser::startXML()
 {
@@ -144,18 +144,18 @@ int XmlParser::openMemBuf(MemBuf & memory, bool useXpath)
   mtime = 0;
   cur = NULL;
   this->useXpath = useXpath;
-  
+
   if(memory.getLength() == 0)
     return -1;
-  
+
   if(!doc)
   {
-    doc = xmlParseMemory((const char * )memory.getBuffer(), 
+    doc = xmlParseMemory((const char * )memory.getBuffer(),
                          memory.getLength());
   }
   else
     close();
-  
+
   if(!doc)
     return -1;
 
@@ -228,19 +228,19 @@ char *XmlParser::getValue(const char* vName)
 
   lcur = cur->xmlChildrenNode;
   buffer.assign("");
-  
+
   while(lcur)
   {
     if(!xmlStrcmp(lcur->name, (const xmlChar *)vName))
     {
       lastNode = lcur;
-      
+
       if(lcur->children->content)
       {
         int inlen = strlen((const char*)lcur->children->content);
         int outlen = inlen * 2;
         char* tmpBuff = new char[outlen];
-        if(UTF8Toisolat1((unsigned char*)tmpBuff, &outlen, 
+        if(UTF8Toisolat1((unsigned char*)tmpBuff, &outlen,
                               (unsigned char*)lcur->children->content, &inlen) >= 0)
         {
           tmpBuff[outlen] = '\0';
@@ -253,13 +253,13 @@ char *XmlParser::getValue(const char* vName)
 
         ret = (char*)buffer.c_str();
       }
-      
+
       break;
     }
-    
+
     lcur = lcur->next;
   }
-  
+
   return ret;
 }
 
@@ -274,22 +274,22 @@ int XmlParser::setValue(const char* vName, const char *value)
 {
   xmlNodePtr lcur = cur->xmlChildrenNode;
   buffer.assign("");
-  
+
   while(lcur)
   {
     if(!xmlStrcmp(lcur->name, (const xmlChar *)vName))
     {
       lastNode = lcur;
-      
+
       if(lcur->children->content)
         strcpy((char*)lcur->children->content, value);
-      
+
       return 0;
     }
-    
+
     lcur=lcur->next;
   }
-  
+
   return 1;
 }
 
@@ -304,28 +304,28 @@ char *XmlParser::getAttr(const char* field, const char *attr)
 {
   xmlNodePtr lcur = cur->xmlChildrenNode;
   buffer.assign("");
-  
+
   while(lcur)
   {
     if(!xmlStrcmp(lcur->name, (const xmlChar *)field))
     {
       lastNode = lcur;
       xmlAttr *attrs =  lcur->properties;
-      
+
       while(attrs)
       {
         if(!xmlStrcmp(attrs->name, (const xmlChar *)attr))
         {
           return (char*)attrs->children->content;
         }
-        
+
         attrs = attrs->next;
       }
     }
-    
+
     lcur = lcur->next;
   }
-  
+
   return 0;
 }
 
@@ -343,8 +343,8 @@ XmlXPathResult* XmlParser::evaluateXpath(const char* expr)
     return NULL;
 
   xpathObj = xmlXPathEvalExpression((const xmlChar*)expr, xpathCtx);
-  
-  if(xpathObj == NULL) 
+
+  if(xpathObj == NULL)
     return NULL;
 
   return new XmlXPathResult(xpathObj);
@@ -363,7 +363,7 @@ int XmlParser::close()
 
   if(useXpath && xpathCtx)
   {
-    xmlXPathFreeContext(xpathCtx); 
+    xmlXPathFreeContext(xpathCtx);
   }
 
   doc = NULL;
@@ -385,10 +385,10 @@ int XmlParser::close()
 int XmlParser::save(const char *filename,int *nbytes)
 {
   int err = xmlSaveFile(filename,doc);
-  
+
   if(nbytes)
     *nbytes = err;
-  
+
   return err;
 }
 
@@ -409,16 +409,16 @@ int XmlParser::saveMemBuf(MemBuf & memory,int *nbytes)
                                        MemBufCloseCallback,
                                        (void *)&memory,
                                        NULL);
-  
+
   /*! Clear the buffer */
-  memory.free(); 
-  
+  memory.free();
+
   /*! Let libxml2 fill the MemBuf class with our interal callbacks. */
   int err = xmlSaveFileTo(callback, doc, NULL);
-  
+
   if(nbytes)
     *nbytes = err;
-  
+
   return err;
 }
 
@@ -431,12 +431,12 @@ void XmlParser::newfile(const char * root)
 {
   if(doc != NULL)
     close();
-  
+
   doc = xmlNewDoc((const xmlChar*)"1.0");
   cur = xmlNewDocNode(doc, NULL, (const xmlChar*)root, NULL);
-  
+
   xmlDocSetRootElement(doc, cur);
-  
+
   addLineFeed();
   addLineFeed();
 }
@@ -451,7 +451,7 @@ void XmlParser::addChild(const char * name, const char * value)
 {
   lastNode = xmlNewTextChild(cur, NULL, (const xmlChar*)name,
                                (const xmlChar*)value);
-  
+
   addLineFeed();
 }
 
@@ -468,7 +468,7 @@ void XmlParser::addGroup(const char * name)
     prevCur = cur;
     cur = xmlNewTextChild(cur, NULL, (const xmlChar*)name, NULL);
     lastNode = cur;
-    
+
     addLineFeed();
   }
 }
@@ -484,7 +484,7 @@ void XmlParser::endGroup()
   {
     cur = prevCur;
     prevCur = NULL;
-     
+
     addLineFeed();
     addLineFeed();
   }
@@ -500,7 +500,7 @@ void XmlParser::setAttr(const char * name, const char * value)
 {
   if(lastNode == NULL)
     return;
-  
+
   xmlSetProp(lastNode, (const xmlChar*)name, (const xmlChar*)value);
 }
 
@@ -515,6 +515,6 @@ void XmlParser::addLineFeed()
   #else
     xmlNodePtr endline = xmlNewDocText(doc, (const xmlChar *)"\n");
   #endif
-    
+
   xmlAddChild(cur, endline);
 }
diff --git a/myserver/src/conf/security/auth_method_factory.cpp b/myserver/src/conf/security/auth_method_factory.cpp
index 7527d82..5c1ef66 100644
--- a/myserver/src/conf/security/auth_method_factory.cpp
+++ b/myserver/src/conf/security/auth_method_factory.cpp
@@ -52,7 +52,7 @@ AuthMethod* AuthMethodFactory::getAuthMethod(string &name)
 AuthMethod* AuthMethodFactory::addAuthMethod(string &name, AuthMethod* authMethod)
 {
   return authMethods.put (name, authMethod);
-  
+
 }
 
 /*!
diff --git a/myserver/src/conf/security/security_cache.cpp b/myserver/src/conf/security/security_cache.cpp
index 37f6d21..f7871a5 100644
--- a/myserver/src/conf/security/security_cache.cpp
+++ b/myserver/src/conf/security/security_cache.cpp
@@ -6,7 +6,7 @@ it under the terms of the GNU General Public License as published by
 the Free Software Foundation; either version 3 of the License, or
 (at your option) any later version.
 
-This program is distributed in the hope that it will be useful, 
+This program is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 GNU General Public License for more details.
@@ -24,7 +24,7 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #include <string>
 
 using namespace std;
-  
+
 /*!
  *Constructor for the SecurityCache object.
  */
@@ -61,7 +61,7 @@ void SecurityCache::free ()
 
 /*!
  *Set a new limit on the nodes to keep in memory.
- *\param newLimit Number of files to cache.  it is adjusted 
+ *\param newLimit Number of files to cache.  it is adjusted
  *to be >= 1.
  */
 void SecurityCache::setMaxNodes (int newLimit)
@@ -74,7 +74,7 @@ void SecurityCache::setMaxNodes (int newLimit)
   {
     XmlParser* toremove = dictionary.remove(dictionary.begin());
     if(toremove)
-      delete toremove;    
+      delete toremove;
   }
   limit = newLimit;
 }
@@ -84,11 +84,11 @@ void SecurityCache::setMaxNodes (int newLimit)
  *zero on success.
  *\param dir The directory we need a security parser for.
  *\param sys The system directory.
- *\param out Output string where put the security file path. 
+ *\param out Output string where put the security file path.
  *\param secFileName The security file name.
  */
-int SecurityCache::getSecurityFile (const string& dir, 
-                                    const string& sys, 
+int SecurityCache::getSecurityFile (const string& dir,
+                                    const string& sys,
                                     string& out,
                                     const char* secFileName)
 {
@@ -112,7 +112,7 @@ int SecurityCache::getSecurityFile (const string& dir,
     return 0;
   }
 
- 
+
   /* Go upper in the tree till we find a security file.  */
   for(;;)
   {
@@ -126,8 +126,8 @@ int SecurityCache::getSecurityFile (const string& dir,
         break;
       }
 
-    /* 
-     *Top of the tree, check if the security file is present in the 
+    /*
+     *Top of the tree, check if the security file is present in the
      *system directory.  Return an error if it is not.
      */
     if(i == 0)
@@ -166,8 +166,8 @@ int SecurityCache::getMaxNodes()
  *\param secFileName The security file name.
  *\param maxSize The maximum file size allowed for the security file.
  */
-XmlParser* SecurityCache::getParser (const string &dir, 
-                                     const string &sys, 
+XmlParser* SecurityCache::getParser (const string &dir,
+                                     const string &sys,
                                      bool useXpath,
                                      const char* secFileName,
                                      u_long maxSize)
@@ -189,7 +189,7 @@ XmlParser* SecurityCache::getParser (const string &dir,
     /*! If the file was modified reload it. */
     fileModTime = FilesUtility::getLastModTime (file.c_str ());
 
-    if ((fileModTime != static_cast<time_t>(-1))  && 
+    if ((fileModTime != static_cast<time_t>(-1))  &&
        (parser->getLastModTime () != fileModTime))
     {
       parser->close ();
@@ -225,7 +225,7 @@ XmlParser* SecurityCache::getParser (const string &dir,
     parser = new XmlParser ();
 
     if (parser == NULL)
-    {  
+    {
       return NULL;
     }
 
diff --git a/myserver/src/conf/security/security_manager.cpp b/myserver/src/conf/security/security_manager.cpp
index 7516523..77c4b94 100644
--- a/myserver/src/conf/security/security_manager.cpp
+++ b/myserver/src/conf/security/security_manager.cpp
@@ -43,8 +43,8 @@ SecurityManager::~SecurityManager ()
 /*!
  *Get the permission mask for the requested resource.
  */
-int SecurityManager::getPermissionMask (SecurityToken* st, 
-                                        SecurityDomain **domains, 
+int SecurityManager::getPermissionMask (SecurityToken* st,
+                                        SecurityDomain **domains,
                                         string &validator,
                                         string &authMethod)
 {
@@ -60,8 +60,8 @@ int SecurityManager::getPermissionMask (SecurityToken* st,
 /*!
  *Get the permission mask for the requested resource.
  */
-int SecurityManager::getPermissionMask (SecurityToken* st, 
-                                        list<SecurityDomain*> *domains, 
+int SecurityManager::getPermissionMask (SecurityToken* st,
+                                        list<SecurityDomain*> *domains,
                                         string &validator,
                                         string &authMethod)
 {
@@ -79,7 +79,7 @@ int SecurityManager::getPermissionMask (SecurityToken* st,
  *Initialize the pointers to the specified Validator and AuthMethod.
  *\param validatorName The validator name to find.
  *\param authMethodName The auth method name to find.
- *\param validator Pointer to the Validator to initialize. 
+ *\param validator Pointer to the Validator to initialize.
  *\param authMethod Pointer to the AuthMethod initialize.
  *\return 0 if the pointers were successfully initialized.
  */
diff --git a/myserver/src/conf/security/validator.cpp b/myserver/src/conf/security/validator.cpp
index 8c81c34..d21b926 100644
--- a/myserver/src/conf/security/validator.cpp
+++ b/myserver/src/conf/security/validator.cpp
@@ -34,7 +34,7 @@ Validator::~Validator ()
  *Get the permission mask for the requested resource.
  *Delegate the problem to getPermissionMaskInt.
  */
-int Validator::getPermissionMask (SecurityToken* st, 
+int Validator::getPermissionMask (SecurityToken* st,
                                   list<SecurityDomain*> *domains,
                                   AuthMethod* authMethod)
 {
@@ -45,7 +45,7 @@ int Validator::getPermissionMask (SecurityToken* st,
 
   if (domains)
   {
-    for (list<SecurityDomain*>::iterator it = domains->begin (); 
+    for (list<SecurityDomain*>::iterator it = domains->begin ();
          it != domains->end (); it++)
     {
       addDomain (&hashedDomains, *it);
@@ -59,7 +59,7 @@ int Validator::getPermissionMask (SecurityToken* st,
  *Get the permission mask for the requested resource.
  *Delegate the problem to getPermissionMaskInt.
  */
-int Validator::getPermissionMask (SecurityToken* st, 
+int Validator::getPermissionMask (SecurityToken* st,
                                   SecurityDomain **domains,
                                   AuthMethod* authMethod)
 {
@@ -85,7 +85,7 @@ int Validator::getPermissionMask (SecurityToken* st,
  *Get the permission mask for the requested resource.
  *Decorate getPermissionMaskImpl.
  */
-int Validator::getPermissionMaskInt (SecurityToken* st, 
+int Validator::getPermissionMaskInt (SecurityToken* st,
                                      HashMap<string, SecurityDomain*> *hashedDomains,
                                      AuthMethod* authMethod)
 {
@@ -93,10 +93,10 @@ int Validator::getPermissionMaskInt (SecurityToken* st,
 
   if (authMethod)
     ret = authMethod->getPermissionMask (st);
-  
+
   if (!getPermissionMaskImpl (st, hashedDomains, authMethod))
     ret = 0;
-  
+
   st->setDone (true);
 
   return ret;
@@ -141,6 +141,6 @@ string *Validator::getValue (HashMap<string, SecurityDomain*> *hashedDomains, st
 
   if (securityDomain)
     return securityDomain->getValue (var);
-  
+
   return NULL;
 }
diff --git a/myserver/src/conf/security/xml_validator.cpp b/myserver/src/conf/security/xml_validator.cpp
index e738849..bfb1869 100644
--- a/myserver/src/conf/security/xml_validator.cpp
+++ b/myserver/src/conf/security/xml_validator.cpp
@@ -101,15 +101,15 @@ int XmlValidator::getPermissionMask (SecurityToken* st)
   {
     if (xmlStrcmp (cur->name, (const xmlChar *) "USER"))
       continue;
-     
+
     xmlAttr *attrs = cur->properties;
-  
+
     xmlChar* name = NULL;
     xmlChar* password = NULL;
 
     int permissions =  getPermissions (attrs, &name, &password);
 
-    if (!name || !password || 
+    if (!name || !password ||
         xmlStrcmp (name, (const xmlChar *)st->getUser ().c_str ()))
       continue;
 
@@ -125,7 +125,7 @@ int XmlValidator::getPermissionMask (SecurityToken* st)
       st->setAuthenticated (true);
       st->setMask (permissions);
     }
-    
+
     return st->getMask ();
   }
 
@@ -148,7 +148,7 @@ int XmlValidator::getPermissions (xmlAttr* attrs, xmlChar** user, xmlChar** pass
       if (user && !xmlStrcmp (attrs->name, (const xmlChar *)"name") &&
           attrs->children && attrs->children->content)
         *user = attrs->children->content;
-    
+
       else if (password && !xmlStrcmp (attrs->name, (const xmlChar *)"password") &&
           attrs->children && attrs->children->content)
         *password = attrs->children->content;
@@ -172,7 +172,7 @@ int XmlValidator::getPermissions (xmlAttr* attrs, xmlChar** user, xmlChar** pass
           attrs->children && attrs->children->content &&
           !xmlStrcmp(attrs->children->content, (const xmlChar *) "YES"))
         permissions |= MYSERVER_PERMISSION_BROWSE;
-      
+
       attrs = attrs->next;
     }
 
@@ -220,9 +220,9 @@ int XmlValidator::getPermissionMaskImpl (SecurityToken* st,
 /*!
  *Compute the current XML node.
  */
-int XmlValidator::computeXmlNode (xmlNodePtr node, 
-                                  SecurityToken *st, 
-                                  int *cmd, 
+int XmlValidator::computeXmlNode (xmlNodePtr node,
+                                  SecurityToken *st,
+                                  int *cmd,
                                   HashMap<string, SecurityDomain*> *hashedDomains)
 {
   if (!node)
@@ -248,7 +248,7 @@ int XmlValidator::computeXmlNode (xmlNodePtr node,
 
     if (cur->type != XML_ELEMENT_NODE)
       continue;
-    
+
     if (!xmlStrcmp (cur->name, (const xmlChar *) "CONDITION"))
     {
       if (doCondition (cur, hashedDomains))
@@ -282,13 +282,13 @@ bool XmlValidator::doCondition (xmlNodePtr node, HashMap<string, SecurityDomain*
   const xmlChar *value = (const xmlChar*)"";
   const xmlChar *regex = (const xmlChar*)"";
   xmlAttr *attrs = node->properties;
-  
+
   while (attrs)
   {
     if (!xmlStrcmp (attrs->name, (const xmlChar *)"name") &&
        attrs->children && attrs->children->content)
       name.assign ((const char*)attrs->children->content);
-    
+
     if (!xmlStrcmp (attrs->name, (const xmlChar *)"value") &&
        attrs->children && attrs->children->content)
       value = attrs->children->content;
@@ -300,10 +300,10 @@ bool XmlValidator::doCondition (xmlNodePtr node, HashMap<string, SecurityDomain*
     if (!xmlStrcmp (attrs->name, (const xmlChar *)"regex") &&
        attrs->children && attrs->children->content)
       regex = attrs->children->content;
-    
+
     attrs = attrs->next;
   }
-      
+
   string *storedValue = getValue (hashedDomains, name);
 
   if (!storedValue)
@@ -324,10 +324,10 @@ bool XmlValidator::doCondition (xmlNodePtr node, HashMap<string, SecurityDomain*
   }
   else
     eq = storedValue->compare ((const char*)value) == 0;
-  
+
   if (!xmlStrcmp (isNot, (const xmlChar *) "yes"))
     return !eq;
-  
+
   return eq;
 }
 
@@ -354,13 +354,13 @@ void XmlValidator::doDefine (xmlNodePtr node, SecurityToken *st, HashMap<string,
   string name;
   const xmlChar *value = (const xmlChar*)"";
   xmlAttr *attrs = node->properties;
-  
+
   while (attrs)
   {
     if(!xmlStrcmp (attrs->name, (const xmlChar *)"name") &&
        attrs->children && attrs->children->content)
       name.assign ((const char*)attrs->children->content);
-    
+
     if(!xmlStrcmp (attrs->name, (const xmlChar *)"value") &&
        attrs->children && attrs->children->content)
       value = attrs->children->content;
@@ -393,7 +393,7 @@ void XmlValidator::doReturn (xmlNodePtr node, int *cmd, HashMap<string, Security
     if (!xmlStrcmp (attrs->name, (const xmlChar *)"value") &&
         attrs->children && attrs->children->content)
       value = attrs->children->content;
-    
+
     attrs = attrs->next;
   }
 
diff --git a/myserver/src/conf/xml_conf.cpp b/myserver/src/conf/xml_conf.cpp
index de00f3c..5b7a962 100644
--- a/myserver/src/conf/xml_conf.cpp
+++ b/myserver/src/conf/xml_conf.cpp
@@ -54,10 +54,10 @@ void XmlConf::readNode (xmlNodePtr lcur,
 
         for (attrs = lcur->properties; attrs; attrs = attrs->next)
           {
-            if (!xmlStrcmp (attrs->name, (const xmlChar *)"name") && 
+            if (!xmlStrcmp (attrs->name, (const xmlChar *)"name") &&
                 attrs->children && attrs->children->content)
               name = (const char*)attrs->children->content;
-            else if (!xmlStrcmp (attrs->name, (const xmlChar *)"value") && 
+            else if (!xmlStrcmp (attrs->name, (const xmlChar *)"value") &&
                 attrs->children && attrs->children->content)
               value = (const char*)attrs->children->content;
             else
@@ -71,7 +71,7 @@ void XmlConf::readNode (xmlNodePtr lcur,
         string *v = value ? new string((const char*)value) : NULL;
 
         node->setValue (v);
- 
+
         if(name)
           {
             string key((const char*)name);
diff --git a/myserver/src/connection/connection.cpp b/myserver/src/connection/connection.cpp
index 69f6564..db4987b 100644
--- a/myserver/src/connection/connection.cpp
+++ b/myserver/src/connection/connection.cpp
@@ -102,7 +102,7 @@ u_long Connection::getID ()
 
 /*!
  *Set the IDentifier for the connection.
- *\param nID The new ID. 
+ *\param nID The new ID.
  */
 void Connection::setID (u_long nID)
 {
@@ -167,7 +167,7 @@ const char* Connection::getLogin ()
 
 /*!
  *Set the login name for the connection user.
- *\param loginName The login name. 
+ *\param loginName The login name.
  */
 void Connection::setLogin (const char* loginName)
 {
@@ -242,7 +242,7 @@ u_short Connection::getLocalPort ()
 
 /*!
  *Set the local port used to connect to.
- *\param np The new local port. 
+ *\param np The new local port.
  */
 void Connection::setLocalPort (u_short np)
 {
@@ -259,7 +259,7 @@ u_long Connection::getTimeout ()
 
 /*!
  *Set the timeout to use with the connection.
- *\param nTimeout The new timeout value. 
+ *\param nTimeout The new timeout value.
  */
 void Connection::setTimeout (u_long nTimeout)
 {
@@ -276,7 +276,7 @@ int Connection::getToRemove ()
 
 /*!
  *Set the reason to remove the connection.
- *\param r Set if the connection/connection.has to be removed. 
+ *\param r Set if the connection/connection.has to be removed.
  */
 void Connection::setToRemove (int r)
 {
@@ -292,7 +292,7 @@ int Connection::isForceControl ()
 }
 /*!
  *Force the control of this connection on next server loop.
- *\param fp The new force control value even if there is new data. 
+ *\param fp The new force control value even if there is new data.
  */
 void Connection::setForceControl (int fp)
 {
diff --git a/myserver/src/filter/console.cpp b/myserver/src/filter/console.cpp
index b2671bd..1c0a4b3 100644
--- a/myserver/src/filter/console.cpp
+++ b/myserver/src/filter/console.cpp
@@ -66,13 +66,13 @@ Console::Console () : Stream ()
 
 Console::~Console ()
 {
-  if (fd) 
+  if (fd)
     {
       reset ();
     }
 }
 
-int 
+int
 Console::flush (u_long* nbw)
 {
   if (fd)
diff --git a/myserver/src/filter/filter.cpp b/myserver/src/filter/filter.cpp
index 0689f41..692934b 100644
--- a/myserver/src/filter/filter.cpp
+++ b/myserver/src/filter/filter.cpp
@@ -127,7 +127,7 @@ int Filter::modifyData()
 }
 
 /*!
- *Return a string with the filter name. 
+ *Return a string with the filter name.
  *If an external buffer is provided write the name there too.
  *\param name The buffer where write the filter name.
  *\param len The buffer length.
diff --git a/myserver/src/filter/filters_chain.cpp b/myserver/src/filter/filters_chain.cpp
index 9000fba..4c2d36a 100644
--- a/myserver/src/filter/filters_chain.cpp
+++ b/myserver/src/filter/filters_chain.cpp
@@ -15,7 +15,7 @@ You should have received a copy of the GNU General Public License
 along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
 
- 
+
 #include "stdafx.h"
 #include <include/filter/filters_chain.h>
 #include <include/base/string/stringutils.h>
@@ -34,7 +34,7 @@ int FiltersChain::read(char* buffer, u_long len, u_long* nbr)
     return -1;
   if(firstFilter)
     return firstFilter->read(buffer, len, nbr);
-  
+
   return stream->read(buffer, len, nbr);
 }
 
@@ -95,7 +95,7 @@ void FiltersChain::setAcceptDuplicates(int v)
 }
 
 /*!
- *Return if the chain can have the same filter in multiple places. 
+ *Return if the chain can have the same filter in multiple places.
  */
 int FiltersChain::getAcceptDuplicates()
 {
@@ -111,9 +111,9 @@ FiltersChain::~FiltersChain()
 }
 
 /*!
- *Add a filter to the chain. 
+ *Add a filter to the chain.
  *Returns 0 on success.
- *the number of bytes written to initialize the filter. 
+ *the number of bytes written to initialize the filter.
  */
 int FiltersChain::addFilter(Filter* f, u_long *nbw, int sendData)
 {
@@ -153,7 +153,7 @@ int FiltersChain::addFilter(Filter* f, u_long *nbw, int sendData)
     }
   }
 
-  /*! 
+  /*!
    *Add the new filter at the end of the list.
    *The new filter will write directly the old firstFilter.
    */
@@ -167,10 +167,10 @@ int FiltersChain::addFilter(Filter* f, u_long *nbw, int sendData)
   return ret;
 }
 
-/*! 
+/*!
  *Flush remaining data.
  *Additional footer data for filters is added at the end.
- *Returns 0 on success. 
+ *Returns 0 on success.
  */
 int FiltersChain::flush(u_long* nbw)
 {
@@ -192,7 +192,7 @@ int FiltersChain::flush(u_long* nbw)
 
   ;
   /*!
-   *Position on the last element. 
+   *Position on the last element.
    */
   i = filters.end();
 
@@ -209,7 +209,7 @@ int FiltersChain::flush(u_long* nbw)
     f->getParent()->write(buffer, tmpNbw, nbw);
     written += (*nbw);
   }
-  
+
   /*! Set the final value. */
   *nbw = written;
   return 0;
@@ -248,7 +248,7 @@ int FiltersChain::isFilterPresent(const char* name)
 int FiltersChain::removeFilter(Filter* f)
 {
   list<Filter*>::iterator i = filters.begin();
-  list<Filter*>::iterator prev = filters.end();   
+  list<Filter*>::iterator prev = filters.end();
   for( ; i != filters.end(); ++i )
   {
     if(*i == f)
@@ -259,8 +259,8 @@ int FiltersChain::removeFilter(Filter* f)
       }
       else
       {
-        /*! 
-         *It is the first filter according to the linked list. 
+        /*!
+         *It is the first filter according to the linked list.
          *Do not use the getParent function here as it can be a Stream.
          */
         if(i == filters.end())
@@ -281,7 +281,7 @@ int FiltersChain::removeFilter(Filter* f)
     }
     prev = i;
   }
-      
+
   return 0;
 }
 
diff --git a/myserver/src/filter/filters_factory.cpp b/myserver/src/filter/filters_factory.cpp
index 8a0a3be..cb73fd7 100644
--- a/myserver/src/filter/filters_factory.cpp
+++ b/myserver/src/filter/filters_factory.cpp
@@ -15,7 +15,7 @@ You should have received a copy of the GNU General Public License
 along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
 
- 
+
 #include "stdafx.h"
 #include <include/filter/filters_factory.h>
 
@@ -64,7 +64,7 @@ int FiltersFactory::insert(const char* name, FILTERCREATE fnc)
 }
 
 /*!
- *Get a new filter by its name. 
+ *Get a new filter by its name.
  *The object have to be freed after its use to avoid memory leaks.
  *Returns the new created object on success.
  *Returns 0 on errors.
@@ -77,7 +77,7 @@ Filter *FiltersFactory::getFilter(const char* name)
   if(staticFactory)
     return staticFactory(name);
 
- 
+
   dynamicFactory = dynamicFilters.get(name);
 
   if(dynamicFactory)
@@ -87,13 +87,13 @@ Filter *FiltersFactory::getFilter(const char* name)
 }
 
 /*!
- *Create a FiltersChain starting from a list of strings. 
+ *Create a FiltersChain starting from a list of strings.
  *On success returns the new object.
  *If specified [onlyNotModifiers] the method wil check that all the filters
  *will not modify the data.
  *On errors returns 0.
  */
-FiltersChain* FiltersFactory::chain(list<string> &l, Stream* out, u_long *nbw, 
+FiltersChain* FiltersFactory::chain(list<string> &l, Stream* out, u_long *nbw,
                                     int onlyNotModifiers)
 {
   FiltersChain *ret = new FiltersChain();
@@ -114,7 +114,7 @@ FiltersChain* FiltersFactory::chain(list<string> &l, Stream* out, u_long *nbw,
  *will not modify the data.
  *On errors returns nonzero.
  */
-int FiltersFactory::chain(FiltersChain* c, list<string> &l, Stream* out, 
+int FiltersFactory::chain(FiltersChain* c, list<string> &l, Stream* out,
                           u_long *nbw, int onlyNotModifiers)
 {
 
diff --git a/myserver/src/filter/memory_stream.cpp b/myserver/src/filter/memory_stream.cpp
index c8bd270..fb64242 100644
--- a/myserver/src/filter/memory_stream.cpp
+++ b/myserver/src/filter/memory_stream.cpp
@@ -15,7 +15,7 @@ You should have received a copy of the GNU General Public License
 along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
 
- 
+
 #include <include/filter/memory_stream.h>
 
 #include <string>
@@ -45,7 +45,7 @@ int MemoryStream::read(char* buffer, u_long len, u_long *nbr)
  */
 int MemoryStream::read(Stream* s, u_long len, u_long *nbr)
 {
-  u_long towrite = *nbr = std::min(len, static_cast<u_long>(data->getLength() - readSeek));  
+  u_long towrite = *nbr = std::min(len, static_cast<u_long>(data->getLength() - readSeek));
   int ret = s->write(data->getBuffer()+readSeek, towrite, nbr);
   readSeek += towrite;
   return ret;
diff --git a/myserver/src/filter/stream.cpp b/myserver/src/filter/stream.cpp
index afb490a..01581e9 100644
--- a/myserver/src/filter/stream.cpp
+++ b/myserver/src/filter/stream.cpp
@@ -48,8 +48,8 @@ int Stream::write (const char* buffer, u_long len, u_long *nbw)
   return 0;
 }
 
-/*! 
- *Write remaining data to the stream. 
+/*!
+ *Write remaining data to the stream.
  */
 int Stream::flush (u_long* nbw)
 {
@@ -67,7 +67,7 @@ Stream::~Stream ()
 
 }
 
-/*! 
+/*!
  *Get the file handle.
  */
 Handle Stream::getHandle ()
diff --git a/myserver/src/http_handler/cgi/cgi.cpp b/myserver/src/http_handler/cgi/cgi.cpp
index 7b24ae3..25b10d7 100644
--- a/myserver/src/http_handler/cgi/cgi.cpp
+++ b/myserver/src/http_handler/cgi/cgi.cpp
@@ -6,7 +6,7 @@ it under the terms of the GNU General Public License as published by
 the Free Software Foundation; either version 3 of the License, or
 (at your option) any later version.
 
-This program is distributed in the hope that it will be useful, 
+This program is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 GNU General Public License for more details.
@@ -57,9 +57,9 @@ using namespace std;
 int Cgi::send (HttpThreadContext* td, const char* scriptpath,
                const char *cgipath, bool execute, bool onlyHeader)
 {
-   /* 
-   *Use this flag to check if the CGI executable is 
-   *nph (Non Parsed Header).  
+   /*
+   *Use this flag to check if the CGI executable is
+   *nph (Non Parsed Header).
    */
   bool nph = false;
   ostringstream cmdLine;
@@ -73,7 +73,7 @@ int Cgi::send (HttpThreadContext* td, const char* scriptpath,
   string tmpScriptPath;
 
   /*!
-   *Standard CGI uses STDOUT to output the result and the STDIN 
+   *Standard CGI uses STDOUT to output the result and the STDIN
    *to get other params like in a POST request.
    */
   Pipe stdOutFile;
@@ -88,7 +88,7 @@ int Cgi::send (HttpThreadContext* td, const char* scriptpath,
 
   if (!FilesUtility::fileExists (scriptpath))
     return td->http->raiseHTTPError(404);
-  
+
   int subString = cgipath[0] == '"';
   /* Do not modify the text between " and ".  */
   for (i = 1; i < len; i++)
@@ -101,8 +101,8 @@ int Cgi::send (HttpThreadContext* td, const char* scriptpath,
 
   /*
    *Save the cgi path and the possible arguments.
-   *the (x < len) case is when additional arguments are specified. 
-   *If the cgipath is enclosed between " and " do not consider them 
+   *the (x < len) case is when additional arguments are specified.
+   *If the cgipath is enclosed between " and " do not consider them
    *when splitting directory and file name.
    */
   if (i < len)
@@ -121,14 +121,14 @@ int Cgi::send (HttpThreadContext* td, const char* scriptpath,
       moreArg.assign ("");
     }
   FilesUtility::splitPath (tmpCgiPath, td->cgiRoot, td->cgiFile);
-    
+
   tmpScriptPath.assign (scriptpath);
   FilesUtility::splitPath (tmpScriptPath, td->scriptDir, td->scriptFile);
 
   chain.setProtocol (td->http);
   chain.setProtocolData (td);
   chain.setStream (td->connection->socket);
-  
+
   if (execute)
     {
       const char *args = 0;
@@ -192,17 +192,17 @@ int Cgi::send (HttpThreadContext* td, const char* scriptpath,
 
       spi.arg.assign (moreArg);
       spi.arg.append (" ");
-      spi.arg.append (td->scriptFile);    
-    
+      spi.arg.append (td->scriptFile);
+
     cmdLine << "\"" << td->cgiRoot << "/" << td->cgiFile << "\" "
             << moreArg << " " << td->scriptFile;
-  
+
     spi.cmd.assign (td->cgiRoot);
     spi.cmd.append ("/");
     spi.cmd.append (td->cgiFile);
 
-    if (td->cgiFile.length() > 4 && td->cgiFile[0] == 'n'  
-        && td->cgiFile[1] == 'p' && td->cgiFile[2] == 'h' 
+    if (td->cgiFile.length() > 4 && td->cgiFile[0] == 'n'
+        && td->cgiFile[1] == 'p' && td->cgiFile[2] == 'h'
         && td->cgiFile[3] == '-' )
       nph = true;
     else
@@ -210,7 +210,7 @@ int Cgi::send (HttpThreadContext* td, const char* scriptpath,
     }
 
   /*
-   *Open the stdout file for the new CGI process. 
+   *Open the stdout file for the new CGI process.
    */
   if (stdOutFile.create())
     {
@@ -228,14 +228,14 @@ int Cgi::send (HttpThreadContext* td, const char* scriptpath,
       chain.clearAllFilters ();
       return td->http->raiseHTTPError (500);
     }
-  
+
   /*
    *Build the environment string used by the CGI process.
    *Use the td->secondaryBuffer to build the environment string.
    */
   (td->secondaryBuffer->getBuffer ())[0] = '\0';
   Env::buildEnvironmentString (td, td->secondaryBuffer->getBuffer ());
-  
+
   spi.cmdLine = cmdLine.str ();
   spi.cwd.assign (td->scriptDir);
 
@@ -271,11 +271,11 @@ int Cgi::send (HttpThreadContext* td, const char* scriptpath,
         int pid;
         int port;
 
-        ret = Process::getForkServer ()->executeProcess (&spi, 
-                                                         ForkServer::FLAG_USE_IN | 
-                                                         ForkServer::FLAG_USE_OUT | 
-                                                         ForkServer::FLAG_USE_ERR, 
-                                                         &pid, 
+        ret = Process::getForkServer ()->executeProcess (&spi,
+                                                         ForkServer::FLAG_USE_IN |
+                                                         ForkServer::FLAG_USE_OUT |
+                                                         ForkServer::FLAG_USE_ERR,
+                                                         &pid,
                                                          &port);
         cgiProc.setPid (pid);
       }
@@ -313,7 +313,7 @@ int Cgi::send (HttpThreadContext* td, const char* scriptpath,
 /*
  *Read data from the CGI process and send it back to the client.
  */
-int Cgi::sendData (HttpThreadContext* td, Pipe &stdOutFile, FiltersChain& chain, 
+int Cgi::sendData (HttpThreadContext* td, Pipe &stdOutFile, FiltersChain& chain,
                    Process &cgiProc, int onlyHeader, bool nph)
 {
   u_long nbw = 0;
@@ -376,35 +376,35 @@ int Cgi::sendData (HttpThreadContext* td, Pipe &stdOutFile, FiltersChain& chain,
       if (!aliveProcess && !nBytesRead)
         break;
 
-      if (nBytesRead && 
-          HttpDataHandler::appendDataToHTTPChannel (td, 
+      if (nBytesRead &&
+          HttpDataHandler::appendDataToHTTPChannel (td,
                                                     td->secondaryBuffer->getBuffer(),
                                                     nBytesRead,
                                                     &(td->outputData),
                                                     &chain,
-                                                    td->appendOutputs, 
+                                                    td->appendOutputs,
                                                     useChunks))
-        return 0;       
-      
+        return 0;
+
       nbw += nBytesRead;
     }
 
     /* Send the last null chunk if needed.  */
     if(useChunks && chain.getStream ()->write ("0\r\n\r\n", 5, &nbw2))
-      return 0;       
+      return 0;
   }
 
   /* Update the Content-Length field for logging activity.  */
   td->sentData += nbw;
-  return 1;  
+  return 1;
 }
 
 /*!
  *Send the HTTP header.
  *\return nonzero if the reply is already complete.
  */
-int Cgi::sendHeader (HttpThreadContext* td, Pipe &stdOutFile, FiltersChain& chain, 
-                     Process& cgiProc, int onlyHeader, bool nph, u_long procStartTime, 
+int Cgi::sendHeader (HttpThreadContext* td, Pipe &stdOutFile, FiltersChain& chain,
+                     Process& cgiProc, int onlyHeader, bool nph, u_long procStartTime,
                      bool keepalive, bool useChunks, int *ret)
 {
   u_long headerSize = 0;
@@ -424,10 +424,10 @@ int Cgi::sendHeader (HttpThreadContext* td, Pipe &stdOutFile, FiltersChain& chai
        bad influence on the performances.  */
     if (td->secondaryBuffer->getRealLength() - headerOffset - 1 < 512)
       break;
-    
+
     term = stdOutFile.pipeTerminated ();
 
-    if (!term && 
+    if (!term &&
         stdOutFile.waitForData ((timeout - ticks) / 1000, (timeout - ticks) % 1000) == 0)
     {
       td->connection->host->warningsLogWrite (_("Cgi: process %i timeout"), cgiProc.getPid ());
diff --git a/myserver/src/http_handler/mscgi/mscgi_manager.cpp b/myserver/src/http_handler/mscgi/mscgi_manager.cpp
index af670a4..289bca1 100644
--- a/myserver/src/http_handler/mscgi/mscgi_manager.cpp
+++ b/myserver/src/http_handler/mscgi/mscgi_manager.cpp
@@ -115,14 +115,14 @@ char* MscgiManager::getParam(const char* param)
   {
     while((*c) && strncmp(c, param, std::min(strlen(param), strlen(c))))
       c++;
-      
+
     if(*c == '\0')
     {
        return &localbuffer[0];
     }
-    
+
     c += strlen(param);
-    
+
     if(*c == '=')
     {
       c++;
@@ -146,12 +146,12 @@ char* MscgiManager::postParam(const char* param)
   char buffer[LOCAL_BUFFER_DIM + 50];
   u_long nbr = 0;
   char c;
-  
+
   u_long toRead = td->inputData.getFileSize();
 
   buffer[0] = '\0';
   localbuffer[0] = '\0';
-  
+
   if( (toRead == 0) || (toRead == (u_long)-1) )
     return 0;
   do
@@ -204,12 +204,12 @@ char *MscgiManager::operator >>(const char* str)
     return postParam(str);
   else
     return getParam(str);
-} 
+}
 
 /*!
  *Get the value of an environment variable.
  */
-void MscgiManager::getenv(const char* lpszVariableName, char *lpvBuffer, 
+void MscgiManager::getenv(const char* lpszVariableName, char *lpvBuffer,
                         u_long* lpdwSize)
 {
   ((char*)lpvBuffer)[0] = '\0';
@@ -217,12 +217,12 @@ void MscgiManager::getenv(const char* lpszVariableName, char *lpvBuffer,
   size_t variableNameLen = strlen(lpszVariableName);
   for(u_long i = 0; ; i += (u_long)strlen(&localEnv[i]) + 1)
   {
-    if(((localEnv[i+variableNameLen])== '=') && 
+    if(((localEnv[i+variableNameLen])== '=') &&
        (!strncmp(&localEnv[i], lpszVariableName, variableNameLen)))
     {
       u_long j = 0;
       u_long min_v = std::min((u_long)strlen(&localEnv[i + variableNameLen+1]),
-                              (u_long)(*lpvBuffer)-1); 
+                              (u_long)(*lpvBuffer)-1);
       for(j = 0; j < min_v; j++)
         lpvBuffer[j] = localEnv[i + variableNameLen + j + 1];
       lpvBuffer[j] = '\0';
@@ -237,7 +237,7 @@ void MscgiManager::getenv(const char* lpszVariableName, char *lpvBuffer,
 }
 
 /*!
- *Returns the CGI data structure. 
+ *Returns the CGI data structure.
  *This structure is shared with the MyServer core so use it carefully!
  */
 MsCgiData* MscgiManager::getCgiData()
diff --git a/myserver/src/http_handler/proxy/proxy.cpp b/myserver/src/http_handler/proxy/proxy.cpp
index 743123d..26d7ab1 100644
--- a/myserver/src/http_handler/proxy/proxy.cpp
+++ b/myserver/src/http_handler/proxy/proxy.cpp
@@ -184,7 +184,7 @@ int Proxy::flushToClient (HttpThreadContext* td, Socket& client,
       hasTransferEncoding = false;
       transferEncoding.assign (*tmp);
     }
-  
+
 
   if (useChunks)
     td->response.setValue ("Transfer-Encoding", "chunked");
diff --git a/myserver/src/log/stream/console_stream.cpp b/myserver/src/log/stream/console_stream.cpp
index 0259f3c..421a95d 100644
--- a/myserver/src/log/stream/console_stream.cpp
+++ b/myserver/src/log/stream/console_stream.cpp
@@ -19,7 +19,7 @@
 #include <include/server/server.h>
 
 ConsoleStream::ConsoleStream (FiltersFactory* ff, u_long cycle, Stream* out,
-                              FiltersChain* fc) :  
+                              FiltersChain* fc) :
   LogStream (ff, cycle, out, fc)
 {
 }
diff --git a/myserver/src/log/stream/console_stream_creator.cpp b/myserver/src/log/stream/console_stream_creator.cpp
index 03b846d..b38372f 100644
--- a/myserver/src/log/stream/console_stream_creator.cpp
+++ b/myserver/src/log/stream/console_stream_creator.cpp
@@ -18,7 +18,7 @@
 #include <include/log/stream/console_stream_creator.h>
 
 LogStream*
-ConsoleStreamCreator::create (FiltersFactory* ff, string location, 
+ConsoleStreamCreator::create (FiltersFactory* ff, string location,
                               list<string>& filters, u_long cycle)
 {
   Console* out = new Console ();
diff --git a/myserver/src/log/stream/file_stream.cpp b/myserver/src/log/stream/file_stream.cpp
index e5243e8..447097b 100644
--- a/myserver/src/log/stream/file_stream.cpp
+++ b/myserver/src/log/stream/file_stream.cpp
@@ -17,15 +17,15 @@
 
 #include <include/log/stream/file_stream.h>
 
-int const FileStream::defaultFileMask = 
-  File::APPEND | 
+int const FileStream::defaultFileMask =
+  File::APPEND |
   File::FILE_OPEN_ALWAYS |
-  File::WRITE | 
-  File::READ | 
+  File::WRITE |
+  File::READ |
   File::NO_INHERIT;
 
 FileStream::FileStream (FiltersFactory* ff, u_long cycle, Stream* out,
-                        FiltersChain* fc) : 
+                        FiltersChain* fc) :
   LogStream (ff, cycle, out, fc)
 {
 }
@@ -68,7 +68,7 @@ FileStream::makeNewFileName (string oldFileName)
 
   getRFC822LocalTime (time, 32);
   time = trim (time.substr (5, 32));
-    
+
   for (int i = 0; i < static_cast<int>(time.length ()); i++)
     if ((time[i] == ' ') || (time[i] == ':'))
       time[i]= '.';
diff --git a/myserver/src/log/stream/file_stream_creator.cpp b/myserver/src/log/stream/file_stream_creator.cpp
index a509cfd..9330cee 100644
--- a/myserver/src/log/stream/file_stream_creator.cpp
+++ b/myserver/src/log/stream/file_stream_creator.cpp
@@ -18,7 +18,7 @@
 #include <include/log/stream/file_stream_creator.h>
 
 LogStream*
-FileStreamCreator::create (FiltersFactory* ff, string location, 
+FileStreamCreator::create (FiltersFactory* ff, string location,
                            list<string>& filters, u_long cycle)
 {
   File* out = new File ();
diff --git a/myserver/src/log/stream/socket_stream.cpp b/myserver/src/log/stream/socket_stream.cpp
index 2f9e0c9..c1957e7 100644
--- a/myserver/src/log/stream/socket_stream.cpp
+++ b/myserver/src/log/stream/socket_stream.cpp
@@ -20,7 +20,7 @@
 SocketStream::SocketStream (FiltersFactory* filtersFactory,
                             u_long cycleLog,
                             Stream* outStream,
-                            FiltersChain* filtersChain) : 
+                            FiltersChain* filtersChain) :
   LogStream (filtersFactory,
              cycleLog,
              outStream,
diff --git a/myserver/src/log/stream/socket_stream_creator.cpp b/myserver/src/log/stream/socket_stream_creator.cpp
index d3f110c..59450aa 100644
--- a/myserver/src/log/stream/socket_stream_creator.cpp
+++ b/myserver/src/log/stream/socket_stream_creator.cpp
@@ -18,7 +18,7 @@
 #include <include/log/stream/socket_stream_creator.h>
 
 LogStream*
-SocketStreamCreator::create (FiltersFactory* ff, string location, 
+SocketStreamCreator::create (FiltersFactory* ff, string location,
                              list<string>& filters, u_long cycle)
 {
   Socket* out = new Socket ();
diff --git a/myserver/src/plugin/plugin_info.cpp b/myserver/src/plugin/plugin_info.cpp
index 693ca01..ce78fcd 100755
--- a/myserver/src/plugin/plugin_info.cpp
+++ b/myserver/src/plugin/plugin_info.cpp
@@ -26,12 +26,12 @@ Regex* PluginInfo::regex = new Regex("^[1-2]?[1-9]?[0-9](\\.[1-2]?[0-9]?[0-9](\\
 /*!
  *Construct a plugin info object.
  *\param name plugin name.
- *\param enabled is true if the plugin has to be enabled. 
+ *\param enabled is true if the plugin has to be enabled.
  *\param global is true if the plugin's symbols have to be loaded globally.
  */
 PluginInfo::PluginInfo(string& name, bool enabled, bool global)
 {
-  this->name = name;	
+  this->name = name;
   this->enabled = enabled;
   this->global = global;
   this->version = 0;
@@ -45,7 +45,7 @@ PluginInfo::PluginInfo(string& name, bool enabled, bool global)
 
 /*!
  *Destroy the object.
-*/	
+*/
 PluginInfo::~PluginInfo()
 {
   if (this->plugin)
@@ -54,10 +54,10 @@ PluginInfo::~PluginInfo()
 
 /*!
  *Returns true if the plugin is enabled.
-*/		
+*/
 bool PluginInfo::isEnabled()
 {
-  return this->enabled;	
+  return this->enabled;
 }
 
 /*!
@@ -65,9 +65,9 @@ bool PluginInfo::isEnabled()
 */
 bool PluginInfo::isGlobal()
 {
-  return this->global;	
+  return this->global;
 }
-	
+
 /*!
  * Adds a dependence to the plugin.
  *\param name plugin name
@@ -75,10 +75,10 @@ bool PluginInfo::isGlobal()
  *\param maxVersion max version for the dependence.
 */
 void PluginInfo::addDependence(string name, int minVersion, int maxVersion)
-{	
+{
   dependences.put(name, new pair<int,int>(minVersion,maxVersion));
 }
-	
+
 /*!
  * Returns the plugin version.
 */
@@ -102,7 +102,7 @@ int PluginInfo::getMyServerMinVersion()
 {
   return this->msMinVersion;
 }
-	
+
 
 /*!
  * Returns the maximum MyServer version plugin is compatible.
@@ -121,7 +121,7 @@ int PluginInfo::setMyServerMinVersion(int v)
   this->msMinVersion = v;
   return this->msMinVersion;
 }
-	
+
 /*!
  * Sets the maximum MyServer version plugin is compatible.
 */
@@ -152,14 +152,14 @@ Plugin* PluginInfo::getPlugin()
 */
 void PluginInfo::setEnabled(bool enabled)
 {
-  this->enabled = enabled;	
+  this->enabled = enabled;
 }
 
 /*!
  * Returns the depandence, if any exists, with a plugin with the specified name.
 */
 pair<int,int>* PluginInfo::getDependence(string name)
-{   
+{
 	if(dependences.empty())
 	  return NULL;
 	if (!this->dependences.containsKey(name))
@@ -195,29 +195,29 @@ Plugin* PluginInfo::removePlugin()
 */
 int PluginInfo::convertVersion(string* s)
 {
-	
+
   int ret = regex->exec(s->c_str(),0,NULL,0);
 
   if (ret!=0)
-    return -1;	
-  	
+    return -1;
+
   string::size_type pos = s->find(".",0);
   if (pos == string::npos)
     return atoi(s->c_str()) << 24;
-    
+
   int n1 = 0;
   int n2 = 0;
   int n3 = 0;
   int n4 = 0;
-  
+
   string sa = s->substr(0,pos);
   n1 = atoi(sa.c_str());
   if (n1>255)
     return -1;
 
   string::size_type oldpos = pos;
-  
-  
+
+
   if (oldpos!=string::npos)
   {
   	pos = s->find(".",oldpos+1);
@@ -226,8 +226,8 @@ int PluginInfo::convertVersion(string* s)
     if (n2>255)
       return -1;
   }
-  
-  
+
+
   oldpos = pos;
   if (oldpos!=string::npos)
   {
@@ -237,8 +237,8 @@ int PluginInfo::convertVersion(string* s)
     if (n3>255)
       return -1;
   }
-  
-  
+
+
   oldpos = pos;
   if (oldpos!=string::npos)
   {
diff --git a/myserver/src/protocol/control/control_header.cpp b/myserver/src/protocol/control/control_header.cpp
index 871cc1f..d11cf3e 100755
--- a/myserver/src/protocol/control/control_header.cpp
+++ b/myserver/src/protocol/control/control_header.cpp
@@ -20,7 +20,7 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #include <include/protocol/control/control_header.h>
 #include <include/base/xml/xml_parser.h>
 #include <include/protocol/control/control_errors.h>
-extern "C" 
+extern "C"
 {
 #ifdef WIN32
 #include <direct.h>
@@ -175,20 +175,20 @@ int ControlHeader::parse_header(char *buffer, int bufferlen, int *len)
 
       /*! Get the length of the field name. */
       fieldLen = getCharInString(field, " ", 32);
-      
+
       /*! Return nonzero on errors. */
       if(fieldLen == -1)
         return CONTROL_MALFORMED;
 
-      /*! 
-       *For first line field name is the command itself. 
+      /*!
+       *For first line field name is the command itself.
        *Do not copy initial /.
        */
       myserver_strlcpy(command, field, std::min(fieldLen + 1 , 32) );
-      
+
       /*! Update the offset. */
       offset += fieldLen + 1;
-      
+
       int versionLen = getCharInString(offset, " \r", 32);
       if(versionLen == -1)
         return CONTROL_MALFORMED;
@@ -255,18 +255,18 @@ int ControlHeader::parse_header(char *buffer, int bufferlen, int *len)
         myserver_strlcpy(tmp_buff, offset, std::min(len + 1 , 12));
         length = atoi(tmp_buff);
         offset += len + 2;
-      }   
+      }
       else
       {
         int len = getCharInString(offset, "\r", 32);
         if(len == -1)
           return CONTROL_MALFORMED;
         offset += len + 2;
-      }   
+      }
     }
     /*! Increment the nLine value for the next line parsing. */
     nLine++;
-    
+
     /*! Do we need more than 20 lines? */
     if(nLine > 20)
       return CONTROL_MALFORMED;
diff --git a/myserver/src/protocol/ftp/ftp_parser.cpp b/myserver/src/protocol/ftp/ftp_parser.cpp
index deea0ab..09fa198 100644
--- a/myserver/src/protocol/ftp/ftp_parser.cpp
+++ b/myserver/src/protocol/ftp/ftp_parser.cpp
@@ -2,20 +2,20 @@
 /* A Bison parser, made by GNU Bison 2.4.1.  */
 
 /* Skeleton implementation for Bison's Yacc-like parsers in C
-   
+
       Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
    Free Software Foundation, Inc.
-   
+
    This program 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 3 of the License, or
    (at your option) any later version.
-   
+
    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.
-   
+
    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
@@ -28,7 +28,7 @@
    special exception, which will cause the skeleton and the resulting
    Bison output files to be licensed under the GNU General Public
    License without this special exception.
-   
+
    This special exception was added by the Free Software Foundation in
    version 2.2 of Bison.  */
 
diff --git a/myserver/src/protocol/http/dyn_http_command.cpp b/myserver/src/protocol/http/dyn_http_command.cpp
index e988ea1..9bcae78 100755
--- a/myserver/src/protocol/http/dyn_http_command.cpp
+++ b/myserver/src/protocol/http/dyn_http_command.cpp
@@ -23,7 +23,7 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 /*!
  *Default constructor.
  */
-DynamicHttpCommand::DynamicHttpCommand(string& name) 
+DynamicHttpCommand::DynamicHttpCommand(string& name)
 {
   this->name = name;
 }
@@ -31,7 +31,7 @@ DynamicHttpCommand::DynamicHttpCommand(string& name)
 /*!
  *Default constructor.
  */
-string DynamicHttpCommand::getName() 
+string DynamicHttpCommand::getName()
 {
   return name;
 }
diff --git a/myserver/src/protocol/http/dyn_http_manager.cpp b/myserver/src/protocol/http/dyn_http_manager.cpp
index d9306ea..cdaa155 100755
--- a/myserver/src/protocol/http/dyn_http_manager.cpp
+++ b/myserver/src/protocol/http/dyn_http_manager.cpp
@@ -26,7 +26,7 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 /*!
  *Default constructor.
  */
-DynamicHttpManager::DynamicHttpManager() 
+DynamicHttpManager::DynamicHttpManager()
 {
 
 }
diff --git a/myserver/src/protocol/http/dyn_http_manager_list.cpp b/myserver/src/protocol/http/dyn_http_manager_list.cpp
index 705e68a..2851569 100755
--- a/myserver/src/protocol/http/dyn_http_manager_list.cpp
+++ b/myserver/src/protocol/http/dyn_http_manager_list.cpp
@@ -27,7 +27,7 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 /*!
  *Initialize the object.
  */
-DynHttpManagerList::DynHttpManagerList () 
+DynHttpManagerList::DynHttpManagerList ()
 {
 
 }
diff --git a/myserver/src/protocol/http/env/env.cpp b/myserver/src/protocol/http/env/env.cpp
index a1fa59d..08bd0c8 100644
--- a/myserver/src/protocol/http/env/env.cpp
+++ b/myserver/src/protocol/http/env/env.cpp
@@ -6,7 +6,7 @@ it under the terms of the GNU General Public License as published by
 the Free Software Foundation; either version 3 of the License, or
 (at your option) any later version.
 
-This program is distributed in the hope that it will be useful, 
+This program is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 GNU General Public License for more details.
@@ -40,10 +40,10 @@ using namespace std;
  *This function is used by other server side protocols too.
  *\param td The HTTP thread context.
  *\param cgiEnv The zero terminated list of environment string.
- *\param processEnv Specify if add current process environment 
+ *\param processEnv Specify if add current process environment
  *variables too.
  */
-void Env::buildEnvironmentString(HttpThreadContext* td, char *cgiEnv, 
+void Env::buildEnvironmentString(HttpThreadContext* td, char *cgiEnv,
                                  int processEnv)
 {
   MemBuf memCgi;
@@ -66,36 +66,36 @@ void Env::buildEnvironmentString(HttpThreadContext* td, char *cgiEnv,
 #endif
   /* Must use REDIRECT_STATUS for php and others.  */
   memCgi << end_str << "REDIRECT_STATUS=TRUE";
-  
+
   memCgi << end_str << "SERVER_NAME=";
   memCgi << Server::getInstance()->getServerName();
-  
+
   memCgi << end_str << "SERVER_SIGNATURE=";
   memCgi << "<address>GNU MyServer " << MYSERVER_VERSION << "</address>";
-  
+
   memCgi << end_str << "SERVER_PROTOCOL=";
-  memCgi << td->request.ver.c_str();  
-  
+  memCgi << td->request.ver.c_str();
+
   portBuffer.uintToStr( td->connection->getLocalPort());
   memCgi << end_str << "SERVER_PORT="<< portBuffer;
 
   memCgi << end_str << "SERVER_ADMIN=";
-  memCgi << td->securityToken.getHashedData ("server.admin", 
+  memCgi << td->securityToken.getHashedData ("server.admin",
                                              MYSERVER_VHOST_CONF |
                                              MYSERVER_SERVER_CONF, "");
 
   memCgi << end_str << "REQUEST_METHOD=";
   memCgi << td->request.cmd.c_str();
-  
+
   memCgi << end_str << "REQUEST_URI=";
-  
+
   memCgi << td->request.uri.c_str();
 
   memCgi << end_str << "QUERY_STRING=";
   memCgi << td->request.uriOpts.c_str();
-  
+
   memCgi << end_str << "GATEWAY_INTERFACE=CGI/1.1";
-  
+
   if(td->request.contentLength.length())
   {
     memCgi << end_str << "CONTENT_LENGTH=";
@@ -105,7 +105,7 @@ void Env::buildEnvironmentString(HttpThreadContext* td, char *cgiEnv,
   {
     u_long fs = 0;
     ostringstream stream;
- 
+
     if(td->inputData.getHandle())
       fs = td->inputData.getFileSize();
 
@@ -129,7 +129,7 @@ void Env::buildEnvironmentString(HttpThreadContext* td, char *cgiEnv,
     {
       rangeBuffer << td->request.rangeByteEnd;
       memCgi << rangeBuffer.str();
-    }   
+    }
 
   }
 
@@ -144,7 +144,7 @@ void Env::buildEnvironmentString(HttpThreadContext* td, char *cgiEnv,
 
   memCgi << end_str << "REMOTE_USER=";
   memCgi << td->connection->getLogin();
-  
+
   if(td->http->getProtocolOptions() & PROTOCOL_USES_SSL)
     memCgi << end_str << "SSL=ON";
   else
@@ -155,7 +155,7 @@ void Env::buildEnvironmentString(HttpThreadContext* td, char *cgiEnv,
   {
     memCgi << end_str << "PATH_INFO=";
     memCgi << td->pathInfo;
-      
+
     memCgi << end_str << "PATH_TRANSLATED=";
     memCgi << td->pathTranslated;
   }
@@ -167,9 +167,9 @@ void Env::buildEnvironmentString(HttpThreadContext* td, char *cgiEnv,
 
   memCgi << end_str << "SCRIPT_FILENAME=";
   memCgi << td->filenamePath;
-  
+
   /*
-   *For the DOCUMENT_URI and SCRIPT_NAME copy the 
+   *For the DOCUMENT_URI and SCRIPT_NAME copy the
    *requested uri without the pathInfo.
    */
   memCgi << end_str << "SCRIPT_NAME=";
@@ -230,14 +230,14 @@ void Env::buildHttpHeaderEnvString(MemBuf& memCgi, HttpRequestHeader & req)
   {
     HttpRequestHeader::Entry* en = *it;
     string name;
-    
+
     name.assign("HTTP_");
     name.append(en->name->c_str());
     transform(name.begin()+5, name.end(), name.begin()+5, ::toupper);
     for(int i = name.length(); i > 5; i--)
       if(name[i] == '-')
         name[i] = '_';
-    
+
     memCgi  << end_str << name.c_str() << "=" << en->value->c_str();
   }
 }
@@ -248,13 +248,13 @@ void Env::buildHttpHeaderEnvString(MemBuf& memCgi, HttpRequestHeader & req)
 void Env::buildProcessEnvString(MemBuf& memCgi)
 {
 #ifdef WIN32
-  LPTSTR lpszVariable; 
-  LPVOID lpvEnv; 
+  LPTSTR lpszVariable;
+  LPVOID lpvEnv;
   lpvEnv = Server::getInstance()->getEnvString();
   memCgi << end_str;
   if (lpvEnv)
-    for (lpszVariable = (LPTSTR) lpvEnv; *lpszVariable; lpszVariable++) 
-    { 
+    for (lpszVariable = (LPTSTR) lpvEnv; *lpszVariable; lpszVariable++)
+    {
       if(((char*)lpszVariable)[0]  != '=' )
       {
         memCgi << (char*)lpszVariable << end_str;
diff --git a/myserver/src/protocol/http/http.cpp b/myserver/src/protocol/http/http.cpp
index a86ce26..2f38639 100644
--- a/myserver/src/protocol/http/http.cpp
+++ b/myserver/src/protocol/http/http.cpp
@@ -280,7 +280,7 @@ int Http::getFilePermissions (string& filename, string& directory, string& file,
 
       if (FilesUtility::isLink (td->filenamePath.c_str ()))
         {
-          const char *perm = td->securityToken.getHashedData ("symlinks.follow", 
+          const char *perm = td->securityToken.getHashedData ("symlinks.follow",
                               MYSERVER_VHOST_CONF | MYSERVER_SERVER_CONF, "NO");
 
           if (!perm || strcmpi (perm, "YES"))
diff --git a/myserver/src/protocol/http/http_data_handler.cpp b/myserver/src/protocol/http/http_data_handler.cpp
index 97daa19..8d37368 100644
--- a/myserver/src/protocol/http/http_data_handler.cpp
+++ b/myserver/src/protocol/http/http_data_handler.cpp
@@ -6,7 +6,7 @@ it under the terms of the GNU General Public License as published by
 the Free Software Foundation; either version 3 of the License, or
 (at your option) any later version.
 
-This program is distributed in the hope that it will be useful, 
+This program is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 GNU General Public License for more details.
diff --git a/myserver/src/protocol/http/http_data_read.cpp b/myserver/src/protocol/http/http_data_read.cpp
index afb3744..d8e17f3 100644
--- a/myserver/src/protocol/http/http_data_read.cpp
+++ b/myserver/src/protocol/http/http_data_read.cpp
@@ -223,7 +223,7 @@ int HttpDataRead::readChunkedPostData(const char* inBuffer,
  *\param td The Active thread context.
  *\param httpRetCode The HTTP error to report to the client.
  *\return Return 0 on success.
- *\return Return -1 on irreversible error and 
+ *\return Return -1 on irreversible error and
  *        the connection should be removed immediately.
  *\return Any other value is a protocol error specified in HTTPRETCODE.
  */
diff --git a/myserver/src/protocol/http/http_request.cpp b/myserver/src/protocol/http/http_request.cpp
index fff336f..a9dc63b 100755
--- a/myserver/src/protocol/http/http_request.cpp
+++ b/myserver/src/protocol/http/http_request.cpp
@@ -102,57 +102,57 @@ string* HttpRequestHeader::getValue(const char* name, string* out)
     if(out)
       out->assign(cmd.c_str());
     return &cmd;
-  }  
+  }
 
   if(!strcmpi(name, "ver"))
-  { 
+  {
     if(out)
-      out->assign(ver.c_str()); 
+      out->assign(ver.c_str());
     return &ver;
   }
- 
+
   if(!strcmpi(name, "uri"))
-  { 
+  {
     if(out)
-      out->assign(uri.c_str()); 
+      out->assign(uri.c_str());
     return &uri;
-  } 
- 
+  }
+
   if(!strcmpi(name, "uriOpts"))
-  { 
+  {
     if(out)
       out->assign(uriOpts.c_str());
     return &uriOpts;
-  } 
+  }
 
  if(!strcmpi(name, "Authorization"))
- { 
+ {
    if(out)
-     out->assign(auth.c_str()); 
+     out->assign(auth.c_str());
    return &auth;
  }
- 
+
  if(!strcmpi(name, "Content-Length"))
- { 
+ {
    if(out)
-     out->assign(contentLength.c_str()); 
+     out->assign(contentLength.c_str());
    return &contentLength;
- } 
+ }
 
  if(!strcmpi(name, "rangeType"))
- { 
+ {
    if(out)
-     out->assign(rangeType.c_str()); 
+     out->assign(rangeType.c_str());
    return &rangeType;
- } 
- 
+ }
+
  if(!strcmpi(name, "rangeByteBegin"))
  {
    ostringstream s;
    s << rangeByteBegin;
    if(out)
      out->assign(s.str());
-   return 0; 
+   return 0;
  }
 
  if(!strcmpi(name, "rangeByteEnd"))
@@ -161,7 +161,7 @@ string* HttpRequestHeader::getValue(const char* name, string* out)
    s << rangeByteEnd;
    if(out)
      out->assign(s.str());
-   return 0; 
+   return 0;
  }
 
  {
@@ -169,7 +169,7 @@ string* HttpRequestHeader::getValue(const char* name, string* out)
    if(e)
    {
      if(out)
-       out->assign(*(e->value));      
+       out->assign(*(e->value));
      return (e->value);
    }
    return 0;
@@ -188,54 +188,54 @@ string* HttpRequestHeader::setValue(const char* name, const char* in)
   {
     cmd.assign(in);
     return &cmd;
-  }  
+  }
 
   if(!strcmpi(name, "ver"))
-  { 
+  {
     ver.assign(in);
     return &ver;
   }
- 
+
   if(!strcmpi(name, "uri"))
-  { 
+  {
     uri.assign(in);
     return &uri;
-  } 
- 
+  }
+
   if(!strcmpi(name, "uriOpts"))
-  { 
+  {
     uriOpts.assign(in);
     return &uriOpts;
-  } 
+  }
 
  if(!strcmpi(name, "Authorization"))
- { 
+ {
    auth.assign(in);
    return &auth;
  }
- 
+
  if(!strcmpi(name, "Content-Length"))
- { 
+ {
    contentLength.assign(in);
    return &contentLength;
- } 
+ }
 
  if(!strcmpi(name, "rangeType"))
- { 
+ {
    rangeType.assign(in);
    return &rangeType;
- } 
- 
+ }
+
  if(!strcmpi(name, "rangeByteBegin"))
  {
    rangeByteBegin = atoi(in);
-   return 0; 
+   return 0;
  }
 
  if(!strcmpi(name, "rangeByteEnd"))
  {
    rangeByteEnd = atoi(in);
-   return 0; 
+   return 0;
  }
 
  {
diff --git a/myserver/src/protocol/http/http_response.cpp b/myserver/src/protocol/http/http_response.cpp
index 03ab770..b6876d3 100755
--- a/myserver/src/protocol/http/http_response.cpp
+++ b/myserver/src/protocol/http/http_response.cpp
@@ -46,7 +46,7 @@ HttpResponseHeader::~HttpResponseHeader()
  */
 void HttpResponseHeader::free()
 {
-  ver.clear();  
+  ver.clear();
   serverName.clear();
   contentType.clear();
   connection.clear();
@@ -55,7 +55,7 @@ void HttpResponseHeader::free()
   contentLength.clear();
   errorType.clear();
   location.clear();
-  date.clear();    
+  date.clear();
   auth.clear();
   dateExp.clear();
   {
@@ -78,89 +78,89 @@ string* HttpResponseHeader::getValue(const char* name, string* out)
     if(out)
       out->assign(ver.c_str());
     return &ver;
-  }  
+  }
 
   if(!strcmpi(name, "Server"))
-  { 
+  {
     if(out)
-      out->assign(serverName.c_str()); 
+      out->assign(serverName.c_str());
     return &ver;
   }
 
   if(!strcmpi(name, "Content-Type"))
-  { 
+  {
     if(out)
-      out->assign(contentType.c_str()); 
+      out->assign(contentType.c_str());
     return &contentType;
   }
 
   if(!strcmpi(name, "Connection"))
-  { 
+  {
     if(out)
-      out->assign(connection.c_str()); 
+      out->assign(connection.c_str());
     return &connection;
   }
 
   if(!strcmpi(name, "Content-Type"))
-  { 
+  {
     if(out)
-      out->assign(contentType.c_str()); 
+      out->assign(contentType.c_str());
     return &contentType;
   }
 
   if(!strcmpi(name, "MIME-Version"))
-  { 
+  {
     if(out)
-      out->assign(mimeVer.c_str()); 
+      out->assign(mimeVer.c_str());
     return &mimeVer;
   }
 
   if(!strcmpi(name, "Cookie"))
-  { 
+  {
     if(out)
-      out->assign(cookie.c_str()); 
+      out->assign(cookie.c_str());
     return &cookie;
   }
 
   if(!strcmpi(name, "Content-Length"))
-  { 
+  {
     if(out)
-      out->assign(contentLength.c_str()); 
+      out->assign(contentLength.c_str());
     return &contentLength;
   }
 
   if(!strcmpi(name, "Last-Modified"))
-  { 
+  {
     if(out)
-      out->assign(lastModified.c_str()); 
+      out->assign(lastModified.c_str());
     return &lastModified;
   }
 
   if(!strcmpi(name, "Location"))
-  { 
+  {
     if(out)
-      out->assign(location.c_str()); 
+      out->assign(location.c_str());
     return &location;
   }
 
   if(!strcmpi(name, "Date"))
-  { 
+  {
     if(out)
-      out->assign(date.c_str()); 
+      out->assign(date.c_str());
     return &date;
   }
 
   if(!strcmpi(name, "Date-Expires"))
-  { 
+  {
     if(out)
-      out->assign(dateExp.c_str()); 
+      out->assign(dateExp.c_str());
     return &dateExp;
   }
 
   if(!strcmpi(name, "WWW-Authenticate"))
-  { 
+  {
     if(out)
-      out->assign(auth.c_str()); 
+      out->assign(auth.c_str());
     return &auth;
   }
 
@@ -174,7 +174,7 @@ string* HttpResponseHeader::getValue(const char* name, string* out)
     }
     return 0;
   }
-} 
+}
 
 
 /*!
@@ -186,76 +186,76 @@ string* HttpResponseHeader::setValue(const char* name, const char* in)
   {
     ver.assign(in);
     return &ver;
-  }  
+  }
 
   if(!strcmpi(name, "Server"))
-  { 
+  {
     serverName.assign(in);
     return &ver;
   }
 
   if(!strcmpi(name, "Content-Type"))
-  { 
+  {
     contentType.assign(in);
     return &contentType;
   }
 
   if(!strcmpi(name, "Connection"))
-  { 
+  {
     connection.assign(in);
     return &connection;
   }
 
   if(!strcmpi(name, "Content-Type"))
-  { 
+  {
     contentType.assign(in);
     return &contentType;
   }
 
   if(!strcmpi(name, "MIME-Version"))
-  { 
+  {
     mimeVer.assign(in);
     return &mimeVer;
   }
 
   if(!strcmpi(name, "Cookie"))
-  { 
+  {
     cookie.assign(in);
     return &cookie;
   }
 
   if(!strcmpi(name, "Content-Length"))
-  { 
+  {
     contentLength.assign(in);
     return &contentLength;
   }
 
   if(!strcmpi(name, "Last-Modified"))
-  { 
+  {
     lastModified.assign(in);
     return &lastModified;
   }
 
   if(!strcmpi(name, "Location"))
-  { 
+  {
     location.assign(in);
     return &location;
   }
 
   if(!strcmpi(name, "Date"))
-  { 
+  {
     date.assign(in);
     return &date;
   }
 
   if(!strcmpi(name, "Date-Expires"))
-  { 
+  {
     dateExp.assign(in);
     return &dateExp;
   }
 
   if(!strcmpi(name, "WWW-Authenticate"))
-  { 
+  {
     auth.assign(in);
     return &auth;
   }
@@ -277,7 +277,7 @@ string* HttpResponseHeader::setValue(const char* name, const char* in)
 
     return 0;
   }
-} 
+}
 
 /*!
  *Get the kind of HTTP status code specified by the httpStatus variable.
@@ -290,12 +290,12 @@ int HttpResponseHeader::getStatusType()
 
   if (httpStatus < 300)
     return HttpResponseHeader::SUCCESSFUL;
-  
+
   if (httpStatus < 400)
     return HttpResponseHeader::REDIRECTION;
 
   if (httpStatus < 500)
     return HttpResponseHeader::CLIENT_ERROR;
-  
+
   return HttpResponseHeader::SERVER_ERROR;
 }
diff --git a/myserver/src/protocol/https/https.cpp b/myserver/src/protocol/https/https.cpp
index 196519d..e066ff5 100755
--- a/myserver/src/protocol/https/https.cpp
+++ b/myserver/src/protocol/https/https.cpp
@@ -18,7 +18,7 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #include <include/protocol/protocol.h>
 #include <include/protocol/https/https.h>
 
-extern "C" 
+extern "C"
 {
 #ifdef WIN32
 #include <direct.h>
@@ -32,7 +32,7 @@ extern "C"
 
 
 /*!
- *Returns the name of the protocol. If an out buffer is defined 
+ *Returns the name of the protocol. If an out buffer is defined
  *fullfill it with the name too.
  */
 char* Https::registerNameImpl(char* out, int len)
@@ -52,7 +52,7 @@ char* Https::registerName(char* out, int len)
 /*!
  *Https class constructor.
  */
-Https::Https() 
+Https::Https()
 {
   protocolPrefix.assign("https://");
   protocolOptions = PROTOCOL_USES_SSL;
diff --git a/myserver/src/protocol/protocol.cpp b/myserver/src/protocol/protocol.cpp
index 573e6cc..f73095d 100755
--- a/myserver/src/protocol/protocol.cpp
+++ b/myserver/src/protocol/protocol.cpp
@@ -44,7 +44,7 @@ int Protocol::controlConnection (ConnectionPtr /*a*/,char* /*b1*/,
 }
 
 /*!
- * Returns the name of the protocol. If an out buffer is 
+ * Returns the name of the protocol. If an out buffer is
  * defined fullfill it with the name too.
  */
 char* Protocol::registerName (char* /*out*/,int /*len*/)
diff --git a/myserver/src/protocol/protocol_buffer.cpp b/myserver/src/protocol/protocol_buffer.cpp
index 10a0d67..f8186a6 100644
--- a/myserver/src/protocol/protocol_buffer.cpp
+++ b/myserver/src/protocol/protocol_buffer.cpp
@@ -34,7 +34,7 @@ ProtocolBuffer::~ProtocolBuffer()
 }
 
 /*!
- *Check if the protocol allows the connection to be removed. 
+ *Check if the protocol allows the connection to be removed.
  *\param wait Define if the protocol can wait that the current job is
  *finished before.
  */
diff --git a/myserver/src/protocol/protocols_manager.cpp b/myserver/src/protocol/protocols_manager.cpp
index 7bc933d..ff3fc5b 100755
--- a/myserver/src/protocol/protocols_manager.cpp
+++ b/myserver/src/protocol/protocols_manager.cpp
@@ -19,7 +19,7 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #include <include/protocol/protocols_manager.h>
 #include <string>
 #include <algorithm>
-#include <cctype> 
+#include <cctype>
 
 /*!
  * Class constructor.
diff --git a/myserver/src/server/server.cpp b/myserver/src/server/server.cpp
index f5f296b..7e4454e 100644
--- a/myserver/src/server/server.cpp
+++ b/myserver/src/server/server.cpp
@@ -19,11 +19,9 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #include <include/server/server.h>
 #include <include/server/clients_thread.h>
 #include <include/base/safetime/safetime.h>
-
-/*! Include headers for built-in protocols.  */
-#include <include/protocol/http/http.h>  /*Include the HTTP protocol.  */
-#include <include/protocol/https/https.h> /*Include the HTTPS protocol.  */
-#include <include/protocol/control/control_protocol.h> /*Include the control protocol.  */
+#include <include/protocol/http/http.h>
+#include <include/protocol/https/https.h>
+#include <include/protocol/control/control_protocol.h>
 #include <include/protocol/ftp/ftp.h>
 #include <include/base/string/stringutils.h>
 #include <include/base/socket/socket.h>
@@ -140,9 +138,9 @@ bool Server::resetConfigurationPaths (string &mainConf, string &mimeConf,
 }
 
 /*!
- *Check that the configuration paths are not empty, otherwise fall back to
- *the default ones.
- *Returns nonzero on error.
+  *Check that the configuration paths are not empty, otherwise fall back to
+ * the default ones.
+ * Returns nonzero on error.
  */
 int Server::checkConfigurationPaths ()
 {
@@ -183,8 +181,8 @@ int Server::checkConfigurationPaths ()
 }
 
 /*!
- *Copy a configuration file from the default one.
- *Return nonzero on errors.
+ * Copy a configuration file from the default one.
+ * Return nonzero on errors.
  */
 int Server::copyConfigurationFromDefault (const char *fileName)
 {
@@ -220,22 +218,20 @@ int Server::copyConfigurationFromDefault (const char *fileName)
 
 
 /*!
- *Load here all the libraries.
+ * Load here all the libraries.
  */
 int Server::loadLibraries ()
 {
   Process::initialize ();
-
-  XmlParser::startXML();
+  XmlParser::startXML ();
   myserver_safetime_init ();
 
   gnutls_global_init ();
-
   if (Socket::startupSocketLib () != 0)
-  {
-    logWriteln (MYSERVER_LOG_MSG_ERROR, _("Error loading the socket library"));
-    return 1;
-  }
+    {
+      logWriteln (MYSERVER_LOG_MSG_ERROR, _("Error loading the socket library"));
+      return 1;
+    }
 
   return 0;
 }
@@ -294,9 +290,6 @@ void Server::start (string &mainConf, string &mimeConf, string &vhostConf,
     if (loadLibraries ())
       return;
 
-    /*
-     * Setup the server configuration.
-     */
     logWriteln (MYSERVER_LOG_MSG_INFO, _("Initializing server configuration..."));
 
     if (!resetConfigurationPaths (mainConf, mimeConf, vhostConf, externPath))
@@ -443,7 +436,7 @@ int Server::postLoad ()
 }
 
 /*!
- *Load the plugins.
+ * Load the plugins.
  */
 void Server::loadPlugins ()
 {
@@ -614,7 +607,7 @@ void Server::logWriteNTimes (string str, unsigned n)
 }
 
 /*!
- *Display the MyServer boot.
+ * Display the MyServer boot.
  */
 void Server::displayBoot ()
 {
@@ -635,7 +628,7 @@ void Server::displayBoot ()
 #endif /* CLEAR_BOOT_SCREEN.  */
 
   /*
-   *Print the MyServer signature only if the log writes to the console.
+   * Print the MyServer signature only if the log writes to the console.
    */
   if (logLocation.find ("console://") != string::npos)
     {
@@ -669,8 +662,8 @@ void Server::displayBoot ()
 }
 
 /*!
- *Removed threads that can be destroyed.
- *The function returns the number of threads that were destroyed.
+ * Removed threads that can be destroyed.
+ * The function returns the number of threads that were destroyed.
  */
 int Server::purgeThreads ()
 {
@@ -724,7 +717,7 @@ int Server::purgeThreads ()
 }
 
 /*!
- *Do the final cleanup.  Called once when the process is terminated.
+ * Do the final cleanup.  Called once when the process is terminated.
  */
 void Server::finalCleanup ()
 {
@@ -734,7 +727,7 @@ void Server::finalCleanup ()
 }
 
 /*!
- *Return the user identifier to use for the process.
+ * Return the user identifier to use for the process.
  */
 const char *Server::getUid ()
 {
@@ -742,7 +735,7 @@ const char *Server::getUid ()
 }
 
 /*!
- *Return the group identifier to use for the process.
+ * Return the group identifier to use for the process.
  */
 const char *Server::getGid ()
 {
@@ -750,7 +743,7 @@ const char *Server::getGid ()
 }
 
 /*!
- *Returns the numbers of active connections the list.
+ * Returns the numbers of active connections the list.
  */
 u_long Server::getNumConnections ()
 {
@@ -758,7 +751,7 @@ u_long Server::getNumConnections ()
 }
 
 /*!
- *Returns the numbers of all the connections to the server.
+ * Returns the numbers of all the connections to the server.
  */
 u_long Server::getNumTotalConnections ()
 {
@@ -766,7 +759,7 @@ u_long Server::getNumTotalConnections ()
 }
 
 /*!
- *Get the verbosity value.
+ * Get the verbosity value.
  */
 u_long Server::getVerbosity ()
 {
@@ -774,7 +767,7 @@ u_long Server::getVerbosity ()
 }
 
 /*!
- *Set the verbosity value.
+ * Set the verbosity value.
  */
 void  Server::setVerbosity (u_long nv)
 {
@@ -782,7 +775,7 @@ void  Server::setVerbosity (u_long nv)
 }
 
 /*!
- *Return a home directory object.
+ * Return a home directory object.
  */
 HomeDir* Server::getHomeDir ()
 {
@@ -790,7 +783,7 @@ HomeDir* Server::getHomeDir ()
 }
 
 /*!
- *Stop the execution of the server.
+ * Stop the execution of the server.
  */
 void Server::stop ()
 {
@@ -798,8 +791,8 @@ void Server::stop ()
 }
 
 /*!
- *Unload the server.
- *Return nonzero on errors.
+ * Unload the server.
+ * Return nonzero on errors.
  */
 int Server::terminate ()
 {
@@ -851,7 +844,7 @@ int Server::terminate ()
 
 #ifdef WIN32
   /*
-   *Under WIN32 cleanup environment strings.
+   * Under WIN32 cleanup environment strings.
    */
   FreeEnvironmentStrings ((LPTSTR)envString);
 #endif
@@ -869,7 +862,7 @@ int Server::terminate ()
   globalData.clear ();
 
   /*
-   *Free all the threads.
+   * Free all the threads.
    */
   threadsMutex->lock ();
   threads.clear ();
@@ -897,9 +890,9 @@ XmlParser *Server::getXmlConfiguration ()
 
 
 /*!
- *Here is loaded the configuration of the server.
- *The configuration file is a XML file.
- *Return nonzero on errors.
+ * Here is loaded the configuration of the server.
+ * The configuration file is a XML file.
+ * Return nonzero on errors.
  */
 int Server::initialize ()
 {
@@ -1051,7 +1044,7 @@ int Server::initialize ()
 }
 
 /*!
- *Read the values defined in the global configuration file.
+ * Read the values defined in the global configuration file.
  */
 void Server::readHashedData (xmlNodePtr lcur)
 {
@@ -1062,8 +1055,8 @@ void Server::readHashedData (xmlNodePtr lcur)
 
 
 /*!
- *Check if there are free threads to handle a new request.  If there
- *are not enough threads create a new one.
+ * Check if there are free threads to handle a new request.  If there
+ * are not enough threads create a new one.
  */
 void Server::checkThreadsNumber ()
 {
@@ -1080,7 +1073,7 @@ void Server::checkThreadsNumber ()
 }
 
 /*!
- *Get the default throttling rate to use with connections to the server.
+ * Get the default throttling rate to use with connections to the server.
  */
 u_long Server::getThrottlingRate ()
 {
@@ -1088,8 +1081,8 @@ u_long Server::getThrottlingRate ()
 }
 
 /*!
- *This function returns the max size of the logs file as defined in the
- *configuration file.
+ * This function returns the max size of the logs file as defined in the
+ * configuration file.
  */
 int Server::getMaxLogFileSize ()
 {
@@ -1097,7 +1090,7 @@ int Server::getMaxLogFileSize ()
 }
 
 /*!
- *Returns the connection timeout.
+ * Returns the connection timeout.
  */
 u_long Server::getTimeout ()
 {
@@ -1105,7 +1098,7 @@ u_long Server::getTimeout ()
 }
 
 /*!
- *This function add a new connection to the list.
+ * This function add a new connection to the list.
  */
 int Server::addConnection (Socket s, MYSERVER_SOCKADDRIN *asockIn)
 {
@@ -1119,13 +1112,13 @@ int Server::addConnection (Socket s, MYSERVER_SOCKADDRIN *asockIn)
   int dim;
 
   /*
-   *We can use MAX_IP_STRING_LEN only because we use NI_NUMERICHOST
-   *in getnameinfo call; Otherwise we should have used NI_MAXHOST.
-   *ip is the string containing the address of the remote host connecting
-   *to the server.
-   *localIp is the local address used by the connection.
-   *port is the remote port used by the client to open the connection.
-   *myPort is the port used by the server to listen.
+   * We can use MAX_IP_STRING_LEN only because we use NI_NUMERICHOST
+   * in getnameinfo call; Otherwise we should have used NI_MAXHOST.
+   * ip is the string containing the address of the remote host connecting
+   * to the server.
+   * localIp is the local address used by the connection.
+   * port is the remote port used by the client to open the connection.
+   * myPort is the port used by the server to listen.
    */
   if ( asockIn == NULL ||
        (asockIn->ss_family != AF_INET && asockIn->ss_family != AF_INET6))
@@ -1138,11 +1131,12 @@ int Server::addConnection (Socket s, MYSERVER_SOCKADDRIN *asockIn)
     return 0;
 
   /*
-   *Do not accept this connection if a MAX_CONNECTIONS_TO_ACCEPT limit is
-   *defined.
+   * Do not accept this connection if a MAX_CONNECTIONS_TO_ACCEPT limit is
+   * defined.
    */
-  if (maxConnectionsToAccept &&
-      ((u_long)connectionsScheduler.getConnectionsNumber () >= maxConnectionsToAccept))
+  if (maxConnectionsToAccept
+      && ((u_long)connectionsScheduler.getConnectionsNumber ()
+          >= maxConnectionsToAccept))
     return 0;
 
 #if ( HAVE_IPV6 )
@@ -1213,7 +1207,7 @@ int Server::addConnection (Socket s, MYSERVER_SOCKADDRIN *asockIn)
 }
 
 /*!
- *Return the max number of threads that the server can start.
+ * Return the max number of threads that the server can start.
  */
 int Server::getMaxThreads ()
 {
@@ -1221,7 +1215,7 @@ int Server::getMaxThreads ()
 }
 
 /*!
- *Add a new connection.
+ * Add a new connection.
  *A connection is defined using a connection struct.
  */
 ConnectionPtr Server::addConnectionToList (Socket* s,
@@ -1776,8 +1770,8 @@ int Server::addThread (bool staticThread)
 }
 
 /*!
- *Remove a thread.
- *Return zero if a thread was removed.
+ * Remove a thread.
+ * Return zero if a thread was removed.
  */
 int Server::removeThread (u_long ID)
 {
@@ -1814,9 +1808,9 @@ int Server::removeThread (u_long ID)
 }
 
 /*!
- *Create the class instance.  Call this before use
- *the Server class.  The instance is not created in
- *getInstance to have a faster inline function.
+ * Create the class instance.  Call this before use
+ * the Server class.  The instance is not created in
+ * getInstance to have a faster inline function.
  */
 void Server::createInstance ()
 {
@@ -1825,7 +1819,7 @@ void Server::createInstance ()
 }
 
 /*!
- *Get a pointer to a filters factory object.
+ * Get a pointer to a filters factory object.
  */
 FiltersFactory* Server::getFiltersFactory ()
 {
@@ -1833,7 +1827,7 @@ FiltersFactory* Server::getFiltersFactory ()
 }
 
 /*!
- *Check how many threads are not working.
+ * Check how many threads are not working.
  */
 int Server::countAvailableThreads ()
 {
@@ -1899,7 +1893,7 @@ Server::setLogLocation (string location)
 }
 
 /*!
- *Get the size for the first buffer.
+ * Get the size for the first buffer.
  */
 u_long Server::getBuffersize ()
 {
@@ -1915,7 +1909,7 @@ u_long Server::getBuffersize2 ()
 }
 
 /*!
- *Set a global descriptor.
+ * Set a global descriptor.
  */
 void Server::setGlobalData (const char* name, void* data)
 {
@@ -1924,7 +1918,7 @@ void Server::setGlobalData (const char* name, void* data)
 }
 
 /*!
- *Get a global descriptor.
+ * Get a global descriptor.
  */
 void* Server::getGlobalData (const char* name)
 {
diff --git a/myserver/tests/main.cpp b/myserver/tests/main.cpp
index 9827712..b6e974d 100644
--- a/myserver/tests/main.cpp
+++ b/myserver/tests/main.cpp
@@ -5,12 +5,12 @@
  it under the terms of the GNU General Public License as published by
  the Free Software Foundation; either version 3 of the License, or
  (at your option) any later version.
- 
- This program is distributed in the hope that it will be useful, 
+
+ This program is distributed in the hope that it will be useful,
  but WITHOUT ANY WARRANTY; without even the implied warranty of
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  GNU General Public License for more details.
- 
+
  You should have received a copy of the GNU General Public License
  along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
diff --git a/myserver/tests/test_auth_domain.cpp b/myserver/tests/test_auth_domain.cpp
index 5bd274e..1bbe25e 100644
--- a/myserver/tests/test_auth_domain.cpp
+++ b/myserver/tests/test_auth_domain.cpp
@@ -5,12 +5,12 @@
  it under the terms of the GNU General Public License as published by
  the Free Software Foundation; either version 3 of the License, or
  (at your option) any later version.
- 
- This program is distributed in the hope that it will be useful, 
+
+ This program is distributed in the hope that it will be useful,
  but WITHOUT ANY WARRANTY; without even the implied warranty of
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  GNU General Public License for more details.
- 
+
  You should have received a copy of the GNU General Public License
  along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
@@ -34,7 +34,7 @@ class TestAuthDomain : public CppUnit::TestFixture
   CPPUNIT_TEST_SUITE( TestAuthDomain );
   CPPUNIT_TEST( testGetName );
   CPPUNIT_TEST_SUITE_END();
-  
+
   SecurityToken *secToken;
   AuthDomain* authDomain;
 public:
diff --git a/myserver/tests/test_base64.cpp b/myserver/tests/test_base64.cpp
index 4bf54f9..b719a4e 100644
--- a/myserver/tests/test_base64.cpp
+++ b/myserver/tests/test_base64.cpp
@@ -5,12 +5,12 @@
  it under the terms of the GNU General Public License as published by
  the Free Software Foundation; either version 3 of the License, or
  (at your option) any later version.
- 
- This program is distributed in the hope that it will be useful, 
+
+ This program is distributed in the hope that it will be useful,
  but WITHOUT ANY WARRANTY; without even the implied warranty of
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  GNU General Public License for more details.
- 
+
  You should have received a copy of the GNU General Public License
  along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
diff --git a/myserver/tests/test_bitvec.cpp b/myserver/tests/test_bitvec.cpp
index 1c26f8d..d34dcda 100644
--- a/myserver/tests/test_bitvec.cpp
+++ b/myserver/tests/test_bitvec.cpp
@@ -5,16 +5,16 @@
  it under the terms of the GNU General Public License as published by
  the Free Software Foundation; either version 3 of the License, or
  (at your option) any later version.
- 
- This program is distributed in the hope that it will be useful, 
+
+ This program is distributed in the hope that it will be useful,
  but WITHOUT ANY WARRANTY; without even the implied warranty of
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  GNU General Public License for more details.
- 
+
  You should have received a copy of the GNU General Public License
  along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
- 
+
 #include <cppunit/CompilerOutputter.h>
 #include <cppunit/extensions/TestFactoryRegistry.h>
 #include <cppunit/ui/text/TestRunner.h>
@@ -26,21 +26,21 @@
 class TestBitVec : public CppUnit::TestFixture
 {
   CPPUNIT_TEST_SUITE ( TestBitVec );
-  
+
   CPPUNIT_TEST ( testSet );
   CPPUNIT_TEST ( testGet );
   CPPUNIT_TEST ( testFfs );
   CPPUNIT_TEST ( testFind );
   CPPUNIT_TEST ( testRevert );
   CPPUNIT_TEST ( testInit );
-  
+
   CPPUNIT_TEST_SUITE_END ();
 
 public:
   void setUp ()
   {
   }
-  
+
   void tearDown ()
   {
   }
@@ -56,7 +56,7 @@ public:
         vec.init (i, false);
         CPPUNIT_ASSERT_EQUAL (vec.getCapacity (), i);
       }
-    
+
   }
 
   void testFfs ()
@@ -86,7 +86,7 @@ public:
     vec.unset (0);
     CPPUNIT_ASSERT_EQUAL (vec.get (0), false);
   }
-  
+
 
   void testGet ()
   {
diff --git a/myserver/tests/test_cached_file.cpp b/myserver/tests/test_cached_file.cpp
index 105055f..ce9bd24 100644
--- a/myserver/tests/test_cached_file.cpp
+++ b/myserver/tests/test_cached_file.cpp
@@ -5,12 +5,12 @@
  it under the terms of the GNU General Public License as published by
  the Free Software Foundation; either version 3 of the License, or
  (at your option) any later version.
- 
- This program is distributed in the hope that it will be useful, 
+
+ This program is distributed in the hope that it will be useful,
  but WITHOUT ANY WARRANTY; without even the implied warranty of
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  GNU General Public License for more details.
- 
+
  You should have received a copy of the GNU General Public License
  along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
@@ -37,7 +37,7 @@ class TestCachedFile : public CppUnit::TestFixture
   CPPUNIT_TEST(testRead);
 
   CPPUNIT_TEST_SUITE_END();
-  
+
   CachedFileBuffer *cfb;
   CachedFile *cf;
 
@@ -86,7 +86,7 @@ public:
   {
     CPPUNIT_ASSERT(cf->writeToFile(NULL, 0, NULL));
   }
-  
+
   void testRead()
   {
     u_long nbr = 0;
diff --git a/myserver/tests/test_cached_file_buffer.cpp b/myserver/tests/test_cached_file_buffer.cpp
index 3616936..ee07dbf 100644
--- a/myserver/tests/test_cached_file_buffer.cpp
+++ b/myserver/tests/test_cached_file_buffer.cpp
@@ -5,12 +5,12 @@
  it under the terms of the GNU General Public License as published by
  the Free Software Foundation; either version 3 of the License, or
  (at your option) any later version.
- 
- This program is distributed in the hope that it will be useful, 
+
+ This program is distributed in the hope that it will be useful,
  but WITHOUT ANY WARRANTY; without even the implied warranty of
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  GNU General Public License for more details.
- 
+
  You should have received a copy of the GNU General Public License
  along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
@@ -34,7 +34,7 @@ class TestCachedFileBuffer : public CppUnit::TestFixture
   CPPUNIT_TEST(testFactoryToNotify);
   CPPUNIT_TEST(testRefCounter);
   CPPUNIT_TEST_SUITE_END();
-  
+
   CachedFileBuffer *cfb;
 public:
   void setUp()
@@ -58,7 +58,7 @@ public:
   void testFactoryToNotify()
   {
     CachedFileFactory cff;
-    
+
     cfb->setFactoryToNotify(&cff);
     CPPUNIT_ASSERT_EQUAL(cfb->getFactoryToNotify(), &cff);
 
diff --git a/myserver/tests/test_cached_file_factory.cpp b/myserver/tests/test_cached_file_factory.cpp
index 036c3b3..7830d3f 100644
--- a/myserver/tests/test_cached_file_factory.cpp
+++ b/myserver/tests/test_cached_file_factory.cpp
@@ -5,12 +5,12 @@
  it under the terms of the GNU General Public License as published by
  the Free Software Foundation; either version 3 of the License, or
  (at your option) any later version.
- 
- This program is distributed in the hope that it will be useful, 
+
+ This program is distributed in the hope that it will be useful,
  but WITHOUT ANY WARRANTY; without even the implied warranty of
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  GNU General Public License for more details.
- 
+
  You should have received a copy of the GNU General Public License
  along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
diff --git a/myserver/tests/test_connection.cpp b/myserver/tests/test_connection.cpp
index b01a555..8786ecc 100644
--- a/myserver/tests/test_connection.cpp
+++ b/myserver/tests/test_connection.cpp
@@ -5,12 +5,12 @@
  it under the terms of the GNU General Public License as published by
  the Free Software Foundation; either version 3 of the License, or
  (at your option) any later version.
- 
- This program is distributed in the hope that it will be useful, 
+
+ This program is distributed in the hope that it will be useful,
  but WITHOUT ANY WARRANTY; without even the implied warranty of
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  GNU General Public License for more details.
- 
+
  You should have received a copy of the GNU General Public License
  along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
diff --git a/myserver/tests/test_connections_scheduler.cpp b/myserver/tests/test_connections_scheduler.cpp
index a62c76b..16f4011 100644
--- a/myserver/tests/test_connections_scheduler.cpp
+++ b/myserver/tests/test_connections_scheduler.cpp
@@ -5,12 +5,12 @@
  it under the terms of the GNU General Public License as published by
  the Free Software Foundation; either version 3 of the License, or
  (at your option) any later version.
- 
- This program is distributed in the hope that it will be useful, 
+
+ This program is distributed in the hope that it will be useful,
  but WITHOUT ANY WARRANTY; without even the implied warranty of
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  GNU General Public License for more details.
- 
+
  You should have received a copy of the GNU General Public License
  along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
@@ -134,7 +134,7 @@ public:
       conn->socket = new MockSocket((FileHandle) i);
       scheduler->addWaitingConnection(conn);
     }
-    
+
     scheduler->accept(&visitor, arg);
 
     CPPUNIT_ASSERT_EQUAL(arg, visitor.getArg());
@@ -145,7 +145,7 @@ public:
   {
     ConnectionPtr conn = new Connection;
     conn->socket = new MockSocket((FileHandle) 1);
-    
+
     list<ConnectionPtr> out;
 
     scheduler->getConnections(out);
@@ -154,7 +154,7 @@ public:
 
     conn = new Connection;
     conn->socket = new MockSocket((FileHandle) 2);
-    
+
     scheduler->addWaitingConnection(conn);
 
     scheduler->getConnections(out);
@@ -216,7 +216,7 @@ public:
     scheduler->addWaitingConnection(conn);
 
     CPPUNIT_ASSERT_EQUAL(scheduler->getConnectionsNumber(), 1ul);
- 
+
     scheduler->removeConnection(conn);
 
     CPPUNIT_ASSERT_EQUAL(scheduler->getNumTotalConnections(), 0ul);
diff --git a/myserver/tests/test_file.cpp b/myserver/tests/test_file.cpp
index 14b7da7..e4c1d9b 100644
--- a/myserver/tests/test_file.cpp
+++ b/myserver/tests/test_file.cpp
@@ -5,16 +5,16 @@
  it under the terms of the GNU General Public License as published by
  the Free Software Foundation; either version 3 of the License, or
  (at your option) any later version.
- 
- This program is distributed in the hope that it will be useful, 
+
+ This program is distributed in the hope that it will be useful,
  but WITHOUT ANY WARRANTY; without even the implied warranty of
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  GNU General Public License for more details.
- 
+
  You should have received a copy of the GNU General Public License
  along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
- 
+
 #include <cppunit/CompilerOutputter.h>
 #include <cppunit/extensions/TestFactoryRegistry.h>
 #include <cppunit/ui/text/TestRunner.h>
@@ -35,7 +35,7 @@ class TestFile : public CppUnit::TestFixture
 {
   File *tfile;
   string fname;
-  
+
   CPPUNIT_TEST_SUITE ( TestFile );
 
   CPPUNIT_TEST ( testCreateTemporaryFile );
@@ -51,19 +51,19 @@ public:
     FilesUtility::temporaryFileName (0, fname);
     tfile = new File;
   }
-  
+
   void tearDown ()
   {
     delete tfile;
   }
-  
+
   void testCreateTemporaryFile ()
   {
     CPPUNIT_ASSERT_EQUAL (tfile->createTemporaryFile (fname.c_str()), 0);
-    
+
     CPPUNIT_ASSERT_EQUAL (tfile->close (), 0);
   }
-  
+
   void testOnFile ()
   {
     char buf[] = { 'H', 'e', 'l', 'l', 'o', ',', ' ', 'm', 'y', 'W', 'o', 'r', 'l', 'd', 0 };
@@ -71,12 +71,12 @@ public:
     u_long nbw;
     u_long nbr;
 
-    CPPUNIT_ASSERT_EQUAL (tfile->openFile (fname.c_str (), File::WRITE | 
-                                           File::READ | 
+    CPPUNIT_ASSERT_EQUAL (tfile->openFile (fname.c_str (), File::WRITE |
+                                           File::READ |
                                            File::FILE_CREATE_ALWAYS), 0);
 
     CPPUNIT_ASSERT_EQUAL (tfile->writeToFile (buf, bufLen, &nbw), 0);
-    
+
     memset (buf, 0, bufLen);
 
     CPPUNIT_ASSERT_EQUAL (tfile->seek (0), 0);
@@ -108,8 +108,8 @@ public:
 
     CPPUNIT_ASSERT_EQUAL (FilesUtility::deleteFile (fname.c_str ()), 0);
 
-    CPPUNIT_ASSERT_EQUAL (tfile->openFile (fname.c_str (), File::WRITE | 
-                                           File::READ | 
+    CPPUNIT_ASSERT_EQUAL (tfile->openFile (fname.c_str (), File::WRITE |
+                                           File::READ |
                                            File::FILE_CREATE_ALWAYS), 0);
 
     CPPUNIT_ASSERT_EQUAL (tfile->getFileSize (), 0ul);
diff --git a/myserver/tests/test_file_stream.cpp b/myserver/tests/test_file_stream.cpp
index 34a9804..e24ed34 100644
--- a/myserver/tests/test_file_stream.cpp
+++ b/myserver/tests/test_file_stream.cpp
@@ -5,12 +5,12 @@
   it under the terms of the GNU General Public License as published by
   the Free Software Foundation; either version 3 of the License, or
   (at your option) any later version.
- 
-  This program is distributed in the hope that it will be useful, 
+
+  This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   GNU General Public License for more details.
- 
+
   You should have received a copy of the GNU General Public License
   along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
@@ -108,7 +108,7 @@ public:
     oss.str ("message2");
     oss << endl;
     message2.assign (oss.str ());
-    
+
     FilesUtility::deleteFile ("foo");
     ls = fsc->create (ff, "foo", filters, 0);
     CPPUNIT_ASSERT (ls);
@@ -129,7 +129,7 @@ public:
     CPPUNIT_ASSERT_EQUAL (nbr, (u_long)(message1.length () + message2.length ()));
     CPPUNIT_ASSERT (!string (buf).compare (message1.append (message2)));
   }
-  
+
   void tearDown ()
   {
     delete ff;
diff --git a/myserver/tests/test_file_stream_creator.cpp b/myserver/tests/test_file_stream_creator.cpp
index 703013b..28366ad 100644
--- a/myserver/tests/test_file_stream_creator.cpp
+++ b/myserver/tests/test_file_stream_creator.cpp
@@ -5,12 +5,12 @@
  it under the terms of the GNU General Public License as published by
  the Free Software Foundation; either version 3 of the License, or
  (at your option) any later version.
- 
- This program is distributed in the hope that it will be useful, 
+
+ This program is distributed in the hope that it will be useful,
  but WITHOUT ANY WARRANTY; without even the implied warranty of
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  GNU General Public License for more details.
- 
+
  You should have received a copy of the GNU General Public License
  along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
@@ -39,7 +39,7 @@ public:
     fsc = new FileStreamCreator ();
     ff = new FiltersFactory ();
   }
-  
+
   void testCreation ()
   {
     list<string> filters;
@@ -50,7 +50,7 @@ public:
     delete ls;
     FilesUtility::deleteFile ("foo");
   }
-  
+
   void tearDown ()
   {
     delete fsc;
diff --git a/myserver/tests/test_files_utility.cpp b/myserver/tests/test_files_utility.cpp
index d12d82e..029e61e 100644
--- a/myserver/tests/test_files_utility.cpp
+++ b/myserver/tests/test_files_utility.cpp
@@ -5,12 +5,12 @@
  it under the terms of the GNU General Public License as published by
  the Free Software Foundation; either version 3 of the License, or
  (at your option) any later version.
- 
- This program is distributed in the hope that it will be useful, 
+
+ This program is distributed in the hope that it will be useful,
  but WITHOUT ANY WARRANTY; without even the implied warranty of
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  GNU General Public License for more details.
- 
+
  You should have received a copy of the GNU General Public License
  along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
@@ -36,7 +36,7 @@ class TestFilesUtility : public CppUnit::TestFixture
   CPPUNIT_TEST( testGetFileExt );
 
   CPPUNIT_TEST_SUITE_END();
-  
+
 public:
   void setUp() {}
   void tearDown() {}
diff --git a/myserver/tests/test_filter_chain.cpp b/myserver/tests/test_filter_chain.cpp
index c69afb0..01a4793 100644
--- a/myserver/tests/test_filter_chain.cpp
+++ b/myserver/tests/test_filter_chain.cpp
@@ -5,12 +5,12 @@
  it under the terms of the GNU General Public License as published by
  the Free Software Foundation; either version 3 of the License, or
  (at your option) any later version.
- 
- This program is distributed in the hope that it will be useful, 
+
+ This program is distributed in the hope that it will be useful,
  but WITHOUT ANY WARRANTY; without even the implied warranty of
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  GNU General Public License for more details.
- 
+
  You should have received a copy of the GNU General Public License
  along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
@@ -45,7 +45,7 @@ class TestFilterChain : public CppUnit::TestFixture
   CPPUNIT_TEST_SUITE_END();
 
   FiltersChain *fc;
-  
+
 public:
   void setUp()
   {
@@ -140,7 +140,7 @@ public:
 
     CPPUNIT_ASSERT(fc->isEmpty() != 0);
   }
-  
+
   void testIsFilterPresent()
   {
     u_long nbw;
diff --git a/myserver/tests/test_fork_server.cpp b/myserver/tests/test_fork_server.cpp
index 3bffabc..bd3c9fa 100644
--- a/myserver/tests/test_fork_server.cpp
+++ b/myserver/tests/test_fork_server.cpp
@@ -5,12 +5,12 @@
  it under the terms of the GNU General Public License as published by
  the Free Software Foundation; either version 3 of the License, or
  (at your option) any later version.
- 
- This program is distributed in the hope that it will be useful, 
+
+ This program is distributed in the hope that it will be useful,
  but WITHOUT ANY WARRANTY; without even the implied warranty of
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  GNU General Public License for more details.
- 
+
  You should have received a copy of the GNU General Public License
  along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
@@ -36,7 +36,7 @@ class TestForkServer : public CppUnit::TestFixture
   CPPUNIT_TEST_SUITE_END();
 
   ForkServer *fs;
-  
+
 public:
   void setUp()
   {
@@ -54,7 +54,7 @@ public:
     CPPUNIT_ASSERT_EQUAL (fs->isInitialized (), false);
 
     int ret = fs->startForkServer ();
-    
+
     CPPUNIT_ASSERT_EQUAL (ret, 0);
 
     CPPUNIT_ASSERT_EQUAL (fs->isInitialized (), true);
@@ -78,7 +78,7 @@ public:
 
         Pipe pipe;
         pipe.create();
-    
+
         spi.stdIn = -1;
         spi.stdError = -1;
         spi.stdOut =  pipe.getWriteHandle();
diff --git a/myserver/tests/test_ftp.cpp b/myserver/tests/test_ftp.cpp
index 2696020..fea5df8 100644
--- a/myserver/tests/test_ftp.cpp
+++ b/myserver/tests/test_ftp.cpp
@@ -5,12 +5,12 @@
  it under the terms of the GNU General Public License as published by
  the Free Software Foundation; either version 3 of the License, or
  (at your option) any later version.
- 
- This program is distributed in the hope that it will be useful, 
+
+ This program is distributed in the hope that it will be useful,
  but WITHOUT ANY WARRANTY; without even the implied warranty of
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  GNU General Public License for more details.
- 
+
  You should have received a copy of the GNU General Public License
  along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
diff --git a/myserver/tests/test_gzip.cpp b/myserver/tests/test_gzip.cpp
index 920a3af..24d807d 100644
--- a/myserver/tests/test_gzip.cpp
+++ b/myserver/tests/test_gzip.cpp
@@ -5,12 +5,12 @@
  it under the terms of the GNU General Public License as published by
  the Free Software Foundation; either version 3 of the License, or
  (at your option) any later version.
- 
- This program is distributed in the hope that it will be useful, 
+
+ This program is distributed in the hope that it will be useful,
  but WITHOUT ANY WARRANTY; without even the implied warranty of
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  GNU General Public License for more details.
- 
+
  You should have received a copy of the GNU General Public License
  along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
@@ -27,7 +27,7 @@ class TestGzip : public CppUnit::TestFixture
   CPPUNIT_TEST_SUITE( TestGzip );
   CPPUNIT_TEST( testGzipCompression );
   CPPUNIT_TEST_SUITE_END();
-  
+
 public:
   void setUp() {}
   void tearDown() {}
@@ -39,10 +39,10 @@ public:
     char szDecompressed[64];
 
     gzip.compress(szTest, 64, szCompressed, 64);
-    
+
     GzipDecompress gzipdc;
     gzipdc.decompress(szCompressed, 64, szDecompressed, 64);
-    
+
     CPPUNIT_ASSERT(strcmp(szTest, szDecompressed) == 0);
   }
 };
diff --git a/myserver/tests/test_hashmap.cpp b/myserver/tests/test_hashmap.cpp
index 0571cb9..479de46 100644
--- a/myserver/tests/test_hashmap.cpp
+++ b/myserver/tests/test_hashmap.cpp
@@ -5,12 +5,12 @@
  it under the terms of the GNU General Public License as published by
  the Free Software Foundation; either version 3 of the License, or
  (at your option) any later version.
- 
- This program is distributed in the hope that it will be useful, 
+
+ This program is distributed in the hope that it will be useful,
  but WITHOUT ANY WARRANTY; without even the implied warranty of
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  GNU General Public License for more details.
- 
+
  You should have received a copy of the GNU General Public License
  along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
@@ -48,43 +48,43 @@ public:
   void testContainsKey()
   {
     map->put((char*)"one", 1);
-    CPPUNIT_ASSERT_EQUAL(map->containsKey("one"), true); 
-    CPPUNIT_ASSERT_EQUAL(map->containsKey("two"), false); 
+    CPPUNIT_ASSERT_EQUAL(map->containsKey("one"), true);
+    CPPUNIT_ASSERT_EQUAL(map->containsKey("two"), false);
   }
 
   void testClear()
   {
     map->put((char*)"one", 1);
 
-    CPPUNIT_ASSERT_EQUAL(map->empty(), false); 
+    CPPUNIT_ASSERT_EQUAL(map->empty(), false);
 
     map->clear();
 
-    CPPUNIT_ASSERT_EQUAL(map->empty(), true); 
+    CPPUNIT_ASSERT_EQUAL(map->empty(), true);
   }
 
   void testSize()
   {
-    CPPUNIT_ASSERT_EQUAL(map->size(), 0); 
+    CPPUNIT_ASSERT_EQUAL(map->size(), 0);
     map->put((char*)"one", 1);
-    CPPUNIT_ASSERT_EQUAL(map->size(), 1); 
+    CPPUNIT_ASSERT_EQUAL(map->size(), 1);
     map->put((char*)"two", 2);
-    CPPUNIT_ASSERT_EQUAL(map->size(), 2); 
+    CPPUNIT_ASSERT_EQUAL(map->size(), 2);
   }
 
   void testEmpty()
   {
-    CPPUNIT_ASSERT_EQUAL(map->empty(), true); 
+    CPPUNIT_ASSERT_EQUAL(map->empty(), true);
     map->put((char*)"key", 0);
-    CPPUNIT_ASSERT_EQUAL(map->empty(), false); 
-    
+    CPPUNIT_ASSERT_EQUAL(map->empty(), false);
+
   }
 
 
   void testPut()
   {
     map->put((char*)"one", 1);
-    CPPUNIT_ASSERT_EQUAL(map->get((char*)"one"), 1); 
+    CPPUNIT_ASSERT_EQUAL(map->get((char*)"one"), 1);
   }
 
   void testRemove()
@@ -109,7 +109,7 @@ public:
     map->put((char*)"eight", 8);
     map->put((char*)"nine", 9);
     map->put((char*)"ten", 10);
-    
+
     int values[11];
 
     for(int i = 0; i < 11; i++)
@@ -119,7 +119,7 @@ public:
     {
       values[*it] = 1;
     }
-    
+
     for(int i = 0; i < 11; i++)
       CPPUNIT_ASSERT_EQUAL(values[i], 1);
   }
diff --git a/myserver/tests/test_homedir.cpp b/myserver/tests/test_homedir.cpp
index a392124..745c152 100644
--- a/myserver/tests/test_homedir.cpp
+++ b/myserver/tests/test_homedir.cpp
@@ -5,12 +5,12 @@
  it under the terms of the GNU General Public License as published by
  the Free Software Foundation; either version 3 of the License, or
  (at your option) any later version.
- 
- This program is distributed in the hope that it will be useful, 
+
+ This program is distributed in the hope that it will be useful,
  but WITHOUT ANY WARRANTY; without even the implied warranty of
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  GNU General Public License for more details.
- 
+
  You should have received a copy of the GNU General Public License
  along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
@@ -35,7 +35,7 @@ public:
   void testLoadClear()
   {
     CPPUNIT_ASSERT(!homeDir->isLoaded());
-    
+
     homeDir->load();
 
     CPPUNIT_ASSERT(homeDir->isLoaded());
@@ -53,7 +53,7 @@ public:
     /* Try to get home dir for Administrator under Windows.  */
     username.assign("Administrator");
 #else
-    /* Under systems different than Windows, "root" should be present, 
+    /* Under systems different than Windows, "root" should be present,
      * if it doesn't handle this differently.  */
     username.assign("root");
 #endif
diff --git a/myserver/tests/test_http_req_security_domain.cpp b/myserver/tests/test_http_req_security_domain.cpp
index 4a6f87b..3939bab 100644
--- a/myserver/tests/test_http_req_security_domain.cpp
+++ b/myserver/tests/test_http_req_security_domain.cpp
@@ -5,12 +5,12 @@
  it under the terms of the GNU General Public License as published by
  the Free Software Foundation; either version 3 of the License, or
  (at your option) any later version.
- 
- This program is distributed in the hope that it will be useful, 
+
+ This program is distributed in the hope that it will be useful,
  but WITHOUT ANY WARRANTY; without even the implied warranty of
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  GNU General Public License for more details.
- 
+
  You should have received a copy of the GNU General Public License
  along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
diff --git a/myserver/tests/test_http_request.cpp b/myserver/tests/test_http_request.cpp
index 2920ea5..87b4622 100644
--- a/myserver/tests/test_http_request.cpp
+++ b/myserver/tests/test_http_request.cpp
@@ -5,12 +5,12 @@
  it under the terms of the GNU General Public License as published by
  the Free Software Foundation; either version 3 of the License, or
  (at your option) any later version.
- 
- This program is distributed in the hope that it will be useful, 
+
+ This program is distributed in the hope that it will be useful,
  but WITHOUT ANY WARRANTY; without even the implied warranty of
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  GNU General Public License for more details.
- 
+
  You should have received a copy of the GNU General Public License
  along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
@@ -64,7 +64,7 @@ public:
     int ret = HttpHeaders::buildHTTPRequestHeaderStruct(requestStr,
                                                         bufferLength,
                                                         &requestLength,
-                                                        &header, 
+                                                        &header,
                                                         &connection);
 
     CPPUNIT_ASSERT_EQUAL(ret, 200);
@@ -91,10 +91,10 @@ public:
     ret = HttpHeaders::buildHTTPRequestHeaderStruct(requestStr,
                                                     bufferLength,
                                                     &requestLength,
-                                                    &header, 
+                                                    &header,
                                                     &connection);
 
-    
+
     CPPUNIT_ASSERT(ret == 200);
     CPPUNIT_ASSERT(header.rangeByteBegin == 10);
     CPPUNIT_ASSERT(header.rangeByteEnd == 20);
@@ -107,10 +107,10 @@ public:
     ret = HttpHeaders::buildHTTPRequestHeaderStruct(requestStr,
                                                     bufferLength,
                                                     &requestLength,
-                                                    &header, 
+                                                    &header,
                                                     &connection);
 
-    
+
     CPPUNIT_ASSERT(ret == 200);
     CPPUNIT_ASSERT(header.rangeByteBegin == 10);
     CPPUNIT_ASSERT(header.rangeByteEnd == 0);
@@ -125,7 +125,7 @@ public:
     u_long nChars;
     ret = HttpHeaders::validHTTPRequest(request,
                                         strlen(request),
-                                        &nLines, 
+                                        &nLines,
                                         &nChars);
 
     CPPUNIT_ASSERT_EQUAL(ret, 200);
@@ -139,12 +139,12 @@ public:
     u_long nChars;
     ret = HttpHeaders::validHTTPRequest(incompleteRequest,
                                         strlen(incompleteRequest),
-                                        &nLines, 
+                                        &nLines,
                                         &nChars);
 
     CPPUNIT_ASSERT_EQUAL(ret, -1);
   }
-  
+
 
   void testDefaultHttpRequest()
   {
@@ -159,7 +159,7 @@ public:
     CPPUNIT_ASSERT(header.uriOptsPtr == NULL);
     CPPUNIT_ASSERT(header.getValue("NotExists", 0) == NULL);
   }
-  
+
 
   void testResetHttpRequest()
   {
@@ -173,7 +173,7 @@ public:
     CPPUNIT_ASSERT(header.uriOptsPtr == NULL);
     CPPUNIT_ASSERT(header.getValue("NotExists", 0) == NULL);
   }
-  
+
 };
 
 
diff --git a/myserver/tests/test_http_response.cpp b/myserver/tests/test_http_response.cpp
index 86a4136..9f9b649 100644
--- a/myserver/tests/test_http_response.cpp
+++ b/myserver/tests/test_http_response.cpp
@@ -5,12 +5,12 @@
  it under the terms of the GNU General Public License as published by
  the Free Software Foundation; either version 3 of the License, or
  (at your option) any later version.
- 
- This program is distributed in the hope that it will be useful, 
+
+ This program is distributed in the hope that it will be useful,
  but WITHOUT ANY WARRANTY; without even the implied warranty of
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  GNU General Public License for more details.
- 
+
  You should have received a copy of the GNU General Public License
  along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
@@ -78,7 +78,7 @@ public:
 
     CPPUNIT_ASSERT(ret != 0);
   }
-  
+
 
   void testInvalidResponse()
   {
@@ -108,7 +108,7 @@ public:
 
     HttpHeaders::resetHTTPResponse(&header);
 
-    CPPUNIT_ASSERT(header.ver.length() == 0);  
+    CPPUNIT_ASSERT(header.ver.length() == 0);
     CPPUNIT_ASSERT(header.serverName.length() == 0);
     CPPUNIT_ASSERT(header.contentType.length() == 0);
     CPPUNIT_ASSERT(header.connection.length() == 0);
@@ -117,7 +117,7 @@ public:
     CPPUNIT_ASSERT(header.contentLength.length() == 0);
     CPPUNIT_ASSERT(header.errorType.length() == 0);
     CPPUNIT_ASSERT(header.location.length() == 0);
-    CPPUNIT_ASSERT(header.date.length() == 0);    
+    CPPUNIT_ASSERT(header.date.length() == 0);
     CPPUNIT_ASSERT(header.auth.length() == 0);
     CPPUNIT_ASSERT(header.dateExp.length() == 0);
  }
@@ -129,7 +129,7 @@ public:
 
     header.httpStatus = 100;
     CPPUNIT_ASSERT_EQUAL(header.getStatusType(), HttpResponseHeader::INFORMATIONAL);
-    
+
     header.httpStatus = 200;
     CPPUNIT_ASSERT_EQUAL(header.getStatusType(), HttpResponseHeader::SUCCESSFUL);
 
@@ -142,8 +142,8 @@ public:
     header.httpStatus = 500;
     CPPUNIT_ASSERT_EQUAL(header.getStatusType(), HttpResponseHeader::SERVER_ERROR);
   }
-  
-  
+
+
 };
 
 
diff --git a/myserver/tests/test_ip.cpp b/myserver/tests/test_ip.cpp
index 005a71d..4cee1dc 100644
--- a/myserver/tests/test_ip.cpp
+++ b/myserver/tests/test_ip.cpp
@@ -5,12 +5,12 @@
  it under the terms of the GNU General Public License as published by
  the Free Software Foundation; either version 3 of the License, or
  (at your option) any later version.
- 
- This program is distributed in the hope that it will be useful, 
+
+ This program is distributed in the hope that it will be useful,
  but WITHOUT ANY WARRANTY; without even the implied warranty of
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  GNU General Public License for more details.
- 
+
  You should have received a copy of the GNU General Public License
  along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
diff --git a/myserver/tests/test_log_stream_factory.cpp b/myserver/tests/test_log_stream_factory.cpp
index 8148b93..582c9f4 100644
--- a/myserver/tests/test_log_stream_factory.cpp
+++ b/myserver/tests/test_log_stream_factory.cpp
@@ -5,12 +5,12 @@
  it under the terms of the GNU General Public License as published by
  the Free Software Foundation; either version 3 of the License, or
  (at your option) any later version.
- 
- This program is distributed in the hope that it will be useful, 
+
+ This program is distributed in the hope that it will be useful,
  but WITHOUT ANY WARRANTY; without even the implied warranty of
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  GNU General Public License for more details.
- 
+
  You should have received a copy of the GNU General Public License
  along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
@@ -38,7 +38,7 @@ public:
   {
     lsf = new LogStreamFactory ();
   }
-  
+
   void testGetProtocol ()
   {
     CPPUNIT_ASSERT (!lsf->protocolCheck (lsf->getProtocol ("foo")));
@@ -70,7 +70,7 @@ public:
     CPPUNIT_ASSERT (!lsf->create (&ff, "socket://127.0.0.1:0", filters, 0));
     delete ls;
   }
-  
+
   void tearDown ()
   {
     delete lsf;
diff --git a/myserver/tests/test_md5.cpp b/myserver/tests/test_md5.cpp
index 075e0e7..7304a19 100644
--- a/myserver/tests/test_md5.cpp
+++ b/myserver/tests/test_md5.cpp
@@ -5,12 +5,12 @@
  it under the terms of the GNU General Public License as published by
  the Free Software Foundation; either version 3 of the License, or
  (at your option) any later version.
- 
- This program is distributed in the hope that it will be useful, 
+
+ This program is distributed in the hope that it will be useful,
  but WITHOUT ANY WARRANTY; without even the implied warranty of
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  GNU General Public License for more details.
- 
+
  You should have received a copy of the GNU General Public License
  along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
diff --git a/myserver/tests/test_mem_buff.cpp b/myserver/tests/test_mem_buff.cpp
index 8241ecb..9c1e7ec 100644
--- a/myserver/tests/test_mem_buff.cpp
+++ b/myserver/tests/test_mem_buff.cpp
@@ -5,12 +5,12 @@
  it under the terms of the GNU General Public License as published by
  the Free Software Foundation; either version 3 of the License, or
  (at your option) any later version.
- 
- This program is distributed in the hope that it will be useful, 
+
+ This program is distributed in the hope that it will be useful,
  but WITHOUT ANY WARRANTY; without even the implied warranty of
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  GNU General Public License for more details.
- 
+
  You should have received a copy of the GNU General Public License
  along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
@@ -132,7 +132,7 @@ public:
   void testGetPart()
   {
     *memBuff << "0123456789abcdef";
-    
+
     MemBuf dest;
 
     memBuff->getPart(3, 10, dest);
@@ -157,7 +157,7 @@ public:
 
     *memBuff << "foo";
 
-    
+
     CPPUNIT_ASSERT(memcmp(buffer, "foo", 3) == 0);
 
   }
diff --git a/myserver/tests/test_mem_stream.cpp b/myserver/tests/test_mem_stream.cpp
index 95e9293..2aa0587 100644
--- a/myserver/tests/test_mem_stream.cpp
+++ b/myserver/tests/test_mem_stream.cpp
@@ -5,12 +5,12 @@
  it under the terms of the GNU General Public License as published by
  the Free Software Foundation; either version 3 of the License, or
  (at your option) any later version.
- 
- This program is distributed in the hope that it will be useful, 
+
+ This program is distributed in the hope that it will be useful,
  but WITHOUT ANY WARRANTY; without even the implied warranty of
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  GNU General Public License for more details.
- 
+
  You should have received a copy of the GNU General Public License
  along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
@@ -63,13 +63,13 @@ public:
 
     return nbw;
   }
-  
+
   void testAvailableToRead()
   {
     u_long size = addSomeData(stream);
 
     CPPUNIT_ASSERT_EQUAL(size, (u_long)stream->availableToRead());
-  } 
+  }
 
   void testRead()
   {
@@ -81,7 +81,7 @@ public:
     CPPUNIT_ASSERT_EQUAL(size, (u_long)stream->availableToRead());
 
     stream->read(buffer, 20, &nbr);
-    
+
     CPPUNIT_ASSERT_EQUAL(size - 20u, (u_long)stream->availableToRead());
   }
 
@@ -118,7 +118,7 @@ public:
     u_long nbw;
     addSomeData(stream);
     int ret = stream->flush(&nbw);
-    
+
     CPPUNIT_ASSERT(nbw >= 0);
     CPPUNIT_ASSERT_EQUAL(ret, 0);
   }
diff --git a/myserver/tests/test_mime_manager.cpp b/myserver/tests/test_mime_manager.cpp
index e40b592..1c5685b 100644
--- a/myserver/tests/test_mime_manager.cpp
+++ b/myserver/tests/test_mime_manager.cpp
@@ -5,12 +5,12 @@
  it under the terms of the GNU General Public License as published by
  the Free Software Foundation; either version 3 of the License, or
  (at your option) any later version.
- 
- This program is distributed in the hope that it will be useful, 
+
+ This program is distributed in the hope that it will be useful,
  but WITHOUT ANY WARRANTY; without even the implied warranty of
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  GNU General Public License for more details.
- 
+
  You should have received a copy of the GNU General Public License
  along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
@@ -58,7 +58,7 @@ public:
     CPPUNIT_ASSERT_EQUAL (mm->getNumMIMELoaded(), 2ul);
 
     CPPUNIT_ASSERT_EQUAL (mm->isLoaded(), true);
-    
+
     delete parser;
   }
 
@@ -73,7 +73,7 @@ public:
     mm->addRecord (&mr);
 
     CPPUNIT_ASSERT_EQUAL (mm->getNumMIMELoaded(), 3ul);
-    
+
     delete parser;
   }
 
diff --git a/myserver/tests/test_multicast.cpp b/myserver/tests/test_multicast.cpp
index 1a2ad74..2af3d0c 100644
--- a/myserver/tests/test_multicast.cpp
+++ b/myserver/tests/test_multicast.cpp
@@ -5,12 +5,12 @@
  it under the terms of the GNU General Public License as published by
  the Free Software Foundation; either version 3 of the License, or
  (at your option) any later version.
- 
- This program is distributed in the hope that it will be useful, 
+
+ This program is distributed in the hope that it will be useful,
  but WITHOUT ANY WARRANTY; without even the implied warranty of
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  GNU General Public License for more details.
- 
+
  You should have received a copy of the GNU General Public License
  along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
@@ -35,7 +35,7 @@ public:
 
     if(handlers)
       return handlers->size();
-    
+
     return 0;
   }
 
@@ -98,7 +98,7 @@ public:
     registry->addMulticast(msg, observer);
     registry->notifyMulticast(msg, arg);
 
-    CPPUNIT_ASSERT_EQUAL(msg, observer->getMsg()); 
+    CPPUNIT_ASSERT_EQUAL(msg, observer->getMsg());
     CPPUNIT_ASSERT_EQUAL(arg, observer->getArg());
   }
 
diff --git a/myserver/tests/test_mutex.cpp b/myserver/tests/test_mutex.cpp
index 0bac228..dd8cb9b 100644
--- a/myserver/tests/test_mutex.cpp
+++ b/myserver/tests/test_mutex.cpp
@@ -5,12 +5,12 @@
  it under the terms of the GNU General Public License as published by
  the Free Software Foundation; either version 3 of the License, or
  (at your option) any later version.
- 
- This program is distributed in the hope that it will be useful, 
+
+ This program is distributed in the hope that it will be useful,
  but WITHOUT ANY WARRANTY; without even the implied warranty of
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  GNU General Public License for more details.
- 
+
  You should have received a copy of the GNU General Public License
  along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
diff --git a/myserver/tests/test_pipe.cpp b/myserver/tests/test_pipe.cpp
index fc29082..ff7619b 100644
--- a/myserver/tests/test_pipe.cpp
+++ b/myserver/tests/test_pipe.cpp
@@ -5,12 +5,12 @@
  it under the terms of the GNU General Public License as published by
  the Free Software Foundation; either version 3 of the License, or
  (at your option) any later version.
- 
- This program is distributed in the hope that it will be useful, 
+
+ This program is distributed in the hope that it will be useful,
  but WITHOUT ANY WARRANTY; without even the implied warranty of
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  GNU General Public License for more details.
- 
+
  You should have received a copy of the GNU General Public License
  along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
@@ -27,7 +27,7 @@
 class TestPipe : public CppUnit::TestFixture
 {
   CPPUNIT_TEST_SUITE( TestPipe );
-  CPPUNIT_TEST( testCreateClose ); 
+  CPPUNIT_TEST( testCreateClose );
   CPPUNIT_TEST( testWriteRead );
   CPPUNIT_TEST( testInverted );
   CPPUNIT_TEST( testWaitForData );
@@ -50,7 +50,7 @@ public:
   void testCreateClose()
   {
     int ret = pipe->create();
-    
+
     CPPUNIT_ASSERT_EQUAL(pipe->pipeTerminated(), false);
 
     CPPUNIT_ASSERT_EQUAL(ret, 0);
@@ -118,7 +118,7 @@ public:
 
     CPPUNIT_ASSERT_EQUAL(pipeInv.getReadHandle(), pipe->getWriteHandle());
     CPPUNIT_ASSERT_EQUAL(pipe->getReadHandle(), pipeInv.getWriteHandle());
-    
+
     pipe->close();
 
   }
diff --git a/myserver/tests/test_plugin_info.cpp b/myserver/tests/test_plugin_info.cpp
index 51141af..dfe99f0 100644
--- a/myserver/tests/test_plugin_info.cpp
+++ b/myserver/tests/test_plugin_info.cpp
@@ -5,12 +5,12 @@
  it under the terms of the GNU General Public License as published by
  the Free Software Foundation; either version 3 of the License, or
  (at your option) any later version.
- 
- This program is distributed in the hope that it will be useful, 
+
+ This program is distributed in the hope that it will be useful,
  but WITHOUT ANY WARRANTY; without even the implied warranty of
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  GNU General Public License for more details.
- 
+
  You should have received a copy of the GNU General Public License
  along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
@@ -44,7 +44,7 @@ class TestPluginInfo : public CppUnit::TestFixture
   CPPUNIT_TEST_SUITE_END();
 private:
   PluginInfo* pluginfo;
-  
+
 public:
   void setUp()
   {
@@ -61,7 +61,7 @@ public:
   {
   	CPPUNIT_ASSERT(!pluginfo->isEnabled());
   }
-  
+
   void testIsEnabled()
   {
   	delete(pluginfo);
@@ -74,7 +74,7 @@ public:
   {
   	CPPUNIT_ASSERT(!pluginfo->isGlobal());
   }
-  
+
   void testIsGlobal()
   {
   	delete(pluginfo);
@@ -82,27 +82,27 @@ public:
   	pluginfo = new PluginInfo(name,false,true);
   	CPPUNIT_ASSERT(pluginfo->isGlobal());
   }
-  
+
   void testGetVersion()
   {
   	CPPUNIT_ASSERT_EQUAL(pluginfo->getVersion(),0);
   }
-  
+
   void testGetMyServerMinVersion()
   {
   	CPPUNIT_ASSERT_EQUAL(pluginfo->getMyServerMinVersion(),0);
   }
-  
+
   void testGetMyServerMaxVersion()
   {
   	CPPUNIT_ASSERT_EQUAL(pluginfo->getMyServerMaxVersion(),0);
   }
-  
+
   void testGetName()
   {
   	CPPUNIT_ASSERT_EQUAL(pluginfo->getName().compare("test"),0);
   }
-  
+
   void testDependencies()
   {
   	string test("test-dep");
@@ -111,56 +111,56 @@ public:
   	CPPUNIT_ASSERT_EQUAL( (*(pluginfo->begin()))->second , 1);
   	CPPUNIT_ASSERT_EQUAL( pluginfo->begin().getKey().compare("test-dep"),0);
   }
-  
 
-  
+
+
   void testVersionConversionStringInt()
   {
   	int v = PluginInfo::convertVersion(new string("1"));
   	CPPUNIT_ASSERT_EQUAL(1<<24,v);
-  	
+
   	v = PluginInfo::convertVersion(new string("255"));
   	CPPUNIT_ASSERT_EQUAL(255<<24,v);
-  	
+
   	v = PluginInfo::convertVersion(new string("1.2"));
   	CPPUNIT_ASSERT_EQUAL((1<<24) + (2<<16),v);
-  	
+
   	v = PluginInfo::convertVersion(new string("1.2.3"));
   	CPPUNIT_ASSERT_EQUAL((1<<24) + (2<<16) + (3<<8),v);
-  	
+
   	v = PluginInfo::convertVersion(new string("1.2.3.4"));
   	CPPUNIT_ASSERT_EQUAL((1<<24) + (2<<16) + (3<<8) + 4,v);
-  	
+
   	v = PluginInfo::convertVersion(new string("1."));
   	CPPUNIT_ASSERT_EQUAL(-1,v);
-  	
+
   	v = PluginInfo::convertVersion(new string("1.2."));
   	CPPUNIT_ASSERT_EQUAL(-1,v);
-  	
+
   	v = PluginInfo::convertVersion(new string("1.2.3."));
   	CPPUNIT_ASSERT_EQUAL(-1,v);
-  	
+
   	v = PluginInfo::convertVersion(new string("1.2.3.4."));
   	CPPUNIT_ASSERT_EQUAL(-1,v);
-  	
+
   	v = PluginInfo::convertVersion(new string("1.2.3.4...."));
   	CPPUNIT_ASSERT_EQUAL(-1,v);
-  	
+
   	v = PluginInfo::convertVersion(new string("......1.2.3.4"));
   	CPPUNIT_ASSERT_EQUAL(-1,v);
-  	
+
   	v = PluginInfo::convertVersion(new string("1..2.3.4"));
   	CPPUNIT_ASSERT_EQUAL(-1,v);
-  	
+
   	v = PluginInfo::convertVersion(new string("1.2...3.4"));
   	CPPUNIT_ASSERT_EQUAL(-1,v);
-  	
+
   	v = PluginInfo::convertVersion(new string("1.2.3....4"));
   	CPPUNIT_ASSERT_EQUAL(-1,v);
-  	
+
   	v = PluginInfo::convertVersion(new string("1.300.3.4"));
   	CPPUNIT_ASSERT_EQUAL(-1,v);
-  	
+
   	v = PluginInfo::convertVersion(new string("1.3.299.4"));
   	CPPUNIT_ASSERT_EQUAL(-1,v);
   }
diff --git a/myserver/tests/test_recursive_mutex.cpp b/myserver/tests/test_recursive_mutex.cpp
index 24d1b69..e6a3564 100644
--- a/myserver/tests/test_recursive_mutex.cpp
+++ b/myserver/tests/test_recursive_mutex.cpp
@@ -5,12 +5,12 @@
  it under the terms of the GNU General Public License as published by
  the Free Software Foundation; either version 3 of the License, or
  (at your option) any later version.
- 
- This program is distributed in the hope that it will be useful, 
+
+ This program is distributed in the hope that it will be useful,
  but WITHOUT ANY WARRANTY; without even the implied warranty of
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  GNU General Public License for more details.
- 
+
  You should have received a copy of the GNU General Public License
  along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
diff --git a/myserver/tests/test_regex.cpp b/myserver/tests/test_regex.cpp
index 622172b..f1404e2 100644
--- a/myserver/tests/test_regex.cpp
+++ b/myserver/tests/test_regex.cpp
@@ -5,12 +5,12 @@
  it under the terms of the GNU General Public License as published by
  the Free Software Foundation; either version 3 of the License, or
  (at your option) any later version.
- 
- This program is distributed in the hope that it will be useful, 
+
+ This program is distributed in the hope that it will be useful,
  but WITHOUT ANY WARRANTY; without even the implied warranty of
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  GNU General Public License for more details.
- 
+
  You should have received a copy of the GNU General Public License
  along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
diff --git a/myserver/tests/test_safetime.cpp b/myserver/tests/test_safetime.cpp
index 2d78057..449fbc6 100644
--- a/myserver/tests/test_safetime.cpp
+++ b/myserver/tests/test_safetime.cpp
@@ -5,12 +5,12 @@
  it under the terms of the GNU General Public License as published by
  the Free Software Foundation; either version 3 of the License, or
  (at your option) any later version.
- 
- This program is distributed in the hope that it will be useful, 
+
+ This program is distributed in the hope that it will be useful,
  but WITHOUT ANY WARRANTY; without even the implied warranty of
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  GNU General Public License for more details.
- 
+
  You should have received a copy of the GNU General Public License
  along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
diff --git a/myserver/tests/test_security_cache.cpp b/myserver/tests/test_security_cache.cpp
index 082c44c..54e5e7c 100644
--- a/myserver/tests/test_security_cache.cpp
+++ b/myserver/tests/test_security_cache.cpp
@@ -5,12 +5,12 @@
  it under the terms of the GNU General Public License as published by
  the Free Software Foundation; either version 3 of the License, or
  (at your option) any later version.
- 
- This program is distributed in the hope that it will be useful, 
+
+ This program is distributed in the hope that it will be useful,
  but WITHOUT ANY WARRANTY; without even the implied warranty of
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  GNU General Public License for more details.
- 
+
  You should have received a copy of the GNU General Public License
  along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
@@ -36,7 +36,7 @@ class TestSecurityCache : public CppUnit::TestFixture
   CPPUNIT_TEST ( testGetParser );
   CPPUNIT_TEST ( testGetSecurityFile );
   CPPUNIT_TEST_SUITE_END ();
-  
+
   SecurityCache *secCache;
 public:
   void setUp ()
diff --git a/myserver/tests/test_security_domain.cpp b/myserver/tests/test_security_domain.cpp
index c1090de..a6cc9de 100644
--- a/myserver/tests/test_security_domain.cpp
+++ b/myserver/tests/test_security_domain.cpp
@@ -5,12 +5,12 @@
  it under the terms of the GNU General Public License as published by
  the Free Software Foundation; either version 3 of the License, or
  (at your option) any later version.
- 
- This program is distributed in the hope that it will be useful, 
+
+ This program is distributed in the hope that it will be useful,
  but WITHOUT ANY WARRANTY; without even the implied warranty of
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  GNU General Public License for more details.
- 
+
  You should have received a copy of the GNU General Public License
  along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
@@ -36,7 +36,7 @@ class TestSecurityDomain : public CppUnit::TestFixture
   CPPUNIT_TEST( testGetValue );
   CPPUNIT_TEST( testGetName );
   CPPUNIT_TEST_SUITE_END();
-  
+
   SecurityDomain* securityDomain;
 public:
   void setUp()
diff --git a/myserver/tests/test_security_manager.cpp b/myserver/tests/test_security_manager.cpp
index 45e15fb..ae65e93 100644
--- a/myserver/tests/test_security_manager.cpp
+++ b/myserver/tests/test_security_manager.cpp
@@ -5,12 +5,12 @@
  it under the terms of the GNU General Public License as published by
  the Free Software Foundation; either version 3 of the License, or
  (at your option) any later version.
- 
- This program is distributed in the hope that it will be useful, 
+
+ This program is distributed in the hope that it will be useful,
  but WITHOUT ANY WARRANTY; without even the implied warranty of
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  GNU General Public License for more details.
- 
+
  You should have received a copy of the GNU General Public License
  along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
@@ -36,7 +36,7 @@ class TestSecurityManager : public CppUnit::TestFixture
   CPPUNIT_TEST_SUITE( TestSecurityManager );
   CPPUNIT_TEST( testGetPermissionMask );
   CPPUNIT_TEST_SUITE_END();
-  
+
   AuthMethodFactory authMethodFactory;
   ValidatorFactory validatorFactory;
   SecurityManager* securityManager;
diff --git a/myserver/tests/test_security_token.cpp b/myserver/tests/test_security_token.cpp
index 52407bc..da5d635 100644
--- a/myserver/tests/test_security_token.cpp
+++ b/myserver/tests/test_security_token.cpp
@@ -5,12 +5,12 @@
  it under the terms of the GNU General Public License as published by
  the Free Software Foundation; either version 3 of the License, or
  (at your option) any later version.
- 
- This program is distributed in the hope that it will be useful, 
+
+ This program is distributed in the hope that it will be useful,
  but WITHOUT ANY WARRANTY; without even the implied warranty of
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  GNU General Public License for more details.
- 
+
  You should have received a copy of the GNU General Public License
  along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
@@ -117,7 +117,7 @@ public:
     securityToken->setProvidedMask (mask);
     CPPUNIT_ASSERT_EQUAL (securityToken->getProvidedMask (), mask);
   }
-  
+
   void testNeededPassword ()
   {
     string password ("foo");
@@ -149,7 +149,7 @@ public:
     securityToken->setServer (s);
     CPPUNIT_ASSERT_EQUAL (securityToken->getServer (), s);
   }
-  
+
   void testVhost ()
   {
     Vhost *v = (Vhost*)0x100; //XXX: Dirty.
diff --git a/myserver/tests/test_semaphore.cpp b/myserver/tests/test_semaphore.cpp
index 95af4c0..da0090b 100644
--- a/myserver/tests/test_semaphore.cpp
+++ b/myserver/tests/test_semaphore.cpp
@@ -5,12 +5,12 @@
  it under the terms of the GNU General Public License as published by
  the Free Software Foundation; either version 3 of the License, or
  (at your option) any later version.
- 
- This program is distributed in the hope that it will be useful, 
+
+ This program is distributed in the hope that it will be useful,
  but WITHOUT ANY WARRANTY; without even the implied warranty of
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  GNU General Public License for more details.
- 
+
  You should have received a copy of the GNU General Public License
  along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
diff --git a/myserver/tests/test_slab.cpp b/myserver/tests/test_slab.cpp
index 4d08d28..8011acf 100644
--- a/myserver/tests/test_slab.cpp
+++ b/myserver/tests/test_slab.cpp
@@ -5,16 +5,16 @@
  it under the terms of the GNU General Public License as published by
  the Free Software Foundation; either version 3 of the License, or
  (at your option) any later version.
- 
- This program is distributed in the hope that it will be useful, 
+
+ This program is distributed in the hope that it will be useful,
  but WITHOUT ANY WARRANTY; without even the implied warranty of
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  GNU General Public License for more details.
- 
+
  You should have received a copy of the GNU General Public License
  along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
- 
+
 #include <cppunit/CompilerOutputter.h>
 #include <cppunit/extensions/TestFactoryRegistry.h>
 #include <cppunit/ui/text/TestRunner.h>
@@ -44,7 +44,7 @@ public:
   void setUp ()
   {
   }
-  
+
   void tearDown ()
   {
   }
diff --git a/myserver/tests/test_socket.cpp b/myserver/tests/test_socket.cpp
index e7018f9..ebaaa7d 100644
--- a/myserver/tests/test_socket.cpp
+++ b/myserver/tests/test_socket.cpp
@@ -5,12 +5,12 @@
  it under the terms of the GNU General Public License as published by
  the Free Software Foundation; either version 3 of the License, or
  (at your option) any later version.
- 
- This program is distributed in the hope that it will be useful, 
+
+ This program is distributed in the hope that it will be useful,
  but WITHOUT ANY WARRANTY; without even the implied warranty of
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  GNU General Public License for more details.
- 
+
  You should have received a copy of the GNU General Public License
  along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
@@ -41,31 +41,31 @@ class TestSocket : public CppUnit::TestFixture
 {
   Socket *obj;
   ThreadID tid;
-  
+
   CPPUNIT_TEST_SUITE( TestSocket );
-  
+
   CPPUNIT_TEST( testGethostname );
   CPPUNIT_TEST( testRecv );
   CPPUNIT_TEST( testGetLocalIPsList );
-  
+
   CPPUNIT_TEST_SUITE_END( );
-  
+
 public:
-  
+
   void setUp ( )
   {
     CPPUNIT_ASSERT_EQUAL( Socket::startupSocketLib ( ), 0 );
-    
+
     obj = new Socket;
   }
-  
+
   void tearDown ( )
   {
     delete obj;
   }
-  
+
   void testGethostname ( )
-  { 
+  {
     int len;
 #ifdef HOST_NAME_MAX
     len = HOST_NAME_MAX;
@@ -76,10 +76,10 @@ public:
 #endif
 
     int status = obj->gethostname ( host, len );
-  
+
     CPPUNIT_ASSERT_EQUAL( status, 0 );
   }
-  
+
   void testRecv ( )
   {
     ThreadID tid;
@@ -88,15 +88,15 @@ public:
     int port = 6543;
     MYSERVER_SOCKADDRIN sockIn = { 0 };
     int status;
-    
+
     ((sockaddr_in*) (&sockIn))->sin_family = AF_INET;
     ((sockaddr_in*) (&sockIn))->sin_addr.s_addr = inet_addr ( "127.0.0.1" );
     ((sockaddr_in*) (&sockIn))->sin_port = htons ( port );
-    
+
     socklen_t sockInLen = sizeof ( sockaddr_in );
-    
+
     CPPUNIT_ASSERT( obj->socket ( AF_INET, SOCK_STREAM, 0 ) != -1 );
-    
+
     CPPUNIT_ASSERT( obj->setsockopt ( SOL_SOCKET, SO_REUSEADDR,
                                       (const char*) &optvalReuseAddr,
                                       sizeof(optvalReuseAddr) ) != -1 );
@@ -106,7 +106,7 @@ public:
       while ( ++port < 28000 )
       {
         ((sockaddr_in*) (&sockIn))->sin_port = htons ( port );
-        
+
         if ( ( status = obj->bind ( &sockIn, sockInLen ) ) == 0 )
           break;
       }
@@ -141,19 +141,19 @@ public:
 
     CPPUNIT_ASSERT( obj->close ( ) != -1 );
   }
-  
+
   void testGetLocalIPsList ( )
   {
     int status = obj->socket ( AF_INET, SOCK_STREAM, 0 );
 
     CPPUNIT_ASSERT( status != -1 );
-    
+
     string out;
-    
+
     status = obj->getLocalIPsList ( out );
-    
+
     CPPUNIT_ASSERT( status != -1 );
-    
+
     status = obj->close ( );
 
     CPPUNIT_ASSERT( status != -1 );
diff --git a/myserver/tests/test_socket_pair.cpp b/myserver/tests/test_socket_pair.cpp
index 83225a8..7c198fe 100644
--- a/myserver/tests/test_socket_pair.cpp
+++ b/myserver/tests/test_socket_pair.cpp
@@ -5,12 +5,12 @@
  it under the terms of the GNU General Public License as published by
  the Free Software Foundation; either version 3 of the License, or
  (at your option) any later version.
- 
- This program is distributed in the hope that it will be useful, 
+
+ This program is distributed in the hope that it will be useful,
  but WITHOUT ANY WARRANTY; without even the implied warranty of
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  GNU General Public License for more details.
- 
+
  You should have received a copy of the GNU General Public License
  along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
@@ -30,10 +30,10 @@ class TestSocketPair : public CppUnit::TestFixture
   CPPUNIT_TEST( testInverted );
   CPPUNIT_TEST( testWriteRead );
   CPPUNIT_TEST_SUITE_END();
-  
+
 public:
 
-  void setUp() 
+  void setUp()
   {
   }
 
@@ -84,7 +84,7 @@ public:
     CPPUNIT_ASSERT_EQUAL(ret, 0);
 
     ret = readSock.read (outBuffer, 256, &nbr);
-    
+
     CPPUNIT_ASSERT_EQUAL(ret, 0);
 
 
diff --git a/myserver/tests/test_socket_stream_creator.cpp b/myserver/tests/test_socket_stream_creator.cpp
index bf3baaf..4f8c57d 100644
--- a/myserver/tests/test_socket_stream_creator.cpp
+++ b/myserver/tests/test_socket_stream_creator.cpp
@@ -5,12 +5,12 @@
   it under the terms of the GNU General Public License as published by
   the Free Software Foundation; either version 3 of the License, or
   (at your option) any later version.
- 
-  This program is distributed in the hope that it will be useful, 
+
+  This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   GNU General Public License for more details.
- 
+
   You should have received a copy of the GNU General Public License
   along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
@@ -40,7 +40,7 @@ public:
     ssc = new SocketStreamCreator ();
     ff = new FiltersFactory ();
   }
-  
+
   void testCreation ()
   {
     list<string> filters;
diff --git a/myserver/tests/test_ssl_socket.cpp b/myserver/tests/test_ssl_socket.cpp
index c9a5e00..b377db8 100644
--- a/myserver/tests/test_ssl_socket.cpp
+++ b/myserver/tests/test_ssl_socket.cpp
@@ -5,12 +5,12 @@
  it under the terms of the GNU General Public License as published by
  the Free Software Foundation; either version 3 of the License, or
  (at your option) any later version.
- 
- This program is distributed in the hope that it will be useful, 
+
+ This program is distributed in the hope that it will be useful,
  but WITHOUT ANY WARRANTY; without even the implied warranty of
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  GNU General Public License for more details.
- 
+
  You should have received a copy of the GNU General Public License
  along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
@@ -92,13 +92,13 @@ static DEFINE_THREAD(testSslRecvClient, pParam);
 class TestSslSocket : public CppUnit::TestFixture
 {
   CPPUNIT_TEST_SUITE( TestSslSocket );
-  
+
   CPPUNIT_TEST( testRecv );
-  
+
   CPPUNIT_TEST_SUITE_END( );
-  
+
 public:
-  
+
   void setUp ( )
   {
     initializeSSL ();
@@ -113,38 +113,38 @@ public:
     f.writeToFile (serverPem, strlen (serverPem), &nbw);
     f.close ();
   }
-  
+
   void tearDown ( )
   {
     FilesUtility::deleteFile (TESTSERVERPEM);
     FilesUtility::deleteFile (TESTSERVERKEY);
   }
-  
+
   void testRecv ( )
   {
     Socket *obj = new Socket;
     SslSocket *sslObj = NULL;
     SSL_CTX *ctx = NULL;;
     ThreadID tid;
-    
+
     int optvalReuseAddr = 1;
     char host[] = "localhost";
     int port = 6543;
     MYSERVER_SOCKADDRIN sockIn = { 0 };
     int status;
-    
+
     ((sockaddr_in*) (&sockIn))->sin_family = AF_INET;
     ((sockaddr_in*) (&sockIn))->sin_addr.s_addr = inet_addr ( "127.0.0.1" );
     ((sockaddr_in*) (&sockIn))->sin_port = htons ( port );
-    
+
     socklen_t sockInLen = sizeof ( sockaddr_in );
-    
+
     CPPUNIT_ASSERT( obj->socket ( AF_INET, SOCK_STREAM, 0 ) != -1 );
-    
+
     CPPUNIT_ASSERT( obj->setsockopt ( SOL_SOCKET, SO_REUSEADDR,
                                       (const char*) &optvalReuseAddr,
                                       sizeof(optvalReuseAddr) ) != -1 );
-    
+
     ctx = SSL_CTX_new ( SSLv23_server_method() );
 
     if ( SSL_CTX_use_certificate_file ( ctx, TESTSERVERPEM, SSL_FILETYPE_PEM ) != 1 )
@@ -186,9 +186,9 @@ public:
       SSL_CTX_free ( ctx );
       CPPUNIT_ASSERT (false);
     }
-    
+
     char buf[32] = {0};
-    
+
     ret = sslObj->recv ( buf, sizeof(buf), 0 );
 
     sslObj->send ( "a", 1, 0);
diff --git a/myserver/tests/test_thread.cpp b/myserver/tests/test_thread.cpp
index c7a198d..5d78cbd 100644
--- a/myserver/tests/test_thread.cpp
+++ b/myserver/tests/test_thread.cpp
@@ -5,12 +5,12 @@
  it under the terms of the GNU General Public License as published by
  the Free Software Foundation; either version 3 of the License, or
  (at your option) any later version.
- 
- This program is distributed in the hope that it will be useful, 
+
+ This program is distributed in the hope that it will be useful,
  but WITHOUT ANY WARRANTY; without even the implied warranty of
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  GNU General Public License for more details.
- 
+
  You should have received a copy of the GNU General Public License
  along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
@@ -59,7 +59,7 @@ class TestThread : public CppUnit::TestFixture
 public:
   void setUp()
   {
- 
+
   }
 
   void tearDown()
@@ -77,8 +77,8 @@ public:
     Thread::join(tid);
 
 
-    CPPUNIT_ASSERT_EQUAL(res, 0); 
-    CPPUNIT_ASSERT_EQUAL(data, expected); 
+    CPPUNIT_ASSERT_EQUAL(res, 0);
+    CPPUNIT_ASSERT_EQUAL(data, expected);
   }
 
   void testThreadTerminate()
@@ -89,8 +89,8 @@ public:
     Thread::join(tid);
 
 
-    CPPUNIT_ASSERT_EQUAL(res, 0); 
-    CPPUNIT_ASSERT_EQUAL(data, 0); 
+    CPPUNIT_ASSERT_EQUAL(res, 0);
+    CPPUNIT_ASSERT_EQUAL(data, 0);
   }
 
 
diff --git a/myserver/tests/test_unix_socket.cpp b/myserver/tests/test_unix_socket.cpp
index a22303f..a8c289d 100644
--- a/myserver/tests/test_unix_socket.cpp
+++ b/myserver/tests/test_unix_socket.cpp
@@ -5,12 +5,12 @@
  it under the terms of the GNU General Public License as published by
  the Free Software Foundation; either version 3 of the License, or
  (at your option) any later version.
- 
- This program is distributed in the hope that it will be useful, 
+
+ This program is distributed in the hope that it will be useful,
  but WITHOUT ANY WARRANTY; without even the implied warranty of
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  GNU General Public License for more details.
- 
+
  You should have received a copy of the GNU General Public License
  along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
@@ -46,17 +46,17 @@ void* test_unix_socket_server (void* pParam)
 
   if (client.getHandle () == 0)
     return NULL;
-  
+
   char buffer [256];
   if (client.recv(buffer, 256, 0, MYSERVER_SEC (1)) == 0)
     {
       client.close ();
       return NULL;
     }
-  
+
 
   server->result = !strcmpi (buffer, TEST_STRING);
- 
+
   client.close ();
   return NULL;
 }
@@ -69,11 +69,11 @@ class TestUnixSocket : public CppUnit::TestFixture
   CPPUNIT_TEST( testBind );
   CPPUNIT_TEST( testClient );
   CPPUNIT_TEST_SUITE_END();
-  
+
   UnixSocket *sock;
 public:
 
-  void setUp () 
+  void setUp ()
   {
     sock = new UnixSocket ();
   }
@@ -124,7 +124,7 @@ public:
     sock->socket ();
     sock->bind (path.c_str ());
     CPPUNIT_ASSERT_EQUAL (sock->listen (1), 0);
-  
+
     int res = Thread::create (&tid, test_unix_socket_server, &data);
 
     UnixSocket client;
diff --git a/myserver/tests/test_url.cpp b/myserver/tests/test_url.cpp
index 696e709..3129888 100644
--- a/myserver/tests/test_url.cpp
+++ b/myserver/tests/test_url.cpp
@@ -6,7 +6,7 @@
  the Free Software Foundation; either version 3 of the License, or
  (at your option) any later version.
 
- This program is distributed in the hope that it will be useful, 
+ This program is distributed in the hope that it will be useful,
  but WITHOUT ANY WARRANTY; without even the implied warranty of
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  GNU General Public License for more details.
diff --git a/myserver/tests/test_validator.cpp b/myserver/tests/test_validator.cpp
index cf69fe1..5c93e09 100644
--- a/myserver/tests/test_validator.cpp
+++ b/myserver/tests/test_validator.cpp
@@ -20,7 +20,7 @@ class TestValidator : public CppUnit::TestFixture
   CPPUNIT_TEST( testGetPermissionMaskImpl );
   CPPUNIT_TEST( testGetValue );
   CPPUNIT_TEST_SUITE_END();
-  
+
   Validator* validator;
 public:
   void setUp()
@@ -39,13 +39,13 @@ public:
     HashMap<string, SecurityDomain*> hashedDomains;
     CPPUNIT_ASSERT_EQUAL (validator->getValue (&hashedDomains, val), (string*)NULL);
   }
- 
+
   void testGetPermissionMaskImpl ()
   {
     string val ("value");
     SecurityToken secToken;
     CPPUNIT_ASSERT_EQUAL (validator->getPermissionMaskImpl (&secToken, NULL, NULL), 0);
- 
+
   }
 
   void testGetPermissionMask ()
diff --git a/myserver/tests/test_validator_factory.cpp b/myserver/tests/test_validator_factory.cpp
index b81f686..37a9c66 100644
--- a/myserver/tests/test_validator_factory.cpp
+++ b/myserver/tests/test_validator_factory.cpp
@@ -22,7 +22,7 @@ class TestValidatorFactory : public CppUnit::TestFixture
   CPPUNIT_TEST( testAddValidator );
   CPPUNIT_TEST( testIsValidatorPresent );
   CPPUNIT_TEST_SUITE_END();
-  
+
   ValidatorFactory* factory;
 public:
   void setUp()
@@ -39,14 +39,14 @@ public:
   {
     string val("foo");
     CPPUNIT_ASSERT_EQUAL(factory->getValidator(val), (Validator*)NULL);
- 
+
   }
- 
+
   void testAddValidator()
   {
     string val("bar");
     Validator *validator = new Validator;
-   
+
     Validator* old = factory->addValidator(val, validator);
 
     CPPUNIT_ASSERT_EQUAL(old, (Validator*)NULL);
@@ -58,11 +58,11 @@ public:
     string val("bar");
     Validator *validator = new Validator;
 
- 
+
     CPPUNIT_ASSERT_EQUAL(factory->isValidatorPresent(val), false);
-   
+
     factory->addValidator(val, validator);
- 
+
     CPPUNIT_ASSERT_EQUAL(factory->isValidatorPresent(val), true);
   }
 };
diff --git a/myserver/tests/test_xml.cpp b/myserver/tests/test_xml.cpp
index 015c932..311ddaf 100644
--- a/myserver/tests/test_xml.cpp
+++ b/myserver/tests/test_xml.cpp
@@ -5,12 +5,12 @@
  it under the terms of the GNU General Public License as published by
  the Free Software Foundation; either version 3 of the License, or
  (at your option) any later version.
- 
- This program is distributed in the hope that it will be useful, 
+
+ This program is distributed in the hope that it will be useful,
  but WITHOUT ANY WARRANTY; without even the implied warranty of
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  GNU General Public License for more details.
- 
+
  You should have received a copy of the GNU General Public License
  along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
@@ -46,7 +46,7 @@ class TestXml : public CppUnit::TestFixture
             << "<NODE><ELEMENT>d</ELEMENT><ELEMENT>e</ELEMENT></NODE>"
             << "<NODE><ELEMENT>f</ELEMENT></NODE>"
             << "</ROOT>";
-    
+
     return memBuf;
   }
 
@@ -54,14 +54,14 @@ public:
 
   void setUp()
   {
- 
+
   }
 
   void tearDown()
   {
 
   }
-  
+
   void testOpenMemBuf()
   {
     MemBuf* memBuf = getXmlMemBuf();
@@ -94,7 +94,7 @@ public:
     CPPUNIT_ASSERT(obj);
 
     CPPUNIT_ASSERT_EQUAL(nodes->nodeNr, 1);
-    
+
     CPPUNIT_ASSERT(!strcmp((const char*)nodes->nodeTab[0]->content, "a"));
 
     delete xpathRes;
diff --git a/myserver/tests/test_xml_validator.cpp b/myserver/tests/test_xml_validator.cpp
index 7749f03..7ea1ef8 100644
--- a/myserver/tests/test_xml_validator.cpp
+++ b/myserver/tests/test_xml_validator.cpp
@@ -20,7 +20,7 @@ class TestXmlValidator : public CppUnit::TestFixture
   CPPUNIT_TEST( testGetPermissionMaskImpl );
   CPPUNIT_TEST( testGetValue );
   CPPUNIT_TEST_SUITE_END();
-  
+
   XmlValidator* xmlValidator;
 public:
   void setUp()
@@ -39,9 +39,9 @@ public:
     HashMap<string, SecurityDomain*> hashedDomains;
 
     CPPUNIT_ASSERT_EQUAL(xmlValidator->getValue(&hashedDomains, val), (string*)NULL);
- 
+
   }
- 
+
   void testGetPermissionMaskImpl()
   {
     string val("value");
@@ -51,7 +51,7 @@ public:
     secToken.setDirectory (&val);
     secToken.setSysDirectory (&val);
     CPPUNIT_ASSERT_EQUAL(xmlValidator->getPermissionMaskImpl(&secToken, NULL, NULL), 0);
- 
+
   }
 
   void testGetPermissionMask()

-----------------------------------------------------------------------

Summary of changes:
 .../binaries/web/cgi-src/math_sum/math_sum.cpp     |   46 ++--
 myserver/binaries/web/cgi-src/post/post.cpp        |   14 +-
 myserver/include/base/base64/mime_utils.h          |    2 +-
 myserver/include/base/bitvec/bitvec.h              |    8 +-
 myserver/include/base/dynamic_lib/dynamiclib.h     |    2 +-
 myserver/include/base/file/file.h                  |    2 +-
 myserver/include/base/files_cache/cached_file.h    |    2 +-
 myserver/include/base/find_data/find_data.h        |    6 +-
 myserver/include/base/md5/md5.h                    |    6 +-
 myserver/include/base/mem_buff/mem_buff.h          |    4 +-
 myserver/include/base/multicast/multicast.h        |    6 +-
 myserver/include/base/process/fork_server.h        |    2 +-
 .../include/base/process/process_server_manager.h  |   14 +-
 myserver/include/base/regex/myserver_regex.h       |    6 +-
 myserver/include/base/socket/socket.h              |    2 +-
 myserver/include/base/socket/ssl_socket.h          |    2 +-
 myserver/include/base/thread/thread.h              |    6 +-
 myserver/include/base/xml/xml_parser.h             |    8 +-
 myserver/include/conf/mime/mime_manager.h          |    2 +-
 myserver/include/conf/security/security_cache.h    |    4 +-
 myserver/include/conf/security/security_manager.h  |    8 +-
 myserver/include/conf/security/security_token.h    |   10 +-
 myserver/include/conf/security/validator.h         |    6 +-
 myserver/include/conf/security/xml_validator.h     |   16 +-
 myserver/include/conf/vhost/vhost.h                |    2 +-
 .../connections_scheduler/connections_scheduler.h  |    4 +-
 myserver/include/filter/filters_factory.h          |    6 +-
 myserver/include/http_handler/cgi/cgi.h            |    6 +-
 myserver/include/http_handler/fastcgi/fastcgi.h    |   20 +-
 myserver/include/http_handler/http_dir/http_dir.h  |    2 +-
 myserver/include/http_handler/isapi/isapi.h        |   28 +-
 myserver/include/log/log_manager.h                 |    2 +-
 myserver/include/log/stream/log_stream.h           |    2 +-
 myserver/include/log/stream/socket_stream.h        |    2 +-
 myserver/include/plugin/plugin_info.h              |   42 ++--
 myserver/include/protocol/control/control_errors.h |   10 +-
 myserver/include/protocol/ftp/ftp_common.h         |    2 +-
 myserver/include/protocol/ftp/ftp_lexer.h          |   10 +-
 myserver/include/protocol/ftp/ftp_parser.h         |   10 +-
 myserver/include/protocol/http/dyn_http_command.h  |    6 +-
 .../protocol/http/dyn_http_command_manager.h       |   10 +-
 myserver/include/protocol/http/dyn_http_manager.h  |    2 +-
 myserver/include/protocol/http/http.h              |   26 +-
 myserver/include/protocol/http/http_data_handler.h |    6 +-
 myserver/include/protocol/http/http_data_read.h    |    2 +-
 myserver/include/protocol/http/http_headers.h      |   16 +-
 myserver/include/protocol/http/http_request.h      |   20 +-
 myserver/include/protocol/http/http_response.h     |   14 +-
 .../include/protocol/http/http_thread_context.h    |    4 +-
 myserver/include/protocol/https/https.h            |    2 +-
 myserver/include/protocol/protocol.h               |    2 +-
 myserver/include/protocol/protocols_manager.h      |    2 +-
 myserver/include/server/server.h                   |   51 ++--
 myserver/src/base/base64/mime_utils.cpp            |   18 +-
 myserver/src/base/file/file.cpp                    |   10 +-
 myserver/src/base/file/files_utility.cpp           |    6 +-
 myserver/src/base/files_cache/cached_file.cpp      |   13 +-
 myserver/src/base/find_data/find_data.cpp          |    4 +-
 myserver/src/base/hash_map/hash_map.cpp            |    2 +-
 myserver/src/base/home_dir/home_dir.cpp            |    4 +-
 myserver/src/base/md5/md5.cpp                      |   18 +-
 myserver/src/base/mem_buff/mem_buff.cpp            |  118 +++++-----
 myserver/src/base/multicast/multicast.cpp          |   12 +-
 myserver/src/base/process/fork_server.cpp          |   50 ++--
 .../src/base/process/process_server_manager.cpp    |   50 ++--
 myserver/src/base/regex/myserver_regex.cpp         |    2 +-
 myserver/src/base/safetime/safetime.cpp            |    2 +-
 myserver/src/base/socket/socket.cpp                |   52 ++--
 myserver/src/base/socket/ssl_socket.cpp            |    6 +-
 myserver/src/base/socket_pair/socket_pair.cpp      |   12 +-
 myserver/src/base/ssl/ssl.cpp                      |    4 +-
 myserver/src/base/sync/event.cpp                   |    8 +-
 myserver/src/base/sync/mutex.cpp                   |    6 +-
 myserver/src/base/sync/semaphore.cpp               |    4 +-
 myserver/src/base/xml/xml_parser.cpp               |   80 +++---
 myserver/src/conf/mime/mime_manager.cpp            |    2 +-
 myserver/src/conf/security/auth_method_factory.cpp |    2 +-
 myserver/src/conf/security/security_cache.cpp      |   28 +-
 myserver/src/conf/security/security_manager.cpp    |   10 +-
 myserver/src/conf/security/security_token.cpp      |    8 +-
 myserver/src/conf/security/validator.cpp           |   14 +-
 myserver/src/conf/security/xml_validator.cpp       |   44 ++--
 myserver/src/conf/vhost/vhost.cpp                  |    2 +-
 myserver/src/conf/vhost/vhost_manager.cpp          |   24 +-
 myserver/src/conf/xml_conf.cpp                     |    6 +-
 myserver/src/connection/connection.cpp             |   12 +-
 .../connections_scheduler.cpp                      |    4 +-
 .../src/connections_scheduler/listen_threads.cpp   |   32 ++--
 myserver/src/filter/console.cpp                    |    4 +-
 myserver/src/filter/filter.cpp                     |    2 +-
 myserver/src/filter/filters_chain.cpp              |   28 +-
 myserver/src/filter/filters_factory.cpp            |   12 +-
 myserver/src/filter/memory_stream.cpp              |    4 +-
 myserver/src/filter/stream.cpp                     |    6 +-
 myserver/src/http_handler/cgi/cgi.cpp              |   74 +++---
 myserver/src/http_handler/http_dir/http_dir.cpp    |    4 +-
 myserver/src/http_handler/http_file/http_file.cpp  |    2 +-
 myserver/src/http_handler/isapi/isapi.cpp          |    6 +-
 myserver/src/http_handler/mscgi/mscgi_manager.cpp  |   20 +-
 myserver/src/http_handler/proxy/proxy.cpp          |    2 +-
 myserver/src/http_handler/wincgi/wincgi.cpp        |    2 +-
 myserver/src/log/log_manager.cpp                   |    6 +-
 myserver/src/log/stream/console_stream.cpp         |    2 +-
 myserver/src/log/stream/console_stream_creator.cpp |    2 +-
 myserver/src/log/stream/file_stream.cpp            |   12 +-
 myserver/src/log/stream/file_stream_creator.cpp    |    2 +-
 myserver/src/log/stream/socket_stream.cpp          |    2 +-
 myserver/src/log/stream/socket_stream_creator.cpp  |    2 +-
 myserver/src/myserver.cpp                          |   12 +-
 myserver/src/plugin/plugin_info.cpp                |   48 ++--
 myserver/src/plugin/plugins_manager.cpp            |   38 ++--
 myserver/src/protocol/control/control_header.cpp   |   18 +-
 myserver/src/protocol/control/control_protocol.cpp |   10 +-
 myserver/src/protocol/ftp/ftp.cpp                  |   28 +-
 myserver/src/protocol/ftp/ftp_parser.cpp           |   10 +-
 myserver/src/protocol/http/dyn_http_command.cpp    |    4 +-
 myserver/src/protocol/http/dyn_http_manager.cpp    |    2 +-
 .../src/protocol/http/dyn_http_manager_list.cpp    |    2 +-
 myserver/src/protocol/http/env/env.cpp             |   50 ++--
 myserver/src/protocol/http/http.cpp                |   32 ++--
 myserver/src/protocol/http/http_data_handler.cpp   |    2 +-
 myserver/src/protocol/http/http_data_read.cpp      |    2 +-
 myserver/src/protocol/http/http_request.cpp        |   80 +++---
 myserver/src/protocol/http/http_response.cpp       |   88 ++++----
 myserver/src/protocol/http/http_thread_context.cpp |    4 +-
 myserver/src/protocol/https/https.cpp              |    6 +-
 myserver/src/protocol/protocol.cpp                 |    2 +-
 myserver/src/protocol/protocol_buffer.cpp          |    2 +-
 myserver/src/protocol/protocols_manager.cpp        |    2 +-
 myserver/src/server/clients_thread.cpp             |    4 +-
 myserver/src/server/server.cpp                     |  271 +++++++++-----------
 myserver/tests/main.cpp                            |    6 +-
 myserver/tests/test_auth_domain.cpp                |    8 +-
 myserver/tests/test_base64.cpp                     |    6 +-
 myserver/tests/test_bitvec.cpp                     |   18 +-
 myserver/tests/test_cached_file.cpp                |   10 +-
 myserver/tests/test_cached_file_buffer.cpp         |   10 +-
 myserver/tests/test_cached_file_factory.cpp        |    6 +-
 myserver/tests/test_connection.cpp                 |    6 +-
 myserver/tests/test_connections_scheduler.cpp      |   14 +-
 myserver/tests/test_file.cpp                       |   28 +-
 myserver/tests/test_file_stream.cpp                |   10 +-
 myserver/tests/test_file_stream_creator.cpp        |   10 +-
 myserver/tests/test_files_utility.cpp              |    8 +-
 myserver/tests/test_filter_chain.cpp               |   10 +-
 myserver/tests/test_fork_server.cpp                |   12 +-
 myserver/tests/test_ftp.cpp                        |    6 +-
 myserver/tests/test_gzip.cpp                       |   12 +-
 myserver/tests/test_hashmap.cpp                    |   32 ++--
 myserver/tests/test_homedir.cpp                    |   10 +-
 myserver/tests/test_http_req_security_domain.cpp   |    6 +-
 myserver/tests/test_http_request.cpp               |   26 +-
 myserver/tests/test_http_response.cpp              |   18 +-
 myserver/tests/test_ip.cpp                         |    6 +-
 myserver/tests/test_log_stream_factory.cpp         |   10 +-
 myserver/tests/test_md5.cpp                        |    6 +-
 myserver/tests/test_mem_buff.cpp                   |   10 +-
 myserver/tests/test_mem_stream.cpp                 |   14 +-
 myserver/tests/test_mime_manager.cpp               |   10 +-
 myserver/tests/test_multicast.cpp                  |   10 +-
 myserver/tests/test_mutex.cpp                      |    6 +-
 myserver/tests/test_pipe.cpp                       |   12 +-
 myserver/tests/test_plugin_info.cpp                |   56 ++--
 myserver/tests/test_recursive_mutex.cpp            |    6 +-
 myserver/tests/test_regex.cpp                      |    6 +-
 myserver/tests/test_safetime.cpp                   |    6 +-
 myserver/tests/test_security_cache.cpp             |    8 +-
 myserver/tests/test_security_domain.cpp            |    8 +-
 myserver/tests/test_security_manager.cpp           |    8 +-
 myserver/tests/test_security_token.cpp             |   10 +-
 myserver/tests/test_semaphore.cpp                  |    6 +-
 myserver/tests/test_slab.cpp                       |   10 +-
 myserver/tests/test_socket.cpp                     |   48 ++--
 myserver/tests/test_socket_pair.cpp                |   12 +-
 myserver/tests/test_socket_stream_creator.cpp      |    8 +-
 myserver/tests/test_ssl_socket.cpp                 |   34 ++--
 myserver/tests/test_thread.cpp                     |   16 +-
 myserver/tests/test_unix_socket.cpp                |   18 +-
 myserver/tests/test_url.cpp                        |    2 +-
 myserver/tests/test_validator.cpp                  |    6 +-
 myserver/tests/test_validator_factory.cpp          |   14 +-
 myserver/tests/test_xml.cpp                        |   14 +-
 myserver/tests/test_xml_validator.cpp              |    8 +-
 plugins/src/http_checker/http_checker.cpp          |    8 +-
 plugins/src/mime_magic/mime_magic.cpp              |    2 +-
 plugins/src/php/php.cpp                            |    8 +-
 plugins/src/python/python.cpp                      |   23 +-
 .../python_http_handler/python_http_handler.cpp    |   82 +++---
 plugins/src/rules_checker/rules_checker.cpp        |    4 +-
 189 files changed, 1413 insertions(+), 1449 deletions(-)


hooks/post-receive
-- 
GNU MyServer



From MAILER-DAEMON Sun Aug 23 13:13:36 2009
Received: from mailman by lists.gnu.org with archive (Exim 4.43)
	id 1MfGdL-0000qn-Pu
	for mharc-myserver-commit@gnu.org; Sun, 23 Aug 2009 13:13:35 -0400
Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43)
	id 1MfGdK-0000pF-75
	for myserver-commit@gnu.org; Sun, 23 Aug 2009 13:13:34 -0400
Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43)
	id 1MfGdJ-0000oT-JY
	for myserver-commit@gnu.org; Sun, 23 Aug 2009 13:13:33 -0400
Received: from [199.232.76.173] (port=37378 helo=monty-python.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43) id 1MfGdJ-0000o0-8v
	for myserver-commit@gnu.org; Sun, 23 Aug 2009 13:13:33 -0400
Received: from savannah.gnu.org ([199.232.41.3]:57191 helo=sv.gnu.org)
	by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32)
	(Exim 4.60) (envelope-from <gscrivano@gnu.org>) id 1MfGdI-0005Fe-VA
	for myserver-commit@gnu.org; Sun, 23 Aug 2009 13:13:33 -0400
Received: from download.savannah.gnu.org ([199.232.41.75]
	helo=cvs.savannah.gnu.org) by sv.gnu.org with esmtp (Exim 4.69)
	(envelope-from <gscrivano@gnu.org>) id 1MfGdI-0005Jl-GA
	for myserver-commit@gnu.org; Sun, 23 Aug 2009 17:13:32 +0000
Received: from gscrivano by cvs.savannah.gnu.org with local (Exim 4.69)
	(envelope-from <gscrivano@savannah.gnu.org>) id 1MfGdH-0005JI-It
	for myserver-commit@gnu.org; Sun, 23 Aug 2009 17:13:32 +0000
To: myserver-commit@gnu.org
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: 5d3d08dda187d4b4e9344c9d8d56a013734b3ef6
X-Git-Newrev: 8879eac521034fea0a594dc60be5903a1dd737d4
Message-Id: <E1MfGdH-0005JI-It@cvs.savannah.gnu.org>
From: Giuseppe Scrivano <gscrivano@gnu.org>
Date: Sun, 23 Aug 2009 17:13:32 +0000
X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2)
Subject: [myserver-commit] [SCM] GNU MyServer branch, master,
	updated. 8879eac521034fea0a594dc60be5903a1dd737d4
X-BeenThere: myserver-commit@gnu.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: myserver-commit.gnu.org
List-Unsubscribe: <http://lists.gnu.org/mailman/listinfo/myserver-commit>,
	<mailto:myserver-commit-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/pipermail/myserver-commit>
List-Post: <mailto:myserver-commit@gnu.org>
List-Help: <mailto:myserver-commit-request@gnu.org?subject=help>
List-Subscribe: <http://lists.gnu.org/mailman/listinfo/myserver-commit>,
	<mailto:myserver-commit-request@gnu.org?subject=subscribe>
X-List-Received-Date: Sun, 23 Aug 2009 17:13:35 -0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU MyServer".

The branch, master has been updated
       via  8879eac521034fea0a594dc60be5903a1dd737d4 (commit)
      from  5d3d08dda187d4b4e9344c9d8d56a013734b3ef6 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------


commit 8879eac521034fea0a594dc60be5903a1dd737d4
Author: Giuseppe Scrivano <gscrivano@gnu.org>
Date:   Sun Aug 23 19:12:09 2009 +0200

    Avoid to use non-existing files.

diff --git a/myserver/configure.ac b/myserver/configure.ac
index 0474f21..c6a803a 100644
--- a/myserver/configure.ac
+++ b/myserver/configure.ac
@@ -342,8 +342,6 @@ AC_CONFIG_FILES([ po/Makefile.in
     binaries/Makefile
     binaries/certificates/Makefile
     binaries/plugins/Makefile
-    binaries/languages/Makefile
-    binaries/languages/configure/Makefile
     binaries/web/Makefile
     binaries/web/cgi-bin/Makefile
     binaries/web/cgi-src/Makefile

-----------------------------------------------------------------------

Summary of changes:
 myserver/configure.ac |    2 --
 1 files changed, 0 insertions(+), 2 deletions(-)


hooks/post-receive
-- 
GNU MyServer



From MAILER-DAEMON Fri Aug 28 02:18:36 2009
Received: from mailman by lists.gnu.org with archive (Exim 4.43)
	id 1MgunE-00054A-Jj
	for mharc-myserver-commit@gnu.org; Fri, 28 Aug 2009 02:18:36 -0400
Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43)
	id 1MglPK-0001Am-Pa
	for myserver-commit@gnu.org; Thu, 27 Aug 2009 16:17:18 -0400
Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43)
	id 1MglPK-00019L-1M
	for myserver-commit@gnu.org; Thu, 27 Aug 2009 16:17:18 -0400
Received: from [199.232.76.173] (port=38174 helo=monty-python.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43) id 1MglPJ-000193-R2
	for myserver-commit@gnu.org; Thu, 27 Aug 2009 16:17:17 -0400
Received: from savannah.gnu.org ([199.232.41.3]:48188 helo=sv.gnu.org)
	by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32)
	(Exim 4.60) (envelope-from <maarons@gnu.org>) id 1MglPJ-0002Cq-Kh
	for myserver-commit@gnu.org; Thu, 27 Aug 2009 16:17:17 -0400
Received: from download.savannah.gnu.org ([199.232.41.75]
	helo=cvs.savannah.gnu.org) by sv.gnu.org with esmtp (Exim 4.69)
	(envelope-from <maarons@gnu.org>) id 1MglPJ-0008Lq-4c
	for myserver-commit@gnu.org; Thu, 27 Aug 2009 20:17:17 +0000
Received: from maarons by cvs.savannah.gnu.org with local (Exim 4.69)
	(envelope-from <maarons@savannah.gnu.org>) id 1MglPI-0008LO-Nl
	for myserver-commit@gnu.org; Thu, 27 Aug 2009 20:17:17 +0000
To: myserver-commit@gnu.org
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: 8879eac521034fea0a594dc60be5903a1dd737d4
X-Git-Newrev: 2c8092b09071aa763391109b87d2c20f96b5aec6
Message-Id: <E1MglPI-0008LO-Nl@cvs.savannah.gnu.org>
From: Marek Aaron Sapota <maarons@gnu.org>
Date: Thu, 27 Aug 2009 20:17:16 +0000
X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2)
X-Mailman-Approved-At: Fri, 28 Aug 2009 02:18:34 -0400
Subject: [myserver-commit] [SCM] GNU MyServer branch, master,
	updated. 2c8092b09071aa763391109b87d2c20f96b5aec6
X-BeenThere: myserver-commit@gnu.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: myserver-commit.gnu.org
List-Unsubscribe: <http://lists.gnu.org/mailman/listinfo/myserver-commit>,
	<mailto:myserver-commit-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/pipermail/myserver-commit>
List-Post: <mailto:myserver-commit@gnu.org>
List-Help: <mailto:myserver-commit-request@gnu.org?subject=help>
List-Subscribe: <http://lists.gnu.org/mailman/listinfo/myserver-commit>,
	<mailto:myserver-commit-request@gnu.org?subject=subscribe>
X-List-Received-Date: Thu, 27 Aug 2009 20:17:19 -0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU MyServer".

The branch, master has been updated
       via  2c8092b09071aa763391109b87d2c20f96b5aec6 (commit)
      from  8879eac521034fea0a594dc60be5903a1dd737d4 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------


commit 2c8092b09071aa763391109b87d2c20f96b5aec6
Author: Marek Aaron Sapota <maarons@gnu.org>
Date:   Thu Aug 27 22:16:25 2009 +0200

    Fixed fcntl call.

diff --git a/myserver/src/myserver.cpp b/myserver/src/myserver.cpp
index 262b395..671e612 100644
--- a/myserver/src/myserver.cpp
+++ b/myserver/src/myserver.cpp
@@ -602,7 +602,7 @@ int writePidfile (const char* filename)
       file.append ("/var/run/myserver.pid");
     }
 
-  pidfile = open (filename, O_RDWR | O_CREAT);
+  pidfile = open (filename, O_RDWR | O_CREAT, S_IRUSR | S_IWUSR);
 
   if (pidfile == -1)
     return -1;

-----------------------------------------------------------------------

Summary of changes:
 myserver/src/myserver.cpp |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)


hooks/post-receive
-- 
GNU MyServer



From MAILER-DAEMON Sun Aug 30 06:20:43 2009
Received: from mailman by lists.gnu.org with archive (Exim 4.43)
	id 1MhhWc-0000AG-B2
	for mharc-myserver-commit@gnu.org; Sun, 30 Aug 2009 06:20:43 -0400
Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43)
	id 1MhhP8-0007Cf-HZ
	for myserver-commit@gnu.org; Sun, 30 Aug 2009 06:12:58 -0400
Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43)
	id 1MhhP7-0007CF-Hh
	for myserver-commit@gnu.org; Sun, 30 Aug 2009 06:12:57 -0400
Received: from [199.232.76.173] (port=58099 helo=monty-python.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43) id 1MhhP6-0007By-L8
	for myserver-commit@gnu.org; Sun, 30 Aug 2009 06:12:56 -0400
Received: from savannah.gnu.org ([199.232.41.3]:38823 helo=sv.gnu.org)
	by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32)
	(Exim 4.60) (envelope-from <maarons@gnu.org>) id 1MhhP6-0006d9-FL
	for myserver-commit@gnu.org; Sun, 30 Aug 2009 06:12:56 -0400
Received: from download.savannah.gnu.org ([199.232.41.75]
	helo=cvs.savannah.gnu.org) by sv.gnu.org with esmtp (Exim 4.69)
	(envelope-from <maarons@gnu.org>) id 1MhhP5-0003ck-TJ
	for myserver-commit@gnu.org; Sun, 30 Aug 2009 10:12:56 +0000
Received: from maarons by cvs.savannah.gnu.org with local (Exim 4.69)
	(envelope-from <maarons@savannah.gnu.org>) id 1MhhP5-0003cH-Gl
	for myserver-commit@gnu.org; Sun, 30 Aug 2009 10:12:55 +0000
To: myserver-commit@gnu.org
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: c11b70ca463f0b98103b0105c4afd63015d61274
X-Git-Newrev: 1826f042a7284e3eb05cc74d648ee452457a1306
Message-Id: <E1MhhP5-0003cH-Gl@cvs.savannah.gnu.org>
From: Marek Aaron Sapota <maarons@gnu.org>
Date: Sun, 30 Aug 2009 10:12:55 +0000
X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2)
X-Mailman-Approved-At: Sun, 30 Aug 2009 06:20:34 -0400
Subject: [myserver-commit] [SCM] GNU MyServer branch, master,
	updated. 1826f042a7284e3eb05cc74d648ee452457a1306
X-BeenThere: myserver-commit@gnu.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: myserver-commit.gnu.org
List-Unsubscribe: <http://lists.gnu.org/mailman/listinfo/myserver-commit>,
	<mailto:myserver-commit-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/pipermail/myserver-commit>
List-Post: <mailto:myserver-commit@gnu.org>
List-Help: <mailto:myserver-commit-request@gnu.org?subject=help>
List-Subscribe: <http://lists.gnu.org/mailman/listinfo/myserver-commit>,
	<mailto:myserver-commit-request@gnu.org?subject=subscribe>
X-List-Received-Date: Sun, 30 Aug 2009 10:12:58 -0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU MyServer".

The branch, master has been updated
       via  1826f042a7284e3eb05cc74d648ee452457a1306 (commit)
      from  c11b70ca463f0b98103b0105c4afd63015d61274 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------


commit 1826f042a7284e3eb05cc74d648ee452457a1306
Author: Marek Aaron Sapota <maarons@gnu.org>
Date:   Sun Aug 30 12:11:48 2009 +0200

    Updated GUI version string.

diff --git a/misc/PyGTK_Control/PyGTKControl.glade b/misc/PyGTK_Control/PyGTKControl.glade
index fb843a0..88af294 100644
--- a/misc/PyGTK_Control/PyGTKControl.glade
+++ b/misc/PyGTK_Control/PyGTKControl.glade
@@ -569,7 +569,7 @@
     <property name="type_hint">normal</property>
     <property name="has_separator">False</property>
     <property name="program_name">GNU MyServer Control</property>
-    <property name="version">v0.0</property>
+    <property name="version">v0.9</property>
     <property name="copyright" translatable="yes">Copyright (C) 2009 Free Software Foundation, Inc.
 This program is free software; you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by

-----------------------------------------------------------------------

Summary of changes:
 misc/PyGTK_Control/PyGTKControl.glade |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)


hooks/post-receive
-- 
GNU MyServer



From MAILER-DAEMON Sun Aug 30 06:20:52 2009
Received: from mailman by lists.gnu.org with archive (Exim 4.43)
	id 1MhhWm-0000Am-9w
	for mharc-myserver-commit@gnu.org; Sun, 30 Aug 2009 06:20:52 -0400
Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43)
	id 1MhhJB-0004tz-Ds
	for myserver-commit@gnu.org; Sun, 30 Aug 2009 06:06:49 -0400
Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43)
	id 1MhhJA-0004to-RO
	for myserver-commit@gnu.org; Sun, 30 Aug 2009 06:06:48 -0400
Received: from [199.232.76.173] (port=50462 helo=monty-python.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43) id 1MhhJA-0004th-6o
	for myserver-commit@gnu.org; Sun, 30 Aug 2009 06:06:48 -0400
Received: from savannah.gnu.org ([199.232.41.3]:60722 helo=sv.gnu.org)
	by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32)
	(Exim 4.60) (envelope-from <gscrivano@gnu.org>) id 1MhhIv-0005HS-Kr
	for myserver-commit@gnu.org; Sun, 30 Aug 2009 06:06:47 -0400
Received: from download.savannah.gnu.org ([199.232.41.75]
	helo=cvs.savannah.gnu.org) by sv.gnu.org with esmtp (Exim 4.69)
	(envelope-from <gscrivano@gnu.org>) id 1MhhIu-0003Lt-CX
	for myserver-commit@gnu.org; Sun, 30 Aug 2009 10:06:33 +0000
Received: from gscrivano by cvs.savannah.gnu.org with local (Exim 4.69)
	(envelope-from <gscrivano@savannah.gnu.org>) id 1MhhIl-0003E9-Ip
	for myserver-commit@gnu.org; Sun, 30 Aug 2009 10:06:32 +0000
To: myserver-commit@gnu.org
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: 2c8092b09071aa763391109b87d2c20f96b5aec6
X-Git-Newrev: c11b70ca463f0b98103b0105c4afd63015d61274
Message-Id: <E1MhhIl-0003E9-Ip@cvs.savannah.gnu.org>
From: Giuseppe Scrivano <gscrivano@gnu.org>
Date: Sun, 30 Aug 2009 10:06:24 +0000
X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2)
X-Mailman-Approved-At: Sun, 30 Aug 2009 06:20:37 -0400
Subject: [myserver-commit] [SCM] GNU MyServer branch, master,
	updated. c11b70ca463f0b98103b0105c4afd63015d61274
X-BeenThere: myserver-commit@gnu.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: myserver-commit.gnu.org
List-Unsubscribe: <http://lists.gnu.org/mailman/listinfo/myserver-commit>,
	<mailto:myserver-commit-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/pipermail/myserver-commit>
List-Post: <mailto:myserver-commit@gnu.org>
List-Help: <mailto:myserver-commit-request@gnu.org?subject=help>
List-Subscribe: <http://lists.gnu.org/mailman/listinfo/myserver-commit>,
	<mailto:myserver-commit-request@gnu.org?subject=subscribe>
X-List-Received-Date: Sun, 30 Aug 2009 10:06:50 -0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU MyServer".

The branch, master has been updated
       via  c11b70ca463f0b98103b0105c4afd63015d61274 (commit)
       via  7169446b9dc646bc84c9136f9ae68aac83aea0da (commit)
       via  9775d91628a8b8e60249ed5264c0e070aeada169 (commit)
       via  a320fda42e9707b7b5d4d87c5d81f63c36c778ee (commit)
       via  bc75f6f12f214b9d528ff6011d59b20b84dbdbc4 (commit)
       via  ebe91b6cdd15d5f51c086aebb1dae4a2817b8ec9 (commit)
       via  1fe17cec41609d5dcc35e494f6b9e9d6cc190161 (commit)
       via  4d884698e00d9fdd70b6d09bd52c6662ccc78153 (commit)
       via  1e783e320be4a0858adc2ae11b354a2736338586 (commit)
       via  d93d10e52bffcc144bab2a80b57c5c4333912d50 (commit)
       via  1020bab81ba10ebfd055d26e47276874826b4486 (commit)
       via  b4f58841cb0d02634db8f3b85dc86583e6ff44e4 (commit)
       via  a809ac0d448bf74cc4e454fed0d17ce7707c41fb (commit)
       via  4d8bcd32cc36b1ffc31120e0208b96081b52795f (commit)
       via  f4ef782aa3024edf332fd0ec8f25dcfc4a5c127f (commit)
       via  6f59a090d44198c0190a6106641bbff7c7cde845 (commit)
       via  fc81d1bb032e279a2e7436fe95780728f26ee738 (commit)
       via  6b4599d38b577a26c64e31e7630c63c066f6f9f8 (commit)
       via  f3636a24d3828ae7c721380b68acb37ff44d758b (commit)
       via  26f614483d0877a0968819ec45a0e68505ea3a85 (commit)
       via  e096fc5a40603a7c8ce97bb996430fcc06e80534 (commit)
       via  26eb5c3ecba6ede2197b9fe75b6992d467c5d4b9 (commit)
       via  ce56783eff4746a0bd3aee5f3e00d3aa56390652 (commit)
       via  89cb5ac1df6b9b6fc4a13db57a7c1c21554aae6e (commit)
       via  7d0405ec49eb938d208dc72730387ce6afb9e7ba (commit)
       via  07c79e454295c046b8e788ea711e4270040a2a7f (commit)
       via  498effc0fb50a9d74f390b2e138d329f41e70767 (commit)
       via  8f8e920949fafb1b328f69a8630f963ab04a4dca (commit)
       via  78d989514db5fe89b11560a684f57d767dbac17c (commit)
       via  ed000bb9ed508947f31e6f3ad16904430bcfe274 (commit)
       via  cfbe88ed7f1ff39ab79894a272e5164ea2f1a3f6 (commit)
       via  9f48d3563c8cb5fa994177aef1e66358f73e95b8 (commit)
       via  1f9cb30b943f1d1aa820398b4b46c0478c20863c (commit)
       via  e7ad47b23cb6a3c74ac0ae0e5cdc609598ded717 (commit)
       via  9c64c9d44ce1b960917d4bd307935db995ea14d0 (commit)
       via  91f91d95e12396a71f64c29af06172741bd6aa72 (commit)
       via  c91a8e42dbbdd0bd4ab595f9e3b94c0829d0a93c (commit)
       via  65b8080af3f230a44eaea44557de323ff52a1a77 (commit)
       via  7d48adfa5075a1ca7b36ce866fb06fbff6a60152 (commit)
       via  36415041ce2c79cde231ad3008563427ad32f8b1 (commit)
       via  2796f1923fdc16bf6be4da8d4dcc7539104bf7d9 (commit)
       via  36ebea61cf9228a29bffb1c444ab82421babcd35 (commit)
       via  4aa358f6f612d9f9edb05422bb069e0580bd030a (commit)
       via  a02ec8f3d2954ec1b4bac304447a07ff15c4497d (commit)
       via  4171c905b2321945b3ecf71ae65542a7db3c6a2c (commit)
       via  716ad749f0f326562db1a80e08e3cc8b6faf2e21 (commit)
       via  f59a03ce25be48ee894e1db2947bdfd03ac93d71 (commit)
       via  80d6cb01d33e598f0ec1fa7f45cd195794a5c112 (commit)
       via  8f2065d32f68cbb7d6b5584739fadba1e23aefee (commit)
       via  fd58fa5679660d48b52cf4ee0d31e963dabc1b40 (commit)
       via  1cc305c0cd2977b99bcd6dcbad4c97f9b51bb7d9 (commit)
       via  f9d4639ef55171aadf5fecfd236c5905b6e4c007 (commit)
       via  7c1da124afaac94910e59244fa1b01f0504a7e5c (commit)
       via  3ff6dcf1f152b1961df5f9f4da1c4213428b194a (commit)
       via  5de9a2c8d6f8121831dc8752a14fcc932bcb43e5 (commit)
       via  e88e3a334dfb8c841dfbd9f7cb21511fac6c18f5 (commit)
       via  d083c2b87c819b698923635febfcd83e841fe402 (commit)
       via  f9ecb02a7fe208e42c7b26cecd809dffd15e60ac (commit)
       via  5eb9ceee5cb46677d0ed82d0b99ca40deec9fa27 (commit)
       via  4db2041c0917463789b51cd594ee24d6ced2ad35 (commit)
       via  8511f7bf10f2a7181186d4b8a63cd9c826378e85 (commit)
       via  9b1a0c54d95307660a0feafb0d2354a0d2c51f4a (commit)
       via  abdcc4fc662dd4923cf11733e6401bf142b348b4 (commit)
       via  b816fd85420cd9f5ba87c0a5508f3c2b9c22edbd (commit)
       via  816ba0b0fd7a695ba9d91ded059b771aa3868d48 (commit)
       via  814c6f4aa71fcfc27ffa488e42999d90b8940cde (commit)
       via  15879dec8ca6c87ac9d8e60b4b8ccb87b2fd53d4 (commit)
       via  44d0809025b967fbed0b62113b02b069921ed4d5 (commit)
       via  dc0f5b23bd5df3d4fbd81bc797042053c97eeb25 (commit)
       via  185d91663d56e922f1c789bb8929cb6021bbe264 (commit)
       via  33d2bdd4bb69fb4584643a2af593089461b7993a (commit)
       via  b5bafeea7a86257a1cce9938b0279c9334f8128d (commit)
       via  c155a354bc98d44543eb748b8e9d16d44540b99d (commit)
       via  e95ef51c3bcc931fd157807e050e4376b6fa2660 (commit)
       via  c3d7e72c5d7a043b32571d78b9dd368f9680722d (commit)
       via  290fa08dae6d19ce02df7a7a13823d5ff319b615 (commit)
       via  0162ed2c63fa02058fdcda88c6b15b124b6744a3 (commit)
       via  fec75c5b9759f29b5a467ee8b32655f864bc82bf (commit)
       via  121d46c683a2a0abf3b6d51a50082aeaf6f1f006 (commit)
       via  179a48e1d95df03a971357c1382463afe26c3960 (commit)
       via  a12bca3717a6645005f19289d03431ed5d2c9cf0 (commit)
       via  d0d888d3379c57f14ee36216d6ba5c4c9a74c075 (commit)
       via  fabadfef11cb000eb1c9d42a21348fb89de40e24 (commit)
       via  a11d241ee8b86aa95f309bcd97f3b17450f9028c (commit)
       via  1d19d2a6c91aafc7c351524f55138ebe760bc30c (commit)
       via  790c62ddd0e69e123cf9e9096e1e3da239c2ad51 (commit)
       via  c993a0924b9857894396d3c5a08340bba10f7725 (commit)
       via  be87aa94c3a48fe25109f269ecc8dfaf82b68397 (commit)
       via  d79ec32935886b1b4864ae217975e81e12268d01 (commit)
       via  d603a00a9f1529278b7cd92754fd06bb8603c98f (commit)
       via  c7bfa02a092d4d79e413a550772cbb5eea4c891a (commit)
       via  fbb478a19413cc0db6222da7bd5f19c75916785b (commit)
       via  e89932b722ca91317d7bbb63bae5c2204132b4c8 (commit)
       via  7ed7acae01c06591c9db43849ced487053beca7e (commit)
       via  c93d32970d1d2947f73853ff21cc42e5921dcc96 (commit)
       via  1a50bf043a18938786ce237a88284b252092ad4d (commit)
       via  420a86f9dd7181b5f8f42a8007cb9ff508721b11 (commit)
       via  e992b4a3e844e463df1189038aa579e337875fe7 (commit)
       via  da3b029e8c7d55ac4c38436303071bb53b04c0f7 (commit)
       via  c723954a698f9c8384a91453727e32fc6c81009f (commit)
       via  c592b21b60297ea739ed2a760bb6933f4671aeec (commit)
       via  c3c98305bd84fd381b95f165e9a647542a966ae2 (commit)
       via  7794e0a8c9ea18c4792754f8890c8f8e4654c341 (commit)
       via  e2f770d7d8fde08d627b40151656928fecdc2c39 (commit)
       via  0010615eede49df77e800edc331c35603434bf26 (commit)
       via  12e27e127621f4b010d27bfdcc15f5bbb307f125 (commit)
       via  a4b940249c6c161fc18274ddef85ef34785f0a6e (commit)
       via  212e40c400279374b006dc3f321e71ab4e41cc13 (commit)
       via  04266076faf692115a2dbf46a8426530216b5f46 (commit)
       via  46ad12574dae76f375e1fb29b1770176eb2036a4 (commit)
       via  d3324c64a1aeac6cd067bc19437b7d7735dd44d2 (commit)
       via  cbfd8d9703f7930d71aa05b01e5415187164cad8 (commit)
       via  0831902383662bdb633b4a3dbb53559dc9428dfc (commit)
       via  22a84c341826c11dbb6a89c6dbb113fbd855c264 (commit)
       via  d77a6a2d6d3e12e0f4bc2cb107de0071dd06daf6 (commit)
       via  ed8d39eb36f7fe6a8800db2f7ddb26a389b5b693 (commit)
       via  d12a997bfa7d627901ee9de2cf9095d9cd61f6d4 (commit)
       via  9800f5ab48f188c8059d31655aa07d93af1c205b (commit)
       via  f8cb67b5f730bb0e7e4dde7e32ef62a4766ee25e (commit)
       via  104c01ca3fa9b00bb9c1c7904025e55475c32789 (commit)
       via  f07fbf3093aa9ac5617313795b7d4aae68ac73ce (commit)
       via  4f880beec5e188d1386d04ab974f954ba50fd862 (commit)
       via  5a1090eeb67304fea24bdf4d11edcec371e595b1 (commit)
       via  daf0d6ba253e47b2dd150519c1eb561672d38c0f (commit)
       via  5849c91c06ae47de0dac22178291e2e4e4eb4f2f (commit)
       via  7e19a0eb34f000df5d91c9ced6a955bca3a0f0df (commit)
       via  b8939650ccef039a9e38e4003a3ceadd9ee7ffb6 (commit)
       via  2376d719fa8b2ae79adb58f8f36ba2791f010ff1 (commit)
       via  d428818d42962674193ea30b2992419d1e9aef3a (commit)
       via  16aa7785a4d22f4b317e46408a3fff213f5ebe70 (commit)
       via  61ac4a10693bea6f209bfda238d0a4787bbc6f0a (commit)
       via  afe67f2f23bd7750d32095e70e14bb8708068af0 (commit)
       via  2cfed9a1f282424766351086df9ee5c6cdb9ff35 (commit)
       via  c66b92cc63c15a55abae354e818bcab4086f2d61 (commit)
       via  101f031c7d413535def126b9f59a8f918e8d8468 (commit)
       via  8cb4b723a21d59214f73b9b5b82efbb7efae711d (commit)
       via  2e4765307dd1a8ac4f63d89af67a9544bc45a8dc (commit)
       via  fbdd0f4735ccddda0530adc0ab706ff1d8e8b12e (commit)
       via  5064583a62c20962fd089ff747b8d0d9538a574b (commit)
       via  c32449cf08ef4588c38a8fbd679db03c0c76be4c (commit)
       via  4a5ec3753456e100c888234c97712fcd4f039237 (commit)
       via  58e336c9d612a1db3073b80d079652eae6dd1cbc (commit)
       via  fae84295c23e72dca20766fba304f030f882365f (commit)
       via  6ad378bcc4489348696a846ae8f17b5c8f8455eb (commit)
       via  6c4d700d2fc3a4e9174ebae276cd9e3bb5a4da2f (commit)
       via  2e82879117b0d54b6c9a61519a3511e6e4be4136 (commit)
       via  055e94570934d1e39f40552d0af4c762f57dbdeb (commit)
       via  2123234285a7d3c72911f42f5b270e4a91bc149e (commit)
      from  2c8092b09071aa763391109b87d2c20f96b5aec6 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------


commit c11b70ca463f0b98103b0105c4afd63015d61274
Merge: 2c8092b 7169446
Author: Giuseppe Scrivano <gscrivano@gnu.org>
Date:   Sun Aug 30 12:00:42 2009 +0200

    Merge branch 'master' of http://students.mimuw.edu.pl/~ms262969/GNU/MyServer/myserver




commit 7169446b9dc646bc84c9136f9ae68aac83aea0da
Author: Marek Aaron Sapota <maarons@gnu.org>
Date:   Wed Aug 26 22:33:09 2009 +0200

    Added drag and drop in security files editor.
    
    GTK+ 2.16.5 sometimes segfaults while doing drag and drop. It's probably
    unrelated to this code though.

diff --git a/misc/py_control_client/MyServer/GUI/SecurityWidgets.py b/misc/py_control_client/MyServer/GUI/SecurityWidgets.py
index 23c3be4..9957fbe 100644
--- a/misc/py_control_client/MyServer/GUI/SecurityWidgets.py
+++ b/misc/py_control_client/MyServer/GUI/SecurityWidgets.py
@@ -19,7 +19,7 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 import gtk
 import gobject
 from MyServer.pycontrollib.security import SecurityList, User, Return, \
-    Condition, Permission
+    Condition, Permission, SecurityElement
 from MyServer.pycontrollib.definition import DefinitionElement, DefinitionTree
 
 class SecurityTree(gtk.TreeView):
@@ -37,6 +37,48 @@ class SecurityTree(gtk.TreeView):
 
         self.last_selected = None
         self.connect('cursor-changed', self.cursor_changed)
+        
+        self.enable_model_drag_source(gtk.gdk.BUTTON1_MASK,
+                                      [('text/plain', 0, 0)],
+                                      gtk.gdk.ACTION_MOVE)
+        self.enable_model_drag_dest([('text/plain', gtk.TARGET_SAME_WIDGET, 0)],
+                                    gtk.gdk.ACTION_MOVE)
+        def get_data(tree, context, selection, target_id, etime):
+            model, selected = tree.get_selection().get_selected()
+            data = model.get_value(selected, 1)
+            selection.set(selection.target, 8, str(data))
+        self.connect('drag_data_get', get_data)
+        def data_received(tree, context, x, y, selection, info, etime):
+            model = tree.get_model()
+            try:
+                data = SecurityElement.from_string(selection.data)
+            except:
+                return # will fall if someone moves SECURITY
+            drop_info = tree.get_dest_row_at_pos(x, y)
+            if drop_info:
+                path, position = drop_info
+                it = model.get_iter(path)
+                if position in [gtk.TREE_VIEW_DROP_BEFORE,
+                                gtk.TREE_VIEW_DROP_AFTER]:
+                    parent_tag = model.get_value(model.iter_parent(it), 0)
+                else:
+                    parent_tag = model.get_value(it, 0)
+                # limit places where rows can be dropped
+                if not ((data.tag == 'DEFINE element' and
+                         parent_tag == 'DEFINE tree') or
+                        parent_tag in ['SECURITY', 'CONDITION']):
+                    return
+                if position == gtk.TREE_VIEW_DROP_BEFORE:
+                    model.insert_before(None, it, (data.tag, data, ))
+                elif position == gtk.TREE_VIEW_DROP_AFTER:
+                    model.insert_after(None, it, (data.tag, data, ))
+                else:
+                    model.append(it, (data.tag, data, ))
+            else:
+                return # drop on widget but not on any row
+            if context.action == gtk.gdk.ACTION_MOVE:
+                context.finish(True, True, etime)
+        self.connect('drag_data_received', data_received)
 
         self.scroll = gtk.ScrolledWindow()
         self.scroll.set_policy(gtk.POLICY_AUTOMATIC, gtk.POLICY_AUTOMATIC)



commit 9775d91628a8b8e60249ed5264c0e070aeada169
Merge: a320fda 8879eac
Author: Marek Aaron Sapota <maarons@gnu.org>
Date:   Mon Aug 24 01:46:10 2009 +0200

    Merge branch 'master' of git://git.savannah.gnu.org/myserver




commit a320fda42e9707b7b5d4d87c5d81f63c36c778ee
Author: Marek Aaron Sapota <maarons@gnu.org>
Date:   Sun Aug 23 20:47:11 2009 +0200

    Don't throw unhandled exceptions when security.xml can't be read.

diff --git a/misc/py_control_client/MyServer/GUI/SecurityWidgets.py b/misc/py_control_client/MyServer/GUI/SecurityWidgets.py
index 451a4bd..23c3be4 100644
--- a/misc/py_control_client/MyServer/GUI/SecurityWidgets.py
+++ b/misc/py_control_client/MyServer/GUI/SecurityWidgets.py
@@ -651,7 +651,7 @@ class SecurityTable(gtk.Table):
             security = SecurityList.from_string(
                 browser.get_file('security.xml'))
             self.security_tree.set_up(security)
-        except IOError:
+        except:
             self.security_tree.clear()
 
     def write_to_file(self, browser):



commit bc75f6f12f214b9d528ff6011d59b20b84dbdbc4
Author: Marek Aaron Sapota <maarons@gnu.org>
Date:   Sat Aug 22 23:44:16 2009 +0200

    Security file elements can be removed from GUI.

diff --git a/misc/py_control_client/MyServer/GUI/SecurityWidgets.py b/misc/py_control_client/MyServer/GUI/SecurityWidgets.py
index b5f6649..451a4bd 100644
--- a/misc/py_control_client/MyServer/GUI/SecurityWidgets.py
+++ b/misc/py_control_client/MyServer/GUI/SecurityWidgets.py
@@ -288,6 +288,12 @@ class SecurityTree(gtk.TreeView):
             add = DefinitionTree()
         model.append(selected, (tag, add, ))
 
+    def remove_element(self):
+        model, selected = self.get_selection().get_selected()
+        model.remove(selected)
+        self.last_selected = None
+        self.security_table.switch_table('SECURITY')
+
     def export(self):
         def add_definition_tree(parent, i, model):
             while len(parent.get_definitions()): # remove all children
@@ -332,87 +338,99 @@ class SecurityTree(gtk.TreeView):
         return security
 
 class UserTable(gtk.Table):
-    def __init__(self):
-        gtk.Table.__init__(self, 7, 3)
+    def __init__(self, security_tree):
+        gtk.Table.__init__(self, 8, 3)
+
+        def remove_element(button, tree):
+            tree.remove_element()
+        button = gtk.Button('Remove this element')
+        button.connect('clicked', remove_element, security_tree)
+        self.attach(button, 0, 2, 0, 1, yoptions = gtk.FILL)
 
-        self.attach(gtk.Label('name'), 0, 1, 0, 1, gtk.FILL, gtk.FILL)
+        self.attach(gtk.Label('name'), 0, 1, 1, 2, gtk.FILL, gtk.FILL)
         self.name_entry = gtk.Entry()
-        self.attach(self.name_entry, 1, 2, 0, 1, yoptions = gtk.FILL)
+        self.attach(self.name_entry, 1, 2, 1, 2, yoptions = gtk.FILL)
         self.name_check = gtk.CheckButton()
-        self.attach(self.name_check, 2, 3, 0, 1, gtk.FILL, gtk.FILL)
+        self.attach(self.name_check, 2, 3, 1, 2, gtk.FILL, gtk.FILL)
 
-        self.attach(gtk.Label('password'), 0, 1, 1, 2, gtk.FILL, gtk.FILL)
+        self.attach(gtk.Label('password'), 0, 1, 2, 3, gtk.FILL, gtk.FILL)
         self.password_entry = gtk.Entry()
-        self.attach(self.password_entry, 1, 2, 1, 2, yoptions = gtk.FILL)
+        self.attach(self.password_entry, 1, 2, 2, 3, yoptions = gtk.FILL)
         self.password_check = gtk.CheckButton()
-        self.attach(self.password_check, 2, 3, 1, 2, gtk.FILL, gtk.FILL)
+        self.attach(self.password_check, 2, 3, 2, 3, gtk.FILL, gtk.FILL)
 
         def add_options(combo):
             combo.append_text('Yes')
             combo.append_text('No')
             combo.append_text('empty')
 
-        self.attach(gtk.Label('READ'), 0, 1, 2, 3, gtk.FILL, gtk.FILL)
+        self.attach(gtk.Label('READ'), 0, 1, 3, 4, gtk.FILL, gtk.FILL)
         self.read_combo = gtk.combo_box_new_text()
         add_options(self.read_combo)
-        self.attach(self.read_combo, 1, 2, 2, 3, yoptions = gtk.FILL)
+        self.attach(self.read_combo, 1, 2, 3, 4, yoptions = gtk.FILL)
 
-        self.attach(gtk.Label('EXECUTE'), 0, 1, 3, 4, gtk.FILL, gtk.FILL)
+        self.attach(gtk.Label('EXECUTE'), 0, 1, 4, 5, gtk.FILL, gtk.FILL)
         self.execute_combo = gtk.combo_box_new_text()
         add_options(self.execute_combo)
-        self.attach(self.execute_combo, 1, 2, 3, 4, yoptions = gtk.FILL)
+        self.attach(self.execute_combo, 1, 2, 4, 5, yoptions = gtk.FILL)
 
-        self.attach(gtk.Label('BROWSE'), 0, 1, 4, 5, gtk.FILL, gtk.FILL)
+        self.attach(gtk.Label('BROWSE'), 0, 1, 5, 6, gtk.FILL, gtk.FILL)
         self.browse_combo = gtk.combo_box_new_text()
         add_options(self.browse_combo)
-        self.attach(self.browse_combo, 1, 2, 4, 5, yoptions = gtk.FILL)
+        self.attach(self.browse_combo, 1, 2, 5, 6, yoptions = gtk.FILL)
 
-        self.attach(gtk.Label('DELETE'), 0, 1, 5, 6, gtk.FILL, gtk.FILL)
+        self.attach(gtk.Label('DELETE'), 0, 1, 6, 7, gtk.FILL, gtk.FILL)
         self.delete_combo = gtk.combo_box_new_text()
         add_options(self.delete_combo)
-        self.attach(self.delete_combo, 1, 2, 5, 6, yoptions = gtk.FILL)
+        self.attach(self.delete_combo, 1, 2, 6, 7, yoptions = gtk.FILL)
 
-        self.attach(gtk.Label('WRITE'), 0, 1, 6, 7, gtk.FILL, gtk.FILL)
+        self.attach(gtk.Label('WRITE'), 0, 1, 7, 8, gtk.FILL, gtk.FILL)
         self.write_combo = gtk.combo_box_new_text()
         add_options(self.write_combo)
-        self.attach(self.write_combo, 1, 2, 6, 7, yoptions = gtk.FILL)
+        self.attach(self.write_combo, 1, 2, 7, 8, yoptions = gtk.FILL)
 
 class ConditionTable(gtk.Table):
     def __init__(self, security_tree):
-        gtk.Table.__init__(self, 5, 3)
+        gtk.Table.__init__(self, 6, 3)
+
+        def remove_element(button, tree):
+            tree.remove_element()
+        button = gtk.Button('Remove this element')
+        button.connect('clicked', remove_element, security_tree)
+        self.attach(button, 0, 2, 0, 1, yoptions = gtk.FILL)
 
-        self.attach(gtk.Label('name'), 0, 1, 0, 1, gtk.FILL, gtk.FILL)
+        self.attach(gtk.Label('name'), 0, 1, 1, 2, gtk.FILL, gtk.FILL)
         self.name_entry = gtk.Entry()
-        self.attach(self.name_entry, 1, 2, 0, 1, yoptions = gtk.FILL)
+        self.attach(self.name_entry, 1, 2, 1, 2, yoptions = gtk.FILL)
         self.name_check = gtk.CheckButton()
-        self.attach(self.name_check, 2, 3, 0, 1, gtk.FILL, gtk.FILL)
+        self.attach(self.name_check, 2, 3, 1, 2, gtk.FILL, gtk.FILL)
 
-        self.attach(gtk.Label('value'), 0, 1, 1, 2, gtk.FILL, gtk.FILL)
+        self.attach(gtk.Label('value'), 0, 1, 2, 3, gtk.FILL, gtk.FILL)
         self.value_entry = gtk.Entry()
-        self.attach(self.value_entry, 1, 2, 1, 2, yoptions = gtk.FILL)
+        self.attach(self.value_entry, 1, 2, 2, 3, yoptions = gtk.FILL)
         self.value_check = gtk.CheckButton()
-        self.attach(self.value_check, 2, 3, 1, 2, gtk.FILL, gtk.FILL)
+        self.attach(self.value_check, 2, 3, 2, 3, gtk.FILL, gtk.FILL)
 
         def add_options(combo):
             combo.append_text('Yes')
             combo.append_text('No')
             combo.append_text('empty')
 
-        self.attach(gtk.Label('regex'), 0, 1, 2, 3, gtk.FILL, gtk.FILL)
+        self.attach(gtk.Label('regex'), 0, 1, 3, 4, gtk.FILL, gtk.FILL)
         self.regex_combo = gtk.combo_box_new_text()
         add_options(self.regex_combo)
-        self.attach(self.regex_combo, 1, 2, 2, 3, yoptions = gtk.FILL)
+        self.attach(self.regex_combo, 1, 2, 3, 4, yoptions = gtk.FILL)
 
-        self.attach(gtk.Label('reverse'), 0, 1, 3, 4, gtk.FILL, gtk.FILL)
+        self.attach(gtk.Label('reverse'), 0, 1, 4, 5, gtk.FILL, gtk.FILL)
         self.reverse_combo = gtk.combo_box_new_text()
         add_options(self.reverse_combo)
-        self.attach(self.reverse_combo, 1, 2, 3, 4, yoptions = gtk.FILL)
+        self.attach(self.reverse_combo, 1, 2, 4, 5, yoptions = gtk.FILL)
 
         def add_sub_element(button, combo, tree):
             tag = combo.get_model()[combo.get_active()][0]
             tree.add_sub_element(tag)
         self.add_sub_element_button = gtk.Button('Add sub-element')
-        self.attach(self.add_sub_element_button, 0, 1, 4, 5, gtk.FILL, gtk.FILL)
+        self.attach(self.add_sub_element_button, 0, 1, 5, 6, gtk.FILL, gtk.FILL)
         self.add_sub_element_combo = gtk.combo_box_new_text()
         self.add_sub_element_combo.append_text('USER')
         self.add_sub_element_combo.append_text('CONDITION')
@@ -421,86 +439,104 @@ class ConditionTable(gtk.Table):
         self.add_sub_element_combo.append_text('DEFINE element')
         self.add_sub_element_combo.append_text('DEFINE tree')
         self.add_sub_element_combo.set_active(0)
-        self.attach(self.add_sub_element_combo, 1, 2, 4, 5, gtk.FILL, gtk.FILL)
+        self.attach(self.add_sub_element_combo, 1, 2, 5, 6, gtk.FILL, gtk.FILL)
         self.add_sub_element_button.connect('clicked', add_sub_element,
                                             self.add_sub_element_combo,
                                             security_tree)
 
 class PermissionTable(gtk.Table):
-    def __init__(self):
-        gtk.Table.__init__(self, 5, 2)
+    def __init__(self, security_tree):
+        gtk.Table.__init__(self, 6, 2)
+
+        def remove_element(button, tree):
+            tree.remove_element()
+        button = gtk.Button('Remove this element')
+        button.connect('clicked', remove_element, security_tree)
+        self.attach(button, 0, 2, 0, 1, yoptions = gtk.FILL)
 
         def add_options(combo):
             combo.append_text('Yes')
             combo.append_text('No')
             combo.append_text('empty')
 
-        self.attach(gtk.Label('READ'), 0, 1, 0, 1, gtk.FILL, gtk.FILL)
+        self.attach(gtk.Label('READ'), 0, 1, 1, 2, gtk.FILL, gtk.FILL)
         self.read_combo = gtk.combo_box_new_text()
         add_options(self.read_combo)
-        self.attach(self.read_combo, 1, 2, 0, 1, yoptions = gtk.FILL)
+        self.attach(self.read_combo, 1, 2, 1, 2, yoptions = gtk.FILL)
 
-        self.attach(gtk.Label('EXECUTE'), 0, 1, 1, 2, gtk.FILL, gtk.FILL)
+        self.attach(gtk.Label('EXECUTE'), 0, 1, 2, 3, gtk.FILL, gtk.FILL)
         self.execute_combo = gtk.combo_box_new_text()
         add_options(self.execute_combo)
-        self.attach(self.execute_combo, 1, 2, 1, 2, yoptions = gtk.FILL)
+        self.attach(self.execute_combo, 1, 2, 2, 3, yoptions = gtk.FILL)
 
-        self.attach(gtk.Label('BROWSE'), 0, 1, 2, 3, gtk.FILL, gtk.FILL)
+        self.attach(gtk.Label('BROWSE'), 0, 1, 3, 4, gtk.FILL, gtk.FILL)
         self.browse_combo = gtk.combo_box_new_text()
         add_options(self.browse_combo)
-        self.attach(self.browse_combo, 1, 2, 2, 3, yoptions = gtk.FILL)
+        self.attach(self.browse_combo, 1, 2, 3, 4, yoptions = gtk.FILL)
 
-        self.attach(gtk.Label('DELETE'), 0, 1, 3, 4, gtk.FILL, gtk.FILL)
+        self.attach(gtk.Label('DELETE'), 0, 1, 4, 5, gtk.FILL, gtk.FILL)
         self.delete_combo = gtk.combo_box_new_text()
         add_options(self.delete_combo)
-        self.attach(self.delete_combo, 1, 2, 3, 4, yoptions = gtk.FILL)
+        self.attach(self.delete_combo, 1, 2, 4, 5, yoptions = gtk.FILL)
 
-        self.attach(gtk.Label('WRITE'), 0, 1, 4, 5, gtk.FILL, gtk.FILL)
+        self.attach(gtk.Label('WRITE'), 0, 1, 5, 6, gtk.FILL, gtk.FILL)
         self.write_combo = gtk.combo_box_new_text()
         add_options(self.write_combo)
-        self.attach(self.write_combo, 1, 2, 4, 5, yoptions = gtk.FILL)
+        self.attach(self.write_combo, 1, 2, 5, 6, yoptions = gtk.FILL)
 
 class ReturnTable(gtk.Table):
-    def __init__(self):
-        gtk.Table.__init__(self, 1, 2)
+    def __init__(self, security_tree):
+        gtk.Table.__init__(self, 2, 2)
+
+        def remove_element(button, tree):
+            tree.remove_element()
+        button = gtk.Button('Remove this element')
+        button.connect('clicked', remove_element, security_tree)
+        self.attach(button, 0, 2, 0, 1, yoptions = gtk.FILL)
 
-        self.attach(gtk.Label('value'), 0, 1, 0, 1, gtk.FILL, gtk.FILL)
+        self.attach(gtk.Label('value'), 0, 1, 1, 2, gtk.FILL, gtk.FILL)
         self.value_combo = gtk.combo_box_new_text()
         self.value_combo.append_text('ALLOW')
         self.value_combo.append_text('DENY')
         self.value_combo.append_text('empty')
-        self.attach(self.value_combo, 1, 2, 0, 1, yoptions = gtk.FILL)
+        self.attach(self.value_combo, 1, 2, 1, 2, yoptions = gtk.FILL)
 
 class DefinitionTable(gtk.Table):
     def __init__(self, security_tree):
-        gtk.Table.__init__(self, 6, 3)
+        gtk.Table.__init__(self, 7, 3)
+
+        def remove_element(button, tree):
+            tree.remove_element()
+        button = gtk.Button('Remove this element')
+        button.connect('clicked', remove_element, security_tree)
+        self.attach(button, 0, 2, 0, 1, yoptions = gtk.FILL)
 
         def add_sub_element(button, combo, tree):
             tag = combo.get_model()[combo.get_active()][0]
             tree.add_sub_element(tag)
         self.add_sub_element_button = gtk.Button('Add sub-element')
-        self.attach(self.add_sub_element_button, 0, 1, 0, 1, gtk.FILL, gtk.FILL)
+        self.attach(self.add_sub_element_button, 0, 1, 1, 2, gtk.FILL, gtk.FILL)
         self.add_sub_element_combo = gtk.combo_box_new_text()
         self.add_sub_element_combo.append_text('DEFINE element')
         self.add_sub_element_combo.append_text('DEFINE tree')
         self.add_sub_element_combo.set_active(0)
-        self.attach(self.add_sub_element_combo, 1, 2, 0, 1, gtk.FILL, gtk.FILL)
+        self.attach(self.add_sub_element_combo, 1, 2, 1, 2, gtk.FILL, gtk.FILL)
         self.add_sub_element_button.connect('clicked', add_sub_element,
                                             self.add_sub_element_combo,
                                             security_tree)
 
-        self.attach(gtk.Label('name'), 0, 1, 1, 2, gtk.FILL, gtk.FILL)
+        self.attach(gtk.Label('name'), 0, 1, 2, 3, gtk.FILL, gtk.FILL)
         self.name_entry = gtk.Entry()
-        self.attach(self.name_entry, 1, 2, 1, 2, yoptions = gtk.FILL)
+        self.attach(self.name_entry, 1, 2, 2, 3, yoptions = gtk.FILL)
         self.name_check = gtk.CheckButton()
-        self.attach(self.name_check, 2, 3, 1, 2, gtk.FILL, gtk.FILL)
+        self.attach(self.name_check, 2, 3, 2, 3, gtk.FILL, gtk.FILL)
 
         self.value_label = gtk.Label('value')
-        self.attach(self.value_label, 0, 1, 2, 3, gtk.FILL, gtk.FILL)
+        self.attach(self.value_label, 0, 1, 3, 4, gtk.FILL, gtk.FILL)
         self.value_entry = gtk.Entry()
-        self.attach(self.value_entry, 1, 2, 2, 3, yoptions = gtk.FILL)
+        self.attach(self.value_entry, 1, 2, 3, 4, yoptions = gtk.FILL)
         self.value_check = gtk.CheckButton()
-        self.attach(self.value_check, 2, 3, 2, 3, gtk.FILL, gtk.FILL)
+        self.attach(self.value_check, 2, 3, 3, 4, gtk.FILL, gtk.FILL)
 
         self.attribute_tree = gtk.TreeView(gtk.ListStore(
                 gobject.TYPE_STRING, # variable
@@ -528,13 +564,13 @@ class DefinitionTable(gtk.Table):
         scroll.set_shadow_type(gtk.SHADOW_OUT)
         scroll.set_border_width(5)
         scroll.add(self.attribute_tree)
-        self.attach(scroll, 0, 2, 5, 6)
+        self.attach(scroll, 0, 2, 6, 7)
 
         def add_attribute(button, model):
             model.append(('', '', ))
         add_button = gtk.Button('add')
         add_button.connect('clicked', add_attribute, model)
-        self.attach(add_button, 0, 2, 3, 4, gtk.FILL, gtk.FILL)
+        self.attach(add_button, 0, 2, 4, 5, gtk.FILL, gtk.FILL)
 
         def remove_attribute(button, tree):
             model, selected = tree.get_selection().get_selected()
@@ -542,7 +578,7 @@ class DefinitionTable(gtk.Table):
                 model.remove(selected)
         remove_button = gtk.Button('remove')
         remove_button.connect('clicked', remove_attribute, self.attribute_tree)
-        self.attach(remove_button, 0, 2, 4, 5, gtk.FILL, gtk.FILL)
+        self.attach(remove_button, 0, 2, 5, 6, gtk.FILL, gtk.FILL)
 
     def set_tree(self, tree):
         if tree:
@@ -591,10 +627,10 @@ class SecurityTable(gtk.Table):
         self.security_tree = SecurityTree(self)
 
         self.empty_table = EmptyTable(self.security_tree)
-        self.user_table = UserTable()
+        self.user_table = UserTable(self.security_tree)
         self.condition_table = ConditionTable(self.security_tree)
-        self.permission_table = PermissionTable()
-        self.return_table = ReturnTable()
+        self.permission_table = PermissionTable(self.security_tree)
+        self.return_table = ReturnTable(self.security_tree)
         self.definition_table = DefinitionTable(self.security_tree)
         self.table_notebook = gtk.Notebook()
         self.table_notebook.append_page(self.empty_table)



commit ebe91b6cdd15d5f51c086aebb1dae4a2817b8ec9
Author: Marek Aaron Sapota <maarons@gnu.org>
Date:   Sat Aug 22 23:24:23 2009 +0200

    GUI can save security files.

diff --git a/misc/PyGTK_Control/MyServerControl.py b/misc/PyGTK_Control/MyServerControl.py
index 928dcfa..faf314b 100644
--- a/misc/PyGTK_Control/MyServerControl.py
+++ b/misc/PyGTK_Control/MyServerControl.py
@@ -443,15 +443,19 @@ class PyGTKControl():
     def construct_browser(self):
         '''Constructs file browser.'''
         panels = gtk.HPaned()
-        security_table = SecurityTable()
-        panels.pack2(security_table, True, False)
-        browser_table = BrowserTable(security_table.read_from_file)
-        panels.pack1(browser_table, True, False)
+        self.security_table = SecurityTable()
+        panels.pack2(self.security_table, True, False)
+        self.browser_table = BrowserTable(self.security_table.read_from_file)
+        panels.pack1(self.browser_table, True, False)
         
         self.widgets.get_widget('notebook').append_page(
             panels, gtk.Label('File browser'))
 
         self.widgets.get_widget('notebook').show_all()
 
+    def on_save_security_menu_item_activate(self, widget):
+        self.security_table.write_to_file(
+            self.browser_table.browser_tree.browser)
+
 PyGTKControl()
 gtk.main()
diff --git a/misc/PyGTK_Control/PyGTKControl.glade b/misc/PyGTK_Control/PyGTKControl.glade
index 63db0cc..fb843a0 100644
--- a/misc/PyGTK_Control/PyGTKControl.glade
+++ b/misc/PyGTK_Control/PyGTKControl.glade
@@ -488,6 +488,33 @@
               </widget>
             </child>
             <child>
+              <widget class="GtkMenuItem" id="security_menu_item">
+                <property name="visible">True</property>
+                <property name="label" translatable="yes">_Security</property>
+                <property name="use_underline">True</property>
+                <child>
+                  <widget class="GtkMenu" id="security_menu">
+                    <property name="visible">True</property>
+                    <child>
+                      <widget class="GtkImageMenuItem" id="save_security_menu_item">
+                        <property name="label">Save security</property>
+                        <property name="visible">True</property>
+                        <property name="use_stock">False</property>
+                        <signal name="activate" handler="on_save_security_menu_item_activate"/>
+                        <child internal-child="image">
+                          <widget class="GtkImage" id="save_security_image">
+                            <property name="visible">True</property>
+                            <property name="stock">gtk-save</property>
+                            <property name="icon-size">1</property>
+                          </widget>
+                        </child>
+                      </widget>
+                    </child>
+                  </widget>
+                </child>
+              </widget>
+            </child>
+            <child>
               <widget class="GtkMenuItem" id="help_menu_item">
                 <property name="visible">True</property>
                 <property name="label" translatable="yes">_Help</property>
diff --git a/misc/py_control_client/MyServer/GUI/SecurityWidgets.py b/misc/py_control_client/MyServer/GUI/SecurityWidgets.py
index 1f5ab86..b5f6649 100644
--- a/misc/py_control_client/MyServer/GUI/SecurityWidgets.py
+++ b/misc/py_control_client/MyServer/GUI/SecurityWidgets.py
@@ -288,6 +288,49 @@ class SecurityTree(gtk.TreeView):
             add = DefinitionTree()
         model.append(selected, (tag, add, ))
 
+    def export(self):
+        def add_definition_tree(parent, i, model):
+            while len(parent.get_definitions()): # remove all children
+                parent.remove_definition(0)
+            i = model.iter_children(i)
+            while i is not None:
+                tag = model.get_value(i, 0)
+                data = model.get_value(i, 1)
+                parent.add_definition(data)
+                if tag == 'DEFINE tree':
+                    add_definition_tree(data, i, model)
+                i = model.iter_next(i)
+        def add_condition(parent, i, model):
+            while len(parent.get_sub_elements()): # remove all children
+                parent.remove_sub_element(0)
+            i = model.iter_children(i)
+            while i is not None:
+                tag = model.get_value(i, 0)
+                data = model.get_value(i, 1)
+                parent.add_sub_element(data)
+                if tag == 'DEFINE tree':
+                    add_definition_tree(data, i, model)
+                elif tag == 'CONDITION':
+                    add_condition(data, i, model)
+                i = model.iter_next(i)
+        self.save()
+        model = self.get_model()
+        i = model.iter_children(None)
+        security = model.get_value(i, 1)
+        while len(security.get_elements()): # remove all children
+            security.remove_element(0)
+        i = model.iter_children(i)
+        while i is not None:
+            tag = model.get_value(i, 0)
+            data = model.get_value(i, 1)
+            security.add_element(data)
+            if tag == 'DEFINE tree':
+                add_definition_tree(data, i, model)
+            elif tag == 'CONDITION':
+                add_condition(data, i, model)
+            i = model.iter_next(i)
+        return security
+
 class UserTable(gtk.Table):
     def __init__(self):
         gtk.Table.__init__(self, 7, 3)
@@ -431,7 +474,7 @@ class ReturnTable(gtk.Table):
 class DefinitionTable(gtk.Table):
     def __init__(self, security_tree):
         gtk.Table.__init__(self, 6, 3)
-        
+
         def add_sub_element(button, combo, tree):
             tag = combo.get_model()[combo.get_active()][0]
             tree.add_sub_element(tag)
@@ -522,7 +565,7 @@ class EmptyTable(gtk.Table):
         self.attach(gtk.Label('Use security file'), 0, 1, 0, 1, gtk.FILL, gtk.FILL)
         self.security_check = gtk.CheckButton()
         self.attach(self.security_check, 1, 2, 0, 1, yoptions = gtk.FILL)
-        
+
         def add_sub_element(button, combo, tree):
             tag = combo.get_model()[combo.get_active()][0]
             tree.add_sub_element(tag)
@@ -546,7 +589,7 @@ class SecurityTable(gtk.Table):
         gtk.Table.__init__(self, 1, 2)
 
         self.security_tree = SecurityTree(self)
-        
+
         self.empty_table = EmptyTable(self.security_tree)
         self.user_table = UserTable()
         self.condition_table = ConditionTable(self.security_tree)
@@ -575,6 +618,16 @@ class SecurityTable(gtk.Table):
         except IOError:
             self.security_tree.clear()
 
+    def write_to_file(self, browser):
+        if self.empty_table.security_check.get_active():
+            security = self.security_tree.export()
+            browser.put_file('security.xml', str(security))
+        else:
+            try:
+                browser.remove_file('security.xml')
+            except OSError: # file does not exist
+                pass
+
     def switch_table(self, tag):
         if tag == 'SECURITY':
             self.current_table = self.empty_table
diff --git a/misc/py_control_client/MyServer/pycontrollib/browser.py b/misc/py_control_client/MyServer/pycontrollib/browser.py
index 63b8317..82c0456 100644
--- a/misc/py_control_client/MyServer/pycontrollib/browser.py
+++ b/misc/py_control_client/MyServer/pycontrollib/browser.py
@@ -31,6 +31,9 @@ class FileBrowser():
     
     def put_file(self, path, text):
         raise NotImplementedError()
+
+    def remove_file(self, path):
+        raise NotImplementedError()
     
     def get_path(self):
         raise NotImplementedError()
@@ -65,7 +68,10 @@ class LocalFileBrowser(FileBrowser):
 
     def put_file(self, path, text):
         with open(os.path.join(self.path, path), 'w') as f:
-            f.write(text) 
+            f.write(text)
+
+    def remove_file(self, path):
+        os.remove(os.path.join(self.path, path))
 
     def get_path(self):
         return self.path



commit 1fe17cec41609d5dcc35e494f6b9e9d6cc190161
Author: Marek Aaron Sapota <maarons@gnu.org>
Date:   Fri Aug 21 23:53:46 2009 +0200

    Full security file edition support in GUI.
    
    Save is still missing.

diff --git a/misc/PyGTK_Control/MyServerControl.py b/misc/PyGTK_Control/MyServerControl.py
index 93589d7..928dcfa 100644
--- a/misc/PyGTK_Control/MyServerControl.py
+++ b/misc/PyGTK_Control/MyServerControl.py
@@ -443,10 +443,10 @@ class PyGTKControl():
     def construct_browser(self):
         '''Constructs file browser.'''
         panels = gtk.HPaned()
-        browser_table = BrowserTable()
-        panels.pack1(browser_table, True, False)
         security_table = SecurityTable()
         panels.pack2(security_table, True, False)
+        browser_table = BrowserTable(security_table.read_from_file)
+        panels.pack1(browser_table, True, False)
         
         self.widgets.get_widget('notebook').append_page(
             panels, gtk.Label('File browser'))
diff --git a/misc/py_control_client/MyServer/GUI/BrowserWidgets.py b/misc/py_control_client/MyServer/GUI/BrowserWidgets.py
index 4d540fc..219ef16 100644
--- a/misc/py_control_client/MyServer/GUI/BrowserWidgets.py
+++ b/misc/py_control_client/MyServer/GUI/BrowserWidgets.py
@@ -22,10 +22,11 @@ import gobject
 from MyServer.pycontrollib.browser import LocalFileBrowser
 
 class BrowserTreeView(gtk.TreeView):
-    def __init__(self):
+    def __init__(self, callback):
         gtk.TreeView.__init__(self, gtk.ListStore(
                 gdk.Pixbuf,
                 gobject.TYPE_STRING))
+        self.callback = callback
         self.model = self.get_model()
         renderer = gtk.CellRendererPixbuf()
         column = gtk.TreeViewColumn()
@@ -44,6 +45,7 @@ class BrowserTreeView(gtk.TreeView):
         self.dir_icon = icon_theme.load_icon('gtk-directory', 16, 0)
         self.update()
         self.connect('row-activated', self.change_dir)
+        callback(self.browser)
 
         self.scroll = gtk.ScrolledWindow()
         self.scroll.set_policy(gtk.POLICY_AUTOMATIC, gtk.POLICY_AUTOMATIC)
@@ -60,12 +62,13 @@ class BrowserTreeView(gtk.TreeView):
     def change_dir(self, widget, path, view_column):
         self.browser.change_dir(self.model[path][1])
         self.update()
+        self.callback(self.browser)
 
 class BrowserTable(gtk.Table):
-    def __init__(self):
+    def __init__(self, callback):
         gtk.Table.__init__(self, 2, 1)
 
-        self.browser_tree = BrowserTreeView()
+        self.browser_tree = BrowserTreeView(callback)
 
         def set_show_hidden(button):
             self.browser_tree.browser.show_hidden(button.get_active())
diff --git a/misc/py_control_client/MyServer/GUI/SecurityWidgets.py b/misc/py_control_client/MyServer/GUI/SecurityWidgets.py
index e8036a1..1f5ab86 100644
--- a/misc/py_control_client/MyServer/GUI/SecurityWidgets.py
+++ b/misc/py_control_client/MyServer/GUI/SecurityWidgets.py
@@ -20,7 +20,7 @@ import gtk
 import gobject
 from MyServer.pycontrollib.security import SecurityList, User, Return, \
     Condition, Permission
-from MyServer.pycontrollib.definition import DefinitionElement
+from MyServer.pycontrollib.definition import DefinitionElement, DefinitionTree
 
 class SecurityTree(gtk.TreeView):
     def __init__(self, security_table):
@@ -44,25 +44,36 @@ class SecurityTree(gtk.TreeView):
         self.scroll.set_border_width(5)
         self.scroll.add(self)
 
-        self.clear()
-
     def clear(self):
         self.get_model().clear()
+        self.last_selected = None
         self.get_model().append(None, ('SECURITY', SecurityList(), ))
+        self.security_table.empty_table.security_check.set_active(False)
+        self.security_table.switch_table('SECURITY')
 
     def set_up(self, security_list):
+        def add_from_definition_tree(parent, model, definition):
+            for element in definition.get_definitions():
+                x = model.append(parent, (element.tag, element, ))
+                if element.tag == 'DEFINE tree':
+                    add_from_definition_tree(x, model, element)
         def add_from_condition(parent, model, condition):
             for element in condition.get_sub_elements():
                 x = model.append(parent, (element.tag, element, ))
                 if element.tag == 'CONDITION':
                     add_from_condition(x, model, element)
+        self.security_table.empty_table.security_check.set_active(True)
+        self.security_table.switch_table('SECURITY')
         model = self.get_model()
+        self.last_selected = None
         model.clear()
         parent = model.append(None, ('SECURITY', security_list))
         for element in security_list.get_elements():
             x = model.append(parent, (element.tag, element, ))
             if element.tag == 'CONDITION':
                 add_from_condition(x, model, element)
+            elif element.tag == 'DEFINE tree':
+                add_from_definition_tree(x, model, element)
 
     def save(self):
         if self.last_selected is None:
@@ -134,6 +145,27 @@ class SecurityTree(gtk.TreeView):
             combo = table.value_combo
             value = combo.get_model()[combo.get_active()][0]
             data.set_value(value if value != 'empty' else None)
+        elif tag == 'DEFINE element' or tag == 'DEFINE tree':
+            table = self.security_table.definition_table
+            if table.name_check.get_active():
+                data.set_name(table.name_entry.get_text())
+            else:
+                data.set_name(None)
+            variables = []
+            for variable in data.get_attributes():
+                variables.append(variable)
+            for variable in variables:
+                data.remove_attribute(variable)
+            model = table.attribute_tree.get_model()
+            i = model.iter_children(None)
+            while i is not None: # iterate over attributes
+                data.set_attribute(
+                    model.get_value(i, 0),
+                    model.get_value(i, 1))
+                i = model.iter_next(i)
+            if tag == 'DEFINE element':
+                if table.value_check.get_active():
+                    data.set_attribute('value', table.value_entry.get_text())
 
     def update_gui(self, tag, data):
         if tag == 'USER':
@@ -207,6 +239,26 @@ class SecurityTree(gtk.TreeView):
             combo = table.value_combo
             value =  2 if data.get_value() is None else int(data.get_value() == 'DENY')
             combo.set_active(value)
+        elif tag == 'DEFINE element' or tag == 'DEFINE tree':
+            table = self.security_table.definition_table
+            model = table.attribute_tree.get_model()
+            model.clear()
+            for variable, value in data.get_attributes().iteritems():
+                if variable != 'value':
+                    model.append((variable, value, ))
+            if data.get_name() is None:
+                table.name_check.set_active(False)
+                table.name_entry.set_text('')
+            else:
+                table.name_check.set_active(True)
+                table.name_entry.set_text(data.get_name())
+            if tag == 'DEFINE element':
+                try:
+                    table.value_check.set_active(True)
+                    table.value_entry.set_text(data.get_attribute('value'))
+                except KeyError:
+                    table.value_check.set_active(False)
+                    table.value_entry.set_text('')
 
     def cursor_changed(self, tree):
         self.save()
@@ -220,6 +272,8 @@ class SecurityTree(gtk.TreeView):
 
     def add_sub_element(self, tag):
         model, selected = self.get_selection().get_selected()
+        if selected is None:
+            return
         if tag == 'USER':
             add = User()
         elif tag == 'RETURN':
@@ -228,6 +282,10 @@ class SecurityTree(gtk.TreeView):
             add = Condition()
         elif tag == 'PERMISSION':
             add = Permission()
+        elif tag == 'DEFINE element':
+            add = DefinitionElement()
+        elif tag == 'DEFINE tree':
+            add = DefinitionTree()
         model.append(selected, (tag, add, ))
 
 class UserTable(gtk.Table):
@@ -290,7 +348,7 @@ class ConditionTable(gtk.Table):
         self.value_entry = gtk.Entry()
         self.attach(self.value_entry, 1, 2, 1, 2, yoptions = gtk.FILL)
         self.value_check = gtk.CheckButton()
-        self.attach(self.value_check, 2, 3, 0, 1, gtk.FILL, gtk.FILL)
+        self.attach(self.value_check, 2, 3, 1, 2, gtk.FILL, gtk.FILL)
 
         def add_options(combo):
             combo.append_text('Yes')
@@ -317,7 +375,8 @@ class ConditionTable(gtk.Table):
         self.add_sub_element_combo.append_text('CONDITION')
         self.add_sub_element_combo.append_text('PERMISSION')
         self.add_sub_element_combo.append_text('RETURN')
-        self.add_sub_element_combo.append_text('DEFINE')
+        self.add_sub_element_combo.append_text('DEFINE element')
+        self.add_sub_element_combo.append_text('DEFINE tree')
         self.add_sub_element_combo.set_active(0)
         self.attach(self.add_sub_element_combo, 1, 2, 4, 5, gtk.FILL, gtk.FILL)
         self.add_sub_element_button.connect('clicked', add_sub_element,
@@ -370,8 +429,91 @@ class ReturnTable(gtk.Table):
         self.attach(self.value_combo, 1, 2, 0, 1, yoptions = gtk.FILL)
 
 class DefinitionTable(gtk.Table):
-    def __init__(self):
-        gtk.Table.__init__(self, 1, 2)
+    def __init__(self, security_tree):
+        gtk.Table.__init__(self, 6, 3)
+        
+        def add_sub_element(button, combo, tree):
+            tag = combo.get_model()[combo.get_active()][0]
+            tree.add_sub_element(tag)
+        self.add_sub_element_button = gtk.Button('Add sub-element')
+        self.attach(self.add_sub_element_button, 0, 1, 0, 1, gtk.FILL, gtk.FILL)
+        self.add_sub_element_combo = gtk.combo_box_new_text()
+        self.add_sub_element_combo.append_text('DEFINE element')
+        self.add_sub_element_combo.append_text('DEFINE tree')
+        self.add_sub_element_combo.set_active(0)
+        self.attach(self.add_sub_element_combo, 1, 2, 0, 1, gtk.FILL, gtk.FILL)
+        self.add_sub_element_button.connect('clicked', add_sub_element,
+                                            self.add_sub_element_combo,
+                                            security_tree)
+
+        self.attach(gtk.Label('name'), 0, 1, 1, 2, gtk.FILL, gtk.FILL)
+        self.name_entry = gtk.Entry()
+        self.attach(self.name_entry, 1, 2, 1, 2, yoptions = gtk.FILL)
+        self.name_check = gtk.CheckButton()
+        self.attach(self.name_check, 2, 3, 1, 2, gtk.FILL, gtk.FILL)
+
+        self.value_label = gtk.Label('value')
+        self.attach(self.value_label, 0, 1, 2, 3, gtk.FILL, gtk.FILL)
+        self.value_entry = gtk.Entry()
+        self.attach(self.value_entry, 1, 2, 2, 3, yoptions = gtk.FILL)
+        self.value_check = gtk.CheckButton()
+        self.attach(self.value_check, 2, 3, 2, 3, gtk.FILL, gtk.FILL)
+
+        self.attribute_tree = gtk.TreeView(gtk.ListStore(
+                gobject.TYPE_STRING, # variable
+                gobject.TYPE_STRING)) # value
+        model = self.attribute_tree.get_model()
+        def edited_handler(cell, path, text, data):
+            model, col = data
+            model[path][col] = text
+        renderer = gtk.CellRendererText()
+        renderer.set_property('editable', True)
+        renderer.connect('edited', edited_handler, (model, 0, ))
+        column = gtk.TreeViewColumn('variable')
+        column.pack_start(renderer)
+        column.add_attribute(renderer, 'text', 0)
+        self.attribute_tree.append_column(column)
+        renderer = gtk.CellRendererText()
+        renderer.set_property('editable', True)
+        renderer.connect('edited', edited_handler, (model, 1, ))
+        column = gtk.TreeViewColumn('value')
+        column.pack_start(renderer)
+        column.add_attribute(renderer, 'text', 1)
+        self.attribute_tree.append_column(column)
+        scroll = gtk.ScrolledWindow()
+        scroll.set_policy(gtk.POLICY_AUTOMATIC, gtk.POLICY_AUTOMATIC)
+        scroll.set_shadow_type(gtk.SHADOW_OUT)
+        scroll.set_border_width(5)
+        scroll.add(self.attribute_tree)
+        self.attach(scroll, 0, 2, 5, 6)
+
+        def add_attribute(button, model):
+            model.append(('', '', ))
+        add_button = gtk.Button('add')
+        add_button.connect('clicked', add_attribute, model)
+        self.attach(add_button, 0, 2, 3, 4, gtk.FILL, gtk.FILL)
+
+        def remove_attribute(button, tree):
+            model, selected = tree.get_selection().get_selected()
+            if selected is not None:
+                model.remove(selected)
+        remove_button = gtk.Button('remove')
+        remove_button.connect('clicked', remove_attribute, self.attribute_tree)
+        self.attach(remove_button, 0, 2, 4, 5, gtk.FILL, gtk.FILL)
+
+    def set_tree(self, tree):
+        if tree:
+            self.add_sub_element_button.show()
+            self.add_sub_element_combo.show()
+            self.value_label.hide()
+            self.value_entry.hide()
+            self.value_check.hide()
+        else:
+            self.add_sub_element_button.hide()
+            self.add_sub_element_combo.hide()
+            self.value_label.show()
+            self.value_entry.show()
+            self.value_check.show()
 
 class EmptyTable(gtk.Table):
     def __init__(self, security_tree):
@@ -391,7 +533,8 @@ class EmptyTable(gtk.Table):
         self.add_sub_element_combo.append_text('CONDITION')
         self.add_sub_element_combo.append_text('PERMISSION')
         self.add_sub_element_combo.append_text('RETURN')
-        self.add_sub_element_combo.append_text('DEFINE')
+        self.add_sub_element_combo.append_text('DEFINE element')
+        self.add_sub_element_combo.append_text('DEFINE tree')
         self.add_sub_element_combo.set_active(0)
         self.attach(self.add_sub_element_combo, 1, 2, 1, 2, gtk.FILL, gtk.FILL)
         self.add_sub_element_button.connect('clicked', add_sub_element,
@@ -403,40 +546,56 @@ class SecurityTable(gtk.Table):
         gtk.Table.__init__(self, 1, 2)
 
         self.security_tree = SecurityTree(self)
-
+        
+        self.empty_table = EmptyTable(self.security_tree)
         self.user_table = UserTable()
         self.condition_table = ConditionTable(self.security_tree)
         self.permission_table = PermissionTable()
         self.return_table = ReturnTable()
-        self.definition_table = DefinitionTable()
-        self.empty_table = EmptyTable(self.security_tree)
-        self.current_table = self.empty_table
+        self.definition_table = DefinitionTable(self.security_tree)
+        self.table_notebook = gtk.Notebook()
+        self.table_notebook.append_page(self.empty_table)
+        self.table_notebook.append_page(self.user_table)
+        self.table_notebook.append_page(self.condition_table)
+        self.table_notebook.append_page(self.permission_table)
+        self.table_notebook.append_page(self.return_table)
+        self.table_notebook.append_page(self.definition_table)
+        self.table_notebook.set_show_tabs(False)
 
         self.attach(self.security_tree.scroll, 0, 1, 0, 1)
-        self.attach(self.current_table, 1, 2, 0, 1, gtk.FILL)
+        self.attach(self.table_notebook, 1, 2, 0, 1, gtk.FILL)
 
-    def read_from_file(self, file_name):
+    def read_from_file(self, browser):
         self.switch_table('SECURITY')
+        self.security_tree.clear()
         try:
-            f = open(file_name)
-            security = SecurityList.from_string(f.read())
+            security = SecurityList.from_string(
+                browser.get_file('security.xml'))
             self.security_tree.set_up(security)
-            f.close()
         except IOError:
             self.security_tree.clear()
 
-    def switch_table(self, tag): # switch doesn't work
-        self.remove(self.current_table)
-        if tag == 'USER':
+    def switch_table(self, tag):
+        if tag == 'SECURITY':
+            self.current_table = self.empty_table
+            self.table_notebook.set_current_page(0)
+        elif tag == 'USER':
             self.current_table = self.user_table
+            self.table_notebook.set_current_page(1)
         elif tag == 'CONDITION':
             self.current_table = self.condition_table
+            self.table_notebook.set_current_page(2)
         elif tag == 'PERMISSION':
             self.current_table = self.permission_table
+            self.table_notebook.set_current_page(3)
         elif tag == 'RETURN':
             self.current_table = self.return_table
-        elif tag == 'DEFINITION':
+            self.table_notebook.set_current_page(4)
+        elif tag == 'DEFINE element':
             self.current_table = self.definition_table
-        elif tag == 'SECURITY':
-            self.current_table = self.empty_table
-        self.attach(self.current_table, 1, 2, 0, 1, gtk.FILL)
+            self.definition_table.set_tree(False)
+            self.table_notebook.set_current_page(5)
+        elif tag == 'DEFINE tree':
+            self.current_table = self.definition_table
+            self.definition_table.set_tree(True)
+            self.table_notebook.set_current_page(5)
diff --git a/misc/py_control_client/MyServer/pycontrollib/definition.py b/misc/py_control_client/MyServer/pycontrollib/definition.py
index b8e5b03..9ac2f55 100644
--- a/misc/py_control_client/MyServer/pycontrollib/definition.py
+++ b/misc/py_control_client/MyServer/pycontrollib/definition.py
@@ -82,6 +82,7 @@ class DefinitionElement(Definition):
     def __init__(self, name = None, attributes = {}):
         '''Creates new definition element with given name and attributes.'''
         Definition.__init__(self, name)
+        self.tag = 'DEFINE element'
         for key, value in attributes.iteritems():
             self.set_attribute(key, value)
 
@@ -122,7 +123,7 @@ class DefinitionElement(Definition):
     def from_string(text):
         '''Factory to produce definition element by parsing a string.'''
         return DefinitionElement.from_lxml_element(etree.XML(text))
-    
+
     def search_by_name(self, name):
         return None if name != self.name else self
 
@@ -133,6 +134,7 @@ class DefinitionTree(Definition):
         '''Creates new definition tree with given name, sub-definitions and
         attributes. values is expected to be iterable.'''
         Definition.__init__(self, name, attributes)
+        self.tag = 'DEFINE tree'
         self.definitions = []
         self.custom = [] # list of children not being definitions
         for definition in definitions:
@@ -196,7 +198,7 @@ class DefinitionTree(Definition):
 
     def __str__(self):
         return etree.tostring(self.to_lxml_element(), pretty_print = True)
-    
+
     def search_by_name(self, name):
         for definition in reversed(self.definitions):
             ret = definition.search_by_name(name)



commit 4d884698e00d9fdd70b6d09bd52c6662ccc78153
Author: Marek Aaron Sapota <maarons@gnu.org>
Date:   Wed Aug 19 12:43:36 2009 +0200

    Implemented opening of security files.

diff --git a/misc/py_control_client/MyServer/GUI/SecurityWidgets.py b/misc/py_control_client/MyServer/GUI/SecurityWidgets.py
index db45675..e8036a1 100644
--- a/misc/py_control_client/MyServer/GUI/SecurityWidgets.py
+++ b/misc/py_control_client/MyServer/GUI/SecurityWidgets.py
@@ -18,7 +18,7 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 import gtk
 import gobject
-from MyServer.pycontrollib.security import SecurityElement, User, Return, \
+from MyServer.pycontrollib.security import SecurityList, User, Return, \
     Condition, Permission
 from MyServer.pycontrollib.definition import DefinitionElement
 
@@ -44,11 +44,25 @@ class SecurityTree(gtk.TreeView):
         self.scroll.set_border_width(5)
         self.scroll.add(self)
 
-        x = self.get_model().append(None, ('SECURITY', SecurityElement(), ))
-        self.get_model().append(x, ('USER', User(), ))
-        self.get_model().append(x, ('USER', User(), ))
-        self.get_model().append(x, ('RETURN', Return(), ))
-        self.get_model().append(x, ('CONDITION', Condition(), ))
+        self.clear()
+
+    def clear(self):
+        self.get_model().clear()
+        self.get_model().append(None, ('SECURITY', SecurityList(), ))
+
+    def set_up(self, security_list):
+        def add_from_condition(parent, model, condition):
+            for element in condition.get_sub_elements():
+                x = model.append(parent, (element.tag, element, ))
+                if element.tag == 'CONDITION':
+                    add_from_condition(x, model, element)
+        model = self.get_model()
+        model.clear()
+        parent = model.append(None, ('SECURITY', security_list))
+        for element in security_list.get_elements():
+            x = model.append(parent, (element.tag, element, ))
+            if element.tag == 'CONDITION':
+                add_from_condition(x, model, element)
 
     def save(self):
         if self.last_selected is None:
@@ -388,19 +402,29 @@ class SecurityTable(gtk.Table):
     def __init__(self):
         gtk.Table.__init__(self, 1, 2)
 
-        security_tree = SecurityTree(self)
+        self.security_tree = SecurityTree(self)
 
         self.user_table = UserTable()
-        self.condition_table = ConditionTable(security_tree)
+        self.condition_table = ConditionTable(self.security_tree)
         self.permission_table = PermissionTable()
         self.return_table = ReturnTable()
         self.definition_table = DefinitionTable()
-        self.empty_table = EmptyTable(security_tree)
+        self.empty_table = EmptyTable(self.security_tree)
         self.current_table = self.empty_table
 
-        self.attach(security_tree.scroll, 0, 1, 0, 1)
+        self.attach(self.security_tree.scroll, 0, 1, 0, 1)
         self.attach(self.current_table, 1, 2, 0, 1, gtk.FILL)
 
+    def read_from_file(self, file_name):
+        self.switch_table('SECURITY')
+        try:
+            f = open(file_name)
+            security = SecurityList.from_string(f.read())
+            self.security_tree.set_up(security)
+            f.close()
+        except IOError:
+            self.security_tree.clear()
+
     def switch_table(self, tag): # switch doesn't work
         self.remove(self.current_table)
         if tag == 'USER':
diff --git a/misc/py_control_client/MyServer/pycontrollib/security.py b/misc/py_control_client/MyServer/pycontrollib/security.py
index aefaf57..74e0dc1 100644
--- a/misc/py_control_client/MyServer/pycontrollib/security.py
+++ b/misc/py_control_client/MyServer/pycontrollib/security.py
@@ -47,6 +47,7 @@ class SecurityElement():
 class Condition(SecurityElement):
     def __init__(self, name = None, value = None, reverse = None, regex = None,
                  sub_elements = []):
+        self.tag = 'CONDITION'
         self.set_name(name)
         self.set_value(value)
         self.set_reverse(reverse)
@@ -157,6 +158,7 @@ class Condition(SecurityElement):
 class Permission(SecurityElement):
     def __init__(self, read = None, execute = None, browse = None,
                  delete = None, write = None):
+        self.tag = 'PERMISSION'
         self.set_read(read)
         self.set_execute(execute)
         self.set_browse(browse)
@@ -252,6 +254,7 @@ class Permission(SecurityElement):
 class User(SecurityElement):
     def __init__(self, name = None, password = None, read = None,
                  execute = None, browse = None, delete = None, write = None):
+        self.tag = 'USER'
         self.set_name(name)
         self.set_password(password)
         self.set_read(read)
@@ -368,6 +371,7 @@ class User(SecurityElement):
 
 class Return(SecurityElement):
     def __init__(self, value = None):
+        self.tag = 'RETURN'
         self.set_value(value)
         self.custom_attrib = {}
         self.custom = []



commit 1e783e320be4a0858adc2ae11b354a2736338586
Author: Marek Aaron Sapota <maarons@gnu.org>
Date:   Tue Aug 18 21:10:19 2009 +0200

    Security editor actually works.

diff --git a/misc/py_control_client/MyServer/GUI/SecurityWidgets.py b/misc/py_control_client/MyServer/GUI/SecurityWidgets.py
index c6b5021..db45675 100644
--- a/misc/py_control_client/MyServer/GUI/SecurityWidgets.py
+++ b/misc/py_control_client/MyServer/GUI/SecurityWidgets.py
@@ -18,6 +18,9 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 import gtk
 import gobject
+from MyServer.pycontrollib.security import SecurityElement, User, Return, \
+    Condition, Permission
+from MyServer.pycontrollib.definition import DefinitionElement
 
 class SecurityTree(gtk.TreeView):
     def __init__(self, security_table):
@@ -32,6 +35,7 @@ class SecurityTree(gtk.TreeView):
 
         self.security_table = security_table
 
+        self.last_selected = None
         self.connect('cursor-changed', self.cursor_changed)
 
         self.scroll = gtk.ScrolledWindow()
@@ -40,19 +44,177 @@ class SecurityTree(gtk.TreeView):
         self.scroll.set_border_width(5)
         self.scroll.add(self)
 
-        x = self.get_model().append(None, ('SECURITY', '', ))
-        self.get_model().append(x, ('USER', '', ))
-        self.get_model().append(x, ('RETURN', '', ))
-        self.get_model().append(x, ('CONDITION', '', ))
+        x = self.get_model().append(None, ('SECURITY', SecurityElement(), ))
+        self.get_model().append(x, ('USER', User(), ))
+        self.get_model().append(x, ('USER', User(), ))
+        self.get_model().append(x, ('RETURN', Return(), ))
+        self.get_model().append(x, ('CONDITION', Condition(), ))
+
+    def save(self):
+        if self.last_selected is None:
+            return
+        model = self.get_model()
+        row = model[self.last_selected]
+        tag = row[0]
+        data = row[1]
+        if tag == 'USER':
+            table = self.security_table.user_table
+            if table.name_check.get_active():
+                data.set_name(table.name_entry.get_text())
+            else:
+                data.set_name(None)
+            if table.password_check.get_active():
+                data.set_password(table.password_entry.get_text())
+            else:
+                data.set_password(None)
+            combo = table.read_combo
+            value = combo.get_model()[combo.get_active()][0]
+            data.set_read(value == 'Yes' if value != 'empty' else None)
+            combo = table.execute_combo
+            value = combo.get_model()[combo.get_active()][0]
+            data.set_execute(value == 'Yes' if value != 'empty' else None)
+            combo = table.browse_combo
+            value = combo.get_model()[combo.get_active()][0]
+            data.set_browse(value == 'Yes'if value != 'empty' else None)
+            combo = table.delete_combo
+            value = combo.get_model()[combo.get_active()][0]
+            data.set_delete(value == 'Yes' if value != 'empty' else None)
+            combo = table.write_combo
+            value = combo.get_model()[combo.get_active()][0]
+            data.set_write(value == 'Yes' if value != 'empty' else None)
+        elif tag == 'CONDITION':
+            table = self.security_table.condition_table
+            if table.name_check.get_active():
+                data.set_name(table.name_entry.get_text())
+            else:
+                data.set_name(None)
+            if table.value_check.get_active():
+                data.set_value(table.value_entry.get_text())
+            else:
+                data.set_value(None)
+            combo = table.regex_combo
+            value = combo.get_model()[combo.get_active()][0]
+            data.set_regex(value == 'Yes' if value != 'empty' else None)
+            combo = table.reverse_combo
+            value = combo.get_model()[combo.get_active()][0]
+            data.set_reverse(value == 'Yes' if value != 'empty' else None)
+        elif tag == 'PERMISSION':
+            table = self.security_table.permission_table
+            combo = table.read_combo
+            value = combo.get_model()[combo.get_active()][0]
+            data.set_read(value == 'Yes' if value != 'empty' else None)
+            combo = table.execute_combo
+            value = combo.get_model()[combo.get_active()][0]
+            data.set_execute(value == 'Yes' if value != 'empty' else None)
+            combo = table.browse_combo
+            value = combo.get_model()[combo.get_active()][0]
+            data.set_browse(value == 'Yes'if value != 'empty' else None)
+            combo = table.delete_combo
+            value = combo.get_model()[combo.get_active()][0]
+            data.set_delete(value == 'Yes' if value != 'empty' else None)
+            combo = table.write_combo
+            value = combo.get_model()[combo.get_active()][0]
+            data.set_write(value == 'Yes' if value != 'empty' else None)
+        elif tag == 'RETURN':
+            table = self.security_table.return_table
+            combo = table.value_combo
+            value = combo.get_model()[combo.get_active()][0]
+            data.set_value(value if value != 'empty' else None)
+
+    def update_gui(self, tag, data):
+        if tag == 'USER':
+            table = self.security_table.user_table
+            if data.get_name() is None:
+                table.name_check.set_active(False)
+                table.name_entry.set_text('')
+            else:
+                table.name_check.set_active(True)
+                table.name_entry.set_text(data.get_name())
+            if data.get_password() is None:
+                table.password_check.set_active(False)
+                table.password_entry.set_text('')
+            else:
+                table.password_check.set_active(True)
+                table.password_entry.set_text(data.get_password())
+            combo = table.read_combo
+            value =  2 if data.get_read() is None else int(not data.get_read())
+            combo.set_active(value)
+            combo = table.execute_combo
+            value =  2 if data.get_execute() is None else int(not data.get_execute())
+            combo.set_active(value)
+            combo = table.browse_combo
+            value =  2 if data.get_browse() is None else int(not data.get_browse())
+            combo.set_active(value)
+            combo = table.delete_combo
+            value =  2 if data.get_delete() is None else int(not data.get_delete())
+            combo.set_active(value)
+            combo = table.write_combo
+            value =  2 if data.get_write() is None else int(not data.get_write())
+            combo.set_active(value)
+        elif tag == 'CONDITION':
+            table = self.security_table.condition_table
+            if data.get_name() is None:
+                table.name_check.set_active(False)
+                table.name_entry.set_text('')
+            else:
+                table.name_check.set_active(True)
+                table.name_entry.set_text(data.get_name())
+            if data.get_value() is None:
+                table.value_check.set_active(False)
+                table.value_entry.set_text('')
+            else:
+                table.value_check.set_active(True)
+                table.value_entry.set_text(data.get_value())
+            combo = table.regex_combo
+            value =  2 if data.get_regex() is None else int(not data.get_regex())
+            combo.set_active(value)
+            combo = table.reverse_combo
+            value =  2 if data.get_reverse() is None else int(not data.get_reverse())
+            combo.set_active(value)
+        elif tag == 'PERMISSION':
+            table = self.security_table.permission_table
+            combo = table.read_combo
+            value =  2 if data.get_read() is None else int(not data.get_read())
+            combo.set_active(value)
+            combo = table.execute_combo
+            value =  2 if data.get_execute() is None else int(not data.get_execute())
+            combo.set_active(value)
+            combo = table.browse_combo
+            value =  2 if data.get_browse() is None else int(not data.get_browse())
+            combo.set_active(value)
+            combo = table.delete_combo
+            value =  2 if data.get_delete() is None else int(not data.get_delete())
+            combo.set_active(value)
+            combo = table.write_combo
+            value =  2 if data.get_write() is None else int(not data.get_write())
+            combo.set_active(value)
+        elif tag == 'RETURN':
+            table = self.security_table.return_table
+            combo = table.value_combo
+            value =  2 if data.get_value() is None else int(data.get_value() == 'DENY')
+            combo.set_active(value)
 
     def cursor_changed(self, tree):
+        self.save()
+
         model, selected = tree.get_selection().get_selected()
+        self.last_selected = selected
         row = model[selected]
         self.security_table.switch_table(row[0])
 
+        self.update_gui(row[0], row[1])
+
     def add_sub_element(self, tag):
         model, selected = self.get_selection().get_selected()
-        model.append(selected, (tag, '', ))
+        if tag == 'USER':
+            add = User()
+        elif tag == 'RETURN':
+            add = Return()
+        elif tag == 'CONDITION':
+            add = Condition()
+        elif tag == 'PERMISSION':
+            add = Permission()
+        model.append(selected, (tag, add, ))
 
 class UserTable(gtk.Table):
     def __init__(self):
@@ -71,8 +233,8 @@ class UserTable(gtk.Table):
         self.attach(self.password_check, 2, 3, 1, 2, gtk.FILL, gtk.FILL)
 
         def add_options(combo):
-            combo.append_text('YES')
-            combo.append_text('NO')
+            combo.append_text('Yes')
+            combo.append_text('No')
             combo.append_text('empty')
 
         self.attach(gtk.Label('READ'), 0, 1, 2, 3, gtk.FILL, gtk.FILL)
@@ -117,8 +279,8 @@ class ConditionTable(gtk.Table):
         self.attach(self.value_check, 2, 3, 0, 1, gtk.FILL, gtk.FILL)
 
         def add_options(combo):
-            combo.append_text('yes')
-            combo.append_text('no')
+            combo.append_text('Yes')
+            combo.append_text('No')
             combo.append_text('empty')
 
         self.attach(gtk.Label('regex'), 0, 1, 2, 3, gtk.FILL, gtk.FILL)
@@ -153,8 +315,8 @@ class PermissionTable(gtk.Table):
         gtk.Table.__init__(self, 5, 2)
 
         def add_options(combo):
-            combo.append_text('YES')
-            combo.append_text('NO')
+            combo.append_text('Yes')
+            combo.append_text('No')
             combo.append_text('empty')
 
         self.attach(gtk.Label('READ'), 0, 1, 0, 1, gtk.FILL, gtk.FILL)



commit d93d10e52bffcc144bab2a80b57c5c4333912d50
Author: Marek Aaron Sapota <maarons@gnu.org>
Date:   Tue Aug 18 19:03:39 2009 +0200

    Partial security file edition support.

diff --git a/misc/PyGTK_Control/MyServerControl.py b/misc/PyGTK_Control/MyServerControl.py
index c05e312..93589d7 100644
--- a/misc/PyGTK_Control/MyServerControl.py
+++ b/misc/PyGTK_Control/MyServerControl.py
@@ -31,6 +31,7 @@ from MyServer.GUI.DefinitionWidgets import DefinitionTable, DefinitionTreeView
 from MyServer.GUI.MIMEWidgets import MimeTable, MimeTreeView
 from MyServer.GUI.VHostWidgets import VHostTable, VHostTreeView
 from MyServer.GUI.BrowserWidgets import BrowserTable
+from MyServer.GUI.SecurityWidgets import SecurityTable
 
 class PyGTKControl():
     '''GNU MyServer Control main window.'''
@@ -441,10 +442,14 @@ class PyGTKControl():
 
     def construct_browser(self):
         '''Constructs file browser.'''
-        table = BrowserTable()
+        panels = gtk.HPaned()
+        browser_table = BrowserTable()
+        panels.pack1(browser_table, True, False)
+        security_table = SecurityTable()
+        panels.pack2(security_table, True, False)
         
         self.widgets.get_widget('notebook').append_page(
-            table, gtk.Label('File browser'))
+            panels, gtk.Label('File browser'))
 
         self.widgets.get_widget('notebook').show_all()
 
diff --git a/misc/py_control_client/MyServer/GUI/SecurityWidgets.py b/misc/py_control_client/MyServer/GUI/SecurityWidgets.py
new file mode 100644
index 0000000..c6b5021
--- /dev/null
+++ b/misc/py_control_client/MyServer/GUI/SecurityWidgets.py
@@ -0,0 +1,256 @@
+# -*- coding: utf-8 -*-
+'''
+MyServer
+Copyright (C) 2009 Free Software Foundation, Inc.
+This program 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 3 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program.  If not, see <http://www.gnu.org/licenses/>.
+'''
+
+import gtk
+import gobject
+
+class SecurityTree(gtk.TreeView):
+    def __init__(self, security_table):
+        gtk.TreeView.__init__(self, gtk.TreeStore(
+                gobject.TYPE_STRING, # tag
+                gobject.TYPE_PYOBJECT)) # object
+        renderer = gtk.CellRendererText()
+        column = gtk.TreeViewColumn('tag')
+        column.pack_start(renderer)
+        column.add_attribute(renderer, 'text', 0)
+        self.append_column(column)
+
+        self.security_table = security_table
+
+        self.connect('cursor-changed', self.cursor_changed)
+
+        self.scroll = gtk.ScrolledWindow()
+        self.scroll.set_policy(gtk.POLICY_AUTOMATIC, gtk.POLICY_AUTOMATIC)
+        self.scroll.set_shadow_type(gtk.SHADOW_OUT)
+        self.scroll.set_border_width(5)
+        self.scroll.add(self)
+
+        x = self.get_model().append(None, ('SECURITY', '', ))
+        self.get_model().append(x, ('USER', '', ))
+        self.get_model().append(x, ('RETURN', '', ))
+        self.get_model().append(x, ('CONDITION', '', ))
+
+    def cursor_changed(self, tree):
+        model, selected = tree.get_selection().get_selected()
+        row = model[selected]
+        self.security_table.switch_table(row[0])
+
+    def add_sub_element(self, tag):
+        model, selected = self.get_selection().get_selected()
+        model.append(selected, (tag, '', ))
+
+class UserTable(gtk.Table):
+    def __init__(self):
+        gtk.Table.__init__(self, 7, 3)
+
+        self.attach(gtk.Label('name'), 0, 1, 0, 1, gtk.FILL, gtk.FILL)
+        self.name_entry = gtk.Entry()
+        self.attach(self.name_entry, 1, 2, 0, 1, yoptions = gtk.FILL)
+        self.name_check = gtk.CheckButton()
+        self.attach(self.name_check, 2, 3, 0, 1, gtk.FILL, gtk.FILL)
+
+        self.attach(gtk.Label('password'), 0, 1, 1, 2, gtk.FILL, gtk.FILL)
+        self.password_entry = gtk.Entry()
+        self.attach(self.password_entry, 1, 2, 1, 2, yoptions = gtk.FILL)
+        self.password_check = gtk.CheckButton()
+        self.attach(self.password_check, 2, 3, 1, 2, gtk.FILL, gtk.FILL)
+
+        def add_options(combo):
+            combo.append_text('YES')
+            combo.append_text('NO')
+            combo.append_text('empty')
+
+        self.attach(gtk.Label('READ'), 0, 1, 2, 3, gtk.FILL, gtk.FILL)
+        self.read_combo = gtk.combo_box_new_text()
+        add_options(self.read_combo)
+        self.attach(self.read_combo, 1, 2, 2, 3, yoptions = gtk.FILL)
+
+        self.attach(gtk.Label('EXECUTE'), 0, 1, 3, 4, gtk.FILL, gtk.FILL)
+        self.execute_combo = gtk.combo_box_new_text()
+        add_options(self.execute_combo)
+        self.attach(self.execute_combo, 1, 2, 3, 4, yoptions = gtk.FILL)
+
+        self.attach(gtk.Label('BROWSE'), 0, 1, 4, 5, gtk.FILL, gtk.FILL)
+        self.browse_combo = gtk.combo_box_new_text()
+        add_options(self.browse_combo)
+        self.attach(self.browse_combo, 1, 2, 4, 5, yoptions = gtk.FILL)
+
+        self.attach(gtk.Label('DELETE'), 0, 1, 5, 6, gtk.FILL, gtk.FILL)
+        self.delete_combo = gtk.combo_box_new_text()
+        add_options(self.delete_combo)
+        self.attach(self.delete_combo, 1, 2, 5, 6, yoptions = gtk.FILL)
+
+        self.attach(gtk.Label('WRITE'), 0, 1, 6, 7, gtk.FILL, gtk.FILL)
+        self.write_combo = gtk.combo_box_new_text()
+        add_options(self.write_combo)
+        self.attach(self.write_combo, 1, 2, 6, 7, yoptions = gtk.FILL)
+
+class ConditionTable(gtk.Table):
+    def __init__(self, security_tree):
+        gtk.Table.__init__(self, 5, 3)
+
+        self.attach(gtk.Label('name'), 0, 1, 0, 1, gtk.FILL, gtk.FILL)
+        self.name_entry = gtk.Entry()
+        self.attach(self.name_entry, 1, 2, 0, 1, yoptions = gtk.FILL)
+        self.name_check = gtk.CheckButton()
+        self.attach(self.name_check, 2, 3, 0, 1, gtk.FILL, gtk.FILL)
+
+        self.attach(gtk.Label('value'), 0, 1, 1, 2, gtk.FILL, gtk.FILL)
+        self.value_entry = gtk.Entry()
+        self.attach(self.value_entry, 1, 2, 1, 2, yoptions = gtk.FILL)
+        self.value_check = gtk.CheckButton()
+        self.attach(self.value_check, 2, 3, 0, 1, gtk.FILL, gtk.FILL)
+
+        def add_options(combo):
+            combo.append_text('yes')
+            combo.append_text('no')
+            combo.append_text('empty')
+
+        self.attach(gtk.Label('regex'), 0, 1, 2, 3, gtk.FILL, gtk.FILL)
+        self.regex_combo = gtk.combo_box_new_text()
+        add_options(self.regex_combo)
+        self.attach(self.regex_combo, 1, 2, 2, 3, yoptions = gtk.FILL)
+
+        self.attach(gtk.Label('reverse'), 0, 1, 3, 4, gtk.FILL, gtk.FILL)
+        self.reverse_combo = gtk.combo_box_new_text()
+        add_options(self.reverse_combo)
+        self.attach(self.reverse_combo, 1, 2, 3, 4, yoptions = gtk.FILL)
+
+        def add_sub_element(button, combo, tree):
+            tag = combo.get_model()[combo.get_active()][0]
+            tree.add_sub_element(tag)
+        self.add_sub_element_button = gtk.Button('Add sub-element')
+        self.attach(self.add_sub_element_button, 0, 1, 4, 5, gtk.FILL, gtk.FILL)
+        self.add_sub_element_combo = gtk.combo_box_new_text()
+        self.add_sub_element_combo.append_text('USER')
+        self.add_sub_element_combo.append_text('CONDITION')
+        self.add_sub_element_combo.append_text('PERMISSION')
+        self.add_sub_element_combo.append_text('RETURN')
+        self.add_sub_element_combo.append_text('DEFINE')
+        self.add_sub_element_combo.set_active(0)
+        self.attach(self.add_sub_element_combo, 1, 2, 4, 5, gtk.FILL, gtk.FILL)
+        self.add_sub_element_button.connect('clicked', add_sub_element,
+                                            self.add_sub_element_combo,
+                                            security_tree)
+
+class PermissionTable(gtk.Table):
+    def __init__(self):
+        gtk.Table.__init__(self, 5, 2)
+
+        def add_options(combo):
+            combo.append_text('YES')
+            combo.append_text('NO')
+            combo.append_text('empty')
+
+        self.attach(gtk.Label('READ'), 0, 1, 0, 1, gtk.FILL, gtk.FILL)
+        self.read_combo = gtk.combo_box_new_text()
+        add_options(self.read_combo)
+        self.attach(self.read_combo, 1, 2, 0, 1, yoptions = gtk.FILL)
+
+        self.attach(gtk.Label('EXECUTE'), 0, 1, 1, 2, gtk.FILL, gtk.FILL)
+        self.execute_combo = gtk.combo_box_new_text()
+        add_options(self.execute_combo)
+        self.attach(self.execute_combo, 1, 2, 1, 2, yoptions = gtk.FILL)
+
+        self.attach(gtk.Label('BROWSE'), 0, 1, 2, 3, gtk.FILL, gtk.FILL)
+        self.browse_combo = gtk.combo_box_new_text()
+        add_options(self.browse_combo)
+        self.attach(self.browse_combo, 1, 2, 2, 3, yoptions = gtk.FILL)
+
+        self.attach(gtk.Label('DELETE'), 0, 1, 3, 4, gtk.FILL, gtk.FILL)
+        self.delete_combo = gtk.combo_box_new_text()
+        add_options(self.delete_combo)
+        self.attach(self.delete_combo, 1, 2, 3, 4, yoptions = gtk.FILL)
+
+        self.attach(gtk.Label('WRITE'), 0, 1, 4, 5, gtk.FILL, gtk.FILL)
+        self.write_combo = gtk.combo_box_new_text()
+        add_options(self.write_combo)
+        self.attach(self.write_combo, 1, 2, 4, 5, yoptions = gtk.FILL)
+
+class ReturnTable(gtk.Table):
+    def __init__(self):
+        gtk.Table.__init__(self, 1, 2)
+
+        self.attach(gtk.Label('value'), 0, 1, 0, 1, gtk.FILL, gtk.FILL)
+        self.value_combo = gtk.combo_box_new_text()
+        self.value_combo.append_text('ALLOW')
+        self.value_combo.append_text('DENY')
+        self.value_combo.append_text('empty')
+        self.attach(self.value_combo, 1, 2, 0, 1, yoptions = gtk.FILL)
+
+class DefinitionTable(gtk.Table):
+    def __init__(self):
+        gtk.Table.__init__(self, 1, 2)
+
+class EmptyTable(gtk.Table):
+    def __init__(self, security_tree):
+        gtk.Table.__init__(self, 2, 2)
+
+        self.attach(gtk.Label('Use security file'), 0, 1, 0, 1, gtk.FILL, gtk.FILL)
+        self.security_check = gtk.CheckButton()
+        self.attach(self.security_check, 1, 2, 0, 1, yoptions = gtk.FILL)
+        
+        def add_sub_element(button, combo, tree):
+            tag = combo.get_model()[combo.get_active()][0]
+            tree.add_sub_element(tag)
+        self.add_sub_element_button = gtk.Button('Add sub-element')
+        self.attach(self.add_sub_element_button, 0, 1, 1, 2, gtk.FILL, gtk.FILL)
+        self.add_sub_element_combo = gtk.combo_box_new_text()
+        self.add_sub_element_combo.append_text('USER')
+        self.add_sub_element_combo.append_text('CONDITION')
+        self.add_sub_element_combo.append_text('PERMISSION')
+        self.add_sub_element_combo.append_text('RETURN')
+        self.add_sub_element_combo.append_text('DEFINE')
+        self.add_sub_element_combo.set_active(0)
+        self.attach(self.add_sub_element_combo, 1, 2, 1, 2, gtk.FILL, gtk.FILL)
+        self.add_sub_element_button.connect('clicked', add_sub_element,
+                                            self.add_sub_element_combo,
+                                            security_tree)
+
+class SecurityTable(gtk.Table):
+    def __init__(self):
+        gtk.Table.__init__(self, 1, 2)
+
+        security_tree = SecurityTree(self)
+
+        self.user_table = UserTable()
+        self.condition_table = ConditionTable(security_tree)
+        self.permission_table = PermissionTable()
+        self.return_table = ReturnTable()
+        self.definition_table = DefinitionTable()
+        self.empty_table = EmptyTable(security_tree)
+        self.current_table = self.empty_table
+
+        self.attach(security_tree.scroll, 0, 1, 0, 1)
+        self.attach(self.current_table, 1, 2, 0, 1, gtk.FILL)
+
+    def switch_table(self, tag): # switch doesn't work
+        self.remove(self.current_table)
+        if tag == 'USER':
+            self.current_table = self.user_table
+        elif tag == 'CONDITION':
+            self.current_table = self.condition_table
+        elif tag == 'PERMISSION':
+            self.current_table = self.permission_table
+        elif tag == 'RETURN':
+            self.current_table = self.return_table
+        elif tag == 'DEFINITION':
+            self.current_table = self.definition_table
+        elif tag == 'SECURITY':
+            self.current_table = self.empty_table
+        self.attach(self.current_table, 1, 2, 0, 1, gtk.FILL)



commit 1020bab81ba10ebfd055d26e47276874826b4486
Author: Marek Aaron Sapota <maarons@gnu.org>
Date:   Sun Aug 16 18:27:18 2009 +0200

    Complete tests for pycontrollib security classes.

diff --git a/misc/py_control_client/MyServer/pycontrollib/security.py b/misc/py_control_client/MyServer/pycontrollib/security.py
index d965915..aefaf57 100644
--- a/misc/py_control_client/MyServer/pycontrollib/security.py
+++ b/misc/py_control_client/MyServer/pycontrollib/security.py
@@ -410,14 +410,22 @@ class Return(SecurityElement):
 
 class SecurityList():
     def __init__(self, elements = []):
-        for elements in elements:
+        self.elements = []
+        for element in elements:
             self.add_element(element)
         self.custom = []
         self.custom_attrib = {}
 
+    def __eq__(self, other):
+        return isinstance(other, SecurityList) and \
+            self.elements == other.elements
+
     def get_elements(self):
         return self.elements
 
+    def get_element(self, index):
+        return self.elements[index]
+
     def add_element(self, element, index = None):
         if index is None:
             self.elements.append(element)
diff --git a/misc/py_control_client/MyServer/pycontrollib/test/security_test.py b/misc/py_control_client/MyServer/pycontrollib/test/security_test.py
index 218c3d7..a9e4ba3 100644
--- a/misc/py_control_client/MyServer/pycontrollib/test/security_test.py
+++ b/misc/py_control_client/MyServer/pycontrollib/test/security_test.py
@@ -867,6 +867,163 @@ class UserTest(unittest.TestCase):
         self.assertRaises(AttributeError, User.from_lxml_element,
                           etree.XML(text))
 
+class ReturnTest(unittest.TestCase):
+    def test_creation(self):
+        ret = Return()
+        ret = Return('ALLOW')
+
+    def test_value(self):
+        ret = Return('ALLOW')
+        self.assertEqual('ALLOW', ret.get_value())
+        ret.set_value('DENY')
+        self.assertEqual('DENY', ret.get_value())
+        ret.set_value(None)
+        self.assertEqual(None, ret.get_value())
+        ret = Return(value = 'ALLOW')
+        self.assertEqual('ALLOW', ret.get_value())
+
+    def test_equality(self):
+        self.assertEqual(Return('ALLOW'), Return('ALLOW'))
+        self.assertNotEqual(Return('ALLOW'), Return('DENY'))
+        self.assertNotEqual(Return(), 'another type')
+
+    def test_from_string(self):
+        text = '<RETURN />'
+        ret = Return.from_string(text)
+        right = Return()
+        self.assertEqual(ret, right)
+
+    def test_from_string_value(self):
+        text = '<RETURN value="ALLOW" />'
+        ret = Return.from_string(text)
+        right = Return(value = 'ALLOW')
+        self.assertEqual(ret, right)
+
+    def test_from_lxml(self):
+        text = '<RETURN />'
+        ret = Return.from_lxml_element(etree.XML(text))
+        right = Return()
+        self.assertEqual(ret, right)
+
+    def test_from_lxml_value(self):
+        text = '<RETURN value="ALLOW" />'
+        ret = Return.from_lxml_element(etree.XML(text))
+        right = Return(value = 'ALLOW')
+        self.assertEqual(ret, right)
+
+    def test_to_string(self):
+        ret = Return()
+        copy = Return.from_string(str(ret))
+        self.assertEqual(ret, copy)
+
+    def test_to_string_value(self):
+        ret = Return(value = 'ALLOW')
+        copy = Return.from_string(str(ret))
+        self.assertEqual(ret, copy)
+
+    def test_to_lxml(self):
+        ret = Return()
+        copy = Return.from_lxml_element(ret.to_lxml_element())
+        self.assertEqual(ret, copy)
+
+    def test_to_lxml_value(self):
+        ret = Return(value = 'ALLOW')
+        copy = Return.from_lxml_element(ret.to_lxml_element())
+        self.assertEqual(ret, copy)
+
+    def test_bad_root_tag(self):
+        text = '<ERROR />'
+        self.assertRaises(AttributeError, Return.from_string, text)
+        self.assertRaises(AttributeError, Return.from_lxml_element,
+                          etree.XML(text))
+
+class SecurityListTest(unittest.TestCase):
+    def test_creation(self):
+        slist = SecurityList()
+        slist = SecurityList([Permission(), Return()])
+
+    def test_elements(self):
+        element_0 = Condition()
+        element_1 = Return()
+        slist = SecurityList()
+        self.assertEqual(0, len(slist.get_elements()))
+        slist.add_element(element_0)
+        self.assertEqual(1, len(slist.get_elements()))
+        self.assertEqual(element_0, slist.get_element(0))
+        slist.add_element(element_1)
+        self.assertEqual(2, len(slist.get_elements()))
+        self.assertEqual(element_0, slist.get_element(0))
+        self.assertEqual(element_1, slist.get_element(1))
+        slist.remove_element(0)
+        self.assertEqual(1, len(slist.get_elements()))
+        self.assertEqual(element_1, slist.get_element(0))
+        slist.add_element(element_0, 0)
+        self.assertEqual(2, len(slist.get_elements()))
+        self.assertEqual(element_0, slist.get_element(0))
+        self.assertEqual(element_1, slist.get_element(1))
+        self.assertRaises(IndexError, slist.get_element, 2)
+        slist = SecurityList(elements = [element_0, element_1])
+        self.assertEqual(2, len(slist.get_elements()))
+        self.assertEqual(element_0, slist.get_element(0))
+        self.assertEqual(element_1, slist.get_element(1))
+
+    def test_equality(self):
+        self.assertEqual(SecurityList([Condition()]),
+                         SecurityList([Condition()]))
+        self.assertNotEqual(SecurityList([Condition()]),
+                            SecurityList([]))
+        self.assertNotEqual(SecurityList(), 'another type')
+
+    def test_from_string(self):
+        text = '<SECURITY />'
+        slist = SecurityList.from_string(text)
+        right = SecurityList()
+        self.assertEqual(slist, right)
+
+    def test_from_string_elements(self):
+        text = '<SECURITY><CONDITION /><RETURN /></SECURITY>'
+        slist = SecurityList.from_string(text)
+        right = SecurityList([Condition(), Return()])
+        self.assertEqual(slist, right)
+
+    def test_from_lxml(self):
+        text = '<SECURITY />'
+        slist = SecurityList.from_lxml_element(etree.XML(text))
+        right = SecurityList()
+        self.assertEqual(slist, right)
+
+    def test_from_lxml_elements(self):
+        text = '<SECURITY><CONDITION /><RETURN /></SECURITY>'
+        slist = SecurityList.from_lxml_element(etree.XML(text))
+        right = SecurityList([Condition(), Return()])
+        self.assertEqual(slist, right)
+
+    def test_to_string(self):
+        slist = SecurityList()
+        copy = SecurityList.from_string(str(slist))
+        self.assertEqual(slist, copy)
+
+    def test_to_string_elements(self):
+        slist = SecurityList([Condition(), Return()])
+        copy = SecurityList.from_string(str(slist))
+        self.assertEqual(slist, copy)
+
+    def test_to_lxml(self):
+        slist = SecurityList()
+        copy = SecurityList.from_lxml_element(slist.to_lxml_element())
+        self.assertEqual(slist, copy)
+
+    def test_to_string_elements(self):
+        slist = SecurityList([Condition(), Return()])
+        copy = SecurityList.from_lxml_element(slist.to_lxml_element())
+        self.assertEqual(slist, copy)
+
+    def test_bad_root_tag(self):
+        text = '<ERROR />'
+        self.assertRaises(AttributeError, SecurityList.from_string, text)
+        self.assertRaises(AttributeError, SecurityList.from_lxml_element,
+                          etree.XML(text))
+
 class BadMarkupTest(unittest.TestCase):
     def condition_test(self):
         text = '''
@@ -923,5 +1080,43 @@ class BadMarkupTest(unittest.TestCase):
         custom = custom[0]
         self.assertEqual('CUSTOM', custom.tag)
 
+    def return_test(self):
+        text = '''
+<RETURN custom="unknown">
+  <UNKNOWN>
+    <CUSTOM />
+  </UNKNOWN>
+</RETURN>'''
+        ret = Return.from_string(text)
+        tree = ret.to_lxml_element()
+        self.assertEqual('unknown', tree.get('custom'))
+        unknown = tree.findall('UNKNOWN')
+        self.assertEqual(1, len(unknown))
+        unknown = unknown[0]
+        custom = list(unknown)
+        self.assertEqual(1, len(custom))
+        custom = custom[0]
+        self.assertEqual('CUSTOM', custom.tag)
+
+    def security_list_test(self):
+        text = '''
+<SECURITY custom="unknown">
+  <CONDITION />
+  <RETURN />
+  <UNKNOWN>
+    <CUSTOM />
+  </UNKNOWN>
+</SECURITY>'''
+        slist = SecurityList.from_string(text)
+        tree = slist.to_lxml_element()
+        self.assertEqual('unknown', tree.get('custom'))
+        unknown = tree.findall('UNKNOWN')
+        self.assertEqual(1, len(unknown))
+        unknown = unknown[0]
+        custom = list(unknown)
+        self.assertEqual(1, len(custom))
+        custom = custom[0]
+        self.assertEqual('CUSTOM', custom.tag)
+
 if __name__ == '__main__':
     unittest.main()



commit b4f58841cb0d02634db8f3b85dc86583e6ff44e4
Author: Marek Aaron Sapota <maarons@gnu.org>
Date:   Sun Aug 16 17:49:05 2009 +0200

    Pycontrollib User tests.

diff --git a/misc/py_control_client/MyServer/pycontrollib/security.py b/misc/py_control_client/MyServer/pycontrollib/security.py
index f420b62..d965915 100644
--- a/misc/py_control_client/MyServer/pycontrollib/security.py
+++ b/misc/py_control_client/MyServer/pycontrollib/security.py
@@ -259,9 +259,15 @@ class User(SecurityElement):
         self.set_browse(browse)
         self.set_delete(delete)
         self.set_write(write)
-        self.custom_attributes = {}
+        self.custom_attrib = {}
         self.custom = []
 
+    def __eq__(self, other):
+        return isinstance(other, User) and self.name == other.name and \
+            self.password == other.password and self.read == other.read and \
+            self.execute == other.execute and self.browse == other.browse and \
+            self.delete == other.delete and self.write == other.write
+
     def set_name(self, name):
         self.name = name
 
@@ -305,21 +311,21 @@ class User(SecurityElement):
         return self.write
 
     def to_lxml_element(self):
-        root = etree.Element('PERMISSION')
+        root = etree.Element('USER')
         if self.name is not None:
             root.set('name', self.name)
         if self.password is not None:
             root.set('password', self.password)
         if self.read is not None:
-            root.set('READ', self.read)
+            root.set('READ', 'YES' if self.read else 'NO')
         if self.execute is not None:
-            root.set('EXECUTE', self.execute)
+            root.set('EXECUTE', 'YES' if self.execute else 'NO')
         if self.browse is not None:
-            root.set('BROWSE', self.browse)
+            root.set('BROWSE', 'YES' if self.browse else 'NO')
         if self.delete is not None:
-            root.set('DELETE', self.delete)
+            root.set('DELETE', 'YES' if self.delete else 'NO')
         if self.write is not None:
-            root.set('WRITE', self.write)
+            root.set('WRITE', 'YES' if self.write else 'NO')
         for key, value in self.custom_attrib.iteritems():
             root.set(key, value)
         for element in self.custom:
@@ -334,10 +340,20 @@ class User(SecurityElement):
         name = custom_attrib.pop('name', None)
         password = custom_attrib.pop('password', None)
         read = custom_attrib.pop('READ', None)
+        if read is not None:
+            read = read.upper() == 'YES'
         execute = custom_attrib.pop('EXECUTE', None)
+        if execute is not None:
+            execute = execute.upper() == 'YES'
         browse = custom_attrib.pop('BROWSE', None)
+        if browse is not None:
+            browse = browse.upper() == 'YES'
         delete = custom_attrib.pop('DELETE', None)
+        if delete is not None:
+            delete = delete.upper() == 'YES'
         write = custom_attrib.pop('WRITE', None)
+        if write is not None:
+            write = write.upper() == 'YES'
         custom = list(root)
         user = User(name, password, read, execute, browse,
                     delete, write)
@@ -348,7 +364,7 @@ class User(SecurityElement):
     @staticmethod
     def from_string(text):
         '''Factory to produce user element by parsing a string.'''
-        return Permission.from_lxml_element(etree.XML(text))
+        return User.from_lxml_element(etree.XML(text))
 
 class Return(SecurityElement):
     def __init__(self, value = None):
diff --git a/misc/py_control_client/MyServer/pycontrollib/test/security_test.py b/misc/py_control_client/MyServer/pycontrollib/test/security_test.py
index d8d819d..218c3d7 100644
--- a/misc/py_control_client/MyServer/pycontrollib/test/security_test.py
+++ b/misc/py_control_client/MyServer/pycontrollib/test/security_test.py
@@ -551,6 +551,322 @@ class PermissionTest(unittest.TestCase):
         self.assertRaises(AttributeError, Permission.from_lxml_element,
                           etree.XML(text))
 
+class UserTest(unittest.TestCase):
+    def test_creation(self):
+        user = User()
+        user = User('name')
+        user = User('name', 'password')
+        user = User('name', 'password', True)
+        user = User('name', 'password', True, True)
+        user = User('name', 'password', True, True, True)
+        user = User('name', 'password', True, True, True, True)
+        user = User('name', 'password', True, True, True, True, True)
+
+    def test_name(self):
+        user = User('name')
+        self.assertEqual('name', user.get_name())
+        user.set_name('other')
+        self.assertEqual('other', user.get_name())
+        user.set_name(None)
+        self.assertEqual(None, user.get_name())
+        user = User(name = 'name')
+        self.assertEqual('name', user.get_name())
+
+    def test_password(self):
+        user = User('name', 'password')
+        self.assertEqual('password', user.get_password())
+        user.set_password('other')
+        self.assertEqual('other', user.get_password())
+        user.set_password(None)
+        self.assertEqual(None, user.get_password())
+        user = User(password = 'password')
+        self.assertEqual('password', user.get_password())
+
+    def test_read(self):
+        user = User('name', 'password', True)
+        self.assertTrue(user.get_read())
+        user.set_read(False)
+        self.assertFalse(user.get_read())
+        user.set_read(None)
+        self.assertEqual(None, user.get_read())
+        user = User(read = True)
+        self.assertTrue(user.get_read())
+
+    def test_execute(self):
+        user = User('name', 'password', True, True)
+        self.assertTrue(user.get_execute())
+        user.set_execute(False)
+        self.assertFalse(user.get_execute())
+        user.set_execute(None)
+        self.assertEqual(None, user.get_execute())
+        user = User(execute = True)
+        self.assertTrue(user.get_execute())
+
+    def test_browse(self):
+        user = User('name', 'password', True, True, False)
+        self.assertFalse(user.get_browse())
+        user.set_browse(True)
+        self.assertTrue(user.get_browse())
+        user.set_browse(None)
+        self.assertEqual(None, user.get_browse())
+        user = User(browse = True)
+        self.assertTrue(user.get_browse())
+
+    def test_delete(self):
+        user = User('name', 'password', True, True, False, False)
+        self.assertFalse(user.get_delete())
+        user.set_delete(True)
+        self.assertTrue(user.get_delete())
+        user.set_delete(None)
+        self.assertEqual(None, user.get_delete())
+        user = User(delete = True)
+        self.assertTrue(user.get_delete())
+
+    def test_write(self):
+        user = User('name', 'password', True, True, False, False, False)
+        self.assertFalse(user.get_write())
+        user.set_write(True)
+        self.assertTrue(user.get_write())
+        user.set_write(None)
+        self.assertEqual(None, user.get_write())
+        user = User(write = True)
+        self.assertTrue(user.get_write())
+
+    def test_equality(self):
+        self.assertEqual(
+            User('name', 'password', False, False, False, False, False),
+            User('name', 'password', False, False, False, False, False))
+        self.assertNotEqual(
+            User('name', 'password', False, False, False, False, False),
+            User('other', 'password', False, False, False, False, False))
+        self.assertNotEqual(
+            User('name', 'password', False, False, False, False, False),
+            User('name', 'other', False, False, False, False, False))
+        self.assertNotEqual(
+            User('name', 'password', False, False, False, False, False),
+            User('name', 'password', True, False, False, False, False))
+        self.assertNotEqual(
+            User('name', 'password', False, False, False, False, False),
+            User('name', 'password', False, True, False, False, False))
+        self.assertNotEqual(
+            User('name', 'password', False, False, False, False, False),
+            User('name', 'password', False, False, True, False, False))
+        self.assertNotEqual(
+            User('name', 'password', False, False, False, False, False),
+            User('name', 'password', False, False, False, True, False))
+        self.assertNotEqual(
+            User('name', 'password', False, False, False, False, False),
+            User('name', 'password', False, False, False, False, True))
+        self.assertNotEqual(User(), 'another type')
+
+    def test_from_string(self):
+        text = '<USER />'
+        user = User.from_string(text)
+        right = User()
+        self.assertEqual(user, right)
+
+    def test_from_string_name(self):
+        text = '<USER name="name" />'
+        user = User.from_string(text)
+        right = User(name = 'name')
+        self.assertEqual(user, right)
+
+    def test_from_string_password(self):
+        text = '<USER password="pass" />'
+        user = User.from_string(text)
+        right = User(password = 'pass')
+        self.assertEqual(user, right)
+
+    def test_from_string_read(self):
+        text = '<USER READ="NO" />'
+        user = User.from_string(text)
+        right = User(read = False)
+        self.assertEqual(user, right)
+
+    def test_from_string_execute(self):
+        text = '<USER EXECUTE="NO" />'
+        user = User.from_string(text)
+        right = User(execute = False)
+        self.assertEqual(user, right)
+
+    def test_from_string_browse(self):
+        text = '<USER BROWSE="NO" />'
+        user = User.from_string(text)
+        right = User(browse = False)
+        self.assertEqual(user, right)
+
+    def test_from_string_delete(self):
+        text = '<USER DELETE="NO" />'
+        user = User.from_string(text)
+        right = User(delete = False)
+        self.assertEqual(user, right)
+
+    def test_from_string_write(self):
+        text = '<USER WRITE="NO" />'
+        user = User.from_string(text)
+        right = User(write = False)
+        self.assertEqual(user, right)
+
+    def test_from_string_full(self):
+        text = '''
+<USER name="name" password="pass" READ="NO" EXECUTE="YES" BROWSE="NO"
+      DELETE="YES" WRITE="NO" />'''
+        user = User.from_string(text)
+        right = User('name', 'pass', False, True, False, True, False)
+        self.assertEqual(user, right)
+
+    def test_from_lxml(self):
+        text = '<USER />'
+        user = User.from_lxml_element(etree.XML(text))
+        right = User()
+        self.assertEqual(user, right)
+
+    def test_from_lxml_name(self):
+        text = '<USER name="name" />'
+        user = User.from_lxml_element(etree.XML(text))
+        right = User(name = 'name')
+        self.assertEqual(user, right)
+
+    def test_from_lxml_password(self):
+        text = '<USER password="pass" />'
+        user = User.from_lxml_element(etree.XML(text))
+        right = User(password = 'pass')
+        self.assertEqual(user, right)
+
+    def test_from_lxml_read(self):
+        text = '<USER READ="NO" />'
+        user = User.from_lxml_element(etree.XML(text))
+        right = User(read = False)
+        self.assertEqual(user, right)
+
+    def test_from_lxml_execute(self):
+        text = '<USER EXECUTE="NO" />'
+        user = User.from_lxml_element(etree.XML(text))
+        right = User(execute = False)
+        self.assertEqual(user, right)
+
+    def test_from_lxml_browse(self):
+        text = '<USER BROWSE="NO" />'
+        user = User.from_lxml_element(etree.XML(text))
+        right = User(browse = False)
+        self.assertEqual(user, right)
+
+    def test_from_lxml_delete(self):
+        text = '<USER DELETE="NO" />'
+        user = User.from_lxml_element(etree.XML(text))
+        right = User(delete = False)
+        self.assertEqual(user, right)
+
+    def test_from_lxml_write(self):
+        text = '<USER WRITE="NO" />'
+        user = User.from_lxml_element(etree.XML(text))
+        right = User(write = False)
+        self.assertEqual(user, right)
+
+    def test_from_lxml_full(self):
+        text = '''
+<USER name="name" password="pass" READ="NO" EXECUTE="YES" BROWSE="NO"
+      DELETE="YES" WRITE="NO" />'''
+        user = User.from_lxml_element(etree.XML(text))
+        right = User('name', 'pass', False, True, False, True, False)
+        self.assertEqual(user, right)
+
+    def test_to_string(self):
+        user = User()
+        copy = User.from_string(str(user))
+        self.assertEqual(user, copy)
+
+    def test_to_string_name(self):
+        user = User(name = 'name')
+        copy = User.from_string(str(user))
+        self.assertEqual(user, copy)
+
+    def test_to_string_password(self):
+        user = User(password = 'pass')
+        copy = User.from_string(str(user))
+        self.assertEqual(user, copy)
+
+    def test_to_string_read(self):
+        user = User(read = True)
+        copy = User.from_string(str(user))
+        self.assertEqual(user, copy)
+
+    def test_to_string_execute(self):
+        user = User(execute = True)
+        copy = User.from_string(str(user))
+        self.assertEqual(user, copy)
+
+    def test_to_string_browse(self):
+        user = User(browse = True)
+        copy = User.from_string(str(user))
+        self.assertEqual(user, copy)
+
+    def test_to_string_delete(self):
+        user = User(delete = True)
+        copy = User.from_string(str(user))
+        self.assertEqual(user, copy)
+
+    def test_to_string_write(self):
+        user = User(write = True)
+        copy = User.from_string(str(user))
+        self.assertEqual(user, copy)
+
+    def test_to_string_full(self):
+        user = User('name', 'pass', True, False, True, False, True)
+        copy = User.from_string(str(user))
+        self.assertEqual(user, copy)
+
+    def test_to_lxml(self):
+        user = User()
+        copy = User.from_lxml_element(user.to_lxml_element())
+        self.assertEqual(user, copy)
+
+    def test_to_lxml_name(self):
+        user = User(name = 'name')
+        copy = User.from_lxml_element(user.to_lxml_element())
+        self.assertEqual(user, copy)
+
+    def test_to_lxml_password(self):
+        user = User(password = 'pass')
+        copy = User.from_lxml_element(user.to_lxml_element())
+        self.assertEqual(user, copy)
+
+    def test_to_lxml_read(self):
+        user = User(read = True)
+        copy = User.from_lxml_element(user.to_lxml_element())
+        self.assertEqual(user, copy)
+
+    def test_to_lxml_execute(self):
+        user = User(execute = True)
+        copy = User.from_lxml_element(user.to_lxml_element())
+        self.assertEqual(user, copy)
+
+    def test_to_lxml_browse(self):
+        user = User(browse = True)
+        copy = User.from_lxml_element(user.to_lxml_element())
+        self.assertEqual(user, copy)
+
+    def test_to_lxml_delete(self):
+        user = User(delete = True)
+        copy = User.from_lxml_element(user.to_lxml_element())
+        self.assertEqual(user, copy)
+
+    def test_to_lxml_write(self):
+        user = User(write = True)
+        copy = User.from_lxml_element(user.to_lxml_element())
+        self.assertEqual(user, copy)
+
+    def test_to_lxml_full(self):
+        user = User('name', 'pass', True, False, True, False, True)
+        copy = User.from_lxml_element(user.to_lxml_element())
+        self.assertEqual(user, copy)
+
+    def test_bad_root_tag(self):
+        text = '<ERROR />'
+        self.assertRaises(AttributeError, User.from_string, text)
+        self.assertRaises(AttributeError, User.from_lxml_element,
+                          etree.XML(text))
+
 class BadMarkupTest(unittest.TestCase):
     def condition_test(self):
         text = '''
@@ -589,5 +905,23 @@ class BadMarkupTest(unittest.TestCase):
         custom = custom[0]
         self.assertEqual('CUSTOM', custom.tag)
 
+    def user_test(self):
+        text = '''
+<USER custom="unknown">
+  <UNKNOWN>
+    <CUSTOM />
+  </UNKNOWN>
+</USER>'''
+        user = User.from_string(text)
+        tree = user.to_lxml_element()
+        self.assertEqual('unknown', tree.get('custom'))
+        unknown = tree.findall('UNKNOWN')
+        self.assertEqual(1, len(unknown))
+        unknown = unknown[0]
+        custom = list(unknown)
+        self.assertEqual(1, len(custom))
+        custom = custom[0]
+        self.assertEqual('CUSTOM', custom.tag)
+
 if __name__ == '__main__':
     unittest.main()



commit a809ac0d448bf74cc4e454fed0d17ce7707c41fb
Author: Marek Aaron Sapota <maarons@gnu.org>
Date:   Sun Aug 16 16:33:02 2009 +0200

    Pycontrollib Permission tests.

diff --git a/misc/py_control_client/MyServer/pycontrollib/security.py b/misc/py_control_client/MyServer/pycontrollib/security.py
index faa7fd3..f420b62 100644
--- a/misc/py_control_client/MyServer/pycontrollib/security.py
+++ b/misc/py_control_client/MyServer/pycontrollib/security.py
@@ -203,15 +203,15 @@ class Permission(SecurityElement):
     def to_lxml_element(self):
         root = etree.Element('PERMISSION')
         if self.read is not None:
-            root.set('READ', self.read)
+            root.set('READ', 'YES' if self.read else 'NO')
         if self.execute is not None:
-            root.set('EXECUTE', self.execute)
+            root.set('EXECUTE', 'YES' if self.execute else 'NO')
         if self.browse is not None:
-            root.set('BROWSE', self.browse)
+            root.set('BROWSE', 'YES' if self.browse else 'NO')
         if self.delete is not None:
-            root.set('DELETE', self.delete)
+            root.set('DELETE', 'YES' if self.delete else 'NO')
         if self.write is not None:
-            root.set('WRITE', self.write)
+            root.set('WRITE', 'YES' if self.write else 'NO')
         for key, value in self.custom_attrib.iteritems():
             root.set(key, value)
         for element in self.custom:
@@ -224,10 +224,20 @@ class Permission(SecurityElement):
             raise AttributeError('Expected PERMISSION tag.')
         custom_attrib = root.attrib
         read = custom_attrib.pop('READ', None)
+        if read is not None:
+            read = read.upper() == 'YES'
         execute = custom_attrib.pop('EXECUTE', None)
+        if execute is not None:
+            execute = execute.upper() == 'YES'
         browse = custom_attrib.pop('BROWSE', None)
+        if browse is not None:
+            browse = browse.upper() == 'YES'
         delete = custom_attrib.pop('DELETE', None)
+        if delete is not None:
+            delete = delete.upper() == 'YES'
         write = custom_attrib.pop('WRITE', None)
+        if write is not None:
+            write = write.upper() == 'YES'
         custom = list(root)
         permission = Permission(read, execute, browse, delete, write)
         permission.custom_attrib = custom_attrib
diff --git a/misc/py_control_client/MyServer/pycontrollib/test/security_test.py b/misc/py_control_client/MyServer/pycontrollib/test/security_test.py
index 214bfc6..d8d819d 100644
--- a/misc/py_control_client/MyServer/pycontrollib/test/security_test.py
+++ b/misc/py_control_client/MyServer/pycontrollib/test/security_test.py
@@ -309,6 +309,248 @@ class ConditionTest(unittest.TestCase):
         self.assertRaises(AttributeError, Condition.from_lxml_element,
                           etree.XML(text))
 
+class PermissionTest(unittest.TestCase):
+    def test_creation(self):
+        permission = Permission()
+        permission = Permission(True)
+        permission = Permission(True, True)
+        permission = Permission(True, True, True)
+        permission = Permission(True, True, True, True)
+        permission = Permission(True, True, True, True, True)
+
+    def test_read(self):
+        permission = Permission(True)
+        self.assertTrue(permission.get_read())
+        permission.set_read(False)
+        self.assertFalse(permission.get_read())
+        permission.set_read(None)
+        self.assertEqual(None, permission.get_read())
+        permission = Permission(read = True)
+        self.assertTrue(permission.get_read())
+
+    def test_execute(self):
+        permission = Permission(True, True)
+        self.assertTrue(permission.get_execute())
+        permission.set_execute(False)
+        self.assertFalse(permission.get_execute())
+        permission.set_execute(None)
+        self.assertEqual(None, permission.get_execute())
+        permission = Permission(execute = True)
+        self.assertTrue(permission.get_execute())
+
+    def test_browse(self):
+        permission = Permission(True, True, False)
+        self.assertFalse(permission.get_browse())
+        permission.set_browse(True)
+        self.assertTrue(permission.get_browse())
+        permission.set_browse(None)
+        self.assertEqual(None, permission.get_browse())
+        permission = Permission(browse = True)
+        self.assertTrue(permission.get_browse())
+
+    def test_delete(self):
+        permission = Permission(True, True, False, False)
+        self.assertFalse(permission.get_delete())
+        permission.set_delete(True)
+        self.assertTrue(permission.get_delete())
+        permission.set_delete(None)
+        self.assertEqual(None, permission.get_delete())
+        permission = Permission(delete = True)
+        self.assertTrue(permission.get_delete())
+
+    def test_write(self):
+        permission = Permission(True, True, False, False, False)
+        self.assertFalse(permission.get_write())
+        permission.set_write(True)
+        self.assertTrue(permission.get_write())
+        permission.set_write(None)
+        self.assertEqual(None, permission.get_write())
+        permission = Permission(write = True)
+        self.assertTrue(permission.get_write())
+
+    def test_equality(self):
+        self.assertEqual(
+            Permission(False, False, False, False, False),
+            Permission(False, False, False, False, False))
+        self.assertNotEqual(
+            Permission(False, False, False, False, False),
+            Permission(True, False, False, False, False))
+        self.assertNotEqual(
+            Permission(False, False, False, False, False),
+            Permission(False, True, False, False, False))
+        self.assertNotEqual(
+            Permission(False, False, False, False, False),
+            Permission(False, False, True, False, False))
+        self.assertNotEqual(
+            Permission(False, False, False, False, False),
+            Permission(False, False, False, True, False))
+        self.assertNotEqual(
+            Permission(False, False, False, False, False),
+            Permission(False, False, False, False, True))
+        self.assertNotEqual(Permission(), 'another type')
+
+    def test_from_string(self):
+        text = '<PERMISSION />'
+        permission = Permission.from_string(text)
+        right = Permission()
+        self.assertEqual(permission, right)
+
+    def test_from_string_read(self):
+        text = '<PERMISSION READ="NO" />'
+        permission = Permission.from_string(text)
+        right = Permission(read = False)
+        self.assertEqual(permission, right)
+
+    def test_from_string_execute(self):
+        text = '<PERMISSION EXECUTE="NO" />'
+        permission = Permission.from_string(text)
+        right = Permission(execute = False)
+        self.assertEqual(permission, right)
+
+    def test_from_string_browse(self):
+        text = '<PERMISSION BROWSE="NO" />'
+        permission = Permission.from_string(text)
+        right = Permission(browse = False)
+        self.assertEqual(permission, right)
+
+    def test_from_string_delete(self):
+        text = '<PERMISSION DELETE="NO" />'
+        permission = Permission.from_string(text)
+        right = Permission(delete = False)
+        self.assertEqual(permission, right)
+
+    def test_from_string_write(self):
+        text = '<PERMISSION WRITE="NO" />'
+        permission = Permission.from_string(text)
+        right = Permission(write = False)
+        self.assertEqual(permission, right)
+
+    def test_from_string_full(self):
+        text = '''
+<PERMISSION READ="NO" EXECUTE="YES" BROWSE="NO" DELETE="YES" WRITE="NO" />'''
+        permission = Permission.from_string(text)
+        right = Permission(False, True, False, True, False)
+        self.assertEqual(permission, right)
+
+    def test_from_lxml(self):
+        text = '<PERMISSION />'
+        permission = Permission.from_lxml_element(etree.XML(text))
+        right = Permission()
+        self.assertEqual(permission, right)
+
+    def test_from_lxml_read(self):
+        text = '<PERMISSION READ="NO" />'
+        permission = Permission.from_lxml_element(etree.XML(text))
+        right = Permission(read = False)
+        self.assertEqual(permission, right)
+
+    def test_from_lxml_execute(self):
+        text = '<PERMISSION EXECUTE="NO" />'
+        permission = Permission.from_lxml_element(etree.XML(text))
+        right = Permission(execute = False)
+        self.assertEqual(permission, right)
+
+    def test_from_lxml_browse(self):
+        text = '<PERMISSION BROWSE="NO" />'
+        permission = Permission.from_lxml_element(etree.XML(text))
+        right = Permission(browse = False)
+        self.assertEqual(permission, right)
+
+    def test_from_lxml_delete(self):
+        text = '<PERMISSION DELETE="NO" />'
+        permission = Permission.from_lxml_element(etree.XML(text))
+        right = Permission(delete = False)
+        self.assertEqual(permission, right)
+
+    def test_from_lxml_write(self):
+        text = '<PERMISSION WRITE="NO" />'
+        permission = Permission.from_lxml_element(etree.XML(text))
+        right = Permission(write = False)
+        self.assertEqual(permission, right)
+
+    def test_from_lxml_full(self):
+        text = '''
+<PERMISSION READ="NO" EXECUTE="YES" BROWSE="NO" DELETE="YES" WRITE="NO" />'''
+        permission = Permission.from_lxml_element(etree.XML(text))
+        right = Permission(False, True, False, True, False)
+        self.assertEqual(permission, right)
+
+    def test_to_string(self):
+        permission = Permission()
+        copy = Permission.from_string(str(permission))
+        self.assertEqual(permission, copy)
+
+    def test_to_string_read(self):
+        permission = Permission(read = True)
+        copy = Permission.from_string(str(permission))
+        self.assertEqual(permission, copy)
+
+    def test_to_string_execute(self):
+        permission = Permission(execute = True)
+        copy = Permission.from_string(str(permission))
+        self.assertEqual(permission, copy)
+
+    def test_to_string_browse(self):
+        permission = Permission(browse = True)
+        copy = Permission.from_string(str(permission))
+        self.assertEqual(permission, copy)
+
+    def test_to_string_delete(self):
+        permission = Permission(delete = True)
+        copy = Permission.from_string(str(permission))
+        self.assertEqual(permission, copy)
+
+    def test_to_string_write(self):
+        permission = Permission(write = True)
+        copy = Permission.from_string(str(permission))
+        self.assertEqual(permission, copy)
+
+    def test_to_string_full(self):
+        permission = Permission(True, False, True, False, True)
+        copy = Permission.from_string(str(permission))
+        self.assertEqual(permission, copy)
+
+    def test_to_lxml(self):
+        permission = Permission()
+        copy = Permission.from_lxml_element(permission.to_lxml_element())
+        self.assertEqual(permission, copy)
+
+    def test_to_lxml_read(self):
+        permission = Permission(read = True)
+        copy = Permission.from_lxml_element(permission.to_lxml_element())
+        self.assertEqual(permission, copy)
+
+    def test_to_lxml_execute(self):
+        permission = Permission(execute = True)
+        copy = Permission.from_lxml_element(permission.to_lxml_element())
+        self.assertEqual(permission, copy)
+
+    def test_to_lxml_browse(self):
+        permission = Permission(browse = True)
+        copy = Permission.from_lxml_element(permission.to_lxml_element())
+        self.assertEqual(permission, copy)
+
+    def test_to_lxml_delete(self):
+        permission = Permission(delete = True)
+        copy = Permission.from_lxml_element(permission.to_lxml_element())
+        self.assertEqual(permission, copy)
+
+    def test_to_lxml_write(self):
+        permission = Permission(write = True)
+        copy = Permission.from_lxml_element(permission.to_lxml_element())
+        self.assertEqual(permission, copy)
+
+    def test_to_lxml_full(self):
+        permission = Permission(True, False, True, False, True)
+        copy = Permission.from_lxml_element(permission.to_lxml_element())
+        self.assertEqual(permission, copy)
+
+    def test_bad_root_tag(self):
+        text = '<ERROR />'
+        self.assertRaises(AttributeError, Permission.from_string, text)
+        self.assertRaises(AttributeError, Permission.from_lxml_element,
+                          etree.XML(text))
+
 class BadMarkupTest(unittest.TestCase):
     def condition_test(self):
         text = '''
@@ -329,5 +571,23 @@ class BadMarkupTest(unittest.TestCase):
         custom = custom[0]
         self.assertEqual('CUSTOM', custom.tag)
 
+    def permission_test(self):
+        text = '''
+<PERMISSION custom="unknown">
+  <UNKNOWN>
+    <CUSTOM />
+  </UNKNOWN>
+</CONDITION>'''
+        permission = Permission.from_string(text)
+        tree = permission.to_lxml_element()
+        self.assertEqual('unknown', tree.get('custom'))
+        unknown = tree.findall('UNKNOWN')
+        self.assertEqual(1, len(unknown))
+        unknown = unknown[0]
+        custom = list(unknown)
+        self.assertEqual(1, len(custom))
+        custom = custom[0]
+        self.assertEqual('CUSTOM', custom.tag)
+
 if __name__ == '__main__':
     unittest.main()



commit 4d8bcd32cc36b1ffc31120e0208b96081b52795f
Author: Marek Aaron Sapota <maarons@gnu.org>
Date:   Sun Aug 16 13:36:27 2009 +0200

    Pycontrollib Condition tests.

diff --git a/misc/py_control_client/MyServer/pycontrollib/definition.py b/misc/py_control_client/MyServer/pycontrollib/definition.py
index bce43b9..b8e5b03 100644
--- a/misc/py_control_client/MyServer/pycontrollib/definition.py
+++ b/misc/py_control_client/MyServer/pycontrollib/definition.py
@@ -134,9 +134,9 @@ class DefinitionTree(Definition):
         attributes. values is expected to be iterable.'''
         Definition.__init__(self, name, attributes)
         self.definitions = []
+        self.custom = [] # list of children not being definitions
         for definition in definitions:
             self.add_definition(definition)
-        self.custom = [] # list of children not being definitions
 
     def __eq__(self, other):
         return isinstance(other, DefinitionTree) and \
diff --git a/misc/py_control_client/MyServer/pycontrollib/security.py b/misc/py_control_client/MyServer/pycontrollib/security.py
index 1cd1141..faa7fd3 100644
--- a/misc/py_control_client/MyServer/pycontrollib/security.py
+++ b/misc/py_control_client/MyServer/pycontrollib/security.py
@@ -22,6 +22,8 @@ from definition import Definition
 class SecurityElement():
     @staticmethod
     def from_lxml_element(root):
+        if root.tag == 'USER':
+            return User.from_lxml_element(root)
         if root.tag == 'CONDITION':
             return Condition.from_lxml_element(root)
         elif root.tag == 'PERMISSION':
@@ -49,19 +51,25 @@ class Condition(SecurityElement):
         self.set_value(value)
         self.set_reverse(reverse)
         self.set_regex(regex)
-        self.custom_attributes = {}
+        self.custom_attrib = {}
         self.custom = []
         self.sub_elements = []
         for element in sub_elements:
             self.add_sub_element(element)
 
+    def __eq__(self, other):
+        return isinstance(other, Condition) and self.name == other.name and \
+            self.value == other.value and self.reverse == other.reverse and \
+            self.regex == other.regex and \
+            self.sub_elements == other.sub_elements
+
     def set_name(self, name):
         self.name = name
 
     def get_name(self):
         return self.name
 
-    def set_value(value):
+    def set_value(self, value):
         self.value = value
 
     def get_value(self):
@@ -73,16 +81,19 @@ class Condition(SecurityElement):
     def get_reverse(self):
         return self.reverse
 
-    def set_regex(self):
+    def set_regex(self, regex):
         self.regex = regex
 
     def get_regex(self):
         return self.regex
 
-    def add_sub_element(self, element):
+    def add_sub_element(self, element, index = None):
         if isinstance(element, Definition) or \
                 isinstance(element, SecurityElement):
-            self.sub_elements.append(element)
+            if index is None:
+                self.sub_elements.append(element)
+            else:
+                self.sub_elements.insert(index, element)
         else:
             self.custom.append(element)
 
@@ -92,6 +103,9 @@ class Condition(SecurityElement):
     def get_sub_element(self, index):
         return self.sub_elements[index]
 
+    def remove_sub_element(self, index):
+        self.sub_elements.pop(index)
+
     def to_lxml_element(self):
         root = etree.Element('CONDITION')
         if self.name is not None:
@@ -101,7 +115,7 @@ class Condition(SecurityElement):
         if self.reverse is not None:
             root.set('not', 'yes' if self.reverse else 'no')
         if self.regex is not None:
-            root.set('regex', 'yes' if self.reverse else 'no')
+            root.set('regex', 'yes' if self.regex else 'no')
         for key, value in self.custom_attrib.iteritems():
             root.set(key, value)
         for element in self.sub_elements:
@@ -118,7 +132,11 @@ class Condition(SecurityElement):
         name = custom_attrib.pop('name', None)
         value = custom_attrib.pop('value', None)
         reverse = custom_attrib.pop('not', None)
+        if reverse is not None:
+            reverse = reverse.upper() == 'YES'
         regex = custom_attrib.pop('regex', None)
+        if regex is not None:
+            regex = regex.upper() == 'YES'
         custom = []
         sub_elements = []
         for child in list(root):
@@ -144,9 +162,14 @@ class Permission(SecurityElement):
         self.set_browse(browse)
         self.set_delete(delete)
         self.set_write(write)
-        self.custom_attributes = {}
+        self.custom_attrib = {}
         self.custom = []
 
+    def __eq__(self, other):
+        return isinstance(other, Permission) and self.read == other.read and \
+            self.execute == other.execute and self.browse == other.browse and \
+            self.delete == other.delete and self.write == other.write
+
     def set_read(self, read):
         self.read = read
 
@@ -306,11 +329,11 @@ class User(SecurityElement):
         delete = custom_attrib.pop('DELETE', None)
         write = custom_attrib.pop('WRITE', None)
         custom = list(root)
-        permission = Permission(name, password, read, execute, browse,
-                                delete, write)
-        permission.custom_attrib = custom_attrib
-        permission.custom = custom
-        return permission
+        user = User(name, password, read, execute, browse,
+                    delete, write)
+        user.custom_attrib = custom_attrib
+        user.custom = custom
+        return user
 
     @staticmethod
     def from_string(text):
@@ -320,9 +343,12 @@ class User(SecurityElement):
 class Return(SecurityElement):
     def __init__(self, value = None):
         self.set_value(value)
-        self.custom_attributes = {}
+        self.custom_attrib = {}
         self.custom = []
 
+    def __eq__(self, other):
+        return isinstance(other, Return) and self.value == other.value
+
     def set_value(self, value):
         self.value = value
 
@@ -384,7 +410,7 @@ class SecurityList():
         for element in list(root):
             try:
                 elements.append(SecurityElement.from_lxml_element(element))
-            else:
+            except:
                 custom.append(element)
         security_list = SecurityList(elements)
         security_list.custom = custom
diff --git a/misc/py_control_client/MyServer/pycontrollib/test/Makefile b/misc/py_control_client/MyServer/pycontrollib/test/Makefile
index 5a784d4..7c7179e 100644
--- a/misc/py_control_client/MyServer/pycontrollib/test/Makefile
+++ b/misc/py_control_client/MyServer/pycontrollib/test/Makefile
@@ -16,9 +16,11 @@
 PYTHON=/usr/bin/python
 PYTHONPATH:=$(shell dirname `pwd`):${PYTHONPATH}
 
-.PHONY: test log_test definition_test mimetypes_test vhost_test config_test
+.PHONY: test log_test definition_test mimetypes_test vhost_test config_test \
+	security_test
 
-test: log_test definition_test mimetypes_test vhost_test config_test
+test: log_test definition_test mimetypes_test vhost_test config_test \
+	security_test
 
 log_test:
 	-PYTHONPATH=${PYTHONPATH} ${PYTHON} log_test.py
@@ -35,6 +37,9 @@ vhost_test:
 config_test:
 	-PYTHONPATH=${PYTHONPATH} ${PYTHON} config_test.py
 
+security_test:
+	-PYTHONPATH=${PYTHONPATH} ${PYTHON} security_test.py
+
 .PHONY: clean
 clean:
 	rm *.py[co]
diff --git a/misc/py_control_client/MyServer/pycontrollib/test/security_test.py b/misc/py_control_client/MyServer/pycontrollib/test/security_test.py
new file mode 100644
index 0000000..214bfc6
--- /dev/null
+++ b/misc/py_control_client/MyServer/pycontrollib/test/security_test.py
@@ -0,0 +1,333 @@
+# -*- coding: utf-8 -*-
+'''
+MyServer
+Copyright (C) 2009 Free Software Foundation, Inc.
+This program 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 3 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program.  If not, see <http://www.gnu.org/licenses/>.
+'''
+
+from security import SecurityElement, User, Condition, Permission, Return, SecurityList
+from definition import Definition
+from lxml import etree
+import unittest
+
+class SecurityElementTest(unittest.TestCase):
+    def test_creation(self):
+        element = SecurityElement()
+
+    def test_from_string(self):
+        text = '<USER />'
+        element = SecurityElement.from_string(text)
+        self.assertTrue(isinstance(element, User))
+        text = '<CONDITION />'
+        element = SecurityElement.from_string(text)
+        self.assertTrue(isinstance(element, Condition))
+        text = '<PERMISSION />'
+        element = SecurityElement.from_string(text)
+        self.assertTrue(isinstance(element, Permission))
+        text = '<RETURN />'
+        element = SecurityElement.from_string(text)
+        self.assertTrue(isinstance(element, Return))
+        text = '<DEFINE />'
+        element = SecurityElement.from_string(text)
+        self.assertTrue(isinstance(element, Definition))
+
+class ConditionTest(unittest.TestCase):
+    def test_creation(self):
+        condition = Condition()
+        condition = Condition('name')
+        condition = Condition('name', 'value')
+        condition = Condition('name', 'value', False)
+        condition = Condition('name', 'value', False, False)
+        condition = Condition('name', 'value', False, False, [])
+
+    def test_name(self):
+        condition = Condition('name1')
+        self.assertEqual('name1', condition.get_name())
+        condition.set_name('name2')
+        self.assertEqual('name2', condition.get_name())
+        condition.set_name(None)
+        self.assertEqual(None, condition.get_name())
+        condition = Condition(name = 'name1')
+        self.assertEqual('name1', condition.get_name())
+
+    def test_value(self):
+        condition = Condition('name1', 'value1')
+        self.assertEqual('value1', condition.get_value())
+        condition.set_value('value2')
+        self.assertEqual('value2', condition.get_value())
+        condition.set_value(None)
+        self.assertEqual(None, condition.get_value())
+        condition = Condition(value = 'value1')
+        self.assertEqual('value1', condition.get_value())
+
+    def test_reverse(self):
+        condition = Condition('name1', 'value1', False)
+        self.assertFalse(condition.get_reverse())
+        condition.set_reverse(True)
+        self.assertTrue(condition.get_reverse())
+        condition.set_reverse(None)
+        self.assertEqual(None, condition.get_reverse())
+        condition = Condition(reverse = True)
+        self.assertTrue(condition.get_reverse())
+
+    def test_regex(self):
+        condition = Condition('name1', 'value1', False, False)
+        self.assertFalse(condition.get_regex())
+        condition.set_regex(True)
+        self.assertTrue(condition.get_regex())
+        condition.set_regex(None)
+        self.assertEqual(None, condition.get_regex())
+        condition = Condition(regex = True)
+        self.assertTrue(condition.get_regex())
+
+    def test_sub_elements(self):
+        element_0 = Condition()
+        element_1 = Return()
+        condition = Condition()
+        self.assertEqual(0, len(condition.get_sub_elements()))
+        condition.add_sub_element(element_0)
+        self.assertEqual(1, len(condition.get_sub_elements()))
+        self.assertEqual(element_0, condition.get_sub_element(0))
+        condition.add_sub_element(element_1)
+        self.assertEqual(2, len(condition.get_sub_elements()))
+        self.assertEqual(element_0, condition.get_sub_element(0))
+        self.assertEqual(element_1, condition.get_sub_element(1))
+        condition.remove_sub_element(0)
+        self.assertEqual(1, len(condition.get_sub_elements()))
+        self.assertEqual(element_1, condition.get_sub_element(0))
+        condition.add_sub_element(element_0, 0)
+        self.assertEqual(2, len(condition.get_sub_elements()))
+        self.assertEqual(element_0, condition.get_sub_element(0))
+        self.assertEqual(element_1, condition.get_sub_element(1))
+        self.assertRaises(IndexError, condition.get_sub_element, 2)
+        condition = Condition(sub_elements = [element_0, element_1])
+        self.assertEqual(2, len(condition.get_sub_elements()))
+        self.assertEqual(element_0, condition.get_sub_element(0))
+        self.assertEqual(element_1, condition.get_sub_element(1))
+
+    def test_equality(self):
+        self.assertEqual(
+            Condition('name1', 'value1', False, False, []),
+            Condition('name1', 'value1', False, False, []))
+        self.assertNotEqual(
+            Condition('name1', 'value1', False, False, []),
+            Condition('name2', 'value1', False, False, []))
+        self.assertNotEqual(
+            Condition('name1', 'value1', False, False, []),
+            Condition('name1', 'value2', False, False, []))
+        self.assertNotEqual(
+            Condition('name1', 'value1', False, False, []),
+            Condition('name1', 'value1', True, False, []))
+        self.assertNotEqual(
+            Condition('name1', 'value1', False, False, []),
+            Condition('name1', 'value1', False, True, []))
+        self.assertNotEqual(
+            Condition('name1', 'value1', False, False, []),
+            Condition('name1', 'value1', False, False, [Condition()]))
+        self.assertNotEqual(Condition(), 'another type')
+
+    def test_from_string(self):
+        text = '<CONDITION />'
+        condition = Condition.from_string(text)
+        right = Condition()
+        self.assertEqual(condition, right)
+
+    def test_from_string_name(self):
+        text = '<CONDITION name="test" />'
+        condition = Condition.from_string(text)
+        right = Condition(name = 'test')
+        self.assertEqual(condition, right)
+
+    def test_from_string_value(self):
+        text = '<CONDITION value="test" />'
+        condition = Condition.from_string(text)
+        right = Condition(value = 'test')
+        self.assertEqual(condition, right)
+
+    def test_from_string_reverse(self):
+        text = '<CONDITION not="yes" />'
+        condition = Condition.from_string(text)
+        right = Condition(reverse = True)
+        self.assertEqual(condition, right)
+
+    def test_from_string_regex(self):
+        text = '<CONDITION regex="yes" />'
+        condition = Condition.from_string(text)
+        right = Condition(regex = True)
+        self.assertEqual(condition, right)
+
+    def test_from_string_sub_elements(self):
+        text = '<CONDITION><PERMISSION /><RETURN /></CONDITION>'
+        condition = Condition.from_string(text)
+        right = Condition(sub_elements = [Permission(), Return()])
+        self.assertEqual(condition, right)
+
+    def test_from_string_full(self):
+        text = '''
+<CONDITION name="name" value="value" not="yes" regex="yes">
+  <PERMISSION />
+  <RETURN />
+</CONDITION>'''
+        condition = Condition.from_string(text)
+        right = Condition('name', 'value', True, True,
+                          [Permission(), Return()])
+        self.assertEqual(condition, right)
+
+    def test_from_lxml(self):
+        text = '<CONDITION />'
+        condition = Condition.from_lxml_element(etree.XML(text))
+        right = Condition()
+        self.assertEqual(condition, right)
+
+    def test_from_lxml_name(self):
+        text = '<CONDITION name="test" />'
+        condition = Condition.from_lxml_element(etree.XML(text))
+        right = Condition(name = 'test')
+        self.assertEqual(condition, right)
+
+    def test_from_lxml_value(self):
+        text = '<CONDITION value="test" />'
+        condition = Condition.from_lxml_element(etree.XML(text))
+        right = Condition(value = 'test')
+        self.assertEqual(condition, right)
+
+    def test_from_lxml_reverse(self):
+        text = '<CONDITION not="yes" />'
+        condition = Condition.from_lxml_element(etree.XML(text))
+        right = Condition(reverse = True)
+        self.assertEqual(condition, right)
+
+    def test_from_lxml_regex(self):
+        text = '<CONDITION regex="yes" />'
+        condition = Condition.from_lxml_element(etree.XML(text))
+        right = Condition(regex = True)
+        self.assertEqual(condition, right)
+
+    def test_from_lxml_sub_elements(self):
+        text = '<CONDITION><PERMISSION /><RETURN /></CONDITION>'
+        condition = Condition.from_lxml_element(etree.XML(text))
+        right = Condition(sub_elements = [Permission(), Return()])
+        self.assertEqual(condition, right)
+
+    def test_from_lxml_full(self):
+        text = '''
+<CONDITION name="name" value="value" not="yes" regex="yes">
+  <PERMISSION />
+  <RETURN />
+</CONDITION>'''
+        condition = Condition.from_lxml_element(etree.XML(text))
+        right = Condition('name', 'value', True, True,
+                          [Permission(), Return()])
+        self.assertEqual(condition, right)
+
+    def test_to_string(self):
+        condition = Condition()
+        copy = Condition.from_string(str(condition))
+        self.assertEqual(condition, copy)
+
+    def test_to_string_name(self):
+        condition = Condition(name = 'name')
+        copy = Condition.from_string(str(condition))
+        self.assertEqual(condition, copy)
+
+    def test_to_string_value(self):
+        condition = Condition(value = 'value')
+        copy = Condition.from_string(str(condition))
+        self.assertEqual(condition, copy)
+
+    def test_to_string_reverse(self):
+        condition = Condition(reverse = True)
+        copy = Condition.from_string(str(condition))
+        self.assertEqual(condition, copy)
+
+    def test_to_string_regex(self):
+        condition = Condition(regex = True)
+        copy = Condition.from_string(str(condition))
+        self.assertEqual(condition, copy)
+
+    def test_to_string_sub_elements(self):
+        condition = Condition(sub_elements = [Permission(), Return()])
+        copy = Condition.from_string(str(condition))
+        self.assertEqual(condition, copy)
+
+    def test_to_string_full(self):
+        condition = Condition('name', 'value', True, True,
+                              [Permission(), Return()])
+        copy = Condition.from_string(str(condition))
+        self.assertEqual(condition, copy)
+
+    def test_to_lxml(self):
+        condition = Condition()
+        copy = Condition.from_lxml_element(condition.to_lxml_element())
+        self.assertEqual(condition, copy)
+
+    def test_to_lxml_name(self):
+        condition = Condition(name = 'name')
+        copy = Condition.from_lxml_element(condition.to_lxml_element())
+        self.assertEqual(condition, copy)
+
+    def test_to_lxml_value(self):
+        condition = Condition(value = 'value')
+        copy = Condition.from_lxml_element(condition.to_lxml_element())
+        self.assertEqual(condition, copy)
+
+    def test_to_lxml_reverse(self):
+        condition = Condition(reverse = True)
+        copy = Condition.from_lxml_element(condition.to_lxml_element())
+        self.assertEqual(condition, copy)
+
+    def test_to_lxml_regex(self):
+        condition = Condition(regex = True)
+        copy = Condition.from_lxml_element(condition.to_lxml_element())
+        self.assertEqual(condition, copy)
+
+    def test_to_lxml_sub_elements(self):
+        condition = Condition(sub_elements = [Permission(), Return()])
+        copy = Condition.from_lxml_element(condition.to_lxml_element())
+        self.assertEqual(condition, copy)
+
+    def test_to_lxml_full(self):
+        condition = Condition('name', 'value', True, True,
+                              [Permission(), Return()])
+        copy = Condition.from_lxml_element(condition.to_lxml_element())
+        self.assertEqual(condition, copy)
+
+    def test_bad_root_tag(self):
+        text = '<ERROR />'
+        self.assertRaises(AttributeError, Condition.from_string, text)
+        self.assertRaises(AttributeError, Condition.from_lxml_element,
+                          etree.XML(text))
+
+class BadMarkupTest(unittest.TestCase):
+    def condition_test(self):
+        text = '''
+<CONDITION custom="unknown">
+  <PERMISSION />
+  <UNKNOWN>
+    <CUSTOM />
+  </UNKNOWN>
+</CONDITION>'''
+        condition = Condition.from_string(text)
+        tree = condition.to_lxml_element()
+        self.assertEqual('unknown', tree.get('custom'))
+        unknown = tree.findall('UNKNOWN')
+        self.assertEqual(1, len(unknown))
+        unknown = unknown[0]
+        custom = list(unknown)
+        self.assertEqual(1, len(custom))
+        custom = custom[0]
+        self.assertEqual('CUSTOM', custom.tag)
+
+if __name__ == '__main__':
+    unittest.main()



commit f4ef782aa3024edf332fd0ec8f25dcfc4a5c127f
Author: Marek Aaron Sapota <maarons@gnu.org>
Date:   Sat Aug 15 22:26:28 2009 +0200

    Control lib implements security files.

diff --git a/misc/py_control_client/MyServer/pycontrollib/security.py b/misc/py_control_client/MyServer/pycontrollib/security.py
index 7b9b05b..1cd1141 100644
--- a/misc/py_control_client/MyServer/pycontrollib/security.py
+++ b/misc/py_control_client/MyServer/pycontrollib/security.py
@@ -20,7 +20,27 @@ from lxml import etree
 from definition import Definition
 
 class SecurityElement():
-    pass
+    @staticmethod
+    def from_lxml_element(root):
+        if root.tag == 'CONDITION':
+            return Condition.from_lxml_element(root)
+        elif root.tag == 'PERMISSION':
+            return Permission.from_lxml_element(root)
+        elif root.tag == 'RETURN':
+            return Return.from_lxml_element(root)
+        elif root.tag == 'DEFINE':
+            return Definition.from_lxml_element(root)
+        else:
+            raise AttributeError(
+                '{0} is not allowed in security files'.format(root.tag))
+
+    @staticmethod
+    def from_string(text):
+        '''Factory to produce security element by parsing a string.'''
+        return SecurityElement.from_lxml_element(etree.XML(text))
+
+    def __str__(self):
+        return etree.tostring(self.to_lxml_element(), pretty_print = True)
 
 class Condition(SecurityElement):
     def __init__(self, name = None, value = None, reverse = None, regex = None,
@@ -113,14 +133,278 @@ class Condition(SecurityElement):
 
     @staticmethod
     def from_string(text):
-        '''Factory to produce definition tree by parsing a string.'''
-        return DefinitionTree.from_lxml_element(etree.XML(text))
-
-    def __str__(self):
-        return etree.tostring(self.to_lxml_element(), pretty_print = True)
+        '''Factory to produce condition element by parsing a string.'''
+        return Condition.from_lxml_element(etree.XML(text))
 
 class Permission(SecurityElement):
-    pass
+    def __init__(self, read = None, execute = None, browse = None,
+                 delete = None, write = None):
+        self.set_read(read)
+        self.set_execute(execute)
+        self.set_browse(browse)
+        self.set_delete(delete)
+        self.set_write(write)
+        self.custom_attributes = {}
+        self.custom = []
+
+    def set_read(self, read):
+        self.read = read
+
+    def get_read(self):
+        return self.read
+
+    def set_execute(self, execute):
+        self.execute = execute
+
+    def get_execute(self):
+        return self.execute
+
+    def set_browse(self, browse):
+        self.browse = browse
+
+    def get_browse(self):
+        return self.browse
+
+    def set_delete(self, delete):
+        self.delete = delete
+
+    def get_delete(self):
+        return self.delete
+
+    def set_write(self, write):
+        self.write = write
+
+    def get_write(self):
+        return self.write
+
+    def to_lxml_element(self):
+        root = etree.Element('PERMISSION')
+        if self.read is not None:
+            root.set('READ', self.read)
+        if self.execute is not None:
+            root.set('EXECUTE', self.execute)
+        if self.browse is not None:
+            root.set('BROWSE', self.browse)
+        if self.delete is not None:
+            root.set('DELETE', self.delete)
+        if self.write is not None:
+            root.set('WRITE', self.write)
+        for key, value in self.custom_attrib.iteritems():
+            root.set(key, value)
+        for element in self.custom:
+            root.append(element)
+        return root
+
+    @staticmethod
+    def from_lxml_element(root):
+        if root.tag != 'PERMISSION':
+            raise AttributeError('Expected PERMISSION tag.')
+        custom_attrib = root.attrib
+        read = custom_attrib.pop('READ', None)
+        execute = custom_attrib.pop('EXECUTE', None)
+        browse = custom_attrib.pop('BROWSE', None)
+        delete = custom_attrib.pop('DELETE', None)
+        write = custom_attrib.pop('WRITE', None)
+        custom = list(root)
+        permission = Permission(read, execute, browse, delete, write)
+        permission.custom_attrib = custom_attrib
+        permission.custom = custom
+        return permission
+
+    @staticmethod
+    def from_string(text):
+        '''Factory to produce permission element by parsing a string.'''
+        return Permission.from_lxml_element(etree.XML(text))
+
+class User(SecurityElement):
+    def __init__(self, name = None, password = None, read = None,
+                 execute = None, browse = None, delete = None, write = None):
+        self.set_name(name)
+        self.set_password(password)
+        self.set_read(read)
+        self.set_execute(execute)
+        self.set_browse(browse)
+        self.set_delete(delete)
+        self.set_write(write)
+        self.custom_attributes = {}
+        self.custom = []
+
+    def set_name(self, name):
+        self.name = name
+
+    def get_name(self):
+        return self.name
+
+    def set_password(self, password):
+        self.password = password
+
+    def get_password(self):
+        return self.password
+
+    def set_read(self, read):
+        self.read = read
+
+    def get_read(self):
+        return self.read
+
+    def set_execute(self, execute):
+        self.execute = execute
+
+    def get_execute(self):
+        return self.execute
+
+    def set_browse(self, browse):
+        self.browse = browse
+
+    def get_browse(self):
+        return self.browse
+
+    def set_delete(self, delete):
+        self.delete = delete
+
+    def get_delete(self):
+        return self.delete
+
+    def set_write(self, write):
+        self.write = write
+
+    def get_write(self):
+        return self.write
+
+    def to_lxml_element(self):
+        root = etree.Element('PERMISSION')
+        if self.name is not None:
+            root.set('name', self.name)
+        if self.password is not None:
+            root.set('password', self.password)
+        if self.read is not None:
+            root.set('READ', self.read)
+        if self.execute is not None:
+            root.set('EXECUTE', self.execute)
+        if self.browse is not None:
+            root.set('BROWSE', self.browse)
+        if self.delete is not None:
+            root.set('DELETE', self.delete)
+        if self.write is not None:
+            root.set('WRITE', self.write)
+        for key, value in self.custom_attrib.iteritems():
+            root.set(key, value)
+        for element in self.custom:
+            root.append(element)
+        return root
+
+    @staticmethod
+    def from_lxml_element(root):
+        if root.tag != 'USER':
+            raise AttributeError('Expected USER tag.')
+        custom_attrib = root.attrib
+        name = custom_attrib.pop('name', None)
+        password = custom_attrib.pop('password', None)
+        read = custom_attrib.pop('READ', None)
+        execute = custom_attrib.pop('EXECUTE', None)
+        browse = custom_attrib.pop('BROWSE', None)
+        delete = custom_attrib.pop('DELETE', None)
+        write = custom_attrib.pop('WRITE', None)
+        custom = list(root)
+        permission = Permission(name, password, read, execute, browse,
+                                delete, write)
+        permission.custom_attrib = custom_attrib
+        permission.custom = custom
+        return permission
+
+    @staticmethod
+    def from_string(text):
+        '''Factory to produce user element by parsing a string.'''
+        return Permission.from_lxml_element(etree.XML(text))
 
 class Return(SecurityElement):
-    pass
+    def __init__(self, value = None):
+        self.set_value(value)
+        self.custom_attributes = {}
+        self.custom = []
+
+    def set_value(self, value):
+        self.value = value
+
+    def get_value(self):
+        return self.value
+
+    def to_lxml_element(self):
+        root = etree.Element('RETURN')
+        if self.value is not None:
+            root.set('value', self.value)
+        for key, value in self.custom_attrib.iteritems():
+            root.set(key, value)
+        for element in self.custom:
+            root.append(element)
+        return root
+
+    @staticmethod
+    def from_lxml_element(root):
+        if root.tag != 'RETURN':
+            raise AttributeError('Expected RETURN tag.')
+        custom_attrib = root.attrib
+        value = custom_attrib.pop('value', None)
+        custom = list(root)
+        ret = Return(value)
+        ret.custom_attrib = custom_attrib
+        ret.custom = custom
+        return ret
+
+    @staticmethod
+    def from_string(text):
+        '''Factory to produce return element by parsing a string.'''
+        return Return.from_lxml_element(etree.XML(text))
+
+class SecurityList():
+    def __init__(self, elements = []):
+        for elements in elements:
+            self.add_element(element)
+        self.custom = []
+        self.custom_attrib = {}
+
+    def get_elements(self):
+        return self.elements
+
+    def add_element(self, element, index = None):
+        if index is None:
+            self.elements.append(element)
+        else:
+            self.elements.insert(index, element)
+
+    def remove_element(self, index):
+        self.elements.pop(index)
+
+    @staticmethod
+    def from_lxml_element(root):
+        if root.tag != 'SECURITY':
+            raise AttributeError('Expected SECURITY tag.')
+        elements = []
+        custom = []
+        for element in list(root):
+            try:
+                elements.append(SecurityElement.from_lxml_element(element))
+            else:
+                custom.append(element)
+        security_list = SecurityList(elements)
+        security_list.custom = custom
+        security_list.custom_attrib = root.attrib
+        return security_list
+
+    @staticmethod
+    def from_string(text):
+        '''Factory to produce security list by parsing a string.'''
+        return SecurityList.from_lxml_element(etree.XML(text))
+
+    def to_lxml_element(self):
+        root = etree.Element('SECURITY')
+        for element in self.elements:
+            root.append(element.to_lxml_element())
+        for key, value in self.custom_attrib.iteritems():
+            root.set(key, value)
+        for element in self.custom:
+            root.append(element)
+        return root
+
+    def __str__(self):
+        return etree.tostring(self.to_lxml_element(), pretty_print = True)



commit 6f59a090d44198c0190a6106641bbff7c7cde845
Author: Marek Aaron Sapota <maarons@gnu.org>
Date:   Fri Aug 14 20:53:14 2009 +0200

    Added condition to control lib.

diff --git a/misc/py_control_client/MyServer/pycontrollib/security.py b/misc/py_control_client/MyServer/pycontrollib/security.py
new file mode 100644
index 0000000..7b9b05b
--- /dev/null
+++ b/misc/py_control_client/MyServer/pycontrollib/security.py
@@ -0,0 +1,126 @@
+# -*- coding: utf-8 -*-
+'''
+MyServer
+Copyright (C) 2009 Free Software Foundation, Inc.
+This program 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 3 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program.  If not, see <http://www.gnu.org/licenses/>.
+'''
+
+from lxml import etree
+from definition import Definition
+
+class SecurityElement():
+    pass
+
+class Condition(SecurityElement):
+    def __init__(self, name = None, value = None, reverse = None, regex = None,
+                 sub_elements = []):
+        self.set_name(name)
+        self.set_value(value)
+        self.set_reverse(reverse)
+        self.set_regex(regex)
+        self.custom_attributes = {}
+        self.custom = []
+        self.sub_elements = []
+        for element in sub_elements:
+            self.add_sub_element(element)
+
+    def set_name(self, name):
+        self.name = name
+
+    def get_name(self):
+        return self.name
+
+    def set_value(value):
+        self.value = value
+
+    def get_value(self):
+        return self.value
+
+    def set_reverse(self, reverse):
+        self.reverse = reverse
+
+    def get_reverse(self):
+        return self.reverse
+
+    def set_regex(self):
+        self.regex = regex
+
+    def get_regex(self):
+        return self.regex
+
+    def add_sub_element(self, element):
+        if isinstance(element, Definition) or \
+                isinstance(element, SecurityElement):
+            self.sub_elements.append(element)
+        else:
+            self.custom.append(element)
+
+    def get_sub_elements(self):
+        return self.sub_elements
+
+    def get_sub_element(self, index):
+        return self.sub_elements[index]
+
+    def to_lxml_element(self):
+        root = etree.Element('CONDITION')
+        if self.name is not None:
+            root.set('name', self.name)
+        if self.value is not None:
+            root.set('value', self.value)
+        if self.reverse is not None:
+            root.set('not', 'yes' if self.reverse else 'no')
+        if self.regex is not None:
+            root.set('regex', 'yes' if self.reverse else 'no')
+        for key, value in self.custom_attrib.iteritems():
+            root.set(key, value)
+        for element in self.sub_elements:
+            root.append(element.to_lxml_element())
+        for element in self.custom:
+            root.append(element)
+        return root
+
+    @staticmethod
+    def from_lxml_element(root):
+        if root.tag != 'CONDITION':
+            raise AttributeError('Expected CONDITION tag.')
+        custom_attrib = root.attrib
+        name = custom_attrib.pop('name', None)
+        value = custom_attrib.pop('value', None)
+        reverse = custom_attrib.pop('not', None)
+        regex = custom_attrib.pop('regex', None)
+        custom = []
+        sub_elements = []
+        for child in list(root):
+            try:
+                sub_elements.append(SecurityElement.from_lxml_element(child))
+            except:
+                custom.append(child)
+        condition = Condition(name, value, reverse, regex, sub_elements)
+        condition.custom = custom
+        condition.custom_attrib = custom_attrib
+        return condition
+
+    @staticmethod
+    def from_string(text):
+        '''Factory to produce definition tree by parsing a string.'''
+        return DefinitionTree.from_lxml_element(etree.XML(text))
+
+    def __str__(self):
+        return etree.tostring(self.to_lxml_element(), pretty_print = True)
+
+class Permission(SecurityElement):
+    pass
+
+class Return(SecurityElement):
+    pass



commit fc81d1bb032e279a2e7436fe95780728f26ee738
Author: Marek Aaron Sapota <maarons@gnu.org>
Date:   Fri Aug 14 16:32:45 2009 +0200

    Added filesystem browser to GUI for security files.

diff --git a/misc/PyGTK_Control/MyServerControl.py b/misc/PyGTK_Control/MyServerControl.py
index 70febbc..c05e312 100644
--- a/misc/PyGTK_Control/MyServerControl.py
+++ b/misc/PyGTK_Control/MyServerControl.py
@@ -30,6 +30,7 @@ from MyServer.GUI.ConnectionWindow import Connection
 from MyServer.GUI.DefinitionWidgets import DefinitionTable, DefinitionTreeView
 from MyServer.GUI.MIMEWidgets import MimeTable, MimeTreeView
 from MyServer.GUI.VHostWidgets import VHostTable, VHostTreeView
+from MyServer.GUI.BrowserWidgets import BrowserTable
 
 class PyGTKControl():
     '''GNU MyServer Control main window.'''
@@ -41,6 +42,7 @@ class PyGTKControl():
         self.construct_options()
         self.construct_mime()
         self.construct_vhosts()
+        self.construct_browser()
         self.chooser = None # Active file chooser
         # path of currently edited files
         self.config_path = self.mime_path = self.vhost_path = None
@@ -437,5 +439,14 @@ class PyGTKControl():
 
         self.widgets.get_widget('notebook').show_all()
 
+    def construct_browser(self):
+        '''Constructs file browser.'''
+        table = BrowserTable()
+        
+        self.widgets.get_widget('notebook').append_page(
+            table, gtk.Label('File browser'))
+
+        self.widgets.get_widget('notebook').show_all()
+
 PyGTKControl()
 gtk.main()
diff --git a/misc/py_control_client/MyServer/GUI/BrowserWidgets.py b/misc/py_control_client/MyServer/GUI/BrowserWidgets.py
new file mode 100644
index 0000000..4d540fc
--- /dev/null
+++ b/misc/py_control_client/MyServer/GUI/BrowserWidgets.py
@@ -0,0 +1,77 @@
+# -*- coding: utf-8 -*-
+'''
+MyServer
+Copyright (C) 2009 Free Software Foundation, Inc.
+This program 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 3 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program.  If not, see <http://www.gnu.org/licenses/>.
+'''
+
+import gtk
+from gtk import gdk
+import gobject
+from MyServer.pycontrollib.browser import LocalFileBrowser
+
+class BrowserTreeView(gtk.TreeView):
+    def __init__(self):
+        gtk.TreeView.__init__(self, gtk.ListStore(
+                gdk.Pixbuf,
+                gobject.TYPE_STRING))
+        self.model = self.get_model()
+        renderer = gtk.CellRendererPixbuf()
+        column = gtk.TreeViewColumn()
+        column.pack_start(renderer)
+        column.add_attribute(renderer, 'pixbuf', 0)
+        self.append_column(column)
+        renderer = gtk.CellRendererText()
+        column = gtk.TreeViewColumn('File')
+        column.pack_start(renderer)
+        column.add_attribute(renderer, 'text', 1)
+        self.append_column(column)
+
+        self.browser = LocalFileBrowser()
+        self.browser.show_hidden(False)
+        icon_theme = gtk.icon_theme_get_default()
+        self.dir_icon = icon_theme.load_icon('gtk-directory', 16, 0)
+        self.update()
+        self.connect('row-activated', self.change_dir)
+
+        self.scroll = gtk.ScrolledWindow()
+        self.scroll.set_policy(gtk.POLICY_AUTOMATIC, gtk.POLICY_AUTOMATIC)
+        self.scroll.set_shadow_type(gtk.SHADOW_OUT)
+        self.scroll.set_border_width(5)
+        self.scroll.add(self)
+
+    def update(self):
+        '''Show contents of current directory.'''
+        self.model.clear()
+        for d in self.browser.list_dir():
+            self.model.append((self.dir_icon, d, ))
+
+    def change_dir(self, widget, path, view_column):
+        self.browser.change_dir(self.model[path][1])
+        self.update()
+
+class BrowserTable(gtk.Table):
+    def __init__(self):
+        gtk.Table.__init__(self, 2, 1)
+
+        self.browser_tree = BrowserTreeView()
+
+        def set_show_hidden(button):
+            self.browser_tree.browser.show_hidden(button.get_active())
+            self.browser_tree.update()
+        hide_check = gtk.CheckButton('Show hidden directories.')
+        hide_check.connect('toggled', set_show_hidden)
+
+        self.attach(hide_check, 0, 1, 0, 1, yoptions = gtk.FILL)
+        self.attach(self.browser_tree.scroll, 0, 1, 1, 2)
diff --git a/misc/py_control_client/MyServer/pycontrollib/browser.py b/misc/py_control_client/MyServer/pycontrollib/browser.py
new file mode 100644
index 0000000..63b8317
--- /dev/null
+++ b/misc/py_control_client/MyServer/pycontrollib/browser.py
@@ -0,0 +1,80 @@
+# -*- coding: utf-8 -*-
+'''
+MyServer
+Copyright (C) 2009 Free Software Foundation, Inc.
+This program 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 3 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program.  If not, see <http://www.gnu.org/licenses/>.
+'''
+
+import os
+
+class FileBrowser():
+    'Abstract file browser class.'
+    def list_dir(self):
+        raise NotImplementedError()
+
+    def list_files(self):
+        raise NotImplementedError()
+    
+    def get_file(self, path):
+        raise NotImplementedError()
+    
+    def put_file(self, path, text):
+        raise NotImplementedError()
+    
+    def get_path(self):
+        raise NotImplementedError()
+
+    def change_dir(self, path):
+        raise NotImplementedError()
+
+    def show_hidden(self, show):
+        raise NotImplementedError()
+
+class LocalFileBrowser(FileBrowser):
+    'Local file browser class.'
+    def __init__(self, path = os.path.expanduser('~')):
+        self.path = path
+        self.show = False
+
+    def list_dir(self):
+        return ['..'] + sorted(
+            [path for path in os.listdir(self.path) if \
+                 not os.path.isfile(os.path.join(self.path, path)) \
+                and (self.show or not path.startswith('.'))])
+
+    def list_files(self):
+        return ['..'] + sorted(
+            [path for path in os.listdir(self.path) if \
+                 os.path.isfile(os.path.join(self.path, path)) \
+                and (self.show or not path.startswith('.'))])
+
+    def get_file(self, path):
+        with open(os.path.join(self.path, path)) as f:
+            return f.read()
+
+    def put_file(self, path, text):
+        with open(os.path.join(self.path, path), 'w') as f:
+            f.write(text) 
+
+    def get_path(self):
+        return self.path
+
+    def change_dir(self, path):
+        if path == '..':
+            self.path = os.path.split(self.path)[0]
+        else:
+            self.path = os.path.join(self.path, path)
+
+    def show_hidden(self, show):
+        self.show = show



commit 6b4599d38b577a26c64e31e7630c63c066f6f9f8
Author: Marek Aaron Sapota <maarons@gnu.org>
Date:   Thu Aug 13 20:08:58 2009 +0200

    Added GUI interface to remove mimes and vhosts.

diff --git a/misc/PyGTK_Control/MyServerControl.py b/misc/PyGTK_Control/MyServerControl.py
index 708f3fd..70febbc 100644
--- a/misc/PyGTK_Control/MyServerControl.py
+++ b/misc/PyGTK_Control/MyServerControl.py
@@ -289,6 +289,11 @@ class PyGTKControl():
             mime_lists[mime_list] = []
         tree.get_model().append(('', {}, mime_lists, [], [], {}, ))
 
+    def on_remove_mime_type_menu_item_activate(self, widget):
+        '''Removes selected MIME type.'''
+        table, tree = self.mime_tab[0]
+        table.remove_current(tree)
+
     def on_add_vhost_menu_item_activate(self, widget):
         '''Adds a new VHost.'''
         table, tree = self.vhost_tab
@@ -297,6 +302,11 @@ class PyGTKControl():
             vhost_lists[vhost_list[0]] = []
         tree.get_model().append(('', {}, vhost_lists, [], [], {}, ))
 
+    def on_remove_vhost_menu_item_activate(self, widget):
+        '''Removes selected VHost.'''
+        table, tree = self.vhost_tab
+        table.remove_current(tree)
+
     def on_add_definition_to_mime_menu_item_activate(self, widget):
         '''Adds a definition to currently selected MIME type.'''
         table, tree = self.mime_tab[1]
@@ -307,6 +317,11 @@ class PyGTKControl():
         table, tree = self.vhost_tab
         table.add_log()
 
+    def on_remove_log_from_vhost_menu_item_activate(self, widget):
+        '''Removes selected log from currently selected VHost.'''
+        table, tree = self.vhost_tab
+        table.remove_log()
+
     def set_up_config(self, config):
         '''Reads server configuration from given config instance.'''
         self.on_new_config_menu_item_activate()
@@ -412,7 +427,7 @@ class PyGTKControl():
         '''Reads vhost options from file and prepares GUI.'''
         panels = gtk.HPaned()
         tree = VHostTreeView()
-        panels.pack1(tree.scroll, False, False)
+        panels.pack1(tree.scroll, True, False)
         table = VHostTable(tree)
         panels.pack2(table.scroll, True, False)
 
diff --git a/misc/PyGTK_Control/PyGTKControl.glade b/misc/PyGTK_Control/PyGTKControl.glade
index 10af6b3..63db0cc 100644
--- a/misc/PyGTK_Control/PyGTKControl.glade
+++ b/misc/PyGTK_Control/PyGTKControl.glade
@@ -382,6 +382,21 @@
                       </widget>
                     </child>
                     <child>
+                      <widget class="GtkImageMenuItem" id="remove_mime_type_menu_item">
+                        <property name="label">Remove MIME type</property>
+                        <property name="visible">True</property>
+                        <property name="use_stock">False</property>
+                        <signal name="activate" handler="on_remove_mime_type_menu_item_activate"/>
+                        <child internal-child="image">
+                          <widget class="GtkImage" id="remove_mime_type_image">
+                            <property name="visible">True</property>
+                            <property name="stock">gtk-remove</property>
+                            <property name="icon-size">1</property>
+                          </widget>
+                        </child>
+                      </widget>
+                    </child>
+                    <child>
                       <widget class="GtkImageMenuItem" id="add_definition_to_mime_menu_item">
                         <property name="label">Add definition to MIME type</property>
                         <property name="visible">True</property>
@@ -424,6 +439,21 @@
                       </widget>
                     </child>
                     <child>
+                      <widget class="GtkImageMenuItem" id="remove_vhost_menu_item">
+                        <property name="label">Remove VHost</property>
+                        <property name="visible">True</property>
+                        <property name="use_stock">False</property>
+                        <signal name="activate" handler="on_remove_vhost_menu_item_activate"/>
+                        <child internal-child="image">
+                          <widget class="GtkImage" id="remove_vhost_image">
+                            <property name="visible">True</property>
+                            <property name="stock">gtk-remove</property>
+                            <property name="icon-size">1</property>
+                          </widget>
+                        </child>
+                      </widget>
+                    </child>
+                    <child>
                       <widget class="GtkImageMenuItem" id="add_log_to_vhost_menu_item">
                         <property name="label">Add log to VHost</property>
                         <property name="visible">True</property>
@@ -438,6 +468,21 @@
                         </child>
                       </widget>
                     </child>
+                    <child>
+                      <widget class="GtkImageMenuItem" id="remove_log_from_vhost_menu_item">
+                        <property name="label">Remove log from VHost</property>
+                        <property name="visible">True</property>
+                        <property name="use_stock">False</property>
+                        <signal name="activate" handler="on_remove_log_from_vhost_menu_item_activate"/>
+                        <child internal-child="image">
+                          <widget class="GtkImage" id="remove_log_from_vhost_image">
+                            <property name="visible">True</property>
+                            <property name="stock">gtk-remove</property>
+                            <property name="icon-size">1</property>
+                          </widget>
+                        </child>
+                      </widget>
+                    </child>
                   </widget>
                 </child>
               </widget>
diff --git a/misc/py_control_client/MyServer/GUI/MIMEWidgets.py b/misc/py_control_client/MyServer/GUI/MIMEWidgets.py
index 8a9d338..2f3ed7e 100644
--- a/misc/py_control_client/MyServer/GUI/MIMEWidgets.py
+++ b/misc/py_control_client/MyServer/GUI/MIMEWidgets.py
@@ -126,6 +126,13 @@ class MimeTable(gtk.Table):
             self.attach(gtk.Label(), 0, 1, i + 2, i + 3)
             i += 3
 
+    def remove_current(self, tree):
+        '''Remove currently selected MIME type.'''
+        if self.last_selected is not None:
+            model = tree.get_model()
+            model.remove(self.last_selected)
+            self.clear()
+
     def clear(self):
         '''Clear input widgets (including connected definition widgets).'''
         for entry, check in self.attributes.itervalues():
diff --git a/misc/py_control_client/MyServer/GUI/VHostWidgets.py b/misc/py_control_client/MyServer/GUI/VHostWidgets.py
index 204f306..165b1df 100644
--- a/misc/py_control_client/MyServer/GUI/VHostWidgets.py
+++ b/misc/py_control_client/MyServer/GUI/VHostWidgets.py
@@ -409,7 +409,20 @@ class VHostTable(gtk.Table):
 
     def add_log(self):
         '''Add a log to currently selected VHost.'''
-        self.log_model.append(('', [], ('', False, )))
+        self.log_model.append(('', [], ('', False, ), [], {}, ))
+
+    def remove_log(self):
+        '''Remove currently selected log.'''
+        if self.log_tree.last_selected is not None:
+            self.log_model.remove(self.log_tree.last_selected)
+            self.log_tree.clear()
+
+    def remove_current(self, tree):
+        '''Remove currently selected VHost.'''
+        if self.last_selected is not None:
+            model = tree.get_model()
+            model.remove(self.last_selected)
+            self.clear()
 
     def clear(self):
         '''Clear input widgets.'''



commit f3636a24d3828ae7c721380b68acb37ff44d758b
Author: Marek Aaron Sapota <maarons@gnu.org>
Date:   Thu Aug 13 15:43:46 2009 +0200

    Fix GUI segfault.

diff --git a/misc/py_control_client/MyServer/GUI/VHostWidgets.py b/misc/py_control_client/MyServer/GUI/VHostWidgets.py
index f248f97..204f306 100644
--- a/misc/py_control_client/MyServer/GUI/VHostWidgets.py
+++ b/misc/py_control_client/MyServer/GUI/VHostWidgets.py
@@ -386,6 +386,7 @@ class VHostTable(gtk.Table):
             model, selected = tree.get_selection().get_selected()
             if selected is not None:
                 model.remove(selected)
+                tree.last_selected = None
         remove_stream_button = gtk.Button('Remove stream')
         remove_stream_button.connect('clicked', remove_selected, stream_tree)
         remove_filter_button = gtk.Button('Remove filter')



commit 26f614483d0877a0968819ec45a0e68505ea3a85
Author: Marek Aaron Sapota <maarons@gnu.org>
Date:   Wed Aug 12 21:27:37 2009 +0200

    Updated setup script.

diff --git a/misc/py_control_client/setup.py b/misc/py_control_client/setup.py
index 17415cd..f327e72 100644
--- a/misc/py_control_client/setup.py
+++ b/misc/py_control_client/setup.py
@@ -19,4 +19,4 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 from distutils.core import setup
 setup(name = 'MyServer', version = '0.0',
       py_modules = ['MyServer.__init__'],
-      packages = ['MyServer/pycontrol', 'MyServer/pycontrollib'])
+      packages = ['MyServer/pycontrol', 'MyServer/pycontrollib', 'MyServer.GUI'])



commit e096fc5a40603a7c8ce97bb996430fcc06e80534
Author: Marek Aaron Sapota <maarons@gnu.org>
Date:   Wed Aug 12 21:26:51 2009 +0200

    Moved GUI widgets to library.

diff --git a/misc/PyGTK_Control/MyServerControl.py b/misc/PyGTK_Control/MyServerControl.py
index 477b78e..708f3fd 100644
--- a/misc/PyGTK_Control/MyServerControl.py
+++ b/misc/PyGTK_Control/MyServerControl.py
@@ -20,16 +20,16 @@ from __future__ import print_function
 import gtk
 import gtk.glade
 import gobject
-import GUIConfig
 from MyServer.pycontrollib.config import MyServerConfig
 from MyServer.pycontrollib.mimetypes import MIMETypes
 from MyServer.pycontrollib.controller import Controller
 from MyServer.pycontrollib.vhost import VHosts
-from AboutWindow import About
-from ConnectionWindow import Connection
-from DefinitionWidgets import DefinitionTable, DefinitionTreeView
-from MIMEWidgets import MimeTable, MimeTreeView
-from VHostWidgets import VHostTable, VHostTreeView
+from MyServer.GUI import GUIConfig
+from MyServer.GUI.AboutWindow import About
+from MyServer.GUI.ConnectionWindow import Connection
+from MyServer.GUI.DefinitionWidgets import DefinitionTable, DefinitionTreeView
+from MyServer.GUI.MIMEWidgets import MimeTable, MimeTreeView
+from MyServer.GUI.VHostWidgets import VHostTable, VHostTreeView
 
 class PyGTKControl():
     '''GNU MyServer Control main window.'''
diff --git a/misc/PyGTK_Control/AboutWindow.py b/misc/py_control_client/MyServer/GUI/AboutWindow.py
similarity index 100%
rename from misc/PyGTK_Control/AboutWindow.py
rename to misc/py_control_client/MyServer/GUI/AboutWindow.py
diff --git a/misc/PyGTK_Control/ConnectionWindow.py b/misc/py_control_client/MyServer/GUI/ConnectionWindow.py
similarity index 100%
rename from misc/PyGTK_Control/ConnectionWindow.py
rename to misc/py_control_client/MyServer/GUI/ConnectionWindow.py
diff --git a/misc/PyGTK_Control/DefinitionWidgets.py b/misc/py_control_client/MyServer/GUI/DefinitionWidgets.py
similarity index 100%
rename from misc/PyGTK_Control/DefinitionWidgets.py
rename to misc/py_control_client/MyServer/GUI/DefinitionWidgets.py
diff --git a/misc/PyGTK_Control/GUIConfig.py b/misc/py_control_client/MyServer/GUI/GUIConfig.py
similarity index 100%
rename from misc/PyGTK_Control/GUIConfig.py
rename to misc/py_control_client/MyServer/GUI/GUIConfig.py
diff --git a/misc/PyGTK_Control/MIMEWidgets.py b/misc/py_control_client/MyServer/GUI/MIMEWidgets.py
similarity index 100%
rename from misc/PyGTK_Control/MIMEWidgets.py
rename to misc/py_control_client/MyServer/GUI/MIMEWidgets.py
diff --git a/misc/PyGTK_Control/VHostWidgets.py b/misc/py_control_client/MyServer/GUI/VHostWidgets.py
similarity index 100%
rename from misc/PyGTK_Control/VHostWidgets.py
rename to misc/py_control_client/MyServer/GUI/VHostWidgets.py
diff --git a/misc/py_control_client/MyServer/GUI/__init__.py b/misc/py_control_client/MyServer/GUI/__init__.py
new file mode 100644
index 0000000..8fa2136
--- /dev/null
+++ b/misc/py_control_client/MyServer/GUI/__init__.py
@@ -0,0 +1,2 @@
+#
+



commit 26eb5c3ecba6ede2197b9fe75b6992d467c5d4b9
Author: Marek Aaron Sapota <maarons@gnu.org>
Date:   Wed Aug 12 21:14:36 2009 +0200

    Better GUI look.

diff --git a/misc/PyGTK_Control/MIMEWidgets.py b/misc/PyGTK_Control/MIMEWidgets.py
index d171cee..8a9d338 100644
--- a/misc/PyGTK_Control/MIMEWidgets.py
+++ b/misc/PyGTK_Control/MIMEWidgets.py
@@ -125,7 +125,7 @@ class MimeTable(gtk.Table):
             self.attach(remove_button, 0, 1, i + 1, i + 2, yoptions = gtk.FILL)
             self.attach(gtk.Label(), 0, 1, i + 2, i + 3)
             i += 3
-            
+
     def clear(self):
         '''Clear input widgets (including connected definition widgets).'''
         for entry, check in self.attributes.itervalues():
diff --git a/misc/PyGTK_Control/MyServerControl.py b/misc/PyGTK_Control/MyServerControl.py
index 0ec6c1c..477b78e 100644
--- a/misc/PyGTK_Control/MyServerControl.py
+++ b/misc/PyGTK_Control/MyServerControl.py
@@ -91,22 +91,22 @@ class PyGTKControl():
         '''Get MIME config from remote server.'''
         if self.controller is not None:
             self.set_up_mime(self.controller.get_MIME_type_configuration())
-            
+
     def on_get_vhost_menu_item_activate(self, widget):
         '''Get VHost config from remote server.'''
         if self.controller is not None:
             self.set_up_vhost(self.controller.get_vhost_configuration())
-            
+
     def on_put_config_menu_item_activate(self, widget):
         '''Put server config on remote server.'''
         if self.controller is not None:
             self.controller.put_server_configuration(self.get_current_config())
-            
+
     def on_put_mime_menu_item_activate(self, widget):
         '''Put MIME config on remote server.'''
         if self.controller is not None:
             self.controller.put_MIME_type_configuration(self.get_current_mime())
-            
+
     def on_put_vhost_menu_item_activate(self, widget):
         '''Put VHost config on remote server.'''
         if self.controller is not None:
@@ -226,7 +226,7 @@ class PyGTKControl():
             config = config_method()
             with open(getattr(self, path), 'w') as f:
                 f.write(str(config))
-        
+
     def on_save_config_menu_item_activate(self, widget):
         '''Save server configuration to file.'''
         self.generic_save(
@@ -396,12 +396,12 @@ class PyGTKControl():
 
         panels = gtk.HPaned()
         tree = MimeTreeView()
-        panels.pack1(tree.scroll, False, False)
+        panels.pack1(tree.scroll, True, False)
         table = MimeTable(tree, def_tree, def_table)
-        panels.pack2(table, True, False)
+        panels.pack2(table, False, False)
 
         vpanels.pack1(panels)
-        
+
         self.mime_tab = ((table, tree, ), (def_table, def_tree), )
         self.widgets.get_widget('notebook').append_page(
             vpanels, gtk.Label('MIME Type'))
diff --git a/misc/PyGTK_Control/VHostWidgets.py b/misc/PyGTK_Control/VHostWidgets.py
index 8069a35..f248f97 100644
--- a/misc/PyGTK_Control/VHostWidgets.py
+++ b/misc/PyGTK_Control/VHostWidgets.py
@@ -137,7 +137,7 @@ class LogTreeView(gtk.TreeView):
         self.scroll.set_shadow_type(gtk.SHADOW_OUT)
         self.scroll.set_border_width(5)
         self.scroll.add(self)
-        
+
         self.last_selected = None
         self.connect('cursor-changed', self.cursor_changed)
 
@@ -148,7 +148,7 @@ class LogTreeView(gtk.TreeView):
         entry, check = self.log_type
         entry.set_text('')
         check.set_active(False)
-        
+
     def save_changed(self):
         self.stream_tree.save_changed()
         model = self.stream_tree.get_model()
@@ -291,7 +291,7 @@ class VHostTable(gtk.Table):
             self.attach(entry, 1, 2, i, i + 1, yoptions = gtk.FILL)
             self.attach(check, 2, 3, i, i + 1, gtk.FILL, gtk.FILL)
             i += 1
-            
+
         self.vhost_lists = {}
         for vhost_list in GUIConfig.vhost_lists: # Add attribute lists
             name = vhost_list[0]
@@ -362,7 +362,7 @@ class VHostTable(gtk.Table):
         self.attach(cycle_check, 2, 3, i + 4, i + 5, gtk.FILL, gtk.FILL)
         self.attach(cycle_gzip_label, 0, 1, i + 5, i + 6, yoptions = gtk.FILL)
         self.attach(cycle_gzip_check, 2, 3, i + 5, i + 6, gtk.FILL, gtk.FILL)
-        
+
         filter_tree = FilterTreeView()
         stream_tree = StreamTreeView(filter_tree,
                                      (cycle_entry, cycle_check, ),
@@ -409,7 +409,7 @@ class VHostTable(gtk.Table):
     def add_log(self):
         '''Add a log to currently selected VHost.'''
         self.log_model.append(('', [], ('', False, )))
-            
+
     def clear(self):
         '''Clear input widgets.'''
         for entry, check in self.attributes.itervalues():



commit ce56783eff4746a0bd3aee5f3e00d3aa56390652
Author: Marek Aaron Sapota <maarons@gnu.org>
Date:   Wed Aug 12 21:11:23 2009 +0200

    Working keeping unknown things in mimes and vhosts.

diff --git a/misc/PyGTK_Control/MIMEWidgets.py b/misc/PyGTK_Control/MIMEWidgets.py
index a6f0938..d171cee 100644
--- a/misc/PyGTK_Control/MIMEWidgets.py
+++ b/misc/PyGTK_Control/MIMEWidgets.py
@@ -27,7 +27,9 @@ class MimeTreeView(gtk.TreeView):
                 gobject.TYPE_STRING, # mime name
                 gobject.TYPE_PYOBJECT, # mime single attributes
                 gobject.TYPE_PYOBJECT, # mime attribute lists
-                gobject.TYPE_PYOBJECT)) # mime definitions
+                gobject.TYPE_PYOBJECT, # mime definitions
+                gobject.TYPE_PYOBJECT, # mime custom
+                gobject.TYPE_PYOBJECT)) # mime custom attrib
         model = self.get_model()
         def mime_edited_handler(cell, path, text, data):
             model = data
@@ -61,7 +63,9 @@ class MimeTreeView(gtk.TreeView):
             model.append((getattr(mime, 'get_' + GUIConfig.mime_name)(),
                           attributes,
                           mime_lists,
-                          mime.get_definitions(), ))
+                          mime.get_definitions(),
+                          mime.custom,
+                          mime.custom_attrib, ))
 
 class MimeTable(gtk.Table):
     def __init__(self, tree, def_tree, def_table):
@@ -179,6 +183,8 @@ class MimeTable(gtk.Table):
         while i is not None: # iterate over MIME types
             row = model[i]
             mime = MIMEType(row[0], definitions = row[3])
+            mime.custom = row[4]
+            mime.custom_attrib = row[5]
             for attribute in row[1]:
                 text, enabled = row[1][attribute]
                 if enabled:
diff --git a/misc/PyGTK_Control/MyServerControl.py b/misc/PyGTK_Control/MyServerControl.py
index ce8b533..0ec6c1c 100644
--- a/misc/PyGTK_Control/MyServerControl.py
+++ b/misc/PyGTK_Control/MyServerControl.py
@@ -46,6 +46,10 @@ class PyGTKControl():
         self.config_path = self.mime_path = self.vhost_path = None
         # remembered unhandled parts of configs
         self.config_custom = []
+        self.mime_custom = []
+        self.vhost_custom = []
+        self.mime_custom_attrib = {}
+        self.vhost_custom_attrib = {}
         self.controller = None
 
     def on_window_destroy(self, widget):
@@ -124,6 +128,8 @@ class PyGTKControl():
         '''Clears MIME configuration.'''
         if widget is not None:
             self.mime_path = None
+        self.mime_custom = []
+        self.mime_custom_attrib = {}
         table, tree = self.mime_tab[0]
         table.clear()
         tree.get_model().clear()
@@ -132,11 +138,13 @@ class PyGTKControl():
         '''Clears VHost configuration.'''
         if widget is not None:
             self.vhost_path = None
+        self.vhost_custom = []
+        self.vhost_custom_attrib = {}
         table, tree = self.vhost_tab
         table.clear()
         tree.get_model().clear()
 
-    def generic_open(self, dialog, config_type, set_up_method):
+    def generic_open(self, dialog, path, config_type, set_up_method):
         '''Open configuration file.'''
         if self.chooser is not None:
             self.chooser.destroy()
@@ -146,8 +154,8 @@ class PyGTKControl():
                        gtk.STOCK_OPEN, gtk.RESPONSE_OK))
         def handle_response(widget, response):
             if response == gtk.RESPONSE_OK:
-                self.config_path = self.chooser.get_filename()
-                with open(self.config_path) as f:
+                setattr(self, path, self.chooser.get_filename())
+                with open(getattr(self, path)) as f:
                     conf = config_type.from_string(f.read())
                 set_up_method(conf)
             self.chooser.destroy()
@@ -157,19 +165,19 @@ class PyGTKControl():
     def on_open_config_menu_item_activate(self, widget):
         '''Open local server configuration file.'''
         self.generic_open(
-            'Open server configuration file.',
+            'Open server configuration file.', 'config_path',
             MyServerConfig, self.set_up_config)
 
     def on_open_mime_menu_item_activate(self, widget):
         '''Open local MIME configuration file.'''
         self.generic_open(
-            'Open MIME configuration file.',
+            'Open MIME configuration file.', 'mime_path',
             MIMETypes, self.set_up_mime)
 
     def on_open_vhost_menu_item_activate(self, widget):
         '''Open local VHost configuration file.'''
         self.generic_open(
-            'Open VHost configuration file.',
+            'Open VHost configuration file.', 'vhost_path',
             VHosts, self.set_up_vhost)
 
     def generic_save_as(self, dialog, widget, path, save_method):
@@ -254,13 +262,19 @@ class PyGTKControl():
         '''Returns current MIME configuration as MIMETypes instance.'''
         table, tree = self.mime_tab[0]
         mimes = table.make_def(tree)
-        return MIMETypes(mimes)
+        config = MIMETypes(mimes)
+        config.custom = self.mime_custom
+        config.custom_attrib = self.mime_custom_attrib
+        return config
 
     def get_current_vhost(self):
         '''Returns current VHost configuration as VHosts instance.'''
         table, tree = self.vhost_tab
-        mimes = table.make_def(tree)
-        return VHosts(mimes)
+        vhosts = table.make_def(tree)
+        config = VHosts(vhosts)
+        config.custom = self.vhost_custom
+        config.custom_attrib = self.vhost_custom_attrib
+        return config
 
     def on_add_unknown_definition_menu_item_activate(self, widget):
         '''Adds a new definition to unknown tab.'''
@@ -273,7 +287,7 @@ class PyGTKControl():
         mime_lists = {}
         for mime_list in GUIConfig.mime_lists:
             mime_lists[mime_list] = []
-        tree.get_model().append(('', {}, mime_lists, [], ))
+        tree.get_model().append(('', {}, mime_lists, [], [], {}, ))
 
     def on_add_vhost_menu_item_activate(self, widget):
         '''Adds a new VHost.'''
@@ -281,7 +295,7 @@ class PyGTKControl():
         vhost_lists = {}
         for vhost_list in GUIConfig.vhost_lists:
             vhost_lists[vhost_list[0]] = []
-        tree.get_model().append(('', {}, vhost_lists, [], ))
+        tree.get_model().append(('', {}, vhost_lists, [], [], {}, ))
 
     def on_add_definition_to_mime_menu_item_activate(self, widget):
         '''Adds a definition to currently selected MIME type.'''
@@ -312,12 +326,16 @@ class PyGTKControl():
     def set_up_mime(self, config):
         '''Reads MIME configuration from given config instance.'''
         self.on_new_mime_menu_item_activate()
+        self.mime_custom = config.custom
+        self.mime_custom_attrib = config.custom_attrib
         tree = self.mime_tab[0][1]
         tree.set_up(config.MIME_types)
 
     def set_up_vhost(self, config):
         '''Reads VHost configuration from given config instance.'''
         self.on_new_vhost_menu_item_activate()
+        self.vhost_custom = config.custom
+        self.vhost_custom_attrib = config.custom_attrib
         tree = self.vhost_tab[1]
         tree.set_up(config.VHosts)
 
diff --git a/misc/PyGTK_Control/VHostWidgets.py b/misc/PyGTK_Control/VHostWidgets.py
index 039b708..8069a35 100644
--- a/misc/PyGTK_Control/VHostWidgets.py
+++ b/misc/PyGTK_Control/VHostWidgets.py
@@ -48,7 +48,9 @@ class StreamTreeView(gtk.TreeView):
                 gobject.TYPE_STRING, # stream location
                 gobject.TYPE_PYOBJECT, # list of filters
                 gobject.TYPE_PYOBJECT, # (cycle, cycle active, )
-                gobject.TYPE_BOOLEAN)) # cycle_gzip
+                gobject.TYPE_BOOLEAN, # cycle_gzip
+                gobject.TYPE_PYOBJECT, # stream custom
+                gobject.TYPE_PYOBJECT)) # stream custom attrib
         self.cycle = cycle
         self.cycle_gzip = cycle_gzip
         self.filter_model = filter_tree.get_model()
@@ -115,7 +117,9 @@ class LogTreeView(gtk.TreeView):
         gtk.TreeView.__init__(self, gtk.ListStore(
                 gobject.TYPE_STRING, # log name
                 gobject.TYPE_PYOBJECT, # list of streams
-                gobject.TYPE_PYOBJECT)) # (log_type, log_type enabled, )
+                gobject.TYPE_PYOBJECT, # (log_type, log_type enabled, )
+                gobject.TYPE_PYOBJECT, # log custom
+                gobject.TYPE_PYOBJECT)) # log custom attrib
         self.stream_tree = stream_tree
         self.log_type = log_type
         model = self.get_model()
@@ -153,7 +157,7 @@ class LogTreeView(gtk.TreeView):
             i = model.iter_children(None)
             while i is not None: # iterate over streams
                 row = model[i]
-                streams.append((row[0], row[1], row[2], row[3], ))
+                streams.append((row[0], row[1], row[2], row[3], row[4], row[5], ))
                 i = model.iter_next(i)
             row = self.get_model()[self.last_selected]
             row[1] = streams
@@ -182,7 +186,7 @@ class LogTreeView(gtk.TreeView):
         i = model.iter_children(None)
         while i is not None: # iterate over logs
             row = model[i]
-            logs.append((row[0], row[1], row[2], ))
+            logs.append((row[0], row[1], row[2], row[3], row[4], ))
             i = model.iter_next(i)
         return logs
 
@@ -192,7 +196,7 @@ class LogTreeView(gtk.TreeView):
         model = self.get_model()
         model.clear()
         for log in logs:
-            model.append((log[0], log[1], log[2], ))
+            model.append((log[0], log[1], log[2], log[3], log[4], ))
 
 class VHostTreeView(gtk.TreeView):
     def __init__(self):
@@ -200,7 +204,9 @@ class VHostTreeView(gtk.TreeView):
                 gobject.TYPE_STRING, # vhost name
                 gobject.TYPE_PYOBJECT, # vhost single attributes
                 gobject.TYPE_PYOBJECT, # vhost attribute lists
-                gobject.TYPE_PYOBJECT)) # vhost logs
+                gobject.TYPE_PYOBJECT, # vhost logs
+                gobject.TYPE_PYOBJECT, # vhost custom
+                gobject.TYPE_PYOBJECT)) # vhost custom attrib
         model = self.get_model()
         def vhost_edited_handler(cell, path, text, data):
             model = data
@@ -250,17 +256,21 @@ class VHostTreeView(gtk.TreeView):
                         cycle = ''
                     cycle_gzip = stream.get_cycle_gzip()
                     streams.append((stream.get_location(), filters,
-                                    (cycle, cycle_active, ), cycle_gzip, ))
+                                    (cycle, cycle_active, ), cycle_gzip,
+                                    stream.custom, stream.custom_attrib, ))
                 log_type = log.get_type()
                 log_type_enabled = log_type is not None
                 if log_type is None:
                     log_type = ''
                 logs.append((log.get_log_type(), streams,
-                             (log_type, log_type_enabled, ), ))
+                             (log_type, log_type_enabled, ), log.custom,
+                             log.custom_attrib, ))
             model.append((getattr(vhost, 'get_' + GUIConfig.vhost_name)(),
                           attributes,
                           vhost_lists,
-                          logs, ))
+                          logs,
+                          vhost.custom,
+                          vhost.custom_attrib, ))
 
 class VHostTable(gtk.Table):
     def __init__(self, tree):
@@ -362,7 +372,7 @@ class VHostTable(gtk.Table):
         self.log_model = self.log_tree.get_model()
 
         def add_stream(button, model):
-            model.append(('', [], (0, False, ), False, ))
+            model.append(('', [], (0, False, ), False, [], {}, ))
         add_stream_button = gtk.Button('Add stream')
         add_stream_button.connect(
             'clicked', add_stream, stream_tree.get_model())
@@ -468,10 +478,14 @@ class VHostTable(gtk.Table):
                         cycle = None
                     cycle_gzip = stream[3]
                     streams.append(Stream(stream[0], cycle, cycle_gzip, stream[1]))
+                    streams[-1].custom = stream[4]
+                    streams[-1].custom_attrib = stream[5]
                 log_type, enabled = log[2]
                 if not enabled:
                     log_type = None
                 logs.append(Log(log[0], streams, log_type))
+                logs[-1].custom = log[3]
+                logs[-1].custom_attrib = log[4]
             vhost = VHost(row[0], logs = logs)
             for attribute in row[1]:
                 text, enabled = row[1][attribute]
@@ -480,6 +494,8 @@ class VHostTable(gtk.Table):
             for vhost_list in row[2]:
                 for entry in row[2][vhost_list]:
                     getattr(vhost, 'add_' + vhost_list)(*entry)
+            vhost.custom = row[4]
+            vhost.custom_attrib = row[5]
             vhosts.append(vhost)
             i = model.iter_next(i)
         return vhosts



commit 89cb5ac1df6b9b6fc4a13db57a7c1c21554aae6e
Author: Marek Aaron Sapota <maarons@gnu.org>
Date:   Wed Aug 12 18:48:47 2009 +0200

    Clean up redundant code.

diff --git a/misc/PyGTK_Control/MyServerControl.py b/misc/PyGTK_Control/MyServerControl.py
index 01e26dc..ce8b533 100644
--- a/misc/PyGTK_Control/MyServerControl.py
+++ b/misc/PyGTK_Control/MyServerControl.py
@@ -136,137 +136,109 @@ class PyGTKControl():
         table.clear()
         tree.get_model().clear()
 
-    def on_open_config_menu_item_activate(self, widget):
-        '''Open local server configuration file.'''
+    def generic_open(self, dialog, config_type, set_up_method):
+        '''Open configuration file.'''
         if self.chooser is not None:
             self.chooser.destroy()
         self.chooser = gtk.FileChooserDialog(
-            'Open server configuration file.',
+            dialog,
             buttons = (gtk.STOCK_CANCEL, gtk.RESPONSE_CANCEL,
                        gtk.STOCK_OPEN, gtk.RESPONSE_OK))
         def handle_response(widget, response):
             if response == gtk.RESPONSE_OK:
                 self.config_path = self.chooser.get_filename()
                 with open(self.config_path) as f:
-                    conf = MyServerConfig.from_string(f.read())
-                self.set_up_config(conf)
+                    conf = config_type.from_string(f.read())
+                set_up_method(conf)
             self.chooser.destroy()
         self.chooser.connect('response', handle_response)
         self.chooser.show()
 
+    def on_open_config_menu_item_activate(self, widget):
+        '''Open local server configuration file.'''
+        self.generic_open(
+            'Open server configuration file.',
+            MyServerConfig, self.set_up_config)
+
     def on_open_mime_menu_item_activate(self, widget):
         '''Open local MIME configuration file.'''
-        if self.chooser is not None:
-            self.chooser.destroy()
-        self.chooser = gtk.FileChooserDialog(
+        self.generic_open(
             'Open MIME configuration file.',
-            buttons = (gtk.STOCK_CANCEL, gtk.RESPONSE_CANCEL,
-                       gtk.STOCK_OPEN, gtk.RESPONSE_OK))
-        def handle_response(widget, response):
-            if response == gtk.RESPONSE_OK:
-                self.mime_path = self.chooser.get_filename()
-                with open(self.mime_path) as f:
-                    conf = MIMETypes.from_string(f.read())
-                self.set_up_mime(conf)
-            self.chooser.destroy()
-        self.chooser.connect('response', handle_response)
-        self.chooser.show()
+            MIMETypes, self.set_up_mime)
 
     def on_open_vhost_menu_item_activate(self, widget):
         '''Open local VHost configuration file.'''
-        if self.chooser is not None:
-            self.chooser.destroy()
-        self.chooser = gtk.FileChooserDialog(
+        self.generic_open(
             'Open VHost configuration file.',
-            buttons = (gtk.STOCK_CANCEL, gtk.RESPONSE_CANCEL,
-                       gtk.STOCK_OPEN, gtk.RESPONSE_OK))
-        def handle_response(widget, response):
-            if response == gtk.RESPONSE_OK:
-                self.vhost_path = self.chooser.get_filename()
-                with open(self.vhost_path) as f:
-                    conf = VHosts.from_string(f.read())
-                self.set_up_vhost(conf)
-            self.chooser.destroy()
-        self.chooser.connect('response', handle_response)
-        self.chooser.show()
+            VHosts, self.set_up_vhost)
 
-    def on_save_as_config_menu_item_activate(self, widget):
-        '''Save server configuration as local file.'''
+    def generic_save_as(self, dialog, widget, path, save_method):
+        '''Save configuration as file.'''
         if self.chooser is not None:
             self.chooser.destroy()
         self.chooser = gtk.FileChooserDialog(
-            'Save server configuration file.',
+            dialog,
             action = gtk.FILE_CHOOSER_ACTION_SAVE,
             buttons = (gtk.STOCK_CANCEL, gtk.RESPONSE_CANCEL,
                        gtk.STOCK_SAVE_AS, gtk.RESPONSE_OK))
         def handle_response(widget, response):
             if response == gtk.RESPONSE_OK:
-                self.config_path = self.chooser.get_filename()
-                self.on_save_config_menu_item_activate(widget)
+                setattr(self, path, self.chooser.get_filename())
+                save_method(widget)
             self.chooser.destroy()
         self.chooser.connect('response', handle_response)
         self.chooser.show()
 
+    def on_save_as_config_menu_item_activate(self, widget):
+        '''Save server configuration as local file.'''
+        self.generic_save_as(
+            'Save server configuration file.',
+            widget, 'config_path',
+            self.on_save_config_menu_item_activate)
+
     def on_save_as_mime_menu_item_activate(self, widget):
         '''Save MIME configuration as local file.'''
-        if self.chooser is not None:
-            self.chooser.destroy()
-        self.chooser = gtk.FileChooserDialog(
+        self.generic_save_as(
             'Save MIME configuration file.',
-            action = gtk.FILE_CHOOSER_ACTION_SAVE,
-            buttons = (gtk.STOCK_CANCEL, gtk.RESPONSE_CANCEL,
-                       gtk.STOCK_SAVE_AS, gtk.RESPONSE_OK))
-        def handle_response(widget, response):
-            if response == gtk.RESPONSE_OK:
-                self.mime_path = self.chooser.get_filename()
-                self.on_save_mime_menu_item_activate(widget)
-            self.chooser.destroy()
-        self.chooser.connect('response', handle_response)
-        self.chooser.show()
+            widget, 'mime_path',
+            self.on_save_mime_menu_item_activate)
 
     def on_save_as_vhost_menu_item_activate(self, widget):
         '''Save VHost configuration as local file.'''
-        if self.chooser is not None:
-            self.chooser.destroy()
-        self.chooser = gtk.FileChooserDialog(
+        self.generic_save_as(
             'Save VHost configuration file.',
-            action = gtk.FILE_CHOOSER_ACTION_SAVE,
-            buttons = (gtk.STOCK_CANCEL, gtk.RESPONSE_CANCEL,
-                       gtk.STOCK_SAVE_AS, gtk.RESPONSE_OK))
-        def handle_response(widget, response):
-            if response == gtk.RESPONSE_OK:
-                self.vhost_path = self.chooser.get_filename()
-                self.on_save_vhost_menu_item_activate(widget)
-            self.chooser.destroy()
-        self.chooser.connect('response', handle_response)
-        self.chooser.show()
+            widget, 'vhost_path',
+            self.on_save_vhost_menu_item_activate)
 
-    def on_save_config_menu_item_activate(self, widget):
-        '''Save server configuration to file.'''
-        if self.config_path is None:
-            self.on_save_as_config_menu_item_activate(widget)
+    def generic_save(self, widget, path, save_as_method, config_method):
+        '''Save configuration file.'''
+        if getattr(self, path) is None:
+            save_as_method(widget)
         else:
-            config = self.get_current_config()
-            with open(self.config_path, 'w') as f:
+            config = config_method()
+            with open(getattr(self, path), 'w') as f:
                 f.write(str(config))
+        
+    def on_save_config_menu_item_activate(self, widget):
+        '''Save server configuration to file.'''
+        self.generic_save(
+            widget, 'config_path',
+            self.on_save_as_config_menu_item_activate,
+            self.get_current_config)
 
     def on_save_mime_menu_item_activate(self, widget):
         '''Save MIME configuration to file.'''
-        if self.mime_path is None:
-            self.on_save_as_mime_config_menu_item_activate(widget)
-        else:
-            config = self.get_current_mime()
-            with open(self.mime_path, 'w') as f:
-                f.write(str(config))
+        self.generic_save(
+            widget, 'mime_path',
+            self.on_save_as_mime_menu_item_activate,
+            self.get_current_mime)
 
     def on_save_vhost_menu_item_activate(self, widget):
         '''Save VHost configuration to file.'''
-        if self.vhost_path is None:
-            self.on_save_as_vhost_config_menu_item_activate(widget)
-        else:
-            config = self.get_current_vhost()
-            with open(self.vhost_path, 'w') as f:
-                f.write(str(config))
+        self.generic_save(
+            widget, 'vhost_path',
+            self.on_save_as_vhost_menu_item_activate,
+            self.get_current_vhost)
 
     def get_current_config(self):
         '''Returns current server configuration as MyServerConfig instance.'''



commit 7d0405ec49eb938d208dc72730387ce6afb9e7ba
Author: Marek Aaron Sapota <maarons@gnu.org>
Date:   Wed Aug 12 15:12:34 2009 +0200

    Working keeping unknown things in main config.

diff --git a/misc/PyGTK_Control/DefinitionWidgets.py b/misc/PyGTK_Control/DefinitionWidgets.py
index 6ef23a2..079dbee 100644
--- a/misc/PyGTK_Control/DefinitionWidgets.py
+++ b/misc/PyGTK_Control/DefinitionWidgets.py
@@ -22,7 +22,7 @@ from MyServer.pycontrollib.definition import DefinitionElement, DefinitionTree
 
 class DefinitionTable(gtk.Table):
     def __init__(self, tree):
-        gtk.Table.__init__(self, 8, 3)
+        gtk.Table.__init__(self, 7, 3)
 
         tree.connect('cursor-changed', self.cursor_changed)
         self.last_selected = None
@@ -36,7 +36,7 @@ class DefinitionTable(gtk.Table):
         value_label = gtk.Label('value:')
         self.value_field = value_entry = gtk.Entry()
         self.value_check_field = value_checkbutton = gtk.CheckButton()
-        value_checkbutton.set_tooltip_text('If active value will be used.')
+        value_checkbutton.set_tooltip_text('If not active value won\'t be saved in configuration.')
         value_checkbutton.set_active(True)
 
         self.attach(value_label, 0, 1, 1, 2, gtk.FILL, gtk.FILL)
@@ -63,6 +63,7 @@ class DefinitionTable(gtk.Table):
 
         add_attribute_button = gtk.Button('add attribute')
         remove_attribute_button = gtk.Button('remove attribute')
+        button_table = gtk.Table(1, 2)
         add_attribute_button.connect(
             'clicked',
             lambda button: attributes_model.append(('', '', )))
@@ -71,8 +72,9 @@ class DefinitionTable(gtk.Table):
             if selected is not None:
                 model.remove(selected)
         remove_attribute_button.connect('clicked', remove_attribute)
-        self.attach(add_attribute_button, 0, 3, 4, 5, yoptions = gtk.FILL)
-        self.attach(remove_attribute_button, 0, 3, 5, 6, yoptions = gtk.FILL)
+        button_table.attach(add_attribute_button, 0, 1, 0, 1)
+        button_table.attach(remove_attribute_button, 1, 2, 0, 1)
+        self.attach(button_table, 0, 3, 4, 5, yoptions = gtk.FILL)
 
         attributes_label = gtk.Label('attributes:')
         attributes_list = gtk.TreeView(gtk.ListStore(gobject.TYPE_STRING,
@@ -105,8 +107,8 @@ class DefinitionTable(gtk.Table):
 
         attributes_list.append_column(variable_column)
         attributes_list.append_column(value_column)
-        self.attach(attributes_label, 0, 3, 6, 7, yoptions = gtk.FILL)
-        self.attach(attributes_scroll, 0, 3, 7, 8)
+        self.attach(attributes_label, 0, 3, 5, 6, yoptions = gtk.FILL)
+        self.attach(attributes_scroll, 0, 3, 6, 7)
 
     def clear(self):
         '''Clear input widgets.'''
@@ -252,7 +254,7 @@ class DefinitionTreeView(gtk.TreeView):
             i = model.iter_next(i)
 
     def set_up(self, definitions, search):
-        '''Sets up model reading from given definition list. If search in True
+        '''Sets up model reading from given definition list. If search is True
         will substitute alreaty present model data, if it is false will append
         all the definitions.'''
 
diff --git a/misc/PyGTK_Control/MyServerControl.py b/misc/PyGTK_Control/MyServerControl.py
index b2a6c4f..01e26dc 100644
--- a/misc/PyGTK_Control/MyServerControl.py
+++ b/misc/PyGTK_Control/MyServerControl.py
@@ -44,6 +44,8 @@ class PyGTKControl():
         self.chooser = None # Active file chooser
         # path of currently edited files
         self.config_path = self.mime_path = self.vhost_path = None
+        # remembered unhandled parts of configs
+        self.config_custom = []
         self.controller = None
 
     def on_window_destroy(self, widget):
@@ -110,6 +112,7 @@ class PyGTKControl():
         '''Clears server configuration.'''
         if widget is not None:
             self.config_path = None
+        self.config_custom = []
         table, tree = self.tabs['unknown']
         tree.get_model().clear()
         for tab in self.tabs:
@@ -271,7 +274,9 @@ class PyGTKControl():
         for tab in self.tabs:
             table, tree = self.tabs[tab]
             definitions += table.make_def(tree)
-        return MyServerConfig(definitions)
+        config = MyServerConfig(definitions)
+        config.definitions.custom = self.config_custom
+        return config
 
     def get_current_mime(self):
         '''Returns current MIME configuration as MIMETypes instance.'''
@@ -319,6 +324,7 @@ class PyGTKControl():
     def set_up_config(self, config):
         '''Reads server configuration from given config instance.'''
         self.on_new_config_menu_item_activate()
+        self.config_custom = config.definitions.custom
         tabs = {}
         for tab in self.tabs:
             tabs[tab] = []
diff --git a/misc/py_control_client/MyServer/pycontrollib/config.py b/misc/py_control_client/MyServer/pycontrollib/config.py
index ad4e1fb..cdb5643 100644
--- a/misc/py_control_client/MyServer/pycontrollib/config.py
+++ b/misc/py_control_client/MyServer/pycontrollib/config.py
@@ -65,4 +65,6 @@ class MyServerConfig():
         root = etree.Element('MYSERVER')
         for definition in self.definitions.get_definitions():
             root.append(definition.to_lxml_element())
+        for element in self.definitions.custom:
+            root.append(element)
         return root
diff --git a/misc/py_control_client/MyServer/pycontrollib/definition.py b/misc/py_control_client/MyServer/pycontrollib/definition.py
index 327e28b..bce43b9 100644
--- a/misc/py_control_client/MyServer/pycontrollib/definition.py
+++ b/misc/py_control_client/MyServer/pycontrollib/definition.py
@@ -26,7 +26,6 @@ class Definition():
         '''Creates new definition with given name and attributes.'''
         self.set_name(name)
         self.attributes = {}
-        self.custom = [] # list of children not being definitions
         for key, value in attributes.iteritems():
             self.set_attribute(key, value)
 
@@ -137,6 +136,7 @@ class DefinitionTree(Definition):
         self.definitions = []
         for definition in definitions:
             self.add_definition(definition)
+        self.custom = [] # list of children not being definitions
 
     def __eq__(self, other):
         return isinstance(other, DefinitionTree) and \
@@ -208,16 +208,20 @@ class DefinitionList():
     def __init__(self, definitions = []):
         '''Construct new DefinitionList object with given definitions.'''
         self.definitions = []
+        self.custom = []
         for definition in definitions:
             self.add_definition(definition)
 
     def add_definition(self, definition, index = None):
         '''Append definition to current list of definitions, if index is not
         None insert at index-th position.'''
-        if index is None:
-            self.definitions.append(definition)
+        if not isinstance(definition, Definition):
+            self.custom.append(definition)
         else:
-            self.definitions.insert(index, definition)
+            if index is None:
+                self.definitions.append(definition)
+            else:
+                self.definitions.insert(index, definition)
 
     def get_definitions(self):
         '''Get current list of definitions.'''



commit 07c79e454295c046b8e788ea711e4270040a2a7f
Author: Marek Aaron Sapota <projects.gg.aaron@gmail.com>
Date:   Tue Aug 11 22:08:33 2009 +0200

    Remember unhandled things in streams and logs.

diff --git a/misc/py_control_client/MyServer/pycontrollib/log.py b/misc/py_control_client/MyServer/pycontrollib/log.py
index fb39ec2..8752f1b 100644
--- a/misc/py_control_client/MyServer/pycontrollib/log.py
+++ b/misc/py_control_client/MyServer/pycontrollib/log.py
@@ -27,6 +27,8 @@ class Stream():
         self.filters = []
         for filter in filters:
             self.add_filter(filter)
+        self.custom = []
+        self.custom_attrib = {}
 
     def __eq__(self, other):
         return isinstance(other, Stream) and \
@@ -92,16 +94,27 @@ class Stream():
         '''Factory to produce stream from lxml.etree.Element object.'''
         if root.tag != 'STREAM':
             raise AttributeError('Expected STREAM tag.')
+        known_attrib = set(['location', 'cycle', 'cycle_gzip'])
+        custom_attrib = {}
+        for key, value in root.attrib.iteritems():
+            if key not in known_attrib:
+                custom_attrib[key] = value
         location = root.get('location')
         cycle = root.get('cycle', None)
         cycle_gzip = root.get('cycle_gzip', None)
         if cycle_gzip is not None:
             cycle_gzip = cycle_gzip.upper() == 'YES'
         filters = []
+        custom = []
         for child in list(root):
             if child.tag == 'FILTER':
                 filters.append(child.text)
-        return Stream(location, cycle, cycle_gzip, filters)
+            else:
+                custom.append(child)
+        stream = Stream(location, cycle, cycle_gzip, filters)
+        stream.custom = custom
+        stream.custom_attrib = custom_attrib
+        return stream
 
     def __str__(self):
         return etree.tostring(self.to_lxml_element(), pretty_print = True)
@@ -119,6 +132,12 @@ class Stream():
             element = etree.Element('FILTER')
             element.text = filter
             root.append(element)
+
+        for element in self.custom:
+            root.append(element)
+        for key, value in self.custom_attrib.iteritems():
+            root.set(key, value)
+
         return root
 
 class Log():
@@ -129,13 +148,15 @@ class Log():
         self.streams = []
         for stream in streams:
             self.add_stream(stream)
+        self.custom = []
+        self.custom_attrib = {}
 
     def __eq__(self, other):
         return isinstance(other, Log) and \
             self.log_type == other.log_type and \
             self.streams == other.streams and \
             self.type == other.type
-    
+
     def get_type(self):
         '''Get log's type attribute.'''
         return self.type
@@ -169,7 +190,7 @@ class Log():
     def remove_stream(self, index):
         '''Remove stream from index-th position.'''
         self.streams.pop(index)
-    
+
     def get_stream(self, index):
         '''Get index-th stream.'''
         return self.streams[index]
@@ -184,9 +205,23 @@ class Log():
     def from_lxml_element(root):
         '''Factory to produce log from lxml.etree.Element object.'''
         log_type = root.tag
+        custom_attrib = {}
+        known_attrib = set(['type'])
+        for key, value in root.attrib.iteritems():
+            if key not in known_attrib:
+                custom_attrib[key] = value
         type = root.get('type', None)
-        streams = map(Stream.from_lxml_element, list(root))
-        return Log(log_type, streams, type)
+        streams = []
+        custom = []
+        for element in list(root):
+            try:
+                streams.append(Stream.from_lxml_element(element))
+            except AttributeError:
+                custom.append(element)
+        log = Log(log_type, streams, type)
+        log.custom = custom
+        log.custom_attrib = custom_attrib
+        return log
 
     def __str__(self):
         return etree.tostring(self.to_lxml_element(), pretty_print = True)
@@ -198,4 +233,10 @@ class Log():
             root.set('type', self.type)
         for stream in self.streams:
             root.append(stream.to_lxml_element())
+
+        for element in self.custom:
+            root.append(element)
+        for key, value in self.custom_attrib.iteritems():
+            root.set(key, value)
+
         return root
diff --git a/misc/py_control_client/MyServer/pycontrollib/test/log_test.py b/misc/py_control_client/MyServer/pycontrollib/test/log_test.py
index 9e01f57..823eacb 100644
--- a/misc/py_control_client/MyServer/pycontrollib/test/log_test.py
+++ b/misc/py_control_client/MyServer/pycontrollib/test/log_test.py
@@ -382,5 +382,44 @@ class LogTest(unittest.TestCase):
         copy = Log.from_lxml_element(log.to_lxml_element())
         self.assertEqual(log, copy)
 
+class BadMarkupTest(unittest.TestCase):
+    def test_stream(self):
+        text = '''
+<STREAM custom="unknown">
+  abc
+  <UNKNOWN>
+    <CUSTOM />
+  </UNKNOWN>
+</STREAM>'''
+        stream = Stream.from_string(text)
+        tree = stream.to_lxml_element()
+        self.assertEqual('unknown', tree.get('custom'))
+        unknown = tree.findall('UNKNOWN')
+        self.assertEqual(1, len(unknown))
+        unknown = unknown[0]
+        custom = list(unknown)
+        self.assertEqual(1, len(custom))
+        custom = custom[0]
+        self.assertEqual('CUSTOM', custom.tag)
+
+    def test_log(self):
+        text = '''
+<SOMELOG custom="unknown">
+  <STREAM>abc</STREAM>
+  <UNKNOWN>
+    <CUSTOM />
+  </UNKNOWN>
+</SOMELOG>'''
+        log = Log.from_string(text)
+        tree = log.to_lxml_element()
+        self.assertEqual('unknown', tree.get('custom'))
+        unknown = tree.findall('UNKNOWN')
+        self.assertEqual(1, len(unknown))
+        unknown = unknown[0]
+        custom = list(unknown)
+        self.assertEqual(1, len(custom))
+        custom = custom[0]
+        self.assertEqual('CUSTOM', custom.tag)
+
 if __name__ == '__main__':
     unittest.main()
diff --git a/misc/py_control_client/MyServer/pycontrollib/vhost.py b/misc/py_control_client/MyServer/pycontrollib/vhost.py
index 2252324..7564d67 100644
--- a/misc/py_control_client/MyServer/pycontrollib/vhost.py
+++ b/misc/py_control_client/MyServer/pycontrollib/vhost.py
@@ -145,7 +145,7 @@ class VHost():
     def get_private_key(self):
         '''Get vhost private ssl key.'''
         return self.private_key
-    
+
     def set_private_key(self, private_key):
         '''Set vhost private ssl key.'''
         self.private_key = private_key
@@ -196,7 +196,7 @@ class VHost():
             root.append(element)
         for key, value in self.custom_attrib.iteritems():
             root.set(key, value)
-            
+
         return root
 
     @staticmethod
@@ -248,7 +248,7 @@ class VHost():
         vhost.custom = custom
         vhost.custom_attrib = custom_attrib
         return vhost
-    
+
     @staticmethod
     def from_string(text):
         '''Factory to produce VHost by parsing a string.'''
@@ -276,7 +276,7 @@ class VHosts():
             root.append(element)
         for key, value in self.custom_attrib.iteritems():
             root.set(key, value)
-            
+
         return root
 
     def __str__(self):



commit 498effc0fb50a9d74f390b2e138d329f41e70767
Author: Marek Aaron Sapota <projects.gg.aaron@gmail.com>
Date:   Tue Aug 11 21:25:15 2009 +0200

    Preserve unknown things in vhosts.

diff --git a/misc/py_control_client/MyServer/pycontrollib/log.py b/misc/py_control_client/MyServer/pycontrollib/log.py
index eeed6da..fb39ec2 100644
--- a/misc/py_control_client/MyServer/pycontrollib/log.py
+++ b/misc/py_control_client/MyServer/pycontrollib/log.py
@@ -185,10 +185,7 @@ class Log():
         '''Factory to produce log from lxml.etree.Element object.'''
         log_type = root.tag
         type = root.get('type', None)
-        streams = []
-        for child in list(root):
-            if child.tag == 'STREAM':
-                streams.append(Stream.from_lxml_element(child))
+        streams = map(Stream.from_lxml_element, list(root))
         return Log(log_type, streams, type)
 
     def __str__(self):
diff --git a/misc/py_control_client/MyServer/pycontrollib/test/vhost_test.py b/misc/py_control_client/MyServer/pycontrollib/test/vhost_test.py
index e6d84f6..7338ac6 100644
--- a/misc/py_control_client/MyServer/pycontrollib/test/vhost_test.py
+++ b/misc/py_control_client/MyServer/pycontrollib/test/vhost_test.py
@@ -579,5 +579,45 @@ class VHostsTest(unittest.TestCase):
                 '<VHOSTS>{0}</VHOSTS>'.format(str(self.vhost_0))))
         self.assertNotEqual(VHosts.from_string(self.text), [])
 
+class BadMarkupTest(unittest.TestCase):
+    def test_vhost(self):
+        text = '''
+<VHOST custom="unknown">
+  <PORT>123</PORT>
+  <UNKNOWN>
+    <CUSTOM />
+  </UNKNOWN>
+</VHOST>'''
+        vhost = VHost.from_string(text)
+        tree = vhost.to_lxml_element()
+        self.assertEqual('unknown', tree.get('custom'))
+        unknown = tree.findall('UNKNOWN')
+        self.assertEqual(1, len(unknown))
+        unknown = unknown[0]
+        custom = list(unknown)
+        self.assertEqual(1, len(custom))
+        custom = custom[0]
+        self.assertEqual('CUSTOM', custom.tag)
+
+    def test_vhosts(self):
+        text = '''
+<VHOSTS custom="unknown">
+  <VHOST />
+  <UNKNOWN>
+    <CUSTOM />
+  </UNKNOWN>
+</VHOSTS>'''
+        vhosts = VHosts.from_string(text)
+        tree = vhosts.to_lxml_element()
+        self.assertEqual('unknown', tree.get('custom'))
+        self.assertEqual(1, len(tree.findall('VHOST')))
+        unknown = tree.findall('UNKNOWN')
+        self.assertEqual(1, len(unknown))
+        unknown = unknown[0]
+        custom = list(unknown)
+        self.assertEqual(1, len(custom))
+        custom = custom[0]
+        self.assertEqual('CUSTOM', custom.tag)
+
 if __name__ == '__main__':
     unittest.main()
diff --git a/misc/py_control_client/MyServer/pycontrollib/vhost.py b/misc/py_control_client/MyServer/pycontrollib/vhost.py
index 54b76f2..2252324 100644
--- a/misc/py_control_client/MyServer/pycontrollib/vhost.py
+++ b/misc/py_control_client/MyServer/pycontrollib/vhost.py
@@ -42,6 +42,8 @@ class VHost():
             self.add_host(single_host[0], single_host[1])
         self.set_private_key(private_key)
         self.set_certificate(certificate)
+        self.custom = []
+        self.custom_attrib = {}
 
     def __eq__(self, other):
         return isinstance(other, VHost) and self.name == other.name and \
@@ -189,6 +191,12 @@ class VHost():
             root.append(element)
         for log in self.logs:
             root.append(log.to_lxml_element())
+
+        for element in self.custom:
+            root.append(element)
+        for key, value in self.custom_attrib.iteritems():
+            root.set(key, value)
+            
         return root
 
     @staticmethod
@@ -196,6 +204,7 @@ class VHost():
         '''Factory to produce VHost from lxml.etree.Element object.'''
         if root.tag != 'VHOST':
             raise AttributeError('Expected VHOST tag.')
+        custom_attrib = root.attrib
         name = None
         port = None
         protocol = None
@@ -206,6 +215,7 @@ class VHost():
         ip = []
         host = {}
         logs = []
+        custom = []
         for child in list(root):
             if child.tag == 'NAME':
                 name = child.text
@@ -229,9 +239,15 @@ class VHost():
             elif child.tag == 'SSL_CERTIFICATE':
                 certificate = child.text
             else:
-                logs.append(Log.from_lxml_element(child))
-        return VHost(name, port, protocol, doc_root, sys_root, logs, ip, host,
-                     private_key, certificate)
+                try:
+                    logs.append(Log.from_lxml_element(child))
+                except AttributeError:
+                    custom.append(child)
+        vhost = VHost(name, port, protocol, doc_root, sys_root, logs, ip, host,
+                      private_key, certificate)
+        vhost.custom = custom
+        vhost.custom_attrib = custom_attrib
+        return vhost
     
     @staticmethod
     def from_string(text):
@@ -244,6 +260,8 @@ class VHosts():
         '''Create a new instance of VHosts. VHosts attribute is expected to be a
         list.'''
         self.VHosts = VHosts
+        self.custom = []
+        self.custom_attrib = {}
 
     def __eq__(self, other):
         return isinstance(other, VHosts) and self.VHosts == other.VHosts
@@ -253,6 +271,12 @@ class VHosts():
         root = etree.Element('VHOSTS')
         for vhost in self.VHosts:
             root.append(vhost.to_lxml_element())
+
+        for element in self.custom:
+            root.append(element)
+        for key, value in self.custom_attrib.iteritems():
+            root.set(key, value)
+            
         return root
 
     def __str__(self):
@@ -263,7 +287,17 @@ class VHosts():
         '''Factory to produce VHosts from lxml.etree.Element object.'''
         if root.tag != 'VHOSTS':
             raise AttributeError('Expected VHOSTS tag.')
-        return VHosts(map(VHost.from_lxml_element, list(root)))
+        vhosts = []
+        custom = []
+        for element in list(root):
+            try:
+                vhosts.append(VHost.from_lxml_element(element))
+            except AttributeError:
+                custom.append(element)
+        vhosts = VHosts(vhosts)
+        vhosts.custom = custom
+        vhosts.custom_attrib = root.attrib
+        return vhosts
 
     @staticmethod
     def from_string(text):



commit 8f8e920949fafb1b328f69a8630f963ab04a4dca
Author: Marek Aaron Sapota <projects.gg.aaron@gmail.com>
Date:   Tue Aug 11 19:57:46 2009 +0200

    MIME types remember unknown sub-nodes and attributes.

diff --git a/misc/py_control_client/MyServer/pycontrollib/mimetypes.py b/misc/py_control_client/MyServer/pycontrollib/mimetypes.py
index 99b15c3..df978c2 100644
--- a/misc/py_control_client/MyServer/pycontrollib/mimetypes.py
+++ b/misc/py_control_client/MyServer/pycontrollib/mimetypes.py
@@ -37,6 +37,8 @@ class MIMEType():
             self.add_filter(filter)
         self.set_self_executed(self_executed)
         self.definitions = DefinitionList(definitions)
+        self.custom = []
+        self.custom_attrib = {}
 
     def get_mime(self):
         '''Get associated mime type.'''
@@ -114,7 +116,7 @@ class MIMEType():
     def get_definitions(self):
         '''Get all definitions.'''
         return self.definitions.get_definitions()
-    
+
     def get_definition(self, index):
         '''Get definition with given index.'''
         return self.definitions.get_definition(index)
@@ -165,6 +167,12 @@ class MIMEType():
             root.append(element)
         for definition in self.definitions.get_definitions():
             root.append(definition.to_lxml_element())
+
+        for element in self.custom:
+            root.append(element)
+        for key, value in self.custom_attrib.iteritems():
+            root.set(key, value)
+
         return root
 
     def __str__(self):
@@ -179,10 +187,16 @@ class MIMEType():
         handler = root.get('handler', None)
         param = root.get('param', None)
         self_executed = root.get('self', None)
+        known_attrib = set(['mime', 'handler', 'param', 'self'])
+        custom_attrib = {}
+        for key, value in root.attrib.iteritems():
+            if key not in known_attrib:
+                custom_attrib[key] = value
         path = None
         extension = set()
         filters = []
         definitions = []
+        custom = []
         for child in list(root):
             if child.tag == 'PATH':
                 path = child.get('regex')
@@ -192,8 +206,13 @@ class MIMEType():
                 extension.add(child.get('value'))
             elif child.tag == 'DEFINE':
                 definitions.append(Definition.from_lxml_element(child))
-        return MIMEType(mime, handler, param, extension, path, filters,
+            else:
+                custom.append(child)
+        mime = MIMEType(mime, handler, param, extension, path, filters,
                         self_executed, definitions)
+        mime.custom = custom
+        mime.custom_attrib = custom_attrib
+        return mime
 
     @staticmethod
     def from_string(text):
@@ -204,7 +223,9 @@ class MIMEType():
 class MIMETypes():
     def __init__(self, MIME_types = []):
         self.MIME_types = MIME_types
-        
+        self.custom = []
+        self.custom_attrib = {}
+
     def __eq__(self, other):
         return isinstance(other, MIMETypes) and \
             self.MIME_types == other.MIME_types
@@ -214,18 +235,34 @@ class MIMETypes():
         root = etree.Element('MIMES')
         for mime in self.MIME_types:
             root.append(mime.to_lxml_element())
+
+        for element in self.custom:
+            root.append(element)
+        for key, value in self.custom_attrib.iteritems():
+            root.set(key, value)
+
         return root
 
     def __str__(self):
         return etree.tostring(self.to_lxml_element(), pretty_print = True)
-        
+
     @staticmethod
     def from_lxml_element(root):
         '''Factory to produce MIMETypes from lxml.etree.Element object.'''
         if root.tag != 'MIMES':
             raise AttributeError('Expected MIMES tag.')
-        return MIMETypes(map(MIMEType.from_lxml_element, list(root)))
-    
+        types = []
+        custom = []
+        for element in list(root):
+            try:
+                types.append(MIMEType.from_lxml_element(element))
+            except AttributeError:
+                custom.append(element)
+        mimes = MIMETypes(types)
+        mimes.custom = custom
+        mimes.custom_attrib = root.attrib
+        return mimes
+
     @staticmethod
     def from_string(text):
         '''Factory to produce MIMETypes from parsing a string.'''
diff --git a/misc/py_control_client/MyServer/pycontrollib/test/mimetypes_test.py b/misc/py_control_client/MyServer/pycontrollib/test/mimetypes_test.py
index 71d086e..4183577 100644
--- a/misc/py_control_client/MyServer/pycontrollib/test/mimetypes_test.py
+++ b/misc/py_control_client/MyServer/pycontrollib/test/mimetypes_test.py
@@ -446,6 +446,39 @@ class MIMETypesTest(unittest.TestCase):
         self.assertRaises(AttributeError, MIMETypes.from_string, text)
         self.assertRaises(AttributeError, MIMETypes.from_lxml_element,
                           etree.XML(text))
+
+class BadMarkupTest(unittest.TestCase):
+    def test_mime_types(self):
+        text = '''
+<MIMES custom="unknown">
+  <MIME mime="text/plain" />
+  <MIME mime="text/html" />
+  <UNKNOWN>
+    <CUSTOM />
+  </UNKNOWN>
+</MIMES>'''
+        mimes = MIMETypes.from_string(text)
+        tree = mimes.to_lxml_element()
+        self.assertEqual('unknown', tree.get('custom'))
+        self.assertEqual(2, len(tree.findall('MIME')))
+        unknown = tree.findall('UNKNOWN')
+        self.assertEqual(1, len(unknown))
+        unknown = unknown[0]
+        custom = list(unknown)
+        self.assertEqual(1, len(custom))
+        custom = custom[0]
+        self.assertEqual('CUSTOM', custom.tag)
+
+    def test_mime_type(self):
+        text = '''
+<MIME mime="text/plain" custom="unknown">
+  <CUSTOM />
+</MIME>'''
+        mime = MIMEType.from_string(text)
+        tree = mime.to_lxml_element()
+        self.assertEqual('unknown', tree.get('custom'))
+        custom = tree.findall('CUSTOM')
+        self.assertEqual(1, len(custom))
         
 if __name__ == '__main__':
     unittest.main()



commit 78d989514db5fe89b11560a684f57d767dbac17c
Author: Marek Aaron Sapota <projects.gg.aaron@gmail.com>
Date:   Tue Aug 11 15:40:53 2009 +0200

    DefinitionTree keeps unknown tags found in tree.

diff --git a/misc/py_control_client/MyServer/pycontrollib/definition.py b/misc/py_control_client/MyServer/pycontrollib/definition.py
index af5dcf0..327e28b 100644
--- a/misc/py_control_client/MyServer/pycontrollib/definition.py
+++ b/misc/py_control_client/MyServer/pycontrollib/definition.py
@@ -26,6 +26,7 @@ class Definition():
         '''Creates new definition with given name and attributes.'''
         self.set_name(name)
         self.attributes = {}
+        self.custom = [] # list of children not being definitions
         for key, value in attributes.iteritems():
             self.set_attribute(key, value)
 
@@ -64,8 +65,8 @@ class Definition():
     def from_lxml_element(root):
         '''Factory to produce definition element or tree from lxml.etree.Element
         object.'''
-        if root.tag != 'DEFINE':
-            raise AttributeError('Expected DEFINE tag.')
+        if root.tag != 'DEFINE': # don't touch unknown things
+            return root
         if len(list(root)):
             return DefinitionTree.from_lxml_element(root)
         else:
@@ -153,10 +154,13 @@ class DefinitionTree(Definition):
     def add_definition(self, value, index = None):
         '''Add value to sub-definitions, either at given position, or at the
         end.'''
-        if index is None:
-            self.definitions.append(value)
+        if not isinstance(value, Definition):
+            self.custom.append(value)
         else:
-            self.definitions.insert(index, value)
+            if index is None:
+                self.definitions.append(value)
+            else:
+                self.definitions.insert(index, value)
 
     def remove_definition(self, index):
         '''Remove sub-definition with given index.'''
@@ -186,6 +190,8 @@ class DefinitionTree(Definition):
             root.set('name', self.name)
         for definition in self.definitions:
             root.append(definition.to_lxml_element())
+        for element in self.custom:
+            root.append(element)
         return root
 
     def __str__(self):
diff --git a/misc/py_control_client/MyServer/pycontrollib/test/definition_test.py b/misc/py_control_client/MyServer/pycontrollib/test/definition_test.py
index 9cb5bcc..669a2a8 100644
--- a/misc/py_control_client/MyServer/pycontrollib/test/definition_test.py
+++ b/misc/py_control_client/MyServer/pycontrollib/test/definition_test.py
@@ -76,9 +76,9 @@ class DefinitionTest(unittest.TestCase):
 
     def test_bad_root_tag(self):
         text = '<ERROR name="http.error.file.404" value="404.html" />'
-        self.assertRaises(AttributeError, Definition.from_string, text)
-        self.assertRaises(AttributeError, Definition.from_lxml_element,
-                          etree.XML(text))
+        self.assertEqual('ERROR', Definition.from_string(text).tag)
+        self.assertEqual('ERROR', Definition.from_lxml_element(
+                etree.XML(text)).tag)
 
     def test_equality(self):
         self.assertNotEqual(Definition(), 'different type')
@@ -203,8 +203,8 @@ class DefinitionElementTest(unittest.TestCase):
 
     def test_bad_root_tag(self):
         text = '<ERROR name="http.error.file.404" value="404.html" />'
-        self.assertRaises(AttributeError, Definition.from_string, text)
-        self.assertRaises(AttributeError, Definition.from_lxml_element,
+        self.assertRaises(AttributeError, DefinitionElement.from_string, text)
+        self.assertRaises(AttributeError, DefinitionElement.from_lxml_element,
                           etree.XML(text))
 
     def test_search_by_name(self):
@@ -379,8 +379,8 @@ class DefinitionTreeTest(unittest.TestCase):
     def test_bad_root_tag(self):
         text = '<ERROR name="test" key="value">{0}{1}</ERROR>'.format(
             self.element_0, self.element_1)
-        self.assertRaises(AttributeError, Definition.from_string, text)
-        self.assertRaises(AttributeError, Definition.from_lxml_element,
+        self.assertRaises(AttributeError, DefinitionTree.from_string, text)
+        self.assertRaises(AttributeError, DefinitionTree.from_lxml_element,
                           etree.XML(text))
 
     def test_search_by_name(self):
@@ -456,5 +456,26 @@ class DefinitionListTest(unittest.TestCase):
             copy.add_definition(Definition.from_lxml_element(lxml_definition))
         self.assertEqual(def_list, copy)
 
+class BadMarkupTest(unittest.TestCase):
+    def test_definition_tree(self):
+        text = '''
+<DEFINE>
+  <DEFINE value="x" />
+  <DEFINE vlaue="y" />
+  <UNKNOWN>
+    <CUSTOM />
+  </UNKNOWN>
+</DEFINE>'''
+        definition = Definition.from_string(text)
+        def_tree = definition.to_lxml_element()
+        self.assertEqual(2, len(def_tree.findall('DEFINE')))
+        unknown = def_tree.findall('UNKNOWN')
+        self.assertEqual(1, len(unknown))
+        unknown = unknown[0]
+        custom = list(unknown)
+        self.assertEqual(1, len(custom))
+        custom = custom[0]
+        self.assertEqual('CUSTOM', custom.tag)
+
 if __name__ == '__main__':
     unittest.main()



commit ed000bb9ed508947f31e6f3ad16904430bcfe274
Author: Marek Aaron Sapota <projects.gg.aaron@gmail.com>
Date:   Tue Aug 11 11:43:55 2009 +0200

    Fixed test executing Makefile.

diff --git a/misc/py_control_client/MyServer/pycontrollib/test/Makefile b/misc/py_control_client/MyServer/pycontrollib/test/Makefile
index 6ccf7b7..5a784d4 100644
--- a/misc/py_control_client/MyServer/pycontrollib/test/Makefile
+++ b/misc/py_control_client/MyServer/pycontrollib/test/Makefile
@@ -21,19 +21,19 @@ PYTHONPATH:=$(shell dirname `pwd`):${PYTHONPATH}
 test: log_test definition_test mimetypes_test vhost_test config_test
 
 log_test:
-	-${PYTHON} log_test.py
+	-PYTHONPATH=${PYTHONPATH} ${PYTHON} log_test.py
 
 definition_test:
-	-${PYTHON} definition_test.py
+	-PYTHONPATH=${PYTHONPATH} ${PYTHON} definition_test.py
 
 mimetypes_test:
-	-${PYTHON} mimetypes_test.py
+	-PYTHONPATH=${PYTHONPATH} ${PYTHON} mimetypes_test.py
 
 vhost_test:
-	-${PYTHON} vhost_test.py
+	-PYTHONPATH=${PYTHONPATH} ${PYTHON} vhost_test.py
 
 config_test:
-	-${PYTHON} config_test.py
+	-PYTHONPATH=${PYTHONPATH} ${PYTHON} config_test.py
 
 .PHONY: clean
 clean:



commit cfbe88ed7f1ff39ab79894a272e5164ea2f1a3f6
Merge: 9f48d35 0c8caa0
Author: Marek Aaron Sapota <projects.gg.aaron@gmail.com>
Date:   Mon Aug 10 21:44:49 2009 +0200

    Merge branch 'master' of git://git.savannah.gnu.org/myserver




commit 9f48d3563c8cb5fa994177aef1e66358f73e95b8
Author: Marek Aaron Sapota <maarons@gnu.org>
Date:   Fri Jul 31 17:05:18 2009 +0200

    Config files can be put on/got from server using control protocol.

diff --git a/misc/PyGTK_Control/MyServerControl.py b/misc/PyGTK_Control/MyServerControl.py
index e367b0e..b2a6c4f 100644
--- a/misc/PyGTK_Control/MyServerControl.py
+++ b/misc/PyGTK_Control/MyServerControl.py
@@ -77,14 +77,34 @@ class PyGTKControl():
         self.controller = None
 
     def on_get_config_menu_item_activate(self, widget):
-        '''Get config from remote server.'''
+        '''Get server config from remote server.'''
         if self.controller is not None:
-            self.set_up(self.controller.get_server_configuration())
+            self.set_up_config(self.controller.get_server_configuration())
 
+    def on_get_mime_menu_item_activate(self, widget):
+        '''Get MIME config from remote server.'''
+        if self.controller is not None:
+            self.set_up_mime(self.controller.get_MIME_type_configuration())
+            
+    def on_get_vhost_menu_item_activate(self, widget):
+        '''Get VHost config from remote server.'''
+        if self.controller is not None:
+            self.set_up_vhost(self.controller.get_vhost_configuration())
+            
     def on_put_config_menu_item_activate(self, widget):
-        '''Put config on remote server.'''
+        '''Put server config on remote server.'''
         if self.controller is not None:
             self.controller.put_server_configuration(self.get_current_config())
+            
+    def on_put_mime_menu_item_activate(self, widget):
+        '''Put MIME config on remote server.'''
+        if self.controller is not None:
+            self.controller.put_MIME_type_configuration(self.get_current_mime())
+            
+    def on_put_vhost_menu_item_activate(self, widget):
+        '''Put VHost config on remote server.'''
+        if self.controller is not None:
+            self.controller.put_vhost_configuration(self.get_vhost_config())
 
     def on_new_config_menu_item_activate(self, widget = None):
         '''Clears server configuration.'''



commit 1f9cb30b943f1d1aa820398b4b46c0478c20863c
Author: Marek Aaron Sapota <maarons@gnu.org>
Date:   Fri Jul 31 15:49:01 2009 +0200

    Updated interface to get/put config from server.

diff --git a/misc/PyGTK_Control/PyGTKControl.glade b/misc/PyGTK_Control/PyGTKControl.glade
index a8a64ec..10af6b3 100644
--- a/misc/PyGTK_Control/PyGTKControl.glade
+++ b/misc/PyGTK_Control/PyGTKControl.glade
@@ -242,29 +242,87 @@
                       </widget>
                     </child>
                     <child>
-                      <widget class="GtkImageMenuItem" id="get_config_menu_item">
-                        <property name="label">Get configuration</property>
+                      <widget class="GtkImageMenuItem" id="get_menu_item">
+                        <property name="label">Get</property>
                         <property name="visible">True</property>
                         <property name="use_stock">False</property>
-                        <signal name="activate" handler="on_get_config_menu_item_activate"/>
+                        <child>
+                          <widget class="GtkMenu" id="get_menu">
+                            <property name="visible">True</property>
+                            <child>
+                              <widget class="GtkMenuItem" id="get_config_menu_item">
+                                <property name="visible">True</property>
+                                <property name="label" translatable="yes">Get server configuration</property>
+                                <property name="use_underline">True</property>
+                                <signal name="activate" handler="on_get_config_menu_item_activate"/>
+                              </widget>
+                            </child>
+                            <child>
+                              <widget class="GtkMenuItem" id="get_mime_menu_item">
+                                <property name="visible">True</property>
+                                <property name="label" translatable="yes">Get MIME configuration</property>
+                                <property name="use_underline">True</property>
+                                <signal name="activate" handler="on_get_mime_menu_item_activate"/>
+                              </widget>
+                            </child>
+                            <child>
+                              <widget class="GtkMenuItem" id="get_vhost_menu_item">
+                                <property name="visible">True</property>
+                                <property name="label" translatable="yes">Get VHost configuration</property>
+                                <property name="use_underline">True</property>
+                                <signal name="activate" handler="on_get_vhost_menu_item_activate"/>
+                              </widget>
+                            </child>
+                          </widget>
+                        </child>
                         <child internal-child="image">
-                          <widget class="GtkImage" id="get_config_image">
+                          <widget class="GtkImage" id="get_image">
                             <property name="visible">True</property>
                             <property name="stock">gtk-go-down</property>
+                            <property name="icon-size">1</property>
                           </widget>
                         </child>
                       </widget>
                     </child>
                     <child>
-                      <widget class="GtkImageMenuItem" id="put_config_menu_item">
-                        <property name="label">Put configuration</property>
+                      <widget class="GtkImageMenuItem" id="put_menu_item">
+                        <property name="label">Put</property>
                         <property name="visible">True</property>
                         <property name="use_stock">False</property>
-                        <signal name="activate" handler="on_put_config_menu_item_activate"/>
+                        <child>
+                          <widget class="GtkMenu" id="put_menu">
+                            <property name="visible">True</property>
+                            <child>
+                              <widget class="GtkMenuItem" id="put_config_menu_item">
+                                <property name="visible">True</property>
+                                <property name="label" translatable="yes">Put server configuration</property>
+                                <property name="use_underline">True</property>
+                                <signal name="activate" handler="on_put_config_menu_item_activate"/>
+                              </widget>
+                            </child>
+                            <child>
+                              <widget class="GtkMenuItem" id="put_mime_menu_item">
+                                <property name="visible">True</property>
+                                <property name="label" translatable="yes">Put MIME configuration</property>
+                                <property name="use_underline">True</property>
+                                <signal name="activate" handler="on_put_mime_menu_item_activate"/>
+                              </widget>
+                            </child>
+                            <child>
+                              <widget class="GtkMenuItem" id="put_vhost_menu_item">
+                                <property name="visible">True</property>
+                                <property name="label" translatable="yes">Put VHost configuration</property>
+                                <property name="use_underline">True</property>
+                                <signal name="activate" handler="on_put_vhost_menu_item_activate"/>
+                              </widget>
+                            </child>
+                          </widget>
+                        </child>
                         <child internal-child="image">
-                          <widget class="GtkImage" id="put_config_image">
+                          <widget class="GtkImage" id="put_image">
                             <property name="visible">True</property>
                             <property name="stock">gtk-redo</property>
+                            <property name="icon-size">1</property>
                           </widget>
                         </child>
                       </widget>
@@ -291,6 +349,7 @@
                           <widget class="GtkImage" id="add_unknown_definition_image">
                             <property name="visible">True</property>
                             <property name="stock">gtk-add</property>
+                            <property name="icon-size">1</property>
                           </widget>
                         </child>
                       </widget>
@@ -317,6 +376,7 @@
                           <widget class="GtkImage" id="add_mime_type_image">
                             <property name="visible">True</property>
                             <property name="stock">gtk-add</property>
+                            <property name="icon-size">1</property>
                           </widget>
                         </child>
                       </widget>
@@ -331,6 +391,7 @@
                           <widget class="GtkImage" id="add_definition_to_mime_image">
                             <property name="visible">True</property>
                             <property name="stock">gtk-add</property>
+                            <property name="icon-size">1</property>
                           </widget>
                         </child>
                       </widget>
@@ -357,6 +418,7 @@
                           <widget class="GtkImage" id="add_vhost_image">
                             <property name="visible">True</property>
                             <property name="stock">gtk-add</property>
+                            <property name="icon-size">1</property>
                           </widget>
                         </child>
                       </widget>
@@ -371,6 +433,7 @@
                           <widget class="GtkImage" id="add_log_to_vhost_image">
                             <property name="visible">True</property>
                             <property name="stock">gtk-add</property>
+                            <property name="icon-size">1</property>
                           </widget>
                         </child>
                       </widget>



commit e7ad47b23cb6a3c74ac0ae0e5cdc609598ded717
Author: Marek Aaron Sapota <maarons@gnu.org>
Date:   Fri Jul 31 15:07:50 2009 +0200

    Added gui edition of additional Log properties.

diff --git a/misc/PyGTK_Control/MIMEWidgets.py b/misc/PyGTK_Control/MIMEWidgets.py
index dd826d4..a6f0938 100644
--- a/misc/PyGTK_Control/MIMEWidgets.py
+++ b/misc/PyGTK_Control/MIMEWidgets.py
@@ -66,7 +66,7 @@ class MimeTreeView(gtk.TreeView):
 class MimeTable(gtk.Table):
     def __init__(self, tree, def_tree, def_table):
         gtk.Table.__init__(self, len(GUIConfig.mime_attributes) +
-                           3 * len(GUIConfig.mime_lists), 4)
+                           3 * len(GUIConfig.mime_lists), 3)
 
         tree.connect('cursor-changed', self.cursor_changed)
         self.last_selected = None
@@ -81,8 +81,8 @@ class MimeTable(gtk.Table):
             check = gtk.CheckButton()
             self.attributes[attribute] = (entry, check, )
             self.attach(label, 0, 1, i, i + 1, yoptions = gtk.FILL)
-            self.attach(entry, 1, 3, i, i + 1, yoptions = gtk.FILL)
-            self.attach(check, 3, 4, i, i + 1, gtk.FILL, gtk.FILL)
+            self.attach(entry, 1, 2, i, i + 1, yoptions = gtk.FILL)
+            self.attach(check, 2, 3, i, i + 1, gtk.FILL, gtk.FILL)
             i += 1
         self.mime_lists = {}
         for mime_list in GUIConfig.mime_lists:
@@ -116,10 +116,10 @@ class MimeTable(gtk.Table):
             remove_button.connect('clicked', remove_from_tree, tree)
 
             self.mime_lists[mime_list] = tree_model
-            self.attach(tree_scroll, 0, 2, i, i + 3)
-            self.attach(add_button, 2, 3, i, i + 1, yoptions = gtk.FILL)
-            self.attach(remove_button, 2, 3, i + 1, i + 2, yoptions = gtk.FILL)
-            self.attach(gtk.Label(), 2, 3, i + 2, i + 3)
+            self.attach(tree_scroll, 1, 2, i, i + 3)
+            self.attach(add_button, 0, 1, i, i + 1, yoptions = gtk.FILL)
+            self.attach(remove_button, 0, 1, i + 1, i + 2, yoptions = gtk.FILL)
+            self.attach(gtk.Label(), 0, 1, i + 2, i + 3)
             i += 3
             
     def clear(self):
diff --git a/misc/PyGTK_Control/MyServerControl.py b/misc/PyGTK_Control/MyServerControl.py
index 1d38ce4..e367b0e 100644
--- a/misc/PyGTK_Control/MyServerControl.py
+++ b/misc/PyGTK_Control/MyServerControl.py
@@ -380,9 +380,9 @@ class PyGTKControl():
 
         panels = gtk.HPaned()
         tree = MimeTreeView()
-        panels.pack1(tree.scroll, True, False)
+        panels.pack1(tree.scroll, False, False)
         table = MimeTable(tree, def_tree, def_table)
-        panels.pack2(table, False, False)
+        panels.pack2(table, True, False)
 
         vpanels.pack1(panels)
         
@@ -396,9 +396,9 @@ class PyGTKControl():
         '''Reads vhost options from file and prepares GUI.'''
         panels = gtk.HPaned()
         tree = VHostTreeView()
-        panels.pack1(tree.scroll, True, False)
+        panels.pack1(tree.scroll, False, False)
         table = VHostTable(tree)
-        panels.pack2(table, False, False)
+        panels.pack2(table.scroll, True, False)
 
         self.vhost_tab = (table, tree, )
         self.widgets.get_widget('notebook').append_page(
diff --git a/misc/PyGTK_Control/VHostWidgets.py b/misc/PyGTK_Control/VHostWidgets.py
index 43f982d..039b708 100644
--- a/misc/PyGTK_Control/VHostWidgets.py
+++ b/misc/PyGTK_Control/VHostWidgets.py
@@ -43,10 +43,14 @@ class FilterTreeView(gtk.TreeView):
         self.scroll.add(self)
 
 class StreamTreeView(gtk.TreeView):
-    def __init__(self, filter_tree):
+    def __init__(self, filter_tree, cycle, cycle_gzip):
         gtk.TreeView.__init__(self, gtk.ListStore(
                 gobject.TYPE_STRING, # stream location
-                gobject.TYPE_PYOBJECT)) # list of filters
+                gobject.TYPE_PYOBJECT, # list of filters
+                gobject.TYPE_PYOBJECT, # (cycle, cycle active, )
+                gobject.TYPE_BOOLEAN)) # cycle_gzip
+        self.cycle = cycle
+        self.cycle_gzip = cycle_gzip
         self.filter_model = filter_tree.get_model()
         model = self.get_model()
         def edited_handler(cell, path, text, model):
@@ -58,6 +62,7 @@ class StreamTreeView(gtk.TreeView):
         column.pack_start(renderer)
         column.add_attribute(renderer, 'text', 0)
         self.append_column(column)
+
         self.scroll = gtk.ScrolledWindow()
         self.scroll.set_policy(gtk.POLICY_AUTOMATIC, gtk.POLICY_AUTOMATIC)
         self.scroll.set_shadow_type(gtk.SHADOW_OUT)
@@ -70,6 +75,10 @@ class StreamTreeView(gtk.TreeView):
     def clear(self):
         self.filter_model.clear()
         self.last_selected = None
+        entry, check = self.cycle
+        entry.set_value(0)
+        check.set_active(False)
+        self.cycle_gzip.set_active(False)
 
     def save_changed(self):
         model = self.filter_model
@@ -81,6 +90,9 @@ class StreamTreeView(gtk.TreeView):
                 i = model.iter_next(i)
             row = self.get_model()[self.last_selected]
             row[1] = filters
+            entry, check = self.cycle
+            row[2] = (entry.get_value(), check.get_active(), )
+            row[3] = self.cycle_gzip.get_active()
 
     def cursor_changed(self, tree):
         self.save_changed()
@@ -93,13 +105,19 @@ class StreamTreeView(gtk.TreeView):
         row = tree.get_model()[current]
         for element in row[1]: # add all filters
             model.append((element, ))
+        entry, check = self.cycle
+        entry.set_value(row[2][0])
+        check.set_active(row[2][1])
+        self.cycle_gzip.set_active(row[3])
 
 class LogTreeView(gtk.TreeView):
-    def __init__(self, stream_tree):
+    def __init__(self, stream_tree, log_type):
         gtk.TreeView.__init__(self, gtk.ListStore(
                 gobject.TYPE_STRING, # log name
-                gobject.TYPE_PYOBJECT)) # list of streams
+                gobject.TYPE_PYOBJECT, # list of streams
+                gobject.TYPE_PYOBJECT)) # (log_type, log_type enabled, )
         self.stream_tree = stream_tree
+        self.log_type = log_type
         model = self.get_model()
         def edited_handler(cell, path, text, model):
             model[path][0] = text
@@ -123,6 +141,9 @@ class LogTreeView(gtk.TreeView):
         self.stream_tree.clear()
         self.last_selected = None
         self.stream_tree.get_model().clear()
+        entry, check = self.log_type
+        entry.set_text('')
+        check.set_active(False)
         
     def save_changed(self):
         self.stream_tree.save_changed()
@@ -132,10 +153,12 @@ class LogTreeView(gtk.TreeView):
             i = model.iter_children(None)
             while i is not None: # iterate over streams
                 row = model[i]
-                streams.append((row[0], row[1], ))
+                streams.append((row[0], row[1], row[2], row[3], ))
                 i = model.iter_next(i)
             row = self.get_model()[self.last_selected]
             row[1] = streams
+            entry, check = self.log_type
+            row[2] = (entry.get_text(), check.get_active(), )
 
     def cursor_changed(self, tree):
         self.save_changed()
@@ -148,6 +171,9 @@ class LogTreeView(gtk.TreeView):
         row = tree.get_model()[current]
         for stream in row[1]:
             model.append(stream)
+        entry, check = self.log_type
+        entry.set_text(row[2][0])
+        check.set_active(row[2][1])
 
     def get_logs(self):
         self.save_changed()
@@ -156,7 +182,7 @@ class LogTreeView(gtk.TreeView):
         i = model.iter_children(None)
         while i is not None: # iterate over logs
             row = model[i]
-            logs.append((row[0], row[1], ))
+            logs.append((row[0], row[1], row[2], ))
             i = model.iter_next(i)
         return logs
 
@@ -166,7 +192,7 @@ class LogTreeView(gtk.TreeView):
         model = self.get_model()
         model.clear()
         for log in logs:
-            model.append((log[0], log[1], ))
+            model.append((log[0], log[1], log[2], ))
 
 class VHostTreeView(gtk.TreeView):
     def __init__(self):
@@ -218,8 +244,19 @@ class VHostTreeView(gtk.TreeView):
                 streams = []
                 for stream in log.get_streams():
                     filters = stream.get_filters()
-                    streams.append((stream.get_location(), filters, ))
-                logs.append((log.get_log_type(), streams, ))
+                    cycle = stream.get_cycle()
+                    cycle_active = cycle is not None
+                    if cycle is None:
+                        cycle = ''
+                    cycle_gzip = stream.get_cycle_gzip()
+                    streams.append((stream.get_location(), filters,
+                                    (cycle, cycle_active, ), cycle_gzip, ))
+                log_type = log.get_type()
+                log_type_enabled = log_type is not None
+                if log_type is None:
+                    log_type = ''
+                logs.append((log.get_log_type(), streams,
+                             (log_type, log_type_enabled, ), ))
             model.append((getattr(vhost, 'get_' + GUIConfig.vhost_name)(),
                           attributes,
                           vhost_lists,
@@ -228,7 +265,7 @@ class VHostTreeView(gtk.TreeView):
 class VHostTable(gtk.Table):
     def __init__(self, tree):
         gtk.Table.__init__(self, len(GUIConfig.vhost_attributes) +
-                           3 * len(GUIConfig.vhost_lists) + 3, 4)
+                           3 * len(GUIConfig.vhost_lists) + 6, 3)
 
         tree.connect('cursor-changed', self.cursor_changed)
         self.last_selected = None
@@ -241,8 +278,8 @@ class VHostTable(gtk.Table):
             check = gtk.CheckButton()
             self.attributes[attribute] = (entry, check, )
             self.attach(label, 0, 1, i, i + 1, yoptions = gtk.FILL)
-            self.attach(entry, 1, 3, i, i + 1, yoptions = gtk.FILL)
-            self.attach(check, 3, 4, i, i + 1, gtk.FILL, gtk.FILL)
+            self.attach(entry, 1, 2, i, i + 1, yoptions = gtk.FILL)
+            self.attach(check, 2, 3, i, i + 1, gtk.FILL, gtk.FILL)
             i += 1
             
         self.vhost_lists = {}
@@ -290,20 +327,42 @@ class VHostTable(gtk.Table):
             remove_button.connect('clicked', remove_from_tree, tree)
 
             self.vhost_lists[name] = tree_model
-            self.attach(tree_scroll, 0, 2, i, i + 3)
-            self.attach(add_button, 2, 3, i, i + 1, yoptions = gtk.FILL)
-            self.attach(remove_button, 2, 3, i + 1, i + 2, yoptions = gtk.FILL)
-            self.attach(gtk.Label(), 2, 3, i + 2, i + 3)
+            self.attach(tree_scroll, 1, 2, i, i + 3)
+            self.attach(add_button, 0, 1, i, i + 1, yoptions = gtk.FILL)
+            self.attach(remove_button, 0, 1, i + 1, i + 2, yoptions = gtk.FILL)
+            self.attach(gtk.Label(), 0, 1, i + 2, i + 3)
             i += 3
 
         # Add logs
+        log_type_label = gtk.Label('log type')
+        log_type_entry = gtk.Entry()
+        log_type_check = gtk.CheckButton()
+        self.attach(log_type_label, 0, 1, i + 3, i + 4, yoptions = gtk.FILL)
+        self.attach(log_type_entry, 1, 2, i + 3, i + 4, yoptions = gtk.FILL)
+        self.attach(log_type_check, 2, 3, i + 3, i + 4, gtk.FILL, gtk.FILL)
+
+        cycle_label = gtk.Label('cycle')
+        cycle_entry = gtk.SpinButton(gtk.Adjustment(upper = 2 ** 32,
+                                                    step_incr = 1))
+        cycle_check = gtk.CheckButton()
+        cycle_gzip_label = gtk.Label('cycle gzip')
+        cycle_gzip_check = gtk.CheckButton()
+        self.attach(cycle_label, 0, 1, i + 4, i + 5, yoptions = gtk.FILL)
+        self.attach(cycle_entry, 1, 2, i + 4, i + 5, yoptions = gtk.FILL)
+        self.attach(cycle_check, 2, 3, i + 4, i + 5, gtk.FILL, gtk.FILL)
+        self.attach(cycle_gzip_label, 0, 1, i + 5, i + 6, yoptions = gtk.FILL)
+        self.attach(cycle_gzip_check, 2, 3, i + 5, i + 6, gtk.FILL, gtk.FILL)
+        
         filter_tree = FilterTreeView()
-        stream_tree = StreamTreeView(filter_tree)
-        self.log_tree = LogTreeView(stream_tree)
+        stream_tree = StreamTreeView(filter_tree,
+                                     (cycle_entry, cycle_check, ),
+                                     cycle_gzip_check)
+        self.log_tree = LogTreeView(stream_tree, (log_type_entry,
+                                                  log_type_check, ))
         self.log_model = self.log_tree.get_model()
 
         def add_stream(button, model):
-            model.append(('', [], ))
+            model.append(('', [], (0, False, ), False, ))
         add_stream_button = gtk.Button('Add stream')
         add_stream_button.connect(
             'clicked', add_stream, stream_tree.get_model())
@@ -328,14 +387,18 @@ class VHostTable(gtk.Table):
         button_grid.attach(remove_stream_button, 0, 1, 1, 2)
         button_grid.attach(remove_filter_button, 1, 2, 1, 2)
 
-        self.attach(self.log_tree.scroll, 0, 2, i, i + 3)
-        self.attach(button_grid, 2, 3, i, i + 1, yoptions = gtk.FILL)
-        self.attach(stream_tree.scroll, 2, 3, i + 1, i + 2)
-        self.attach(filter_tree.scroll, 2, 3, i + 2, i + 3)
+        self.attach(self.log_tree.scroll, 0, 1, i, i + 3)
+        self.attach(button_grid, 1, 2, i, i + 1, yoptions = gtk.FILL)
+        self.attach(stream_tree.scroll, 1, 2, i + 1, i + 2)
+        self.attach(filter_tree.scroll, 1, 2, i + 2, i + 3)
+
+        self.scroll = gtk.ScrolledWindow()
+        self.scroll.set_policy(gtk.POLICY_AUTOMATIC, gtk.POLICY_AUTOMATIC)
+        self.scroll.add_with_viewport(self)
 
     def add_log(self):
         '''Add a log to currently selected VHost.'''
-        self.log_model.append(('', [], ))
+        self.log_model.append(('', [], ('', False, )))
             
     def clear(self):
         '''Clear input widgets.'''
@@ -400,8 +463,15 @@ class VHostTable(gtk.Table):
             for log in row[3]:
                 streams = []
                 for stream in log[1]:
-                    streams.append(Stream(stream[0], filters = stream[1]))
-                logs.append(Log(log[0], streams = streams))
+                    cycle, enabled = stream[2]
+                    if not enabled:
+                        cycle = None
+                    cycle_gzip = stream[3]
+                    streams.append(Stream(stream[0], cycle, cycle_gzip, stream[1]))
+                log_type, enabled = log[2]
+                if not enabled:
+                    log_type = None
+                logs.append(Log(log[0], streams, log_type))
             vhost = VHost(row[0], logs = logs)
             for attribute in row[1]:
                 text, enabled = row[1][attribute]



commit 9c64c9d44ce1b960917d4bd307935db995ea14d0
Author: Marek Aaron Sapota <maarons@gnu.org>
Date:   Wed Jul 29 15:08:43 2009 +0200

    Open, save of VHosts.

diff --git a/misc/PyGTK_Control/MyServerControl.py b/misc/PyGTK_Control/MyServerControl.py
index 49103d8..1d38ce4 100644
--- a/misc/PyGTK_Control/MyServerControl.py
+++ b/misc/PyGTK_Control/MyServerControl.py
@@ -24,6 +24,7 @@ import GUIConfig
 from MyServer.pycontrollib.config import MyServerConfig
 from MyServer.pycontrollib.mimetypes import MIMETypes
 from MyServer.pycontrollib.controller import Controller
+from MyServer.pycontrollib.vhost import VHosts
 from AboutWindow import About
 from ConnectionWindow import Connection
 from DefinitionWidgets import DefinitionTable, DefinitionTreeView
@@ -104,6 +105,14 @@ class PyGTKControl():
         table.clear()
         tree.get_model().clear()
 
+    def on_new_vhost_menu_item_activate(self, widget = None):
+        '''Clears VHost configuration.'''
+        if widget is not None:
+            self.vhost_path = None
+        table, tree = self.vhost_tab
+        table.clear()
+        tree.get_model().clear()
+
     def on_open_config_menu_item_activate(self, widget):
         '''Open local server configuration file.'''
         if self.chooser is not None:
@@ -140,6 +149,24 @@ class PyGTKControl():
         self.chooser.connect('response', handle_response)
         self.chooser.show()
 
+    def on_open_vhost_menu_item_activate(self, widget):
+        '''Open local VHost configuration file.'''
+        if self.chooser is not None:
+            self.chooser.destroy()
+        self.chooser = gtk.FileChooserDialog(
+            'Open VHost configuration file.',
+            buttons = (gtk.STOCK_CANCEL, gtk.RESPONSE_CANCEL,
+                       gtk.STOCK_OPEN, gtk.RESPONSE_OK))
+        def handle_response(widget, response):
+            if response == gtk.RESPONSE_OK:
+                self.vhost_path = self.chooser.get_filename()
+                with open(self.vhost_path) as f:
+                    conf = VHosts.from_string(f.read())
+                self.set_up_vhost(conf)
+            self.chooser.destroy()
+        self.chooser.connect('response', handle_response)
+        self.chooser.show()
+
     def on_save_as_config_menu_item_activate(self, widget):
         '''Save server configuration as local file.'''
         if self.chooser is not None:
@@ -157,7 +184,7 @@ class PyGTKControl():
         self.chooser.connect('response', handle_response)
         self.chooser.show()
 
-    def on_save_as_mime_config_menu_item_activate(self, widget):
+    def on_save_as_mime_menu_item_activate(self, widget):
         '''Save MIME configuration as local file.'''
         if self.chooser is not None:
             self.chooser.destroy()
@@ -174,6 +201,23 @@ class PyGTKControl():
         self.chooser.connect('response', handle_response)
         self.chooser.show()
 
+    def on_save_as_vhost_menu_item_activate(self, widget):
+        '''Save VHost configuration as local file.'''
+        if self.chooser is not None:
+            self.chooser.destroy()
+        self.chooser = gtk.FileChooserDialog(
+            'Save VHost configuration file.',
+            action = gtk.FILE_CHOOSER_ACTION_SAVE,
+            buttons = (gtk.STOCK_CANCEL, gtk.RESPONSE_CANCEL,
+                       gtk.STOCK_SAVE_AS, gtk.RESPONSE_OK))
+        def handle_response(widget, response):
+            if response == gtk.RESPONSE_OK:
+                self.vhost_path = self.chooser.get_filename()
+                self.on_save_vhost_menu_item_activate(widget)
+            self.chooser.destroy()
+        self.chooser.connect('response', handle_response)
+        self.chooser.show()
+
     def on_save_config_menu_item_activate(self, widget):
         '''Save server configuration to file.'''
         if self.config_path is None:
@@ -192,6 +236,15 @@ class PyGTKControl():
             with open(self.mime_path, 'w') as f:
                 f.write(str(config))
 
+    def on_save_vhost_menu_item_activate(self, widget):
+        '''Save VHost configuration to file.'''
+        if self.vhost_path is None:
+            self.on_save_as_vhost_config_menu_item_activate(widget)
+        else:
+            config = self.get_current_vhost()
+            with open(self.vhost_path, 'w') as f:
+                f.write(str(config))
+
     def get_current_config(self):
         '''Returns current server configuration as MyServerConfig instance.'''
         definitions = []
@@ -201,11 +254,17 @@ class PyGTKControl():
         return MyServerConfig(definitions)
 
     def get_current_mime(self):
-        '''Returns current mime configuration as MIMETypes instance.'''
+        '''Returns current MIME configuration as MIMETypes instance.'''
         table, tree = self.mime_tab[0]
         mimes = table.make_def(tree)
         return MIMETypes(mimes)
 
+    def get_current_vhost(self):
+        '''Returns current VHost configuration as VHosts instance.'''
+        table, tree = self.vhost_tab
+        mimes = table.make_def(tree)
+        return VHosts(mimes)
+
     def on_add_unknown_definition_menu_item_activate(self, widget):
         '''Adds a new definition to unknown tab.'''
         table, tree = self.tabs['unknown']
@@ -258,6 +317,12 @@ class PyGTKControl():
         tree = self.mime_tab[0][1]
         tree.set_up(config.MIME_types)
 
+    def set_up_vhost(self, config):
+        '''Reads VHost configuration from given config instance.'''
+        self.on_new_vhost_menu_item_activate()
+        tree = self.vhost_tab[1]
+        tree.set_up(config.VHosts)
+
     def construct_options(self):
         '''Reads known options from file and prepares GUI.'''
 
diff --git a/misc/PyGTK_Control/VHostWidgets.py b/misc/PyGTK_Control/VHostWidgets.py
index a7012e6..43f982d 100644
--- a/misc/PyGTK_Control/VHostWidgets.py
+++ b/misc/PyGTK_Control/VHostWidgets.py
@@ -19,6 +19,8 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 import gtk
 import gobject
 import GUIConfig
+from MyServer.pycontrollib.log import Log, Stream
+from MyServer.pycontrollib.vhost import VHost
 
 class FilterTreeView(gtk.TreeView):
     def __init__(self):
@@ -150,11 +152,11 @@ class LogTreeView(gtk.TreeView):
     def get_logs(self):
         self.save_changed()
         model = self.get_model()
-        logs = {}
+        logs = []
         i = model.iter_children(None)
         while i is not None: # iterate over logs
             row = model[i]
-            logs[row[0]] = row[1]
+            logs.append((row[0], row[1], ))
             i = model.iter_next(i)
         return logs
 
@@ -164,7 +166,7 @@ class LogTreeView(gtk.TreeView):
         model = self.get_model()
         model.clear()
         for log in logs:
-            model.append((log, logs[log], ))
+            model.append((log[0], log[1], ))
 
 class VHostTreeView(gtk.TreeView):
     def __init__(self):
@@ -191,22 +193,37 @@ class VHostTreeView(gtk.TreeView):
         self.scroll.set_border_width(5)
         self.scroll.add(self)
 
-    # def set_up(self, MIME_types):
-    #     '''Fill model with data provided as list of MIME types.'''
-    #     model = self.get_model()
-    #     for mime in MIME_types:
-    #         attributes = {}
-    #         for attribute in GUIConfig.mime_attributes:
-    #             a = getattr(mime, 'get_' + attribute)()
-    #             if a is not None:
-    #                 attributes[attribute] = (a, True, )
-    #         mime_lists = {}
-    #         for mime_list in GUIConfig.mime_lists:
-    #             mime_lists[mime_list] = getattr(mime, 'get_' + mime_list)()
-    #         model.append((getattr(mime, 'get_' + GUIConfig.mime_name)(),
-    #                       attributes,
-    #                       mime_lists,
-    #                       mime.get_definitions(), ))
+    def set_up(self, vhosts):
+        '''Fill model with data provided as list of Vhosts.'''
+        model = self.get_model()
+        for vhost in vhosts:
+            attributes = {}
+            for attribute in GUIConfig.vhost_attributes:
+                a = getattr(vhost, 'get_' + attribute)()
+                if a is not None:
+                    attributes[attribute] = (str(a), True, )
+            vhost_lists = {}
+            for vhost_list in GUIConfig.vhost_lists:
+                vhost_list = vhost_list[0]
+                l = getattr(vhost, 'get_' + vhost_list)()
+                m = []
+                for element in l:
+                    if isinstance(l, dict):
+                        m.append((element, l[element], ))
+                    else:
+                        m.append((element, ))
+                vhost_lists[vhost_list] = m
+            logs = []
+            for log in vhost.get_logs():
+                streams = []
+                for stream in log.get_streams():
+                    filters = stream.get_filters()
+                    streams.append((stream.get_location(), filters, ))
+                logs.append((log.get_log_type(), streams, ))
+            model.append((getattr(vhost, 'get_' + GUIConfig.vhost_name)(),
+                          attributes,
+                          vhost_lists,
+                          logs, ))
 
 class VHostTable(gtk.Table):
     def __init__(self, tree):
@@ -327,6 +344,8 @@ class VHostTable(gtk.Table):
             check.set_active(False)
         for model in self.vhost_lists.itervalues():
             model.clear()
+        self.log_tree.clear()
+        self.log_tree.get_model().clear()
         self.last_selected = None
 
     def save_changed(self, tree):
@@ -369,22 +388,28 @@ class VHostTable(gtk.Table):
                 model.append(element)
         self.log_tree.set_logs(row[3])
 
-    # def make_def(self, tree):
-    #     '''Export all data as list of MIME types.'''
-    #     self.save_changed(tree)
-    #     model = tree.get_model()
-    #     mimes = []
-    #     i = model.iter_children(None)
-    #     while i is not None: # iterate over MIME types
-    #         row = model[i]
-    #         mime = MIMEType(row[0], definitions = row[3])
-    #         for attribute in row[1]:
-    #             text, enabled = row[1][attribute]
-    #             if enabled:
-    #                 getattr(mime, 'set_' + attribute)(text)
-    #         for mime_list in row[2]:
-    #             for entry in row[2][mime_list]:
-    #                 getattr(mime, 'add_' + mime_list[:-1])(entry)
-    #         mimes.append(mime)
-    #         i = model.iter_next(i)
-    #     return mimes
+    def make_def(self, tree):
+        '''Export all data as list of VHosts.'''
+        self.save_changed(tree)
+        model = tree.get_model()
+        vhosts = []
+        i = model.iter_children(None)
+        while i is not None: # iterate over VHosts
+            row = model[i]
+            logs = []
+            for log in row[3]:
+                streams = []
+                for stream in log[1]:
+                    streams.append(Stream(stream[0], filters = stream[1]))
+                logs.append(Log(log[0], streams = streams))
+            vhost = VHost(row[0], logs = logs)
+            for attribute in row[1]:
+                text, enabled = row[1][attribute]
+                if enabled:
+                    getattr(vhost, 'set_' + attribute)(text)
+            for vhost_list in row[2]:
+                for entry in row[2][vhost_list]:
+                    getattr(vhost, 'add_' + vhost_list)(*entry)
+            vhosts.append(vhost)
+            i = model.iter_next(i)
+        return vhosts



commit 91f91d95e12396a71f64c29af06172741bd6aa72
Author: Marek Aaron Sapota <maarons@gnu.org>
Date:   Tue Jul 28 00:35:24 2009 +0200

    Full support for logs.

diff --git a/misc/PyGTK_Control/VHostWidgets.py b/misc/PyGTK_Control/VHostWidgets.py
index 93dac9b..a7012e6 100644
--- a/misc/PyGTK_Control/VHostWidgets.py
+++ b/misc/PyGTK_Control/VHostWidgets.py
@@ -20,19 +20,17 @@ import gtk
 import gobject
 import GUIConfig
 
-class LogTreeView(gtk.TreeView):
+class FilterTreeView(gtk.TreeView):
     def __init__(self):
         gtk.TreeView.__init__(self, gtk.ListStore(
-                gobject.TYPE_STRING, # log name
-                gobject.TYPE_PYOBJECT)) # list of streams
+                gobject.TYPE_STRING))
         model = self.get_model()
-        self.last_selected = None
         def edited_handler(cell, path, text, model):
             model[path][0] = text
         renderer = gtk.CellRendererText()
         renderer.set_property('editable', True)
         renderer.connect('edited', edited_handler, model)
-        column = gtk.TreeViewColumn('Log')
+        column = gtk.TreeViewColumn('Filter')
         column.pack_start(renderer)
         column.add_attribute(renderer, 'text', 0)
         self.append_column(column)
@@ -42,51 +40,115 @@ class LogTreeView(gtk.TreeView):
         self.scroll.set_border_width(5)
         self.scroll.add(self)
 
-        self.stream_tree = stream_tree = gtk.TreeView(
-            gtk.ListStore(gobject.TYPE_STRING))
-        self.stream_model = stream_model = stream_tree.get_model()
-        def stream_edited_handler(cell, path, text, model):
+class StreamTreeView(gtk.TreeView):
+    def __init__(self, filter_tree):
+        gtk.TreeView.__init__(self, gtk.ListStore(
+                gobject.TYPE_STRING, # stream location
+                gobject.TYPE_PYOBJECT)) # list of filters
+        self.filter_model = filter_tree.get_model()
+        model = self.get_model()
+        def edited_handler(cell, path, text, model):
             model[path][0] = text
         renderer = gtk.CellRendererText()
         renderer.set_property('editable', True)
-        renderer.connect('edited', stream_edited_handler, stream_model)
+        renderer.connect('edited', edited_handler, model)
         column = gtk.TreeViewColumn('Stream')
         column.pack_start(renderer)
         column.add_attribute(renderer, 'text', 0)
-        stream_tree.append_column(column)
-        self.stream_scroll = gtk.ScrolledWindow()
-        self.stream_scroll.set_policy(gtk.POLICY_AUTOMATIC, gtk.POLICY_AUTOMATIC)
-        self.stream_scroll.set_shadow_type(gtk.SHADOW_OUT)
-        self.stream_scroll.set_border_width(5)
-        self.stream_scroll.add(stream_tree)
+        self.append_column(column)
+        self.scroll = gtk.ScrolledWindow()
+        self.scroll.set_policy(gtk.POLICY_AUTOMATIC, gtk.POLICY_AUTOMATIC)
+        self.scroll.set_shadow_type(gtk.SHADOW_OUT)
+        self.scroll.set_border_width(5)
+        self.scroll.add(self)
 
+        self.last_selected = None
         self.connect('cursor-changed', self.cursor_changed)
 
-    def save_changed(self, tree):
-        model = self.stream_model
+    def clear(self):
+        self.filter_model.clear()
+        self.last_selected = None
+
+    def save_changed(self):
+        model = self.filter_model
+        if self.last_selected is not None:
+            filters = []
+            i = model.iter_children(None)
+            while i is not None: # iterate over filters
+                filters.append(model[i][0])
+                i = model.iter_next(i)
+            row = self.get_model()[self.last_selected]
+            row[1] = filters
+
+    def cursor_changed(self, tree):
+        self.save_changed()
+
+        self.clear()
+        model = self.filter_model
+
+        self.last_selected = current = \
+            tree.get_selection().get_selected()[1]
+        row = tree.get_model()[current]
+        for element in row[1]: # add all filters
+            model.append((element, ))
+
+class LogTreeView(gtk.TreeView):
+    def __init__(self, stream_tree):
+        gtk.TreeView.__init__(self, gtk.ListStore(
+                gobject.TYPE_STRING, # log name
+                gobject.TYPE_PYOBJECT)) # list of streams
+        self.stream_tree = stream_tree
+        model = self.get_model()
+        def edited_handler(cell, path, text, model):
+            model[path][0] = text
+        renderer = gtk.CellRendererText()
+        renderer.set_property('editable', True)
+        renderer.connect('edited', edited_handler, model)
+        column = gtk.TreeViewColumn('Log')
+        column.pack_start(renderer)
+        column.add_attribute(renderer, 'text', 0)
+        self.append_column(column)
+        self.scroll = gtk.ScrolledWindow()
+        self.scroll.set_policy(gtk.POLICY_AUTOMATIC, gtk.POLICY_AUTOMATIC)
+        self.scroll.set_shadow_type(gtk.SHADOW_OUT)
+        self.scroll.set_border_width(5)
+        self.scroll.add(self)
+        
+        self.last_selected = None
+        self.connect('cursor-changed', self.cursor_changed)
+
+    def clear(self):
+        self.stream_tree.clear()
+        self.last_selected = None
+        self.stream_tree.get_model().clear()
+        
+    def save_changed(self):
+        self.stream_tree.save_changed()
+        model = self.stream_tree.get_model()
         if self.last_selected is not None:
             streams = []
             i = model.iter_children(None)
             while i is not None: # iterate over streams
-                streams.append(model[i][0])
+                row = model[i]
+                streams.append((row[0], row[1], ))
                 i = model.iter_next(i)
-            row = tree.get_model()[self.last_selected]
+            row = self.get_model()[self.last_selected]
             row[1] = streams
 
     def cursor_changed(self, tree):
-        self.save_changed(tree)
+        self.save_changed()
 
-        model = self.stream_model
-        model.clear()
+        self.clear()
+        model = self.stream_tree.get_model()
 
         self.last_selected = current = \
             tree.get_selection().get_selected()[1]
         row = tree.get_model()[current]
         for stream in row[1]:
-            model.append((stream, ))
+            model.append(stream)
 
     def get_logs(self):
-        self.save_changed(self)
+        self.save_changed()
         model = self.get_model()
         logs = {}
         i = model.iter_children(None)
@@ -97,8 +159,7 @@ class LogTreeView(gtk.TreeView):
         return logs
 
     def set_logs(self, logs):
-        self.stream_model.clear()
-        self.stream_tree.get_selection().unselect_all()
+        self.clear()
         self.last_selected = None
         model = self.get_model()
         model.clear()
@@ -219,25 +280,41 @@ class VHostTable(gtk.Table):
             i += 3
 
         # Add logs
-        self.log_tree = log_tree = LogTreeView()
-        self.log_model = log_tree.get_model()
+        filter_tree = FilterTreeView()
+        stream_tree = StreamTreeView(filter_tree)
+        self.log_tree = LogTreeView(stream_tree)
+        self.log_model = self.log_tree.get_model()
 
         def add_stream(button, model):
+            model.append(('', [], ))
+        add_stream_button = gtk.Button('Add stream')
+        add_stream_button.connect(
+            'clicked', add_stream, stream_tree.get_model())
+        def add_filter(button, model):
             model.append(('', ))
-        add_button = gtk.Button('Add')
-        add_button.connect('clicked', add_stream, log_tree.stream_model)
+        add_filter_button = gtk.Button('Add filter')
+        add_filter_button.connect(
+            'clicked', add_filter, filter_tree.get_model())
 
-        def remove_stream(button, tree):
+        def remove_selected(button, tree):
             model, selected = tree.get_selection().get_selected()
             if selected is not None:
                 model.remove(selected)
-        remove_button = gtk.Button('Remove')
-        remove_button.connect('clicked', remove_stream, log_tree.stream_tree)
+        remove_stream_button = gtk.Button('Remove stream')
+        remove_stream_button.connect('clicked', remove_selected, stream_tree)
+        remove_filter_button = gtk.Button('Remove filter')
+        remove_filter_button.connect('clicked', remove_selected, filter_tree)
+
+        button_grid = gtk.Table(2, 2)
+        button_grid.attach(add_stream_button, 0, 1, 0, 1)
+        button_grid.attach(add_filter_button, 1, 2, 0, 1)
+        button_grid.attach(remove_stream_button, 0, 1, 1, 2)
+        button_grid.attach(remove_filter_button, 1, 2, 1, 2)
 
-        self.attach(log_tree.scroll, 0, 2, i, i + 3)
-        self.attach(add_button, 2, 3, i, i + 1, yoptions = gtk.FILL)
-        self.attach(remove_button, 2, 3, i + 1, i + 2, yoptions = gtk.FILL)
-        self.attach(log_tree.stream_scroll, 2, 3, i + 2, i + 3)
+        self.attach(self.log_tree.scroll, 0, 2, i, i + 3)
+        self.attach(button_grid, 2, 3, i, i + 1, yoptions = gtk.FILL)
+        self.attach(stream_tree.scroll, 2, 3, i + 1, i + 2)
+        self.attach(filter_tree.scroll, 2, 3, i + 2, i + 3)
 
     def add_log(self):
         '''Add a log to currently selected VHost.'''



commit c91a8e42dbbdd0bd4ab595f9e3b94c0829d0a93c
Author: Marek Aaron Sapota <maarons@gnu.org>
Date:   Mon Jul 27 01:21:12 2009 +0200

    Added VHosts.
    
    Logs lack filters, cycle and cycle_gzip. VHosts can't be saved or read
    from file.

diff --git a/misc/PyGTK_Control/DefinitionWidgets.py b/misc/PyGTK_Control/DefinitionWidgets.py
index 5b6d185..6ef23a2 100644
--- a/misc/PyGTK_Control/DefinitionWidgets.py
+++ b/misc/PyGTK_Control/DefinitionWidgets.py
@@ -38,15 +38,7 @@ class DefinitionTable(gtk.Table):
         self.value_check_field = value_checkbutton = gtk.CheckButton()
         value_checkbutton.set_tooltip_text('If active value will be used.')
         value_checkbutton.set_active(True)
-        def toggle_value(button, tree):
-            # don't allow value for definition with children
-            model, selected = tree.get_selection().get_selected()
-            if selected is not None and model.iter_children(selected) is not None:
-                button.set_active(False)
-                return
-            active = button.get_active()
-            self.value_field.set_editable(active)
-        value_checkbutton.connect('toggled', toggle_value, tree)
+
         self.attach(value_label, 0, 1, 1, 2, gtk.FILL, gtk.FILL)
         self.attach(value_entry, 1, 2, 1, 2, yoptions = gtk.FILL)
         self.attach(value_checkbutton, 2, 3, 1, 2, gtk.FILL, gtk.FILL)
@@ -57,7 +49,6 @@ class DefinitionTable(gtk.Table):
             if selected is not None:
                 model.append(selected, ('', '', False, True, '', False, {}, ))
                 self.value_check_field.set_active(False) # auto disable value
-                self.value_field.set_editable(False)
         add_definition_button.connect('clicked', add_sub_definition)
         self.attach(add_definition_button, 0, 3, 2, 3, yoptions = gtk.FILL)
 
diff --git a/misc/PyGTK_Control/GUIConfig.py b/misc/PyGTK_Control/GUIConfig.py
index c51f5f6..fc14f6e 100644
--- a/misc/PyGTK_Control/GUIConfig.py
+++ b/misc/PyGTK_Control/GUIConfig.py
@@ -16,6 +16,8 @@ You should have received a copy of the GNU General Public License
 along with this program.  If not, see <http://www.gnu.org/licenses/>.
 '''
 
+from gobject import TYPE_STRING, TYPE_BOOLEAN
+
 options = {}
 
 # Control
@@ -72,3 +74,18 @@ tabs = ['server', 'control', 'ftp', 'http', 'log_color']
 mime_name = 'mime'
 mime_attributes = ['handler', 'self_executed', 'param', 'path']
 mime_lists = ['extensions', 'filters']
+
+# VHosts
+vhost_name = 'name'
+vhost_attributes = ['port', 'protocol', 'doc_root', 'sys_root', 'private_key', 'certificate']
+vhost_lists = [
+    ('ip', (
+            ('ip', TYPE_STRING, '', ),
+            ),
+     ),
+     ('host', (
+            ('host name', TYPE_STRING, '', ),
+            ('use regexp', TYPE_BOOLEAN, False, ),
+            ),
+      ),
+    ]
diff --git a/misc/PyGTK_Control/MyServerControl.py b/misc/PyGTK_Control/MyServerControl.py
index 104b430..49103d8 100644
--- a/misc/PyGTK_Control/MyServerControl.py
+++ b/misc/PyGTK_Control/MyServerControl.py
@@ -28,6 +28,7 @@ from AboutWindow import About
 from ConnectionWindow import Connection
 from DefinitionWidgets import DefinitionTable, DefinitionTreeView
 from MIMEWidgets import MimeTable, MimeTreeView
+from VHostWidgets import VHostTable, VHostTreeView
 
 class PyGTKControl():
     '''GNU MyServer Control main window.'''
@@ -38,6 +39,7 @@ class PyGTKControl():
         self.widgets.signal_autoconnect(self)
         self.construct_options()
         self.construct_mime()
+        self.construct_vhosts()
         self.chooser = None # Active file chooser
         # path of currently edited files
         self.config_path = self.mime_path = self.vhost_path = None
@@ -217,11 +219,24 @@ class PyGTKControl():
             mime_lists[mime_list] = []
         tree.get_model().append(('', {}, mime_lists, [], ))
 
+    def on_add_vhost_menu_item_activate(self, widget):
+        '''Adds a new VHost.'''
+        table, tree = self.vhost_tab
+        vhost_lists = {}
+        for vhost_list in GUIConfig.vhost_lists:
+            vhost_lists[vhost_list[0]] = []
+        tree.get_model().append(('', {}, vhost_lists, [], ))
+
     def on_add_definition_to_mime_menu_item_activate(self, widget):
         '''Adds a definition to currently selected MIME type.'''
         table, tree = self.mime_tab[1]
         tree.get_model().append(None, ('', '', False, True, '', False, {}, ))
 
+    def on_add_log_to_vhost_menu_item_activate(self, widget):
+        '''Adds a log to currently selected VHost.'''
+        table, tree = self.vhost_tab
+        table.add_log()
+
     def set_up_config(self, config):
         '''Reads server configuration from given config instance.'''
         self.on_new_config_menu_item_activate()
@@ -312,5 +327,19 @@ class PyGTKControl():
 
         self.widgets.get_widget('notebook').show_all()
 
+    def construct_vhosts(self):
+        '''Reads vhost options from file and prepares GUI.'''
+        panels = gtk.HPaned()
+        tree = VHostTreeView()
+        panels.pack1(tree.scroll, True, False)
+        table = VHostTable(tree)
+        panels.pack2(table, False, False)
+
+        self.vhost_tab = (table, tree, )
+        self.widgets.get_widget('notebook').append_page(
+            panels, gtk.Label('VHosts'))
+
+        self.widgets.get_widget('notebook').show_all()
+
 PyGTKControl()
 gtk.main()
diff --git a/misc/PyGTK_Control/PyGTKControl.glade b/misc/PyGTK_Control/PyGTKControl.glade
index 44c8e5f..a8a64ec 100644
--- a/misc/PyGTK_Control/PyGTKControl.glade
+++ b/misc/PyGTK_Control/PyGTKControl.glade
@@ -340,6 +340,46 @@
               </widget>
             </child>
             <child>
+              <widget class="GtkMenuItem" id="vhost_menu_item">
+                <property name="visible">True</property>
+                <property name="label" translatable="yes">_VHosts</property>
+                <property name="use_underline">True</property>
+                <child>
+                  <widget class="GtkMenu" id="vhost_menu">
+                    <property name="visible">True</property>
+                    <child>
+                      <widget class="GtkImageMenuItem" id="add_vhost_menu_item">
+                        <property name="label">Add VHost</property>
+                        <property name="visible">True</property>
+                        <property name="use_stock">False</property>
+                        <signal name="activate" handler="on_add_vhost_menu_item_activate"/>
+                        <child internal-child="image">
+                          <widget class="GtkImage" id="add_vhost_image">
+                            <property name="visible">True</property>
+                            <property name="stock">gtk-add</property>
+                          </widget>
+                        </child>
+                      </widget>
+                    </child>
+                    <child>
+                      <widget class="GtkImageMenuItem" id="add_log_to_vhost_menu_item">
+                        <property name="label">Add log to VHost</property>
+                        <property name="visible">True</property>
+                        <property name="use_stock">False</property>
+                        <signal name="activate" handler="on_add_log_to_vhost_menu_item_activate"/>
+                        <child internal-child="image">
+                          <widget class="GtkImage" id="add_log_to_vhost_image">
+                            <property name="visible">True</property>
+                            <property name="stock">gtk-add</property>
+                          </widget>
+                        </child>
+                      </widget>
+                    </child>
+                  </widget>
+                </child>
+              </widget>
+            </child>
+            <child>
               <widget class="GtkMenuItem" id="help_menu_item">
                 <property name="visible">True</property>
                 <property name="label" translatable="yes">_Help</property>
diff --git a/misc/PyGTK_Control/VHostWidgets.py b/misc/PyGTK_Control/VHostWidgets.py
new file mode 100644
index 0000000..93dac9b
--- /dev/null
+++ b/misc/PyGTK_Control/VHostWidgets.py
@@ -0,0 +1,313 @@
+# -*- coding: utf-8 -*-
+'''
+MyServer
+Copyright (C) 2009 Free Software Foundation, Inc.
+This program 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 3 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program.  If not, see <http://www.gnu.org/licenses/>.
+'''
+
+import gtk
+import gobject
+import GUIConfig
+
+class LogTreeView(gtk.TreeView):
+    def __init__(self):
+        gtk.TreeView.__init__(self, gtk.ListStore(
+                gobject.TYPE_STRING, # log name
+                gobject.TYPE_PYOBJECT)) # list of streams
+        model = self.get_model()
+        self.last_selected = None
+        def edited_handler(cell, path, text, model):
+            model[path][0] = text
+        renderer = gtk.CellRendererText()
+        renderer.set_property('editable', True)
+        renderer.connect('edited', edited_handler, model)
+        column = gtk.TreeViewColumn('Log')
+        column.pack_start(renderer)
+        column.add_attribute(renderer, 'text', 0)
+        self.append_column(column)
+        self.scroll = gtk.ScrolledWindow()
+        self.scroll.set_policy(gtk.POLICY_AUTOMATIC, gtk.POLICY_AUTOMATIC)
+        self.scroll.set_shadow_type(gtk.SHADOW_OUT)
+        self.scroll.set_border_width(5)
+        self.scroll.add(self)
+
+        self.stream_tree = stream_tree = gtk.TreeView(
+            gtk.ListStore(gobject.TYPE_STRING))
+        self.stream_model = stream_model = stream_tree.get_model()
+        def stream_edited_handler(cell, path, text, model):
+            model[path][0] = text
+        renderer = gtk.CellRendererText()
+        renderer.set_property('editable', True)
+        renderer.connect('edited', stream_edited_handler, stream_model)
+        column = gtk.TreeViewColumn('Stream')
+        column.pack_start(renderer)
+        column.add_attribute(renderer, 'text', 0)
+        stream_tree.append_column(column)
+        self.stream_scroll = gtk.ScrolledWindow()
+        self.stream_scroll.set_policy(gtk.POLICY_AUTOMATIC, gtk.POLICY_AUTOMATIC)
+        self.stream_scroll.set_shadow_type(gtk.SHADOW_OUT)
+        self.stream_scroll.set_border_width(5)
+        self.stream_scroll.add(stream_tree)
+
+        self.connect('cursor-changed', self.cursor_changed)
+
+    def save_changed(self, tree):
+        model = self.stream_model
+        if self.last_selected is not None:
+            streams = []
+            i = model.iter_children(None)
+            while i is not None: # iterate over streams
+                streams.append(model[i][0])
+                i = model.iter_next(i)
+            row = tree.get_model()[self.last_selected]
+            row[1] = streams
+
+    def cursor_changed(self, tree):
+        self.save_changed(tree)
+
+        model = self.stream_model
+        model.clear()
+
+        self.last_selected = current = \
+            tree.get_selection().get_selected()[1]
+        row = tree.get_model()[current]
+        for stream in row[1]:
+            model.append((stream, ))
+
+    def get_logs(self):
+        self.save_changed(self)
+        model = self.get_model()
+        logs = {}
+        i = model.iter_children(None)
+        while i is not None: # iterate over logs
+            row = model[i]
+            logs[row[0]] = row[1]
+            i = model.iter_next(i)
+        return logs
+
+    def set_logs(self, logs):
+        self.stream_model.clear()
+        self.stream_tree.get_selection().unselect_all()
+        self.last_selected = None
+        model = self.get_model()
+        model.clear()
+        for log in logs:
+            model.append((log, logs[log], ))
+
+class VHostTreeView(gtk.TreeView):
+    def __init__(self):
+        gtk.TreeView.__init__(self, gtk.ListStore(
+                gobject.TYPE_STRING, # vhost name
+                gobject.TYPE_PYOBJECT, # vhost single attributes
+                gobject.TYPE_PYOBJECT, # vhost attribute lists
+                gobject.TYPE_PYOBJECT)) # vhost logs
+        model = self.get_model()
+        def vhost_edited_handler(cell, path, text, data):
+            model = data
+            model[path][0] = text
+        vhost_renderer = gtk.CellRendererText()
+        vhost_renderer.set_property('editable', True)
+        vhost_renderer.connect('edited', vhost_edited_handler, model)
+        vhost_column = gtk.TreeViewColumn('VHost')
+        vhost_column.pack_start(vhost_renderer)
+        vhost_column.add_attribute(vhost_renderer, 'text', 0)
+        self.append_column(vhost_column)
+
+        self.scroll = gtk.ScrolledWindow()
+        self.scroll.set_policy(gtk.POLICY_AUTOMATIC, gtk.POLICY_AUTOMATIC)
+        self.scroll.set_shadow_type(gtk.SHADOW_OUT)
+        self.scroll.set_border_width(5)
+        self.scroll.add(self)
+
+    # def set_up(self, MIME_types):
+    #     '''Fill model with data provided as list of MIME types.'''
+    #     model = self.get_model()
+    #     for mime in MIME_types:
+    #         attributes = {}
+    #         for attribute in GUIConfig.mime_attributes:
+    #             a = getattr(mime, 'get_' + attribute)()
+    #             if a is not None:
+    #                 attributes[attribute] = (a, True, )
+    #         mime_lists = {}
+    #         for mime_list in GUIConfig.mime_lists:
+    #             mime_lists[mime_list] = getattr(mime, 'get_' + mime_list)()
+    #         model.append((getattr(mime, 'get_' + GUIConfig.mime_name)(),
+    #                       attributes,
+    #                       mime_lists,
+    #                       mime.get_definitions(), ))
+
+class VHostTable(gtk.Table):
+    def __init__(self, tree):
+        gtk.Table.__init__(self, len(GUIConfig.vhost_attributes) +
+                           3 * len(GUIConfig.vhost_lists) + 3, 4)
+
+        tree.connect('cursor-changed', self.cursor_changed)
+        self.last_selected = None
+
+        self.attributes = {}
+        i = 0
+        for attribute in GUIConfig.vhost_attributes: # Add single attributes
+            label = gtk.Label(attribute)
+            entry = gtk.Entry()
+            check = gtk.CheckButton()
+            self.attributes[attribute] = (entry, check, )
+            self.attach(label, 0, 1, i, i + 1, yoptions = gtk.FILL)
+            self.attach(entry, 1, 3, i, i + 1, yoptions = gtk.FILL)
+            self.attach(check, 3, 4, i, i + 1, gtk.FILL, gtk.FILL)
+            i += 1
+            
+        self.vhost_lists = {}
+        for vhost_list in GUIConfig.vhost_lists: # Add attribute lists
+            name = vhost_list[0]
+            column_names = []
+            columns = []
+            defaults = []
+            for element in vhost_list[1]:
+                column_names.append(element[0])
+                columns.append(element[1])
+                defaults.append(element[2])
+            tree = gtk.TreeView(gtk.ListStore(*(columns)))
+            tree_model = tree.get_model()
+            def tree_edited_handler(cell, path, text, data):
+                model, col_index = data
+                model[path][col_index] = text
+            col_index = 0
+            for column in column_names:
+                tree_renderer = gtk.CellRendererText()
+                tree_renderer.set_property('editable', True)
+                tree_renderer.connect('edited', tree_edited_handler,
+                                      (tree_model, col_index, ))
+                tree_column = gtk.TreeViewColumn(column)
+                tree_column.pack_start(tree_renderer)
+                tree_column.add_attribute(tree_renderer, 'text', col_index)
+                tree.append_column(tree_column)
+                col_index += 1
+            tree_scroll = gtk.ScrolledWindow()
+            tree_scroll.set_policy(gtk.POLICY_AUTOMATIC, gtk.POLICY_AUTOMATIC)
+            tree_scroll.set_shadow_type(gtk.SHADOW_OUT)
+            tree_scroll.set_border_width(5)
+            tree_scroll.add(tree)
+
+            def add_to_tree(button, data):
+                model, defaults = data
+                model.append(defaults)
+            add_button = gtk.Button('Add')
+            add_button.connect('clicked', add_to_tree, (tree_model, defaults, ))
+            def remove_from_tree(button, tree):
+                model, selected = tree.get_selection().get_selected()
+                if selected is not None:
+                    model.remove(selected)
+            remove_button = gtk.Button('Remove')
+            remove_button.connect('clicked', remove_from_tree, tree)
+
+            self.vhost_lists[name] = tree_model
+            self.attach(tree_scroll, 0, 2, i, i + 3)
+            self.attach(add_button, 2, 3, i, i + 1, yoptions = gtk.FILL)
+            self.attach(remove_button, 2, 3, i + 1, i + 2, yoptions = gtk.FILL)
+            self.attach(gtk.Label(), 2, 3, i + 2, i + 3)
+            i += 3
+
+        # Add logs
+        self.log_tree = log_tree = LogTreeView()
+        self.log_model = log_tree.get_model()
+
+        def add_stream(button, model):
+            model.append(('', ))
+        add_button = gtk.Button('Add')
+        add_button.connect('clicked', add_stream, log_tree.stream_model)
+
+        def remove_stream(button, tree):
+            model, selected = tree.get_selection().get_selected()
+            if selected is not None:
+                model.remove(selected)
+        remove_button = gtk.Button('Remove')
+        remove_button.connect('clicked', remove_stream, log_tree.stream_tree)
+
+        self.attach(log_tree.scroll, 0, 2, i, i + 3)
+        self.attach(add_button, 2, 3, i, i + 1, yoptions = gtk.FILL)
+        self.attach(remove_button, 2, 3, i + 1, i + 2, yoptions = gtk.FILL)
+        self.attach(log_tree.stream_scroll, 2, 3, i + 2, i + 3)
+
+    def add_log(self):
+        '''Add a log to currently selected VHost.'''
+        self.log_model.append(('', [], ))
+            
+    def clear(self):
+        '''Clear input widgets.'''
+        for entry, check in self.attributes.itervalues():
+            entry.set_text('')
+            check.set_active(False)
+        for model in self.vhost_lists.itervalues():
+            model.clear()
+        self.last_selected = None
+
+    def save_changed(self, tree):
+        '''Save data from input widgets to model.'''
+        if self.last_selected is not None:
+            attributes = {}
+            for attribute in self.attributes:
+                entry, check = self.attributes[attribute]
+                attributes[attribute] = (entry.get_text(), check.get_active(), )
+            vhost_lists = {}
+            for vhost_list in GUIConfig.vhost_lists:
+                container = vhost_lists[vhost_list[0]] = []
+                model = self.vhost_lists[vhost_list[0]]
+                i = model.iter_children(None)
+                while i is not None: # iterate over list elements
+                    row = []
+                    for counter in xrange(len(vhost_list[1])):
+                        row.append(model[i][counter])
+                    container.append(tuple(row))
+                    i = model.iter_next(i)
+            row = tree.get_model()[self.last_selected]
+            row[1] = attributes
+            row[2] = vhost_lists
+            row[3] = self.log_tree.get_logs()
+
+    def cursor_changed(self, tree):
+        self.save_changed(tree)
+
+        self.clear()
+
+        self.last_selected = current = tree.get_selection().get_selected()[1]
+        row = tree.get_model()[current]
+        for attribute in row[1]:
+            entry, check = self.attributes[attribute]
+            entry.set_text(row[1][attribute][0])
+            check.set_active(row[1][attribute][1])
+        for vhost_list in row[2]:
+            model = self.vhost_lists[vhost_list]
+            for element in row[2][vhost_list]:
+                model.append(element)
+        self.log_tree.set_logs(row[3])
+
+    # def make_def(self, tree):
+    #     '''Export all data as list of MIME types.'''
+    #     self.save_changed(tree)
+    #     model = tree.get_model()
+    #     mimes = []
+    #     i = model.iter_children(None)
+    #     while i is not None: # iterate over MIME types
+    #         row = model[i]
+    #         mime = MIMEType(row[0], definitions = row[3])
+    #         for attribute in row[1]:
+    #             text, enabled = row[1][attribute]
+    #             if enabled:
+    #                 getattr(mime, 'set_' + attribute)(text)
+    #         for mime_list in row[2]:
+    #             for entry in row[2][mime_list]:
+    #                 getattr(mime, 'add_' + mime_list[:-1])(entry)
+    #         mimes.append(mime)
+    #         i = model.iter_next(i)
+    #     return mimes



commit 65b8080af3f230a44eaea44557de323ff52a1a77
Author: Marek Aaron Sapota <maarons@gnu.org>
Date:   Sat Jul 25 23:06:04 2009 +0200

    New/open/save for MIME types.

diff --git a/misc/PyGTK_Control/DefinitionWidgets.py b/misc/PyGTK_Control/DefinitionWidgets.py
index 1bd8e66..5b6d185 100644
--- a/misc/PyGTK_Control/DefinitionWidgets.py
+++ b/misc/PyGTK_Control/DefinitionWidgets.py
@@ -152,7 +152,7 @@ class DefinitionTable(gtk.Table):
         self.value_field.set_text(row[4])
         self.value_check_field.set_active(row[5])
         for attribute in row[6]:
-            self.attributes_field.append((attribute, row[5][attribute], ))
+            self.attributes_field.append((attribute, row[6][attribute], ))
 
     def get_selected(self, tree):
         '''Get iterator of currently selected row.'''
@@ -261,7 +261,7 @@ class DefinitionTreeView(gtk.TreeView):
             i = model.iter_next(i)
 
     def set_up(self, definitions, search):
-        '''Sets up model reading from given config instance. If search in True
+        '''Sets up model reading from given definition list. If search in True
         will substitute alreaty present model data, if it is false will append
         all the definitions.'''
 
diff --git a/misc/PyGTK_Control/MIMEWidgets.py b/misc/PyGTK_Control/MIMEWidgets.py
index d8980fa..dd826d4 100644
--- a/misc/PyGTK_Control/MIMEWidgets.py
+++ b/misc/PyGTK_Control/MIMEWidgets.py
@@ -19,6 +19,7 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 import gtk
 import gobject
 import GUIConfig
+from MyServer.pycontrollib.mimetypes import MIMEType
 
 class MimeTreeView(gtk.TreeView):
     def __init__(self):
@@ -45,6 +46,23 @@ class MimeTreeView(gtk.TreeView):
         self.scroll.set_border_width(5)
         self.scroll.add(self)
 
+    def set_up(self, MIME_types):
+        '''Fill model with data provided as list of MIME types.'''
+        model = self.get_model()
+        for mime in MIME_types:
+            attributes = {}
+            for attribute in GUIConfig.mime_attributes:
+                a = getattr(mime, 'get_' + attribute)()
+                if a is not None:
+                    attributes[attribute] = (a, True, )
+            mime_lists = {}
+            for mime_list in GUIConfig.mime_lists:
+                mime_lists[mime_list] = getattr(mime, 'get_' + mime_list)()
+            model.append((getattr(mime, 'get_' + GUIConfig.mime_name)(),
+                          attributes,
+                          mime_lists,
+                          mime.get_definitions(), ))
+
 class MimeTable(gtk.Table):
     def __init__(self, tree, def_tree, def_table):
         gtk.Table.__init__(self, len(GUIConfig.mime_attributes) +
@@ -113,6 +131,7 @@ class MimeTable(gtk.Table):
             model.clear()
         self.def_table.clear()
         self.def_tree.get_model().clear()
+        self.last_selected = None
 
     def save_changed(self, tree):
         '''Save data from input widgets to model.'''
@@ -150,3 +169,23 @@ class MimeTable(gtk.Table):
             for element in row[2][mime_list]:
                 model.append((element, ))
         self.def_tree.set_up(row[3], False)
+
+    def make_def(self, tree):
+        '''Export all data as list of MIME types.'''
+        self.save_changed(tree)
+        model = tree.get_model()
+        mimes = []
+        i = model.iter_children(None)
+        while i is not None: # iterate over MIME types
+            row = model[i]
+            mime = MIMEType(row[0], definitions = row[3])
+            for attribute in row[1]:
+                text, enabled = row[1][attribute]
+                if enabled:
+                    getattr(mime, 'set_' + attribute)(text)
+            for mime_list in row[2]:
+                for entry in row[2][mime_list]:
+                    getattr(mime, 'add_' + mime_list[:-1])(entry)
+            mimes.append(mime)
+            i = model.iter_next(i)
+        return mimes
diff --git a/misc/PyGTK_Control/MyServerControl.py b/misc/PyGTK_Control/MyServerControl.py
index b0c1d4e..104b430 100644
--- a/misc/PyGTK_Control/MyServerControl.py
+++ b/misc/PyGTK_Control/MyServerControl.py
@@ -22,6 +22,7 @@ import gtk.glade
 import gobject
 import GUIConfig
 from MyServer.pycontrollib.config import MyServerConfig
+from MyServer.pycontrollib.mimetypes import MIMETypes
 from MyServer.pycontrollib.controller import Controller
 from AboutWindow import About
 from ConnectionWindow import Connection
@@ -38,7 +39,8 @@ class PyGTKControl():
         self.construct_options()
         self.construct_mime()
         self.chooser = None # Active file chooser
-        self.config_path = None # path of currently edited file
+        # path of currently edited files
+        self.config_path = self.mime_path = self.vhost_path = None
         self.controller = None
 
     def on_window_destroy(self, widget):
@@ -82,7 +84,7 @@ class PyGTKControl():
             self.controller.put_server_configuration(self.get_current_config())
 
     def on_new_config_menu_item_activate(self, widget = None):
-        '''Clears configuration.'''
+        '''Clears server configuration.'''
         if widget is not None:
             self.config_path = None
         table, tree = self.tabs['unknown']
@@ -92,12 +94,20 @@ class PyGTKControl():
             table.clear()
             tree.make_clear()
 
+    def on_new_mime_menu_item_activate(self, widget = None):
+        '''Clears MIME configuration.'''
+        if widget is not None:
+            self.mime_path = None
+        table, tree = self.mime_tab[0]
+        table.clear()
+        tree.get_model().clear()
+
     def on_open_config_menu_item_activate(self, widget):
-        '''Open local configuration file.'''
+        '''Open local server configuration file.'''
         if self.chooser is not None:
             self.chooser.destroy()
         self.chooser = gtk.FileChooserDialog(
-            'Open configuration file.',
+            'Open server configuration file.',
             buttons = (gtk.STOCK_CANCEL, gtk.RESPONSE_CANCEL,
                        gtk.STOCK_OPEN, gtk.RESPONSE_OK))
         def handle_response(widget, response):
@@ -105,17 +115,35 @@ class PyGTKControl():
                 self.config_path = self.chooser.get_filename()
                 with open(self.config_path) as f:
                     conf = MyServerConfig.from_string(f.read())
-                self.set_up(conf)
+                self.set_up_config(conf)
+            self.chooser.destroy()
+        self.chooser.connect('response', handle_response)
+        self.chooser.show()
+
+    def on_open_mime_menu_item_activate(self, widget):
+        '''Open local MIME configuration file.'''
+        if self.chooser is not None:
+            self.chooser.destroy()
+        self.chooser = gtk.FileChooserDialog(
+            'Open MIME configuration file.',
+            buttons = (gtk.STOCK_CANCEL, gtk.RESPONSE_CANCEL,
+                       gtk.STOCK_OPEN, gtk.RESPONSE_OK))
+        def handle_response(widget, response):
+            if response == gtk.RESPONSE_OK:
+                self.mime_path = self.chooser.get_filename()
+                with open(self.mime_path) as f:
+                    conf = MIMETypes.from_string(f.read())
+                self.set_up_mime(conf)
             self.chooser.destroy()
         self.chooser.connect('response', handle_response)
         self.chooser.show()
 
     def on_save_as_config_menu_item_activate(self, widget):
-        '''Save configuration as local file.'''
+        '''Save server configuration as local file.'''
         if self.chooser is not None:
             self.chooser.destroy()
         self.chooser = gtk.FileChooserDialog(
-            'Save configuration file.',
+            'Save server configuration file.',
             action = gtk.FILE_CHOOSER_ACTION_SAVE,
             buttons = (gtk.STOCK_CANCEL, gtk.RESPONSE_CANCEL,
                        gtk.STOCK_SAVE_AS, gtk.RESPONSE_OK))
@@ -127,8 +155,25 @@ class PyGTKControl():
         self.chooser.connect('response', handle_response)
         self.chooser.show()
 
+    def on_save_as_mime_config_menu_item_activate(self, widget):
+        '''Save MIME configuration as local file.'''
+        if self.chooser is not None:
+            self.chooser.destroy()
+        self.chooser = gtk.FileChooserDialog(
+            'Save MIME configuration file.',
+            action = gtk.FILE_CHOOSER_ACTION_SAVE,
+            buttons = (gtk.STOCK_CANCEL, gtk.RESPONSE_CANCEL,
+                       gtk.STOCK_SAVE_AS, gtk.RESPONSE_OK))
+        def handle_response(widget, response):
+            if response == gtk.RESPONSE_OK:
+                self.mime_path = self.chooser.get_filename()
+                self.on_save_mime_menu_item_activate(widget)
+            self.chooser.destroy()
+        self.chooser.connect('response', handle_response)
+        self.chooser.show()
+
     def on_save_config_menu_item_activate(self, widget):
-        '''Save configuration to file.'''
+        '''Save server configuration to file.'''
         if self.config_path is None:
             self.on_save_as_config_menu_item_activate(widget)
         else:
@@ -136,14 +181,29 @@ class PyGTKControl():
             with open(self.config_path, 'w') as f:
                 f.write(str(config))
 
+    def on_save_mime_menu_item_activate(self, widget):
+        '''Save MIME configuration to file.'''
+        if self.mime_path is None:
+            self.on_save_as_mime_config_menu_item_activate(widget)
+        else:
+            config = self.get_current_mime()
+            with open(self.mime_path, 'w') as f:
+                f.write(str(config))
+
     def get_current_config(self):
-        '''Returns current configuration as MyServerConfig instance.'''
+        '''Returns current server configuration as MyServerConfig instance.'''
         definitions = []
         for tab in self.tabs:
             table, tree = self.tabs[tab]
             definitions += table.make_def(tree)
         return MyServerConfig(definitions)
 
+    def get_current_mime(self):
+        '''Returns current mime configuration as MIMETypes instance.'''
+        table, tree = self.mime_tab[0]
+        mimes = table.make_def(tree)
+        return MIMETypes(mimes)
+
     def on_add_unknown_definition_menu_item_activate(self, widget):
         '''Adds a new definition to unknown tab.'''
         table, tree = self.tabs['unknown']
@@ -162,8 +222,8 @@ class PyGTKControl():
         table, tree = self.mime_tab[1]
         tree.get_model().append(None, ('', '', False, True, '', False, {}, ))
 
-    def set_up(self, config):
-        '''Reads configuration from given config instance.'''
+    def set_up_config(self, config):
+        '''Reads server configuration from given config instance.'''
         self.on_new_config_menu_item_activate()
         tabs = {}
         for tab in self.tabs:
@@ -177,6 +237,12 @@ class PyGTKControl():
             tree = self.tabs[tab][1]
             tree.set_up(tabs[tab], tab != 'unknown')
 
+    def set_up_mime(self, config):
+        '''Reads MIME configuration from given config instance.'''
+        self.on_new_mime_menu_item_activate()
+        tree = self.mime_tab[0][1]
+        tree.set_up(config.MIME_types)
+
     def construct_options(self):
         '''Reads known options from file and prepares GUI.'''
 



commit 7d48adfa5075a1ca7b36ce866fb06fbff6a60152
Author: Marek Aaron Sapota <maarons@gnu.org>
Date:   Sat Jul 25 23:02:51 2009 +0200

    MIMEType self_executed is string not (was bool).

diff --git a/misc/py_control_client/MyServer/pycontrollib/mimetypes.py b/misc/py_control_client/MyServer/pycontrollib/mimetypes.py
index c805338..99b15c3 100644
--- a/misc/py_control_client/MyServer/pycontrollib/mimetypes.py
+++ b/misc/py_control_client/MyServer/pycontrollib/mimetypes.py
@@ -156,7 +156,7 @@ class MIMEType():
         if self.param is not None:
             root.set('param', self.param)
         if self.self_executed is not None:
-            root.set('self', 'YES' if self.self_executed else 'NO')
+            root.set('self', self.self_executed)
         if self.path is not None:
             root.append(make_element('PATH', 'regex', self.path))
         for element in map(make_extension_element, self.extensions):
@@ -179,8 +179,6 @@ class MIMEType():
         handler = root.get('handler', None)
         param = root.get('param', None)
         self_executed = root.get('self', None)
-        if self_executed is not None:
-            self_executed = self_executed.upper() == 'YES'
         path = None
         extension = set()
         filters = []
diff --git a/misc/py_control_client/MyServer/pycontrollib/test/mimetypes_test.py b/misc/py_control_client/MyServer/pycontrollib/test/mimetypes_test.py
index 09f0351..71d086e 100644
--- a/misc/py_control_client/MyServer/pycontrollib/test/mimetypes_test.py
+++ b/misc/py_control_client/MyServer/pycontrollib/test/mimetypes_test.py
@@ -44,9 +44,9 @@ class MIMETypeTest(unittest.TestCase):
         MIMEType('text/plain', 'CGI', '/usr/bin/python', set(['py']),
                  '^/cgi-bin/.*$', ['gzip'])
         MIMEType('text/plain', 'CGI', '/usr/bin/python', set(['py']),
-                 '^/cgi-bin/.*$', ['gzip'], False)
+                 '^/cgi-bin/.*$', ['gzip'], 'NO')
         MIMEType('text/plain', 'CGI', '/usr/bin/python', set(['py']),
-                 '^/cgi-bin/.*$', ['gzip'], False, self.definitions)
+                 '^/cgi-bin/.*$', ['gzip'], 'NO', self.definitions)
 
     def test_mime(self):
         mime = MIMEType('text/plain', 'SEND')
@@ -116,12 +116,12 @@ class MIMETypeTest(unittest.TestCase):
     def test_self_executed(self):
         mime = MIMEType('text/plain', 'SEND')
         self.assertEqual(None, mime.get_self_executed())
-        mime.set_self_executed(True)
-        self.assertEqual(True, mime.get_self_executed())
+        mime.set_self_executed('YES')
+        self.assertEqual('YES', mime.get_self_executed())
         mime.set_self_executed(None)
         self.assertEqual(None, mime.get_self_executed())
-        mime = MIMEType('text/plain', 'SEND', self_executed = True)
-        self.assertEqual(True, mime.get_self_executed())
+        mime = MIMEType('text/plain', 'SEND', self_executed = 'YES')
+        self.assertEqual('YES', mime.get_self_executed())
         
     def test_definitions(self):
         mime = MIMEType('text/plain', 'SEND')
@@ -138,58 +138,58 @@ class MIMETypeTest(unittest.TestCase):
         
     def test_equality(self):
         self.assertEqual(MIMEType('text/plain', 'CGI', '/usr/bin/python',
-                                  set(['py']), '^/.*$', ['gzip'], False,
+                                  set(['py']), '^/.*$', ['gzip'], 'NO',
                                   self.definitions),
                          MIMEType('text/plain', 'CGI', '/usr/bin/python',
-                                  set(['py']), '^/.*$', ['gzip'], False,
+                                  set(['py']), '^/.*$', ['gzip'], 'NO',
                                   self.definitions))
         self.assertNotEqual(MIMEType('text/plain', 'CGI', '/usr/bin/python',
-                                  set(['py']), '^/.*$', ['gzip'], False,
+                                  set(['py']), '^/.*$', ['gzip'], 'NO',
                                   self.definitions),
                             MIMEType('other', 'CGI', '/usr/bin/python',
-                                  set(['py']), '^/.*$', ['gzip'], False,
+                                  set(['py']), '^/.*$', ['gzip'], 'NO',
                                      self.definitions))
         self.assertNotEqual(MIMEType('text/plain', 'CGI', '/usr/bin/python',
-                                     set(['py']), '^/.*$', ['gzip'], False,
+                                     set(['py']), '^/.*$', ['gzip'], 'NO',
                                      self.definitions),
                             MIMEType('text/plain', 'SEND', '/usr/bin/python',
-                                     set(['py']), '^/.*$', ['gzip'], False,
+                                     set(['py']), '^/.*$', ['gzip'], 'NO',
                                      self.definitions))
         self.assertNotEqual(MIMEType('text/plain', 'CGI', '/usr/bin/python',
-                                     set(['py']), '^/.*$', ['gzip'], False,
+                                     set(['py']), '^/.*$', ['gzip'], 'NO',
                                      self.definitions),
                             MIMEType('text/plain', 'CGI', '/usr/bin/python26',
-                                     set(['py']), '^/.*$', ['gzip'], False,
+                                     set(['py']), '^/.*$', ['gzip'], 'NO',
                                      self.definitions))
         self.assertNotEqual(MIMEType('text/plain', 'CGI', '/usr/bin/python',
-                                     set(['py']), '^/.*$', ['gzip'], False,
+                                     set(['py']), '^/.*$', ['gzip'], 'NO',
                                      self.definitions),
                             MIMEType('text/plain', 'CGI', '/usr/bin/python',
-                                     set(['pyc']), '^/.*$', ['gzip'], False,
+                                     set(['pyc']), '^/.*$', ['gzip'], 'NO',
                                      self.definitions))
         self.assertNotEqual(MIMEType('text/plain', 'CGI', '/usr/bin/python',
-                                     set(['py']), '^/.*$', ['gzip'], False,
+                                     set(['py']), '^/.*$', ['gzip'], 'NO',
                                      self.definitions),
                             MIMEType('text/plain', 'CGI', '/usr/bin/python',
-                                     set(['py']), '^/other/.*$', ['gzip'], False,
+                                     set(['py']), '^/other/.*$', ['gzip'], 'NO',
                                      self.definitions))
         self.assertNotEqual(MIMEType('text/plain', 'CGI', '/usr/bin/python',
-                                     set(['py']), '^/.*$', ['gzip'], False,
+                                     set(['py']), '^/.*$', ['gzip'], 'NO',
                                      self.definitions),
                             MIMEType('text/plain', 'CGI', '/usr/bin/python',
-                                     set(['py']), '^/.*$', ['bzip2'], False,
+                                     set(['py']), '^/.*$', ['bzip2'], 'NO',
                                      self.definitions))
         self.assertNotEqual(MIMEType('text/plain', 'CGI', '/usr/bin/python',
-                                     set(['py']), '^/.*$', ['gzip'], False,
+                                     set(['py']), '^/.*$', ['gzip'], 'NO',
                                      self.definitions),
                             MIMEType('text/plain', 'CGI', '/usr/bin/python',
-                                     set(['py']), '^/.*$', ['gzip'], True,
+                                     set(['py']), '^/.*$', ['gzip'], 'YES',
                                      self.definitions))
         self.assertNotEqual(MIMEType('text/plain', 'CGI', '/usr/bin/python',
-                                     set(['py']), '^/.*$', ['gzip'], False,
+                                     set(['py']), '^/.*$', ['gzip'], 'NO',
                                      self.definitions),
                             MIMEType('text/plain', 'CGI', '/usr/bin/python',
-                                     set(['py']), '^/.*$', ['gzip'], False,
+                                     set(['py']), '^/.*$', ['gzip'], 'NO',
                                      []))
         self.assertNotEqual(MIMEType('text/plain', 'SEND'), 'other type')
 
@@ -229,7 +229,7 @@ class MIMETypeTest(unittest.TestCase):
     def test_from_string_self_executed(self):
         text = '<MIME mime="text/plain" handler="SEND" self="YES" />'
         mime = MIMEType.from_string(text)
-        right = MIMEType('text/plain', 'SEND', self_executed = True)
+        right = MIMEType('text/plain', 'SEND', self_executed = 'YES')
         self.assertEqual(mime, right)
 
     def test_from_string_definitions(self):
@@ -249,7 +249,7 @@ class MIMETypeTest(unittest.TestCase):
 </MIME>'''.format('\n'.join(map(str, self.definitions)))
         mime = MIMEType.from_string(text)
         right = MIMEType('text/plain', 'SEND', 'python', ['py'], '^/.*$',
-                         ['gzip', 'bzip2'], True, self.definitions)
+                         ['gzip', 'bzip2'], 'YES', self.definitions)
         self.assertEqual(mime, right)
 
     def test_from_lxml(self):
@@ -288,7 +288,7 @@ class MIMETypeTest(unittest.TestCase):
     def test_from_lxml_self_executed(self):
         text = '<MIME mime="text/plain" handler="SEND" self="YES" />'
         mime = MIMEType.from_lxml_element(etree.XML(text))
-        right = MIMEType('text/plain', 'SEND', self_executed = True)
+        right = MIMEType('text/plain', 'SEND', self_executed = 'YES')
         self.assertEqual(mime, right)
 
     def test_from_lxml_definitions(self):
@@ -308,7 +308,7 @@ class MIMETypeTest(unittest.TestCase):
 </MIME>'''.format('\n'.join(map(str, self.definitions)))
         mime = MIMEType.from_lxml_element(etree.XML(text))
         right = MIMEType('text/plain', 'SEND', 'python', ['py'], '^/.*$',
-                         ['gzip', 'bzip2'], True, self.definitions)
+                         ['gzip', 'bzip2'], 'YES', self.definitions)
         self.assertEqual(mime, right)
 
     def test_bad_root_tag(self):
@@ -343,7 +343,7 @@ class MIMETypeTest(unittest.TestCase):
         self.assertEqual(mime, copy)
 
     def test_to_string_self_executed(self):
-        mime = MIMEType('text/plain', 'SEND', self_executed = True)
+        mime = MIMEType('text/plain', 'SEND', self_executed = 'YES')
         copy = MIMEType.from_string(str(mime))
         self.assertEqual(mime, copy)
 
@@ -354,7 +354,7 @@ class MIMETypeTest(unittest.TestCase):
         
     def test_to_string_full(self):
         mime = MIMEType('text/plain', 'SEND', 'python', ['py'], '^/.*$',
-                        ['gzip', 'bzip2'], True, self.definitions)
+                        ['gzip', 'bzip2'], 'YES', self.definitions)
         copy = MIMEType.from_string(str(mime))
         self.assertEqual(mime, copy)
 
@@ -384,7 +384,7 @@ class MIMETypeTest(unittest.TestCase):
         self.assertEqual(mime, copy)
 
     def test_to_lxml_self_executed(self):
-        mime = MIMEType('text/plain', 'SEND', self_executed = True)
+        mime = MIMEType('text/plain', 'SEND', self_executed = 'YES')
         copy = MIMEType.from_lxml_element(mime.to_lxml_element())
         self.assertEqual(mime, copy)
 
@@ -395,13 +395,13 @@ class MIMETypeTest(unittest.TestCase):
         
     def test_to_lxml_full(self):
         mime = MIMEType('text/plain', 'SEND', 'python', ['py'], '^/.*$',
-                        ['gzip', 'bzip2'], True, self.definitions)
+                        ['gzip', 'bzip2'], 'YES', self.definitions)
         copy = MIMEType.from_lxml_element(mime.to_lxml_element())
         self.assertEqual(mime, copy)
 
 class MIMETypesTest(unittest.TestCase):
     def setUp(self):
-        self.mime_0 = MIMEType('text/html', 'FASTCGI', '', self_executed = True,
+        self.mime_0 = MIMEType('text/html', 'FASTCGI', '', self_executed = 'YES',
                                extensions = ['fcgi'])
         self.mime_1 = MIMEType('text/plain', 'SEND', '',
                                extensions = ['asc', 'c', 'cc', 'f', 'f90', 'h', 'hh'])



commit 36415041ce2c79cde231ad3008563427ad32f8b1
Author: Marek Aaron Sapota <maarons@gnu.org>
Date:   Sat Jul 25 22:46:01 2009 +0200

    MIMEType doesn't need handler.

diff --git a/misc/py_control_client/MyServer/pycontrollib/mimetypes.py b/misc/py_control_client/MyServer/pycontrollib/mimetypes.py
index 43a13cb..c805338 100644
--- a/misc/py_control_client/MyServer/pycontrollib/mimetypes.py
+++ b/misc/py_control_client/MyServer/pycontrollib/mimetypes.py
@@ -20,8 +20,9 @@ from definition import Definition, DefinitionList
 from lxml import etree
 
 class MIMEType():
-    def __init__(self, mime, handler, param = None, extensions = [], path = None,
-                 filters = [], self_executed = None, definitions = []):
+    def __init__(self, mime, handler = None, param = None, extensions = [],
+                 path = None, filters = [], self_executed = None,
+                 definitions = []):
         '''Creates new MIMEType with specified attributes. extension, filter and
         definitions are expected to be iterable.'''
         self.set_mime(mime)
@@ -53,8 +54,6 @@ class MIMEType():
 
     def set_handler(self, handler):
         '''Set associated handler.'''
-        if handler is None:
-            raise AttributeError('handler is required and can\'t be None')
         self.handler = handler
 
     def get_param(self):
@@ -152,7 +151,8 @@ class MIMEType():
             return make_element('FILTER', 'value', filter)
         root = etree.Element('MIME')
         root.set('mime', self.mime)
-        root.set('handler', self.handler)
+        if self.handler is not None:
+            root.set('handler', self.handler)
         if self.param is not None:
             root.set('param', self.param)
         if self.self_executed is not None:
diff --git a/misc/py_control_client/MyServer/pycontrollib/test/mimetypes_test.py b/misc/py_control_client/MyServer/pycontrollib/test/mimetypes_test.py
index 017368d..09f0351 100644
--- a/misc/py_control_client/MyServer/pycontrollib/test/mimetypes_test.py
+++ b/misc/py_control_client/MyServer/pycontrollib/test/mimetypes_test.py
@@ -35,6 +35,7 @@ class MIMETypeTest(unittest.TestCase):
                  DefinitionElement(attributes = {'value': 'index.htm'})]))
 
     def test_creation(self):
+        MIMEType('text/plain')
         MIMEType('text/plain', 'CGI')
         MIMEType('text/plain', 'CGI', '/usr/bin/python')
         MIMEType('text/plain', 'CGI', '/usr/bin/python', set(['py']))
@@ -56,12 +57,16 @@ class MIMETypeTest(unittest.TestCase):
         self.assertRaises(AttributeError, MIMEType, None, 'SEND')
         
     def test_handler(self):
+        mime = MIMEType('text/plain',)
+        self.assertEqual(None, mime.get_handler())
+        mime.set_handler('SEND')
+        self.assertEqual('SEND', mime.get_handler())
+        mime.set_handler(None)
+        self.assertEqual(None, mime.get_handler())
         mime = MIMEType('text/plain', 'SEND')
         self.assertEqual('SEND', mime.get_handler())
-        mime.set_handler('SOME HANDLER')
-        self.assertEqual('SOME HANDLER', mime.get_handler())
-        self.assertRaises(AttributeError, mime.set_handler, None)
-        self.assertRaises(AttributeError, MIMEType, 'text/plain', None)
+        mime = MIMEType('text/plain', handler = 'SEND')
+        self.assertEqual('SEND', mime.get_handler())
 
     def test_param(self):
         mime = MIMEType('text/plain', 'SEND')



commit 2796f1923fdc16bf6be4da8d4dcc7539104bf7d9
Author: Marek Aaron Sapota <maarons@gnu.org>
Date:   Sat Jul 25 17:42:45 2009 +0200

    Renamed methods to match new names from glade.

diff --git a/misc/PyGTK_Control/MyServerControl.py b/misc/PyGTK_Control/MyServerControl.py
index fca487a..b0c1d4e 100644
--- a/misc/PyGTK_Control/MyServerControl.py
+++ b/misc/PyGTK_Control/MyServerControl.py
@@ -38,7 +38,7 @@ class PyGTKControl():
         self.construct_options()
         self.construct_mime()
         self.chooser = None # Active file chooser
-        self.path = None # path of currently edited file
+        self.config_path = None # path of currently edited file
         self.controller = None
 
     def on_window_destroy(self, widget):
@@ -81,7 +81,18 @@ class PyGTKControl():
         if self.controller is not None:
             self.controller.put_server_configuration(self.get_current_config())
 
-    def on_open_menu_item_activate(self, widget):
+    def on_new_config_menu_item_activate(self, widget = None):
+        '''Clears configuration.'''
+        if widget is not None:
+            self.config_path = None
+        table, tree = self.tabs['unknown']
+        tree.get_model().clear()
+        for tab in self.tabs:
+            table, tree = self.tabs[tab]
+            table.clear()
+            tree.make_clear()
+
+    def on_open_config_menu_item_activate(self, widget):
         '''Open local configuration file.'''
         if self.chooser is not None:
             self.chooser.destroy()
@@ -91,15 +102,15 @@ class PyGTKControl():
                        gtk.STOCK_OPEN, gtk.RESPONSE_OK))
         def handle_response(widget, response):
             if response == gtk.RESPONSE_OK:
-                self.path = self.chooser.get_filename()
-                with open(self.path) as f:
+                self.config_path = self.chooser.get_filename()
+                with open(self.config_path) as f:
                     conf = MyServerConfig.from_string(f.read())
                 self.set_up(conf)
             self.chooser.destroy()
         self.chooser.connect('response', handle_response)
         self.chooser.show()
 
-    def on_save_as_menu_item_activate(self, widget):
+    def on_save_as_config_menu_item_activate(self, widget):
         '''Save configuration as local file.'''
         if self.chooser is not None:
             self.chooser.destroy()
@@ -110,19 +121,19 @@ class PyGTKControl():
                        gtk.STOCK_SAVE_AS, gtk.RESPONSE_OK))
         def handle_response(widget, response):
             if response == gtk.RESPONSE_OK:
-                self.path = self.chooser.get_filename()
-                self.on_save_menu_item_activate(widget)
+                self.config_path = self.chooser.get_filename()
+                self.on_save_config_menu_item_activate(widget)
             self.chooser.destroy()
         self.chooser.connect('response', handle_response)
         self.chooser.show()
 
-    def on_save_menu_item_activate(self, widget):
+    def on_save_config_menu_item_activate(self, widget):
         '''Save configuration to file.'''
-        if self.path is None:
-            self.on_save_as_menu_item_activate(widget)
+        if self.config_path is None:
+            self.on_save_as_config_menu_item_activate(widget)
         else:
             config = self.get_current_config()
-            with open(self.path, 'w') as f:
+            with open(self.config_path, 'w') as f:
                 f.write(str(config))
 
     def get_current_config(self):
@@ -151,20 +162,9 @@ class PyGTKControl():
         table, tree = self.mime_tab[1]
         tree.get_model().append(None, ('', '', False, True, '', False, {}, ))
 
-    def on_new_menu_item_activate(self, widget = None):
-        '''Clears configuration.'''
-        if widget is not None:
-            self.path = None
-        table, tree = self.tabs['unknown']
-        tree.get_model().clear()
-        for tab in self.tabs:
-            table, tree = self.tabs[tab]
-            table.clear()
-            tree.make_clear()
-
     def set_up(self, config):
         '''Reads configuration from given config instance.'''
-        self.on_new_menu_item_activate()
+        self.on_new_config_menu_item_activate()
         tabs = {}
         for tab in self.tabs:
             tabs[tab] = []
@@ -217,7 +217,7 @@ class PyGTKControl():
             self.widgets.get_widget('notebook').append_page(
                 panels, gtk.Label(tab))
 
-        self.on_new_menu_item_activate()
+        self.on_new_config_menu_item_activate()
         self.widgets.get_widget('notebook').show_all()
 
     def construct_mime(self):



commit 36ebea61cf9228a29bffb1c444ab82421babcd35
Author: Marek Aaron Sapota <maarons@gnu.org>
Date:   Sat Jul 25 15:49:55 2009 +0200

    New file menu.
    
    Extended, with buttons to open/save all three parts of config.

diff --git a/misc/PyGTK_Control/PyGTKControl.glade b/misc/PyGTK_Control/PyGTKControl.glade
index 0332e1d..44c8e5f 100644
--- a/misc/PyGTK_Control/PyGTKControl.glade
+++ b/misc/PyGTK_Control/PyGTKControl.glade
@@ -22,38 +22,174 @@
                     <property name="visible">True</property>
                     <child>
                       <widget class="GtkImageMenuItem" id="new_menu_item">
-                        <property name="label">gtk-new</property>
+                        <property name="label">New</property>
                         <property name="visible">True</property>
-                        <property name="use_underline">True</property>
-                        <property name="use_stock">True</property>
-                        <signal name="activate" handler="on_new_menu_item_activate"/>
+                        <property name="use_stock">False</property>
+                        <child>
+                          <widget class="GtkMenu" id="new_menu">
+                            <property name="visible">True</property>
+                            <child>
+                              <widget class="GtkMenuItem" id="new_config_menu_item">
+                                <property name="visible">True</property>
+                                <property name="label" translatable="yes">New server configuration</property>
+                                <property name="use_underline">True</property>
+                                <signal name="activate" handler="on_new_config_menu_item_activate"/>
+                              </widget>
+                            </child>
+                            <child>
+                              <widget class="GtkMenuItem" id="new_mime_menu_item">
+                                <property name="visible">True</property>
+                                <property name="label" translatable="yes">New MIME configuration</property>
+                                <property name="use_underline">True</property>
+                                <signal name="activate" handler="on_new_mime_menu_item_activate"/>
+                              </widget>
+                            </child>
+                            <child>
+                              <widget class="GtkMenuItem" id="new_vhost_menu_item">
+                                <property name="visible">True</property>
+                                <property name="label" translatable="yes">New VHost configuration</property>
+                                <property name="use_underline">True</property>
+                                <signal name="activate" handler="on_new_vhost_menu_item_activate"/>
+                              </widget>
+                            </child>
+                          </widget>
+                        </child>
+                        <child internal-child="image">
+                          <widget class="GtkImage" id="new_image">
+                            <property name="visible">True</property>
+                            <property name="stock">gtk-new</property>
+                            <property name="icon-size">1</property>
+                          </widget>
+                        </child>
                       </widget>
                     </child>
                     <child>
                       <widget class="GtkImageMenuItem" id="open_menu_item">
-                        <property name="label">gtk-open</property>
+                        <property name="label">Open</property>
                         <property name="visible">True</property>
-                        <property name="use_underline">True</property>
-                        <property name="use_stock">True</property>
-                        <signal name="activate" handler="on_open_menu_item_activate"/>
+                        <property name="use_stock">False</property>
+                        <child>
+                          <widget class="GtkMenu" id="open_menu">
+                            <property name="visible">True</property>
+                            <child>
+                              <widget class="GtkMenuItem" id="open_config_menu_item">
+                                <property name="visible">True</property>
+                                <property name="label" translatable="yes">Open server configuration</property>
+                                <property name="use_underline">True</property>
+                                <signal name="activate" handler="on_open_config_menu_item_activate"/>
+                              </widget>
+                            </child>
+                            <child>
+                              <widget class="GtkMenuItem" id="open_mime_menu_item">
+                                <property name="visible">True</property>
+                                <property name="label" translatable="yes">Open MIME configuration</property>
+                                <property name="use_underline">True</property>
+                                <signal name="activate" handler="on_open_mime_menu_item_activate"/>
+                              </widget>
+                            </child>
+                            <child>
+                              <widget class="GtkMenuItem" id="open_vhost_menu_item">
+                                <property name="visible">True</property>
+                                <property name="label" translatable="yes">Open VHost configuration</property>
+                                <property name="use_underline">True</property>
+                                <signal name="activate" handler="on_open_vhost_menu_item_activate"/>
+                              </widget>
+                            </child>
+                          </widget>
+                        </child>
+                        <child internal-child="image">
+                          <widget class="GtkImage" id="open_image">
+                            <property name="visible">True</property>
+                            <property name="stock">gtk-open</property>
+                            <property name="icon-size">1</property>
+                          </widget>
+                        </child>
                       </widget>
                     </child>
                     <child>
                       <widget class="GtkImageMenuItem" id="save_menu_item">
-                        <property name="label">gtk-save</property>
+                        <property name="label">Save</property>
                         <property name="visible">True</property>
-                        <property name="use_underline">True</property>
-                        <property name="use_stock">True</property>
-                        <signal name="activate" handler="on_save_menu_item_activate"/>
+                        <property name="use_stock">False</property>
+                        <child>
+                          <widget class="GtkMenu" id="save_menu">
+                            <property name="visible">True</property>
+                            <child>
+                              <widget class="GtkMenuItem" id="save_config_menu_item">
+                                <property name="visible">True</property>
+                                <property name="label" translatable="yes">Save server configuration</property>
+                                <property name="use_underline">True</property>
+                                <signal name="activate" handler="on_save_config_menu_item_activate"/>
+                              </widget>
+                            </child>
+                            <child>
+                              <widget class="GtkMenuItem" id="save_mime_menu_item">
+                                <property name="visible">True</property>
+                                <property name="label" translatable="yes">Save MIME configuration</property>
+                                <property name="use_underline">True</property>
+                                <signal name="activate" handler="on_save_mime_menu_item_activate"/>
+                              </widget>
+                            </child>
+                            <child>
+                              <widget class="GtkMenuItem" id="save_vhost_menu_item">
+                                <property name="visible">True</property>
+                                <property name="label" translatable="yes">Save VHost configuration</property>
+                                <property name="use_underline">True</property>
+                                <signal name="activate" handler="on_save_vhost_menu_item_activate"/>
+                              </widget>
+                            </child>
+                          </widget>
+                        </child>
+                        <child internal-child="image">
+                          <widget class="GtkImage" id="save_image">
+                            <property name="visible">True</property>
+                            <property name="stock">gtk-save</property>
+                            <property name="icon-size">1</property>
+                          </widget>
+                        </child>
                       </widget>
                     </child>
                     <child>
                       <widget class="GtkImageMenuItem" id="save_as_menu_item">
-                        <property name="label">gtk-save-as</property>
+                        <property name="label">Save as</property>
                         <property name="visible">True</property>
-                        <property name="use_underline">True</property>
-                        <property name="use_stock">True</property>
-                        <signal name="activate" handler="on_save_as_menu_item_activate"/>
+                        <property name="use_stock">False</property>
+                        <child>
+                          <widget class="GtkMenu" id="save_as_menu">
+                            <property name="visible">True</property>
+                            <child>
+                              <widget class="GtkMenuItem" id="save_as_config_menu_item">
+                                <property name="visible">True</property>
+                                <property name="label" translatable="yes">Save server configuration</property>
+                                <property name="use_underline">True</property>
+                                <signal name="activate" handler="on_save_as_config_menu_item_activate"/>
+                              </widget>
+                            </child>
+                            <child>
+                              <widget class="GtkMenuItem" id="save_as_mime_menu_item">
+                                <property name="visible">True</property>
+                                <property name="label" translatable="yes">Save MIME configuration</property>
+                                <property name="use_underline">True</property>
+                                <signal name="activate" handler="on_save_as_mime_menu_item_activate"/>
+                              </widget>
+                            </child>
+                            <child>
+                              <widget class="GtkMenuItem" id="save_as_vhost_menu_item">
+                                <property name="visible">True</property>
+                                <property name="label" translatable="yes">Save VHost configuration</property>
+                                <property name="use_underline">True</property>
+                                <signal name="activate" handler="on_save_as_vhost_menu_item_activate"/>
+                              </widget>
+                            </child>
+                          </widget>
+                        </child>
+                        <child internal-child="image">
+                          <widget class="GtkImage" id="save_as_image">
+                            <property name="visible">True</property>
+                            <property name="stock">gtk-save-as</property>
+                            <property name="icon-size">1</property>
+                          </widget>
+                        </child>
                       </widget>
                     </child>
                     <child>



commit 4aa358f6f612d9f9edb05422bb069e0580bd030a
Author: Marek Aaron Sapota <maarons@gnu.org>
Date:   Fri Jul 24 22:38:21 2009 +0200

    Added definitions to MIME types.

diff --git a/misc/PyGTK_Control/DefinitionWidgets.py b/misc/PyGTK_Control/DefinitionWidgets.py
index 8f0b964..1bd8e66 100644
--- a/misc/PyGTK_Control/DefinitionWidgets.py
+++ b/misc/PyGTK_Control/DefinitionWidgets.py
@@ -217,7 +217,7 @@ class DefinitionTreeView(gtk.TreeView):
                 return True
         self.props.has_tooltip = True
         self.connect("query-tooltip", show_tooltip)
-        
+
     def make_def(self, current):
         '''Return row pointed by current exported as definition.'''
         model = self.get_model()
@@ -264,7 +264,7 @@ class DefinitionTreeView(gtk.TreeView):
         '''Sets up model reading from given config instance. If search in True
         will substitute alreaty present model data, if it is false will append
         all the definitions.'''
-        
+
         def get_value_and_attributes(definition):
             '''Get column values from definition instance.'''
             name = definition.get_name()
diff --git a/misc/PyGTK_Control/MIMEWidgets.py b/misc/PyGTK_Control/MIMEWidgets.py
index 832357a..d8980fa 100644
--- a/misc/PyGTK_Control/MIMEWidgets.py
+++ b/misc/PyGTK_Control/MIMEWidgets.py
@@ -25,7 +25,8 @@ class MimeTreeView(gtk.TreeView):
         gtk.TreeView.__init__(self, gtk.ListStore(
                 gobject.TYPE_STRING, # mime name
                 gobject.TYPE_PYOBJECT, # mime single attributes
-                gobject.TYPE_PYOBJECT)) # mime attribute lists
+                gobject.TYPE_PYOBJECT, # mime attribute lists
+                gobject.TYPE_PYOBJECT)) # mime definitions
         model = self.get_model()
         def mime_edited_handler(cell, path, text, data):
             model = data
@@ -45,12 +46,14 @@ class MimeTreeView(gtk.TreeView):
         self.scroll.add(self)
 
 class MimeTable(gtk.Table):
-    def __init__(self, tree):
+    def __init__(self, tree, def_tree, def_table):
         gtk.Table.__init__(self, len(GUIConfig.mime_attributes) +
                            3 * len(GUIConfig.mime_lists), 4)
 
         tree.connect('cursor-changed', self.cursor_changed)
         self.last_selected = None
+        self.def_tree = def_tree
+        self.def_table = def_table
 
         self.attributes = {}
         i = 0
@@ -102,13 +105,17 @@ class MimeTable(gtk.Table):
             i += 3
             
     def clear(self):
+        '''Clear input widgets (including connected definition widgets).'''
         for entry, check in self.attributes.itervalues():
             entry.set_text('')
             check.set_active(False)
         for model in self.mime_lists.itervalues():
             model.clear()
+        self.def_table.clear()
+        self.def_tree.get_model().clear()
 
     def save_changed(self, tree):
+        '''Save data from input widgets to model.'''
         if self.last_selected is not None:
             attributes = {}
             for attribute in self.attributes:
@@ -125,6 +132,7 @@ class MimeTable(gtk.Table):
             row = tree.get_model()[self.last_selected]
             row[1] = attributes
             row[2] = mime_lists
+            row[3] = self.def_table.make_def(self.def_tree)
 
     def cursor_changed(self, tree):
         self.save_changed(tree)
@@ -141,3 +149,4 @@ class MimeTable(gtk.Table):
             model = self.mime_lists[mime_list]
             for element in row[2][mime_list]:
                 model.append((element, ))
+        self.def_tree.set_up(row[3], False)
diff --git a/misc/PyGTK_Control/MyServerControl.py b/misc/PyGTK_Control/MyServerControl.py
index 4301ecb..fca487a 100644
--- a/misc/PyGTK_Control/MyServerControl.py
+++ b/misc/PyGTK_Control/MyServerControl.py
@@ -136,7 +136,7 @@ class PyGTKControl():
     def on_add_unknown_definition_menu_item_activate(self, widget):
         '''Adds a new definition to unknown tab.'''
         table, tree = self.tabs['unknown']
-        tree.get_model().append(None, ('', '', False,True, '', False, {}, ))
+        tree.get_model().append(None, ('', '', False, True, '', False, {}, ))
 
     def on_add_mime_type_menu_item_activate(self, widget):
         '''Adds a new MIME type.'''
@@ -144,7 +144,12 @@ class PyGTKControl():
         mime_lists = {}
         for mime_list in GUIConfig.mime_lists:
             mime_lists[mime_list] = []
-        tree.get_model().append(('', {}, mime_lists, ))
+        tree.get_model().append(('', {}, mime_lists, [], ))
+
+    def on_add_definition_to_mime_menu_item_activate(self, widget):
+        '''Adds a definition to currently selected MIME type.'''
+        table, tree = self.mime_tab[1]
+        tree.get_model().append(None, ('', '', False, True, '', False, {}, ))
 
     def on_new_menu_item_activate(self, widget = None):
         '''Clears configuration.'''
@@ -167,7 +172,7 @@ class PyGTKControl():
             name = definition.get_name()
             tab_name = self.options[name] if name in self.options else 'unknown'
             tabs[tab_name].append(definition)
-            
+
         for tab in tabs:
             tree = self.tabs[tab][1]
             tree.set_up(tabs[tab], tab != 'unknown')
@@ -218,25 +223,24 @@ class PyGTKControl():
     def construct_mime(self):
         '''Reads mime options from file and prepares GUI.'''
         vpanels = gtk.VPaned()
-        
+
         panels = gtk.HPaned()
-        tree = MimeTreeView()
-        panels.pack1(tree.scroll, True, False)
-        table = MimeTable(tree)
-        panels.pack2(table, False, False)
-        self.mime_tab = (table, tree, )
+        def_tree = DefinitionTreeView()
+        panels.pack1(def_tree.scroll, True, False)
+        def_table = DefinitionTable(def_tree)
+        panels.pack2(def_table, False, False)
 
-        vpanels.pack1(panels)
+        vpanels.pack2(panels)
 
         panels = gtk.HPaned()
-        tree = DefinitionTreeView()
+        tree = MimeTreeView()
         panels.pack1(tree.scroll, True, False)
-        table = DefinitionTable(tree)
+        table = MimeTable(tree, def_tree, def_table)
         panels.pack2(table, False, False)
-        self.mime_tab = (self.mime_tab, (table, tree, ))
 
-        vpanels.pack2(panels)
+        vpanels.pack1(panels)
         
+        self.mime_tab = ((table, tree, ), (def_table, def_tree), )
         self.widgets.get_widget('notebook').append_page(
             vpanels, gtk.Label('MIME Type'))
 
diff --git a/misc/PyGTK_Control/PyGTKControl.glade b/misc/PyGTK_Control/PyGTKControl.glade
index 6806292..0332e1d 100644
--- a/misc/PyGTK_Control/PyGTKControl.glade
+++ b/misc/PyGTK_Control/PyGTKControl.glade
@@ -185,6 +185,20 @@
                         </child>
                       </widget>
                     </child>
+                    <child>
+                      <widget class="GtkImageMenuItem" id="add_definition_to_mime_menu_item">
+                        <property name="label">Add definition to MIME type</property>
+                        <property name="visible">True</property>
+                        <property name="use_stock">False</property>
+                        <signal name="activate" handler="on_add_definition_to_mime_menu_item_activate"/>
+                        <child internal-child="image">
+                          <widget class="GtkImage" id="add_definition_to_mime_image">
+                            <property name="visible">True</property>
+                            <property name="stock">gtk-add</property>
+                          </widget>
+                        </child>
+                      </widget>
+                    </child>
                   </widget>
                 </child>
               </widget>



commit a02ec8f3d2954ec1b4bac304447a07ff15c4497d
Author: Marek Aaron Sapota <maarons@gnu.org>
Date:   Fri Jul 24 21:14:39 2009 +0200

    Refactored set_up.

diff --git a/misc/PyGTK_Control/DefinitionWidgets.py b/misc/PyGTK_Control/DefinitionWidgets.py
index 94f9004..8f0b964 100644
--- a/misc/PyGTK_Control/DefinitionWidgets.py
+++ b/misc/PyGTK_Control/DefinitionWidgets.py
@@ -242,3 +242,70 @@ class DefinitionTreeView(gtk.TreeView):
                     definitions.append(definition)
                 i = model.iter_next(i)
             return DefinitionTree(name, definitions, attributes)
+
+    def make_clear(self):
+        '''Remove all sub-definitions, reset values of level-1 definitions.'''
+        model = self.get_model()
+        self.get_selection().unselect_all()
+        i = model.iter_children(None)
+        while i is not None: # iterate over options
+            row = model[i]
+            row[3] = False
+            row[4] = ''
+            row[5] = False
+            row[6] = {}
+            child = model.iter_children(i)
+            if child is not None: # remove node children
+                while model.remove(child):
+                    pass
+            i = model.iter_next(i)
+
+    def set_up(self, definitions, search):
+        '''Sets up model reading from given config instance. If search in True
+        will substitute alreaty present model data, if it is false will append
+        all the definitions.'''
+        
+        def get_value_and_attributes(definition):
+            '''Get column values from definition instance.'''
+            name = definition.get_name()
+            enabled = True
+            try:
+                value = definition.get_attribute('value')
+                value_check = True
+            except KeyError:
+                value = ''
+                value_check = False
+            attributes = definition.get_attributes()
+            attributes.pop('value', None)
+            return (name, enabled, value, value_check, attributes, )
+
+        def add_children(parent, definition):
+            '''Insert sub-definitions of given definition as children of given
+            parent tree iterator.'''
+            if isinstance(definition, DefinitionTree):
+                for d in definition.get_definitions():
+                    name, enabled, value, value_check, attributes = \
+                        get_value_and_attributes(d)
+                    i = self.get_model().append(
+                        parent,
+                        (name, '', False, enabled, value, value_check,
+                         attributes, ))
+                    add_children(i, d)
+
+        model = self.get_model()
+        for definition in definitions:
+            name, enabled, value, value_check, attributes = \
+                get_value_and_attributes(definition)
+            if search:
+                i = model.iter_children(None) # find this option
+                while model[i][0] != name:
+                    i = model.iter_next(i)
+            else:
+                i = model.append(None,
+                                 (name, '', False, False, '', False, {}, ))
+            row = model[i]
+            row[3] = enabled
+            row[4] = value
+            row[5] = value_check
+            row[6] = attributes
+            add_children(i, definition)
diff --git a/misc/PyGTK_Control/MyServerControl.py b/misc/PyGTK_Control/MyServerControl.py
index 95d6b44..4301ecb 100644
--- a/misc/PyGTK_Control/MyServerControl.py
+++ b/misc/PyGTK_Control/MyServerControl.py
@@ -154,74 +154,23 @@ class PyGTKControl():
         tree.get_model().clear()
         for tab in self.tabs:
             table, tree = self.tabs[tab]
-            model = tree.get_model()
             table.clear()
-            tree.get_selection().unselect_all()
-            i = model.iter_children(None)
-            while i is not None: # iterate over options
-                row = model[i]
-                row[3] = False
-                row[4] = ''
-                row[5] = False
-                row[6] = {}
-                child = model.iter_children(i)
-                if child is not None: # remove node children
-                    while model.remove(child):
-                        pass
-                i = model.iter_next(i)
+            tree.make_clear()
 
     def set_up(self, config):
         '''Reads configuration from given config instance.'''
-
-        def get_value_and_attributes(definition):
-            name = definition.get_name()
-            enabled = True
-            try:
-                value = definition.get_attribute('value')
-                value_check = True
-            except KeyError:
-                value = ''
-                value_check = False
-            attributes = definition.get_attributes()
-            attributes.pop('value', None)
-            return (name, enabled, value, value_check, attributes, )
-
-        def add_children(parent, definition, model):
-            if isinstance(definition, DefinitionTree):
-                for d in definition.get_definitions():
-                    name, enabled, value, value_check, attributes = \
-                        get_value_and_attributes(d)
-                    i = model.append(
-                        parent,
-                        (name, '', False, enabled, value, value_check,
-                         attributes, ))
-                    add_children(i, d, model)
-
         self.on_new_menu_item_activate()
+        tabs = {}
+        for tab in self.tabs:
+            tabs[tab] = []
         for definition in config.get_definitions():
-            name, enabled, value, value_check, attributes = \
-                get_value_and_attributes(definition)
-
-            if name not in self.options:
-                tab_name = 'unknown'
-            else:
-                tab_name = self.options[name]
-
-            tree = self.tabs[tab_name][1]
-            model = tree.get_model()
-            if tab_name != 'unknown':
-                i = model.iter_children(None) # find this option
-                while model[i][0] != name:
-                    i = model.iter_next(i)
-            else:
-                i = model.append(None,
-                                 (name, '', False, False, '', False, {}, ))
-            row = model[i]
-            row[3] = enabled
-            row[4] = value
-            row[5] = value_check
-            row[6] = attributes
-            add_children(i, definition, model)
+            name = definition.get_name()
+            tab_name = self.options[name] if name in self.options else 'unknown'
+            tabs[tab_name].append(definition)
+            
+        for tab in tabs:
+            tree = self.tabs[tab][1]
+            tree.set_up(tabs[tab], tab != 'unknown')
 
     def construct_options(self):
         '''Reads known options from file and prepares GUI.'''



commit 4171c905b2321945b3ecf71ae65542a7db3c6a2c
Author: Marek Aaron Sapota <maarons@gnu.org>
Date:   Fri Jul 24 20:33:38 2009 +0200

    Refactoring of configuration saving.

diff --git a/misc/PyGTK_Control/DefinitionWidgets.py b/misc/PyGTK_Control/DefinitionWidgets.py
index 85a9810..94f9004 100644
--- a/misc/PyGTK_Control/DefinitionWidgets.py
+++ b/misc/PyGTK_Control/DefinitionWidgets.py
@@ -18,6 +18,7 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 import gtk
 import gobject
+from MyServer.pycontrollib.definition import DefinitionElement, DefinitionTree
 
 class DefinitionTable(gtk.Table):
     def __init__(self, tree):
@@ -117,6 +118,7 @@ class DefinitionTable(gtk.Table):
         self.attach(attributes_scroll, 0, 3, 7, 8)
 
     def clear(self):
+        '''Clear input widgets.'''
         self.enabled_field.set_active(False)
         self.value_field.set_text('')
         self.value_check_field.set_active(False)
@@ -124,6 +126,7 @@ class DefinitionTable(gtk.Table):
         self.last_selected = None
 
     def save_changed(self, tree):
+        '''Save data from input widgets to tree.'''
         if self.last_selected is not None:
             attributes = {}
             i = self.attributes_field.iter_children(None)
@@ -138,6 +141,7 @@ class DefinitionTable(gtk.Table):
             row[6] = attributes
 
     def cursor_changed(self, tree):
+        '''Save data, and display data of current selected row.'''
         self.save_changed(tree)
 
         self.clear()
@@ -151,9 +155,23 @@ class DefinitionTable(gtk.Table):
             self.attributes_field.append((attribute, row[5][attribute], ))
 
     def get_selected(self, tree):
+        '''Get iterator of currently selected row.'''
         model, selected = tree.get_selection().get_selected()
         return selected
 
+    def make_def(self, tree):
+        '''Export all data as list of definitions.'''
+        self.save_changed(tree)
+        model = tree.get_model()
+        definitions = []
+        i = model.iter_children(None)
+        while i is not None: # iterate over options
+            definition = tree.make_def(i)
+            if definition is not None:
+                definitions.append(definition)
+            i = model.iter_next(i)
+        return definitions
+
 class DefinitionTreeView(gtk.TreeView):
     def __init__(self):
         gtk.TreeView.__init__(self, gtk.TreeStore(
@@ -199,3 +217,28 @@ class DefinitionTreeView(gtk.TreeView):
                 return True
         self.props.has_tooltip = True
         self.connect("query-tooltip", show_tooltip)
+        
+    def make_def(self, current):
+        '''Return row pointed by current exported as definition.'''
+        model = self.get_model()
+        row = model[current]
+        name = row[0]
+        enabled = row[3]
+        value = row[4]
+        value_check = row[5]
+        attributes = row[6]
+        if value_check:
+            attributes['value'] = value
+        if not enabled:
+            return None
+        i = model.iter_children(current)
+        if i is None:
+            return DefinitionElement(name, attributes)
+        else:
+            definitions = []
+            while i is not None: # iterate over children
+                definition = self.make_def(i)
+                if definition is not None:
+                    definitions.append(definition)
+                i = model.iter_next(i)
+            return DefinitionTree(name, definitions, attributes)
diff --git a/misc/PyGTK_Control/MyServerControl.py b/misc/PyGTK_Control/MyServerControl.py
index 79f7991..95d6b44 100644
--- a/misc/PyGTK_Control/MyServerControl.py
+++ b/misc/PyGTK_Control/MyServerControl.py
@@ -23,7 +23,6 @@ import gobject
 import GUIConfig
 from MyServer.pycontrollib.config import MyServerConfig
 from MyServer.pycontrollib.controller import Controller
-from MyServer.pycontrollib.definition import DefinitionElement, DefinitionTree
 from AboutWindow import About
 from ConnectionWindow import Connection
 from DefinitionWidgets import DefinitionTable, DefinitionTreeView
@@ -128,41 +127,10 @@ class PyGTKControl():
 
     def get_current_config(self):
         '''Returns current configuration as MyServerConfig instance.'''
-
-        def make_def(current, model):
-            row = model[current]
-            name = row[0]
-            enabled = row[3]
-            value = row[4]
-            value_check = row[5]
-            attributes = row[6]
-            if value_check:
-                attributes['value'] = value
-            if not enabled:
-                return None
-            i = model.iter_children(current)
-            if i is None:
-                return DefinitionElement(name, attributes)
-            else:
-                definitions = []
-                while i is not None: # iterate over children
-                    definition = make_def(i, model)
-                    if definition is not None:
-                        definitions.append(definition)
-                    i = model.iter_next(i)
-                return DefinitionTree(name, definitions, attributes)
-
         definitions = []
         for tab in self.tabs:
             table, tree = self.tabs[tab]
-            model = tree.get_model()
-            table.save_changed(tree)
-            i = model.iter_children(None)
-            while i is not None: # iterate over options
-                definition = make_def(i, model)
-                if definition is not None:
-                    definitions.append(definition)
-                i = model.iter_next(i)
+            definitions += table.make_def(tree)
         return MyServerConfig(definitions)
 
     def on_add_unknown_definition_menu_item_activate(self, widget):
@@ -172,7 +140,7 @@ class PyGTKControl():
 
     def on_add_mime_type_menu_item_activate(self, widget):
         '''Adds a new MIME type.'''
-        table, tree = self.tabs['MIME'][0]
+        table, tree = self.mime_tab[0]
         mime_lists = {}
         for mime_list in GUIConfig.mime_lists:
             mime_lists[mime_list] = []
@@ -307,7 +275,7 @@ class PyGTKControl():
         panels.pack1(tree.scroll, True, False)
         table = MimeTable(tree)
         panels.pack2(table, False, False)
-        self.tabs['MIME'] = (table, tree, )
+        self.mime_tab = (table, tree, )
 
         vpanels.pack1(panels)
 
@@ -316,7 +284,7 @@ class PyGTKControl():
         panels.pack1(tree.scroll, True, False)
         table = DefinitionTable(tree)
         panels.pack2(table, False, False)
-        self.tabs['MIME'] = (self.tabs['MIME'], (table, tree, ))
+        self.mime_tab = (self.mime_tab, (table, tree, ))
 
         vpanels.pack2(panels)
         



commit 716ad749f0f326562db1a80e08e3cc8b6faf2e21
Author: Marek Aaron Sapota <maarons@gnu.org>
Date:   Fri Jul 24 17:58:54 2009 +0200

    Split MyServerControl to several files.

diff --git a/misc/PyGTK_Control/AboutWindow.py b/misc/PyGTK_Control/AboutWindow.py
new file mode 100644
index 0000000..252081f
--- /dev/null
+++ b/misc/PyGTK_Control/AboutWindow.py
@@ -0,0 +1,31 @@
+# -*- coding: utf-8 -*-
+'''
+MyServer
+Copyright (C) 2009 Free Software Foundation, Inc.
+This program 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 3 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program.  If not, see <http://www.gnu.org/licenses/>.
+'''
+
+import gtk
+import gtk.glade
+
+class About():
+    '''GNU MyServer Control about window.'''
+
+    def __init__(self):
+        self.gladefile = 'PyGTKControl.glade'
+        self.widgets = gtk.glade.XML(self.gladefile, 'aboutdialog')
+        self.widgets.signal_autoconnect(self)
+
+    def on_aboutdialog_response(self, widget, response):
+        widget.destroy()
diff --git a/misc/PyGTK_Control/ConnectionWindow.py b/misc/PyGTK_Control/ConnectionWindow.py
new file mode 100644
index 0000000..16d4ddf
--- /dev/null
+++ b/misc/PyGTK_Control/ConnectionWindow.py
@@ -0,0 +1,45 @@
+# -*- coding: utf-8 -*-
+'''
+MyServer
+Copyright (C) 2009 Free Software Foundation, Inc.
+This program 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 3 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program.  If not, see <http://www.gnu.org/licenses/>.
+'''
+
+import gtk
+import gtk.glade
+
+class Connection():
+    def __init__(self):
+        self.gladefile = 'PyGTKControl.glade'
+        self.widgets = gtk.glade.XML(self.gladefile, 'connectiondialog')
+        self.widgets.signal_autoconnect(self)
+
+    def destroy(self):
+        '''Destroys this widget.'''
+        self.widgets.get_widget('connectiondialog').destroy()
+
+    def on_cancel_button_clicked(self, widget):
+        self.destroy()
+
+    def get_host(self):
+        return self.widgets.get_widget('host_entry').get_text()
+
+    def get_port(self):
+        return self.widgets.get_widget('port_entry').get_text()
+
+    def get_username(self):
+        return self.widgets.get_widget('username_entry').get_text()
+
+    def get_password(self):
+        return self.widgets.get_widget('password_entry').get_text()
diff --git a/misc/PyGTK_Control/DefinitionWidgets.py b/misc/PyGTK_Control/DefinitionWidgets.py
new file mode 100644
index 0000000..85a9810
--- /dev/null
+++ b/misc/PyGTK_Control/DefinitionWidgets.py
@@ -0,0 +1,201 @@
+# -*- coding: utf-8 -*-
+'''
+MyServer
+Copyright (C) 2009 Free Software Foundation, Inc.
+This program 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 3 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program.  If not, see <http://www.gnu.org/licenses/>.
+'''
+
+import gtk
+import gobject
+
+class DefinitionTable(gtk.Table):
+    def __init__(self, tree):
+        gtk.Table.__init__(self, 8, 3)
+
+        tree.connect('cursor-changed', self.cursor_changed)
+        self.last_selected = None
+
+        enabled_label = gtk.Label('enabled:')
+        self.enabled_field = enabled_checkbutton = gtk.CheckButton()
+        enabled_checkbutton.set_tooltip_text('If not active, definition won\'t be included in saved configuration.')
+        self.attach(enabled_label, 0, 1, 0, 1, gtk.FILL, gtk.FILL)
+        self.attach(enabled_checkbutton, 1, 3, 0, 1, yoptions = gtk.FILL)
+
+        value_label = gtk.Label('value:')
+        self.value_field = value_entry = gtk.Entry()
+        self.value_check_field = value_checkbutton = gtk.CheckButton()
+        value_checkbutton.set_tooltip_text('If active value will be used.')
+        value_checkbutton.set_active(True)
+        def toggle_value(button, tree):
+            # don't allow value for definition with children
+            model, selected = tree.get_selection().get_selected()
+            if selected is not None and model.iter_children(selected) is not None:
+                button.set_active(False)
+                return
+            active = button.get_active()
+            self.value_field.set_editable(active)
+        value_checkbutton.connect('toggled', toggle_value, tree)
+        self.attach(value_label, 0, 1, 1, 2, gtk.FILL, gtk.FILL)
+        self.attach(value_entry, 1, 2, 1, 2, yoptions = gtk.FILL)
+        self.attach(value_checkbutton, 2, 3, 1, 2, gtk.FILL, gtk.FILL)
+
+        add_definition_button = gtk.Button('add sub-definition')
+        def add_sub_definition(button):
+            model, selected = tree.get_selection().get_selected()
+            if selected is not None:
+                model.append(selected, ('', '', False, True, '', False, {}, ))
+                self.value_check_field.set_active(False) # auto disable value
+                self.value_field.set_editable(False)
+        add_definition_button.connect('clicked', add_sub_definition)
+        self.attach(add_definition_button, 0, 3, 2, 3, yoptions = gtk.FILL)
+
+        remove_definition_button = gtk.Button('remove this definition')
+        def remove_definition(button):
+            model, selected = tree.get_selection().get_selected()
+            if selected is not None and not model[selected][2]:
+                model.remove(selected)
+                self.clear()
+        remove_definition_button.connect('clicked', remove_definition)
+        self.attach(remove_definition_button, 0, 3, 3, 4, yoptions = gtk.FILL)
+
+        add_attribute_button = gtk.Button('add attribute')
+        remove_attribute_button = gtk.Button('remove attribute')
+        add_attribute_button.connect(
+            'clicked',
+            lambda button: attributes_model.append(('', '', )))
+        def remove_attribute(button):
+            model, selected = attributes_list.get_selection().get_selected()
+            if selected is not None:
+                model.remove(selected)
+        remove_attribute_button.connect('clicked', remove_attribute)
+        self.attach(add_attribute_button, 0, 3, 4, 5, yoptions = gtk.FILL)
+        self.attach(remove_attribute_button, 0, 3, 5, 6, yoptions = gtk.FILL)
+
+        attributes_label = gtk.Label('attributes:')
+        attributes_list = gtk.TreeView(gtk.ListStore(gobject.TYPE_STRING,
+                                                     gobject.TYPE_STRING))
+        attributes_scroll = gtk.ScrolledWindow()
+        attributes_scroll.set_policy(gtk.POLICY_AUTOMATIC, gtk.POLICY_AUTOMATIC)
+        attributes_scroll.set_shadow_type(gtk.SHADOW_OUT)
+        attributes_scroll.set_border_width(5)
+        attributes_scroll.add(attributes_list)
+        self.attributes_field = attributes_model = attributes_list.get_model()
+
+        def edited_handler(cell, path, text, data):
+            model, col = data
+            model[path][col] = text
+        variable_column = gtk.TreeViewColumn('variable')
+        variable_renderer = gtk.CellRendererText()
+        variable_renderer.set_property('editable', True)
+        variable_renderer.connect('edited', edited_handler,
+                                  (attributes_model, 0, ))
+        variable_column.pack_start(variable_renderer)
+        variable_column.add_attribute(variable_renderer, 'text', 0)
+
+        value_column = gtk.TreeViewColumn('value')
+        value_renderer = gtk.CellRendererText()
+        value_renderer.set_property('editable', True)
+        value_renderer.connect('edited', edited_handler,
+                                  (attributes_model, 1, ))
+        value_column.pack_start(value_renderer)
+        value_column.add_attribute(value_renderer, 'text', 1)
+
+        attributes_list.append_column(variable_column)
+        attributes_list.append_column(value_column)
+        self.attach(attributes_label, 0, 3, 6, 7, yoptions = gtk.FILL)
+        self.attach(attributes_scroll, 0, 3, 7, 8)
+
+    def clear(self):
+        self.enabled_field.set_active(False)
+        self.value_field.set_text('')
+        self.value_check_field.set_active(False)
+        self.attributes_field.clear()
+        self.last_selected = None
+
+    def save_changed(self, tree):
+        if self.last_selected is not None:
+            attributes = {}
+            i = self.attributes_field.iter_children(None)
+            while i is not None: # iterate over attributes
+                attributes[self.attributes_field.get_value(i, 0)] = \
+                    self.attributes_field.get_value(i, 1)
+                i = self.attributes_field.iter_next(i)
+            row = tree.get_model()[self.last_selected]
+            row[3] = self.enabled_field.get_active()
+            row[4] = self.value_field.get_text()
+            row[5] = self.value_check_field.get_active()
+            row[6] = attributes
+
+    def cursor_changed(self, tree):
+        self.save_changed(tree)
+
+        self.clear()
+
+        self.last_selected = current = self.get_selected(tree)
+        row = tree.get_model()[current]
+        self.enabled_field.set_active(row[3])
+        self.value_field.set_text(row[4])
+        self.value_check_field.set_active(row[5])
+        for attribute in row[6]:
+            self.attributes_field.append((attribute, row[5][attribute], ))
+
+    def get_selected(self, tree):
+        model, selected = tree.get_selection().get_selected()
+        return selected
+
+class DefinitionTreeView(gtk.TreeView):
+    def __init__(self):
+        gtk.TreeView.__init__(self, gtk.TreeStore(
+                gobject.TYPE_STRING, # option name
+                gobject.TYPE_STRING, # option tooltip
+                gobject.TYPE_BOOLEAN, # True if option is known
+                gobject.TYPE_BOOLEAN, # enabled
+                gobject.TYPE_STRING, # value
+                gobject.TYPE_BOOLEAN, # value_check
+                gobject.TYPE_PYOBJECT)) # attributes dict
+        model = self.get_model()
+        def name_edited_handler(cell, path, text, data):
+            model = data
+            row = model[path]
+            if not row[2]: # don't edit names of known options
+                row[0] = text
+        name_renderer = gtk.CellRendererText()
+        name_renderer.set_property('editable', True)
+        name_renderer.connect('edited', name_edited_handler, model)
+        name_column = gtk.TreeViewColumn('name')
+        name_column.pack_start(name_renderer)
+        name_column.add_attribute(name_renderer, 'text', 0)
+        self.append_column(name_column)
+        value_renderer = gtk.CellRendererText()
+        value_column = gtk.TreeViewColumn('value')
+        value_column.pack_start(value_renderer)
+        value_column.add_attribute(value_renderer, 'text', 4)
+        self.append_column(value_column)
+
+        self.scroll = gtk.ScrolledWindow()
+        self.scroll.set_policy(gtk.POLICY_AUTOMATIC, gtk.POLICY_AUTOMATIC)
+        self.scroll.set_shadow_type(gtk.SHADOW_OUT)
+        self.scroll.set_border_width(5)
+        self.scroll.add(self)
+
+        def show_tooltip(widget, x, y, keyboard_tip, tooltip):
+            if not widget.get_tooltip_context(x, y, keyboard_tip):
+                return False
+            else:
+                model, path, it = widget.get_tooltip_context(x, y, keyboard_tip)
+                tooltip.set_text(model[it][1])
+                widget.set_tooltip_row(tooltip, path)
+                return True
+        self.props.has_tooltip = True
+        self.connect("query-tooltip", show_tooltip)
diff --git a/misc/PyGTK_Control/MIMEWidgets.py b/misc/PyGTK_Control/MIMEWidgets.py
new file mode 100644
index 0000000..832357a
--- /dev/null
+++ b/misc/PyGTK_Control/MIMEWidgets.py
@@ -0,0 +1,143 @@
+# -*- coding: utf-8 -*-
+'''
+MyServer
+Copyright (C) 2009 Free Software Foundation, Inc.
+This program 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 3 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program.  If not, see <http://www.gnu.org/licenses/>.
+'''
+
+import gtk
+import gobject
+import GUIConfig
+
+class MimeTreeView(gtk.TreeView):
+    def __init__(self):
+        gtk.TreeView.__init__(self, gtk.ListStore(
+                gobject.TYPE_STRING, # mime name
+                gobject.TYPE_PYOBJECT, # mime single attributes
+                gobject.TYPE_PYOBJECT)) # mime attribute lists
+        model = self.get_model()
+        def mime_edited_handler(cell, path, text, data):
+            model = data
+            model[path][0] = text
+        mime_renderer = gtk.CellRendererText()
+        mime_renderer.set_property('editable', True)
+        mime_renderer.connect('edited', mime_edited_handler, model)
+        mime_column = gtk.TreeViewColumn('MIME Type')
+        mime_column.pack_start(mime_renderer)
+        mime_column.add_attribute(mime_renderer, 'text', 0)
+        self.append_column(mime_column)
+
+        self.scroll = gtk.ScrolledWindow()
+        self.scroll.set_policy(gtk.POLICY_AUTOMATIC, gtk.POLICY_AUTOMATIC)
+        self.scroll.set_shadow_type(gtk.SHADOW_OUT)
+        self.scroll.set_border_width(5)
+        self.scroll.add(self)
+
+class MimeTable(gtk.Table):
+    def __init__(self, tree):
+        gtk.Table.__init__(self, len(GUIConfig.mime_attributes) +
+                           3 * len(GUIConfig.mime_lists), 4)
+
+        tree.connect('cursor-changed', self.cursor_changed)
+        self.last_selected = None
+
+        self.attributes = {}
+        i = 0
+        for attribute in GUIConfig.mime_attributes:
+            label = gtk.Label(attribute)
+            entry = gtk.Entry()
+            check = gtk.CheckButton()
+            self.attributes[attribute] = (entry, check, )
+            self.attach(label, 0, 1, i, i + 1, yoptions = gtk.FILL)
+            self.attach(entry, 1, 3, i, i + 1, yoptions = gtk.FILL)
+            self.attach(check, 3, 4, i, i + 1, gtk.FILL, gtk.FILL)
+            i += 1
+        self.mime_lists = {}
+        for mime_list in GUIConfig.mime_lists:
+            tree = gtk.TreeView(gtk.ListStore(gobject.TYPE_STRING))
+            tree_model = tree.get_model()
+            def tree_edited_handler(cell, path, text, data):
+                model = data
+                model[path][0] = text
+            tree_renderer = gtk.CellRendererText()
+            tree_renderer.set_property('editable', True)
+            tree_renderer.connect('edited', tree_edited_handler, tree_model)
+            tree_column = gtk.TreeViewColumn(mime_list)
+            tree_column.pack_start(tree_renderer)
+            tree_column.add_attribute(tree_renderer, 'text', 0)
+            tree.append_column(tree_column)
+            tree_scroll = gtk.ScrolledWindow()
+            tree_scroll.set_policy(gtk.POLICY_AUTOMATIC, gtk.POLICY_AUTOMATIC)
+            tree_scroll.set_shadow_type(gtk.SHADOW_OUT)
+            tree_scroll.set_border_width(5)
+            tree_scroll.add(tree)
+
+            def add_to_tree(button, model):
+                model.append(('', ))
+            add_button = gtk.Button('Add')
+            add_button.connect('clicked', add_to_tree, tree_model)
+            def remove_from_tree(button, tree):
+                model, selected = tree.get_selection().get_selected()
+                if selected is not None:
+                    model.remove(selected)
+            remove_button = gtk.Button('Remove')
+            remove_button.connect('clicked', remove_from_tree, tree)
+
+            self.mime_lists[mime_list] = tree_model
+            self.attach(tree_scroll, 0, 2, i, i + 3)
+            self.attach(add_button, 2, 3, i, i + 1, yoptions = gtk.FILL)
+            self.attach(remove_button, 2, 3, i + 1, i + 2, yoptions = gtk.FILL)
+            self.attach(gtk.Label(), 2, 3, i + 2, i + 3)
+            i += 3
+            
+    def clear(self):
+        for entry, check in self.attributes.itervalues():
+            entry.set_text('')
+            check.set_active(False)
+        for model in self.mime_lists.itervalues():
+            model.clear()
+
+    def save_changed(self, tree):
+        if self.last_selected is not None:
+            attributes = {}
+            for attribute in self.attributes:
+                entry, check = self.attributes[attribute]
+                attributes[attribute] = (entry.get_text(), check.get_active(), )
+            mime_lists = {}
+            for mime_list in GUIConfig.mime_lists:
+                container = mime_lists[mime_list] = []
+                model = self.mime_lists[mime_list]
+                i = model.iter_children(None)
+                while i is not None: # iterate over list elements
+                    container.append(model.get_value(i, 0))
+                    i = model.iter_next(i)
+            row = tree.get_model()[self.last_selected]
+            row[1] = attributes
+            row[2] = mime_lists
+
+    def cursor_changed(self, tree):
+        self.save_changed(tree)
+
+        self.clear()
+
+        self.last_selected = current = tree.get_selection().get_selected()[1]
+        row = tree.get_model()[current]
+        for attribute in row[1]:
+            entry, check = self.attributes[attribute]
+            entry.set_text(row[1][attribute][0])
+            check.set_active(row[1][attribute][1])
+        for mime_list in row[2]:
+            model = self.mime_lists[mime_list]
+            for element in row[2][mime_list]:
+                model.append((element, ))
diff --git a/misc/PyGTK_Control/MyServerControl.py b/misc/PyGTK_Control/MyServerControl.py
index c313af1..79f7991 100644
--- a/misc/PyGTK_Control/MyServerControl.py
+++ b/misc/PyGTK_Control/MyServerControl.py
@@ -18,352 +18,16 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 from __future__ import print_function
 import gtk
-import gobject
 import gtk.glade
+import gobject
 import GUIConfig
 from MyServer.pycontrollib.config import MyServerConfig
 from MyServer.pycontrollib.controller import Controller
 from MyServer.pycontrollib.definition import DefinitionElement, DefinitionTree
-
-class About():
-    '''GNU MyServer Control about window.'''
-
-    def __init__(self):
-        self.gladefile = 'PyGTKControl.glade'
-        self.widgets = gtk.glade.XML(self.gladefile, 'aboutdialog')
-        self.widgets.signal_autoconnect(self)
-
-    def on_aboutdialog_response(self, widget, response):
-        widget.destroy()
-
-class Connection():
-    def __init__(self):
-        self.gladefile = 'PyGTKControl.glade'
-        self.widgets = gtk.glade.XML(self.gladefile, 'connectiondialog')
-        self.widgets.signal_autoconnect(self)
-
-    def destroy(self):
-        '''Destroys this widget.'''
-        self.widgets.get_widget('connectiondialog').destroy()
-
-    def on_cancel_button_clicked(self, widget):
-        self.destroy()
-
-    def get_host(self):
-        return self.widgets.get_widget('host_entry').get_text()
-
-    def get_port(self):
-        return self.widgets.get_widget('port_entry').get_text()
-
-    def get_username(self):
-        return self.widgets.get_widget('username_entry').get_text()
-
-    def get_password(self):
-        return self.widgets.get_widget('password_entry').get_text()
-
-class EditionTable(gtk.Table):
-    def __init__(self, tree):
-        gtk.Table.__init__(self, 8, 3)
-
-        tree.connect('cursor-changed', self.cursor_changed)
-        self.last_selected = None
-
-        enabled_label = gtk.Label('enabled:')
-        self.enabled_field = enabled_checkbutton = gtk.CheckButton()
-        enabled_checkbutton.set_tooltip_text('If not active, definition won\'t be included in saved configuration.')
-        self.attach(enabled_label, 0, 1, 0, 1, gtk.FILL, gtk.FILL)
-        self.attach(enabled_checkbutton, 1, 3, 0, 1, yoptions = gtk.FILL)
-
-        value_label = gtk.Label('value:')
-        self.value_field = value_entry = gtk.Entry()
-        self.value_check_field = value_checkbutton = gtk.CheckButton()
-        value_checkbutton.set_tooltip_text('If active value will be used.')
-        value_checkbutton.set_active(True)
-        def toggle_value(button, tree):
-            # don't allow value for definition with children
-            model, selected = tree.get_selection().get_selected()
-            if selected is not None and model.iter_children(selected) is not None:
-                button.set_active(False)
-                return
-            active = button.get_active()
-            self.value_field.set_editable(active)
-        value_checkbutton.connect('toggled', toggle_value, tree)
-        self.attach(value_label, 0, 1, 1, 2, gtk.FILL, gtk.FILL)
-        self.attach(value_entry, 1, 2, 1, 2, yoptions = gtk.FILL)
-        self.attach(value_checkbutton, 2, 3, 1, 2, gtk.FILL, gtk.FILL)
-
-        add_definition_button = gtk.Button('add sub-definition')
-        def add_sub_definition(button):
-            model, selected = tree.get_selection().get_selected()
-            if selected is not None:
-                model.append(selected, ('', '', False, True, '', False, {}, ))
-                self.value_check_field.set_active(False) # auto disable value
-                self.value_field.set_editable(False)
-        add_definition_button.connect('clicked', add_sub_definition)
-        self.attach(add_definition_button, 0, 3, 2, 3, yoptions = gtk.FILL)
-
-        remove_definition_button = gtk.Button('remove this definition')
-        def remove_definition(button):
-            model, selected = tree.get_selection().get_selected()
-            if selected is not None and not model[selected][2]:
-                model.remove(selected)
-                self.clear()
-        remove_definition_button.connect('clicked', remove_definition)
-        self.attach(remove_definition_button, 0, 3, 3, 4, yoptions = gtk.FILL)
-
-        add_attribute_button = gtk.Button('add attribute')
-        remove_attribute_button = gtk.Button('remove attribute')
-        add_attribute_button.connect(
-            'clicked',
-            lambda button: attributes_model.append(('', '', )))
-        def remove_attribute(button):
-            model, selected = attributes_list.get_selection().get_selected()
-            if selected is not None:
-                model.remove(selected)
-        remove_attribute_button.connect('clicked', remove_attribute)
-        self.attach(add_attribute_button, 0, 3, 4, 5, yoptions = gtk.FILL)
-        self.attach(remove_attribute_button, 0, 3, 5, 6, yoptions = gtk.FILL)
-
-        attributes_label = gtk.Label('attributes:')
-        attributes_list = gtk.TreeView(gtk.ListStore(gobject.TYPE_STRING,
-                                                     gobject.TYPE_STRING))
-        attributes_scroll = gtk.ScrolledWindow()
-        attributes_scroll.set_policy(gtk.POLICY_AUTOMATIC, gtk.POLICY_AUTOMATIC)
-        attributes_scroll.set_shadow_type(gtk.SHADOW_OUT)
-        attributes_scroll.set_border_width(5)
-        attributes_scroll.add(attributes_list)
-        self.attributes_field = attributes_model = attributes_list.get_model()
-
-        def edited_handler(cell, path, text, data):
-            model, col = data
-            model[path][col] = text
-        variable_column = gtk.TreeViewColumn('variable')
-        variable_renderer = gtk.CellRendererText()
-        variable_renderer.set_property('editable', True)
-        variable_renderer.connect('edited', edited_handler,
-                                  (attributes_model, 0, ))
-        variable_column.pack_start(variable_renderer)
-        variable_column.add_attribute(variable_renderer, 'text', 0)
-
-        value_column = gtk.TreeViewColumn('value')
-        value_renderer = gtk.CellRendererText()
-        value_renderer.set_property('editable', True)
-        value_renderer.connect('edited', edited_handler,
-                                  (attributes_model, 1, ))
-        value_column.pack_start(value_renderer)
-        value_column.add_attribute(value_renderer, 'text', 1)
-
-        attributes_list.append_column(variable_column)
-        attributes_list.append_column(value_column)
-        self.attach(attributes_label, 0, 3, 6, 7, yoptions = gtk.FILL)
-        self.attach(attributes_scroll, 0, 3, 7, 8)
-
-    def clear(self):
-        self.enabled_field.set_active(False)
-        self.value_field.set_text('')
-        self.value_check_field.set_active(False)
-        self.attributes_field.clear()
-        self.last_selected = None
-
-    def save_changed(self, tree):
-        if self.last_selected is not None:
-            attributes = {}
-            i = self.attributes_field.iter_children(None)
-            while i is not None: # iterate over attributes
-                attributes[self.attributes_field.get_value(i, 0)] = \
-                    self.attributes_field.get_value(i, 1)
-                i = self.attributes_field.iter_next(i)
-            row = tree.get_model()[self.last_selected]
-            row[3] = self.enabled_field.get_active()
-            row[4] = self.value_field.get_text()
-            row[5] = self.value_check_field.get_active()
-            row[6] = attributes
-
-    def cursor_changed(self, tree):
-        self.save_changed(tree)
-
-        self.clear()
-
-        self.last_selected = current = self.get_selected(tree)
-        row = tree.get_model()[current]
-        self.enabled_field.set_active(row[3])
-        self.value_field.set_text(row[4])
-        self.value_check_field.set_active(row[5])
-        for attribute in row[6]:
-            self.attributes_field.append((attribute, row[5][attribute], ))
-
-    def get_selected(self, tree):
-        model, selected = tree.get_selection().get_selected()
-        return selected
-
-class DefinitionTreeView(gtk.TreeView):
-    def __init__(self):
-        gtk.TreeView.__init__(self, gtk.TreeStore(
-                gobject.TYPE_STRING, # option name
-                gobject.TYPE_STRING, # option tooltip
-                gobject.TYPE_BOOLEAN, # True if option is known
-                gobject.TYPE_BOOLEAN, # enabled
-                gobject.TYPE_STRING, # value
-                gobject.TYPE_BOOLEAN, # value_check
-                gobject.TYPE_PYOBJECT)) # attributes dict
-        model = self.get_model()
-        def name_edited_handler(cell, path, text, data):
-            model = data
-            row = model[path]
-            if not row[2]: # don't edit names of known options
-                row[0] = text
-        name_renderer = gtk.CellRendererText()
-        name_renderer.set_property('editable', True)
-        name_renderer.connect('edited', name_edited_handler, model)
-        name_column = gtk.TreeViewColumn('name')
-        name_column.pack_start(name_renderer)
-        name_column.add_attribute(name_renderer, 'text', 0)
-        self.append_column(name_column)
-        value_renderer = gtk.CellRendererText()
-        value_column = gtk.TreeViewColumn('value')
-        value_column.pack_start(value_renderer)
-        value_column.add_attribute(value_renderer, 'text', 4)
-        self.append_column(value_column)
-
-        self.scroll = gtk.ScrolledWindow()
-        self.scroll.set_policy(gtk.POLICY_AUTOMATIC, gtk.POLICY_AUTOMATIC)
-        self.scroll.set_shadow_type(gtk.SHADOW_OUT)
-        self.scroll.set_border_width(5)
-        self.scroll.add(self)
-
-        def show_tooltip(widget, x, y, keyboard_tip, tooltip):
-            if not widget.get_tooltip_context(x, y, keyboard_tip):
-                return False
-            else:
-                model, path, it = widget.get_tooltip_context(x, y, keyboard_tip)
-                tooltip.set_text(model[it][1])
-                widget.set_tooltip_row(tooltip, path)
-                return True
-        self.props.has_tooltip = True
-        self.connect("query-tooltip", show_tooltip)
-
-class MimeTreeView(gtk.TreeView):
-    def __init__(self):
-        gtk.TreeView.__init__(self, gtk.ListStore(
-                gobject.TYPE_STRING, # mime name
-                gobject.TYPE_PYOBJECT, # mime single attributes
-                gobject.TYPE_PYOBJECT)) # mime attribute lists
-        model = self.get_model()
-        def mime_edited_handler(cell, path, text, data):
-            model = data
-            model[path][0] = text
-        mime_renderer = gtk.CellRendererText()
-        mime_renderer.set_property('editable', True)
-        mime_renderer.connect('edited', mime_edited_handler, model)
-        mime_column = gtk.TreeViewColumn('MIME Type')
-        mime_column.pack_start(mime_renderer)
-        mime_column.add_attribute(mime_renderer, 'text', 0)
-        self.append_column(mime_column)
-
-        self.scroll = gtk.ScrolledWindow()
-        self.scroll.set_policy(gtk.POLICY_AUTOMATIC, gtk.POLICY_AUTOMATIC)
-        self.scroll.set_shadow_type(gtk.SHADOW_OUT)
-        self.scroll.set_border_width(5)
-        self.scroll.add(self)
-
-class MimeTable(gtk.Table):
-    def __init__(self, tree):
-        gtk.Table.__init__(self, len(GUIConfig.mime_attributes) +
-                           3 * len(GUIConfig.mime_lists), 4)
-
-        tree.connect('cursor-changed', self.cursor_changed)
-        self.last_selected = None
-
-        self.attributes = {}
-        i = 0
-        for attribute in GUIConfig.mime_attributes:
-            label = gtk.Label(attribute)
-            entry = gtk.Entry()
-            check = gtk.CheckButton()
-            self.attributes[attribute] = (entry, check, )
-            self.attach(label, 0, 1, i, i + 1, yoptions = gtk.FILL)
-            self.attach(entry, 1, 3, i, i + 1, yoptions = gtk.FILL)
-            self.attach(check, 3, 4, i, i + 1, gtk.FILL, gtk.FILL)
-            i += 1
-        self.mime_lists = {}
-        for mime_list in GUIConfig.mime_lists:
-            tree = gtk.TreeView(gtk.ListStore(gobject.TYPE_STRING))
-            tree_model = tree.get_model()
-            def tree_edited_handler(cell, path, text, data):
-                model = data
-                model[path][0] = text
-            tree_renderer = gtk.CellRendererText()
-            tree_renderer.set_property('editable', True)
-            tree_renderer.connect('edited', tree_edited_handler, tree_model)
-            tree_column = gtk.TreeViewColumn(mime_list)
-            tree_column.pack_start(tree_renderer)
-            tree_column.add_attribute(tree_renderer, 'text', 0)
-            tree.append_column(tree_column)
-            tree_scroll = gtk.ScrolledWindow()
-            tree_scroll.set_policy(gtk.POLICY_AUTOMATIC, gtk.POLICY_AUTOMATIC)
-            tree_scroll.set_shadow_type(gtk.SHADOW_OUT)
-            tree_scroll.set_border_width(5)
-            tree_scroll.add(tree)
-
-            def add_to_tree(button, model):
-                model.append(('', ))
-            add_button = gtk.Button('Add')
-            add_button.connect('clicked', add_to_tree, tree_model)
-            def remove_from_tree(button, tree):
-                model, selected = tree.get_selection().get_selected()
-                if selected is not None:
-                    model.remove(selected)
-            remove_button = gtk.Button('Remove')
-            remove_button.connect('clicked', remove_from_tree, tree)
-
-            self.mime_lists[mime_list] = tree_model
-            self.attach(tree_scroll, 0, 2, i, i + 3)
-            self.attach(add_button, 2, 3, i, i + 1, yoptions = gtk.FILL)
-            self.attach(remove_button, 2, 3, i + 1, i + 2, yoptions = gtk.FILL)
-            self.attach(gtk.Label(), 2, 3, i + 2, i + 3)
-            i += 3
-            
-    def clear(self):
-        for entry, check in self.attributes.itervalues():
-            entry.set_text('')
-            check.set_active(False)
-        for model in self.mime_lists.itervalues():
-            model.clear()
-
-    def save_changed(self, tree):
-        if self.last_selected is not None:
-            attributes = {}
-            for attribute in self.attributes:
-                entry, check = self.attributes[attribute]
-                attributes[attribute] = (entry.get_text(), check.get_active(), )
-            mime_lists = {}
-            for mime_list in GUIConfig.mime_lists:
-                container = mime_lists[mime_list] = []
-                model = self.mime_lists[mime_list]
-                i = model.iter_children(None)
-                while i is not None: # iterate over list elements
-                    container.append(model.get_value(i, 0))
-                    i = model.iter_next(i)
-            row = tree.get_model()[self.last_selected]
-            row[1] = attributes
-            row[2] = mime_lists
-
-    def cursor_changed(self, tree):
-        self.save_changed(tree)
-
-        self.clear()
-
-        self.last_selected = current = tree.get_selection().get_selected()[1]
-        row = tree.get_model()[current]
-        for attribute in row[1]:
-            entry, check = self.attributes[attribute]
-            entry.set_text(row[1][attribute][0])
-            check.set_active(row[1][attribute][1])
-        for mime_list in row[2]:
-            model = self.mime_lists[mime_list]
-            for element in row[2][mime_list]:
-                model.append((element, ))
-
+from AboutWindow import About
+from ConnectionWindow import Connection
+from DefinitionWidgets import DefinitionTable, DefinitionTreeView
+from MIMEWidgets import MimeTable, MimeTreeView
 
 class PyGTKControl():
     '''GNU MyServer Control main window.'''
@@ -616,7 +280,7 @@ class PyGTKControl():
             tree = DefinitionTreeView()
             tree_model = tree.get_model()
             panels.pack1(tree.scroll, True, False)
-            table = EditionTable(tree)
+            table = DefinitionTable(tree)
             panels.pack2(table, False, False)
 
             self.tabs[tab] = (table, tree, )
@@ -650,7 +314,7 @@ class PyGTKControl():
         panels = gtk.HPaned()
         tree = DefinitionTreeView()
         panels.pack1(tree.scroll, True, False)
-        table = EditionTable(tree)
+        table = DefinitionTable(tree)
         panels.pack2(table, False, False)
         self.tabs['MIME'] = (self.tabs['MIME'], (table, tree, ))
 



commit f59a03ce25be48ee894e1db2947bdfd03ac93d71
Author: Marek Aaron Sapota <maarons@gnu.org>
Date:   Fri Jul 24 00:06:15 2009 +0200

    Editable MIME types.

diff --git a/misc/PyGTK_Control/MyServerControl.py b/misc/PyGTK_Control/MyServerControl.py
index fb401fc..c313af1 100644
--- a/misc/PyGTK_Control/MyServerControl.py
+++ b/misc/PyGTK_Control/MyServerControl.py
@@ -244,7 +244,7 @@ class DefinitionTreeView(gtk.TreeView):
 
 class MimeTreeView(gtk.TreeView):
     def __init__(self):
-        gtk.TreeView.__init__(self, gtk.TreeStore(
+        gtk.TreeView.__init__(self, gtk.ListStore(
                 gobject.TYPE_STRING, # mime name
                 gobject.TYPE_PYOBJECT, # mime single attributes
                 gobject.TYPE_PYOBJECT)) # mime attribute lists
@@ -267,18 +267,25 @@ class MimeTreeView(gtk.TreeView):
         self.scroll.add(self)
 
 class MimeTable(gtk.Table):
-    def __init__(self):
+    def __init__(self, tree):
         gtk.Table.__init__(self, len(GUIConfig.mime_attributes) +
                            3 * len(GUIConfig.mime_lists), 4)
+
+        tree.connect('cursor-changed', self.cursor_changed)
+        self.last_selected = None
+
+        self.attributes = {}
         i = 0
         for attribute in GUIConfig.mime_attributes:
             label = gtk.Label(attribute)
             entry = gtk.Entry()
             check = gtk.CheckButton()
+            self.attributes[attribute] = (entry, check, )
             self.attach(label, 0, 1, i, i + 1, yoptions = gtk.FILL)
             self.attach(entry, 1, 3, i, i + 1, yoptions = gtk.FILL)
             self.attach(check, 3, 4, i, i + 1, gtk.FILL, gtk.FILL)
             i += 1
+        self.mime_lists = {}
         for mime_list in GUIConfig.mime_lists:
             tree = gtk.TreeView(gtk.ListStore(gobject.TYPE_STRING))
             tree_model = tree.get_model()
@@ -308,12 +315,55 @@ class MimeTable(gtk.Table):
                     model.remove(selected)
             remove_button = gtk.Button('Remove')
             remove_button.connect('clicked', remove_from_tree, tree)
-            
+
+            self.mime_lists[mime_list] = tree_model
             self.attach(tree_scroll, 0, 2, i, i + 3)
             self.attach(add_button, 2, 3, i, i + 1, yoptions = gtk.FILL)
             self.attach(remove_button, 2, 3, i + 1, i + 2, yoptions = gtk.FILL)
             self.attach(gtk.Label(), 2, 3, i + 2, i + 3)
             i += 3
+            
+    def clear(self):
+        for entry, check in self.attributes.itervalues():
+            entry.set_text('')
+            check.set_active(False)
+        for model in self.mime_lists.itervalues():
+            model.clear()
+
+    def save_changed(self, tree):
+        if self.last_selected is not None:
+            attributes = {}
+            for attribute in self.attributes:
+                entry, check = self.attributes[attribute]
+                attributes[attribute] = (entry.get_text(), check.get_active(), )
+            mime_lists = {}
+            for mime_list in GUIConfig.mime_lists:
+                container = mime_lists[mime_list] = []
+                model = self.mime_lists[mime_list]
+                i = model.iter_children(None)
+                while i is not None: # iterate over list elements
+                    container.append(model.get_value(i, 0))
+                    i = model.iter_next(i)
+            row = tree.get_model()[self.last_selected]
+            row[1] = attributes
+            row[2] = mime_lists
+
+    def cursor_changed(self, tree):
+        self.save_changed(tree)
+
+        self.clear()
+
+        self.last_selected = current = tree.get_selection().get_selected()[1]
+        row = tree.get_model()[current]
+        for attribute in row[1]:
+            entry, check = self.attributes[attribute]
+            entry.set_text(row[1][attribute][0])
+            check.set_active(row[1][attribute][1])
+        for mime_list in row[2]:
+            model = self.mime_lists[mime_list]
+            for element in row[2][mime_list]:
+                model.append((element, ))
+
 
 class PyGTKControl():
     '''GNU MyServer Control main window.'''
@@ -456,6 +506,14 @@ class PyGTKControl():
         table, tree = self.tabs['unknown']
         tree.get_model().append(None, ('', '', False,True, '', False, {}, ))
 
+    def on_add_mime_type_menu_item_activate(self, widget):
+        '''Adds a new MIME type.'''
+        table, tree = self.tabs['MIME'][0]
+        mime_lists = {}
+        for mime_list in GUIConfig.mime_lists:
+            mime_lists[mime_list] = []
+        tree.get_model().append(('', {}, mime_lists, ))
+
     def on_new_menu_item_activate(self, widget = None):
         '''Clears configuration.'''
         if widget is not None:
@@ -583,8 +641,9 @@ class PyGTKControl():
         panels = gtk.HPaned()
         tree = MimeTreeView()
         panels.pack1(tree.scroll, True, False)
-        grid = MimeTable()
-        panels.pack2(grid, False, False)
+        table = MimeTable(tree)
+        panels.pack2(table, False, False)
+        self.tabs['MIME'] = (table, tree, )
 
         vpanels.pack1(panels)
 
@@ -593,6 +652,7 @@ class PyGTKControl():
         panels.pack1(tree.scroll, True, False)
         table = EditionTable(tree)
         panels.pack2(table, False, False)
+        self.tabs['MIME'] = (self.tabs['MIME'], (table, tree, ))
 
         vpanels.pack2(panels)
         
diff --git a/misc/PyGTK_Control/PyGTKControl.glade b/misc/PyGTK_Control/PyGTKControl.glade
index 1766644..6806292 100644
--- a/misc/PyGTK_Control/PyGTKControl.glade
+++ b/misc/PyGTK_Control/PyGTKControl.glade
@@ -164,6 +164,32 @@
               </widget>
             </child>
             <child>
+              <widget class="GtkMenuItem" id="mime_types_menu_item">
+                <property name="visible">True</property>
+                <property name="label" translatable="yes">_MIME Types</property>
+                <property name="use_underline">True</property>
+                <child>
+                  <widget class="GtkMenu" id="mime_types_menu">
+                    <property name="visible">True</property>
+                    <child>
+                      <widget class="GtkImageMenuItem" id="add_mime_type_menu_item">
+                        <property name="label">Add MIME type</property>
+                        <property name="visible">True</property>
+                        <property name="use_stock">False</property>
+                        <signal name="activate" handler="on_add_mime_type_menu_item_activate"/>
+                        <child internal-child="image">
+                          <widget class="GtkImage" id="add_mime_type_image">
+                            <property name="visible">True</property>
+                            <property name="stock">gtk-add</property>
+                          </widget>
+                        </child>
+                      </widget>
+                    </child>
+                  </widget>
+                </child>
+              </widget>
+            </child>
+            <child>
               <widget class="GtkMenuItem" id="help_menu_item">
                 <property name="visible">True</property>
                 <property name="label" translatable="yes">_Help</property>



commit 80d6cb01d33e598f0ec1fa7f45cd195794a5c112
Author: Marek Aaron Sapota <maarons@gnu.org>
Date:   Thu Jul 23 22:01:02 2009 +0200

    GUI shows all mime options.

diff --git a/misc/PyGTK_Control/MyServerControl.py b/misc/PyGTK_Control/MyServerControl.py
index 100d2ab..fb401fc 100644
--- a/misc/PyGTK_Control/MyServerControl.py
+++ b/misc/PyGTK_Control/MyServerControl.py
@@ -196,6 +196,125 @@ class EditionTable(gtk.Table):
         model, selected = tree.get_selection().get_selected()
         return selected
 
+class DefinitionTreeView(gtk.TreeView):
+    def __init__(self):
+        gtk.TreeView.__init__(self, gtk.TreeStore(
+                gobject.TYPE_STRING, # option name
+                gobject.TYPE_STRING, # option tooltip
+                gobject.TYPE_BOOLEAN, # True if option is known
+                gobject.TYPE_BOOLEAN, # enabled
+                gobject.TYPE_STRING, # value
+                gobject.TYPE_BOOLEAN, # value_check
+                gobject.TYPE_PYOBJECT)) # attributes dict
+        model = self.get_model()
+        def name_edited_handler(cell, path, text, data):
+            model = data
+            row = model[path]
+            if not row[2]: # don't edit names of known options
+                row[0] = text
+        name_renderer = gtk.CellRendererText()
+        name_renderer.set_property('editable', True)
+        name_renderer.connect('edited', name_edited_handler, model)
+        name_column = gtk.TreeViewColumn('name')
+        name_column.pack_start(name_renderer)
+        name_column.add_attribute(name_renderer, 'text', 0)
+        self.append_column(name_column)
+        value_renderer = gtk.CellRendererText()
+        value_column = gtk.TreeViewColumn('value')
+        value_column.pack_start(value_renderer)
+        value_column.add_attribute(value_renderer, 'text', 4)
+        self.append_column(value_column)
+
+        self.scroll = gtk.ScrolledWindow()
+        self.scroll.set_policy(gtk.POLICY_AUTOMATIC, gtk.POLICY_AUTOMATIC)
+        self.scroll.set_shadow_type(gtk.SHADOW_OUT)
+        self.scroll.set_border_width(5)
+        self.scroll.add(self)
+
+        def show_tooltip(widget, x, y, keyboard_tip, tooltip):
+            if not widget.get_tooltip_context(x, y, keyboard_tip):
+                return False
+            else:
+                model, path, it = widget.get_tooltip_context(x, y, keyboard_tip)
+                tooltip.set_text(model[it][1])
+                widget.set_tooltip_row(tooltip, path)
+                return True
+        self.props.has_tooltip = True
+        self.connect("query-tooltip", show_tooltip)
+
+class MimeTreeView(gtk.TreeView):
+    def __init__(self):
+        gtk.TreeView.__init__(self, gtk.TreeStore(
+                gobject.TYPE_STRING, # mime name
+                gobject.TYPE_PYOBJECT, # mime single attributes
+                gobject.TYPE_PYOBJECT)) # mime attribute lists
+        model = self.get_model()
+        def mime_edited_handler(cell, path, text, data):
+            model = data
+            model[path][0] = text
+        mime_renderer = gtk.CellRendererText()
+        mime_renderer.set_property('editable', True)
+        mime_renderer.connect('edited', mime_edited_handler, model)
+        mime_column = gtk.TreeViewColumn('MIME Type')
+        mime_column.pack_start(mime_renderer)
+        mime_column.add_attribute(mime_renderer, 'text', 0)
+        self.append_column(mime_column)
+
+        self.scroll = gtk.ScrolledWindow()
+        self.scroll.set_policy(gtk.POLICY_AUTOMATIC, gtk.POLICY_AUTOMATIC)
+        self.scroll.set_shadow_type(gtk.SHADOW_OUT)
+        self.scroll.set_border_width(5)
+        self.scroll.add(self)
+
+class MimeTable(gtk.Table):
+    def __init__(self):
+        gtk.Table.__init__(self, len(GUIConfig.mime_attributes) +
+                           3 * len(GUIConfig.mime_lists), 4)
+        i = 0
+        for attribute in GUIConfig.mime_attributes:
+            label = gtk.Label(attribute)
+            entry = gtk.Entry()
+            check = gtk.CheckButton()
+            self.attach(label, 0, 1, i, i + 1, yoptions = gtk.FILL)
+            self.attach(entry, 1, 3, i, i + 1, yoptions = gtk.FILL)
+            self.attach(check, 3, 4, i, i + 1, gtk.FILL, gtk.FILL)
+            i += 1
+        for mime_list in GUIConfig.mime_lists:
+            tree = gtk.TreeView(gtk.ListStore(gobject.TYPE_STRING))
+            tree_model = tree.get_model()
+            def tree_edited_handler(cell, path, text, data):
+                model = data
+                model[path][0] = text
+            tree_renderer = gtk.CellRendererText()
+            tree_renderer.set_property('editable', True)
+            tree_renderer.connect('edited', tree_edited_handler, tree_model)
+            tree_column = gtk.TreeViewColumn(mime_list)
+            tree_column.pack_start(tree_renderer)
+            tree_column.add_attribute(tree_renderer, 'text', 0)
+            tree.append_column(tree_column)
+            tree_scroll = gtk.ScrolledWindow()
+            tree_scroll.set_policy(gtk.POLICY_AUTOMATIC, gtk.POLICY_AUTOMATIC)
+            tree_scroll.set_shadow_type(gtk.SHADOW_OUT)
+            tree_scroll.set_border_width(5)
+            tree_scroll.add(tree)
+
+            def add_to_tree(button, model):
+                model.append(('', ))
+            add_button = gtk.Button('Add')
+            add_button.connect('clicked', add_to_tree, tree_model)
+            def remove_from_tree(button, tree):
+                model, selected = tree.get_selection().get_selected()
+                if selected is not None:
+                    model.remove(selected)
+            remove_button = gtk.Button('Remove')
+            remove_button.connect('clicked', remove_from_tree, tree)
+            
+            self.attach(tree_scroll, 0, 2, i, i + 3)
+            self.attach(add_button, 2, 3, i, i + 1, yoptions = gtk.FILL)
+            self.attach(remove_button, 2, 3, i + 1, i + 2, yoptions = gtk.FILL)
+            self.attach(gtk.Label(), 2, 3, i + 2, i + 3)
+            i += 3
+
 class PyGTKControl():
     '''GNU MyServer Control main window.'''
 
@@ -436,56 +555,14 @@ class PyGTKControl():
             options = segregated_options.get(tab, [])
             panels = gtk.HPaned()
 
-            tree = gtk.TreeView(gtk.TreeStore(
-                    gobject.TYPE_STRING, # option name
-                    gobject.TYPE_STRING, # option tooltip
-                    gobject.TYPE_BOOLEAN, # True if option is known
-                    gobject.TYPE_BOOLEAN, # enabled
-                    gobject.TYPE_STRING, # value
-                    gobject.TYPE_BOOLEAN, # value_check
-                    gobject.TYPE_PYOBJECT)) # attributes dict
+            tree = DefinitionTreeView()
             tree_model = tree.get_model()
-            def tree_name_edited_handler(cell, path, text, data):
-                model = data
-                row = model[path]
-                if not row[2]: # don't edit names of known options
-                    row[0] = text
-            tree_name_renderer = gtk.CellRendererText()
-            tree_name_renderer.set_property('editable', True)
-            tree_name_renderer.connect('edited', tree_name_edited_handler,
-                                       tree_model)
-            tree_name_column = gtk.TreeViewColumn('name')
-            tree_name_column.pack_start(tree_name_renderer)
-            tree_name_column.add_attribute(tree_name_renderer, 'text', 0)
-            tree.append_column(tree_name_column)
-            tree_value_renderer = gtk.CellRendererText()
-            tree_value_column = gtk.TreeViewColumn('value')
-            tree_value_column.pack_start(tree_value_renderer)
-            tree_value_column.add_attribute(tree_value_renderer, 'text', 4)
-            tree.append_column(tree_value_column)
-
-            tree_scroll = gtk.ScrolledWindow()
-            tree_scroll.set_policy(gtk.POLICY_AUTOMATIC, gtk.POLICY_AUTOMATIC)
-            tree_scroll.set_shadow_type(gtk.SHADOW_OUT)
-            tree_scroll.set_border_width(5)
-            tree_scroll.add(tree)
-            panels.pack1(tree_scroll, True, False)
+            panels.pack1(tree.scroll, True, False)
             table = EditionTable(tree)
             panels.pack2(table, False, False)
 
             self.tabs[tab] = (table, tree, )
 
-            def show_tooltip(widget, x, y, keyboard_tip, tooltip):
-                if not widget.get_tooltip_context(x, y, keyboard_tip):
-                    return False
-                else:
-                    model, path, it = widget.get_tooltip_context(x, y, keyboard_tip)
-                    tooltip.set_text(model[it][1])
-                    widget.set_tooltip_row(tooltip, path)
-                    return True
-            tree.props.has_tooltip = True
-            tree.connect("query-tooltip", show_tooltip)
-
             for option in options:
                 tooltip_text, var = GUIConfig.options[option]
                 # all but first three columns will be set to defaults later by
@@ -501,83 +578,26 @@ class PyGTKControl():
 
     def construct_mime(self):
         '''Reads mime options from file and prepares GUI.'''
-        panels = gtk.HPaned()
+        vpanels = gtk.VPaned()
         
-        tree = gtk.TreeView(gtk.TreeStore(
-                gobject.TYPE_STRING, # mime name
-                gobject.TYPE_PYOBJECT, # mime single attributes
-                gobject.TYPE_PYOBJECT)) # mime attribute lists
-        tree_model = tree.get_model()
-        def tree_mime_edited_handler(cell, path, text, data):
-            model = data
-            model[path][0] = text
-        tree_mime_renderer = gtk.CellRendererText()
-        tree_mime_renderer.set_property('editable', True)
-        tree_mime_renderer.connect('edited', tree_mime_edited_handler,
-                                   tree_model)
-        tree_mime_column = gtk.TreeViewColumn('MIME Type')
-        tree_mime_column.pack_start(tree_mime_renderer)
-        tree_mime_column.add_attribute(tree_mime_renderer, 'text', 0)
-        tree.append_column(tree_mime_column)
-
-        tree_scroll = gtk.ScrolledWindow()
-        tree_scroll.set_policy(gtk.POLICY_AUTOMATIC, gtk.POLICY_AUTOMATIC)
-        tree_scroll.set_shadow_type(gtk.SHADOW_OUT)
-        tree_scroll.set_border_width(5)
-        tree_scroll.add(tree)
-
-        panels.pack1(tree_scroll, True, False)
-
-        grid = gtk.Table(len(GUIConfig.mime_attributes) +
-                         3 * len(GUIConfig.mime_lists), 4)
-        i = 0
-        for attribute in GUIConfig.mime_attributes:
-            label = gtk.Label(attribute)
-            entry = gtk.Entry()
-            check = gtk.CheckButton()
-            grid.attach(label, 0, 1, i, i + 1, yoptions = gtk.FILL)
-            grid.attach(entry, 1, 3, i, i + 1, yoptions = gtk.FILL)
-            grid.attach(check, 3, 4, i, i + 1, gtk.FILL, gtk.FILL)
-            i += 1
-        for mime_list in GUIConfig.mime_lists:
-            tree = gtk.TreeView(gtk.ListStore(gobject.TYPE_STRING))
-            tree_model = tree.get_model()
-            def tree_edited_handler(cell, path, text, data):
-                model = data
-                model[path][0] = text
-            tree_renderer = gtk.CellRendererText()
-            tree_renderer.set_property('editable', True)
-            tree_renderer.connect('edited', tree_edited_handler, tree_model)
-            tree_column = gtk.TreeViewColumn(mime_list)
-            tree_column.pack_start(tree_renderer)
-            tree_column.add_attribute(tree_renderer, 'text', 0)
-            tree.append_column(tree_column)
-            tree_scroll = gtk.ScrolledWindow()
-            tree_scroll.set_policy(gtk.POLICY_AUTOMATIC, gtk.POLICY_AUTOMATIC)
-            tree_scroll.set_shadow_type(gtk.SHADOW_OUT)
-            tree_scroll.set_border_width(5)
-            tree_scroll.add(tree)
+        panels = gtk.HPaned()
+        tree = MimeTreeView()
+        panels.pack1(tree.scroll, True, False)
+        grid = MimeTable()
+        panels.pack2(grid, False, False)
 
-            def add_to_tree(button, model):
-                model.append(('', ))
-            add_button = gtk.Button('Add')
-            add_button.connect('clicked', add_to_tree, tree_model)
-            def remove_from_tree(button, tree):
-                model, selected = tree.get_selection().get_selected()
-                if selected is not None:
-                    model.remove(selected)
-            remove_button = gtk.Button('Remove')
-            remove_button.connect('clicked', remove_from_tree, tree)
-            grid.attach(tree_scroll, 0, 2, i, i + 3)
-            grid.attach(add_button, 2, 3, i, i + 1, yoptions = gtk.FILL)
-            grid.attach(remove_button, 2, 3, i + 1, i + 2, yoptions = gtk.FILL)
-            grid.attach(gtk.Label(), 2, 3, i + 2, i + 3)
-            i += 3
+        vpanels.pack1(panels)
 
-        panels.pack2(grid, False, False)
+        panels = gtk.HPaned()
+        tree = DefinitionTreeView()
+        panels.pack1(tree.scroll, True, False)
+        table = EditionTable(tree)
+        panels.pack2(table, False, False)
 
+        vpanels.pack2(panels)
+        
         self.widgets.get_widget('notebook').append_page(
-            panels, gtk.Label('MIME Type'))
+            vpanels, gtk.Label('MIME Type'))
 
         self.widgets.get_widget('notebook').show_all()
 



commit 8f2065d32f68cbb7d6b5584739fadba1e23aefee
Author: Marek Aaron Sapota <maarons@gnu.org>
Date:   Wed Jul 22 22:30:56 2009 +0200

    GUI widgets for mime types.

diff --git a/misc/PyGTK_Control/GUIConfig.py b/misc/PyGTK_Control/GUIConfig.py
index be20e77..c51f5f6 100644
--- a/misc/PyGTK_Control/GUIConfig.py
+++ b/misc/PyGTK_Control/GUIConfig.py
@@ -67,3 +67,8 @@ options['symlinks.follow'] = ('Define if links should be followed.', 'bool', )
 
 # don't put 'other' or 'unknown' here
 tabs = ['server', 'control', 'ftp', 'http', 'log_color']
+
+# MIME types
+mime_name = 'mime'
+mime_attributes = ['handler', 'self_executed', 'param', 'path']
+mime_lists = ['extensions', 'filters']
diff --git a/misc/PyGTK_Control/MyServerControl.py b/misc/PyGTK_Control/MyServerControl.py
index 77c2de2..100d2ab 100644
--- a/misc/PyGTK_Control/MyServerControl.py
+++ b/misc/PyGTK_Control/MyServerControl.py
@@ -204,6 +204,7 @@ class PyGTKControl():
         self.widgets = gtk.glade.XML(self.gladefile, 'window')
         self.widgets.signal_autoconnect(self)
         self.construct_options()
+        self.construct_mime()
         self.chooser = None # Active file chooser
         self.path = None # path of currently edited file
         self.controller = None
@@ -498,5 +499,87 @@ class PyGTKControl():
         self.on_new_menu_item_activate()
         self.widgets.get_widget('notebook').show_all()
 
+    def construct_mime(self):
+        '''Reads mime options from file and prepares GUI.'''
+        panels = gtk.HPaned()
+        
+        tree = gtk.TreeView(gtk.TreeStore(
+                gobject.TYPE_STRING, # mime name
+                gobject.TYPE_PYOBJECT, # mime single attributes
+                gobject.TYPE_PYOBJECT)) # mime attribute lists
+        tree_model = tree.get_model()
+        def tree_mime_edited_handler(cell, path, text, data):
+            model = data
+            model[path][0] = text
+        tree_mime_renderer = gtk.CellRendererText()
+        tree_mime_renderer.set_property('editable', True)
+        tree_mime_renderer.connect('edited', tree_mime_edited_handler,
+                                   tree_model)
+        tree_mime_column = gtk.TreeViewColumn('MIME Type')
+        tree_mime_column.pack_start(tree_mime_renderer)
+        tree_mime_column.add_attribute(tree_mime_renderer, 'text', 0)
+        tree.append_column(tree_mime_column)
+
+        tree_scroll = gtk.ScrolledWindow()
+        tree_scroll.set_policy(gtk.POLICY_AUTOMATIC, gtk.POLICY_AUTOMATIC)
+        tree_scroll.set_shadow_type(gtk.SHADOW_OUT)
+        tree_scroll.set_border_width(5)
+        tree_scroll.add(tree)
+
+        panels.pack1(tree_scroll, True, False)
+
+        grid = gtk.Table(len(GUIConfig.mime_attributes) +
+                         3 * len(GUIConfig.mime_lists), 4)
+        i = 0
+        for attribute in GUIConfig.mime_attributes:
+            label = gtk.Label(attribute)
+            entry = gtk.Entry()
+            check = gtk.CheckButton()
+            grid.attach(label, 0, 1, i, i + 1, yoptions = gtk.FILL)
+            grid.attach(entry, 1, 3, i, i + 1, yoptions = gtk.FILL)
+            grid.attach(check, 3, 4, i, i + 1, gtk.FILL, gtk.FILL)
+            i += 1
+        for mime_list in GUIConfig.mime_lists:
+            tree = gtk.TreeView(gtk.ListStore(gobject.TYPE_STRING))
+            tree_model = tree.get_model()
+            def tree_edited_handler(cell, path, text, data):
+                model = data
+                model[path][0] = text
+            tree_renderer = gtk.CellRendererText()
+            tree_renderer.set_property('editable', True)
+            tree_renderer.connect('edited', tree_edited_handler, tree_model)
+            tree_column = gtk.TreeViewColumn(mime_list)
+            tree_column.pack_start(tree_renderer)
+            tree_column.add_attribute(tree_renderer, 'text', 0)
+            tree.append_column(tree_column)
+            tree_scroll = gtk.ScrolledWindow()
+            tree_scroll.set_policy(gtk.POLICY_AUTOMATIC, gtk.POLICY_AUTOMATIC)
+            tree_scroll.set_shadow_type(gtk.SHADOW_OUT)
+            tree_scroll.set_border_width(5)
+            tree_scroll.add(tree)
+
+            def add_to_tree(button, model):
+                model.append(('', ))
+            add_button = gtk.Button('Add')
+            add_button.connect('clicked', add_to_tree, tree_model)
+            def remove_from_tree(button, tree):
+                model, selected = tree.get_selection().get_selected()
+                if selected is not None:
+                    model.remove(selected)
+            remove_button = gtk.Button('Remove')
+            remove_button.connect('clicked', remove_from_tree, tree)
+            grid.attach(tree_scroll, 0, 2, i, i + 3)
+            grid.attach(add_button, 2, 3, i, i + 1, yoptions = gtk.FILL)
+            grid.attach(remove_button, 2, 3, i + 1, i + 2, yoptions = gtk.FILL)
+            grid.attach(gtk.Label(), 2, 3, i + 2, i + 3)
+            i += 3
+
+        panels.pack2(grid, False, False)
+
+        self.widgets.get_widget('notebook').append_page(
+            panels, gtk.Label('MIME Type'))
+
+        self.widgets.get_widget('notebook').show_all()
+
 PyGTKControl()
 gtk.main()



commit fd58fa5679660d48b52cf4ee0d31e963dabc1b40
Author: Marek Aaron Sapota <maarons@gnu.org>
Date:   Wed Jul 22 20:50:43 2009 +0200

    Removed old code.

diff --git a/misc/py_control_client/MyServer/pycontrollib/test/mimetypes_test.py b/misc/py_control_client/MyServer/pycontrollib/test/mimetypes_test.py
index ba25a6b..017368d 100644
--- a/misc/py_control_client/MyServer/pycontrollib/test/mimetypes_test.py
+++ b/misc/py_control_client/MyServer/pycontrollib/test/mimetypes_test.py
@@ -33,17 +33,7 @@ class MIMETypeTest(unittest.TestCase):
                 'http.default_file',
                 [DefinitionElement(attributes = {'value': 'index.html'}),
                  DefinitionElement(attributes = {'value': 'index.htm'})]))
-#        self.text = \
-#             '''<MIME mime="application/xhtml+xml" handler="CGI" param="/usr/bin/python" self="NO" >
-#   <EXTENSION value="xhtml" />
-#   <EXTENSION value="xml" />
-#   <EXTENSION value="py" />
-#   <FILTER value="gzip" />
-#   <FILTER value="bzip2" />
-#   {0}
-#   <PATH regex="^/cgi-bin/python/.*$" />
-# </MIME>'''.format('\n'.join(map(lambda element: str(element),
-#                                 self.definitions)))
+
     def test_creation(self):
         MIMEType('text/plain', 'CGI')
         MIMEType('text/plain', 'CGI', '/usr/bin/python')



commit 1cc305c0cd2977b99bcd6dcbad4c97f9b51bb7d9
Author: Marek Aaron Sapota <maarons@gnu.org>
Date:   Wed Jul 22 00:11:51 2009 +0200

    Value field is auto disabled for definition trees.

diff --git a/misc/PyGTK_Control/MyServerControl.py b/misc/PyGTK_Control/MyServerControl.py
index b26a9d6..77c2de2 100644
--- a/misc/PyGTK_Control/MyServerControl.py
+++ b/misc/PyGTK_Control/MyServerControl.py
@@ -79,9 +79,15 @@ class EditionTable(gtk.Table):
         self.value_check_field = value_checkbutton = gtk.CheckButton()
         value_checkbutton.set_tooltip_text('If active value will be used.')
         value_checkbutton.set_active(True)
-        value_checkbutton.connect(
-            'toggled',
-            lambda button: value_entry.set_editable(button.get_active()))
+        def toggle_value(button, tree):
+            # don't allow value for definition with children
+            model, selected = tree.get_selection().get_selected()
+            if selected is not None and model.iter_children(selected) is not None:
+                button.set_active(False)
+                return
+            active = button.get_active()
+            self.value_field.set_editable(active)
+        value_checkbutton.connect('toggled', toggle_value, tree)
         self.attach(value_label, 0, 1, 1, 2, gtk.FILL, gtk.FILL)
         self.attach(value_entry, 1, 2, 1, 2, yoptions = gtk.FILL)
         self.attach(value_checkbutton, 2, 3, 1, 2, gtk.FILL, gtk.FILL)
@@ -91,6 +97,8 @@ class EditionTable(gtk.Table):
             model, selected = tree.get_selection().get_selected()
             if selected is not None:
                 model.append(selected, ('', '', False, True, '', False, {}, ))
+                self.value_check_field.set_active(False) # auto disable value
+                self.value_field.set_editable(False)
         add_definition_button.connect('clicked', add_sub_definition)
         self.attach(add_definition_button, 0, 3, 2, 3, yoptions = gtk.FILL)
 



commit f9d4639ef55171aadf5fecfd236c5905b6e4c007
Author: Marek Aaron Sapota <maarons@gnu.org>
Date:   Tue Jul 21 15:12:12 2009 +0200

    User can add unknown definitions.

diff --git a/misc/PyGTK_Control/MyServerControl.py b/misc/PyGTK_Control/MyServerControl.py
index 2bc8ac3..b26a9d6 100644
--- a/misc/PyGTK_Control/MyServerControl.py
+++ b/misc/PyGTK_Control/MyServerControl.py
@@ -323,6 +323,11 @@ class PyGTKControl():
                 i = model.iter_next(i)
         return MyServerConfig(definitions)
 
+    def on_add_unknown_definition_menu_item_activate(self, widget):
+        '''Adds a new definition to unknown tab.'''
+        table, tree = self.tabs['unknown']
+        tree.get_model().append(None, ('', '', False,True, '', False, {}, ))
+
     def on_new_menu_item_activate(self, widget = None):
         '''Clears configuration.'''
         if widget is not None:
diff --git a/misc/PyGTK_Control/PyGTKControl.glade b/misc/PyGTK_Control/PyGTKControl.glade
index b426812..1766644 100644
--- a/misc/PyGTK_Control/PyGTKControl.glade
+++ b/misc/PyGTK_Control/PyGTKControl.glade
@@ -138,6 +138,32 @@
               </widget>
             </child>
             <child>
+              <widget class="GtkMenuItem" id="definitions_menu_item">
+                <property name="visible">True</property>
+                <property name="label" translatable="yes">_Definitions</property>
+                <property name="use_underline">True</property>
+                <child>
+                  <widget class="GtkMenu" id="definitions_menu">
+                    <property name="visible">True</property>
+                    <child>
+                      <widget class="GtkImageMenuItem" id="add_unknown_definition_menu_item">
+                        <property name="label">Add unknown definition</property>
+                        <property name="visible">True</property>
+                        <property name="use_stock">False</property>
+                        <signal name="activate" handler="on_add_unknown_definition_menu_item_activate"/>
+                        <child internal-child="image">
+                          <widget class="GtkImage" id="add_unknown_definition_image">
+                            <property name="visible">True</property>
+                            <property name="stock">gtk-add</property>
+                          </widget>
+                        </child>
+                      </widget>
+                    </child>
+                  </widget>
+                </child>
+              </widget>
+            </child>
+            <child>
               <widget class="GtkMenuItem" id="help_menu_item">
                 <property name="visible">True</property>
                 <property name="label" translatable="yes">_Help</property>



commit 7c1da124afaac94910e59244fa1b01f0504a7e5c
Author: Marek Aaron Sapota <maarons@gnu.org>
Date:   Tue Jul 21 14:55:08 2009 +0200

    Name editing.

diff --git a/misc/PyGTK_Control/MyServerControl.py b/misc/PyGTK_Control/MyServerControl.py
index 502ef8a..2bc8ac3 100644
--- a/misc/PyGTK_Control/MyServerControl.py
+++ b/misc/PyGTK_Control/MyServerControl.py
@@ -431,14 +431,23 @@ class PyGTKControl():
                     gobject.TYPE_BOOLEAN, # value_check
                     gobject.TYPE_PYOBJECT)) # attributes dict
             tree_model = tree.get_model()
-            tree_renderer = gtk.CellRendererText()
+            def tree_name_edited_handler(cell, path, text, data):
+                model = data
+                row = model[path]
+                if not row[2]: # don't edit names of known options
+                    row[0] = text
+            tree_name_renderer = gtk.CellRendererText()
+            tree_name_renderer.set_property('editable', True)
+            tree_name_renderer.connect('edited', tree_name_edited_handler,
+                                       tree_model)
             tree_name_column = gtk.TreeViewColumn('name')
-            tree_name_column.pack_start(tree_renderer)
-            tree_name_column.add_attribute(tree_renderer, 'text', 0)
+            tree_name_column.pack_start(tree_name_renderer)
+            tree_name_column.add_attribute(tree_name_renderer, 'text', 0)
             tree.append_column(tree_name_column)
+            tree_value_renderer = gtk.CellRendererText()
             tree_value_column = gtk.TreeViewColumn('value')
-            tree_value_column.pack_start(tree_renderer)
-            tree_value_column.add_attribute(tree_renderer, 'text', 4)
+            tree_value_column.pack_start(tree_value_renderer)
+            tree_value_column.add_attribute(tree_value_renderer, 'text', 4)
             tree.append_column(tree_value_column)
 
             tree_scroll = gtk.ScrolledWindow()



commit 3ff6dcf1f152b1961df5f9f4da1c4213428b194a
Author: Marek Aaron Sapota <maarons@gnu.org>
Date:   Tue Jul 21 14:36:22 2009 +0200

    Added value column to TreeView.

diff --git a/misc/PyGTK_Control/MyServerControl.py b/misc/PyGTK_Control/MyServerControl.py
index 2b9d21a..502ef8a 100644
--- a/misc/PyGTK_Control/MyServerControl.py
+++ b/misc/PyGTK_Control/MyServerControl.py
@@ -431,12 +431,15 @@ class PyGTKControl():
                     gobject.TYPE_BOOLEAN, # value_check
                     gobject.TYPE_PYOBJECT)) # attributes dict
             tree_model = tree.get_model()
-            tree.set_headers_visible(False)
-            tree_column = gtk.TreeViewColumn()
             tree_renderer = gtk.CellRendererText()
-            tree_column.pack_start(tree_renderer)
-            tree_column.add_attribute(tree_renderer, 'text', 0)
-            tree.append_column(tree_column)
+            tree_name_column = gtk.TreeViewColumn('name')
+            tree_name_column.pack_start(tree_renderer)
+            tree_name_column.add_attribute(tree_renderer, 'text', 0)
+            tree.append_column(tree_name_column)
+            tree_value_column = gtk.TreeViewColumn('value')
+            tree_value_column.pack_start(tree_renderer)
+            tree_value_column.add_attribute(tree_renderer, 'text', 4)
+            tree.append_column(tree_value_column)
 
             tree_scroll = gtk.ScrolledWindow()
             tree_scroll.set_policy(gtk.POLICY_AUTOMATIC, gtk.POLICY_AUTOMATIC)



commit 5de9a2c8d6f8121831dc8752a14fcc932bcb43e5
Author: Marek Aaron Sapota <maarons@gnu.org>
Date:   Tue Jul 21 14:31:03 2009 +0200

    Add/Remove definitions are handled now.

diff --git a/misc/PyGTK_Control/MyServerControl.py b/misc/PyGTK_Control/MyServerControl.py
index dd1b1d6..2b9d21a 100644
--- a/misc/PyGTK_Control/MyServerControl.py
+++ b/misc/PyGTK_Control/MyServerControl.py
@@ -87,9 +87,20 @@ class EditionTable(gtk.Table):
         self.attach(value_checkbutton, 2, 3, 1, 2, gtk.FILL, gtk.FILL)
 
         add_definition_button = gtk.Button('add sub-definition')
+        def add_sub_definition(button):
+            model, selected = tree.get_selection().get_selected()
+            if selected is not None:
+                model.append(selected, ('', '', False, True, '', False, {}, ))
+        add_definition_button.connect('clicked', add_sub_definition)
         self.attach(add_definition_button, 0, 3, 2, 3, yoptions = gtk.FILL)
 
         remove_definition_button = gtk.Button('remove this definition')
+        def remove_definition(button):
+            model, selected = tree.get_selection().get_selected()
+            if selected is not None and not model[selected][2]:
+                model.remove(selected)
+                self.clear()
+        remove_definition_button.connect('clicked', remove_definition)
         self.attach(remove_definition_button, 0, 3, 3, 4, yoptions = gtk.FILL)
 
         add_attribute_button = gtk.Button('add attribute')
@@ -155,10 +166,10 @@ class EditionTable(gtk.Table):
                     self.attributes_field.get_value(i, 1)
                 i = self.attributes_field.iter_next(i)
             row = tree.get_model()[self.last_selected]
-            row[2] = self.enabled_field.get_active()
-            row[3] = self.value_field.get_text()
-            row[4] = self.value_check_field.get_active()
-            row[5] = attributes
+            row[3] = self.enabled_field.get_active()
+            row[4] = self.value_field.get_text()
+            row[5] = self.value_check_field.get_active()
+            row[6] = attributes
 
     def cursor_changed(self, tree):
         self.save_changed(tree)
@@ -167,10 +178,10 @@ class EditionTable(gtk.Table):
 
         self.last_selected = current = self.get_selected(tree)
         row = tree.get_model()[current]
-        self.enabled_field.set_active(row[2])
-        self.value_field.set_text(row[3])
-        self.value_check_field.set_active(row[4])
-        for attribute in row[5]:
+        self.enabled_field.set_active(row[3])
+        self.value_field.set_text(row[4])
+        self.value_check_field.set_active(row[5])
+        for attribute in row[6]:
             self.attributes_field.append((attribute, row[5][attribute], ))
 
     def get_selected(self, tree):
@@ -279,10 +290,10 @@ class PyGTKControl():
         def make_def(current, model):
             row = model[current]
             name = row[0]
-            enabled = row[2]
-            value = row[3]
-            value_check = row[4]
-            attributes = row[5]
+            enabled = row[3]
+            value = row[4]
+            value_check = row[5]
+            attributes = row[6]
             if value_check:
                 attributes['value'] = value
             if not enabled:
@@ -316,6 +327,8 @@ class PyGTKControl():
         '''Clears configuration.'''
         if widget is not None:
             self.path = None
+        table, tree = self.tabs['unknown']
+        tree.get_model().clear()
         for tab in self.tabs:
             table, tree = self.tabs[tab]
             model = tree.get_model()
@@ -324,10 +337,10 @@ class PyGTKControl():
             i = model.iter_children(None)
             while i is not None: # iterate over options
                 row = model[i]
-                row[2] = False
-                row[3] = ''
-                row[4] = False
-                row[5] = {}
+                row[3] = False
+                row[4] = ''
+                row[5] = False
+                row[6] = {}
                 child = model.iter_children(i)
                 if child is not None: # remove node children
                     while model.remove(child):
@@ -357,7 +370,8 @@ class PyGTKControl():
                         get_value_and_attributes(d)
                     i = model.append(
                         parent,
-                        (name, '', enabled, value, value_check, attributes, ))
+                        (name, '', False, enabled, value, value_check,
+                         attributes, ))
                     add_children(i, d, model)
 
         self.on_new_menu_item_activate()
@@ -377,12 +391,13 @@ class PyGTKControl():
                 while model[i][0] != name:
                     i = model.iter_next(i)
             else:
-                i = model.append(None, (name, '', False, '', False, {}, ))
+                i = model.append(None,
+                                 (name, '', False, False, '', False, {}, ))
             row = model[i]
-            row[2] = enabled
-            row[3] = value
-            row[4] = value_check
-            row[5] = attributes
+            row[3] = enabled
+            row[4] = value
+            row[5] = value_check
+            row[6] = attributes
             add_children(i, definition, model)
 
     def construct_options(self):
@@ -410,6 +425,7 @@ class PyGTKControl():
             tree = gtk.TreeView(gtk.TreeStore(
                     gobject.TYPE_STRING, # option name
                     gobject.TYPE_STRING, # option tooltip
+                    gobject.TYPE_BOOLEAN, # True if option is known
                     gobject.TYPE_BOOLEAN, # enabled
                     gobject.TYPE_STRING, # value
                     gobject.TYPE_BOOLEAN, # value_check
@@ -446,9 +462,9 @@ class PyGTKControl():
 
             for option in options:
                 tooltip_text, var = GUIConfig.options[option]
-                # all but first two columns will be set to defaults later by
+                # all but first three columns will be set to defaults later by
                 # on_new_menu_item_activate
-                tree_model.append(None, (option, tooltip_text, False, '',
+                tree_model.append(None, (option, tooltip_text, True, False, '',
                                          False, {}, ))
 
             self.widgets.get_widget('notebook').append_page(



commit e88e3a334dfb8c841dfbd9f7cb21511fac6c18f5
Merge: 9b1a0c5 d083c2b
Author: Marek Aaron Sapota <maarons@gnu.org>
Date:   Tue Jul 21 12:16:50 2009 +0200

    Merge branch 'treeview'




commit d083c2b87c819b698923635febfcd83e841fe402
Author: Marek Aaron Sapota <maarons@gnu.org>
Date:   Tue Jul 21 12:15:16 2009 +0200

    Added tooltips.

diff --git a/misc/PyGTK_Control/GUIConfig.py b/misc/PyGTK_Control/GUIConfig.py
index 60edc00..be20e77 100644
--- a/misc/PyGTK_Control/GUIConfig.py
+++ b/misc/PyGTK_Control/GUIConfig.py
@@ -45,7 +45,7 @@ options['server.max_threads'] = ('Maximum number of serving threads that the sch
 options['server.buffer_size'] = ('Dimension of every buffer in bytes.', 'integer', )
 options['server.max_connections'] = ('Define the max number of connections to allow to server. 0 means allow infinite connections.', 'integer', )
 options['server.max_accepted_connections'] = ('Define max number of connections to accept.', 'integer', )
-options['server.max_log_size'] = ('max size of the log file in bytes.', 'integer', )
+options['server.max_log_size'] = ('Max size of the log file in bytes.', 'integer', )
 options['server.admin'] = ('Administrator e-mail.', 'string', )
 options['server.max_files_cache'] = ('Max cache size for static files.', 'integer', )
 options['server.max_file_cache'] = ('Max cache size for single static file.', 'integer', )
diff --git a/misc/PyGTK_Control/MyServerControl.py b/misc/PyGTK_Control/MyServerControl.py
index f047aa2..dd1b1d6 100644
--- a/misc/PyGTK_Control/MyServerControl.py
+++ b/misc/PyGTK_Control/MyServerControl.py
@@ -45,10 +45,10 @@ class Connection():
     def destroy(self):
         '''Destroys this widget.'''
         self.widgets.get_widget('connectiondialog').destroy()
-        
+
     def on_cancel_button_clicked(self, widget):
         self.destroy()
-    
+
     def get_host(self):
         return self.widgets.get_widget('host_entry').get_text()
 
@@ -64,7 +64,7 @@ class Connection():
 class EditionTable(gtk.Table):
     def __init__(self, tree):
         gtk.Table.__init__(self, 8, 3)
-        
+
         tree.connect('cursor-changed', self.cursor_changed)
         self.last_selected = None
 
@@ -88,7 +88,7 @@ class EditionTable(gtk.Table):
 
         add_definition_button = gtk.Button('add sub-definition')
         self.attach(add_definition_button, 0, 3, 2, 3, yoptions = gtk.FILL)
-        
+
         remove_definition_button = gtk.Button('remove this definition')
         self.attach(remove_definition_button, 0, 3, 3, 4, yoptions = gtk.FILL)
 
@@ -125,7 +125,7 @@ class EditionTable(gtk.Table):
                                   (attributes_model, 0, ))
         variable_column.pack_start(variable_renderer)
         variable_column.add_attribute(variable_renderer, 'text', 0)
-        
+
         value_column = gtk.TreeViewColumn('value')
         value_renderer = gtk.CellRendererText()
         value_renderer.set_property('editable', True)
@@ -133,7 +133,7 @@ class EditionTable(gtk.Table):
                                   (attributes_model, 1, ))
         value_column.pack_start(value_renderer)
         value_column.add_attribute(value_renderer, 'text', 1)
-        
+
         attributes_list.append_column(variable_column)
         attributes_list.append_column(value_column)
         self.attach(attributes_label, 0, 3, 6, 7, yoptions = gtk.FILL)
@@ -159,12 +159,12 @@ class EditionTable(gtk.Table):
             row[3] = self.value_field.get_text()
             row[4] = self.value_check_field.get_active()
             row[5] = attributes
-            
+
     def cursor_changed(self, tree):
         self.save_changed(tree)
-            
+
         self.clear()
-        
+
         self.last_selected = current = self.get_selected(tree)
         row = tree.get_model()[current]
         self.enabled_field.set_active(row[2])
@@ -176,7 +176,7 @@ class EditionTable(gtk.Table):
     def get_selected(self, tree):
         model, selected = tree.get_selection().get_selected()
         return selected
-    
+
 class PyGTKControl():
     '''GNU MyServer Control main window.'''
 
@@ -272,7 +272,7 @@ class PyGTKControl():
             config = self.get_current_config()
             with open(self.path, 'w') as f:
                 f.write(str(config))
-    
+
     def get_current_config(self):
         '''Returns current configuration as MyServerConfig instance.'''
 
@@ -298,7 +298,7 @@ class PyGTKControl():
                         definitions.append(definition)
                     i = model.iter_next(i)
                 return DefinitionTree(name, definitions, attributes)
-            
+
         definitions = []
         for tab in self.tabs:
             table, tree = self.tabs[tab]
@@ -336,7 +336,7 @@ class PyGTKControl():
 
     def set_up(self, config):
         '''Reads configuration from given config instance.'''
-        
+
         def get_value_and_attributes(definition):
             name = definition.get_name()
             enabled = True
@@ -359,17 +359,17 @@ class PyGTKControl():
                         parent,
                         (name, '', enabled, value, value_check, attributes, ))
                     add_children(i, d, model)
-        
+
         self.on_new_menu_item_activate()
         for definition in config.get_definitions():
             name, enabled, value, value_check, attributes = \
                 get_value_and_attributes(definition)
-            
+
             if name not in self.options:
                 tab_name = 'unknown'
             else:
                 tab_name = self.options[name]
-            
+
             tree = self.tabs[tab_name][1]
             model = tree.get_model()
             if tab_name != 'unknown':
@@ -406,7 +406,7 @@ class PyGTKControl():
         for tab in GUIConfig.tabs + ['other', 'unknown']:
             options = segregated_options.get(tab, [])
             panels = gtk.HPaned()
-            
+
             tree = gtk.TreeView(gtk.TreeStore(
                     gobject.TYPE_STRING, # option name
                     gobject.TYPE_STRING, # option tooltip
@@ -421,7 +421,7 @@ class PyGTKControl():
             tree_column.pack_start(tree_renderer)
             tree_column.add_attribute(tree_renderer, 'text', 0)
             tree.append_column(tree_column)
-            
+
             tree_scroll = gtk.ScrolledWindow()
             tree_scroll.set_policy(gtk.POLICY_AUTOMATIC, gtk.POLICY_AUTOMATIC)
             tree_scroll.set_shadow_type(gtk.SHADOW_OUT)
@@ -432,14 +432,25 @@ class PyGTKControl():
             panels.pack2(table, False, False)
 
             self.tabs[tab] = (table, tree, )
-            
+
+            def show_tooltip(widget, x, y, keyboard_tip, tooltip):
+                if not widget.get_tooltip_context(x, y, keyboard_tip):
+                    return False
+                else:
+                    model, path, it = widget.get_tooltip_context(x, y, keyboard_tip)
+                    tooltip.set_text(model[it][1])
+                    widget.set_tooltip_row(tooltip, path)
+                    return True
+            tree.props.has_tooltip = True
+            tree.connect("query-tooltip", show_tooltip)
+
             for option in options:
                 tooltip_text, var = GUIConfig.options[option]
                 # all but first two columns will be set to defaults later by
                 # on_new_menu_item_activate
                 tree_model.append(None, (option, tooltip_text, False, '',
                                          False, {}, ))
-             
+
             self.widgets.get_widget('notebook').append_page(
                 panels, gtk.Label(tab))
 



commit f9ecb02a7fe208e42c7b26cecd809dffd15e60ac
Author: Marek Aaron Sapota <maarons@gnu.org>
Date:   Tue Jul 21 12:08:05 2009 +0200

    Use gtk.HPaned instead of gtk.HBox.

diff --git a/misc/PyGTK_Control/MyServerControl.py b/misc/PyGTK_Control/MyServerControl.py
index 7041a10..f047aa2 100644
--- a/misc/PyGTK_Control/MyServerControl.py
+++ b/misc/PyGTK_Control/MyServerControl.py
@@ -405,7 +405,7 @@ class PyGTKControl():
         self.tabs = {} # tab name => (table, tree, )
         for tab in GUIConfig.tabs + ['other', 'unknown']:
             options = segregated_options.get(tab, [])
-            panels = gtk.HBox()
+            panels = gtk.HPaned()
             
             tree = gtk.TreeView(gtk.TreeStore(
                     gobject.TYPE_STRING, # option name
@@ -427,9 +427,9 @@ class PyGTKControl():
             tree_scroll.set_shadow_type(gtk.SHADOW_OUT)
             tree_scroll.set_border_width(5)
             tree_scroll.add(tree)
-            panels.pack_start(tree_scroll)
+            panels.pack1(tree_scroll, True, False)
             table = EditionTable(tree)
-            panels.pack_start(table)
+            panels.pack2(table, False, False)
 
             self.tabs[tab] = (table, tree, )
             



commit 5eb9ceee5cb46677d0ed82d0b99ca40deec9fa27
Author: Marek Aaron Sapota <maarons@gnu.org>
Date:   Tue Jul 21 11:53:13 2009 +0200

    Unknown options are handled as they should be.

diff --git a/misc/PyGTK_Control/MyServerControl.py b/misc/PyGTK_Control/MyServerControl.py
index ca4ce47..7041a10 100644
--- a/misc/PyGTK_Control/MyServerControl.py
+++ b/misc/PyGTK_Control/MyServerControl.py
@@ -337,9 +337,6 @@ class PyGTKControl():
     def set_up(self, config):
         '''Reads configuration from given config instance.'''
         
-        def put_to_unknown(definition):
-            print('Unknown option:', definition, sep = '\n')
-            
         def get_value_and_attributes(definition):
             name = definition.get_name()
             enabled = True
@@ -369,14 +366,18 @@ class PyGTKControl():
                 get_value_and_attributes(definition)
             
             if name not in self.options:
-                put_to_unknown(definition)
-                continue
+                tab_name = 'unknown'
+            else:
+                tab_name = self.options[name]
             
-            tree = self.tabs[self.options[name]][1]
+            tree = self.tabs[tab_name][1]
             model = tree.get_model()
-            i = model.iter_children(None)
-            while model[i][0] != name:
-                i = model.iter_next(i)
+            if tab_name != 'unknown':
+                i = model.iter_children(None) # find this option
+                while model[i][0] != name:
+                    i = model.iter_next(i)
+            else:
+                i = model.append(None, (name, '', False, '', False, {}, ))
             row = model[i]
             row[2] = enabled
             row[3] = value



commit 4db2041c0917463789b51cd594ee24d6ced2ad35
Author: Marek Aaron Sapota <maarons@gnu.org>
Date:   Tue Jul 21 11:40:28 2009 +0200

    Implemented save file.

diff --git a/misc/PyGTK_Control/MyServerControl.py b/misc/PyGTK_Control/MyServerControl.py
index c7f5f9b..ca4ce47 100644
--- a/misc/PyGTK_Control/MyServerControl.py
+++ b/misc/PyGTK_Control/MyServerControl.py
@@ -274,36 +274,43 @@ class PyGTKControl():
                 f.write(str(config))
     
     def get_current_config(self):
-        '''Returns current configuration as list of definitions.'''
-        definitions = []
-        for option in self.options:
-            check, field, var = self.options[option]
-            if not check.get_active():
-                continue
-            definition = self.definitions.get(option)
-            if var == 'string':
-                definition.set_attribute('value', field.get_text())
-            elif var == 'integer':
-                definition.set_attribute('value', str(int(field.get_value())))
-            elif var == 'bool':
-                value = 'NO' if field.get_active() else 'YES'
-                definition.set_attribute('value', value)
-            elif var == 'list':
-                values = []
-                model = field.get_model()
-                i = model.iter_children(None)
-                while i is not None:
-                    values.append(model.get_value(i, 0))
+        '''Returns current configuration as MyServerConfig instance.'''
+
+        def make_def(current, model):
+            row = model[current]
+            name = row[0]
+            enabled = row[2]
+            value = row[3]
+            value_check = row[4]
+            attributes = row[5]
+            if value_check:
+                attributes['value'] = value
+            if not enabled:
+                return None
+            i = model.iter_children(current)
+            if i is None:
+                return DefinitionElement(name, attributes)
+            else:
+                definitions = []
+                while i is not None: # iterate over children
+                    definition = make_def(i, model)
+                    if definition is not None:
+                        definitions.append(definition)
                     i = model.iter_next(i)
-                values = map(
-                    lambda v: DefinitionElement(attributes = {'value': v}),
-                    values)
-                for i in xrange(len(definition.get_definitions())):
-                    definition.remove_definition(0)
-                for value in values:
-                    definition.add_definition(value)
-            definitions.append(definition)
-        return MyServerConfig(definitions + self.unknown)
+                return DefinitionTree(name, definitions, attributes)
+            
+        definitions = []
+        for tab in self.tabs:
+            table, tree = self.tabs[tab]
+            model = tree.get_model()
+            table.save_changed(tree)
+            i = model.iter_children(None)
+            while i is not None: # iterate over options
+                definition = make_def(i, model)
+                if definition is not None:
+                    definitions.append(definition)
+                i = model.iter_next(i)
+        return MyServerConfig(definitions)
 
     def on_new_menu_item_activate(self, widget = None):
         '''Clears configuration.'''



commit 8511f7bf10f2a7181186d4b8a63cd9c826378e85
Author: Marek Aaron Sapota <maarons@gnu.org>
Date:   Mon Jul 20 23:29:06 2009 +0200

    Removed old GUI.

diff --git a/misc/PyGTK_Control/old/ConfigGUI.py b/misc/PyGTK_Control/old/ConfigGUI.py
deleted file mode 100755
index fe3a102..0000000
--- a/misc/PyGTK_Control/old/ConfigGUI.py
+++ /dev/null
@@ -1,372 +0,0 @@
-#!/usr/bin/env python
-
-# MyServer
-# Copyright (C) 2002, 2003, 2004, 2007, 2008 The MyServer Team
-# This program 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 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program.  If not, see <http://www.gnu.org/licenses/>.
-
-import sys
-import gobject
-
-try:
-    import pygtk
-    pygtk.require("2.0")
-except:
-    pass
-try:
-    import gtk
-    import gtk.glade
-except:
-    sys.exit(1)
-
-class ConfigGUIGTK:
-    """@package ConfigGUIGTK
-    UI for configurtion tool"""
-
-    def __init__(self):
-
-        # Connect the Glade file
-        gladefile = "XMLGui.glade"
-        self.wTree = gtk.glade.XML(gladefile)
-
-        # Bind main window
-        self.window = self.wTree.get_widget("ConfigUI")
-        # Bind "destroy" event
-        if (self.window):
-            self.window.connect("destroy", gtk.main_quit)
-
-        # Set defult values on comboboxes
-        self.wTree.get_widget("cbVerbosityLevel").set_active(0)
-        self.wTree.get_widget("combobox2").set_active(0)
-
-        # Here we call the methods creating widgets with functionality
-        self.create_treeview_for_default_filenames()
-        self.create_treeview_for_host_names()
-        self.create_treeview_for_IP_addresses()
-        self.create_a_combobox_for_connection_types()
-        self.create_treeview_with_MIME_types()
-        self.bind_signals()
-
-
-    def create_treeview_for_default_filenames(self):
-        """ Create treeview widget structure (one column) for default filenames """
-        self.treeview=self.wTree.get_widget("treeview1")
-        self.treemodel=gtk.TreeStore(gobject.TYPE_STRING)
-        self.treeview.set_model(self.treemodel)
-        # Add treeview header
-        self.treeview.set_headers_visible(True)
-        renderer=gtk.CellRendererText()
-        column=gtk.TreeViewColumn("Default file names:",renderer, text=0)
-        column.set_resizable(True)
-        self.treeview.append_column(column)
-        renderer=gtk.CellRendererText()
-
-        # Add list items to tree view
-        self.insert_row(self.treemodel,None,'default.html')
-        self.insert_row(self.treemodel,None,'default.htm')
-        self.insert_row(self.treemodel,None,'default.php')
-        self.insert_row(self.treemodel,None,'index.html')
-        self.insert_row(self.treemodel,None,'index.htm')
-        self.insert_row(self.treemodel,None,'index.php')
-
-        self.treeview.show()
-
-    def create_treeview_for_host_names(self):
-        """ Create treeview widget structure (one column) for host names """
-        self.treeviewHost=self.wTree.get_widget("treeviewHost")
-        self.treemodelHost=gtk.TreeStore(gobject.TYPE_STRING)
-        self.treeviewHost.set_model(self.treemodelHost)
-
-        renderer=gtk.CellRendererText()
-        column=gtk.TreeViewColumn("Host:",renderer, text=0)
-        column.set_resizable(True)
-        self.treeviewHost.append_column(column)
-        renderer=gtk.CellRendererText()
-        self.treeviewHost.show()
-
-    def create_treeview_for_IP_addresses(self):
-        """ Create treeview widget structure (one column) for IP addresses """
-        self.treeviewIP=self.wTree.get_widget("treeviewIP")
-        self.treemodelIP=gtk.TreeStore(gobject.TYPE_STRING)
-        self.treeviewIP.set_model(self.treemodelIP)
-
-        renderer=gtk.CellRendererText()
-        column=gtk.TreeViewColumn("IP:",renderer, text=0)
-        column.set_resizable(True)
-        self.treeviewIP.append_column(column)
-        renderer=gtk.CellRendererText()
-        self.treeviewIP.show()
-
-    def create_a_combobox_for_connection_types(self):
-        """ Cretes a combobox with connection types """
-        self.store2 = gtk.ListStore(gobject.TYPE_STRING)
-        #populate
-        self.store2.append(["Every HTTP connection"])
-        self.store2.append(["FTP connection"])
-        self.cbHost=self.wTree.get_widget("combobox5")
-        self.cbHost.set_model(self.store2)
-        cell = gtk.CellRendererText()
-        self.cbHost.pack_start(cell, True)
-        self.cbHost.add_attribute(cell, 'text',0)
-
-    def create_treeview_with_MIME_types(self):
-        """ Add list items to tree view. The types are parsed
-        from xml file using helper class MIMEtpe
-        the result is used to poulate the treeview and the combobox """
-
-        from MIMEtypes import MIMEtype, ParseTypes
-        TYPES = ParseTypes("MIMEtypes.xml")
-
-        #Create combobox to select MIME type
-        # http://faq.pygtk.org/index.py?req=show&file=faq16.008.htp
-        self.comboboxMIME = self.wTree.get_widget("combobox3")
-        self.store = gtk.ListStore(gobject.TYPE_STRING)
-        #populate
-        for element in TYPES:
-            self.store.append([str(element.MIME)])
-        self.comboboxMIME.set_model(self.store)
-        cell = gtk.CellRendererText()
-        self.comboboxMIME.pack_start(cell, True)
-        self.comboboxMIME.add_attribute(cell, 'text',0)
-
-        # Crete treeview widget with file extensions
-        self.treeviewEXT=self.wTree.get_widget("treeview2")
-        self.treemodelEXT=gtk.TreeStore(gobject.TYPE_STRING)
-        self.treeviewEXT.set_model(self.treemodelEXT)
-        # Add treeview header
-        self.treeviewEXT.set_headers_visible(True)
-        renderer=gtk.CellRendererText()
-        column=gtk.TreeViewColumn("Extension:",renderer, text=0)
-        column.set_resizable(True)
-        self.treeviewEXT.append_column(column)
-        renderer=gtk.CellRendererText()
-
-        #populate
-        for element in TYPES:
-            self.insert_row(self.treemodelEXT,None,element.ext)
-        self.treeviewEXT.show()
-
-    def bind_signals(self):
-        """ This method creates a dictionary of pairs
-        signal naem : event, and then binds them
-        using signal_autoconnect method """
-
-        dic = { "on_btnAddFileName_clicked" : \
-                self.buttonAddefaultFileName_clicked,
-                "on_btnRemoveFileName_clicked" : \
-                self.buttonRemoveDefultFileName_clicked,
-                "on_btnAddMIMEExtenesion_clicked" : \
-                self.buttonAddMIMEExtension_clicked,
-                "on_btnAddMIMEType_clicked" : \
-                self.buttonAddMIMEType_clicked,
-                "on_filechooserbutton2_file_set" : \
-                self.filechooserbutton2_file_set,
-                "on_filechooserbutton1_file_set" : \
-                self.filechooserbutton1_file_set,
-                "on_filechooserbutton4_file_set" : \
-                self.filechooserbutton4_file_set,
-                "on_filechooserbutton3_file_set" : \
-                self.filechooserbutton3_file_set,
-                "on_btnRemoveMIMEExtension_clicked" : \
-                self.buttonRemoveMIMEExtension_clicked,
-                "on_btnAddHostName_clicked" : \
-                self.buttonAddHostName_clicked,
-                "on_btnRemoveHostName_clicked" : \
-                self.buttonRemoveHostName_clicked,
-                "on_btnAddHost_clicked" : \
-                self.btnAddHost_clicked,
-                "on_btnAddIP_clicked" : \
-                self.btnAddIP_clicked,
-                "on_btnRemoveHost_clicked" : \
-                self.btnRemoveHost_clicked,
-                "on_btnRemoveIP_clicked" : \
-                self.btnRemoveIP_clicked,
-                "on_save_activate" : \
-                self.serialize_config
-                }
-        # Connect signals
-        self.wTree.signal_autoconnect (dic)
-
-    def insert_row(self, model,parent,
-                   column):
-        """Fuction used to add rows to treeview.
-        @param model  what model tree view uses for storing data
-        @param parent used to nest entries (like dir explorer)
-        @param column the text you want to insert
-        """
-        myiter=model.insert_after(parent,None)
-        model.set_value(myiter,0,column)
-        return myiter
-
-    def delete_rows(self, treeV):
-        """ Function used to remove rows from treeview.
-        @param treeV from which treeview we're deleting
-        """
-        selection = treeV.get_selection()
-        model, selected = selection.get_selected()
-        model.remove(selected)
-
-    def btnAddHost_clicked(self, button):
-        """ Add new host name to treeview """
-        self.insert_row(self.treemodelHost,None, self.ShowDialogBox("Add new host name"))
-
-    def btnRemoveHost_clicked(self, button):
-        """ Removes selected file name """
-        self.delete_rows(self.treeviewHost)
-
-    def btnAddIP_clicked(self, button):
-        """ Add new IP address to trreview """
-        self.insert_row(self.treemodelIP,None, self.ShowDialogBox("Add new IP address"))
-
-    def btnRemoveIP_clicked(self, button):
-        """ Removes selected file name """
-        self.delete_rows(self.treeviewIP)
-
-    def buttonAddMIMEType_clicked(self, button):
-        """ Add new MIME type to list """
-        self.store.append([self.ShowDialogBox("Add new MIME type")])
-
-    def buttonAddHostName_clicked(self, button):
-        """ Add new Host name to combobox """
-        self.store2.append([self.ShowDialogBox("Add new host")])
-
-    def buttonRemoveHostName_clicked(self, button):
-        """ Removes host name from combobox """
-        self.store2.remove(self.cbHost.get_active_iter())
-
-    def buttonAddefaultFileName_clicked(self, button):
-        """ Adds new entry, with default file name to tree view"""
-        self.insert_row(self.treemodel,None, self.ShowDialogBox("Add new file name"))
-
-    def buttonRemoveDefultFileName_clicked(self, button):
-        """ Removes selected file name """
-        self.delete_rows(self.treeview)
-
-    def buttonAddMIMEExtension_clicked(self, button):
-        """ Add new extension """
-        self.insert_row(self.treemodelEXT,None, self.ShowDialogBox("Add new extension"))
-
-    def buttonRemoveMIMEExtension_clicked(self, widget):
-        """ Remove selected extension name """
-        self.delete_rows(self.treeviewEXT)
-
-    def filechooserbutton2_file_set(self, widget):
-        """ Place file path in entry field """
-        self.wTree.get_widget("enManager").set_text(self.wTree.get_widget("filechooserbutton2").get_filename())
-
-    def filechooserbutton4_file_set(self, widget):
-        """ Place file path in entry field """
-        self.wTree.get_widget("enSystemFolder").set_text(self.wTree.get_widget("filechooserbutton4").get_filename())
-
-    def filechooserbutton3_file_set(self, widget):
-        """ Place file path in entry field """
-        self.wTree.get_widget("enDocummentRoot").set_text(self.wTree.get_widget("filechooserbutton3").get_filename())
-
-    def filechooserbutton1_file_set(self, widget):
-        """ Place file path in entry field """
-        self.wTree.get_widget("enStylesheet").set_text(self.wTree.get_widget("filechooserbutton1").get_filename())
-
-    def ShowDialogBox(self, title):
-        """ Shows a typical dilog box with single text box entry field """
-        dia = gtk.Dialog(title)
-        dia.show()
-        entry = gtk.Entry()
-        entry.show()
-        entry.set_activates_default(True)
-        dia.vbox.pack_start(entry)
-        dia.add_button(gtk.STOCK_CANCEL, gtk.RESPONSE_CANCEL)
-        dia.add_button(gtk.STOCK_OK, gtk.RESPONSE_OK)
-        dia.set_default_response(gtk.RESPONSE_OK)
-        response = dia.run()
-        if response == gtk.RESPONSE_OK:
-            name = entry.get_text()
-        dia.destroy()
-        return name
-
-    def run(self):
-        gtk.main()
-
-    # Here begins the functionality implementation
-    def get(self, name):
-        """ Helper/alias function returns widgetwith specified name """
-        return self.wTree.get_widget(name)
-
-    def save_dict_to_xml(self, d, filename="settings.xml"):
-        """ Saves dictionary (with settings) to a XML file"""
-        out = "<?xml version=\"1.0\"?>\n <!--MODIFY THE FILE ONLY IF YOU ARE SURE OF WHAT YOU ARE DOING--> \n <MYSERVER> \n"
-        for k, v in d.iteritems():
-            out += "<" + k.__str__() + ">"
-            out += v.__str__()
-            out += "</" + k.__str__() + ">\n"
-        out += "</MYSERVER>"
-
-        FILE = open(filename,"w")
-        FILE.writelines(out)
-        FILE.close()
-
-    def serialize_config(self, widget):
-        """ This function serializes the configurtion settings
-        and creates a dictionary with pairs:
-        name_of_setting: vlue """
-        settings = { 'LANGUGE' : self.get("combobox2").get_active_text().split(".")[0].capitalize(), \
-                     'VERBOSITY' :  self.get("cbVerbosityLevel").get_active_text(), \
-                     'NTHREADS_STATIC' : self.get("enAlwysActiveThreads").get_text(), \
-                     'NTHREADS_MAX' : self.get("enMaximumNumberOfThreads").get_text(), \
-                     'BUFFER_SIZE' : self.get("enMemoryBuffer").get_text(), \
-                     #TODO Inesrt default filenames from treeview
-                     'CONNECTION_TIMEOUT' : self.get("enConnectionTimeOut").get_text(), \
-                     #'USE_ERROR_FILE' : self.get
-                     'MAX_CONNECTIONS' : self.get("enMaxConnections").get_text(), \
-                     'MAX_LOG_FILE_SIZE' : self.get("enMaxLogFileSize").get_text(), \
-                     'BROWSEFOLDER_CSS' : self.get("enStylesheet").get_text(), \
-                     'SERVER_ADMIN' : self.get("entry10").get_text(), \
-                     'GZIP_THRESHOLD' : self.get("enGzipCompressionThreshold").get_text(), \
-                     #'FOLLOW_LINKS'
-                     #'MAX_FILESCACHE_SIZE' : self.get("").get_text(), \
-                     #'MAX_FILESCACHE_FILESIZE' : self.get("").get_text(), \
-                     #'MIN_FILESCACHE_FILESIZE' : self.get("").get_text(), \
-                     #'USE_HOME_DIRECTORY' : self.get("").get_text(), \
-                     #'HOME_DIRECTORY' : self.get("").get_text(), \
-                     #'CONTROL_ENABLED' : self.get("").get_text(), \
-                     'ALLOW_CGI' : 'YES' if self.get("checkbutton8").get_active() else 'NO', \
-                     'ALLOW_FASTCGI'  : 'YES' if self.get("checkbutton12").get_active() else 'NO', \
-                     'ALLOW_ISAPI' : 'YES' if self.get("checkbutton9").get_active() else 'NO', \
-                     'ALLOW_WINCGI' : 'YES' if self.get("checkbutton11").get_active() else 'NO', \
-                     'ALLOW_MSCGI' : 'YES' if self.get("checkbutton10").get_active() else 'NO', \
-                     'ALLOW_SCGI' : 'YES' if self.get("checkbutton13").get_active() else 'NO', \
-                     'ALLOW_SEND_LINK' : 'YES' if self.get("checkbutton14").get_active() else 'NO', \
-                     'ALLOW_EXTERNAL_COMMANDS' : 'YES' if self.get("checkbutton15").get_active() else 'NO', \
-                     'ALLOW_SEND_FILE' : 'YES' if self.get("checkbutton16").get_active() else 'NO', \
-                     #'MAX_SERVERS_PROCESSES' : self.get("").get_text(), \
-                     #'SERVERS_PROCESSES_INITIAL_PORT' : self.get("").get_text(), \
-                     'CONTROL_ADMIN' : self.get("entry11").get_text(), \
-                     'CONTROL_PASSWORD' : self.get("entry12").get_text(), \
-                      }
-        self.save_dict_to_xml(settings)
-        dia = gtk.Dialog("Settings save")
-        dia.show()
-        dia.add_button(gtk.STOCK_OK, gtk.RESPONSE_OK)
-        dia.set_default_response(gtk.RESPONSE_OK)
-        response = dia.run()
-        dia.destroy()
-
-
-
-
-def main():
-    app = ConfigGUIGTK()
-    app.run()
-
-if __name__ == "__main__":
-    main()
-
diff --git a/misc/PyGTK_Control/old/MIMEtypes.py b/misc/PyGTK_Control/old/MIMEtypes.py
deleted file mode 100644
index 3081991..0000000
--- a/misc/PyGTK_Control/old/MIMEtypes.py
+++ /dev/null
@@ -1,61 +0,0 @@
-# MyServer
-# Copyright (C) 2002, 2003, 2004, 2007, 2008 The MyServer Team
-# This program 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 3 of the License, or
-# (at your option) any later version.
-# 
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-# 
-# You should have received a copy of the GNU General Public License
-# along with this program.  If not, see <http://www.gnu.org/licenses/>.
-
-from xml.etree import ElementTree as ET
-
-class MIMEtype:
-    """This type wraps MIME types described in MIMEtypes.xml """
-
-    def __init__(self, ext, MIME, CMD, MANAGER):
-        self.ext = ext
-        self.MIME = MIME
-        self.CMD = CMD
-        self.MANAGER = MANAGER
-    
-    #TODO: Override __str__ method
-        
-  
-def ParseTypes(filename):
-    """ Parse types """
-    sock = open(filename)
-    tree = ET.parse(sock)
-    sock.close()
-    elem = tree.getroot()
-
-    # Create nd populate a list with MIME types
-    MTlist = []
-    for MTypes in elem:
-        ext = MTypes.findtext("EXT")
-        mime = MTypes.findtext("MIME")
-        cmd = MTypes.findtext("CMD")
-        manager = MTypes.findtext("MANAGER")
-        
-        MT = MIMEtype(ext, mime, cmd, elem)
-        
-        MTlist.append(MT)
-   
-    return MTlist
-                
-#To test if it works:  
-if __name__ == "__main__":
-    LIST =  ParseTypes("MIMEtypes.xml")
-    for el in LIST:
-        print "======="
-        print el.ext
-        print el.MIME
-        print el.CMD
-        #TODO: manager node is always None in the input XML - so it prints object type
-        print el.MANAGER
-    
diff --git a/misc/PyGTK_Control/old/MIMEtypes.xml b/misc/PyGTK_Control/old/MIMEtypes.xml
deleted file mode 100644
index 870e1ca..0000000
--- a/misc/PyGTK_Control/old/MIMEtypes.xml
+++ /dev/null
@@ -1,985 +0,0 @@
-<?xml version="1.0"?>
-
-<MIMETYPES>
-
-<MIMETYPE>
-<EXT>mscgi</EXT>
-<MIME>text/html</MIME>
-<CMD>RUNMSCGI</CMD>
-<MANAGER>NONE</MANAGER>
-</MIMETYPE>
-
-<MIMETYPE>
-<EXT>cgi</EXT>
-<MIME>text/html</MIME>
-<CMD>EXECUTE</CMD>
-<MANAGER>NONE</MANAGER>
-</MIMETYPE>
-
-<MIMETYPE>
-<EXT>isapi</EXT>
-<MIME>text/html</MIME>
-<CMD>EXECUTEISAPI</CMD>
-<MANAGER>NONE</MANAGER>
-</MIMETYPE>
-
-<MIMETYPE>
-<EXT>fcgi</EXT>
-<MIME>text/html</MIME>
-<CMD>EXECUTEFASTCGI</CMD>
-<MANAGER>NONE</MANAGER>
-</MIMETYPE>
-
-<MIMETYPE>
-<EXT>wincgi</EXT>
-<MIME>text/html</MIME>
-<CMD>EXECUTEWINCGI</CMD>
-<MANAGER>NONE</MANAGER>
-</MIMETYPE>
-
-<MIMETYPE>
-<EXT>ai</EXT>
-<MIME>application/postscript</MIME>
-<CMD>SEND</CMD>
-<MANAGER>NONE</MANAGER>
-</MIMETYPE>
-
-<MIMETYPE>
-<EXT>msxu</EXT>
-<MIME>video/vnd.mpegurl</MIME>
-<CMD>SEND</CMD>
-<MANAGER>NONE</MANAGER>
-</MIMETYPE>
-
-<MIMETYPE>
-<EXT>ice</EXT>
-<MIME>x-conference/x-cooltalk</MIME>
-<CMD>SEND</CMD>
-<MANAGER>NONE</MANAGER>
-</MIMETYPE>
-
-<MIMETYPE>
-<EXT>movie</EXT>
-<MIME>video/x-sgi-movie</MIME>
-<CMD>SEND</CMD>
-<MANAGER>NONE</MANAGER>
-</MIMETYPE>
-
-<MIMETYPE>
-<EXT>ps</EXT>
-<MIME>application/postscript</MIME>
-<CMD>SEND</CMD>
-<MANAGER>NONE</MANAGER>
-</MIMETYPE>
-
-<MIMETYPE>
-<EXT>eps</EXT>
-<MIME>application/postscript</MIME>
-<CMD>SEND</CMD>
-<MANAGER>NONE</MANAGER>
-</MIMETYPE>
-
-<MIMETYPE>
-<EXT>smil</EXT>
-<MIME>application/smil</MIME>
-<CMD>SEND</CMD>
-<MANAGER>NONE</MANAGER>
-</MIMETYPE>
-
-<MIMETYPE>
-<EXT>wmlsc</EXT>
-<MIME>application/vnd.wap.wmlscriptc</MIME>
-<CMD>SEND</CMD>
-<MANAGER>NONE</MANAGER>
-</MIMETYPE>
-
-<MIMETYPE>
-<EXT>wmlc</EXT>
-<MIME>application/vnd.wap.wmlc</MIME>
-<CMD>SEND</CMD>
-<MANAGER>NONE</MANAGER>
-</MIMETYPE>
-
-<MIMETYPE>
-<EXT>wbxml</EXT>
-<MIME>application/vnd.wap.wbxml</MIME>
-<CMD>SEND</CMD>
-<MANAGER>NONE</MANAGER>
-</MIMETYPE>
-
-<MIMETYPE>
-<EXT>smi</EXT>
-<MIME>application/smil</MIME>
-<CMD>SEND</CMD>
-<MANAGER>NONE</MANAGER>
-</MIMETYPE>
-
-<MIMETYPE>
-<EXT>dll</EXT>
-<MIME>application/octet-stream</MIME>
-<CMD>SEND</CMD>
-<MANAGER>NONE</MANAGER>
-</MIMETYPE>
-
-<MIMETYPE>
-<EXT>so</EXT>
-<MIME>application/octet-stream</MIME>
-<CMD>SEND</CMD>
-<MANAGER>NONE</MANAGER>
-</MIMETYPE>
-
-<MIMETYPE>
-<EXT>class</EXT>
-<MIME>application/octet-stream</MIME>
-<CMD>SEND</CMD>
-<MANAGER>NONE</MANAGER>
-</MIMETYPE>
-
-<MIMETYPE>
-<EXT>exe</EXT>
-<MIME>application/octet-stream</MIME>
-<CMD>SEND</CMD>
-<MANAGER>NONE</MANAGER>
-</MIMETYPE>
-
-<MIMETYPE>
-<EXT>lzh</EXT>
-<MIME>application/octet-stream</MIME>
-<CMD>SEND</CMD>
-<MANAGER>NONE</MANAGER>
-</MIMETYPE>
-
-<MIMETYPE>
-<EXT>lha</EXT>
-<MIME>application/octet-stream</MIME>
-<CMD>SEND</CMD>
-<MANAGER>NONE</MANAGER>
-</MIMETYPE>
-
-<MIMETYPE>
-<EXT>dms</EXT>
-<MIME>application/octet-stream</MIME>
-<CMD>SEND</CMD>
-<MANAGER>NONE</MANAGER>
-</MIMETYPE>
-
-<MIMETYPE>
-<EXT>oda</EXT>
-<MIME>application/oda</MIME>
-<CMD>SEND</CMD>
-<MANAGER>NONE</MANAGER>
-</MIMETYPE>
-
-<MIMETYPE>
-<EXT>bin</EXT>
-<MIME>application/octet-stream</MIME>
-<CMD>SEND</CMD>
-<MANAGER>NONE</MANAGER>
-</MIMETYPE>
-
-<MIMETYPE>
-<EXT>src</EXT>
-<MIME>application/x-wais-source</MIME>
-<CMD>SEND</CMD>
-<MANAGER>NONE</MANAGER>
-</MIMETYPE>
-
-<MIMETYPE>
-<EXT>ustar</EXT>
-<MIME>application/x-ustar</MIME>
-<CMD>SEND</CMD>
-<MANAGER>NONE</MANAGER>
-</MIMETYPE>
-
-<MIMETYPE>
-<EXT>ms</EXT>
-<MIME>application/x-troff-ms</MIME>
-<CMD>SEND</CMD>
-<MANAGER>NONE</MANAGER>
-</MIMETYPE>
-
-<MIMETYPE>
-<EXT>me</EXT>
-<MIME>application/x-troff-me</MIME>
-<CMD>SEND</CMD>
-<MANAGER>NONE</MANAGER>
-</MIMETYPE>
-
-<MIMETYPE>
-<EXT>man</EXT>
-<MIME>application/x-troff-man</MIME>
-<CMD>SEND</CMD>
-<MANAGER>NONE</MANAGER>
-</MIMETYPE>
-
-<MIMETYPE>
-<EXT>roff</EXT>
-<MIME>application/x-troff</MIME>
-<CMD>SEND</CMD>
-<MANAGER>NONE</MANAGER>
-</MIMETYPE>
-
-<MIMETYPE>
-<EXT>tr</EXT>
-<MIME>application/x-troff</MIME>
-<CMD>SEND</CMD>
-<MANAGER>NONE</MANAGER>
-</MIMETYPE>
-
-<MIMETYPE>
-<EXT>t</EXT>
-<MIME>application/x-troff</MIME>
-<CMD>SEND</CMD>
-<MANAGER>NONE</MANAGER>
-</MIMETYPE>
-
-<MIMETYPE>
-<EXT>texi</EXT>
-<MIME>application/x-texinfo</MIME>
-<CMD>SEND</CMD>
-<MANAGER>NONE</MANAGER>
-</MIMETYPE>
-
-<MIMETYPE>
-<EXT>texinfo</EXT>
-<MIME>application/x-texinfo</MIME>
-<CMD>SEND</CMD>
-<MANAGER>NONE</MANAGER>
-</MIMETYPE>
-
-<MIMETYPE>
-<EXT>tex</EXT>
-<MIME>application/x-tex</MIME>
-<CMD>SEND</CMD>
-<MANAGER>NONE</MANAGER>
-</MIMETYPE>
-
-<MIMETYPE>
-<EXT>tcl</EXT>
-<MIME>application/x-tcl</MIME>
-<CMD>SEND</CMD>
-<MANAGER>NONE</MANAGER>
-</MIMETYPE>
-
-<MIMETYPE>
-<EXT>tar</EXT>
-<MIME>application/x-tar</MIME>
-<CMD>SEND</CMD>
-<MANAGER>NONE</MANAGER>
-</MIMETYPE>
-
-<MIMETYPE>
-<EXT>sv4crc</EXT>
-<MIME>application/x-sv4crc</MIME>
-<CMD>SEND</CMD>
-<MANAGER>NONE</MANAGER>
-</MIMETYPE>
-
-<MIMETYPE>
-<EXT>sv4cpio</EXT>
-<MIME>application/x-sv4cpio</MIME>
-<CMD>SEND</CMD>
-<MANAGER>NONE</MANAGER>
-</MIMETYPE>
-
-<MIMETYPE>
-<EXT>sit</EXT>
-<MIME>application/x-stuffit</MIME>
-<CMD>SEND</CMD>
-<MANAGER>NONE</MANAGER>
-</MIMETYPE>
-
-<MIMETYPE>
-<EXT>swf</EXT>
-<MIME>application/x-shockwave-flash</MIME>
-<CMD>SEND</CMD>
-<MANAGER>NONE</MANAGER>
-</MIMETYPE>
-
-<MIMETYPE>
-<EXT>shar</EXT>
-<MIME>application/x-shar</MIME>
-<CMD>SEND</CMD>
-<MANAGER>NONE</MANAGER>
-</MIMETYPE>
-
-<MIMETYPE>
-<EXT>sh</EXT>
-<MIME>application/x-sh</MIME>
-<CMD>SEND</CMD>
-<MANAGER>NONE</MANAGER>
-</MIMETYPE>
-
-<MIMETYPE>
-<EXT>cpt</EXT>
-<MIME>application/mac-compactpro</MIME>
-<CMD>SEND</CMD>
-<MANAGER>NONE</MANAGER>
-</MIMETYPE>
-
-<MIMETYPE>
-<EXT>hqx</EXT>
-<MIME>application/mac-binhex40</MIME>
-<CMD>SEND</CMD>
-<MANAGER>NONE</MANAGER>
-</MIMETYPE>
-
-<MIMETYPE>
-<EXT>cdf</EXT>
-<MIME>application/x-netcdf</MIME>
-<CMD>SEND</CMD>
-<MANAGER>NONE</MANAGER>
-</MIMETYPE>
-
-<MIMETYPE>
-<EXT>ez</EXT>
-<MIME>application/andrew-inset</MIME>
-<CMD>SEND</CMD>
-<MANAGER>NONE</MANAGER>
-</MIMETYPE>
-
-<MIMETYPE>
-<EXT>nc</EXT>
-<MIME>application/x-netcdf</MIME>
-<CMD>SEND</CMD>
-<MANAGER>NONE</MANAGER>
-</MIMETYPE>
-
-<MIMETYPE>
-<EXT>latex</EXT>
-<MIME>application/x-latex</MIME>
-<CMD>SEND</CMD>
-<MANAGER>NONE</MANAGER>
-</MIMETYPE>
-
-<MIMETYPE>
-<EXT>skm</EXT>
-<MIME>application/x-koan</MIME>
-<CMD>SEND</CMD>
-<MANAGER>NONE</MANAGER>
-</MIMETYPE>
-
-<MIMETYPE>
-<EXT>skt</EXT>
-<MIME>application/x-koan</MIME>
-<CMD>SEND</CMD>
-<MANAGER>NONE</MANAGER>
-</MIMETYPE>
-
-<MIMETYPE>
-<EXT>skd</EXT>
-<MIME>application/x-koan</MIME>
-<CMD>SEND</CMD>
-<MANAGER>NONE</MANAGER>
-</MIMETYPE>
-
-<MIMETYPE>
-<EXT>skp</EXT>
-<MIME>application/x-koan</MIME>
-<CMD>SEND</CMD>
-<MANAGER>NONE</MANAGER>
-</MIMETYPE>
-
-<MIMETYPE>
-<EXT>js</EXT>
-<MIME>application/x-javascript</MIME>
-<CMD>SEND</CMD>
-<MANAGER>NONE</MANAGER>
-</MIMETYPE>
-
-<MIMETYPE>
-<EXT>hdf</EXT>
-<MIME>application/x-hdf</MIME>
-<CMD>SEND</CMD>
-<MANAGER>NONE</MANAGER>
-</MIMETYPE>
-
-<MIMETYPE>
-<EXT>gtar</EXT>
-<MIME>application/x-gtar</MIME>
-<CMD>SEND</CMD>
-<MANAGER>NONE</MANAGER>
-</MIMETYPE>
-
-<MIMETYPE>
-<EXT>spl</EXT>
-<MIME>application/x-futuresplash</MIME>
-<CMD>SEND</CMD>
-<MANAGER>NONE</MANAGER>
-</MIMETYPE>
-
-<MIMETYPE>
-<EXT>dvi</EXT>
-<MIME>application/x-dvi</MIME>
-<CMD>SEND</CMD>
-<MANAGER>NONE</MANAGER>
-</MIMETYPE>
-
-<MIMETYPE>
-<EXT>dxr</EXT>
-<MIME>application/x-director</MIME>
-<CMD>SEND</CMD>
-<MANAGER>NONE</MANAGER>
-</MIMETYPE>
-
-<MIMETYPE>
-<EXT>dir</EXT>
-<MIME>application/x-director</MIME>
-<CMD>SEND</CMD>
-<MANAGER>NONE</MANAGER>
-</MIMETYPE>
-
-<MIMETYPE>
-<EXT>dcr</EXT>
-<MIME>application/x-director</MIME>
-<CMD>SEND</CMD>
-<MANAGER>NONE</MANAGER>
-</MIMETYPE>
-
-<MIMETYPE>
-<EXT>csh</EXT>
-<MIME>application/x-csh</MIME>
-<CMD>SEND</CMD>
-<MANAGER>NONE</MANAGER>
-</MIMETYPE>
-
-<MIMETYPE>
-<EXT>cpio</EXT>
-<MIME>application/x-cpio</MIME>
-<CMD>SEND</CMD>
-<MANAGER>NONE</MANAGER>
-</MIMETYPE>
-
-<MIMETYPE>
-<EXT>pgn</EXT>
-<MIME>application/x-chess-pgn</MIME>
-<CMD>SEND</CMD>
-<MANAGER>NONE</MANAGER>
-</MIMETYPE>
-
-<MIMETYPE>
-<EXT>vcd</EXT>
-<MIME>application/x-cdlink</MIME>
-<CMD>SEND</CMD>
-<MANAGER>NONE</MANAGER>
-</MIMETYPE>
-
-<MIMETYPE>
-<EXT>bcpio</EXT>
-<MIME>application/x-bcpio</MIME>
-<CMD>SEND</CMD>
-<MANAGER>NONE</MANAGER>
-</MIMETYPE>
-
-<MIMETYPE>
-<EXT>xsl</EXT>
-<MIME>text/xml</MIME>
-<CMD>SEND</CMD>
-<MANAGER>NONE</MANAGER>
-</MIMETYPE>
-
-<MIMETYPE>
-<EXT>etx</EXT>
-<MIME>text/x-setext</MIME>
-<CMD>SEND</CMD>
-<MANAGER>NONE</MANAGER>
-</MIMETYPE>
-
-<MIMETYPE>
-<EXT>tsv</EXT>
-<MIME>text/tab-separated-values</MIME>
-<CMD>SEND</CMD>
-<MANAGER>NONE</MANAGER>
-</MIMETYPE>
-
-<MIMETYPE>
-<EXT>sgm</EXT>
-<MIME>text/sgml</MIME>
-<CMD>SEND</CMD>
-<MANAGER>NONE</MANAGER>
-</MIMETYPE>
-
-<MIMETYPE>
-<EXT>sgml</EXT>
-<MIME>text/sgml</MIME>
-<CMD>SEND</CMD>
-<MANAGER>NONE</MANAGER>
-</MIMETYPE>
-
-<MIMETYPE>
-<EXT>rtf</EXT>
-<MIME>text/rtf</MIME>
-<CMD>SEND</CMD>
-<MANAGER>NONE</MANAGER>
-</MIMETYPE>
-
-<MIMETYPE>
-<EXT>rtx</EXT>
-<MIME>text/richtext</MIME>
-<CMD>SEND</CMD>
-<MANAGER>NONE</MANAGER>
-</MIMETYPE>
-
-<MIMETYPE>
-<EXT>silo</EXT>
-<MIME>model/mesh</MIME>
-<CMD>SEND</CMD>
-<MANAGER>NONE</MANAGER>
-</MIMETYPE>
-
-<MIMETYPE>
-<EXT>mesh</EXT>
-<MIME>model/mesh</MIME>
-<CMD>SEND</CMD>
-<MANAGER>NONE</MANAGER>
-</MIMETYPE>
-
-<MIMETYPE>
-<EXT>msh</EXT>
-<MIME>model/mesh</MIME>
-<CMD>SEND</CMD>
-<MANAGER>NONE</MANAGER>
-</MIMETYPE>
-
-<MIMETYPE>
-<EXT>iges</EXT>
-<MIME>model/iges</MIME>
-<CMD>SEND</CMD>
-<MANAGER>NONE</MANAGER>
-</MIMETYPE>
-
-<MIMETYPE>
-<EXT>igs</EXT>
-<MIME>model/iges</MIME>
-<CMD>SEND</CMD>
-<MANAGER>NONE</MANAGER>
-</MIMETYPE>
-
-<MIMETYPE>
-<EXT>m3u</EXT>
-<MIME>audio/x-mpegurl</MIME>
-<CMD>SEND</CMD>
-<MANAGER>NONE</MANAGER>
-</MIMETYPE>
-
-<MIMETYPE>
-<EXT>avi</EXT>
-<MIME>video/x-msvideo</MIME>
-<CMD>SEND</CMD>
-<MANAGER>NONE</MANAGER>
-</MIMETYPE>
-
-<MIMETYPE>
-<EXT>mov</EXT>
-<MIME>video/quicktime</MIME>
-<CMD>SEND</CMD>
-<MANAGER>NONE</MANAGER>
-</MIMETYPE>
-
-<MIMETYPE>
-<EXT>qt</EXT>
-<MIME>video/quicktime</MIME>
-<CMD>SEND</CMD>
-<MANAGER>NONE</MANAGER>
-</MIMETYPE>
-
-<MIMETYPE>
-<EXT>mpg</EXT>
-<MIME>video/mpeg</MIME>
-<CMD>SEND</CMD>
-<MANAGER>NONE</MANAGER>
-</MIMETYPE>
-
-<MIMETYPE>
-<EXT>mpe</EXT>
-<MIME>video/mpeg</MIME>
-<CMD>SEND</CMD>
-<MANAGER>NONE</MANAGER>
-</MIMETYPE>
-
-<MIMETYPE>
-<EXT>mpeg</EXT>
-<MIME>video/mpeg</MIME>
-<CMD>SEND</CMD>
-<MANAGER>NONE</MANAGER>
-</MIMETYPE>
-
-<MIMETYPE>
-<EXT>xht</EXT>
-<MIME>application/xhtml+xml</MIME>
-<CMD>SEND</CMD>
-<MANAGER>NONE</MANAGER>
-</MIMETYPE>
-
-<MIMETYPE>
-<EXT>xhtml</EXT>
-<MIME>application/xhtml+xml</MIME>
-<CMD>SEND</CMD>
-<MANAGER>NONE</MANAGER>
-</MIMETYPE>
-
-<MIMETYPE>
-<EXT>xwd</EXT>
-<MIME>image/x-xwindowdump</MIME>
-<CMD>SEND</CMD>
-<MANAGER>NONE</MANAGER>
-</MIMETYPE>
-
-<MIMETYPE>
-<EXT>xpm</EXT>
-<MIME>image/x-xpixmap</MIME>
-<CMD>SEND</CMD>
-<MANAGER>NONE</MANAGER>
-</MIMETYPE>
-
-<MIMETYPE>
-<EXT>xbm</EXT>
-<MIME>image/x-xbitmap</MIME>
-<CMD>SEND</CMD>
-<MANAGER>NONE</MANAGER>
-</MIMETYPE>
-
-<MIMETYPE>
-<EXT>rgb</EXT>
-<MIME>image/x-rgb</MIME>
-<CMD>SEND</CMD>
-<MANAGER>NONE</MANAGER>
-</MIMETYPE>
-
-<MIMETYPE>
-<EXT>ppm</EXT>
-<MIME>image/x-portable-pixmap</MIME>
-<CMD>SEND</CMD>
-<MANAGER>NONE</MANAGER>
-</MIMETYPE>
-
-<MIMETYPE>
-<EXT>pgm</EXT>
-<MIME>image/x-portable-graymap</MIME>
-<CMD>SEND</CMD>
-<MANAGER>NONE</MANAGER>
-</MIMETYPE>
-
-<MIMETYPE>
-<EXT>pbm</EXT>
-<MIME>image/x-portable-bitmap</MIME>
-<CMD>SEND</CMD>
-<MANAGER>NONE</MANAGER>
-</MIMETYPE>
-
-<MIMETYPE>
-<EXT>pnm</EXT>
-<MIME>image/x-portable-anymap</MIME>
-<CMD>SEND</CMD>
-<MANAGER>NONE</MANAGER>
-</MIMETYPE>
-
-<MIMETYPE>
-<EXT>ras</EXT>
-<MIME>image/x-cmu-raster</MIME>
-<CMD>SEND</CMD>
-<MANAGER>NONE</MANAGER>
-</MIMETYPE>
-
-<MIMETYPE>
-<EXT>wbmp</EXT>
-<MIME>image/vnd.wap.wbmp</MIME>
-<CMD>SEND</CMD>
-<MANAGER>NONE</MANAGER>
-</MIMETYPE>
-
-<MIMETYPE>
-<EXT>djv</EXT>
-<MIME>image/vnd.djvu</MIME>
-<CMD>SEND</CMD>
-<MANAGER>NONE</MANAGER>
-</MIMETYPE>
-
-<MIMETYPE>
-<EXT>djvu</EXT>
-<MIME>image/vnd.djvu</MIME>
-<CMD>SEND</CMD>
-<MANAGER>NONE</MANAGER>
-</MIMETYPE>
-
-<MIMETYPE>
-<EXT>tif</EXT>
-<MIME>image/tiff</MIME>
-<CMD>SEND</CMD>
-<MANAGER>NONE</MANAGER>
-</MIMETYPE>
-
-<MIMETYPE>
-<EXT>tiff</EXT>
-<MIME>image/tiff</MIME>
-<CMD>SEND</CMD>
-<MANAGER>NONE</MANAGER>
-</MIMETYPE>
-
-<MIMETYPE>
-<EXT>png</EXT>
-<MIME>image/png</MIME>
-<CMD>SEND</CMD>
-<MANAGER>NONE</MANAGER>
-</MIMETYPE>
-
-<MIMETYPE>
-<EXT>ief</EXT>
-<MIME>image/ief</MIME>
-<CMD>SEND</CMD>
-<MANAGER>NONE</MANAGER>
-</MIMETYPE>
-
-<MIMETYPE>
-<EXT>xyz</EXT>
-<MIME>chemical/x-xyz</MIME>
-<CMD>SEND</CMD>
-<MANAGER>NONE</MANAGER>
-</MIMETYPE>
-
-<MIMETYPE>
-<EXT>pdb</EXT>
-<MIME>chemical/x-pdb</MIME>
-<CMD>SEND</CMD>
-<MANAGER>NONE</MANAGER>
-</MIMETYPE>
-
-<MIMETYPE>
-<EXT>wav</EXT>
-<MIME>audio/x-wav</MIME>
-<CMD>SEND</CMD>
-<MANAGER>NONE</MANAGER>
-</MIMETYPE>
-
-<MIMETYPE>
-<EXT>ra</EXT>
-<MIME>audio/x-realaudio</MIME>
-<CMD>SEND</CMD>
-<MANAGER>NONE</MANAGER>
-</MIMETYPE>
-
-<MIMETYPE>
-<EXT>rpm</EXT>
-<MIME>audio/x-pn-realaudio-plugin</MIME>
-<CMD>SEND</CMD>
-<MANAGER>NONE</MANAGER>
-</MIMETYPE>
-
-<MIMETYPE>
-<EXT>rm</EXT>
-<MIME>audio/x-pn-realaudio</MIME>
-<CMD>SEND</CMD>
-<MANAGER>NONE</MANAGER>
-</MIMETYPE>
-
-<MIMETYPE>
-<EXT>ram</EXT>
-<MIME>audio/x-pn-realaudio</MIME>
-<CMD>SEND</CMD>
-<MANAGER>NONE</MANAGER>
-</MIMETYPE>
-
-<MIMETYPE>
-<EXT>aifc</EXT>
-<MIME>audio/x-aiff</MIME>
-<CMD>SEND</CMD>
-<MANAGER>NONE</MANAGER>
-</MIMETYPE>
-
-<MIMETYPE>
-<EXT>aif</EXT>
-<MIME>audio/x-aiff</MIME>
-<CMD>SEND</CMD>
-<MANAGER>NONE</MANAGER>
-</MIMETYPE>
-
-<MIMETYPE>
-<EXT>aiff</EXT>
-<MIME>audio/x-aiff</MIME>
-<CMD>SEND</CMD>
-<MANAGER>NONE</MANAGER>
-</MIMETYPE>
-
-<MIMETYPE>
-<EXT>snd</EXT>
-<MIME>audio/basic</MIME>
-<CMD>SEND</CMD>
-<MANAGER>NONE</MANAGER>
-</MIMETYPE>
-
-<MIMETYPE>
-<EXT>au</EXT>
-<MIME>audio/basic</MIME>
-<CMD>SEND</CMD>
-<MANAGER>NONE</MANAGER>
-</MIMETYPE>
-
-<MIMETYPE>
-<EXT>mp3</EXT>
-<MIME>audio/mpeg</MIME>
-<CMD>SEND</CMD>
-<MANAGER>NONE</MANAGER>
-</MIMETYPE>
-
-<MIMETYPE>
-<EXT>mp2</EXT>
-<MIME>audio/mpeg</MIME>
-<CMD>SEND</CMD>
-<MANAGER>NONE</MANAGER>
-</MIMETYPE>
-
-<MIMETYPE>
-<EXT>mpga</EXT>
-<MIME>audio/mpeg</MIME>
-<CMD>SEND</CMD>
-<MANAGER>NONE</MANAGER>
-</MIMETYPE>
-
-<MIMETYPE>
-<EXT>kar</EXT>
-<MIME>audio/midi</MIME>
-<CMD>SEND</CMD>
-<MANAGER>NONE</MANAGER>
-</MIMETYPE>
-
-<MIMETYPE>
-<EXT>midi</EXT>
-<MIME>audio/midi</MIME>
-<CMD>SEND</CMD>
-<MANAGER>NONE</MANAGER>
-</MIMETYPE>
-
-<MIMETYPE>
-<EXT>mid</EXT>
-<MIME>audio/midi</MIME>
-<CMD>SEND</CMD>
-<MANAGER>NONE</MANAGER>
-</MIMETYPE>
-
-<MIMETYPE>
-<EXT>xls</EXT>
-<MIME>application/vnd.ms-excel</MIME>
-<CMD>SEND</CMD>
-<MANAGER>NONE</MANAGER>
-</MIMETYPE>
-
-<MIMETYPE>
-<EXT>ppt</EXT>
-<MIME>application/vnd.ms-powerpoint</MIME>
-<CMD>SEND</CMD>
-<MANAGER>NONE</MANAGER>
-</MIMETYPE>
-
-<MIMETYPE>
-<EXT>doc</EXT>
-<MIME>application/msword</MIME>
-<CMD>SEND</CMD>
-<MANAGER>NONE</MANAGER>
-</MIMETYPE>
-
-<MIMETYPE>
-<EXT>pdf</EXT>
-<MIME>application/pdf</MIME>
-<CMD>SEND</CMD>
-<MANAGER>NONE</MANAGER>
-</MIMETYPE>
-
-<MIMETYPE>
-<EXT>zip</EXT>
-<MIME>application/zip</MIME>
-<CMD>SEND</CMD>
-<MANAGER>NONE</MANAGER>
-</MIMETYPE>
-
-<MIMETYPE>
-<EXT>css</EXT>
-<MIME>text/css</MIME>
-<CMD>SEND</CMD>
-<MANAGER>NONE</MANAGER>
-</MIMETYPE>
-
-<MIMETYPE>
-<EXT>bmp</EXT>
-<MIME>image/bmp</MIME>
-<CMD>SEND</CMD>
-<MANAGER>NONE</MANAGER>
-</MIMETYPE>
-
-<MIMETYPE>
-<EXT>vrml</EXT>
-<MIME>model/vrml</MIME>
-<CMD>SEND</CMD>
-<MANAGER>NONE</MANAGER>
-</MIMETYPE>
-
-<MIMETYPE>
-<EXT>wrl</EXT>
-<MIME>model/vrml</MIME>
-<CMD>SEND</CMD>
-<MANAGER>NONE</MANAGER>
-</MIMETYPE>
-
-<MIMETYPE>
-<EXT>asc</EXT>
-<MIME>text/html</MIME>
-<CMD>SEND</CMD>
-<MANAGER>NONE</MANAGER>
-</MIMETYPE>
-
-<MIMETYPE>
-<EXT>txt</EXT>
-<MIME>text/plain</MIME>
-<CMD>SEND</CMD>
-<MANAGER>NONE</MANAGER>
-</MIMETYPE>
-
-<MIMETYPE>
-<EXT>link</EXT>
-<MIME>NONE</MIME>
-<CMD>SENDLINK</CMD>
-<MANAGER>NONE</MANAGER>
-</MIMETYPE>
-
-<MIMETYPE>
-<EXT>xml</EXT>
-<MIME>text/xml</MIME>
-<CMD>SEND</CMD>
-<MANAGER>NONE</MANAGER>
-</MIMETYPE>
-
-<MIMETYPE>
-<EXT>jpe</EXT>
-<MIME>image/jpeg</MIME>
-<CMD>SEND</CMD>
-<MANAGER>NONE</MANAGER>
-</MIMETYPE>
-
-<MIMETYPE>
-<EXT>jpeg</EXT>
-<MIME>image/jpeg</MIME>
-<CMD>SEND</CMD>
-<MANAGER>NONE</MANAGER>
-</MIMETYPE>
-
-<MIMETYPE>
-<EXT>jpg</EXT>
-<MIME>image/jpeg</MIME>
-<CMD>SEND</CMD>
-<MANAGER>NONE</MANAGER>
-</MIMETYPE>
-
-<MIMETYPE>
-<EXT>gif</EXT>
-<MIME>image/gif</MIME>
-<CMD>SEND</CMD>
-<MANAGER>NONE</MANAGER>
-</MIMETYPE>
-
-<MIMETYPE>
-<EXT>html</EXT>
-<MIME>text/html</MIME>
-<CMD>SEND</CMD>
-<MANAGER>NONE</MANAGER>
-</MIMETYPE>
-
-</MIMETYPES>
diff --git a/misc/PyGTK_Control/old/MyServer Configure.ico b/misc/PyGTK_Control/old/MyServer Configure.ico
deleted file mode 100755
index d7a0fa1..0000000
Binary files a/misc/PyGTK_Control/old/MyServer Configure.ico and /dev/null differ
diff --git a/misc/PyGTK_Control/old/XMLGui.glade b/misc/PyGTK_Control/old/XMLGui.glade
deleted file mode 100644
index ba9ca8c..0000000
--- a/misc/PyGTK_Control/old/XMLGui.glade
+++ /dev/null
@@ -1,1810 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<!DOCTYPE glade-interface SYSTEM "glade-2.0.dtd">
-<!--*- mode: xml -*-->
-<glade-interface>
-  <widget class="GtkWindow" id="ConfigUI">
-    <property name="visible">True</property>
-    <property name="title" translatable="yes">Myserver configuration tool</property>
-    <property name="resizable">False</property>
-    <property name="icon">MyServer Configure.ico</property>
-    <child>
-      <widget class="GtkVBox" id="vbox1">
-        <property name="visible">True</property>
-        <child>
-          <widget class="GtkVBox" id="vbox2">
-            <property name="visible">True</property>
-            <child>
-              <widget class="GtkMenuBar" id="btn">
-                <property name="visible">True</property>
-                <child>
-                  <widget class="GtkMenuItem" id="menuitem1">
-                    <property name="visible">True</property>
-                    <property name="label" translatable="yes">_File</property>
-                    <property name="use_underline">True</property>
-                    <child>
-                      <widget class="GtkMenu" id="menuitem1_menu">
-                        <child>
-                          <widget class="GtkImageMenuItem" id="imagemenuitem1">
-                            <property name="visible">True</property>
-                            <property name="label">gtk-open</property>
-                            <property name="use_underline">True</property>
-                            <property name="use_stock">True</property>
-                          </widget>
-                        </child>
-                        <child>
-                          <widget class="GtkImageMenuItem" id="_Revert">
-                            <property name="visible">True</property>
-                            <property name="label">gtk-undo</property>
-                            <property name="use_underline">True</property>
-                            <property name="use_stock">True</property>
-                            <signal name="activate" handler="on__Revert_activate"/>
-                          </widget>
-                        </child>
-                        <child>
-                          <widget class="GtkImageMenuItem" id="run1">
-                            <property name="visible">True</property>
-                            <property name="label" translatable="yes">Run</property>
-                            <property name="use_underline">True</property>
-                            <child>
-                              <widget class="GtkMenu" id="run1_menu">
-                                <child>
-                                  <widget class="GtkImageMenuItem" id="as_service">
-                                    <property name="visible">True</property>
-                                    <property name="label" translatable="yes">as Service</property>
-                                    <property name="use_underline">True</property>
-                                    <signal name="activate" handler="on_as_service_activate"/>
-                                    <child internal-child="image">
-                                      <widget class="GtkImage" id="image29">
-                                        <property name="visible">True</property>
-                                        <property name="stock">gtk-missing-image</property>
-                                        <property name="icon_size">1</property>
-                                      </widget>
-                                    </child>
-                                  </widget>
-                                </child>
-                                <child>
-                                  <widget class="GtkImageMenuItem" id="as_console">
-                                    <property name="visible">True</property>
-                                    <property name="label" translatable="yes">as Console</property>
-                                    <property name="use_underline">True</property>
-                                    <signal name="activate" handler="on_as_console_activate"/>
-                                    <child internal-child="image">
-                                      <widget class="GtkImage" id="image30">
-                                        <property name="visible">True</property>
-                                        <property name="stock">gtk-bold</property>
-                                        <property name="icon_size">1</property>
-                                      </widget>
-                                    </child>
-                                  </widget>
-                                </child>
-                              </widget>
-                            </child>
-                            <child internal-child="image">
-                              <widget class="GtkImage" id="image28">
-                                <property name="visible">True</property>
-                                <property name="stock">gtk-media-play</property>
-                                <property name="icon_size">1</property>
-                              </widget>
-                            </child>
-                          </widget>
-                        </child>
-                        <child>
-                          <widget class="GtkImageMenuItem" id="stop1">
-                            <property name="visible">True</property>
-                            <property name="label" translatable="yes">Stop</property>
-                            <property name="use_underline">True</property>
-                            <signal name="activate" handler="on_stop1_activate"/>
-                            <child>
-                              <widget class="GtkMenu" id="stop1_menu">
-                                <child>
-                                  <widget class="GtkImageMenuItem" id="service">
-                                    <property name="visible">True</property>
-                                    <property name="label" translatable="yes">Service</property>
-                                    <property name="use_underline">True</property>
-                                    <signal name="activate" handler="on_service_activate"/>
-                                    <child internal-child="image">
-                                      <widget class="GtkImage" id="image32">
-                                        <property name="visible">True</property>
-                                        <property name="stock">gtk-missing-image</property>
-                                        <property name="icon_size">1</property>
-                                      </widget>
-                                    </child>
-                                  </widget>
-                                </child>
-                                <child>
-                                  <widget class="GtkImageMenuItem" id="console">
-                                    <property name="visible">True</property>
-                                    <property name="label" translatable="yes">Console</property>
-                                    <property name="use_underline">True</property>
-                                    <signal name="activate" handler="on_console_activate"/>
-                                    <child internal-child="image">
-                                      <widget class="GtkImage" id="image33">
-                                        <property name="visible">True</property>
-                                        <property name="stock">gtk-bold</property>
-                                        <property name="icon_size">1</property>
-                                      </widget>
-                                    </child>
-                                  </widget>
-                                </child>
-                              </widget>
-                            </child>
-                            <child internal-child="image">
-                              <widget class="GtkImage" id="image31">
-                                <property name="visible">True</property>
-                                <property name="stock">gtk-stop</property>
-                                <property name="icon_size">1</property>
-                              </widget>
-                            </child>
-                          </widget>
-                        </child>
-                        <child>
-                          <widget class="GtkImageMenuItem" id="save">
-                            <property name="visible">True</property>
-                            <property name="label">gtk-save</property>
-                            <property name="use_underline">True</property>
-                            <property name="use_stock">True</property>
-                            <signal name="activate" handler="on_save_activate"/>
-                          </widget>
-                        </child>
-                      </widget>
-                    </child>
-                  </widget>
-                </child>
-                <child>
-                  <widget class="GtkMenuItem" id="menuitem2">
-                    <property name="visible">True</property>
-                    <property name="label" translatable="yes">Ser_vice</property>
-                    <property name="use_underline">True</property>
-                    <child>
-                      <widget class="GtkMenu" id="menuitem2_menu">
-                        <child>
-                          <widget class="GtkMenuItem" id="imagemenuitem6">
-                            <property name="visible">True</property>
-                            <property name="label" translatable="yes">Install service</property>
-                            <property name="use_underline">True</property>
-                          </widget>
-                        </child>
-                        <child>
-                          <widget class="GtkMenuItem" id="imagemenuitem7">
-                            <property name="visible">True</property>
-                            <property name="label" translatable="yes">Remove service</property>
-                            <property name="use_underline">True</property>
-                          </widget>
-                        </child>
-                      </widget>
-                    </child>
-                  </widget>
-                </child>
-                <child>
-                  <widget class="GtkMenuItem" id="menuitem3">
-                    <property name="visible">True</property>
-                    <property name="label" translatable="yes">Re_mote</property>
-                    <property name="use_underline">True</property>
-                    <child>
-                      <widget class="GtkMenu" id="menuitem3_menu">
-                        <child>
-                          <widget class="GtkImageMenuItem" id="login">
-                            <property name="visible">True</property>
-                            <property name="label" translatable="yes">Login...</property>
-                            <property name="use_underline">True</property>
-                            <signal name="activate" handler="on_login_activate"/>
-                            <child internal-child="image">
-                              <widget class="GtkImage" id="image34">
-                                <property name="visible">True</property>
-                                <property name="stock">gtk-go-forward</property>
-                                <property name="icon_size">1</property>
-                              </widget>
-                            </child>
-                          </widget>
-                        </child>
-                        <child>
-                          <widget class="GtkMenuItem" id="logout">
-                            <property name="visible">True</property>
-                            <property name="label" translatable="yes">Logout</property>
-                            <property name="use_underline">True</property>
-                            <signal name="activate" handler="on_logout_activate"/>
-                          </widget>
-                        </child>
-                        <child>
-                          <widget class="GtkMenuItem" id="get_config">
-                            <property name="visible">True</property>
-                            <property name="label" translatable="yes">Get Config</property>
-                            <property name="use_underline">True</property>
-                            <signal name="activate" handler="on_get_config_activate"/>
-                          </widget>
-                        </child>
-                        <child>
-                          <widget class="GtkMenuItem" id="send_config">
-                            <property name="visible">True</property>
-                            <property name="label" translatable="yes">Send Config</property>
-                            <property name="use_underline">True</property>
-                            <signal name="activate" handler="on_send_config_activate"/>
-                          </widget>
-                        </child>
-                        <child>
-                          <widget class="GtkMenuItem" id="connections">
-                            <property name="visible">True</property>
-                            <property name="label" translatable="yes">Connections...</property>
-                            <property name="use_underline">True</property>
-                            <signal name="activate" handler="on_connections_activate"/>
-                          </widget>
-                        </child>
-                        <child>
-                          <widget class="GtkMenuItem" id="reboot1">
-                            <property name="visible">True</property>
-                            <property name="label" translatable="yes">Reboot..</property>
-                            <property name="use_underline">True</property>
-                            <signal name="activate" handler="on_reboot1_activate"/>
-                          </widget>
-                        </child>
-                      </widget>
-                    </child>
-                  </widget>
-                </child>
-                <child>
-                  <widget class="GtkMenuItem" id="menuitem4">
-                    <property name="visible">True</property>
-                    <property name="label" translatable="yes">_Help</property>
-                    <property name="use_underline">True</property>
-                    <child>
-                      <widget class="GtkMenu" id="menuitem4_menu">
-                        <child>
-                          <widget class="GtkImageMenuItem" id="imagemenuitem10">
-                            <property name="visible">True</property>
-                            <property name="label">gtk-about</property>
-                            <property name="use_underline">True</property>
-                            <property name="use_stock">True</property>
-                          </widget>
-                        </child>
-                      </widget>
-                    </child>
-                  </widget>
-                </child>
-              </widget>
-              <packing>
-                <property name="expand">False</property>
-              </packing>
-            </child>
-            <child>
-              <widget class="GtkNotebook" id="notebook1">
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <child>
-                  <widget class="GtkHPaned" id="hpaned1">
-                    <property name="visible">True</property>
-                    <property name="can_focus">True</property>
-                    <child>
-                      <placeholder/>
-                    </child>
-                    <child>
-                      <widget class="GtkTable" id="table1">
-                        <property name="visible">True</property>
-                        <property name="n_rows">6</property>
-                        <property name="n_columns">2</property>
-                        <child>
-                          <widget class="GtkLabel" id="label7">
-                            <property name="visible">True</property>
-                            <property name="label" translatable="yes">Memory buffer (in bytes):</property>
-                            <property name="justify">GTK_JUSTIFY_RIGHT</property>
-                          </widget>
-                        </child>
-                        <child>
-                          <widget class="GtkLabel" id="label8">
-                            <property name="visible">True</property>
-                            <property name="label" translatable="yes">Verbosity level:</property>
-                            <property name="justify">GTK_JUSTIFY_RIGHT</property>
-                          </widget>
-                          <packing>
-                            <property name="top_attach">1</property>
-                            <property name="bottom_attach">2</property>
-                          </packing>
-                        </child>
-                        <child>
-                          <widget class="GtkLabel" id="label9">
-                            <property name="visible">True</property>
-                            <property name="label" translatable="yes">Max log file size (in bytes):</property>
-                            <property name="justify">GTK_JUSTIFY_RIGHT</property>
-                          </widget>
-                          <packing>
-                            <property name="top_attach">2</property>
-                            <property name="bottom_attach">3</property>
-                          </packing>
-                        </child>
-                        <child>
-                          <widget class="GtkLabel" id="label10">
-                            <property name="visible">True</property>
-                            <property name="label" translatable="yes">Always active threads:</property>
-                            <property name="justify">GTK_JUSTIFY_RIGHT</property>
-                          </widget>
-                          <packing>
-                            <property name="top_attach">3</property>
-                            <property name="bottom_attach">4</property>
-                          </packing>
-                        </child>
-                        <child>
-                          <widget class="GtkLabel" id="label11">
-                            <property name="visible">True</property>
-                            <property name="label" translatable="yes">Maximum number of threads:</property>
-                            <property name="justify">GTK_JUSTIFY_RIGHT</property>
-                          </widget>
-                          <packing>
-                            <property name="top_attach">4</property>
-                            <property name="bottom_attach">5</property>
-                          </packing>
-                        </child>
-                        <child>
-                          <widget class="GtkLabel" id="label12">
-                            <property name="visible">True</property>
-                            <property name="label" translatable="yes">Language:</property>
-                            <property name="justify">GTK_JUSTIFY_RIGHT</property>
-                          </widget>
-                          <packing>
-                            <property name="top_attach">5</property>
-                            <property name="bottom_attach">6</property>
-                          </packing>
-                        </child>
-                        <child>
-                          <widget class="GtkEntry" id="enMemoryBuffer">
-                            <property name="visible">True</property>
-                            <property name="can_focus">True</property>
-                            <property name="text" translatable="yes">102400</property>
-                          </widget>
-                          <packing>
-                            <property name="left_attach">1</property>
-                            <property name="right_attach">2</property>
-                          </packing>
-                        </child>
-                        <child>
-                          <widget class="GtkEntry" id="enMaxLogFileSize">
-                            <property name="visible">True</property>
-                            <property name="can_focus">True</property>
-                            <property name="text" translatable="yes">1048576</property>
-                          </widget>
-                          <packing>
-                            <property name="left_attach">1</property>
-                            <property name="right_attach">2</property>
-                            <property name="top_attach">2</property>
-                            <property name="bottom_attach">3</property>
-                          </packing>
-                        </child>
-                        <child>
-                          <widget class="GtkEntry" id="enAlwysActiveThreads">
-                            <property name="visible">True</property>
-                            <property name="can_focus">True</property>
-                            <property name="text" translatable="yes">5</property>
-                          </widget>
-                          <packing>
-                            <property name="left_attach">1</property>
-                            <property name="right_attach">2</property>
-                            <property name="top_attach">3</property>
-                            <property name="bottom_attach">4</property>
-                          </packing>
-                        </child>
-                        <child>
-                          <widget class="GtkEntry" id="enMaximumNumberOfThreads">
-                            <property name="visible">True</property>
-                            <property name="can_focus">True</property>
-                            <property name="text" translatable="yes">200</property>
-                          </widget>
-                          <packing>
-                            <property name="left_attach">1</property>
-                            <property name="right_attach">2</property>
-                            <property name="top_attach">4</property>
-                            <property name="bottom_attach">5</property>
-                          </packing>
-                        </child>
-                        <child>
-                          <widget class="GtkComboBox" id="cbVerbosityLevel">
-                            <property name="visible">True</property>
-                            <property name="items" translatable="yes">None
-Normal
-Higher
-Highest</property>
-                          </widget>
-                          <packing>
-                            <property name="left_attach">1</property>
-                            <property name="right_attach">2</property>
-                            <property name="top_attach">1</property>
-                            <property name="bottom_attach">2</property>
-                            <property name="y_options"></property>
-                          </packing>
-                        </child>
-                        <child>
-                          <widget class="GtkComboBox" id="combobox2">
-                            <property name="visible">True</property>
-                            <property name="items" translatable="yes">german.xml
-itliano.xml
-russian_koi8r.xml
-brazilian.xml
-french.xml
-russian.xml
-english.xml
-romnaa.xml
-spnish.xml
-
-</property>
-                          </widget>
-                          <packing>
-                            <property name="left_attach">1</property>
-                            <property name="right_attach">2</property>
-                            <property name="top_attach">5</property>
-                            <property name="bottom_attach">6</property>
-                            <property name="y_options"></property>
-                          </packing>
-                        </child>
-                      </widget>
-                      <packing>
-                        <property name="resize">True</property>
-                        <property name="shrink">True</property>
-                      </packing>
-                    </child>
-                  </widget>
-                </child>
-                <child>
-                  <widget class="GtkLabel" id="label1">
-                    <property name="visible">True</property>
-                    <property name="label" translatable="yes">System</property>
-                  </widget>
-                  <packing>
-                    <property name="type">tab</property>
-                    <property name="tab_fill">False</property>
-                  </packing>
-                </child>
-                <child>
-                  <widget class="GtkVBox" id="vbox3">
-                    <property name="visible">True</property>
-                    <child>
-                      <widget class="GtkTable" id="table2">
-                        <property name="visible">True</property>
-                        <property name="n_rows">5</property>
-                        <property name="n_columns">3</property>
-                        <child>
-                          <placeholder/>
-                        </child>
-                        <child>
-                          <placeholder/>
-                        </child>
-                        <child>
-                          <placeholder/>
-                        </child>
-                        <child>
-                          <placeholder/>
-                        </child>
-                        <child>
-                          <placeholder/>
-                        </child>
-                        <child>
-                          <widget class="GtkFileChooserButton" id="filechooserbutton1">
-                            <property name="visible">True</property>
-                            <property name="title" translatable="yes">Browse..</property>
-                            <property name="width_chars">7</property>
-                            <signal name="file_set" handler="on_filechooserbutton1_file_set"/>
-                          </widget>
-                          <packing>
-                            <property name="left_attach">2</property>
-                            <property name="right_attach">3</property>
-                            <property name="top_attach">3</property>
-                            <property name="bottom_attach">4</property>
-                          </packing>
-                        </child>
-                        <child>
-                          <widget class="GtkCheckButton" id="checkbutton1">
-                            <property name="visible">True</property>
-                            <property name="can_focus">True</property>
-                            <property name="label" translatable="yes">Personalized error pages:</property>
-                            <property name="use_underline">True</property>
-                            <property name="response_id">0</property>
-                            <property name="draw_indicator">True</property>
-                          </widget>
-                          <packing>
-                            <property name="left_attach">1</property>
-                            <property name="right_attach">2</property>
-                            <property name="top_attach">4</property>
-                            <property name="bottom_attach">5</property>
-                          </packing>
-                        </child>
-                        <child>
-                          <widget class="GtkEntry" id="enStylesheet">
-                            <property name="visible">True</property>
-                            <property name="can_focus">True</property>
-                            <property name="text" translatable="yes">/sys/css/browsestyle.css</property>
-                          </widget>
-                          <packing>
-                            <property name="left_attach">1</property>
-                            <property name="right_attach">2</property>
-                            <property name="top_attach">3</property>
-                            <property name="bottom_attach">4</property>
-                          </packing>
-                        </child>
-                        <child>
-                          <widget class="GtkEntry" id="enGzipCompressionThreshold">
-                            <property name="visible">True</property>
-                            <property name="can_focus">True</property>
-                            <property name="text" translatable="yes">1048576</property>
-                          </widget>
-                          <packing>
-                            <property name="left_attach">1</property>
-                            <property name="right_attach">2</property>
-                            <property name="top_attach">2</property>
-                            <property name="bottom_attach">3</property>
-                          </packing>
-                        </child>
-                        <child>
-                          <widget class="GtkEntry" id="enMaxConnections">
-                            <property name="visible">True</property>
-                            <property name="can_focus">True</property>
-                            <property name="text" translatable="yes">0</property>
-                          </widget>
-                          <packing>
-                            <property name="left_attach">1</property>
-                            <property name="right_attach">2</property>
-                            <property name="top_attach">1</property>
-                            <property name="bottom_attach">2</property>
-                          </packing>
-                        </child>
-                        <child>
-                          <widget class="GtkEntry" id="enConnectionTimeOut">
-                            <property name="visible">True</property>
-                            <property name="can_focus">True</property>
-                            <property name="text" translatable="yes">60</property>
-                          </widget>
-                          <packing>
-                            <property name="left_attach">1</property>
-                            <property name="right_attach">2</property>
-                          </packing>
-                        </child>
-                        <child>
-                          <widget class="GtkLabel" id="label16">
-                            <property name="visible">True</property>
-                            <property name="label" translatable="yes">Stylesheet</property>
-                          </widget>
-                          <packing>
-                            <property name="top_attach">3</property>
-                            <property name="bottom_attach">4</property>
-                          </packing>
-                        </child>
-                        <child>
-                          <widget class="GtkLabel" id="label15">
-                            <property name="visible">True</property>
-                            <property name="label" translatable="yes">Gzip compression threshold (in bytes):</property>
-                          </widget>
-                          <packing>
-                            <property name="top_attach">2</property>
-                            <property name="bottom_attach">3</property>
-                          </packing>
-                        </child>
-                        <child>
-                          <widget class="GtkLabel" id="label14">
-                            <property name="visible">True</property>
-                            <property name="label" translatable="yes">Max connections:</property>
-                          </widget>
-                          <packing>
-                            <property name="top_attach">1</property>
-                            <property name="bottom_attach">2</property>
-                          </packing>
-                        </child>
-                        <child>
-                          <widget class="GtkLabel" id="label13">
-                            <property name="visible">True</property>
-                            <property name="label" translatable="yes">Connection time-out (in sec):</property>
-                          </widget>
-                        </child>
-                      </widget>
-                    </child>
-                    <child>
-                      <widget class="GtkVBox" id="vbox4">
-                        <property name="visible">True</property>
-                        <child>
-                          <placeholder/>
-                        </child>
-                        <child>
-                          <widget class="GtkHBox" id="hbox1">
-                            <property name="visible">True</property>
-                            <child>
-                              <widget class="GtkTreeView" id="treeview1">
-                                <property name="visible">True</property>
-                                <property name="can_focus">True</property>
-                                <property name="extension_events">GDK_EXTENSION_EVENTS_CURSOR</property>
-                                <property name="headers_visible">False</property>
-                              </widget>
-                            </child>
-                            <child>
-                              <widget class="GtkVBox" id="vbox5">
-                                <property name="visible">True</property>
-                                <child>
-                                  <widget class="GtkButton" id="btnAddFileName">
-                                    <property name="visible">True</property>
-                                    <property name="can_focus">True</property>
-                                    <property name="label">gtk-add</property>
-                                    <property name="use_stock">True</property>
-                                    <property name="response_id">0</property>
-                                    <signal name="clicked" handler="on_btnAddFileName_clicked"/>
-                                  </widget>
-                                  <packing>
-                                    <property name="expand">False</property>
-                                    <property name="fill">False</property>
-                                  </packing>
-                                </child>
-                                <child>
-                                  <widget class="GtkButton" id="btnRemoveFileName">
-                                    <property name="visible">True</property>
-                                    <property name="can_focus">True</property>
-                                    <property name="label">gtk-remove</property>
-                                    <property name="use_stock">True</property>
-                                    <property name="response_id">0</property>
-                                    <signal name="clicked" handler="on_btnRemoveFileName_clicked"/>
-                                  </widget>
-                                  <packing>
-                                    <property name="expand">False</property>
-                                    <property name="fill">False</property>
-                                    <property name="position">1</property>
-                                  </packing>
-                                </child>
-                              </widget>
-                              <packing>
-                                <property name="position">1</property>
-                              </packing>
-                            </child>
-                          </widget>
-                          <packing>
-                            <property name="position">1</property>
-                          </packing>
-                        </child>
-                      </widget>
-                      <packing>
-                        <property name="position">1</property>
-                      </packing>
-                    </child>
-                  </widget>
-                  <packing>
-                    <property name="position">1</property>
-                  </packing>
-                </child>
-                <child>
-                  <widget class="GtkLabel" id="label2">
-                    <property name="visible">True</property>
-                    <property name="label" translatable="yes">Server</property>
-                  </widget>
-                  <packing>
-                    <property name="type">tab</property>
-                    <property name="position">1</property>
-                    <property name="tab_fill">False</property>
-                  </packing>
-                </child>
-                <child>
-                  <widget class="GtkHBox" id="hbox2">
-                    <property name="visible">True</property>
-                    <child>
-                      <widget class="GtkVBox" id="vbox6">
-                        <property name="visible">True</property>
-                        <child>
-                          <widget class="GtkScrolledWindow" id="scrolledwindow1">
-                            <property name="visible">True</property>
-                            <property name="can_focus">True</property>
-                            <property name="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
-                            <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
-                            <child>
-                              <widget class="GtkTreeView" id="treeview2">
-                                <property name="height_request">300</property>
-                                <property name="visible">True</property>
-                                <property name="can_focus">True</property>
-                                <property name="enable_grid_lines">GTK_TREE_VIEW_GRID_LINES_HORIZONTAL</property>
-                              </widget>
-                            </child>
-                          </widget>
-                          <packing>
-                            <property name="fill">False</property>
-                          </packing>
-                        </child>
-                        <child>
-                          <widget class="GtkButton" id="btnAddMIMEExtenesion">
-                            <property name="visible">True</property>
-                            <property name="can_focus">True</property>
-                            <property name="label">gtk-add</property>
-                            <property name="use_stock">True</property>
-                            <property name="response_id">0</property>
-                            <signal name="clicked" handler="on_btnAddMIMEExtenesion_clicked"/>
-                          </widget>
-                          <packing>
-                            <property name="expand">False</property>
-                            <property name="fill">False</property>
-                            <property name="position">1</property>
-                          </packing>
-                        </child>
-                        <child>
-                          <widget class="GtkButton" id="btnRemoveMIMEExtension">
-                            <property name="visible">True</property>
-                            <property name="can_focus">True</property>
-                            <property name="label">gtk-remove</property>
-                            <property name="use_stock">True</property>
-                            <property name="response_id">0</property>
-                            <signal name="clicked" handler="on_btnRemoveMIMEExtension_clicked"/>
-                          </widget>
-                          <packing>
-                            <property name="expand">False</property>
-                            <property name="fill">False</property>
-                            <property name="position">2</property>
-                          </packing>
-                        </child>
-                      </widget>
-                    </child>
-                    <child>
-                      <widget class="GtkTable" id="table3">
-                        <property name="visible">True</property>
-                        <property name="n_rows">5</property>
-                        <property name="n_columns">2</property>
-                        <child>
-                          <placeholder/>
-                        </child>
-                        <child>
-                          <placeholder/>
-                        </child>
-                        <child>
-                          <widget class="GtkButton" id="btnAddMIMEType">
-                            <property name="visible">True</property>
-                            <property name="can_focus">True</property>
-                            <property name="label">gtk-add</property>
-                            <property name="use_stock">True</property>
-                            <property name="response_id">0</property>
-                            <signal name="clicked" handler="on_btnAddMIMEType_clicked"/>
-                          </widget>
-                          <packing>
-                            <property name="left_attach">1</property>
-                            <property name="right_attach">2</property>
-                            <property name="top_attach">1</property>
-                            <property name="bottom_attach">2</property>
-                            <property name="x_options"></property>
-                            <property name="y_options"></property>
-                          </packing>
-                        </child>
-                        <child>
-                          <widget class="GtkFileChooserButton" id="filechooserbutton2">
-                            <property name="visible">True</property>
-                            <property name="title" translatable="yes">Browse..</property>
-                            <property name="width_chars">7</property>
-                            <signal name="file_set" handler="on_filechooserbutton2_file_set"/>
-                          </widget>
-                          <packing>
-                            <property name="top_attach">4</property>
-                            <property name="bottom_attach">5</property>
-                            <property name="x_options"></property>
-                            <property name="y_options"></property>
-                          </packing>
-                        </child>
-                        <child>
-                          <widget class="GtkLabel" id="label19">
-                            <property name="visible">True</property>
-                            <property name="label" translatable="yes">MIME Type:</property>
-                          </widget>
-                        </child>
-                        <child>
-                          <widget class="GtkComboBox" id="combobox3">
-                            <property name="visible">True</property>
-                            <property name="active">0</property>
-                          </widget>
-                          <packing>
-                            <property name="left_attach">1</property>
-                            <property name="right_attach">2</property>
-                            <property name="y_options"></property>
-                          </packing>
-                        </child>
-                        <child>
-                          <widget class="GtkLabel" id="label20">
-                            <property name="visible">True</property>
-                            <property name="label" translatable="yes">Action:</property>
-                          </widget>
-                          <packing>
-                            <property name="top_attach">2</property>
-                            <property name="bottom_attach">3</property>
-                          </packing>
-                        </child>
-                        <child>
-                          <widget class="GtkComboBox" id="cbAction">
-                            <property name="visible">True</property>
-                            <property name="row_span_column">1</property>
-                            <property name="active">0</property>
-                            <property name="items" translatable="yes">Send the file
-URL link
-Run as CGI
-Run as FastCGI
-Run as SCGI
-Run as ISAPI
-Run as MSCGI
-Run as WINCGI
-Execute
-Execute as an ISAPI module
-Execute self contined FastCGI
-Run self contained SCGI</property>
-                          </widget>
-                          <packing>
-                            <property name="left_attach">1</property>
-                            <property name="right_attach">2</property>
-                            <property name="top_attach">2</property>
-                            <property name="bottom_attach">3</property>
-                            <property name="y_options"></property>
-                          </packing>
-                        </child>
-                        <child>
-                          <widget class="GtkLabel" id="label21">
-                            <property name="visible">True</property>
-                            <property name="label" translatable="yes">Manager:</property>
-                          </widget>
-                          <packing>
-                            <property name="top_attach">3</property>
-                            <property name="bottom_attach">4</property>
-                          </packing>
-                        </child>
-                        <child>
-                          <widget class="GtkEntry" id="enManager">
-                            <property name="visible">True</property>
-                            <property name="can_focus">True</property>
-                            <property name="text" translatable="yes">NONE</property>
-                          </widget>
-                          <packing>
-                            <property name="left_attach">1</property>
-                            <property name="right_attach">2</property>
-                            <property name="top_attach">3</property>
-                            <property name="bottom_attach">4</property>
-                          </packing>
-                        </child>
-                      </widget>
-                      <packing>
-                        <property name="position">1</property>
-                      </packing>
-                    </child>
-                  </widget>
-                  <packing>
-                    <property name="position">2</property>
-                  </packing>
-                </child>
-                <child>
-                  <widget class="GtkLabel" id="label3">
-                    <property name="visible">True</property>
-                    <property name="label" translatable="yes">MIME</property>
-                  </widget>
-                  <packing>
-                    <property name="type">tab</property>
-                    <property name="position">2</property>
-                    <property name="tab_fill">False</property>
-                  </packing>
-                </child>
-                <child>
-                  <widget class="GtkVBox" id="vbox7">
-                    <property name="visible">True</property>
-                    <child>
-                      <widget class="GtkHBox" id="hbox4">
-                        <property name="height_request">30</property>
-                        <property name="visible">True</property>
-                        <property name="homogeneous">True</property>
-                        <child>
-                          <widget class="GtkVBox" id="vbox13">
-                            <property name="visible">True</property>
-                            <child>
-                              <widget class="GtkLabel" id="label23">
-                                <property name="width_request">100</property>
-                                <property name="height_request">20</property>
-                                <property name="visible">True</property>
-                                <property name="xpad">1</property>
-                                <property name="ypad">5</property>
-                                <property name="label" translatable="yes">Name:</property>
-                                <property name="single_line_mode">True</property>
-                              </widget>
-                            </child>
-                            <child>
-                              <placeholder/>
-                            </child>
-                          </widget>
-                        </child>
-                        <child>
-                          <placeholder/>
-                        </child>
-                        <child>
-                          <widget class="GtkVBox" id="vbox11">
-                            <property name="visible">True</property>
-                            <property name="spacing">3</property>
-                            <property name="homogeneous">True</property>
-                            <child>
-                              <widget class="GtkComboBox" id="combobox5">
-                                <property name="height_request">20</property>
-                                <property name="visible">True</property>
-                                <property name="has_frame">False</property>
-                              </widget>
-                            </child>
-                            <child>
-                              <placeholder/>
-                            </child>
-                          </widget>
-                          <packing>
-                            <property name="expand">False</property>
-                            <property name="padding">3</property>
-                            <property name="position">2</property>
-                          </packing>
-                        </child>
-                        <child>
-                          <widget class="GtkVBox" id="vbox14">
-                            <property name="visible">True</property>
-                            <child>
-                              <widget class="GtkButton" id="btnAddHostName">
-                                <property name="height_request">20</property>
-                                <property name="visible">True</property>
-                                <property name="can_focus">True</property>
-                                <property name="label">gtk-add</property>
-                                <property name="use_stock">True</property>
-                                <property name="response_id">0</property>
-                                <signal name="clicked" handler="on_btnAddHostName_clicked"/>
-                              </widget>
-                            </child>
-                            <child>
-                              <placeholder/>
-                            </child>
-                          </widget>
-                          <packing>
-                            <property name="position">3</property>
-                          </packing>
-                        </child>
-                        <child>
-                          <widget class="GtkVBox" id="vbox10">
-                            <property name="visible">True</property>
-                            <property name="homogeneous">True</property>
-                            <child>
-                              <widget class="GtkButton" id="btnRemoveHostName">
-                                <property name="height_request">20</property>
-                                <property name="visible">True</property>
-                                <property name="can_focus">True</property>
-                                <property name="label">gtk-remove</property>
-                                <property name="use_stock">True</property>
-                                <property name="response_id">0</property>
-                                <signal name="clicked" handler="on_btnRemoveHostName_clicked"/>
-                              </widget>
-                            </child>
-                            <child>
-                              <placeholder/>
-                            </child>
-                          </widget>
-                          <packing>
-                            <property name="expand">False</property>
-                            <property name="position">4</property>
-                          </packing>
-                        </child>
-                      </widget>
-                      <packing>
-                        <property name="fill">False</property>
-                      </packing>
-                    </child>
-                    <child>
-                      <widget class="GtkHSeparator" id="hseparator1">
-                        <property name="visible">True</property>
-                      </widget>
-                      <packing>
-                        <property name="expand">False</property>
-                        <property name="position">1</property>
-                      </packing>
-                    </child>
-                    <child>
-                      <widget class="GtkNotebook" id="notebook2">
-                        <property name="visible">True</property>
-                        <property name="can_focus">True</property>
-                        <child>
-                          <widget class="GtkVBox" id="vbox22">
-                            <property name="visible">True</property>
-                            <child>
-                              <widget class="GtkHBox" id="hbox14">
-                                <property name="visible">True</property>
-                                <property name="homogeneous">True</property>
-                                <child>
-                                  <widget class="GtkLabel" id="label36">
-                                    <property name="visible">True</property>
-                                    <property name="label" translatable="yes">Protocol:</property>
-                                  </widget>
-                                </child>
-                                <child>
-                                  <widget class="GtkComboBox" id="ddProtocol">
-                                    <property name="visible">True</property>
-                                    <property name="items">HTTP
-FTP
-</property>
-                                  </widget>
-                                  <packing>
-                                    <property name="position">1</property>
-                                  </packing>
-                                </child>
-                                <child>
-                                  <placeholder/>
-                                </child>
-                              </widget>
-                            </child>
-                            <child>
-                              <widget class="GtkHBox" id="hbox15">
-                                <property name="visible">True</property>
-                                <property name="homogeneous">True</property>
-                                <child>
-                                  <widget class="GtkLabel" id="label37">
-                                    <property name="visible">True</property>
-                                    <property name="label" translatable="yes">SSL Private Key:</property>
-                                  </widget>
-                                </child>
-                                <child>
-                                  <widget class="GtkFileChooserButton" id="filechooserbutton5">
-                                    <property name="visible">True</property>
-                                    <property name="preview_widget_active">False</property>
-                                  </widget>
-                                  <packing>
-                                    <property name="expand">False</property>
-                                    <property name="position">1</property>
-                                  </packing>
-                                </child>
-                                <child>
-                                  <placeholder/>
-                                </child>
-                              </widget>
-                              <packing>
-                                <property name="position">1</property>
-                              </packing>
-                            </child>
-                            <child>
-                              <widget class="GtkHBox" id="hbox16">
-                                <property name="visible">True</property>
-                                <property name="homogeneous">True</property>
-                                <child>
-                                  <widget class="GtkLabel" id="label38">
-                                    <property name="visible">True</property>
-                                    <property name="label" translatable="yes">SSL Certyfikate:</property>
-                                  </widget>
-                                </child>
-                                <child>
-                                  <widget class="GtkFileChooserButton" id="filechooserbutton6">
-                                    <property name="visible">True</property>
-                                    <property name="preview_widget_active">False</property>
-                                  </widget>
-                                  <packing>
-                                    <property name="expand">False</property>
-                                    <property name="position">1</property>
-                                  </packing>
-                                </child>
-                                <child>
-                                  <placeholder/>
-                                </child>
-                              </widget>
-                              <packing>
-                                <property name="position">2</property>
-                              </packing>
-                            </child>
-                            <child>
-                              <widget class="GtkHBox" id="hbox17">
-                                <property name="visible">True</property>
-                                <property name="homogeneous">True</property>
-                                <child>
-                                  <widget class="GtkLabel" id="label39">
-                                    <property name="visible">True</property>
-                                    <property name="label" translatable="yes">SSL Password:</property>
-                                  </widget>
-                                </child>
-                                <child>
-                                  <widget class="GtkEntry" id="enPassword">
-                                    <property name="visible">True</property>
-                                    <property name="can_focus">True</property>
-                                  </widget>
-                                  <packing>
-                                    <property name="position">1</property>
-                                  </packing>
-                                </child>
-                                <child>
-                                  <placeholder/>
-                                </child>
-                              </widget>
-                              <packing>
-                                <property name="position">3</property>
-                              </packing>
-                            </child>
-                          </widget>
-                        </child>
-                        <child>
-                          <widget class="GtkLabel" id="label24">
-                            <property name="visible">True</property>
-                            <property name="label" translatable="yes">Protocol</property>
-                          </widget>
-                          <packing>
-                            <property name="type">tab</property>
-                            <property name="tab_fill">False</property>
-                          </packing>
-                        </child>
-                        <child>
-                          <widget class="GtkHBox" id="hbox3">
-                            <property name="visible">True</property>
-                            <child>
-                              <widget class="GtkVBox" id="vbox12">
-                                <property name="visible">True</property>
-                                <child>
-                                  <widget class="GtkTreeView" id="treeviewHost">
-                                    <property name="visible">True</property>
-                                    <property name="app_paintable">True</property>
-                                    <property name="can_focus">True</property>
-                                    <property name="headers_clickable">True</property>
-                                  </widget>
-                                </child>
-                                <child>
-                                  <widget class="GtkHSeparator" id="hseparator2">
-                                    <property name="visible">True</property>
-                                  </widget>
-                                  <packing>
-                                    <property name="expand">False</property>
-                                    <property name="position">1</property>
-                                  </packing>
-                                </child>
-                                <child>
-                                  <widget class="GtkHBox" id="hbox8">
-                                    <property name="visible">True</property>
-                                    <property name="homogeneous">True</property>
-                                    <child>
-                                      <widget class="GtkButton" id="btnAddHost">
-                                        <property name="visible">True</property>
-                                        <property name="can_focus">True</property>
-                                        <property name="receives_default">True</property>
-                                        <property name="label" translatable="yes">Add..</property>
-                                        <property name="response_id">0</property>
-                                        <signal name="clicked" handler="on_btnAddHost_clicked"/>
-                                      </widget>
-                                    </child>
-                                    <child>
-                                      <widget class="GtkButton" id="btnRemoveHost">
-                                        <property name="visible">True</property>
-                                        <property name="can_focus">True</property>
-                                        <property name="receives_default">True</property>
-                                        <property name="label" translatable="yes">Remove</property>
-                                        <property name="response_id">0</property>
-                                        <signal name="clicked" handler="on_btnRemoveHost_clicked"/>
-                                      </widget>
-                                      <packing>
-                                        <property name="pack_type">GTK_PACK_END</property>
-                                        <property name="position">1</property>
-                                      </packing>
-                                    </child>
-                                  </widget>
-                                  <packing>
-                                    <property name="position">2</property>
-                                  </packing>
-                                </child>
-                              </widget>
-                            </child>
-                            <child>
-                              <widget class="GtkVBox" id="vbox15">
-                                <property name="visible">True</property>
-                                <child>
-                                  <widget class="GtkTreeView" id="treeviewIP">
-                                    <property name="visible">True</property>
-                                    <property name="can_focus">True</property>
-                                    <property name="headers_clickable">True</property>
-                                  </widget>
-                                </child>
-                                <child>
-                                  <widget class="GtkHSeparator" id="hseparator3">
-                                    <property name="visible">True</property>
-                                  </widget>
-                                  <packing>
-                                    <property name="expand">False</property>
-                                    <property name="position">1</property>
-                                  </packing>
-                                </child>
-                                <child>
-                                  <widget class="GtkHBox" id="hbox9">
-                                    <property name="visible">True</property>
-                                    <property name="homogeneous">True</property>
-                                    <child>
-                                      <widget class="GtkButton" id="btnAddIP">
-                                        <property name="visible">True</property>
-                                        <property name="can_focus">True</property>
-                                        <property name="receives_default">True</property>
-                                        <property name="label" translatable="yes">Add..</property>
-                                        <property name="response_id">0</property>
-                                        <signal name="clicked" handler="on_btnAddIP_clicked"/>
-                                      </widget>
-                                      <packing>
-                                        <property name="expand">False</property>
-                                      </packing>
-                                    </child>
-                                    <child>
-                                      <widget class="GtkButton" id="btnRemoveIP">
-                                        <property name="visible">True</property>
-                                        <property name="can_focus">True</property>
-                                        <property name="receives_default">True</property>
-                                        <property name="label" translatable="yes">Remove</property>
-                                        <property name="response_id">0</property>
-                                        <signal name="clicked" handler="on_btnRemoveIP_clicked"/>
-                                      </widget>
-                                      <packing>
-                                        <property name="expand">False</property>
-                                        <property name="position">1</property>
-                                      </packing>
-                                    </child>
-                                  </widget>
-                                  <packing>
-                                    <property name="position">2</property>
-                                  </packing>
-                                </child>
-                              </widget>
-                              <packing>
-                                <property name="position">1</property>
-                              </packing>
-                            </child>
-                            <child>
-                              <widget class="GtkHBox" id="hbox10">
-                                <property name="visible">True</property>
-                                <child>
-                                  <widget class="GtkVBox" id="vbox16">
-                                    <property name="visible">True</property>
-                                    <child>
-                                      <widget class="GtkLabel" id="label34">
-                                        <property name="visible">True</property>
-                                        <property name="label" translatable="yes">Port:</property>
-                                      </widget>
-                                    </child>
-                                    <child>
-                                      <placeholder/>
-                                    </child>
-                                  </widget>
-                                </child>
-                                <child>
-                                  <widget class="GtkVBox" id="vbox17">
-                                    <property name="visible">True</property>
-                                    <child>
-                                      <widget class="GtkEntry" id="enPortNumber">
-                                        <property name="visible">True</property>
-                                        <property name="can_focus">True</property>
-                                        <property name="max_length">5</property>
-                                        <property name="text" translatable="yes">8080</property>
-                                      </widget>
-                                    </child>
-                                    <child>
-                                      <placeholder/>
-                                    </child>
-                                  </widget>
-                                  <packing>
-                                    <property name="position">1</property>
-                                  </packing>
-                                </child>
-                              </widget>
-                              <packing>
-                                <property name="position">2</property>
-                              </packing>
-                            </child>
-                          </widget>
-                          <packing>
-                            <property name="position">1</property>
-                          </packing>
-                        </child>
-                        <child>
-                          <widget class="GtkLabel" id="label25">
-                            <property name="visible">True</property>
-                            <property name="label" translatable="yes">Arpa</property>
-                          </widget>
-                          <packing>
-                            <property name="type">tab</property>
-                            <property name="position">1</property>
-                            <property name="tab_fill">False</property>
-                          </packing>
-                        </child>
-                        <child>
-                          <widget class="GtkVBox" id="vbox18">
-                            <property name="visible">True</property>
-                            <child>
-                              <widget class="GtkLabel" id="label18">
-                                <property name="visible">True</property>
-                                <property name="label" translatable="yes">Enable:</property>
-                              </widget>
-                              <packing>
-                                <property name="expand">False</property>
-                                <property name="fill">False</property>
-                              </packing>
-                            </child>
-                            <child>
-                              <widget class="GtkHBox" id="hbox11">
-                                <property name="visible">True</property>
-                                <child>
-                                  <widget class="GtkVBox" id="vbox19">
-                                    <property name="visible">True</property>
-                                    <child>
-                                      <widget class="GtkCheckButton" id="checkbutton8">
-                                        <property name="visible">True</property>
-                                        <property name="can_focus">True</property>
-                                        <property name="label" translatable="yes">CGI</property>
-                                        <property name="response_id">0</property>
-                                        <property name="draw_indicator">True</property>
-                                      </widget>
-                                    </child>
-                                    <child>
-                                      <widget class="GtkCheckButton" id="checkbutton9">
-                                        <property name="visible">True</property>
-                                        <property name="can_focus">True</property>
-                                        <property name="label" translatable="yes">ISAPI</property>
-                                        <property name="response_id">0</property>
-                                        <property name="draw_indicator">True</property>
-                                      </widget>
-                                      <packing>
-                                        <property name="position">1</property>
-                                      </packing>
-                                    </child>
-                                    <child>
-                                      <widget class="GtkCheckButton" id="checkbutton10">
-                                        <property name="visible">True</property>
-                                        <property name="can_focus">True</property>
-                                        <property name="label" translatable="yes">MSCGI</property>
-                                        <property name="response_id">0</property>
-                                        <property name="draw_indicator">True</property>
-                                      </widget>
-                                      <packing>
-                                        <property name="position">2</property>
-                                      </packing>
-                                    </child>
-                                    <child>
-                                      <widget class="GtkCheckButton" id="checkbutton11">
-                                        <property name="visible">True</property>
-                                        <property name="can_focus">True</property>
-                                        <property name="label" translatable="yes">WINCGI</property>
-                                        <property name="response_id">0</property>
-                                        <property name="draw_indicator">True</property>
-                                      </widget>
-                                      <packing>
-                                        <property name="position">3</property>
-                                      </packing>
-                                    </child>
-                                    <child>
-                                      <widget class="GtkCheckButton" id="checkbutton12">
-                                        <property name="visible">True</property>
-                                        <property name="can_focus">True</property>
-                                        <property name="label" translatable="yes">FASTCGI</property>
-                                        <property name="response_id">0</property>
-                                        <property name="draw_indicator">True</property>
-                                      </widget>
-                                      <packing>
-                                        <property name="position">4</property>
-                                      </packing>
-                                    </child>
-                                  </widget>
-                                </child>
-                                <child>
-                                  <widget class="GtkVBox" id="vbox20">
-                                    <property name="visible">True</property>
-                                    <child>
-                                      <widget class="GtkCheckButton" id="checkbutton13">
-                                        <property name="visible">True</property>
-                                        <property name="can_focus">True</property>
-                                        <property name="label" translatable="yes">SCGI</property>
-                                        <property name="response_id">0</property>
-                                        <property name="draw_indicator">True</property>
-                                      </widget>
-                                    </child>
-                                    <child>
-                                      <widget class="GtkCheckButton" id="checkbutton14">
-                                        <property name="visible">True</property>
-                                        <property name="can_focus">True</property>
-                                        <property name="label" translatable="yes">SEND LINK</property>
-                                        <property name="response_id">0</property>
-                                        <property name="draw_indicator">True</property>
-                                      </widget>
-                                      <packing>
-                                        <property name="position">1</property>
-                                      </packing>
-                                    </child>
-                                    <child>
-                                      <widget class="GtkCheckButton" id="checkbutton15">
-                                        <property name="visible">True</property>
-                                        <property name="can_focus">True</property>
-                                        <property name="label" translatable="yes">EXTERNAL COMMANDS</property>
-                                        <property name="response_id">0</property>
-                                        <property name="draw_indicator">True</property>
-                                      </widget>
-                                      <packing>
-                                        <property name="position">2</property>
-                                      </packing>
-                                    </child>
-                                    <child>
-                                      <widget class="GtkCheckButton" id="checkbutton16">
-                                        <property name="visible">True</property>
-                                        <property name="can_focus">True</property>
-                                        <property name="label" translatable="yes">SEND FILE</property>
-                                        <property name="response_id">0</property>
-                                        <property name="draw_indicator">True</property>
-                                      </widget>
-                                      <packing>
-                                        <property name="position">3</property>
-                                      </packing>
-                                    </child>
-                                    <child>
-                                      <placeholder/>
-                                    </child>
-                                  </widget>
-                                  <packing>
-                                    <property name="position">1</property>
-                                  </packing>
-                                </child>
-                              </widget>
-                              <packing>
-                                <property name="position">1</property>
-                              </packing>
-                            </child>
-                          </widget>
-                          <packing>
-                            <property name="position">2</property>
-                          </packing>
-                        </child>
-                        <child>
-                          <widget class="GtkLabel" id="label26">
-                            <property name="visible">True</property>
-                            <property name="label" translatable="yes">HTTP Services</property>
-                          </widget>
-                          <packing>
-                            <property name="type">tab</property>
-                            <property name="position">2</property>
-                            <property name="tab_fill">False</property>
-                          </packing>
-                        </child>
-                        <child>
-                          <widget class="GtkVBox" id="vbox21">
-                            <property name="visible">True</property>
-                            <child>
-                              <widget class="GtkHBox" id="hbox12">
-                                <property name="visible">True</property>
-                                <child>
-                                  <widget class="GtkLabel" id="label22">
-                                    <property name="visible">True</property>
-                                    <property name="label" translatable="yes">Documment root:</property>
-                                  </widget>
-                                </child>
-                                <child>
-                                  <placeholder/>
-                                </child>
-                                <child>
-                                  <widget class="GtkFileChooserButton" id="filechooserbutton3">
-                                    <property name="visible">True</property>
-                                    <property name="action">GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER</property>
-                                  </widget>
-                                  <packing>
-                                    <property name="expand">False</property>
-                                    <property name="fill">False</property>
-                                    <property name="position">2</property>
-                                  </packing>
-                                </child>
-                              </widget>
-                            </child>
-                            <child>
-                              <widget class="GtkHBox" id="hbox13">
-                                <property name="visible">True</property>
-                                <child>
-                                  <widget class="GtkLabel" id="label35">
-                                    <property name="visible">True</property>
-                                    <property name="label" translatable="yes">System folder:</property>
-                                  </widget>
-                                </child>
-                                <child>
-                                  <placeholder/>
-                                </child>
-                                <child>
-                                  <widget class="GtkFileChooserButton" id="filechooserbutton4">
-                                    <property name="visible">True</property>
-                                    <property name="action">GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER</property>
-                                  </widget>
-                                  <packing>
-                                    <property name="expand">False</property>
-                                    <property name="fill">False</property>
-                                    <property name="position">2</property>
-                                  </packing>
-                                </child>
-                              </widget>
-                              <packing>
-                                <property name="position">1</property>
-                              </packing>
-                            </child>
-                          </widget>
-                          <packing>
-                            <property name="position">3</property>
-                          </packing>
-                        </child>
-                        <child>
-                          <widget class="GtkLabel" id="label27">
-                            <property name="visible">True</property>
-                            <property name="label" translatable="yes">Directories</property>
-                          </widget>
-                          <packing>
-                            <property name="type">tab</property>
-                            <property name="position">3</property>
-                            <property name="tab_fill">False</property>
-                          </packing>
-                        </child>
-                        <child>
-                          <widget class="GtkVBox" id="vbox9">
-                            <property name="visible">True</property>
-                            <child>
-                              <widget class="GtkHBox" id="hbox6">
-                                <property name="visible">True</property>
-                                <child>
-                                  <widget class="GtkLabel" id="label32">
-                                    <property name="visible">True</property>
-                                    <property name="label" translatable="yes">Accesses log file:</property>
-                                  </widget>
-                                </child>
-                                <child>
-                                  <widget class="GtkEntry" id="entry13">
-                                    <property name="visible">True</property>
-                                    <property name="can_focus">True</property>
-                                  </widget>
-                                  <packing>
-                                    <property name="position">1</property>
-                                  </packing>
-                                </child>
-                              </widget>
-                            </child>
-                            <child>
-                              <widget class="GtkHBox" id="hbox7">
-                                <property name="visible">True</property>
-                                <child>
-                                  <widget class="GtkLabel" id="label33">
-                                    <property name="visible">True</property>
-                                    <property name="label" translatable="yes">Wrning log file:</property>
-                                  </widget>
-                                </child>
-                                <child>
-                                  <widget class="GtkEntry" id="entry14">
-                                    <property name="visible">True</property>
-                                    <property name="can_focus">True</property>
-                                  </widget>
-                                  <packing>
-                                    <property name="position">1</property>
-                                  </packing>
-                                </child>
-                              </widget>
-                              <packing>
-                                <property name="position">1</property>
-                              </packing>
-                            </child>
-                          </widget>
-                          <packing>
-                            <property name="position">4</property>
-                          </packing>
-                        </child>
-                        <child>
-                          <widget class="GtkLabel" id="label28">
-                            <property name="visible">True</property>
-                            <property name="label" translatable="yes">Logs</property>
-                          </widget>
-                          <packing>
-                            <property name="type">tab</property>
-                            <property name="position">4</property>
-                            <property name="tab_fill">False</property>
-                          </packing>
-                        </child>
-                      </widget>
-                      <packing>
-                        <property name="position">2</property>
-                      </packing>
-                    </child>
-                  </widget>
-                  <packing>
-                    <property name="position">3</property>
-                  </packing>
-                </child>
-                <child>
-                  <widget class="GtkLabel" id="label4">
-                    <property name="visible">True</property>
-                    <property name="label" translatable="yes">Hosts</property>
-                  </widget>
-                  <packing>
-                    <property name="type">tab</property>
-                    <property name="position">3</property>
-                    <property name="tab_fill">False</property>
-                  </packing>
-                </child>
-                <child>
-                  <widget class="GtkTable" id="table4">
-                    <property name="visible">True</property>
-                    <property name="n_rows">4</property>
-                    <property name="n_columns">2</property>
-                    <child>
-                      <placeholder/>
-                    </child>
-                    <child>
-                      <widget class="GtkLabel" id="label29">
-                        <property name="visible">True</property>
-                        <property name="label" translatable="yes">Administrtor e-mail:</property>
-                      </widget>
-                    </child>
-                    <child>
-                      <widget class="GtkLabel" id="label30">
-                        <property name="visible">True</property>
-                        <property name="label" translatable="yes">Administrator user name:</property>
-                      </widget>
-                      <packing>
-                        <property name="top_attach">1</property>
-                        <property name="bottom_attach">2</property>
-                      </packing>
-                    </child>
-                    <child>
-                      <widget class="GtkLabel" id="label31">
-                        <property name="visible">True</property>
-                        <property name="label" translatable="yes">Administrtor password:</property>
-                      </widget>
-                      <packing>
-                        <property name="top_attach">2</property>
-                        <property name="bottom_attach">3</property>
-                      </packing>
-                    </child>
-                    <child>
-                      <widget class="GtkCheckButton" id="checkbutton2">
-                        <property name="visible">True</property>
-                        <property name="can_focus">True</property>
-                        <property name="label" translatable="yes">Enable control protocol</property>
-                        <property name="use_underline">True</property>
-                        <property name="response_id">0</property>
-                        <property name="draw_indicator">True</property>
-                      </widget>
-                      <packing>
-                        <property name="left_attach">1</property>
-                        <property name="right_attach">2</property>
-                        <property name="top_attach">3</property>
-                        <property name="bottom_attach">4</property>
-                      </packing>
-                    </child>
-                    <child>
-                      <widget class="GtkEntry" id="entry10">
-                        <property name="visible">True</property>
-                        <property name="can_focus">True</property>
-                        <property name="text" translatable="yes">administrator@localhost</property>
-                      </widget>
-                      <packing>
-                        <property name="left_attach">1</property>
-                        <property name="right_attach">2</property>
-                      </packing>
-                    </child>
-                    <child>
-                      <widget class="GtkEntry" id="entry11">
-                        <property name="visible">True</property>
-                        <property name="can_focus">True</property>
-                      </widget>
-                      <packing>
-                        <property name="left_attach">1</property>
-                        <property name="right_attach">2</property>
-                        <property name="top_attach">1</property>
-                        <property name="bottom_attach">2</property>
-                      </packing>
-                    </child>
-                    <child>
-                      <widget class="GtkEntry" id="entry12">
-                        <property name="visible">True</property>
-                        <property name="can_focus">True</property>
-                      </widget>
-                      <packing>
-                        <property name="left_attach">1</property>
-                        <property name="right_attach">2</property>
-                        <property name="top_attach">2</property>
-                        <property name="bottom_attach">3</property>
-                      </packing>
-                    </child>
-                  </widget>
-                  <packing>
-                    <property name="position">4</property>
-                  </packing>
-                </child>
-                <child>
-                  <widget class="GtkLabel" id="label5">
-                    <property name="visible">True</property>
-                    <property name="label" translatable="yes">Administrator</property>
-                  </widget>
-                  <packing>
-                    <property name="type">tab</property>
-                    <property name="position">4</property>
-                    <property name="tab_fill">False</property>
-                  </packing>
-                </child>
-                <child>
-                  <widget class="GtkHBox" id="hbox5">
-                    <property name="visible">True</property>
-                    <child>
-                      <widget class="GtkVBox" id="vbox8">
-                        <property name="visible">True</property>
-                        <child>
-                          <widget class="GtkLabel" id="label17">
-                            <property name="visible">True</property>
-                            <property name="yalign">0.57999998331069946</property>
-                            <property name="ypad">1</property>
-                            <property name="label" translatable="yes">Enable:</property>
-                          </widget>
-                        </child>
-                        <child>
-                          <widget class="GtkCheckButton" id="checkbutton3">
-                            <property name="visible">True</property>
-                            <property name="can_focus">True</property>
-                            <property name="label" translatable="yes">Anonymous Access</property>
-                            <property name="use_underline">True</property>
-                            <property name="response_id">0</property>
-                            <property name="draw_indicator">True</property>
-                          </widget>
-                          <packing>
-                            <property name="position">1</property>
-                          </packing>
-                        </child>
-                        <child>
-                          <widget class="GtkCheckButton" id="checkbutton4">
-                            <property name="visible">True</property>
-                            <property name="can_focus">True</property>
-                            <property name="label" translatable="yes">Asynchronous Commands</property>
-                            <property name="use_underline">True</property>
-                            <property name="response_id">0</property>
-                            <property name="active">True</property>
-                            <property name="draw_indicator">True</property>
-                          </widget>
-                          <packing>
-                            <property name="position">2</property>
-                          </packing>
-                        </child>
-                        <child>
-                          <widget class="GtkCheckButton" id="checkbutton5">
-                            <property name="visible">True</property>
-                            <property name="can_focus">True</property>
-                            <property name="label" translatable="yes">Pipelining</property>
-                            <property name="use_underline">True</property>
-                            <property name="response_id">0</property>
-                            <property name="active">True</property>
-                            <property name="draw_indicator">True</property>
-                          </widget>
-                          <packing>
-                            <property name="position">3</property>
-                          </packing>
-                        </child>
-                        <child>
-                          <widget class="GtkCheckButton" id="checkbutton6">
-                            <property name="visible">True</property>
-                            <property name="can_focus">True</property>
-                            <property name="label" translatable="yes">Write Commands</property>
-                            <property name="use_underline">True</property>
-                            <property name="response_id">0</property>
-                            <property name="draw_indicator">True</property>
-                          </widget>
-                          <packing>
-                            <property name="position">4</property>
-                          </packing>
-                        </child>
-                      </widget>
-                    </child>
-                    <child>
-                      <widget class="GtkCheckButton" id="checkbutton7">
-                        <property name="visible">True</property>
-                        <property name="can_focus">True</property>
-                        <property name="label" translatable="yes">Anonymous Needs Password</property>
-                        <property name="use_underline">True</property>
-                        <property name="response_id">0</property>
-                        <property name="active">True</property>
-                        <property name="draw_indicator">True</property>
-                      </widget>
-                      <packing>
-                        <property name="position">1</property>
-                      </packing>
-                    </child>
-                  </widget>
-                  <packing>
-                    <property name="position">5</property>
-                  </packing>
-                </child>
-                <child>
-                  <widget class="GtkLabel" id="label6">
-                    <property name="visible">True</property>
-                    <property name="label" translatable="yes">FTP Services</property>
-                  </widget>
-                  <packing>
-                    <property name="type">tab</property>
-                    <property name="position">5</property>
-                    <property name="tab_fill">False</property>
-                  </packing>
-                </child>
-              </widget>
-              <packing>
-                <property name="position">1</property>
-              </packing>
-            </child>
-          </widget>
-        </child>
-      </widget>
-    </child>
-  </widget>
-  <widget class="GtkMenu" id="menu1">
-    <property name="visible">True</property>
-  </widget>
-</glade-interface>



commit 9b1a0c54d95307660a0feafb0d2354a0d2c51f4a
Merge: e95ef51 b1b88f0
Author: Marek Aaron Sapota <maarons@gnu.org>
Date:   Mon Jul 20 23:28:19 2009 +0200

    Merge branch 'master' of git://git.savannah.gnu.org/myserver




commit abdcc4fc662dd4923cf11733e6401bf142b348b4
Author: Marek Aaron Sapota <maarons@gnu.org>
Date:   Mon Jul 20 23:26:19 2009 +0200

    Open handles multiple levels of definitions.

diff --git a/misc/PyGTK_Control/MyServerControl.py b/misc/PyGTK_Control/MyServerControl.py
index a262636..c7f5f9b 100644
--- a/misc/PyGTK_Control/MyServerControl.py
+++ b/misc/PyGTK_Control/MyServerControl.py
@@ -321,18 +321,20 @@ class PyGTKControl():
                 row[3] = ''
                 row[4] = False
                 row[5] = {}
+                child = model.iter_children(i)
+                if child is not None: # remove node children
+                    while model.remove(child):
+                        pass
                 i = model.iter_next(i)
 
     def set_up(self, config):
         '''Reads configuration from given config instance.'''
+        
         def put_to_unknown(definition):
             print('Unknown option:', definition, sep = '\n')
-        self.on_new_menu_item_activate()
-        for definition in config.get_definitions():
+            
+        def get_value_and_attributes(definition):
             name = definition.get_name()
-            if name not in self.options:
-                put_to_unknown(definition)
-                continue
             enabled = True
             try:
                 value = definition.get_attribute('value')
@@ -342,6 +344,27 @@ class PyGTKControl():
                 value_check = False
             attributes = definition.get_attributes()
             attributes.pop('value', None)
+            return (name, enabled, value, value_check, attributes, )
+
+        def add_children(parent, definition, model):
+            if isinstance(definition, DefinitionTree):
+                for d in definition.get_definitions():
+                    name, enabled, value, value_check, attributes = \
+                        get_value_and_attributes(d)
+                    i = model.append(
+                        parent,
+                        (name, '', enabled, value, value_check, attributes, ))
+                    add_children(i, d, model)
+        
+        self.on_new_menu_item_activate()
+        for definition in config.get_definitions():
+            name, enabled, value, value_check, attributes = \
+                get_value_and_attributes(definition)
+            
+            if name not in self.options:
+                put_to_unknown(definition)
+                continue
+            
             tree = self.tabs[self.options[name]][1]
             model = tree.get_model()
             i = model.iter_children(None)
@@ -352,6 +375,7 @@ class PyGTKControl():
             row[3] = value
             row[4] = value_check
             row[5] = attributes
+            add_children(i, definition, model)
 
     def construct_options(self):
         '''Reads known options from file and prepares GUI.'''



commit b816fd85420cd9f5ba87c0a5508f3c2b9c22edbd
Author: Marek Aaron Sapota <maarons@gnu.org>
Date:   Mon Jul 20 22:58:53 2009 +0200

    One level open file working.

diff --git a/misc/PyGTK_Control/MyServerControl.py b/misc/PyGTK_Control/MyServerControl.py
index 0750cc9..a262636 100644
--- a/misc/PyGTK_Control/MyServerControl.py
+++ b/misc/PyGTK_Control/MyServerControl.py
@@ -342,13 +342,23 @@ class PyGTKControl():
                 value_check = False
             attributes = definition.get_attributes()
             attributes.pop('value', None)
-            self.options[name] = (enabled, value, value_check, attributes, )
+            tree = self.tabs[self.options[name]][1]
+            model = tree.get_model()
+            i = model.iter_children(None)
+            while model[i][0] != name:
+                i = model.iter_next(i)
+            row = model[i]
+            row[2] = enabled
+            row[3] = value
+            row[4] = value_check
+            row[5] = attributes
 
     def construct_options(self):
         '''Reads known options from file and prepares GUI.'''
 
         # segregate options by tab
         segregated_options = {} # tab name => option names
+        self.options = {} # option name => tab name
         for option in GUIConfig.options:
             tab = 'other'
             for prefix in GUIConfig.tabs:
@@ -358,6 +368,7 @@ class PyGTKControl():
             if not segregated_options.has_key(tab):
                 segregated_options[tab] = []
             segregated_options[tab].append(option)
+            self.options[option] = tab
 
         self.tabs = {} # tab name => (table, tree, )
         for tab in GUIConfig.tabs + ['other', 'unknown']:



commit 816ba0b0fd7a695ba9d91ded059b771aa3868d48
Author: Marek Aaron Sapota <maarons@gnu.org>
Date:   Mon Jul 20 22:49:57 2009 +0200

    Store options state in additional tree columns.

diff --git a/misc/PyGTK_Control/MyServerControl.py b/misc/PyGTK_Control/MyServerControl.py
index 1dd28df..0750cc9 100644
--- a/misc/PyGTK_Control/MyServerControl.py
+++ b/misc/PyGTK_Control/MyServerControl.py
@@ -62,11 +62,10 @@ class Connection():
         return self.widgets.get_widget('password_entry').get_text()
 
 class EditionTable(gtk.Table):
-    def __init__(self, tree, options):
+    def __init__(self, tree):
         gtk.Table.__init__(self, 8, 3)
         
         tree.connect('cursor-changed', self.cursor_changed)
-        self.options = options
         self.last_selected = None
 
         enabled_label = gtk.Label('enabled:')
@@ -155,11 +154,11 @@ class EditionTable(gtk.Table):
                 attributes[self.attributes_field.get_value(i, 0)] = \
                     self.attributes_field.get_value(i, 1)
                 i = self.attributes_field.iter_next(i)
-            self.options[self.last_selected] = (
-                self.enabled_field.get_active(),
-                self.value_field.get_text(),
-                self.value_check_field.get_active(),
-                attributes, )
+            row = tree.get_model()[self.last_selected]
+            row[2] = self.enabled_field.get_active()
+            row[3] = self.value_field.get_text()
+            row[4] = self.value_check_field.get_active()
+            row[5] = attributes
             
     def cursor_changed(self, tree):
         self.save_changed(tree)
@@ -167,16 +166,16 @@ class EditionTable(gtk.Table):
         self.clear()
         
         self.last_selected = current = self.get_selected(tree)
-        enabled, value, value_check, attributes = self.options[current]
-        self.enabled_field.set_active(enabled)
-        self.value_field.set_text(value)
-        self.value_check_field.set_active(value_check)
-        for attribute in attributes:
-            self.attributes_field.append((attribute, attributes[attribute], ))
+        row = tree.get_model()[current]
+        self.enabled_field.set_active(row[2])
+        self.value_field.set_text(row[3])
+        self.value_check_field.set_active(row[4])
+        for attribute in row[5]:
+            self.attributes_field.append((attribute, row[5][attribute], ))
 
     def get_selected(self, tree):
         model, selected = tree.get_selection().get_selected()
-        return model[selected][0]
+        return selected
     
 class PyGTKControl():
     '''GNU MyServer Control main window.'''
@@ -310,12 +309,19 @@ class PyGTKControl():
         '''Clears configuration.'''
         if widget is not None:
             self.path = None
-        for option in self.options:
-            self.options[option] = (False, '', True, {}, )
         for tab in self.tabs:
             table, tree = self.tabs[tab]
+            model = tree.get_model()
             table.clear()
             tree.get_selection().unselect_all()
+            i = model.iter_children(None)
+            while i is not None: # iterate over options
+                row = model[i]
+                row[2] = False
+                row[3] = ''
+                row[4] = False
+                row[5] = {}
+                i = model.iter_next(i)
 
     def set_up(self, config):
         '''Reads configuration from given config instance.'''
@@ -342,7 +348,7 @@ class PyGTKControl():
         '''Reads known options from file and prepares GUI.'''
 
         # segregate options by tab
-        segregated_options = {}
+        segregated_options = {} # tab name => option names
         for option in GUIConfig.options:
             tab = 'other'
             for prefix in GUIConfig.tabs:
@@ -353,14 +359,18 @@ class PyGTKControl():
                 segregated_options[tab] = []
             segregated_options[tab].append(option)
 
-        self.tabs = {} # tab => definitions
-        # option name => (enabled, value, value_check, attributes, )
-        self.options = {}
+        self.tabs = {} # tab name => (table, tree, )
         for tab in GUIConfig.tabs + ['other', 'unknown']:
             options = segregated_options.get(tab, [])
             panels = gtk.HBox()
             
-            tree = gtk.TreeView(gtk.TreeStore(gobject.TYPE_STRING))
+            tree = gtk.TreeView(gtk.TreeStore(
+                    gobject.TYPE_STRING, # option name
+                    gobject.TYPE_STRING, # option tooltip
+                    gobject.TYPE_BOOLEAN, # enabled
+                    gobject.TYPE_STRING, # value
+                    gobject.TYPE_BOOLEAN, # value_check
+                    gobject.TYPE_PYOBJECT)) # attributes dict
             tree_model = tree.get_model()
             tree.set_headers_visible(False)
             tree_column = gtk.TreeViewColumn()
@@ -375,18 +385,17 @@ class PyGTKControl():
             tree_scroll.set_border_width(5)
             tree_scroll.add(tree)
             panels.pack_start(tree_scroll)
-            table = EditionTable(tree, self.options)
+            table = EditionTable(tree)
             panels.pack_start(table)
 
             self.tabs[tab] = (table, tree, )
             
             for option in options:
                 tooltip_text, var = GUIConfig.options[option]
-                tooltip = gtk.Tooltip()
-                tooltip.set_text(tooltip_text)
-                it = tree_model.append(None, (option, ))
-                self.options[option] = None # anything, will be set up later
-                tree.set_tooltip_row(tooltip, tree_model[it].path) # not working
+                # all but first two columns will be set to defaults later by
+                # on_new_menu_item_activate
+                tree_model.append(None, (option, tooltip_text, False, '',
+                                         False, {}, ))
              
             self.widgets.get_widget('notebook').append_page(
                 panels, gtk.Label(tab))



commit 814c6f4aa71fcfc27ffa488e42999d90b8940cde
Author: Marek Aaron Sapota <maarons@gnu.org>
Date:   Mon Jul 20 17:21:13 2009 +0200

    Fixed opening flat files (no trees for now).

diff --git a/misc/PyGTK_Control/MyServerControl.py b/misc/PyGTK_Control/MyServerControl.py
index 073fc27..1dd28df 100644
--- a/misc/PyGTK_Control/MyServerControl.py
+++ b/misc/PyGTK_Control/MyServerControl.py
@@ -320,7 +320,6 @@ class PyGTKControl():
     def set_up(self, config):
         '''Reads configuration from given config instance.'''
         def put_to_unknown(definition):
-            self.unknown.append(definition)
             print('Unknown option:', definition, sep = '\n')
         self.on_new_menu_item_activate()
         for definition in config.get_definitions():
@@ -328,24 +327,16 @@ class PyGTKControl():
             if name not in self.options:
                 put_to_unknown(definition)
                 continue
-            check, field, var = self.options[name]
-            if (isinstance(definition, DefinitionElement) and var == 'list') or \
-                    (isinstance(definition, DefinitionTree) and var != 'list'):
-                put_to_unknown(definition)
-                continue
-            self.definitions[name] = definition
-            check.set_active(True)
-            if var == 'string':
-                field.set_text(definition.get_attribute('value'))
-            elif var == 'integer':
-                field.set_value(int(definition.get_attribute('value')))
-            elif var == 'bool':
-                if definition.get_attribute('value').upper() != 'YES':
-                    field.set_active(1)
-            elif var == 'list':
-                for definition in definition.get_definitions():
-                    field.get_model().append(
-                        (definition.get_attribute('value'), ))
+            enabled = True
+            try:
+                value = definition.get_attribute('value')
+                value_check = True
+            except KeyError:
+                value = ''
+                value_check = False
+            attributes = definition.get_attributes()
+            attributes.pop('value', None)
+            self.options[name] = (enabled, value, value_check, attributes, )
 
     def construct_options(self):
         '''Reads known options from file and prepares GUI.'''



commit 15879dec8ca6c87ac9d8e60b4b8ccb87b2fd53d4
Author: Marek Aaron Sapota <maarons@gnu.org>
Date:   Mon Jul 20 17:18:40 2009 +0200

    Added get_attributes to Definition.

diff --git a/misc/py_control_client/MyServer/pycontrollib/definition.py b/misc/py_control_client/MyServer/pycontrollib/definition.py
index ebd62d5..af5dcf0 100644
--- a/misc/py_control_client/MyServer/pycontrollib/definition.py
+++ b/misc/py_control_client/MyServer/pycontrollib/definition.py
@@ -42,6 +42,10 @@ class Definition():
         '''Set definition name, None means no name.'''
         self.name = name
 
+    def get_attributes(self):
+        '''Get dict of all attributes.'''
+        return self.attributes
+
     def get_attribute(self, key):
         '''Get value of attribute key.'''
         return self.attributes[key]
diff --git a/misc/py_control_client/MyServer/pycontrollib/test/definition_test.py b/misc/py_control_client/MyServer/pycontrollib/test/definition_test.py
index b7917cf..9cb5bcc 100644
--- a/misc/py_control_client/MyServer/pycontrollib/test/definition_test.py
+++ b/misc/py_control_client/MyServer/pycontrollib/test/definition_test.py
@@ -40,6 +40,7 @@ class DefinitionTest(unittest.TestCase):
         definition = Definition('with attributes', {'a': 'b', 'c': 'd'})
         self.assertEqual('b', definition.get_attribute('a'))
         self.assertEqual('d', definition.get_attribute('c'))
+        self.assertEqual({'a': 'b', 'c': 'd'}, definition.get_attributes())
         self.assertRaises(KeyError, definition.get_attribute, 'e')
         definition.set_attribute('e', 'f')
         self.assertEqual('f', definition.get_attribute('e'))



commit 44d0809025b967fbed0b62113b02b069921ed4d5
Author: Marek Aaron Sapota <maarons@gnu.org>
Date:   Mon Jul 20 17:04:41 2009 +0200

    Access definitions by name, not by TreeIter.

diff --git a/misc/PyGTK_Control/MyServerControl.py b/misc/PyGTK_Control/MyServerControl.py
index 47461b2..073fc27 100644
--- a/misc/PyGTK_Control/MyServerControl.py
+++ b/misc/PyGTK_Control/MyServerControl.py
@@ -62,11 +62,11 @@ class Connection():
         return self.widgets.get_widget('password_entry').get_text()
 
 class EditionTable(gtk.Table):
-    def __init__(self, tree, definitions):
+    def __init__(self, tree, options):
         gtk.Table.__init__(self, 8, 3)
         
         tree.connect('cursor-changed', self.cursor_changed)
-        self.definitions = definitions
+        self.options = options
         self.last_selected = None
 
         enabled_label = gtk.Label('enabled:')
@@ -151,11 +151,11 @@ class EditionTable(gtk.Table):
         if self.last_selected is not None:
             attributes = {}
             i = self.attributes_field.iter_children(None)
-            while i is not None:
+            while i is not None: # iterate over attributes
                 attributes[self.attributes_field.get_value(i, 0)] = \
                     self.attributes_field.get_value(i, 1)
                 i = self.attributes_field.iter_next(i)
-            self.definitions[self.last_selected] = (
+            self.options[self.last_selected] = (
                 self.enabled_field.get_active(),
                 self.value_field.get_text(),
                 self.value_check_field.get_active(),
@@ -167,7 +167,7 @@ class EditionTable(gtk.Table):
         self.clear()
         
         self.last_selected = current = self.get_selected(tree)
-        enabled, value, value_check, attributes = self.definitions[current]
+        enabled, value, value_check, attributes = self.options[current]
         self.enabled_field.set_active(enabled)
         self.value_field.set_text(value)
         self.value_check_field.set_active(value_check)
@@ -176,12 +176,7 @@ class EditionTable(gtk.Table):
 
     def get_selected(self, tree):
         model, selected = tree.get_selection().get_selected()
-        current = None
-        for it in self.definitions:
-            if model[it].path == model[selected].path:
-                current = it
-                break
-        return current
+        return model[selected][0]
     
 class PyGTKControl():
     '''GNU MyServer Control main window.'''
@@ -315,10 +310,10 @@ class PyGTKControl():
         '''Clears configuration.'''
         if widget is not None:
             self.path = None
+        for option in self.options:
+            self.options[option] = (False, '', True, {}, )
         for tab in self.tabs:
-            definitions, table, tree = self.tabs[tab]
-            for it in definitions:
-                definitions[it] = (False, '', True, {}, )
+            table, tree = self.tabs[tab]
             table.clear()
             tree.get_selection().unselect_all()
 
@@ -368,9 +363,9 @@ class PyGTKControl():
             segregated_options[tab].append(option)
 
         self.tabs = {} # tab => definitions
+        # option name => (enabled, value, value_check, attributes, )
+        self.options = {}
         for tab in GUIConfig.tabs + ['other', 'unknown']:
-            # TreeIterator => (enabled, value, value_check, attributes, )
-            definitions = {}
             options = segregated_options.get(tab, [])
             panels = gtk.HBox()
             
@@ -389,17 +384,17 @@ class PyGTKControl():
             tree_scroll.set_border_width(5)
             tree_scroll.add(tree)
             panels.pack_start(tree_scroll)
-            table = EditionTable(tree, definitions)
+            table = EditionTable(tree, self.options)
             panels.pack_start(table)
 
-            self.tabs[tab] = (definitions, table, tree, )
+            self.tabs[tab] = (table, tree, )
             
             for option in options:
                 tooltip_text, var = GUIConfig.options[option]
                 tooltip = gtk.Tooltip()
                 tooltip.set_text(tooltip_text)
                 it = tree_model.append(None, (option, ))
-                definitions[it] = (False, '', True, {})
+                self.options[option] = None # anything, will be set up later
                 tree.set_tooltip_row(tooltip, tree_model[it].path) # not working
              
             self.widgets.get_widget('notebook').append_page(



commit dc0f5b23bd5df3d4fbd81bc797042053c97eeb25
Author: Marek Aaron Sapota <maarons@gnu.org>
Date:   Mon Jul 20 16:48:09 2009 +0200

    Removed name field, added enabled field.

diff --git a/misc/PyGTK_Control/MyServerControl.py b/misc/PyGTK_Control/MyServerControl.py
index 9b207c5..47461b2 100644
--- a/misc/PyGTK_Control/MyServerControl.py
+++ b/misc/PyGTK_Control/MyServerControl.py
@@ -69,10 +69,11 @@ class EditionTable(gtk.Table):
         self.definitions = definitions
         self.last_selected = None
 
-        name_label = gtk.Label('name:')
-        self.name_field = name_entry = gtk.Entry()
-        self.attach(name_label, 0, 1, 0, 1, gtk.FILL, gtk.FILL)
-        self.attach(name_entry, 1, 3, 0, 1, yoptions = gtk.FILL)
+        enabled_label = gtk.Label('enabled:')
+        self.enabled_field = enabled_checkbutton = gtk.CheckButton()
+        enabled_checkbutton.set_tooltip_text('If not active, definition won\'t be included in saved configuration.')
+        self.attach(enabled_label, 0, 1, 0, 1, gtk.FILL, gtk.FILL)
+        self.attach(enabled_checkbutton, 1, 3, 0, 1, yoptions = gtk.FILL)
 
         value_label = gtk.Label('value:')
         self.value_field = value_entry = gtk.Entry()
@@ -140,7 +141,7 @@ class EditionTable(gtk.Table):
         self.attach(attributes_scroll, 0, 3, 7, 8)
 
     def clear(self):
-        self.name_field.set_text('')
+        self.enabled_field.set_active(False)
         self.value_field.set_text('')
         self.value_check_field.set_active(False)
         self.attributes_field.clear()
@@ -155,6 +156,7 @@ class EditionTable(gtk.Table):
                     self.attributes_field.get_value(i, 1)
                 i = self.attributes_field.iter_next(i)
             self.definitions[self.last_selected] = (
+                self.enabled_field.get_active(),
                 self.value_field.get_text(),
                 self.value_check_field.get_active(),
                 attributes, )
@@ -165,7 +167,8 @@ class EditionTable(gtk.Table):
         self.clear()
         
         self.last_selected = current = self.get_selected(tree)
-        value, value_check, attributes = self.definitions[current]
+        enabled, value, value_check, attributes = self.definitions[current]
+        self.enabled_field.set_active(enabled)
         self.value_field.set_text(value)
         self.value_check_field.set_active(value_check)
         for attribute in attributes:
@@ -315,7 +318,7 @@ class PyGTKControl():
         for tab in self.tabs:
             definitions, table, tree = self.tabs[tab]
             for it in definitions:
-                definitions[it] = ('', True, {}, )
+                definitions[it] = (False, '', True, {}, )
             table.clear()
             tree.get_selection().unselect_all()
 
@@ -366,7 +369,8 @@ class PyGTKControl():
 
         self.tabs = {} # tab => definitions
         for tab in GUIConfig.tabs + ['other', 'unknown']:
-            definitions = {} # TreeIterator => (value, value_check, attributes, )
+            # TreeIterator => (enabled, value, value_check, attributes, )
+            definitions = {}
             options = segregated_options.get(tab, [])
             panels = gtk.HBox()
             
@@ -395,7 +399,7 @@ class PyGTKControl():
                 tooltip = gtk.Tooltip()
                 tooltip.set_text(tooltip_text)
                 it = tree_model.append(None, (option, ))
-                definitions[it] = ('', True, {})
+                definitions[it] = (False, '', True, {})
                 tree.set_tooltip_row(tooltip, tree_model[it].path) # not working
              
             self.widgets.get_widget('notebook').append_page(



commit 185d91663d56e922f1c789bb8929cb6021bbe264
Author: Marek Aaron Sapota <maarons@gnu.org>
Date:   Mon Jul 20 13:09:39 2009 +0200

    Working new file.

diff --git a/misc/PyGTK_Control/MyServerControl.py b/misc/PyGTK_Control/MyServerControl.py
index 0b3c292..9b207c5 100644
--- a/misc/PyGTK_Control/MyServerControl.py
+++ b/misc/PyGTK_Control/MyServerControl.py
@@ -144,6 +144,7 @@ class EditionTable(gtk.Table):
         self.value_field.set_text('')
         self.value_check_field.set_active(False)
         self.attributes_field.clear()
+        self.last_selected = None
 
     def save_changed(self, tree):
         if self.last_selected is not None:
@@ -311,23 +312,12 @@ class PyGTKControl():
         '''Clears configuration.'''
         if widget is not None:
             self.path = None
-        self.definitions = {} # option name => corresponding Definition
-        self.unknown = [] # list of unknown definitions
-        for option in self.options:
-            check, field, var = self.options.get(option)
-            if var != 'list':
-                self.definitions[option] = DefinitionElement(option)
-            else:
-                self.definitions[option] = DefinitionTree(option)
-            check.set_active(False)
-            if var == 'string':
-                field.set_text('')
-            elif var == 'integer':
-                field.set_value(0)
-            elif var == 'bool':
-                field.set_active(0)
-            elif var == 'list':
-                field.get_model().clear()
+        for tab in self.tabs:
+            definitions, table, tree = self.tabs[tab]
+            for it in definitions:
+                definitions[it] = ('', True, {}, )
+            table.clear()
+            tree.get_selection().unselect_all()
 
     def set_up(self, config):
         '''Reads configuration from given config instance.'''
@@ -374,10 +364,9 @@ class PyGTKControl():
                 segregated_options[tab] = []
             segregated_options[tab].append(option)
 
-        tabs = {} # tab => definitions
+        self.tabs = {} # tab => definitions
         for tab in GUIConfig.tabs + ['other', 'unknown']:
             definitions = {} # TreeIterator => (value, value_check, attributes, )
-            tabs[tab] = definitions
             options = segregated_options.get(tab, [])
             panels = gtk.HBox()
             
@@ -396,20 +385,23 @@ class PyGTKControl():
             tree_scroll.set_border_width(5)
             tree_scroll.add(tree)
             panels.pack_start(tree_scroll)
-            panels.pack_start(EditionTable(tree, definitions))
+            table = EditionTable(tree, definitions)
+            panels.pack_start(table)
+
+            self.tabs[tab] = (definitions, table, tree, )
             
             for option in options:
                 tooltip_text, var = GUIConfig.options[option]
                 tooltip = gtk.Tooltip()
                 tooltip.set_text(tooltip_text)
                 it = tree_model.append(None, (option, ))
-                definitions[it] = ('', False, {})
+                definitions[it] = ('', True, {})
                 tree.set_tooltip_row(tooltip, tree_model[it].path) # not working
              
             self.widgets.get_widget('notebook').append_page(
                 panels, gtk.Label(tab))
 
-        # self.on_new_menu_item_activate()
+        self.on_new_menu_item_activate()
         self.widgets.get_widget('notebook').show_all()
 
 PyGTKControl()



commit 33d2bdd4bb69fb4584643a2af593089461b7993a
Author: Marek Aaron Sapota <maarons@gnu.org>
Date:   Sun Jul 19 23:51:14 2009 +0200

    TreeViews are put inside ScrolledWindows to get scrollbars.

diff --git a/misc/PyGTK_Control/MyServerControl.py b/misc/PyGTK_Control/MyServerControl.py
index 2094b9d..0b3c292 100644
--- a/misc/PyGTK_Control/MyServerControl.py
+++ b/misc/PyGTK_Control/MyServerControl.py
@@ -72,7 +72,7 @@ class EditionTable(gtk.Table):
         name_label = gtk.Label('name:')
         self.name_field = name_entry = gtk.Entry()
         self.attach(name_label, 0, 1, 0, 1, gtk.FILL, gtk.FILL)
-        self.attach(name_entry, 1, 3, 0, 1, gtk.FILL, gtk.FILL)
+        self.attach(name_entry, 1, 3, 0, 1, yoptions = gtk.FILL)
 
         value_label = gtk.Label('value:')
         self.value_field = value_entry = gtk.Entry()
@@ -82,7 +82,7 @@ class EditionTable(gtk.Table):
         value_checkbutton.connect(
             'toggled',
             lambda button: value_entry.set_editable(button.get_active()))
-        self.attach(value_label, 0, 1, 1, 2, yoptions = gtk.FILL)
+        self.attach(value_label, 0, 1, 1, 2, gtk.FILL, gtk.FILL)
         self.attach(value_entry, 1, 2, 1, 2, yoptions = gtk.FILL)
         self.attach(value_checkbutton, 2, 3, 1, 2, gtk.FILL, gtk.FILL)
 
@@ -108,6 +108,11 @@ class EditionTable(gtk.Table):
         attributes_label = gtk.Label('attributes:')
         attributes_list = gtk.TreeView(gtk.ListStore(gobject.TYPE_STRING,
                                                      gobject.TYPE_STRING))
+        attributes_scroll = gtk.ScrolledWindow()
+        attributes_scroll.set_policy(gtk.POLICY_AUTOMATIC, gtk.POLICY_AUTOMATIC)
+        attributes_scroll.set_shadow_type(gtk.SHADOW_OUT)
+        attributes_scroll.set_border_width(5)
+        attributes_scroll.add(attributes_list)
         self.attributes_field = attributes_model = attributes_list.get_model()
 
         def edited_handler(cell, path, text, data):
@@ -132,7 +137,7 @@ class EditionTable(gtk.Table):
         attributes_list.append_column(variable_column)
         attributes_list.append_column(value_column)
         self.attach(attributes_label, 0, 3, 6, 7, yoptions = gtk.FILL)
-        self.attach(attributes_list, 0, 3, 7, 8, yoptions = gtk.FILL)
+        self.attach(attributes_scroll, 0, 3, 7, 8)
 
     def clear(self):
         self.name_field.set_text('')
@@ -140,7 +145,7 @@ class EditionTable(gtk.Table):
         self.value_check_field.set_active(False)
         self.attributes_field.clear()
 
-    def cursor_changed(self, tree):
+    def save_changed(self, tree):
         if self.last_selected is not None:
             attributes = {}
             i = self.attributes_field.iter_children(None)
@@ -153,6 +158,9 @@ class EditionTable(gtk.Table):
                 self.value_check_field.get_active(),
                 attributes, )
             
+    def cursor_changed(self, tree):
+        self.save_changed(tree)
+            
         self.clear()
         
         self.last_selected = current = self.get_selected(tree)
@@ -382,7 +390,12 @@ class PyGTKControl():
             tree_column.add_attribute(tree_renderer, 'text', 0)
             tree.append_column(tree_column)
             
-            panels.pack_start(tree, expand = False)
+            tree_scroll = gtk.ScrolledWindow()
+            tree_scroll.set_policy(gtk.POLICY_AUTOMATIC, gtk.POLICY_AUTOMATIC)
+            tree_scroll.set_shadow_type(gtk.SHADOW_OUT)
+            tree_scroll.set_border_width(5)
+            tree_scroll.add(tree)
+            panels.pack_start(tree_scroll)
             panels.pack_start(EditionTable(tree, definitions))
             
             for option in options:



commit b5bafeea7a86257a1cce9938b0279c9334f8128d
Author: Marek Aaron Sapota <maarons@gnu.org>
Date:   Sun Jul 19 23:21:58 2009 +0200

    Save attributes on tree selection change.

diff --git a/misc/PyGTK_Control/MyServerControl.py b/misc/PyGTK_Control/MyServerControl.py
index 31089ce..2094b9d 100644
--- a/misc/PyGTK_Control/MyServerControl.py
+++ b/misc/PyGTK_Control/MyServerControl.py
@@ -142,10 +142,16 @@ class EditionTable(gtk.Table):
 
     def cursor_changed(self, tree):
         if self.last_selected is not None:
+            attributes = {}
+            i = self.attributes_field.iter_children(None)
+            while i is not None:
+                attributes[self.attributes_field.get_value(i, 0)] = \
+                    self.attributes_field.get_value(i, 1)
+                i = self.attributes_field.iter_next(i)
             self.definitions[self.last_selected] = (
                 self.value_field.get_text(),
                 self.value_check_field.get_active(),
-                {}, ) # add attributes
+                attributes, )
             
         self.clear()
         
@@ -153,7 +159,8 @@ class EditionTable(gtk.Table):
         value, value_check, attributes = self.definitions[current]
         self.value_field.set_text(value)
         self.value_check_field.set_active(value_check)
-        # add attributes
+        for attribute in attributes:
+            self.attributes_field.append((attribute, attributes[attribute], ))
 
     def get_selected(self, tree):
         model, selected = tree.get_selection().get_selected()



commit c155a354bc98d44543eb748b8e9d16d44540b99d
Author: Marek Aaron Sapota <maarons@gnu.org>
Date:   Sun Jul 19 22:07:23 2009 +0200

    Partial transfer to treeview.
    
    Issues:
    - no reading, writing, new file
    - linear searching on every select
    - attributes are not remembered

diff --git a/misc/PyGTK_Control/MyServerControl.py b/misc/PyGTK_Control/MyServerControl.py
index 6045048..31089ce 100644
--- a/misc/PyGTK_Control/MyServerControl.py
+++ b/misc/PyGTK_Control/MyServerControl.py
@@ -61,6 +61,109 @@ class Connection():
     def get_password(self):
         return self.widgets.get_widget('password_entry').get_text()
 
+class EditionTable(gtk.Table):
+    def __init__(self, tree, definitions):
+        gtk.Table.__init__(self, 8, 3)
+        
+        tree.connect('cursor-changed', self.cursor_changed)
+        self.definitions = definitions
+        self.last_selected = None
+
+        name_label = gtk.Label('name:')
+        self.name_field = name_entry = gtk.Entry()
+        self.attach(name_label, 0, 1, 0, 1, gtk.FILL, gtk.FILL)
+        self.attach(name_entry, 1, 3, 0, 1, gtk.FILL, gtk.FILL)
+
+        value_label = gtk.Label('value:')
+        self.value_field = value_entry = gtk.Entry()
+        self.value_check_field = value_checkbutton = gtk.CheckButton()
+        value_checkbutton.set_tooltip_text('If active value will be used.')
+        value_checkbutton.set_active(True)
+        value_checkbutton.connect(
+            'toggled',
+            lambda button: value_entry.set_editable(button.get_active()))
+        self.attach(value_label, 0, 1, 1, 2, yoptions = gtk.FILL)
+        self.attach(value_entry, 1, 2, 1, 2, yoptions = gtk.FILL)
+        self.attach(value_checkbutton, 2, 3, 1, 2, gtk.FILL, gtk.FILL)
+
+        add_definition_button = gtk.Button('add sub-definition')
+        self.attach(add_definition_button, 0, 3, 2, 3, yoptions = gtk.FILL)
+        
+        remove_definition_button = gtk.Button('remove this definition')
+        self.attach(remove_definition_button, 0, 3, 3, 4, yoptions = gtk.FILL)
+
+        add_attribute_button = gtk.Button('add attribute')
+        remove_attribute_button = gtk.Button('remove attribute')
+        add_attribute_button.connect(
+            'clicked',
+            lambda button: attributes_model.append(('', '', )))
+        def remove_attribute(button):
+            model, selected = attributes_list.get_selection().get_selected()
+            if selected is not None:
+                model.remove(selected)
+        remove_attribute_button.connect('clicked', remove_attribute)
+        self.attach(add_attribute_button, 0, 3, 4, 5, yoptions = gtk.FILL)
+        self.attach(remove_attribute_button, 0, 3, 5, 6, yoptions = gtk.FILL)
+
+        attributes_label = gtk.Label('attributes:')
+        attributes_list = gtk.TreeView(gtk.ListStore(gobject.TYPE_STRING,
+                                                     gobject.TYPE_STRING))
+        self.attributes_field = attributes_model = attributes_list.get_model()
+
+        def edited_handler(cell, path, text, data):
+            model, col = data
+            model[path][col] = text
+        variable_column = gtk.TreeViewColumn('variable')
+        variable_renderer = gtk.CellRendererText()
+        variable_renderer.set_property('editable', True)
+        variable_renderer.connect('edited', edited_handler,
+                                  (attributes_model, 0, ))
+        variable_column.pack_start(variable_renderer)
+        variable_column.add_attribute(variable_renderer, 'text', 0)
+        
+        value_column = gtk.TreeViewColumn('value')
+        value_renderer = gtk.CellRendererText()
+        value_renderer.set_property('editable', True)
+        value_renderer.connect('edited', edited_handler,
+                                  (attributes_model, 1, ))
+        value_column.pack_start(value_renderer)
+        value_column.add_attribute(value_renderer, 'text', 1)
+        
+        attributes_list.append_column(variable_column)
+        attributes_list.append_column(value_column)
+        self.attach(attributes_label, 0, 3, 6, 7, yoptions = gtk.FILL)
+        self.attach(attributes_list, 0, 3, 7, 8, yoptions = gtk.FILL)
+
+    def clear(self):
+        self.name_field.set_text('')
+        self.value_field.set_text('')
+        self.value_check_field.set_active(False)
+        self.attributes_field.clear()
+
+    def cursor_changed(self, tree):
+        if self.last_selected is not None:
+            self.definitions[self.last_selected] = (
+                self.value_field.get_text(),
+                self.value_check_field.get_active(),
+                {}, ) # add attributes
+            
+        self.clear()
+        
+        self.last_selected = current = self.get_selected(tree)
+        value, value_check, attributes = self.definitions[current]
+        self.value_field.set_text(value)
+        self.value_check_field.set_active(value_check)
+        # add attributes
+
+    def get_selected(self, tree):
+        model, selected = tree.get_selection().get_selected()
+        current = None
+        for it in self.definitions:
+            if model[it].path == model[selected].path:
+                current = it
+                break
+        return current
+    
 class PyGTKControl():
     '''GNU MyServer Control main window.'''
 
@@ -243,12 +346,6 @@ class PyGTKControl():
 
     def construct_options(self):
         '''Reads known options from file and prepares GUI.'''
-        def make_tab_name(text):
-            return text.capitalize().replace('.', ' ').replace('_', ' ')
-        def make_name(text, tab):
-            if tab == 'other':
-                return text
-            return text[len(tab):].replace('.', ' ').replace('_', ' ').strip()
 
         # segregate options by tab
         segregated_options = {}
@@ -262,63 +359,37 @@ class PyGTKControl():
                 segregated_options[tab] = []
             segregated_options[tab].append(option)
 
-        tabs = {}
-        self.options = {} # option name => (CheckButton, field, type, )
+        tabs = {} # tab => definitions
         for tab in GUIConfig.tabs + ['other', 'unknown']:
+            definitions = {} # TreeIterator => (value, value_check, attributes, )
+            tabs[tab] = definitions
             options = segregated_options.get(tab, [])
-            tabs[tab] = gtk.Table(max(1, len(options)), 3)
-            for i in xrange(len(options)):
-                option = options[i]
-                text, var = GUIConfig.options[option]
-                label = gtk.Label(make_name(option, tab))
-                label.set_tooltip_text(text)
-                check = gtk.CheckButton()
-                if var == 'string':
-                    field = gtk.Entry()
-                    self.options[option] = (check, field, 'string', )
-                elif var == 'integer':
-                    field = gtk.SpinButton(gtk.Adjustment(
-                            0, 0, 2147483647, 1))
-                    self.options[option] = (check, field, 'integer', )
-                elif var == 'bool':
-                    field = gtk.combo_box_new_text()
-                    field.append_text('yes')
-                    field.append_text('no')
-                    field.set_active(0)
-                    self.options[option] = (check, field, 'bool', )
-                elif var == 'list':
-                    tree  = gtk.TreeView(gtk.ListStore(gobject.TYPE_STRING))
-                    tree.set_headers_visible(False)
-                    tree_column = gtk.TreeViewColumn()
-                    tree_renderer = gtk.CellRendererText()
-                    tree_column.pack_start(tree_renderer)
-                    tree_column.add_attribute(tree_renderer, 'text', 0)
-                    tree.append_column(tree_column)
-                    new_name = gtk.Entry()
-                    add_button = gtk.Button('add')
-                    remove_button = gtk.Button('remove')
-                    field = gtk.Table(3, 2)
-                    field.attach(new_name, 0, 2, 0, 1)
-                    field.attach(add_button, 0, 1, 1, 2)
-                    field.attach(remove_button, 1, 2, 1, 2)
-                    field.attach(tree, 0, 2, 2, 3)
-                    def add_to_list(button):
-                        tree.get_model().append((new_name.get_text(), ))
-                        new_name.set_text('')
-                    add_button.connect('clicked', add_to_list)
-                    def remove_from_list(button):
-                        model, selected = tree.get_selection().get_selected()
-                        if selected is not None:
-                            model.remove(selected)
-                    remove_button.connect('clicked', remove_from_list)
-                    self.options[option] = (check, tree, 'list', )
-                tabs[tab].attach(check, 0, 1, i, i + 1, gtk.FILL, gtk.FILL)
-                tabs[tab].attach(label, 1, 2, i, i + 1, yoptions = gtk.FILL)
-                tabs[tab].attach(field, 2, 3, i, i + 1, yoptions = gtk.FILL)
+            panels = gtk.HBox()
+            
+            tree = gtk.TreeView(gtk.TreeStore(gobject.TYPE_STRING))
+            tree_model = tree.get_model()
+            tree.set_headers_visible(False)
+            tree_column = gtk.TreeViewColumn()
+            tree_renderer = gtk.CellRendererText()
+            tree_column.pack_start(tree_renderer)
+            tree_column.add_attribute(tree_renderer, 'text', 0)
+            tree.append_column(tree_column)
+            
+            panels.pack_start(tree, expand = False)
+            panels.pack_start(EditionTable(tree, definitions))
+            
+            for option in options:
+                tooltip_text, var = GUIConfig.options[option]
+                tooltip = gtk.Tooltip()
+                tooltip.set_text(tooltip_text)
+                it = tree_model.append(None, (option, ))
+                definitions[it] = ('', False, {})
+                tree.set_tooltip_row(tooltip, tree_model[it].path) # not working
+             
             self.widgets.get_widget('notebook').append_page(
-                tabs[tab], gtk.Label(make_tab_name(tab)))
+                panels, gtk.Label(tab))
 
-        self.on_new_menu_item_activate()
+        # self.on_new_menu_item_activate()
         self.widgets.get_widget('notebook').show_all()
 
 PyGTKControl()



commit e95ef51c3bcc931fd157807e050e4376b6fa2660
Author: Marek Aaron Sapota <maarons@gnu.org>
Date:   Sun Jul 19 15:45:51 2009 +0200

    Unix installation fixed upstream.

diff --git a/myserver/binaries/MIMEtypes.xml.unix.default b/myserver/binaries/MIMEtypes.xml.unix.default
deleted file mode 100755
index f6830f6..0000000
--- a/myserver/binaries/MIMEtypes.xml.unix.default
+++ /dev/null
@@ -1,503 +0,0 @@
-<?xml version="1.0"?>
-
-<MIMES>
-  <MIME mime="text/html" handler="MSCGI" param="">
-    <EXTENSION value="mscgi"/>
-  </MIME>
-  
-  <MIME mime="text/html" handler="CGI" self="YES" param="">
-    <EXTENSION value="cgi"/>
-  </MIME>
-  
-  <MIME mime="text/html" handler="ISAPI" param="">
-    <EXTENSION value="isapi"/>
-  </MIME>
-  
-  <MIME mime="text/html" handler="SCGI" self="YES" param="">
-    <EXTENSION value="scgi"/>
-  </MIME>
-
-  <MIME mime="text/html" handler="FASTCGI" self="YES" param="">
-    <EXTENSION value="fcgi"/>
-  </MIME>
-  
-  <MIME mime="text/html" handler="WINCGI" param="">
-    <EXTENSION value="wincgi"/>
-  </MIME>
-
-
-  <MIME mime="application/postscript" handler="SEND" param="">
-    <EXTENSION value="ai"/>
-    <EXTENSION value="eps"/>
-    <EXTENSION value="ps"/>
-  </MIME>
-  
-  <MIME mime="video/quicktime" handler="SEND" param="">
-    <EXTENSION value="mov"/>
-    <EXTENSION value="qt"/>
-  </MIME>
-
-  <MIME mime="image/png" handler="SEND" param="">
-    <EXTENSION value="png"/>
-  </MIME>
-
-  <MIME mime="video/vndvivo" handler="SEND" param="">
-    <EXTENSION value="viv"/>
-    <EXTENSION value="vivo"/>
-  </MIME>
-
-  <MIME mime="application/xtex" handler="SEND" param="">
-    <EXTENSION value="tex"/>
-  </MIME>
-
-  <MIME mime="text/xsetext" handler="SEND" param="">
-    <EXTENSION value="etx"/>
-  </MIME>
-
-  <MIME mime="application/vda" handler="SEND" param="">
-    <EXTENSION value="vda"/>
-  </MIME>
-
-  <MIME mime="application/dsptype" handler="SEND" param="">
-    <EXTENSION value="tsp"/>
-  </MIME>
-
-  <MIME mime="application/xstuffit" handler="SEND" param="">
-    <EXTENSION value="sit"/>
-  </MIME>
-
-  <MIME mime="application/solids" handler="SEND" param="">
-    <EXTENSION value="sol"/>
-  </MIME>
-
-  <MIME mime="application/xfuturesplash" handler="SEND" param="">
-    <EXTENSION value="spl"/>
-  </MIME>
-
-  <MIME mime="application/xbcpio" handler="SEND" param="">
-    <EXTENSION value="bcpio"/>
-  </MIME>
-
-  <MIME mime="application/oda" handler="SEND" param="">
-    <EXTENSION value="oda"/>
-  </MIME>
-
-  <MIME mime="application/pro_eng" handler="SEND" param="">
-    <EXTENSION value="prt"/>
-  </MIME>
-
-  <MIME mime="model/iges" handler="SEND" param="">
-    <EXTENSION value="iges"/>
-    <EXTENSION value="igs"/>
-  </MIME>
-
-  <MIME mime="audio/TSPaudio" handler="SEND" param="">
-    <EXTENSION value="tsi"/>
-  </MIME>
-
-  <MIME mime="image/xportablegraymap" handler="SEND" param="">
-    <EXTENSION value="pgm"/>
-  </MIME>
-
-  <MIME mime="application/xlatex" handler="SEND" param="">
-    <EXTENSION value="latex"/>
-  </MIME>
-
-  <MIME mime="application/xsh" handler="SEND" param="">
-    <EXTENSION value="sh"/>
-  </MIME>
-
-  <MIME mime="application/drafting" handler="SEND" param="">
-    <EXTENSION value="drw"/>
-  </MIME>
-
-  <MIME mime="text/html" handler="SEND" param="">
-    <EXTENSION value="htm"/>
-    <EXTENSION value="html"/>
-  </MIME>
-
-  <MIME mime="application/smil" handler="SEND" param="">
-    <EXTENSION value="smi"/>
-    <EXTENSION value="smil"/>
-  </MIME>
-
-  <MIME mime="application/vndmif" handler="SEND" param="">
-    <EXTENSION value="mif"/>
-  </MIME>
-
-  <MIME mime="application/xipix" handler="SEND" param="">
-    <EXTENSION value="ipx"/>
-  </MIME>
-
-  <MIME mime="model/mesh" handler="SEND" param="">
-    <EXTENSION value="mesh"/>
-    <EXTENSION value="msh"/>
-    <EXTENSION value="silo"/>
-  </MIME>
-
-  <MIME mime="application/xtroffman" handler="SEND" param="">
-    <EXTENSION value="man"/>
-  </MIME>
-
-  <MIME mime="application/xcsh" handler="SEND" param="">
-    <EXTENSION value="csh"/>
-  </MIME>
-
-  <MIME mime="audio/xpnrealaudioplugin" handler="SEND" param="">
-    <EXTENSION value="rpm"/>
-  </MIME>
-
-  <MIME mime="image/cmuraster" handler="SEND" param="">
-    <EXTENSION value="ras"/>
-  </MIME>
-
-  <MIME mime="www/mime" handler="SEND" param="">
-    <EXTENSION value="mime"/>
-  </MIME>
-
-  <MIME mime="application/xdirector" handler="SEND" param="">
-    <EXTENSION value="dcr"/>
-    <EXTENSION value="dir"/>
-    <EXTENSION value="dxr"/>
-  </MIME>
-
-  <MIME mime="text/xml" handler="SEND" param="">
-    <EXTENSION value="xml"/>
-  </MIME>
-
-  <MIME mime="application/xfreelance" handler="SEND" param="">
-    <EXTENSION value="pre"/>
-  </MIME>
-
-  <MIME mime="image/ief" handler="SEND" param="">
-    <EXTENSION value="ief"/>
-  </MIME>
-
-  <MIME mime="application/xshar" handler="SEND" param="">
-    <EXTENSION value="shar"/>
-  </MIME>
-
-  <MIME mime="audio/xrealaudio" handler="SEND" param="">
-    <EXTENSION value="ra"/>
-  </MIME>
-
-  <MIME mime="application/mspowerpoint" handler="SEND" param="">
-    <EXTENSION value="pot"/>
-    <EXTENSION value="pps"/>
-    <EXTENSION value="ppt"/>
-    <EXTENSION value="ppz"/>
-  </MIME>
-
-  <MIME mime="audio/midi" handler="SEND" param="">
-    <EXTENSION value="kar"/>
-    <EXTENSION value="mid"/>
-    <EXTENSION value="midi"/>
-  </MIME>
-
-  <MIME mime="image/jpeg" handler="SEND" param="">
-    <EXTENSION value="jpe"/>
-    <EXTENSION value="jpeg"/>
-    <EXTENSION value="jpg"/>
-  </MIME>
-
-  <MIME mime="application/xkoan" handler="SEND" param="">
-    <EXTENSION value="skd"/>
-    <EXTENSION value="skm"/>
-    <EXTENSION value="skp"/>
-    <EXTENSION value="skt"/>
-  </MIME>
-
-  <MIME mime="application/SLA" handler="SEND" param="">
-    <EXTENSION value="stl"/>
-  </MIME>
-
-  <MIME mime="application/STEP" handler="SEND" param="">
-    <EXTENSION value="step"/>
-    <EXTENSION value="stp"/>
-  </MIME>
-
-  <MIME mime="application/xshockwaveflash" handler="SEND" param="">
-    <EXTENSION value="swf"/>
-  </MIME>
-
-  <MIME mime="image/xxwindowdump" handler="SEND" param="">
-    <EXTENSION value="xwd"/>
-  </MIME>
-
-  <MIME mime="image/xxbitmap" handler="SEND" param="">
-    <EXTENSION value="xbm"/>
-  </MIME>
-
-  <MIME mime="application/dxf" handler="SEND" param="">
-    <EXTENSION value="dxf"/>
-  </MIME>
-
-  <MIME mime="text/sgml" handler="SEND" param="">
-    <EXTENSION value="sgm"/>
-    <EXTENSION value="sgml"/>
-  </MIME>
-
-  <MIME mime="model/vrml" handler="SEND" param="">
-    <EXTENSION value="vrml"/>
-    <EXTENSION value="wrl"/>
-  </MIME>
-
-  <MIME mime="application/xipscript" handler="SEND" param="">
-    <EXTENSION value="ips"/>
-  </MIME>
-
-  <MIME mime="image/xportablepixmap" handler="SEND" param="">
-    <EXTENSION value="ppm"/>
-  </MIME>
-
-  <MIME mime="text/plain" handler="SEND" param="">
-    <EXTENSION value="asc"/>
-    <EXTENSION value="c"/>
-    <EXTENSION value="cc"/>
-    <EXTENSION value="f"/>
-    <EXTENSION value="f90"/>
-    <EXTENSION value="h"/>
-    <EXTENSION value="hh"/>
-    <EXTENSION value="m"/>
-    <EXTENSION value="txt"/>
-  </MIME>
-
-  <MIME mime="application/set" handler="SEND" param="">
-    <EXTENSION value="set"/>
-  </MIME>
-
-  <MIME mime="video/xmsvideo" handler="SEND" param="">
-    <EXTENSION value="avi"/>
-  </MIME>
-
-  <MIME mime="audio/xwav" handler="SEND" param="">
-    <EXTENSION value="wav"/>
-  </MIME>
-
-  <MIME mime="application/xgtar" handler="SEND" param="">
-    <EXTENSION value="gtar"/>
-  </MIME>
-
-  <MIME mime="application/xwaissource" handler="SEND" param="">
-    <EXTENSION value="src"/>
-  </MIME>
-
-  <MIME mime="application/acad" handler="SEND" param="">
-    <EXTENSION value="dwg"/>
-  </MIME>
-
-  <MIME mime="application/xlisp" handler="SEND" param="">
-    <EXTENSION value="lsp"/>
-  </MIME>
-
-  <MIME mime="application/zip" handler="SEND" param="">
-    <EXTENSION value="zip"/>
-  </MIME>
-
-  <MIME mime="audio/xpnrealaudio" handler="SEND" param="">
-    <EXTENSION value="ram"/>
-    <EXTENSION value="rm"/>
-  </MIME>
-
-  <MIME mime="text/tabseparatedvalues" handler="SEND" param="">
-    <EXTENSION value="tsv"/>
-  </MIME>
-
-  <MIME mime="image/xxpixmap" handler="SEND" param="">
-    <EXTENSION value="xpm"/>
-  </MIME>
-
-  <MIME mime="application/xtexinfo" handler="SEND" param="">
-    <EXTENSION value="texi"/>
-    <EXTENSION value="texinfo"/>
-  </MIME>
-
-  <MIME mime="application/xustar" handler="SEND" param="">
-    <EXTENSION value="ustar"/>
-  </MIME>
-
-  <MIME mime="application/xcpio" handler="SEND" param="">
-    <EXTENSION value="cpio"/>
-  </MIME>
-
-  <MIME mime="application/vndmsexcel" handler="SEND" param="">
-    <EXTENSION value="xlc"/>
-    <EXTENSION value="xll"/>
-    <EXTENSION value="xlm"/>
-    <EXTENSION value="xls"/>
-    <EXTENSION value="xlw"/>
-  </MIME>
-
-  <MIME mime="image/xrgb" handler="SEND" param="">
-    <EXTENSION value="rgb"/>
-  </MIME>
-
-  <MIME mime="image/xportablebitmap" handler="SEND" param="">
-    <EXTENSION value="pbm"/>
-  </MIME>
-
-  <MIME mime="application/pdf" handler="SEND" param="">
-    <EXTENSION value="pdf"/>
-  </MIME>
-
-  <MIME mime="application/xjavascript" handler="SEND" param="">
-    <EXTENSION value="js"/>
-  </MIME>
-
-  <MIME mime="application/xcdlink" handler="SEND" param="">
-    <EXTENSION value="vcd"/>
-  </MIME>
-
-  <MIME mime="chemical/xpdb" handler="SEND" param="">
-    <EXTENSION value="pdb"/>
-    <EXTENSION value="xyz"/>
-  </MIME>
-
-  <MIME mime="application/xsv4crc" handler="SEND" param="">
-    <EXTENSION value="sv4crc"/>
-  </MIME>
-
-  <MIME mime="image/gif" handler="SEND" param="">
-    <EXTENSION value="gif"/>
-  </MIME>
-
-  <MIME mime="application/xlotusscreencam" handler="SEND" param="">
-    <EXTENSION value="scm"/>
-  </MIME>
-
-  <MIME mime="image/tiff" handler="SEND" param="">
-    <EXTENSION value="tif"/>
-    <EXTENSION value="tiff"/>
-  </MIME>
-
-  <MIME mime="application/maccompactpro" handler="SEND" param="">
-    <EXTENSION value="cpt"/>
-  </MIME>
-
-  <MIME mime="application/clariscad" handler="SEND" param="">
-    <EXTENSION value="ccad"/>
-  </MIME>
-
-  <MIME mime="video/mpeg" handler="SEND" param="">
-    <EXTENSION value="mpe"/>
-    <EXTENSION value="mpeg"/>
-    <EXTENSION value="mpg"/>
-  </MIME>
-
-  <MIME mime="application/xtcl" handler="SEND" param="">
-    <EXTENSION value="tcl"/>
-  </MIME>
-
-  <MIME mime="application/xhdf" handler="SEND" param="">
-    <EXTENSION value="hdf"/>
-  </MIME>
-
-  <MIME mime="text/css" handler="SEND" param="">
-    <EXTENSION value="css"/>
-  </MIME>
-
-  <MIME mime="application/xtroff" handler="SEND" param="">
-    <EXTENSION value="roff"/>
-    <EXTENSION value="t"/>
-    <EXTENSION value="tr"/>
-  </MIME>
-
-  <MIME mime="application/macbinhex40" handler="SEND" param="">
-    <EXTENSION value="hqx"/>
-  </MIME>
-
-  <MIME mime="application/ideas" handler="SEND" param="">
-    <EXTENSION value="unv"/>
-  </MIME>
-
-  <MIME mime="audio/xaiff" handler="SEND" param="">
-    <EXTENSION value="aif"/>
-    <EXTENSION value="aifc"/>
-    <EXTENSION value="aiff"/>
-  </MIME>
-
-  <MIME mime="application/xdvi" handler="SEND" param="">
-    <EXTENSION value="dvi"/>
-  </MIME>
-
-  <MIME mime="application/andrewinset" handler="SEND" param="">
-    <EXTENSION value="ez"/>
-  </MIME>
-
-  <MIME mime="application/xnetcdf" handler="SEND" param="">
-    <EXTENSION value="cdf"/>
-    <EXTENSION value="nc"/>
-  </MIME>
-
-  <MIME mime="application/xsv4cpio" handler="SEND" param="">
-    <EXTENSION value="sv4cpio"/>
-  </MIME>
-
-  <MIME mime="video/xsgimovie" handler="SEND" param="">
-    <EXTENSION value="movie"/>
-  </MIME>
-
-  <MIME mime="audio/mpeg" handler="SEND" param="">
-    <EXTENSION value="mp2"/>
-    <EXTENSION value="mp3"/>
-    <EXTENSION value="mpga"/>
-  </MIME>
-
-  <MIME mime="application/xtroffme" handler="SEND" param="">
-    <EXTENSION value="me"/>
-  </MIME>
-
-  <MIME mime="xconference/xcooltalk" handler="SEND" param="">
-    <EXTENSION value="ice"/>
-  </MIME>
-
-  <MIME mime="application/octetstream" handler="SEND" param="">
-    <EXTENSION value="bin"/>
-    <EXTENSION value="class"/>
-    <EXTENSION value="dms"/>
-    <EXTENSION value="exe"/>
-    <EXTENSION value="lha"/>
-    <EXTENSION value="lzh"/>
-  </MIME>
-
-  <MIME mime="application/xtroffms" handler="SEND" param="">
-    <EXTENSION value="ms"/>
-  </MIME>
-
-  <MIME mime="application/xgzip" handler="SEND" param="">
-    <EXTENSION value="gz"/>
-  </MIME>
-
-  <MIME mime="audio/basic" handler="SEND" param="">
-    <EXTENSION value="au"/>
-    <EXTENSION value="snd"/>
-  </MIME>
-
-  <MIME mime="application/xtar" handler="SEND" param="">
-    <EXTENSION value="tar"/>
-  </MIME>
-
-  <MIME mime="text/rtf" handler="SEND" param="">
-    <EXTENSION value="rtf"/>
-  </MIME>
-
-  <MIME mime="text/richtext" handler="SEND" param="">
-    <EXTENSION value="rtx"/>
-  </MIME>
-
-  <MIME mime="image/xportableanymap" handler="SEND" param="">
-    <EXTENSION value="pnm"/>
-  </MIME>
-
-  <MIME mime="application/xchesspgn" handler="SEND" param="">
-    <EXTENSION value="pgn"/>
-  </MIME>
-
-  <MIME mime="video/xfli" handler="SEND" param="">
-    <EXTENSION value="fli"/>
-  </MIME>
-
-  <MIME mime="application/msword" handler="SEND" param="">
-    <EXTENSION value="doc"/>
-  </MIME>
-</MIMES>
diff --git a/myserver/binaries/myserver.xml.unix.default b/myserver/binaries/myserver.xml.unix.default
deleted file mode 100755
index 77f11ad..0000000
--- a/myserver/binaries/myserver.xml.unix.default
+++ /dev/null
@@ -1,122 +0,0 @@
-<?xml version="1.0"?>
-
-<!--MODIFY THE FILE ONLY IF YOU ARE SURE OF WHAT YOU ARE DOING-->
-<MYSERVER>
-
-	<!--CHOOSE THE LANGUAGE TO USE FOR THE SERVER-->
-	<DEFINE name="server.language" value="english.xml" />
-
-	<!--VERBOSITY ON LOG FILE-->
-	<DEFINE name="server.verbosity" value="2" />
-
-	<!--NUMBER OF SERVING THREADS ALWAYS ACTIVE-->
-  <DEFINE name="server.static_threads" value="5" />
-
-	<!--MAXIMUM NUMBER OF SERVING THREADS THAT THE SCHEDULER CAN
-			CREATE-->
-	<DEFINE name="server.max_threads" value="200" />
-
-	<!--DIMENSION OF EVERY BUFFER IN BYTES IF ON THE MACHINE THERE IS A
-			LOT OF RAM	THIS VALUES CAN BE INCREASED TO MAKE MYSERVER
-			FASTER. NORMALLY THE MEMORY USED BY BUFFERS IS EQUAL TO
-			BUFFER_SIZE * 2 * NUM_OF_THREADS-->
-	<DEFINE name="server.buffer_size" value="102400" />
-
-	<!--DEFAULT FILENAME TO SEND IN A DIRECTORY
-			IF THE FILE ISN'T IN THE PATH THEN THE DIRECTORY
-			CONTENT IS SENT	-->
-  <DEFINE name="http.default_file">
-    <DEFINE value="default.html"/>
-    <DEFINE value="default.htm"/>
-    <DEFINE value="index.html"/>
-    <DEFINE value="index.htm"/>
-  </DEFINE>
-
-	<!--TIMEOUT OF EVERY CLIENTS CONNECTED TO THE SERVER.
-			IF THE CLIENT DOESN'T REQUEST ANYTHING FOR N
-			SECONDS THE CONNECTION WITH THE CLIENT IS
-			CLOSED. SET THIS TO 0 IF YOU DON'T WANT USE
-			KEEP-ALIVE CONNECTIONS	-->
-	<DEFINE name="connection.timeout" value="180" />
-
-	<!--SET THIS TO YES FOR USE PERSONALIZED PAGES TO SEND MESSAGE,
-			PERSONALIZED PAGES ARE IN THE SYSTEM DIRECTORY	-->
-	<DEFINE name="http.use_error_file" value="YES" />
-
-	<!--DEFINE THE MAX NUMBER OF CONNECTIONS TO ALLOW TO THE SERVER. IF
-			0 THEN INFINITE CONNECTIONS ARE ALLOWED.-->
-	<DEFINE name="server.max_connections" value="0" />
-
-	<!--DEFINE THE MAX NUMBER OF CONNECTIONS TO ACCEPT.-->
-	<DEFINE name="server.max_accepted_connections" value="0" />
-
-  <!--TEXT AND BACKGROUND ATTRIBUTES FOR CONSOLE LOG MESSAGES. -->
-  <DEFINE name="log_color.info_fg" value="white" />
-  <DEFINE name="log_color.info_bg" value="black" />
-
-  <DEFINE name="log_color.warning_fg" value="yellow" />
-  <DEFINE name="log_color.warning_bg" value="black" />
-
-  <DEFINE name="log_color.error_fg" value="red" />
-  <DEFINE name="log_color.error_bg" value="black" />
-
-	<!--MAX SIZE OF THE LOG FILE IN BYTES	-->
-	<DEFINE name="server.max_log_size" value="1048576" />
-
-	<!--DEFINE THE FOLDER BROWSING STYLE-->
-	<DEFINE name="http.dir.css" value="/sys/css/browsestyle.css" />
-
-	<!--DEFINE THE ADMINISTRATOR E-MAIL-->
-	<DEFINE name="server.admin" value="administrator@localhost" />
-
-	<!--DEFINE THE GZIP COMPRESSION THRESHOLD VALUE-->
-	<DEFINE name="gzip.threshold" value="1048576" />
-
-	<!--DEFINE IF LINKS SHOULD BE FOLLOWED-->
-	<DEFINE name="symlinks.follow" value="YES" />
-
-	<!--MAX CACHE SIZE FOR STATIC FILES-->
-	<DEFINE name="server.max_files_cache" value="10485760" />
-
-	<!--MAX CACHE SIZE FOR SINGLE STATIC FILE-->
-	<DEFINE name="server.max_file_cache" value="1048576" />
-
-	<!--MIN CACHE SIZE FOR SINGLE STATIC FILE-->
-	<DEFINE name="server.min_file_cache" value="1048576" />
-
-	<!-- ENABLE HOME DIRECTORY PER USER -->
-	<DEFINE name="http.use_home_directory" value="NO" />
-
-	<!-- DEFINE NAME FOR HOME DIRECTORY BROWSING, BY DEFAULT THE SERVER
-			 USES public_html -->
-	<DEFINE name="http.home_directory" value="public_html" />
-
-  <!--SET THIS TO YES IF YOU WANT TO ENABLE THE CONTROL PROTOCOL-->
-	<DEFINE name="control.enabled" value="NO" />
-
-	<!--MAXIMUM NUMBER OF EXTERNAL SERVERS THAT CAN BE EXECUTED-->
-	<DEFINE name="server.max_servers" value="100" />
-
-  <!--SET HERE THE NAME FOR THE CONTROL ADMIN. WE SUGGEST YOU YO USE
-      SOMETHING DIFFERENT FROM ADMIN, ADMINISTRATOR OR ROOT-->
-  <DEFINE name="control.admin" value="ADMIN" />
-
-  <!--DEFINE HERE A GOOD STRONG PASSWORD FOR THE ADMIN-->
-  <DEFINE name="control.password" value="PLEASE_CHANGE_THIS_PASSWORD" />
-
-  <!--FTP GLOBAL CONFIGURATION-->
-  <!--ALLOW ANONYMOUS LOGIN-->
-  <DEFINE name="ftp.allow_anonymous" value="NO" />
-
-  <!--IF ANONYMOUS ALLOWED, TELLS IF NEEDS PASS-->
-  <DEFINE name="ftp.anonymous_need_pass" value="NO" />
-
-  <!--ALLOW ASYNCHRONOUS CMDS LIKE Abor, Quit, Stat-->
-  <DEFINE name="ftp.allow_asynchronous_cmds" value="YES" />
-
-  <!--ALLOW CLIENTS TO SEND MORE THAN ONE COMMAND TO SERVER INTO ONE REQUEST-->
-  <DEFINE name="ftp.allow_pipelining" value="NO" />
-
-  <!--ALLOW CLIENTS TO CHANGE SERVER FILES-->
-  <DEFINE name="ftp.allow_store" value="NO" />
-</MYSERVER>
diff --git a/myserver/binaries/virtualhosts.xml.unix.default b/myserver/binaries/virtualhosts.xml.unix.default
deleted file mode 100755
index 36b3b47..0000000
--- a/myserver/binaries/virtualhosts.xml.unix.default
+++ /dev/null
@@ -1,40 +0,0 @@
-<?xml version="1.0"?>
-
-<VHOSTS>
-
-	<VHOST>
-		<NAME>Every HTTP connection</NAME>
-		
-		<PORT>80</PORT>
-		<PROTOCOL>HTTP</PROTOCOL>
-		
-		<DOCROOT>web</DOCROOT>
-		<SYSROOT>system</SYSROOT>
-
-		<ACCESSLOG>
-                  <STREAM location="file://logs/MyServerHTTP.log" cycle="1048576"/>
-                </ACCESSLOG>
-
-                <WARNINGLOG>
-                  <STREAM location="file://logs/MyServerHTTP.err" cycle="1048576"/>
-                </WARNINGLOG>
-	</VHOST>
-
-	<VHOST>
-		<NAME>FTP connection</NAME>
-		
-		<PORT>21</PORT>
-		<PROTOCOL>FTP</PROTOCOL>
-		
-		<DOCROOT>web</DOCROOT>
-		<SYSROOT>system</SYSROOT>
-		
-		<ACCESSLOG>
-                  <STREAM location="file://logs/MyServerFTP.log" cycle="1048576"/>
-                </ACCESSLOG>
-
-		<WARNINGLOG>
-                  <STREAM location="file://logs/MyServerFTP.err" cycle="1048576"/>
-                </WARNINGLOG>
-	</VHOST>
-</VHOSTS>



commit c3d7e72c5d7a043b32571d78b9dd368f9680722d
Merge: 290fa08 2ada044
Author: Marek Aaron Sapota <maarons@gnu.org>
Date:   Sun Jul 19 15:45:05 2009 +0200

    Merge branch 'master' of git://git.savannah.gnu.org/myserver




commit 290fa08dae6d19ce02df7a7a13823d5ff319b615
Author: Marek Aaron Sapota <maarons@gnu.org>
Date:   Sat Jul 18 12:59:43 2009 +0200

    Unknown definitions are not lost in GUI.

diff --git a/misc/PyGTK_Control/MyServerControl.py b/misc/PyGTK_Control/MyServerControl.py
index 97fd23a..6045048 100644
--- a/misc/PyGTK_Control/MyServerControl.py
+++ b/misc/PyGTK_Control/MyServerControl.py
@@ -16,6 +16,7 @@ You should have received a copy of the GNU General Public License
 along with this program.  If not, see <http://www.gnu.org/licenses/>.
 '''
 
+from __future__ import print_function
 import gtk
 import gobject
 import gtk.glade
@@ -42,6 +43,7 @@ class Connection():
         self.widgets.signal_autoconnect(self)
 
     def destroy(self):
+        '''Destroys this widget.'''
         self.widgets.get_widget('connectiondialog').destroy()
         
     def on_cancel_button_clicked(self, widget):
@@ -72,15 +74,19 @@ class PyGTKControl():
         self.controller = None
 
     def on_window_destroy(self, widget):
+        '''Exits program.'''
         gtk.main_quit()
 
     def on_quit_menu_item_activate(self, widget):
+        '''Exits program.'''
         gtk.main_quit()
 
     def on_about_menu_item_activate(self, widget):
+        '''Shows about window.'''
         About()
 
     def on_connect_menu_item_activate(self, widget):
+        '''Show connection dialog.'''
         dialog = Connection()
         def connect(widget):
             self.controller = Controller(
@@ -92,19 +98,23 @@ class PyGTKControl():
         dialog.widgets.get_widget('connectiondialog').show()
 
     def on_disconnect_menu_item_activate(self, widget):
+        '''Disconnect from server.'''
         if self.controller is not None:
             self.controller.disconnect()
         self.controller = None
 
     def on_get_config_menu_item_activate(self, widget):
+        '''Get config from remote server.'''
         if self.controller is not None:
             self.set_up(self.controller.get_server_configuration())
 
     def on_put_config_menu_item_activate(self, widget):
+        '''Put config on remote server.'''
         if self.controller is not None:
             self.controller.put_server_configuration(self.get_current_config())
 
     def on_open_menu_item_activate(self, widget):
+        '''Open local configuration file.'''
         if self.chooser is not None:
             self.chooser.destroy()
         self.chooser = gtk.FileChooserDialog(
@@ -122,6 +132,7 @@ class PyGTKControl():
         self.chooser.show()
 
     def on_save_as_menu_item_activate(self, widget):
+        '''Save configuration as local file.'''
         if self.chooser is not None:
             self.chooser.destroy()
         self.chooser = gtk.FileChooserDialog(
@@ -138,6 +149,7 @@ class PyGTKControl():
         self.chooser.show()
 
     def on_save_menu_item_activate(self, widget):
+        '''Save configuration to file.'''
         if self.path is None:
             self.on_save_as_menu_item_activate(widget)
         else:
@@ -146,6 +158,7 @@ class PyGTKControl():
                 f.write(str(config))
     
     def get_current_config(self):
+        '''Returns current configuration as list of definitions.'''
         definitions = []
         for option in self.options:
             check, field, var = self.options[option]
@@ -174,11 +187,14 @@ class PyGTKControl():
                 for value in values:
                     definition.add_definition(value)
             definitions.append(definition)
-        return MyServerConfig(definitions)
+        return MyServerConfig(definitions + self.unknown)
 
     def on_new_menu_item_activate(self, widget = None):
+        '''Clears configuration.'''
         if widget is not None:
             self.path = None
+        self.definitions = {} # option name => corresponding Definition
+        self.unknown = [] # list of unknown definitions
         for option in self.options:
             check, field, var = self.options.get(option)
             if var != 'list':
@@ -196,8 +212,10 @@ class PyGTKControl():
                 field.get_model().clear()
 
     def set_up(self, config):
+        '''Reads configuration from given config instance.'''
         def put_to_unknown(definition):
-            pass # TODO
+            self.unknown.append(definition)
+            print('Unknown option:', definition, sep = '\n')
         self.on_new_menu_item_activate()
         for definition in config.get_definitions():
             name = definition.get_name()
@@ -224,6 +242,7 @@ class PyGTKControl():
                         (definition.get_attribute('value'), ))
 
     def construct_options(self):
+        '''Reads known options from file and prepares GUI.'''
         def make_tab_name(text):
             return text.capitalize().replace('.', ' ').replace('_', ' ')
         def make_name(text, tab):
@@ -299,7 +318,6 @@ class PyGTKControl():
             self.widgets.get_widget('notebook').append_page(
                 tabs[tab], gtk.Label(make_tab_name(tab)))
 
-        self.definitions = {} # option name => corresponding Definition
         self.on_new_menu_item_activate()
         self.widgets.get_widget('notebook').show_all()
 



commit 0162ed2c63fa02058fdcda88c6b15b124b6744a3
Author: Marek Aaron Sapota <maarons@gnu.org>
Date:   Fri Jul 17 21:48:22 2009 +0200

    SYSFOLDER => SYSROOT

diff --git a/misc/py_control_client/MyServer/pycontrollib/test/vhost_test.py b/misc/py_control_client/MyServer/pycontrollib/test/vhost_test.py
index d5e19ae..e6d84f6 100644
--- a/misc/py_control_client/MyServer/pycontrollib/test/vhost_test.py
+++ b/misc/py_control_client/MyServer/pycontrollib/test/vhost_test.py
@@ -87,15 +87,15 @@ class VHostTest(unittest.TestCase):
         vhost = VHost(doc_root = '/www')
         self.assertEqual('/www', vhost.get_doc_root())
 
-    def test_sys_folder(self):
+    def test_sys_root(self):
         vhost = VHost('test vhost', 80, 'HTTP', '/www', '/system')
-        self.assertEqual('/system', vhost.get_sys_folder())
-        vhost.set_sys_folder('/var/system')
-        self.assertEqual('/var/system', vhost.get_sys_folder())
-        vhost.set_sys_folder(None)
-        self.assertEqual(None, vhost.get_sys_folder())
-        vhost = VHost(sys_folder = '/system')
-        self.assertEqual('/system', vhost.get_sys_folder())
+        self.assertEqual('/system', vhost.get_sys_root())
+        vhost.set_sys_root('/var/system')
+        self.assertEqual('/var/system', vhost.get_sys_root())
+        vhost.set_sys_root(None)
+        self.assertEqual(None, vhost.get_sys_root())
+        vhost = VHost(sys_root = '/system')
+        self.assertEqual('/system', vhost.get_sys_root())
 
     def test_logs(self):
         a_log = Log('ACCESSLOG')
@@ -202,7 +202,7 @@ class VHostTest(unittest.TestCase):
         vhost_1.set_doc_root('/var/www')
         self.assertNotEqual(vhost_0, vhost_1)
         vhost_1 = VHost.from_string(str(vhost_0))
-        vhost_1.set_sys_folder('/var/system')
+        vhost_1.set_sys_root('/var/system')
         self.assertNotEqual(vhost_0, vhost_1)
         vhost_1 = VHost.from_string(str(vhost_0))
         vhost_1.add_log(Log('NEWLOG'))
@@ -251,10 +251,10 @@ class VHostTest(unittest.TestCase):
         right = VHost(doc_root = '/www')
         self.assertEqual(vhost, right)
 
-    def test_from_string_sys_folder(self):
-        text = '<VHOST><SYSFOLDER>/system</SYSFOLDER></VHOST>'
+    def test_from_string_sys_root(self):
+        text = '<VHOST><SYSROOT>/system</SYSROOT></VHOST>'
         vhost = VHost.from_string(text)
-        right = VHost(sys_folder = '/system')
+        right = VHost(sys_root = '/system')
         self.assertEqual(vhost, right)
 
     def test_from_string_logs(self):
@@ -293,7 +293,7 @@ class VHostTest(unittest.TestCase):
   <PORT>80</PORT>
   <PROTOCOL>HTTP</PROTOCOL>
   <DOCROOT>/www</DOCROOT>
-  <SYSFOLDER>/system</SYSFOLDER>
+  <SYSROOT>/system</SYSROOT>
   <ACCESSLOG />
   <WARNINGLOG />
   <IP>127.0.0.0/8</IP>
@@ -342,9 +342,9 @@ class VHostTest(unittest.TestCase):
         self.assertEqual(vhost, right)
 
     def test_from_lxml_sys_folder(self):
-        text = '<VHOST><SYSFOLDER>/system</SYSFOLDER></VHOST>'
+        text = '<VHOST><SYSROOT>/system</SYSROOT></VHOST>'
         vhost = VHost.from_lxml_element(etree.XML(text))
-        right = VHost(sys_folder = '/system')
+        right = VHost(sys_root = '/system')
         self.assertEqual(vhost, right)
 
     def test_from_lxml_logs(self):
@@ -383,7 +383,7 @@ class VHostTest(unittest.TestCase):
   <PORT>80</PORT>
   <PROTOCOL>HTTP</PROTOCOL>
   <DOCROOT>/www</DOCROOT>
-  <SYSFOLDER>/system</SYSFOLDER>
+  <SYSROOT>/system</SYSROOT>
   <ACCESSLOG />
   <WARNINGLOG />
   <IP>127.0.0.0/8</IP>
@@ -432,8 +432,8 @@ class VHostTest(unittest.TestCase):
         copy = VHost.from_string(str(vhost))
         self.assertEqual(vhost, copy)
 
-    def test_to_string_sys_folder(self):
-        vhost = VHost(doc_root = '/system')
+    def test_to_string_sys_root(self):
+        vhost = VHost(sys_root = '/system')
         copy = VHost.from_string(str(vhost))
         self.assertEqual(vhost, copy)
 
@@ -496,8 +496,8 @@ class VHostTest(unittest.TestCase):
         copy = VHost.from_lxml_element(vhost.to_lxml_element())
         self.assertEqual(vhost, copy)
 
-    def test_to_lxml_sys_folder(self):
-        vhost = VHost(doc_root = '/system')
+    def test_to_lxml_sys_root(self):
+        vhost = VHost(sys_root = '/system')
         copy = VHost.from_lxml_element(vhost.to_lxml_element())
         self.assertEqual(vhost, copy)
 
diff --git a/misc/py_control_client/MyServer/pycontrollib/vhost.py b/misc/py_control_client/MyServer/pycontrollib/vhost.py
index d1bd76a..54b76f2 100644
--- a/misc/py_control_client/MyServer/pycontrollib/vhost.py
+++ b/misc/py_control_client/MyServer/pycontrollib/vhost.py
@@ -21,7 +21,7 @@ from log import Log
 
 class VHost():
     def __init__(self, name = None, port = None, protocol = None,
-                 doc_root = None, sys_folder = None, logs = [],
+                 doc_root = None, sys_root = None, logs = [],
                  ip = [], host = {}, private_key = None, certificate = None):
         '''Create new instance of VHost. logs and ip are expected to be a
         collection and host is expected to be a dict {name: useRegex} where None
@@ -30,7 +30,7 @@ class VHost():
         self.set_port(port)
         self.set_protocol(protocol)
         self.set_doc_root(doc_root)
-        self.set_sys_folder(sys_folder)
+        self.set_sys_root(sys_root)
         self.logs = []
         for log in logs:
             self.add_log(log)
@@ -47,7 +47,7 @@ class VHost():
         return isinstance(other, VHost) and self.name == other.name and \
             self.port == other.port and self.protocol == other.protocol and \
             self.doc_root == other.doc_root and \
-            self.sys_folder == other.sys_folder and \
+            self.sys_root == other.sys_root and \
             self.logs == other.logs and self.ip == other.ip and \
             self.host == other.host and \
             self.private_key == other.private_key and \
@@ -69,13 +69,13 @@ class VHost():
         '''Set VHost doc root.'''
         self.doc_root = doc_root
 
-    def get_sys_folder(self):
-        '''Get VHost sys folder.'''
-        return self.sys_folder
+    def get_sys_root(self):
+        '''Get VHost sys root.'''
+        return self.sys_root
 
-    def set_sys_folder(self, sys_folder):
-        '''Set VHost sys folder.'''
-        self.sys_folder = sys_folder
+    def set_sys_root(self, sys_root):
+        '''Set VHost sys root.'''
+        self.sys_root = sys_root
 
     def get_protocol(self):
         '''Get VHost protocol.'''
@@ -174,8 +174,8 @@ class VHost():
             root.append(make_element('PROTOCOL', self.protocol))
         if self.doc_root is not None:
             root.append(make_element('DOCROOT', self.doc_root))
-        if self.sys_folder is not None:
-            root.append(make_element('SYSFOLDER', self.sys_folder))
+        if self.sys_root is not None:
+            root.append(make_element('SYSROOT', self.sys_root))
         if self.private_key is not None:
             root.append(make_element('SSL_PRIVATEKEY', self.private_key))
         if self.certificate is not None:
@@ -200,7 +200,7 @@ class VHost():
         port = None
         protocol = None
         doc_root = None
-        sys_folder = None
+        sys_root = None
         private_key = None
         certificate = None
         ip = []
@@ -215,8 +215,8 @@ class VHost():
                 protocol = child.text
             elif child.tag == 'DOCROOT':
                 doc_root = child.text
-            elif child.tag == 'SYSFOLDER':
-                sys_folder = child.text
+            elif child.tag == 'SYSROOT':
+                sys_root = child.text
             elif child.tag == 'IP':
                 ip.append(child.text)
             elif child.tag == 'HOST':
@@ -230,7 +230,7 @@ class VHost():
                 certificate = child.text
             else:
                 logs.append(Log.from_lxml_element(child))
-        return VHost(name, port, protocol, doc_root, sys_folder, logs, ip, host,
+        return VHost(name, port, protocol, doc_root, sys_root, logs, ip, host,
                      private_key, certificate)
     
     @staticmethod
diff --git a/myserver/binaries/virtualhosts.xml.unix.default b/myserver/binaries/virtualhosts.xml.unix.default
index 3d1897b..36b3b47 100755
--- a/myserver/binaries/virtualhosts.xml.unix.default
+++ b/myserver/binaries/virtualhosts.xml.unix.default
@@ -9,7 +9,7 @@
 		<PROTOCOL>HTTP</PROTOCOL>
 		
 		<DOCROOT>web</DOCROOT>
-		<SYSFOLDER>system</SYSFOLDER>
+		<SYSROOT>system</SYSROOT>
 
 		<ACCESSLOG>
                   <STREAM location="file://logs/MyServerHTTP.log" cycle="1048576"/>
@@ -27,7 +27,7 @@
 		<PROTOCOL>FTP</PROTOCOL>
 		
 		<DOCROOT>web</DOCROOT>
-		<SYSFOLDER>system</SYSFOLDER>
+		<SYSROOT>system</SYSROOT>
 		
 		<ACCESSLOG>
                   <STREAM location="file://logs/MyServerFTP.log" cycle="1048576"/>



commit fec75c5b9759f29b5a467ee8b32655f864bc82bf
Merge: 121d46c 7f0c89b
Author: Marek Aaron Sapota <maarons@gnu.org>
Date:   Fri Jul 17 21:35:10 2009 +0200

    Merge branch 'master' of git://git.savannah.gnu.org/myserver




commit 121d46c683a2a0abf3b6d51a50082aeaf6f1f006
Author: Marek Aaron Sapota <maarons@gnu.org>
Date:   Fri Jul 17 21:33:51 2009 +0200

    Perserve additional attributes of definitions.

diff --git a/misc/PyGTK_Control/MyServerControl.py b/misc/PyGTK_Control/MyServerControl.py
index e47a67b..97fd23a 100644
--- a/misc/PyGTK_Control/MyServerControl.py
+++ b/misc/PyGTK_Control/MyServerControl.py
@@ -151,17 +151,14 @@ class PyGTKControl():
             check, field, var = self.options[option]
             if not check.get_active():
                 continue
+            definition = self.definitions.get(option)
             if var == 'string':
-                definitions.append(
-                    DefinitionElement(option, {'value': field.get_text()}))
+                definition.set_attribute('value', field.get_text())
             elif var == 'integer':
-                value = str(int(field.get_value()))
-                definitions.append(
-                    DefinitionElement(option, {'value': value}))
+                definition.set_attribute('value', str(int(field.get_value())))
             elif var == 'bool':
-                value = 'YES' if field.get_active() else 'NO'
-                definitions.append(
-                    DefinitionElement(option, {'value': value}))
+                value = 'NO' if field.get_active() else 'YES'
+                definition.set_attribute('value', value)
             elif var == 'list':
                 values = []
                 model = field.get_model()
@@ -172,14 +169,22 @@ class PyGTKControl():
                 values = map(
                     lambda v: DefinitionElement(attributes = {'value': v}),
                     values)
-                definitions.append(
-                    DefinitionTree(option, values))
+                for i in xrange(len(definition.get_definitions())):
+                    definition.remove_definition(0)
+                for value in values:
+                    definition.add_definition(value)
+            definitions.append(definition)
         return MyServerConfig(definitions)
 
     def on_new_menu_item_activate(self, widget = None):
         if widget is not None:
             self.path = None
-        for check, field, var in self.options.itervalues():
+        for option in self.options:
+            check, field, var = self.options.get(option)
+            if var != 'list':
+                self.definitions[option] = DefinitionElement(option)
+            else:
+                self.definitions[option] = DefinitionTree(option)
             check.set_active(False)
             if var == 'string':
                 field.set_text('')
@@ -191,12 +196,20 @@ class PyGTKControl():
                 field.get_model().clear()
 
     def set_up(self, config):
+        def put_to_unknown(definition):
+            pass # TODO
         self.on_new_menu_item_activate()
         for definition in config.get_definitions():
             name = definition.get_name()
             if name not in self.options:
-                pass # goes to unknown
+                put_to_unknown(definition)
+                continue
             check, field, var = self.options[name]
+            if (isinstance(definition, DefinitionElement) and var == 'list') or \
+                    (isinstance(definition, DefinitionTree) and var != 'list'):
+                put_to_unknown(definition)
+                continue
+            self.definitions[name] = definition
             check.set_active(True)
             if var == 'string':
                 field.set_text(definition.get_attribute('value'))
@@ -206,13 +219,9 @@ class PyGTKControl():
                 if definition.get_attribute('value').upper() != 'YES':
                     field.set_active(1)
             elif var == 'list':
-                if isinstance(definition, DefinitionElement):
+                for definition in definition.get_definitions():
                     field.get_model().append(
                         (definition.get_attribute('value'), ))
-                else:
-                    for definition in definition.get_definitions():
-                        field.get_model().append(
-                            (definition.get_attribute('value'), ))
 
     def construct_options(self):
         def make_tab_name(text):
@@ -235,29 +244,30 @@ class PyGTKControl():
             segregated_options[tab].append(option)
 
         tabs = {}
-        self.options = {}
+        self.options = {} # option name => (CheckButton, field, type, )
         for tab in GUIConfig.tabs + ['other', 'unknown']:
             options = segregated_options.get(tab, [])
             tabs[tab] = gtk.Table(max(1, len(options)), 3)
             for i in xrange(len(options)):
                 option = options[i]
+                text, var = GUIConfig.options[option]
                 label = gtk.Label(make_name(option, tab))
-                label.set_tooltip_text(GUIConfig.options[option][0])
+                label.set_tooltip_text(text)
                 check = gtk.CheckButton()
-                if GUIConfig.options[option][1] == 'string':
+                if var == 'string':
                     field = gtk.Entry()
                     self.options[option] = (check, field, 'string', )
-                elif GUIConfig.options[option][1] == 'integer':
+                elif var == 'integer':
                     field = gtk.SpinButton(gtk.Adjustment(
                             0, 0, 2147483647, 1))
                     self.options[option] = (check, field, 'integer', )
-                elif GUIConfig.options[option][1] == 'bool':
+                elif var == 'bool':
                     field = gtk.combo_box_new_text()
                     field.append_text('yes')
                     field.append_text('no')
                     field.set_active(0)
                     self.options[option] = (check, field, 'bool', )
-                elif GUIConfig.options[option][1] == 'list':
+                elif var == 'list':
                     tree  = gtk.TreeView(gtk.ListStore(gobject.TYPE_STRING))
                     tree.set_headers_visible(False)
                     tree_column = gtk.TreeViewColumn()
@@ -278,9 +288,9 @@ class PyGTKControl():
                         new_name.set_text('')
                     add_button.connect('clicked', add_to_list)
                     def remove_from_list(button):
-                        selected = tree.get_selection().get_selected()
-                        if selected[1] is not None:
-                            selected[0].remove(selected[1])
+                        model, selected = tree.get_selection().get_selected()
+                        if selected is not None:
+                            model.remove(selected)
                     remove_button.connect('clicked', remove_from_list)
                     self.options[option] = (check, tree, 'list', )
                 tabs[tab].attach(check, 0, 1, i, i + 1, gtk.FILL, gtk.FILL)
@@ -289,6 +299,8 @@ class PyGTKControl():
             self.widgets.get_widget('notebook').append_page(
                 tabs[tab], gtk.Label(make_tab_name(tab)))
 
+        self.definitions = {} # option name => corresponding Definition
+        self.on_new_menu_item_activate()
         self.widgets.get_widget('notebook').show_all()
 
 PyGTKControl()



commit 179a48e1d95df03a971357c1382463afe26c3960
Author: Marek Aaron Sapota <maarons@gnu.org>
Date:   Fri Jul 17 16:13:55 2009 +0200

    Implemented getting/putting config on server.

diff --git a/misc/PyGTK_Control/MyServerControl.py b/misc/PyGTK_Control/MyServerControl.py
index d93719a..e47a67b 100644
--- a/misc/PyGTK_Control/MyServerControl.py
+++ b/misc/PyGTK_Control/MyServerControl.py
@@ -21,9 +21,12 @@ import gobject
 import gtk.glade
 import GUIConfig
 from MyServer.pycontrollib.config import MyServerConfig
+from MyServer.pycontrollib.controller import Controller
 from MyServer.pycontrollib.definition import DefinitionElement, DefinitionTree
 
 class About():
+    '''GNU MyServer Control about window.'''
+
     def __init__(self):
         self.gladefile = 'PyGTKControl.glade'
         self.widgets = gtk.glade.XML(self.gladefile, 'aboutdialog')
@@ -32,24 +35,75 @@ class About():
     def on_aboutdialog_response(self, widget, response):
         widget.destroy()
 
+class Connection():
+    def __init__(self):
+        self.gladefile = 'PyGTKControl.glade'
+        self.widgets = gtk.glade.XML(self.gladefile, 'connectiondialog')
+        self.widgets.signal_autoconnect(self)
+
+    def destroy(self):
+        self.widgets.get_widget('connectiondialog').destroy()
+        
+    def on_cancel_button_clicked(self, widget):
+        self.destroy()
+    
+    def get_host(self):
+        return self.widgets.get_widget('host_entry').get_text()
+
+    def get_port(self):
+        return self.widgets.get_widget('port_entry').get_text()
+
+    def get_username(self):
+        return self.widgets.get_widget('username_entry').get_text()
+
+    def get_password(self):
+        return self.widgets.get_widget('password_entry').get_text()
+
 class PyGTKControl():
+    '''GNU MyServer Control main window.'''
+
     def __init__(self):
         self.gladefile = 'PyGTKControl.glade'
         self.widgets = gtk.glade.XML(self.gladefile, 'window')
         self.widgets.signal_autoconnect(self)
         self.construct_options()
-        self.chooser = None
-        self.path = None
+        self.chooser = None # Active file chooser
+        self.path = None # path of currently edited file
+        self.controller = None
 
     def on_window_destroy(self, widget):
         gtk.main_quit()
-        
+
     def on_quit_menu_item_activate(self, widget):
         gtk.main_quit()
 
     def on_about_menu_item_activate(self, widget):
         About()
 
+    def on_connect_menu_item_activate(self, widget):
+        dialog = Connection()
+        def connect(widget):
+            self.controller = Controller(
+                dialog.get_host(), dialog.get_port(),
+                dialog.get_username(), dialog.get_password())
+            self.controller.connect()
+            dialog.destroy()
+        dialog.widgets.get_widget('ok_button').connect('clicked', connect)
+        dialog.widgets.get_widget('connectiondialog').show()
+
+    def on_disconnect_menu_item_activate(self, widget):
+        if self.controller is not None:
+            self.controller.disconnect()
+        self.controller = None
+
+    def on_get_config_menu_item_activate(self, widget):
+        if self.controller is not None:
+            self.set_up(self.controller.get_server_configuration())
+
+    def on_put_config_menu_item_activate(self, widget):
+        if self.controller is not None:
+            self.controller.put_server_configuration(self.get_current_config())
+
     def on_open_menu_item_activate(self, widget):
         if self.chooser is not None:
             self.chooser.destroy()
@@ -62,7 +116,7 @@ class PyGTKControl():
                 self.path = self.chooser.get_filename()
                 with open(self.path) as f:
                     conf = MyServerConfig.from_string(f.read())
-                self.set_up(conf.get_definitions())
+                self.set_up(conf)
             self.chooser.destroy()
         self.chooser.connect('response', handle_response)
         self.chooser.show()
@@ -87,37 +141,40 @@ class PyGTKControl():
         if self.path is None:
             self.on_save_as_menu_item_activate(widget)
         else:
-            definitions = []
-            for option in self.options:
-                check, field, var = self.options[option]
-                if not check.get_active():
-                    continue
-                if var == 'string':
-                    definitions.append(
-                        DefinitionElement(option, {'value': field.get_text()}))
-                elif var == 'integer':
-                    value = str(int(field.get_value()))
-                    definitions.append(
-                        DefinitionElement(option, {'value': value}))
-                elif var == 'bool':
-                    value = 'YES' if field.get_active() else 'NO'
-                    definitions.append(
-                        DefinitionElement(option, {'value': value}))
-                elif var == 'list':
-                    values = []
-                    model = field.get_model()
-                    i = model.iter_children(None)
-                    while i is not None:
-                        values.append(model.get_value(i, 0))
-                        i = model.iter_next(i)
-                    values = map(
-                        lambda v: DefinitionElement(attributes = {'value': v}),
-                        values)
-                    definitions.append(
-                        DefinitionTree(option, values))
-            config = MyServerConfig(definitions)
+            config = self.get_current_config()
             with open(self.path, 'w') as f:
                 f.write(str(config))
+    
+    def get_current_config(self):
+        definitions = []
+        for option in self.options:
+            check, field, var = self.options[option]
+            if not check.get_active():
+                continue
+            if var == 'string':
+                definitions.append(
+                    DefinitionElement(option, {'value': field.get_text()}))
+            elif var == 'integer':
+                value = str(int(field.get_value()))
+                definitions.append(
+                    DefinitionElement(option, {'value': value}))
+            elif var == 'bool':
+                value = 'YES' if field.get_active() else 'NO'
+                definitions.append(
+                    DefinitionElement(option, {'value': value}))
+            elif var == 'list':
+                values = []
+                model = field.get_model()
+                i = model.iter_children(None)
+                while i is not None:
+                    values.append(model.get_value(i, 0))
+                    i = model.iter_next(i)
+                values = map(
+                    lambda v: DefinitionElement(attributes = {'value': v}),
+                    values)
+                definitions.append(
+                    DefinitionTree(option, values))
+        return MyServerConfig(definitions)
 
     def on_new_menu_item_activate(self, widget = None):
         if widget is not None:
@@ -133,9 +190,9 @@ class PyGTKControl():
             elif var == 'list':
                 field.get_model().clear()
 
-    def set_up(self, definitions):
+    def set_up(self, config):
         self.on_new_menu_item_activate()
-        for definition in definitions:
+        for definition in config.get_definitions():
             name = definition.get_name()
             if name not in self.options:
                 pass # goes to unknown
@@ -165,6 +222,7 @@ class PyGTKControl():
                 return text
             return text[len(tab):].replace('.', ' ').replace('_', ' ').strip()
 
+        # segregate options by tab
         segregated_options = {}
         for option in GUIConfig.options:
             tab = 'other'
@@ -175,7 +233,7 @@ class PyGTKControl():
             if not segregated_options.has_key(tab):
                 segregated_options[tab] = []
             segregated_options[tab].append(option)
-                
+
         tabs = {}
         self.options = {}
         for tab in GUIConfig.tabs + ['other', 'unknown']:
diff --git a/misc/PyGTK_Control/PyGTKControl.glade b/misc/PyGTK_Control/PyGTKControl.glade
index a2dc9be..b426812 100644
--- a/misc/PyGTK_Control/PyGTKControl.glade
+++ b/misc/PyGTK_Control/PyGTKControl.glade
@@ -75,6 +75,69 @@
               </widget>
             </child>
             <child>
+              <widget class="GtkMenuItem" id="remote_menu_item">
+                <property name="visible">True</property>
+                <property name="label" translatable="yes">_Remote</property>
+                <property name="use_underline">True</property>
+                <child>
+                  <widget class="GtkMenu" id="remote_menu">
+                    <property name="visible">True</property>
+                    <child>
+                      <widget class="GtkImageMenuItem" id="connect_menu_item">
+                        <property name="label">gtk-connect</property>
+                        <property name="visible">True</property>
+                        <property name="use_underline">True</property>
+                        <property name="use_stock">True</property>
+                        <signal name="activate" handler="on_connect_menu_item_activate"/>
+                      </widget>
+                    </child>
+                    <child>
+                      <widget class="GtkImageMenuItem" id="disconnect_menu_item">
+                        <property name="label">gtk-disconnect</property>
+                        <property name="visible">True</property>
+                        <property name="use_underline">True</property>
+                        <property name="use_stock">True</property>
+                        <signal name="activate" handler="on_disconnect_menu_item_activate"/>
+                      </widget>
+                    </child>
+                    <child>
+                      <widget class="GtkSeparatorMenuItem" id="separator2">
+                        <property name="visible">True</property>
+                      </widget>
+                    </child>
+                    <child>
+                      <widget class="GtkImageMenuItem" id="get_config_menu_item">
+                        <property name="label">Get configuration</property>
+                        <property name="visible">True</property>
+                        <property name="use_stock">False</property>
+                        <signal name="activate" handler="on_get_config_menu_item_activate"/>
+                        <child internal-child="image">
+                          <widget class="GtkImage" id="get_config_image">
+                            <property name="visible">True</property>
+                            <property name="stock">gtk-go-down</property>
+                          </widget>
+                        </child>
+                      </widget>
+                    </child>
+                    <child>
+                      <widget class="GtkImageMenuItem" id="put_config_menu_item">
+                        <property name="label">Put configuration</property>
+                        <property name="visible">True</property>
+                        <property name="use_stock">False</property>
+                        <signal name="activate" handler="on_put_config_menu_item_activate"/>
+                        <child internal-child="image">
+                          <widget class="GtkImage" id="put_config_image">
+                            <property name="visible">True</property>
+                            <property name="stock">gtk-redo</property>
+                          </widget>
+                        </child>
+                      </widget>
+                    </child>
+                  </widget>
+                </child>
+              </widget>
+            </child>
+            <child>
               <widget class="GtkMenuItem" id="help_menu_item">
                 <property name="visible">True</property>
                 <property name="label" translatable="yes">_Help</property>
@@ -834,4 +897,163 @@ Public License instead of this License.  But first, please read
       </widget>
     </child>
   </widget>
+  <widget class="GtkDialog" id="connectiondialog">
+    <property name="border_width">5</property>
+    <property name="type_hint">normal</property>
+    <property name="has_separator">False</property>
+    <child internal-child="vbox">
+      <widget class="GtkVBox" id="dialog-vbox">
+        <property name="visible">True</property>
+        <property name="orientation">vertical</property>
+        <property name="spacing">2</property>
+        <child>
+          <widget class="GtkTable" id="table">
+            <property name="visible">True</property>
+            <property name="n_rows">4</property>
+            <property name="n_columns">2</property>
+            <child>
+              <widget class="GtkLabel" id="host_label">
+                <property name="visible">True</property>
+                <property name="label" translatable="yes">host</property>
+              </widget>
+              <packing>
+                <property name="y_options">GTK_FILL</property>
+              </packing>
+            </child>
+            <child>
+              <widget class="GtkLabel" id="port_label">
+                <property name="visible">True</property>
+                <property name="label" translatable="yes">port</property>
+              </widget>
+              <packing>
+                <property name="top_attach">1</property>
+                <property name="bottom_attach">2</property>
+                <property name="y_options">GTK_FILL</property>
+              </packing>
+            </child>
+            <child>
+              <widget class="GtkLabel" id="username_label">
+                <property name="visible">True</property>
+                <property name="label" translatable="yes">username</property>
+              </widget>
+              <packing>
+                <property name="top_attach">2</property>
+                <property name="bottom_attach">3</property>
+                <property name="y_options">GTK_FILL</property>
+              </packing>
+            </child>
+            <child>
+              <widget class="GtkLabel" id="password_label">
+                <property name="visible">True</property>
+                <property name="label" translatable="yes">password</property>
+              </widget>
+              <packing>
+                <property name="top_attach">3</property>
+                <property name="bottom_attach">4</property>
+                <property name="y_options">GTK_FILL</property>
+              </packing>
+            </child>
+            <child>
+              <widget class="GtkEntry" id="host_entry">
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="invisible_char">&#x25CF;</property>
+              </widget>
+              <packing>
+                <property name="left_attach">1</property>
+                <property name="right_attach">2</property>
+                <property name="y_options">GTK_FILL</property>
+              </packing>
+            </child>
+            <child>
+              <widget class="GtkEntry" id="port_entry">
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="invisible_char">&#x25CF;</property>
+              </widget>
+              <packing>
+                <property name="left_attach">1</property>
+                <property name="right_attach">2</property>
+                <property name="top_attach">1</property>
+                <property name="bottom_attach">2</property>
+                <property name="y_options">GTK_FILL</property>
+              </packing>
+            </child>
+            <child>
+              <widget class="GtkEntry" id="username_entry">
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="invisible_char">&#x25CF;</property>
+              </widget>
+              <packing>
+                <property name="left_attach">1</property>
+                <property name="right_attach">2</property>
+                <property name="top_attach">2</property>
+                <property name="bottom_attach">3</property>
+                <property name="y_options">GTK_FILL</property>
+              </packing>
+            </child>
+            <child>
+              <widget class="GtkEntry" id="password_entry">
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="invisible_char">&#x25CF;</property>
+              </widget>
+              <packing>
+                <property name="left_attach">1</property>
+                <property name="right_attach">2</property>
+                <property name="top_attach">3</property>
+                <property name="bottom_attach">4</property>
+                <property name="y_options">GTK_FILL</property>
+              </packing>
+            </child>
+          </widget>
+          <packing>
+            <property name="position">1</property>
+          </packing>
+        </child>
+        <child internal-child="action_area">
+          <widget class="GtkHButtonBox" id="dialog-action_area">
+            <property name="visible">True</property>
+            <property name="layout_style">end</property>
+            <child>
+              <widget class="GtkButton" id="cancel_button">
+                <property name="label">gtk-cancel</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">True</property>
+                <property name="use_stock">True</property>
+                <signal name="clicked" handler="on_cancel_button_clicked"/>
+              </widget>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">0</property>
+              </packing>
+            </child>
+            <child>
+              <widget class="GtkButton" id="ok_button">
+                <property name="label">gtk-ok</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">True</property>
+                <property name="use_stock">True</property>
+                <signal name="clicked" handler="on_ok_button_clicked"/>
+              </widget>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">1</property>
+              </packing>
+            </child>
+          </widget>
+          <packing>
+            <property name="expand">False</property>
+            <property name="pack_type">end</property>
+            <property name="position">0</property>
+          </packing>
+        </child>
+      </widget>
+    </child>
+  </widget>
 </glade-interface>



commit a12bca3717a6645005f19289d03431ed5d2c9cf0
Author: Marek Aaron Sapota <maarons@gnu.org>
Date:   Fri Jul 17 16:06:19 2009 +0200

    Added methods to put configuration files back on server.

diff --git a/misc/py_control_client/MyServer/pycontrollib/controller.py b/misc/py_control_client/MyServer/pycontrollib/controller.py
index 7eecdee..64cb7c6 100644
--- a/misc/py_control_client/MyServer/pycontrollib/controller.py
+++ b/misc/py_control_client/MyServer/pycontrollib/controller.py
@@ -131,3 +131,15 @@ class Controller(BasicController):
     def get_server_configuration(self):
         '''Get server settings.'''
         return MyServerConfig.from_string(self.get_file('myserver.xml'))
+
+    def put_MIME_type_configuration(self, config):
+        '''Put MIME types settings.'''
+        self.put_file(str(config), 'mimetypes.xml')
+
+    def put_vhost_configuration(self, config):
+        '''Put VHost settings.'''
+        self.put_file(str(config), 'virtualhosts.xml')
+
+    def put_server_configuration(self, config):
+        '''Put server settings.'''
+        self.put_file(str(config), 'myserver.xml')



commit d0d888d3379c57f14ee36216d6ba5c4c9a74c075
Author: Marek Aaron Sapota <maarons@gnu.org>
Date:   Fri Jul 17 15:56:44 2009 +0200

    Auto change port to int.

diff --git a/misc/py_control_client/MyServer/pycontrollib/controller.py b/misc/py_control_client/MyServer/pycontrollib/controller.py
index 847d93d..7eecdee 100644
--- a/misc/py_control_client/MyServer/pycontrollib/controller.py
+++ b/misc/py_control_client/MyServer/pycontrollib/controller.py
@@ -29,7 +29,7 @@ class BasicController():
     def __init__(self, host, port, username, password):
         self.connection = None
         self.host = host
-        self.port = port
+        self.port = int(port)
         self.username = username
         self.password = password
 



commit fabadfef11cb000eb1c9d42a21348fb89de40e24
Author: Marek Aaron Sapota <maarons@gnu.org>
Date:   Thu Jul 16 21:50:15 2009 +0200

    Implemented save and save as.

diff --git a/misc/PyGTK_Control/MyServerControl.py b/misc/PyGTK_Control/MyServerControl.py
index 19d5896..d93719a 100644
--- a/misc/PyGTK_Control/MyServerControl.py
+++ b/misc/PyGTK_Control/MyServerControl.py
@@ -39,6 +39,7 @@ class PyGTKControl():
         self.widgets.signal_autoconnect(self)
         self.construct_options()
         self.chooser = None
+        self.path = None
 
     def on_window_destroy(self, widget):
         gtk.main_quit()
@@ -58,15 +59,69 @@ class PyGTKControl():
                        gtk.STOCK_OPEN, gtk.RESPONSE_OK))
         def handle_response(widget, response):
             if response == gtk.RESPONSE_OK:
-                path = self.chooser.get_filename()
-                with open(path) as f:
+                self.path = self.chooser.get_filename()
+                with open(self.path) as f:
                     conf = MyServerConfig.from_string(f.read())
                 self.set_up(conf.get_definitions())
             self.chooser.destroy()
         self.chooser.connect('response', handle_response)
         self.chooser.show()
 
+    def on_save_as_menu_item_activate(self, widget):
+        if self.chooser is not None:
+            self.chooser.destroy()
+        self.chooser = gtk.FileChooserDialog(
+            'Save configuration file.',
+            action = gtk.FILE_CHOOSER_ACTION_SAVE,
+            buttons = (gtk.STOCK_CANCEL, gtk.RESPONSE_CANCEL,
+                       gtk.STOCK_SAVE_AS, gtk.RESPONSE_OK))
+        def handle_response(widget, response):
+            if response == gtk.RESPONSE_OK:
+                self.path = self.chooser.get_filename()
+                self.on_save_menu_item_activate(widget)
+            self.chooser.destroy()
+        self.chooser.connect('response', handle_response)
+        self.chooser.show()
+
+    def on_save_menu_item_activate(self, widget):
+        if self.path is None:
+            self.on_save_as_menu_item_activate(widget)
+        else:
+            definitions = []
+            for option in self.options:
+                check, field, var = self.options[option]
+                if not check.get_active():
+                    continue
+                if var == 'string':
+                    definitions.append(
+                        DefinitionElement(option, {'value': field.get_text()}))
+                elif var == 'integer':
+                    value = str(int(field.get_value()))
+                    definitions.append(
+                        DefinitionElement(option, {'value': value}))
+                elif var == 'bool':
+                    value = 'YES' if field.get_active() else 'NO'
+                    definitions.append(
+                        DefinitionElement(option, {'value': value}))
+                elif var == 'list':
+                    values = []
+                    model = field.get_model()
+                    i = model.iter_children(None)
+                    while i is not None:
+                        values.append(model.get_value(i, 0))
+                        i = model.iter_next(i)
+                    values = map(
+                        lambda v: DefinitionElement(attributes = {'value': v}),
+                        values)
+                    definitions.append(
+                        DefinitionTree(option, values))
+            config = MyServerConfig(definitions)
+            with open(self.path, 'w') as f:
+                f.write(str(config))
+
     def on_new_menu_item_activate(self, widget = None):
+        if widget is not None:
+            self.path = None
         for check, field, var in self.options.itervalues():
             check.set_active(False)
             if var == 'string':



commit a11d241ee8b86aa95f309bcd97f3b17450f9028c
Author: Marek Aaron Sapota <maarons@gnu.org>
Date:   Thu Jul 16 21:04:57 2009 +0200

    Removed combobox option.

diff --git a/misc/PyGTK_Control/GUIConfig.py b/misc/PyGTK_Control/GUIConfig.py
index 1036e63..60edc00 100644
--- a/misc/PyGTK_Control/GUIConfig.py
+++ b/misc/PyGTK_Control/GUIConfig.py
@@ -38,7 +38,7 @@ options['http.home_directory'] = ('Define name for home directory browsing.', 's
 options['http.default_file'] = ('Default filename to send in a directory if the file isn\'t in the path then the directory content is sent.', 'list', )
 
 # Server
-options['server.language'] = ('Choose the language to use for the server.', 'combobox', )
+options['server.language'] = ('Choose the language to use for the server.', 'string', )
 options['server.verbosity'] = ('Verbosity on log file.', 'integer', )
 options['server.static_threads'] = ('Number of serving threads always active.', 'integer', )
 options['server.max_threads'] = ('Maximum number of serving threads that the scheduler can create.', 'integer', )
diff --git a/misc/PyGTK_Control/MyServerControl.py b/misc/PyGTK_Control/MyServerControl.py
index ff4e689..19d5896 100644
--- a/misc/PyGTK_Control/MyServerControl.py
+++ b/misc/PyGTK_Control/MyServerControl.py
@@ -77,8 +77,6 @@ class PyGTKControl():
                 field.set_active(0)
             elif var == 'list':
                 field.get_model().clear()
-            elif var == 'combobox':
-                field.get_model().clear()
 
     def set_up(self, definitions):
         self.on_new_menu_item_activate()
@@ -103,8 +101,6 @@ class PyGTKControl():
                     for definition in definition.get_definitions():
                         field.get_model().append(
                             (definition.get_attribute('value'), ))
-            elif var == 'combobox':
-                pass # TODO
 
     def construct_options(self):
         def make_tab_name(text):
@@ -148,9 +144,6 @@ class PyGTKControl():
                     field.append_text('no')
                     field.set_active(0)
                     self.options[option] = (check, field, 'bool', )
-                elif GUIConfig.options[option][1] == 'combobox':
-                    field = gtk.combo_box_new_text()
-                    self.options[option] = (check, field, 'combobox', )
                 elif GUIConfig.options[option][1] == 'list':
                     tree  = gtk.TreeView(gtk.ListStore(gobject.TYPE_STRING))
                     tree.set_headers_visible(False)



commit 1d19d2a6c91aafc7c351524f55138ebe760bc30c
Author: Marek Aaron Sapota <maarons@gnu.org>
Date:   Thu Jul 16 20:53:23 2009 +0200

    File opening in MyServercontrol.

diff --git a/misc/PyGTK_Control/MyServerControl.py b/misc/PyGTK_Control/MyServerControl.py
index 2fbcc5d..ff4e689 100644
--- a/misc/PyGTK_Control/MyServerControl.py
+++ b/misc/PyGTK_Control/MyServerControl.py
@@ -20,6 +20,8 @@ import gtk
 import gobject
 import gtk.glade
 import GUIConfig
+from MyServer.pycontrollib.config import MyServerConfig
+from MyServer.pycontrollib.definition import DefinitionElement, DefinitionTree
 
 class About():
     def __init__(self):
@@ -36,6 +38,7 @@ class PyGTKControl():
         self.widgets = gtk.glade.XML(self.gladefile, 'window')
         self.widgets.signal_autoconnect(self)
         self.construct_options()
+        self.chooser = None
 
     def on_window_destroy(self, widget):
         gtk.main_quit()
@@ -46,7 +49,24 @@ class PyGTKControl():
     def on_about_menu_item_activate(self, widget):
         About()
 
-    def on_new_menu_item_activate(self, widget):
+    def on_open_menu_item_activate(self, widget):
+        if self.chooser is not None:
+            self.chooser.destroy()
+        self.chooser = gtk.FileChooserDialog(
+            'Open configuration file.',
+            buttons = (gtk.STOCK_CANCEL, gtk.RESPONSE_CANCEL,
+                       gtk.STOCK_OPEN, gtk.RESPONSE_OK))
+        def handle_response(widget, response):
+            if response == gtk.RESPONSE_OK:
+                path = self.chooser.get_filename()
+                with open(path) as f:
+                    conf = MyServerConfig.from_string(f.read())
+                self.set_up(conf.get_definitions())
+            self.chooser.destroy()
+        self.chooser.connect('response', handle_response)
+        self.chooser.show()
+
+    def on_new_menu_item_activate(self, widget = None):
         for check, field, var in self.options.itervalues():
             check.set_active(False)
             if var == 'string':
@@ -60,6 +80,32 @@ class PyGTKControl():
             elif var == 'combobox':
                 field.get_model().clear()
 
+    def set_up(self, definitions):
+        self.on_new_menu_item_activate()
+        for definition in definitions:
+            name = definition.get_name()
+            if name not in self.options:
+                pass # goes to unknown
+            check, field, var = self.options[name]
+            check.set_active(True)
+            if var == 'string':
+                field.set_text(definition.get_attribute('value'))
+            elif var == 'integer':
+                field.set_value(int(definition.get_attribute('value')))
+            elif var == 'bool':
+                if definition.get_attribute('value').upper() != 'YES':
+                    field.set_active(1)
+            elif var == 'list':
+                if isinstance(definition, DefinitionElement):
+                    field.get_model().append(
+                        (definition.get_attribute('value'), ))
+                else:
+                    for definition in definition.get_definitions():
+                        field.get_model().append(
+                            (definition.get_attribute('value'), ))
+            elif var == 'combobox':
+                pass # TODO
+
     def construct_options(self):
         def make_tab_name(text):
             return text.capitalize().replace('.', ' ').replace('_', ' ')
diff --git a/misc/PyGTK_Control/PyGTKControl.glade b/misc/PyGTK_Control/PyGTKControl.glade
index e531e07..a2dc9be 100644
--- a/misc/PyGTK_Control/PyGTKControl.glade
+++ b/misc/PyGTK_Control/PyGTKControl.glade
@@ -35,6 +35,7 @@
                         <property name="visible">True</property>
                         <property name="use_underline">True</property>
                         <property name="use_stock">True</property>
+                        <signal name="activate" handler="on_open_menu_item_activate"/>
                       </widget>
                     </child>
                     <child>
@@ -43,6 +44,7 @@
                         <property name="visible">True</property>
                         <property name="use_underline">True</property>
                         <property name="use_stock">True</property>
+                        <signal name="activate" handler="on_save_menu_item_activate"/>
                       </widget>
                     </child>
                     <child>
@@ -51,6 +53,7 @@
                         <property name="visible">True</property>
                         <property name="use_underline">True</property>
                         <property name="use_stock">True</property>
+                        <signal name="activate" handler="on_save_as_menu_item_activate"/>
                       </widget>
                     </child>
                     <child>



commit 790c62ddd0e69e123cf9e9096e1e3da239c2ad51
Author: Marek Aaron Sapota <maarons@gnu.org>
Date:   Thu Jul 16 20:10:38 2009 +0200

    Accept lower case "yes".

diff --git a/misc/py_control_client/MyServer/pycontrollib/log.py b/misc/py_control_client/MyServer/pycontrollib/log.py
index c9dbaf3..eeed6da 100644
--- a/misc/py_control_client/MyServer/pycontrollib/log.py
+++ b/misc/py_control_client/MyServer/pycontrollib/log.py
@@ -96,7 +96,7 @@ class Stream():
         cycle = root.get('cycle', None)
         cycle_gzip = root.get('cycle_gzip', None)
         if cycle_gzip is not None:
-            cycle_gzip = True if cycle_gzip == 'YES' else False
+            cycle_gzip = cycle_gzip.upper() == 'YES'
         filters = []
         for child in list(root):
             if child.tag == 'FILTER':
diff --git a/misc/py_control_client/MyServer/pycontrollib/mimetypes.py b/misc/py_control_client/MyServer/pycontrollib/mimetypes.py
index 1f0bdde..43a13cb 100644
--- a/misc/py_control_client/MyServer/pycontrollib/mimetypes.py
+++ b/misc/py_control_client/MyServer/pycontrollib/mimetypes.py
@@ -180,7 +180,7 @@ class MIMEType():
         param = root.get('param', None)
         self_executed = root.get('self', None)
         if self_executed is not None:
-            self_executed = self_executed == 'YES'
+            self_executed = self_executed.upper() == 'YES'
         path = None
         extension = set()
         filters = []
diff --git a/misc/py_control_client/MyServer/pycontrollib/vhost.py b/misc/py_control_client/MyServer/pycontrollib/vhost.py
index 4609774..d1bd76a 100644
--- a/misc/py_control_client/MyServer/pycontrollib/vhost.py
+++ b/misc/py_control_client/MyServer/pycontrollib/vhost.py
@@ -222,7 +222,7 @@ class VHost():
             elif child.tag == 'HOST':
                 use_regex = child.get('useRegex', None)
                 if use_regex is not None:
-                    use_regex = use_regex == 'YES'
+                    use_regex = use_regex.upper() == 'YES'
                 host[child.text] = use_regex
             elif child.tag == 'SSL_PRIVATEKEY':
                 private_key = child.text



commit c993a0924b9857894396d3c5a08340bba10f7725
Author: Marek Aaron Sapota <maarons@gnu.org>
Date:   Thu Jul 16 17:10:51 2009 +0200

    Implemented menu->new

diff --git a/misc/PyGTK_Control/MyServerControl.py b/misc/PyGTK_Control/MyServerControl.py
index 54f54a1..2fbcc5d 100644
--- a/misc/PyGTK_Control/MyServerControl.py
+++ b/misc/PyGTK_Control/MyServerControl.py
@@ -46,6 +46,20 @@ class PyGTKControl():
     def on_about_menu_item_activate(self, widget):
         About()
 
+    def on_new_menu_item_activate(self, widget):
+        for check, field, var in self.options.itervalues():
+            check.set_active(False)
+            if var == 'string':
+                field.set_text('')
+            elif var == 'integer':
+                field.set_value(0)
+            elif var == 'bool':
+                field.set_active(0)
+            elif var == 'list':
+                field.get_model().clear()
+            elif var == 'combobox':
+                field.get_model().clear()
+
     def construct_options(self):
         def make_tab_name(text):
             return text.capitalize().replace('.', ' ').replace('_', ' ')
@@ -66,6 +80,7 @@ class PyGTKControl():
             segregated_options[tab].append(option)
                 
         tabs = {}
+        self.options = {}
         for tab in GUIConfig.tabs + ['other', 'unknown']:
             options = segregated_options.get(tab, [])
             tabs[tab] = gtk.Table(max(1, len(options)), 3)
@@ -76,15 +91,20 @@ class PyGTKControl():
                 check = gtk.CheckButton()
                 if GUIConfig.options[option][1] == 'string':
                     field = gtk.Entry()
+                    self.options[option] = (check, field, 'string', )
                 elif GUIConfig.options[option][1] == 'integer':
-                    field = gtk.SpinButton()
+                    field = gtk.SpinButton(gtk.Adjustment(
+                            0, 0, 2147483647, 1))
+                    self.options[option] = (check, field, 'integer', )
                 elif GUIConfig.options[option][1] == 'bool':
                     field = gtk.combo_box_new_text()
                     field.append_text('yes')
                     field.append_text('no')
                     field.set_active(0)
+                    self.options[option] = (check, field, 'bool', )
                 elif GUIConfig.options[option][1] == 'combobox':
                     field = gtk.combo_box_new_text()
+                    self.options[option] = (check, field, 'combobox', )
                 elif GUIConfig.options[option][1] == 'list':
                     tree  = gtk.TreeView(gtk.ListStore(gobject.TYPE_STRING))
                     tree.set_headers_visible(False)
@@ -110,6 +130,7 @@ class PyGTKControl():
                         if selected[1] is not None:
                             selected[0].remove(selected[1])
                     remove_button.connect('clicked', remove_from_list)
+                    self.options[option] = (check, tree, 'list', )
                 tabs[tab].attach(check, 0, 1, i, i + 1, gtk.FILL, gtk.FILL)
                 tabs[tab].attach(label, 1, 2, i, i + 1, yoptions = gtk.FILL)
                 tabs[tab].attach(field, 2, 3, i, i + 1, yoptions = gtk.FILL)
diff --git a/misc/PyGTK_Control/PyGTKControl.glade b/misc/PyGTK_Control/PyGTKControl.glade
index 6c3dcb4..e531e07 100644
--- a/misc/PyGTK_Control/PyGTKControl.glade
+++ b/misc/PyGTK_Control/PyGTKControl.glade
@@ -26,6 +26,7 @@
                         <property name="visible">True</property>
                         <property name="use_underline">True</property>
                         <property name="use_stock">True</property>
+                        <signal name="activate" handler="on_new_menu_item_activate"/>
                       </widget>
                     </child>
                     <child>



commit be87aa94c3a48fe25109f269ecc8dfaf82b68397
Author: Marek Aaron Sapota <maarons@gnu.org>
Date:   Thu Jul 16 16:01:41 2009 +0200

    Added about window.

diff --git a/misc/PyGTK_Control/MyServerControl.py b/misc/PyGTK_Control/MyServerControl.py
index c78242c..54f54a1 100644
--- a/misc/PyGTK_Control/MyServerControl.py
+++ b/misc/PyGTK_Control/MyServerControl.py
@@ -21,6 +21,15 @@ import gobject
 import gtk.glade
 import GUIConfig
 
+class About():
+    def __init__(self):
+        self.gladefile = 'PyGTKControl.glade'
+        self.widgets = gtk.glade.XML(self.gladefile, 'aboutdialog')
+        self.widgets.signal_autoconnect(self)
+
+    def on_aboutdialog_response(self, widget, response):
+        widget.destroy()
+
 class PyGTKControl():
     def __init__(self):
         self.gladefile = 'PyGTKControl.glade'
@@ -30,6 +39,12 @@ class PyGTKControl():
 
     def on_window_destroy(self, widget):
         gtk.main_quit()
+        
+    def on_quit_menu_item_activate(self, widget):
+        gtk.main_quit()
+
+    def on_about_menu_item_activate(self, widget):
+        About()
 
     def construct_options(self):
         def make_tab_name(text):
diff --git a/misc/PyGTK_Control/PyGTKControl.glade b/misc/PyGTK_Control/PyGTKControl.glade
index 80adba3..6c3dcb4 100644
--- a/misc/PyGTK_Control/PyGTKControl.glade
+++ b/misc/PyGTK_Control/PyGTKControl.glade
@@ -10,18 +10,18 @@
         <property name="visible">True</property>
         <property name="orientation">vertical</property>
         <child>
-          <widget class="GtkMenuBar" id="menubar1">
+          <widget class="GtkMenuBar" id="menubar">
             <property name="visible">True</property>
             <child>
-              <widget class="GtkMenuItem" id="menuitem1">
+              <widget class="GtkMenuItem" id="file_menu_item">
                 <property name="visible">True</property>
                 <property name="label" translatable="yes">_File</property>
                 <property name="use_underline">True</property>
                 <child>
-                  <widget class="GtkMenu" id="menu1">
+                  <widget class="GtkMenu" id="file_menu">
                     <property name="visible">True</property>
                     <child>
-                      <widget class="GtkImageMenuItem" id="imagemenuitem1">
+                      <widget class="GtkImageMenuItem" id="new_menu_item">
                         <property name="label">gtk-new</property>
                         <property name="visible">True</property>
                         <property name="use_underline">True</property>
@@ -29,7 +29,7 @@
                       </widget>
                     </child>
                     <child>
-                      <widget class="GtkImageMenuItem" id="imagemenuitem2">
+                      <widget class="GtkImageMenuItem" id="open_menu_item">
                         <property name="label">gtk-open</property>
                         <property name="visible">True</property>
                         <property name="use_underline">True</property>
@@ -37,7 +37,7 @@
                       </widget>
                     </child>
                     <child>
-                      <widget class="GtkImageMenuItem" id="imagemenuitem3">
+                      <widget class="GtkImageMenuItem" id="save_menu_item">
                         <property name="label">gtk-save</property>
                         <property name="visible">True</property>
                         <property name="use_underline">True</property>
@@ -45,7 +45,7 @@
                       </widget>
                     </child>
                     <child>
-                      <widget class="GtkImageMenuItem" id="imagemenuitem4">
+                      <widget class="GtkImageMenuItem" id="save_as_menu_item">
                         <property name="label">gtk-save-as</property>
                         <property name="visible">True</property>
                         <property name="use_underline">True</property>
@@ -53,16 +53,17 @@
                       </widget>
                     </child>
                     <child>
-                      <widget class="GtkSeparatorMenuItem" id="separatormenuitem1">
+                      <widget class="GtkSeparatorMenuItem" id="separator1">
                         <property name="visible">True</property>
                       </widget>
                     </child>
                     <child>
-                      <widget class="GtkImageMenuItem" id="imagemenuitem5">
+                      <widget class="GtkImageMenuItem" id="quit_menu_item">
                         <property name="label">gtk-quit</property>
                         <property name="visible">True</property>
                         <property name="use_underline">True</property>
                         <property name="use_stock">True</property>
+                        <signal name="activate" handler="on_quit_menu_item_activate"/>
                       </widget>
                     </child>
                   </widget>
@@ -70,70 +71,20 @@
               </widget>
             </child>
             <child>
-              <widget class="GtkMenuItem" id="menuitem2">
-                <property name="visible">True</property>
-                <property name="label" translatable="yes">_Edit</property>
-                <property name="use_underline">True</property>
-                <child>
-                  <widget class="GtkMenu" id="menu2">
-                    <property name="visible">True</property>
-                    <child>
-                      <widget class="GtkImageMenuItem" id="imagemenuitem6">
-                        <property name="label">gtk-cut</property>
-                        <property name="visible">True</property>
-                        <property name="use_underline">True</property>
-                        <property name="use_stock">True</property>
-                      </widget>
-                    </child>
-                    <child>
-                      <widget class="GtkImageMenuItem" id="imagemenuitem7">
-                        <property name="label">gtk-copy</property>
-                        <property name="visible">True</property>
-                        <property name="use_underline">True</property>
-                        <property name="use_stock">True</property>
-                      </widget>
-                    </child>
-                    <child>
-                      <widget class="GtkImageMenuItem" id="imagemenuitem8">
-                        <property name="label">gtk-paste</property>
-                        <property name="visible">True</property>
-                        <property name="use_underline">True</property>
-                        <property name="use_stock">True</property>
-                      </widget>
-                    </child>
-                    <child>
-                      <widget class="GtkImageMenuItem" id="imagemenuitem9">
-                        <property name="label">gtk-delete</property>
-                        <property name="visible">True</property>
-                        <property name="use_underline">True</property>
-                        <property name="use_stock">True</property>
-                      </widget>
-                    </child>
-                  </widget>
-                </child>
-              </widget>
-            </child>
-            <child>
-              <widget class="GtkMenuItem" id="menuitem3">
-                <property name="visible">True</property>
-                <property name="label" translatable="yes">_View</property>
-                <property name="use_underline">True</property>
-              </widget>
-            </child>
-            <child>
-              <widget class="GtkMenuItem" id="menuitem4">
+              <widget class="GtkMenuItem" id="help_menu_item">
                 <property name="visible">True</property>
                 <property name="label" translatable="yes">_Help</property>
                 <property name="use_underline">True</property>
                 <child>
-                  <widget class="GtkMenu" id="menu3">
+                  <widget class="GtkMenu" id="help_menu">
                     <property name="visible">True</property>
                     <child>
-                      <widget class="GtkImageMenuItem" id="imagemenuitem10">
+                      <widget class="GtkImageMenuItem" id="about_menu_item">
                         <property name="label">gtk-about</property>
                         <property name="visible">True</property>
                         <property name="use_underline">True</property>
                         <property name="use_stock">True</property>
+                        <signal name="activate" handler="on_about_menu_item_activate"/>
                       </widget>
                     </child>
                   </widget>
@@ -168,4 +119,715 @@
       </widget>
     </child>
   </widget>
+  <widget class="GtkAboutDialog" id="aboutdialog">
+    <property name="visible">True</property>
+    <property name="border_width">5</property>
+    <property name="type_hint">normal</property>
+    <property name="has_separator">False</property>
+    <property name="program_name">GNU MyServer Control</property>
+    <property name="version">v0.0</property>
+    <property name="copyright" translatable="yes">Copyright (C) 2009 Free Software Foundation, Inc.
+This program 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 3 of the License, or
+(at your option) any later version.</property>
+    <property name="website">http://www.gnu.org/software/myserver/</property>
+    <property name="license">                    GNU GENERAL PUBLIC LICENSE
+                       Version 3, 29 June 2007
+
+ Copyright (C) 2007 Free Software Foundation, Inc. &lt;http://fsf.org/&gt;
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+                            Preamble
+
+  The GNU General Public License is a free, copyleft license for
+software and other kinds of works.
+
+  The licenses for most software and other practical works are designed
+to take away your freedom to share and change the works.  By contrast,
+the GNU General Public License is intended to guarantee your freedom to
+share and change all versions of a program--to make sure it remains free
+software for all its users.  We, the Free Software Foundation, use the
+GNU General Public License for most of our software; it applies also to
+any other work released this way by its authors.  You can apply it to
+your programs, too.
+
+  When we speak of free software, we are referring to freedom, not
+price.  Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+them if you wish), that you receive source code or can get it if you
+want it, that you can change the software or use pieces of it in new
+free programs, and that you know you can do these things.
+
+  To protect your rights, we need to prevent others from denying you
+these rights or asking you to surrender the rights.  Therefore, you have
+certain responsibilities if you distribute copies of the software, or if
+you modify it: responsibilities to respect the freedom of others.
+
+  For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must pass on to the recipients the same
+freedoms that you received.  You must make sure that they, too, receive
+or can get the source code.  And you must show them these terms so they
+know their rights.
+
+  Developers that use the GNU GPL protect your rights with two steps:
+(1) assert copyright on the software, and (2) offer you this License
+giving you legal permission to copy, distribute and/or modify it.
+
+  For the developers' and authors' protection, the GPL clearly explains
+that there is no warranty for this free software.  For both users' and
+authors' sake, the GPL requires that modified versions be marked as
+changed, so that their problems will not be attributed erroneously to
+authors of previous versions.
+
+  Some devices are designed to deny users access to install or run
+modified versions of the software inside them, although the manufacturer
+can do so.  This is fundamentally incompatible with the aim of
+protecting users' freedom to change the software.  The systematic
+pattern of such abuse occurs in the area of products for individuals to
+use, which is precisely where it is most unacceptable.  Therefore, we
+have designed this version of the GPL to prohibit the practice for those
+products.  If such problems arise substantially in other domains, we
+stand ready to extend this provision to those domains in future versions
+of the GPL, as needed to protect the freedom of users.
+
+  Finally, every program is threatened constantly by software patents.
+States should not allow patents to restrict development and use of
+software on general-purpose computers, but in those that do, we wish to
+avoid the special danger that patents applied to a free program could
+make it effectively proprietary.  To prevent this, the GPL assures that
+patents cannot be used to render the program non-free.
+
+  The precise terms and conditions for copying, distribution and
+modification follow.
+
+                       TERMS AND CONDITIONS
+
+  0. Definitions.
+
+  "This License" refers to version 3 of the GNU General Public License.
+
+  "Copyright" also means copyright-like laws that apply to other kinds of
+works, such as semiconductor masks.
+
+  "The Program" refers to any copyrightable work licensed under this
+License.  Each licensee is addressed as "you".  "Licensees" and
+"recipients" may be individuals or organizations.
+
+  To "modify" a work means to copy from or adapt all or part of the work
+in a fashion requiring copyright permission, other than the making of an
+exact copy.  The resulting work is called a "modified version" of the
+earlier work or a work "based on" the earlier work.
+
+  A "covered work" means either the unmodified Program or a work based
+on the Program.
+
+  To "propagate" a work means to do anything with it that, without
+permission, would make you directly or secondarily liable for
+infringement under applicable copyright law, except executing it on a
+computer or modifying a private copy.  Propagation includes copying,
+distribution (with or without modification), making available to the
+public, and in some countries other activities as well.
+
+  To "convey" a work means any kind of propagation that enables other
+parties to make or receive copies.  Mere interaction with a user through
+a computer network, with no transfer of a copy, is not conveying.
+
+  An interactive user interface displays "Appropriate Legal Notices"
+to the extent that it includes a convenient and prominently visible
+feature that (1) displays an appropriate copyright notice, and (2)
+tells the user that there is no warranty for the work (except to the
+extent that warranties are provided), that licensees may convey the
+work under this License, and how to view a copy of this License.  If
+the interface presents a list of user commands or options, such as a
+menu, a prominent item in the list meets this criterion.
+
+  1. Source Code.
+
+  The "source code" for a work means the preferred form of the work
+for making modifications to it.  "Object code" means any non-source
+form of a work.
+
+  A "Standard Interface" means an interface that either is an official
+standard defined by a recognized standards body, or, in the case of
+interfaces specified for a particular programming language, one that
+is widely used among developers working in that language.
+
+  The "System Libraries" of an executable work include anything, other
+than the work as a whole, that (a) is included in the normal form of
+packaging a Major Component, but which is not part of that Major
+Component, and (b) serves only to enable use of the work with that
+Major Component, or to implement a Standard Interface for which an
+implementation is available to the public in source code form.  A
+"Major Component", in this context, means a major essential component
+(kernel, window system, and so on) of the specific operating system
+(if any) on which the executable work runs, or a compiler used to
+produce the work, or an object code interpreter used to run it.
+
+  The "Corresponding Source" for a work in object code form means all
+the source code needed to generate, install, and (for an executable
+work) run the object code and to modify the work, including scripts to
+control those activities.  However, it does not include the work's
+System Libraries, or general-purpose tools or generally available free
+programs which are used unmodified in performing those activities but
+which are not part of the work.  For example, Corresponding Source
+includes interface definition files associated with source files for
+the work, and the source code for shared libraries and dynamically
+linked subprograms that the work is specifically designed to require,
+such as by intimate data communication or control flow between those
+subprograms and other parts of the work.
+
+  The Corresponding Source need not include anything that users
+can regenerate automatically from other parts of the Corresponding
+Source.
+
+  The Corresponding Source for a work in source code form is that
+same work.
+
+  2. Basic Permissions.
+
+  All rights granted under this License are granted for the term of
+copyright on the Program, and are irrevocable provided the stated
+conditions are met.  This License explicitly affirms your unlimited
+permission to run the unmodified Program.  The output from running a
+covered work is covered by this License only if the output, given its
+content, constitutes a covered work.  This License acknowledges your
+rights of fair use or other equivalent, as provided by copyright law.
+
+  You may make, run and propagate covered works that you do not
+convey, without conditions so long as your license otherwise remains
+in force.  You may convey covered works to others for the sole purpose
+of having them make modifications exclusively for you, or provide you
+with facilities for running those works, provided that you comply with
+the terms of this License in conveying all material for which you do
+not control copyright.  Those thus making or running the covered works
+for you must do so exclusively on your behalf, under your direction
+and control, on terms that prohibit them from making any copies of
+your copyrighted material outside their relationship with you.
+
+  Conveying under any other circumstances is permitted solely under
+the conditions stated below.  Sublicensing is not allowed; section 10
+makes it unnecessary.
+
+  3. Protecting Users' Legal Rights From Anti-Circumvention Law.
+
+  No covered work shall be deemed part of an effective technological
+measure under any applicable law fulfilling obligations under article
+11 of the WIPO copyright treaty adopted on 20 December 1996, or
+similar laws prohibiting or restricting circumvention of such
+measures.
+
+  When you convey a covered work, you waive any legal power to forbid
+circumvention of technological measures to the extent such circumvention
+is effected by exercising rights under this License with respect to
+the covered work, and you disclaim any intention to limit operation or
+modification of the work as a means of enforcing, against the work's
+users, your or third parties' legal rights to forbid circumvention of
+technological measures.
+
+  4. Conveying Verbatim Copies.
+
+  You may convey verbatim copies of the Program's source code as you
+receive it, in any medium, provided that you conspicuously and
+appropriately publish on each copy an appropriate copyright notice;
+keep intact all notices stating that this License and any
+non-permissive terms added in accord with section 7 apply to the code;
+keep intact all notices of the absence of any warranty; and give all
+recipients a copy of this License along with the Program.
+
+  You may charge any price or no price for each copy that you convey,
+and you may offer support or warranty protection for a fee.
+
+  5. Conveying Modified Source Versions.
+
+  You may convey a work based on the Program, or the modifications to
+produce it from the Program, in the form of source code under the
+terms of section 4, provided that you also meet all of these conditions:
+
+    a) The work must carry prominent notices stating that you modified
+    it, and giving a relevant date.
+
+    b) The work must carry prominent notices stating that it is
+    released under this License and any conditions added under section
+    7.  This requirement modifies the requirement in section 4 to
+    "keep intact all notices".
+
+    c) You must license the entire work, as a whole, under this
+    License to anyone who comes into possession of a copy.  This
+    License will therefore apply, along with any applicable section 7
+    additional terms, to the whole of the work, and all its parts,
+    regardless of how they are packaged.  This License gives no
+    permission to license the work in any other way, but it does not
+    invalidate such permission if you have separately received it.
+
+    d) If the work has interactive user interfaces, each must display
+    Appropriate Legal Notices; however, if the Program has interactive
+    interfaces that do not display Appropriate Legal Notices, your
+    work need not make them do so.
+
+  A compilation of a covered work with other separate and independent
+works, which are not by their nature extensions of the covered work,
+and which are not combined with it such as to form a larger program,
+in or on a volume of a storage or distribution medium, is called an
+"aggregate" if the compilation and its resulting copyright are not
+used to limit the access or legal rights of the compilation's users
+beyond what the individual works permit.  Inclusion of a covered work
+in an aggregate does not cause this License to apply to the other
+parts of the aggregate.
+
+  6. Conveying Non-Source Forms.
+
+  You may convey a covered work in object code form under the terms
+of sections 4 and 5, provided that you also convey the
+machine-readable Corresponding Source under the terms of this License,
+in one of these ways:
+
+    a) Convey the object code in, or embodied in, a physical product
+    (including a physical distribution medium), accompanied by the
+    Corresponding Source fixed on a durable physical medium
+    customarily used for software interchange.
+
+    b) Convey the object code in, or embodied in, a physical product
+    (including a physical distribution medium), accompanied by a
+    written offer, valid for at least three years and valid for as
+    long as you offer spare parts or customer support for that product
+    model, to give anyone who possesses the object code either (1) a
+    copy of the Corresponding Source for all the software in the
+    product that is covered by this License, on a durable physical
+    medium customarily used for software interchange, for a price no
+    more than your reasonable cost of physically performing this
+    conveying of source, or (2) access to copy the
+    Corresponding Source from a network server at no charge.
+
+    c) Convey individual copies of the object code with a copy of the
+    written offer to provide the Corresponding Source.  This
+    alternative is allowed only occasionally and noncommercially, and
+    only if you received the object code with such an offer, in accord
+    with subsection 6b.
+
+    d) Convey the object code by offering access from a designated
+    place (gratis or for a charge), and offer equivalent access to the
+    Corresponding Source in the same way through the same place at no
+    further charge.  You need not require recipients to copy the
+    Corresponding Source along with the object code.  If the place to
+    copy the object code is a network server, the Corresponding Source
+    may be on a different server (operated by you or a third party)
+    that supports equivalent copying facilities, provided you maintain
+    clear directions next to the object code saying where to find the
+    Corresponding Source.  Regardless of what server hosts the
+    Corresponding Source, you remain obligated to ensure that it is
+    available for as long as needed to satisfy these requirements.
+
+    e) Convey the object code using peer-to-peer transmission, provided
+    you inform other peers where the object code and Corresponding
+    Source of the work are being offered to the general public at no
+    charge under subsection 6d.
+
+  A separable portion of the object code, whose source code is excluded
+from the Corresponding Source as a System Library, need not be
+included in conveying the object code work.
+
+  A "User Product" is either (1) a "consumer product", which means any
+tangible personal property which is normally used for personal, family,
+or household purposes, or (2) anything designed or sold for incorporation
+into a dwelling.  In determining whether a product is a consumer product,
+doubtful cases shall be resolved in favor of coverage.  For a particular
+product received by a particular user, "normally used" refers to a
+typical or common use of that class of product, regardless of the status
+of the particular user or of the way in which the particular user
+actually uses, or expects or is expected to use, the product.  A product
+is a consumer product regardless of whether the product has substantial
+commercial, industrial or non-consumer uses, unless such uses represent
+the only significant mode of use of the product.
+
+  "Installation Information" for a User Product means any methods,
+procedures, authorization keys, or other information required to install
+and execute modified versions of a covered work in that User Product from
+a modified version of its Corresponding Source.  The information must
+suffice to ensure that the continued functioning of the modified object
+code is in no case prevented or interfered with solely because
+modification has been made.
+
+  If you convey an object code work under this section in, or with, or
+specifically for use in, a User Product, and the conveying occurs as
+part of a transaction in which the right of possession and use of the
+User Product is transferred to the recipient in perpetuity or for a
+fixed term (regardless of how the transaction is characterized), the
+Corresponding Source conveyed under this section must be accompanied
+by the Installation Information.  But this requirement does not apply
+if neither you nor any third party retains the ability to install
+modified object code on the User Product (for example, the work has
+been installed in ROM).
+
+  The requirement to provide Installation Information does not include a
+requirement to continue to provide support service, warranty, or updates
+for a work that has been modified or installed by the recipient, or for
+the User Product in which it has been modified or installed.  Access to a
+network may be denied when the modification itself materially and
+adversely affects the operation of the network or violates the rules and
+protocols for communication across the network.
+
+  Corresponding Source conveyed, and Installation Information provided,
+in accord with this section must be in a format that is publicly
+documented (and with an implementation available to the public in
+source code form), and must require no special password or key for
+unpacking, reading or copying.
+
+  7. Additional Terms.
+
+  "Additional permissions" are terms that supplement the terms of this
+License by making exceptions from one or more of its conditions.
+Additional permissions that are applicable to the entire Program shall
+be treated as though they were included in this License, to the extent
+that they are valid under applicable law.  If additional permissions
+apply only to part of the Program, that part may be used separately
+under those permissions, but the entire Program remains governed by
+this License without regard to the additional permissions.
+
+  When you convey a copy of a covered work, you may at your option
+remove any additional permissions from that copy, or from any part of
+it.  (Additional permissions may be written to require their own
+removal in certain cases when you modify the work.)  You may place
+additional permissions on material, added by you to a covered work,
+for which you have or can give appropriate copyright permission.
+
+  Notwithstanding any other provision of this License, for material you
+add to a covered work, you may (if authorized by the copyright holders of
+that material) supplement the terms of this License with terms:
+
+    a) Disclaiming warranty or limiting liability differently from the
+    terms of sections 15 and 16 of this License; or
+
+    b) Requiring preservation of specified reasonable legal notices or
+    author attributions in that material or in the Appropriate Legal
+    Notices displayed by works containing it; or
+
+    c) Prohibiting misrepresentation of the origin of that material, or
+    requiring that modified versions of such material be marked in
+    reasonable ways as different from the original version; or
+
+    d) Limiting the use for publicity purposes of names of licensors or
+    authors of the material; or
+
+    e) Declining to grant rights under trademark law for use of some
+    trade names, trademarks, or service marks; or
+
+    f) Requiring indemnification of licensors and authors of that
+    material by anyone who conveys the material (or modified versions of
+    it) with contractual assumptions of liability to the recipient, for
+    any liability that these contractual assumptions directly impose on
+    those licensors and authors.
+
+  All other non-permissive additional terms are considered "further
+restrictions" within the meaning of section 10.  If the Program as you
+received it, or any part of it, contains a notice stating that it is
+governed by this License along with a term that is a further
+restriction, you may remove that term.  If a license document contains
+a further restriction but permits relicensing or conveying under this
+License, you may add to a covered work material governed by the terms
+of that license document, provided that the further restriction does
+not survive such relicensing or conveying.
+
+  If you add terms to a covered work in accord with this section, you
+must place, in the relevant source files, a statement of the
+additional terms that apply to those files, or a notice indicating
+where to find the applicable terms.
+
+  Additional terms, permissive or non-permissive, may be stated in the
+form of a separately written license, or stated as exceptions;
+the above requirements apply either way.
+
+  8. Termination.
+
+  You may not propagate or modify a covered work except as expressly
+provided under this License.  Any attempt otherwise to propagate or
+modify it is void, and will automatically terminate your rights under
+this License (including any patent licenses granted under the third
+paragraph of section 11).
+
+  However, if you cease all violation of this License, then your
+license from a particular copyright holder is reinstated (a)
+provisionally, unless and until the copyright holder explicitly and
+finally terminates your license, and (b) permanently, if the copyright
+holder fails to notify you of the violation by some reasonable means
+prior to 60 days after the cessation.
+
+  Moreover, your license from a particular copyright holder is
+reinstated permanently if the copyright holder notifies you of the
+violation by some reasonable means, this is the first time you have
+received notice of violation of this License (for any work) from that
+copyright holder, and you cure the violation prior to 30 days after
+your receipt of the notice.
+
+  Termination of your rights under this section does not terminate the
+licenses of parties who have received copies or rights from you under
+this License.  If your rights have been terminated and not permanently
+reinstated, you do not qualify to receive new licenses for the same
+material under section 10.
+
+  9. Acceptance Not Required for Having Copies.
+
+  You are not required to accept this License in order to receive or
+run a copy of the Program.  Ancillary propagation of a covered work
+occurring solely as a consequence of using peer-to-peer transmission
+to receive a copy likewise does not require acceptance.  However,
+nothing other than this License grants you permission to propagate or
+modify any covered work.  These actions infringe copyright if you do
+not accept this License.  Therefore, by modifying or propagating a
+covered work, you indicate your acceptance of this License to do so.
+
+  10. Automatic Licensing of Downstream Recipients.
+
+  Each time you convey a covered work, the recipient automatically
+receives a license from the original licensors, to run, modify and
+propagate that work, subject to this License.  You are not responsible
+for enforcing compliance by third parties with this License.
+
+  An "entity transaction" is a transaction transferring control of an
+organization, or substantially all assets of one, or subdividing an
+organization, or merging organizations.  If propagation of a covered
+work results from an entity transaction, each party to that
+transaction who receives a copy of the work also receives whatever
+licenses to the work the party's predecessor in interest had or could
+give under the previous paragraph, plus a right to possession of the
+Corresponding Source of the work from the predecessor in interest, if
+the predecessor has it or can get it with reasonable efforts.
+
+  You may not impose any further restrictions on the exercise of the
+rights granted or affirmed under this License.  For example, you may
+not impose a license fee, royalty, or other charge for exercise of
+rights granted under this License, and you may not initiate litigation
+(including a cross-claim or counterclaim in a lawsuit) alleging that
+any patent claim is infringed by making, using, selling, offering for
+sale, or importing the Program or any portion of it.
+
+  11. Patents.
+
+  A "contributor" is a copyright holder who authorizes use under this
+License of the Program or a work on which the Program is based.  The
+work thus licensed is called the contributor's "contributor version".
+
+  A contributor's "essential patent claims" are all patent claims
+owned or controlled by the contributor, whether already acquired or
+hereafter acquired, that would be infringed by some manner, permitted
+by this License, of making, using, or selling its contributor version,
+but do not include claims that would be infringed only as a
+consequence of further modification of the contributor version.  For
+purposes of this definition, "control" includes the right to grant
+patent sublicenses in a manner consistent with the requirements of
+this License.
+
+  Each contributor grants you a non-exclusive, worldwide, royalty-free
+patent license under the contributor's essential patent claims, to
+make, use, sell, offer for sale, import and otherwise run, modify and
+propagate the contents of its contributor version.
+
+  In the following three paragraphs, a "patent license" is any express
+agreement or commitment, however denominated, not to enforce a patent
+(such as an express permission to practice a patent or covenant not to
+sue for patent infringement).  To "grant" such a patent license to a
+party means to make such an agreement or commitment not to enforce a
+patent against the party.
+
+  If you convey a covered work, knowingly relying on a patent license,
+and the Corresponding Source of the work is not available for anyone
+to copy, free of charge and under the terms of this License, through a
+publicly available network server or other readily accessible means,
+then you must either (1) cause the Corresponding Source to be so
+available, or (2) arrange to deprive yourself of the benefit of the
+patent license for this particular work, or (3) arrange, in a manner
+consistent with the requirements of this License, to extend the patent
+license to downstream recipients.  "Knowingly relying" means you have
+actual knowledge that, but for the patent license, your conveying the
+covered work in a country, or your recipient's use of the covered work
+in a country, would infringe one or more identifiable patents in that
+country that you have reason to believe are valid.
+
+  If, pursuant to or in connection with a single transaction or
+arrangement, you convey, or propagate by procuring conveyance of, a
+covered work, and grant a patent license to some of the parties
+receiving the covered work authorizing them to use, propagate, modify
+or convey a specific copy of the covered work, then the patent license
+you grant is automatically extended to all recipients of the covered
+work and works based on it.
+
+  A patent license is "discriminatory" if it does not include within
+the scope of its coverage, prohibits the exercise of, or is
+conditioned on the non-exercise of one or more of the rights that are
+specifically granted under this License.  You may not convey a covered
+work if you are a party to an arrangement with a third party that is
+in the business of distributing software, under which you make payment
+to the third party based on the extent of your activity of conveying
+the work, and under which the third party grants, to any of the
+parties who would receive the covered work from you, a discriminatory
+patent license (a) in connection with copies of the covered work
+conveyed by you (or copies made from those copies), or (b) primarily
+for and in connection with specific products or compilations that
+contain the covered work, unless you entered into that arrangement,
+or that patent license was granted, prior to 28 March 2007.
+
+  Nothing in this License shall be construed as excluding or limiting
+any implied license or other defenses to infringement that may
+otherwise be available to you under applicable patent law.
+
+  12. No Surrender of Others' Freedom.
+
+  If conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License.  If you cannot convey a
+covered work so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you may
+not convey it at all.  For example, if you agree to terms that obligate you
+to collect a royalty for further conveying from those to whom you convey
+the Program, the only way you could satisfy both those terms and this
+License would be to refrain entirely from conveying the Program.
+
+  13. Use with the GNU Affero General Public License.
+
+  Notwithstanding any other provision of this License, you have
+permission to link or combine any covered work with a work licensed
+under version 3 of the GNU Affero General Public License into a single
+combined work, and to convey the resulting work.  The terms of this
+License will continue to apply to the part which is the covered work,
+but the special requirements of the GNU Affero General Public License,
+section 13, concerning interaction through a network will apply to the
+combination as such.
+
+  14. Revised Versions of this License.
+
+  The Free Software Foundation may publish revised and/or new versions of
+the GNU General Public License from time to time.  Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+  Each version is given a distinguishing version number.  If the
+Program specifies that a certain numbered version of the GNU General
+Public License "or any later version" applies to it, you have the
+option of following the terms and conditions either of that numbered
+version or of any later version published by the Free Software
+Foundation.  If the Program does not specify a version number of the
+GNU General Public License, you may choose any version ever published
+by the Free Software Foundation.
+
+  If the Program specifies that a proxy can decide which future
+versions of the GNU General Public License can be used, that proxy's
+public statement of acceptance of a version permanently authorizes you
+to choose that version for the Program.
+
+  Later license versions may give you additional or different
+permissions.  However, no additional obligations are imposed on any
+author or copyright holder as a result of your choosing to follow a
+later version.
+
+  15. Disclaimer of Warranty.
+
+  THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
+APPLICABLE LAW.  EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
+HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
+OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
+THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE.  THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
+IS WITH YOU.  SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
+ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+  16. Limitation of Liability.
+
+  IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
+THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
+GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
+USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
+DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
+PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
+EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGES.
+
+  17. Interpretation of Sections 15 and 16.
+
+  If the disclaimer of warranty and limitation of liability provided
+above cannot be given local legal effect according to their terms,
+reviewing courts shall apply local law that most closely approximates
+an absolute waiver of all civil liability in connection with the
+Program, unless a warranty or assumption of liability accompanies a
+copy of the Program in return for a fee.
+
+                     END OF TERMS AND CONDITIONS
+
+            How to Apply These Terms to Your New Programs
+
+  If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+  To do so, attach the following notices to the program.  It is safest
+to attach them to the start of each source file to most effectively
+state the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+    &lt;one line to give the program's name and a brief idea of what it does.&gt;
+    Copyright (C) &lt;year&gt;  &lt;name of author&gt;
+
+    This program 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 3 of the License, or
+    (at your option) any later version.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU General Public License for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with this program.  If not, see &lt;http://www.gnu.org/licenses/&gt;.
+
+Also add information on how to contact you by electronic and paper mail.
+
+  If the program does terminal interaction, make it output a short
+notice like this when it starts in an interactive mode:
+
+    &lt;program&gt;  Copyright (C) &lt;year&gt;  &lt;name of author&gt;
+    This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+    This is free software, and you are welcome to redistribute it
+    under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License.  Of course, your program's commands
+might be different; for a GUI interface, you would use an "about box".
+
+  You should also get your employer (if you work as a programmer) or school,
+if any, to sign a "copyright disclaimer" for the program, if necessary.
+For more information on this, and how to apply and follow the GNU GPL, see
+&lt;http://www.gnu.org/licenses/&gt;.
+
+  The GNU General Public License does not permit incorporating your program
+into proprietary programs.  If your program is a subroutine library, you
+may consider it more useful to permit linking proprietary applications with
+the library.  If this is what you want to do, use the GNU Lesser General
+Public License instead of this License.  But first, please read
+&lt;http://www.gnu.org/philosophy/why-not-lgpl.html&gt;.
+</property>
+    <signal name="response" handler="on_aboutdialog_response"/>
+    <child internal-child="vbox">
+      <widget class="GtkVBox" id="dialog-vbox">
+        <property name="visible">True</property>
+        <property name="orientation">vertical</property>
+        <property name="spacing">2</property>
+        <child>
+          <placeholder/>
+        </child>
+        <child internal-child="action_area">
+          <widget class="GtkHButtonBox" id="dialog-action_area">
+            <property name="visible">True</property>
+            <property name="layout_style">end</property>
+          </widget>
+          <packing>
+            <property name="expand">False</property>
+            <property name="pack_type">end</property>
+            <property name="position">0</property>
+          </packing>
+        </child>
+      </widget>
+    </child>
+  </widget>
 </glade-interface>



commit d79ec32935886b1b4864ae217975e81e12268d01
Author: Marek Aaron Sapota <maarons@gnu.org>
Date:   Thu Jul 16 12:16:32 2009 +0200

    Added copyright header.

diff --git a/misc/PyGTK_Control/GUIConfig.py b/misc/PyGTK_Control/GUIConfig.py
index f4600e2..1036e63 100644
--- a/misc/PyGTK_Control/GUIConfig.py
+++ b/misc/PyGTK_Control/GUIConfig.py
@@ -1,3 +1,21 @@
+# -*- coding: utf-8 -*-
+'''
+MyServer
+Copyright (C) 2009 Free Software Foundation, Inc.
+This program 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 3 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program.  If not, see <http://www.gnu.org/licenses/>.
+'''
+
 options = {}
 
 # Control



commit d603a00a9f1529278b7cd92754fd06bb8603c98f
Author: Marek Aaron Sapota <maarons@gnu.org>
Date:   Thu Jul 16 12:11:17 2009 +0200

    List is fully functional.

diff --git a/misc/PyGTK_Control/MyServerControl.py b/misc/PyGTK_Control/MyServerControl.py
index 83bf74a..c78242c 100644
--- a/misc/PyGTK_Control/MyServerControl.py
+++ b/misc/PyGTK_Control/MyServerControl.py
@@ -72,6 +72,12 @@ class PyGTKControl():
                     field = gtk.combo_box_new_text()
                 elif GUIConfig.options[option][1] == 'list':
                     tree  = gtk.TreeView(gtk.ListStore(gobject.TYPE_STRING))
+                    tree.set_headers_visible(False)
+                    tree_column = gtk.TreeViewColumn()
+                    tree_renderer = gtk.CellRendererText()
+                    tree_column.pack_start(tree_renderer)
+                    tree_column.add_attribute(tree_renderer, 'text', 0)
+                    tree.append_column(tree_column)
                     new_name = gtk.Entry()
                     add_button = gtk.Button('add')
                     remove_button = gtk.Button('remove')
@@ -80,6 +86,15 @@ class PyGTKControl():
                     field.attach(add_button, 0, 1, 1, 2)
                     field.attach(remove_button, 1, 2, 1, 2)
                     field.attach(tree, 0, 2, 2, 3)
+                    def add_to_list(button):
+                        tree.get_model().append((new_name.get_text(), ))
+                        new_name.set_text('')
+                    add_button.connect('clicked', add_to_list)
+                    def remove_from_list(button):
+                        selected = tree.get_selection().get_selected()
+                        if selected[1] is not None:
+                            selected[0].remove(selected[1])
+                    remove_button.connect('clicked', remove_from_list)
                 tabs[tab].attach(check, 0, 1, i, i + 1, gtk.FILL, gtk.FILL)
                 tabs[tab].attach(label, 1, 2, i, i + 1, yoptions = gtk.FILL)
                 tabs[tab].attach(field, 2, 3, i, i + 1, yoptions = gtk.FILL)



commit c7bfa02a092d4d79e413a550772cbb5eea4c891a
Author: Marek Aaron Sapota <maarons@gnu.org>
Date:   Wed Jul 15 23:34:32 2009 +0200

    Changed GUI to dynamic one.
    
    Now GUI creates all options on start.

diff --git a/misc/PyGTK_Control/GUIConfig.py b/misc/PyGTK_Control/GUIConfig.py
new file mode 100644
index 0000000..f4600e2
--- /dev/null
+++ b/misc/PyGTK_Control/GUIConfig.py
@@ -0,0 +1,51 @@
+options = {}
+
+# Control
+options['control.enabled'] = ('Set this to yes if you want to enable control protocol.', 'bool', )
+options['control.admin'] = ('Set here the name for the control admin.', 'string', )
+options['control.password'] = ('Define here a good, strong password for the admin.', 'string', )
+
+# FTP
+options['ftp.allow_anonymous'] = ('Allow anonymous login.', 'bool', )
+options['ftp.anonymous_need_pass'] = ('If anonymous allowed, tells if needs pass.', 'bool', )
+options['ftp.allow_asynchronous_cmds'] = ('Allow asynchronous cmds like Abor, Quit, Stat.', 'bool', )
+options['ftp.allow_pipelining'] = ('Allow clients to send more than one command to server in one request.', 'bool', )
+options['ftp.allow_store'] = ('Allow clients to change server files.', 'bool', )
+
+# HTTP
+options['http.use_error_file'] = ('Set this to yes to use personalized error pages from system directory.', 'bool', )
+options['http.dir.css'] = ('Define the folder browsing style.', 'string', )
+options['http.use_home_directory'] = ('Enable home directory per user', 'bool', )
+options['http.home_directory'] = ('Define name for home directory browsing.', 'string', )
+options['http.default_file'] = ('Default filename to send in a directory if the file isn\'t in the path then the directory content is sent.', 'list', )
+
+# Server
+options['server.language'] = ('Choose the language to use for the server.', 'combobox', )
+options['server.verbosity'] = ('Verbosity on log file.', 'integer', )
+options['server.static_threads'] = ('Number of serving threads always active.', 'integer', )
+options['server.max_threads'] = ('Maximum number of serving threads that the scheduler can create.', 'integer', )
+options['server.buffer_size'] = ('Dimension of every buffer in bytes.', 'integer', )
+options['server.max_connections'] = ('Define the max number of connections to allow to server. 0 means allow infinite connections.', 'integer', )
+options['server.max_accepted_connections'] = ('Define max number of connections to accept.', 'integer', )
+options['server.max_log_size'] = ('max size of the log file in bytes.', 'integer', )
+options['server.admin'] = ('Administrator e-mail.', 'string', )
+options['server.max_files_cache'] = ('Max cache size for static files.', 'integer', )
+options['server.max_file_cache'] = ('Max cache size for single static file.', 'integer', )
+options['server.min_file_cache'] = ('Min cache size for single static file.', 'integer', )
+options['server.max_servers'] = ('Maximum number of external servers that can be executed.', 'integer', )
+
+# Log color
+options['log_color.info_fg'] = ('Info log foreground colour.', 'string', )
+options['log_color.info_bg'] = ('Info log background colour.', 'string', )
+options['log_color.warning_fg'] = ('Warning log foreground colour.', 'string', )
+options['log_color.warning_bg'] = ('Warning log background colour.', 'string', )
+options['log_color.error_fg'] = ('Error log foreground colour.', 'string', )
+options['log_color.error_bg'] = ('Error log background colour.', 'string', )
+
+# Other
+options['connection.timeout'] = ('Timeout for every client\'s connected to server. If the client doesn\'t request anything for n seconds the connection with the client is closed. Set this to 0 if you don\'t want to use keep-alive-connections', 'integer', )
+options['gzip.threshold'] = ('Define the gzip compression threshold value.', 'integer', )
+options['symlinks.follow'] = ('Define if links should be followed.', 'bool', )
+
+# don't put 'other' or 'unknown' here
+tabs = ['server', 'control', 'ftp', 'http', 'log_color']
diff --git a/misc/PyGTK_Control/MyServerControl.py b/misc/PyGTK_Control/MyServerControl.py
index 0b497cb..83bf74a 100644
--- a/misc/PyGTK_Control/MyServerControl.py
+++ b/misc/PyGTK_Control/MyServerControl.py
@@ -17,16 +17,76 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 '''
 
 import gtk
+import gobject
 import gtk.glade
+import GUIConfig
 
 class PyGTKControl():
     def __init__(self):
         self.gladefile = 'PyGTKControl.glade'
         self.widgets = gtk.glade.XML(self.gladefile, 'window')
         self.widgets.signal_autoconnect(self)
+        self.construct_options()
 
     def on_window_destroy(self, widget):
         gtk.main_quit()
 
+    def construct_options(self):
+        def make_tab_name(text):
+            return text.capitalize().replace('.', ' ').replace('_', ' ')
+        def make_name(text, tab):
+            if tab == 'other':
+                return text
+            return text[len(tab):].replace('.', ' ').replace('_', ' ').strip()
+
+        segregated_options = {}
+        for option in GUIConfig.options:
+            tab = 'other'
+            for prefix in GUIConfig.tabs:
+                if option.startswith(prefix):
+                    tab = prefix
+                    break
+            if not segregated_options.has_key(tab):
+                segregated_options[tab] = []
+            segregated_options[tab].append(option)
+                
+        tabs = {}
+        for tab in GUIConfig.tabs + ['other', 'unknown']:
+            options = segregated_options.get(tab, [])
+            tabs[tab] = gtk.Table(max(1, len(options)), 3)
+            for i in xrange(len(options)):
+                option = options[i]
+                label = gtk.Label(make_name(option, tab))
+                label.set_tooltip_text(GUIConfig.options[option][0])
+                check = gtk.CheckButton()
+                if GUIConfig.options[option][1] == 'string':
+                    field = gtk.Entry()
+                elif GUIConfig.options[option][1] == 'integer':
+                    field = gtk.SpinButton()
+                elif GUIConfig.options[option][1] == 'bool':
+                    field = gtk.combo_box_new_text()
+                    field.append_text('yes')
+                    field.append_text('no')
+                    field.set_active(0)
+                elif GUIConfig.options[option][1] == 'combobox':
+                    field = gtk.combo_box_new_text()
+                elif GUIConfig.options[option][1] == 'list':
+                    tree  = gtk.TreeView(gtk.ListStore(gobject.TYPE_STRING))
+                    new_name = gtk.Entry()
+                    add_button = gtk.Button('add')
+                    remove_button = gtk.Button('remove')
+                    field = gtk.Table(3, 2)
+                    field.attach(new_name, 0, 2, 0, 1)
+                    field.attach(add_button, 0, 1, 1, 2)
+                    field.attach(remove_button, 1, 2, 1, 2)
+                    field.attach(tree, 0, 2, 2, 3)
+                tabs[tab].attach(check, 0, 1, i, i + 1, gtk.FILL, gtk.FILL)
+                tabs[tab].attach(label, 1, 2, i, i + 1, yoptions = gtk.FILL)
+                tabs[tab].attach(field, 2, 3, i, i + 1, yoptions = gtk.FILL)
+            self.widgets.get_widget('notebook').append_page(
+                tabs[tab], gtk.Label(make_tab_name(tab)))
+
+        self.widgets.get_widget('notebook').show_all()
+
 PyGTKControl()
 gtk.main()
diff --git a/misc/PyGTK_Control/PyGTKControl.glade b/misc/PyGTK_Control/PyGTKControl.glade
index 9492698..80adba3 100644
--- a/misc/PyGTK_Control/PyGTKControl.glade
+++ b/misc/PyGTK_Control/PyGTKControl.glade
@@ -150,1298 +150,6 @@
           <widget class="GtkNotebook" id="notebook">
             <property name="visible">True</property>
             <property name="can_focus">True</property>
-            <child>
-              <widget class="GtkTable" id="control_table">
-                <property name="visible">True</property>
-                <property name="n_rows">3</property>
-                <property name="n_columns">3</property>
-                <child>
-                  <widget class="GtkLabel" id="control_enabled_label">
-                    <property name="visible">True</property>
-                    <property name="label" translatable="yes">enabled</property>
-                  </widget>
-                  <packing>
-                    <property name="left_attach">1</property>
-                    <property name="right_attach">2</property>
-                    <property name="y_options">GTK_FILL</property>
-                  </packing>
-                </child>
-                <child>
-                  <widget class="GtkComboBox" id="control_enabled_combobox">
-                    <property name="visible">True</property>
-                    <property name="active">0</property>
-                    <property name="items" translatable="yes">yes
-no</property>
-                  </widget>
-                  <packing>
-                    <property name="left_attach">2</property>
-                    <property name="right_attach">3</property>
-                    <property name="y_options">GTK_FILL</property>
-                  </packing>
-                </child>
-                <child>
-                  <widget class="GtkLabel" id="control_admin_label">
-                    <property name="visible">True</property>
-                    <property name="label" translatable="yes">admin</property>
-                  </widget>
-                  <packing>
-                    <property name="left_attach">1</property>
-                    <property name="right_attach">2</property>
-                    <property name="top_attach">1</property>
-                    <property name="bottom_attach">2</property>
-                    <property name="y_options">GTK_FILL</property>
-                  </packing>
-                </child>
-                <child>
-                  <widget class="GtkEntry" id="control_admin_entry">
-                    <property name="visible">True</property>
-                    <property name="can_focus">True</property>
-                    <property name="invisible_char">&#x25CF;</property>
-                  </widget>
-                  <packing>
-                    <property name="left_attach">2</property>
-                    <property name="right_attach">3</property>
-                    <property name="top_attach">1</property>
-                    <property name="bottom_attach">2</property>
-                    <property name="y_options">GTK_FILL</property>
-                  </packing>
-                </child>
-                <child>
-                  <widget class="GtkLabel" id="control_password_label">
-                    <property name="visible">True</property>
-                    <property name="label" translatable="yes">password</property>
-                  </widget>
-                  <packing>
-                    <property name="left_attach">1</property>
-                    <property name="right_attach">2</property>
-                    <property name="top_attach">2</property>
-                    <property name="bottom_attach">3</property>
-                    <property name="y_options">GTK_FILL</property>
-                  </packing>
-                </child>
-                <child>
-                  <widget class="GtkEntry" id="control_password_entry">
-                    <property name="visible">True</property>
-                    <property name="can_focus">True</property>
-                    <property name="invisible_char">&#x25CF;</property>
-                  </widget>
-                  <packing>
-                    <property name="left_attach">2</property>
-                    <property name="right_attach">3</property>
-                    <property name="top_attach">2</property>
-                    <property name="bottom_attach">3</property>
-                    <property name="y_options">GTK_FILL</property>
-                  </packing>
-                </child>
-                <child>
-                  <widget class="GtkCheckButton" id="control_enabled_checkbutton">
-                    <property name="visible">True</property>
-                    <property name="can_focus">True</property>
-                    <property name="receives_default">False</property>
-                    <property name="draw_indicator">True</property>
-                  </widget>
-                  <packing>
-                    <property name="x_options">GTK_FILL</property>
-                    <property name="y_options">GTK_FILL</property>
-                  </packing>
-                </child>
-                <child>
-                  <widget class="GtkCheckButton" id="control_admin_checkbutton">
-                    <property name="visible">True</property>
-                    <property name="can_focus">True</property>
-                    <property name="receives_default">False</property>
-                    <property name="draw_indicator">True</property>
-                  </widget>
-                  <packing>
-                    <property name="top_attach">1</property>
-                    <property name="bottom_attach">2</property>
-                    <property name="x_options">GTK_FILL</property>
-                    <property name="y_options">GTK_FILL</property>
-                  </packing>
-                </child>
-                <child>
-                  <widget class="GtkCheckButton" id="control_password_checkbutton">
-                    <property name="visible">True</property>
-                    <property name="can_focus">True</property>
-                    <property name="receives_default">False</property>
-                    <property name="draw_indicator">True</property>
-                  </widget>
-                  <packing>
-                    <property name="top_attach">2</property>
-                    <property name="bottom_attach">3</property>
-                    <property name="x_options">GTK_FILL</property>
-                    <property name="y_options">GTK_FILL</property>
-                  </packing>
-                </child>
-              </widget>
-            </child>
-            <child>
-              <widget class="GtkLabel" id="control_label">
-                <property name="visible">True</property>
-                <property name="label" translatable="yes">Control</property>
-              </widget>
-              <packing>
-                <property name="tab_fill">False</property>
-                <property name="type">tab</property>
-              </packing>
-            </child>
-            <child>
-              <widget class="GtkTable" id="ftp_table">
-                <property name="visible">True</property>
-                <property name="n_rows">5</property>
-                <property name="n_columns">3</property>
-                <child>
-                  <widget class="GtkLabel" id="ftp_allow_anonymous_label">
-                    <property name="visible">True</property>
-                    <property name="label" translatable="yes">allow anonymous</property>
-                  </widget>
-                  <packing>
-                    <property name="left_attach">1</property>
-                    <property name="right_attach">2</property>
-                    <property name="y_options">GTK_FILL</property>
-                  </packing>
-                </child>
-                <child>
-                  <widget class="GtkComboBox" id="ftp_allow_anonymous_combobox">
-                    <property name="visible">True</property>
-                    <property name="active">0</property>
-                    <property name="items" translatable="yes">yes
-no</property>
-                  </widget>
-                  <packing>
-                    <property name="left_attach">2</property>
-                    <property name="right_attach">3</property>
-                    <property name="y_options">GTK_FILL</property>
-                  </packing>
-                </child>
-                <child>
-                  <widget class="GtkLabel" id="ftp_anonymous_need_pass_label">
-                    <property name="visible">True</property>
-                    <property name="label" translatable="yes">anonymous need pass</property>
-                  </widget>
-                  <packing>
-                    <property name="left_attach">1</property>
-                    <property name="right_attach">2</property>
-                    <property name="top_attach">1</property>
-                    <property name="bottom_attach">2</property>
-                    <property name="y_options">GTK_FILL</property>
-                  </packing>
-                </child>
-                <child>
-                  <widget class="GtkComboBox" id="ftp_anonymous_need_pass_combobox">
-                    <property name="visible">True</property>
-                    <property name="active">0</property>
-                    <property name="items" translatable="yes">yes
-no</property>
-                  </widget>
-                  <packing>
-                    <property name="left_attach">2</property>
-                    <property name="right_attach">3</property>
-                    <property name="top_attach">1</property>
-                    <property name="bottom_attach">2</property>
-                    <property name="y_options">GTK_FILL</property>
-                  </packing>
-                </child>
-                <child>
-                  <widget class="GtkLabel" id="ftp_allow_asynchronous_cmds">
-                    <property name="visible">True</property>
-                    <property name="label" translatable="yes">allow asynchronous cmds</property>
-                  </widget>
-                  <packing>
-                    <property name="left_attach">1</property>
-                    <property name="right_attach">2</property>
-                    <property name="top_attach">2</property>
-                    <property name="bottom_attach">3</property>
-                    <property name="y_options">GTK_FILL</property>
-                  </packing>
-                </child>
-                <child>
-                  <widget class="GtkComboBox" id="ftp_allow_asynchronous_cmds_combobox">
-                    <property name="visible">True</property>
-                    <property name="active">0</property>
-                    <property name="items" translatable="yes">yes
-no</property>
-                  </widget>
-                  <packing>
-                    <property name="left_attach">2</property>
-                    <property name="right_attach">3</property>
-                    <property name="top_attach">2</property>
-                    <property name="bottom_attach">3</property>
-                    <property name="y_options">GTK_FILL</property>
-                  </packing>
-                </child>
-                <child>
-                  <widget class="GtkLabel" id="ftp_allow_pipelining_label">
-                    <property name="visible">True</property>
-                    <property name="label" translatable="yes">allow pipelining</property>
-                  </widget>
-                  <packing>
-                    <property name="left_attach">1</property>
-                    <property name="right_attach">2</property>
-                    <property name="top_attach">3</property>
-                    <property name="bottom_attach">4</property>
-                    <property name="y_options">GTK_FILL</property>
-                  </packing>
-                </child>
-                <child>
-                  <widget class="GtkComboBox" id="ftp_allow_pipelining_combobox">
-                    <property name="visible">True</property>
-                    <property name="active">0</property>
-                    <property name="items" translatable="yes">yes
-no</property>
-                  </widget>
-                  <packing>
-                    <property name="left_attach">2</property>
-                    <property name="right_attach">3</property>
-                    <property name="top_attach">3</property>
-                    <property name="bottom_attach">4</property>
-                    <property name="y_options">GTK_FILL</property>
-                  </packing>
-                </child>
-                <child>
-                  <widget class="GtkLabel" id="ftp_allow_store_label">
-                    <property name="visible">True</property>
-                    <property name="label" translatable="yes">allow store</property>
-                  </widget>
-                  <packing>
-                    <property name="left_attach">1</property>
-                    <property name="right_attach">2</property>
-                    <property name="top_attach">4</property>
-                    <property name="bottom_attach">5</property>
-                    <property name="y_options">GTK_FILL</property>
-                  </packing>
-                </child>
-                <child>
-                  <widget class="GtkComboBox" id="ftp_allow_store_combobox">
-                    <property name="visible">True</property>
-                    <property name="active">0</property>
-                    <property name="items" translatable="yes">yes
-no</property>
-                  </widget>
-                  <packing>
-                    <property name="left_attach">2</property>
-                    <property name="right_attach">3</property>
-                    <property name="top_attach">4</property>
-                    <property name="bottom_attach">5</property>
-                    <property name="y_options">GTK_FILL</property>
-                  </packing>
-                </child>
-                <child>
-                  <widget class="GtkCheckButton" id="ftp_allow_anonymous_checkbutton">
-                    <property name="visible">True</property>
-                    <property name="can_focus">True</property>
-                    <property name="receives_default">False</property>
-                    <property name="draw_indicator">True</property>
-                  </widget>
-                  <packing>
-                    <property name="x_options">GTK_FILL</property>
-                    <property name="y_options">GTK_FILL</property>
-                  </packing>
-                </child>
-                <child>
-                  <widget class="GtkCheckButton" id="ftp_anonymous_need_pass_checkbutton">
-                    <property name="visible">True</property>
-                    <property name="can_focus">True</property>
-                    <property name="receives_default">False</property>
-                    <property name="draw_indicator">True</property>
-                  </widget>
-                  <packing>
-                    <property name="top_attach">1</property>
-                    <property name="bottom_attach">2</property>
-                    <property name="x_options">GTK_FILL</property>
-                    <property name="y_options">GTK_FILL</property>
-                  </packing>
-                </child>
-                <child>
-                  <widget class="GtkCheckButton" id="ftp_allow_asynchronous_cmds_checkbutton">
-                    <property name="visible">True</property>
-                    <property name="can_focus">True</property>
-                    <property name="receives_default">False</property>
-                    <property name="draw_indicator">True</property>
-                  </widget>
-                  <packing>
-                    <property name="top_attach">2</property>
-                    <property name="bottom_attach">3</property>
-                    <property name="x_options">GTK_FILL</property>
-                    <property name="y_options">GTK_FILL</property>
-                  </packing>
-                </child>
-                <child>
-                  <widget class="GtkCheckButton" id="ftp_allow_pipelining_checkbutton">
-                    <property name="visible">True</property>
-                    <property name="can_focus">True</property>
-                    <property name="receives_default">False</property>
-                    <property name="draw_indicator">True</property>
-                  </widget>
-                  <packing>
-                    <property name="top_attach">3</property>
-                    <property name="bottom_attach">4</property>
-                    <property name="x_options">GTK_FILL</property>
-                    <property name="y_options">GTK_FILL</property>
-                  </packing>
-                </child>
-                <child>
-                  <widget class="GtkCheckButton" id="ftp_allow_store_checkbutton">
-                    <property name="visible">True</property>
-                    <property name="can_focus">True</property>
-                    <property name="receives_default">False</property>
-                    <property name="draw_indicator">True</property>
-                  </widget>
-                  <packing>
-                    <property name="top_attach">4</property>
-                    <property name="bottom_attach">5</property>
-                    <property name="x_options">GTK_FILL</property>
-                    <property name="y_options">GTK_FILL</property>
-                  </packing>
-                </child>
-              </widget>
-              <packing>
-                <property name="position">1</property>
-              </packing>
-            </child>
-            <child>
-              <widget class="GtkLabel" id="ftp_label">
-                <property name="visible">True</property>
-                <property name="label" translatable="yes">FTP</property>
-              </widget>
-              <packing>
-                <property name="position">1</property>
-                <property name="tab_fill">False</property>
-                <property name="type">tab</property>
-              </packing>
-            </child>
-            <child>
-              <widget class="GtkTable" id="http_table">
-                <property name="visible">True</property>
-                <property name="n_rows">8</property>
-                <property name="n_columns">3</property>
-                <child>
-                  <widget class="GtkCheckButton" id="http_use_error_file_checkbutton">
-                    <property name="visible">True</property>
-                    <property name="can_focus">True</property>
-                    <property name="receives_default">False</property>
-                    <property name="draw_indicator">True</property>
-                  </widget>
-                  <packing>
-                    <property name="x_options">GTK_FILL</property>
-                    <property name="y_options">GTK_FILL</property>
-                  </packing>
-                </child>
-                <child>
-                  <widget class="GtkLabel" id="http_use_error_file_label">
-                    <property name="visible">True</property>
-                    <property name="label" translatable="yes">use error file</property>
-                  </widget>
-                  <packing>
-                    <property name="left_attach">1</property>
-                    <property name="right_attach">2</property>
-                    <property name="y_options">GTK_FILL</property>
-                  </packing>
-                </child>
-                <child>
-                  <widget class="GtkComboBox" id="http_use_error_file_combobox">
-                    <property name="visible">True</property>
-                    <property name="active">0</property>
-                    <property name="items" translatable="yes">yes
-no</property>
-                  </widget>
-                  <packing>
-                    <property name="left_attach">2</property>
-                    <property name="right_attach">3</property>
-                    <property name="y_options">GTK_FILL</property>
-                  </packing>
-                </child>
-                <child>
-                  <widget class="GtkCheckButton" id="http_use_home_directory_checkbutton">
-                    <property name="visible">True</property>
-                    <property name="can_focus">True</property>
-                    <property name="receives_default">False</property>
-                    <property name="draw_indicator">True</property>
-                  </widget>
-                  <packing>
-                    <property name="top_attach">1</property>
-                    <property name="bottom_attach">2</property>
-                    <property name="x_options">GTK_FILL</property>
-                    <property name="y_options">GTK_FILL</property>
-                  </packing>
-                </child>
-                <child>
-                  <widget class="GtkCheckButton" id="http_home_directory_checkbutton">
-                    <property name="visible">True</property>
-                    <property name="can_focus">True</property>
-                    <property name="receives_default">False</property>
-                    <property name="draw_indicator">True</property>
-                  </widget>
-                  <packing>
-                    <property name="top_attach">2</property>
-                    <property name="bottom_attach">3</property>
-                    <property name="x_options">GTK_FILL</property>
-                    <property name="y_options">GTK_FILL</property>
-                  </packing>
-                </child>
-                <child>
-                  <widget class="GtkLabel" id="http_use_home_directory_label">
-                    <property name="visible">True</property>
-                    <property name="label" translatable="yes">use home directory</property>
-                  </widget>
-                  <packing>
-                    <property name="left_attach">1</property>
-                    <property name="right_attach">2</property>
-                    <property name="top_attach">1</property>
-                    <property name="bottom_attach">2</property>
-                    <property name="y_options">GTK_FILL</property>
-                  </packing>
-                </child>
-                <child>
-                  <widget class="GtkComboBox" id="use_home_directory_combobox">
-                    <property name="visible">True</property>
-                    <property name="active">0</property>
-                    <property name="items" translatable="yes">yes
-no</property>
-                  </widget>
-                  <packing>
-                    <property name="left_attach">2</property>
-                    <property name="right_attach">3</property>
-                    <property name="top_attach">1</property>
-                    <property name="bottom_attach">2</property>
-                    <property name="y_options">GTK_FILL</property>
-                  </packing>
-                </child>
-                <child>
-                  <widget class="GtkLabel" id="http_home_directory_label">
-                    <property name="visible">True</property>
-                    <property name="label" translatable="yes">home directory</property>
-                  </widget>
-                  <packing>
-                    <property name="left_attach">1</property>
-                    <property name="right_attach">2</property>
-                    <property name="top_attach">2</property>
-                    <property name="bottom_attach">3</property>
-                    <property name="y_options">GTK_FILL</property>
-                  </packing>
-                </child>
-                <child>
-                  <widget class="GtkEntry" id="http_home_directory_entry">
-                    <property name="visible">True</property>
-                    <property name="can_focus">True</property>
-                    <property name="invisible_char">&#x25CF;</property>
-                  </widget>
-                  <packing>
-                    <property name="left_attach">2</property>
-                    <property name="right_attach">3</property>
-                    <property name="top_attach">2</property>
-                    <property name="bottom_attach">3</property>
-                    <property name="y_options">GTK_FILL</property>
-                  </packing>
-                </child>
-                <child>
-                  <widget class="GtkTreeView" id="http_default_file_treeview">
-                    <property name="visible">True</property>
-                    <property name="can_focus">True</property>
-                  </widget>
-                  <packing>
-                    <property name="right_attach">2</property>
-                    <property name="top_attach">4</property>
-                    <property name="bottom_attach">8</property>
-                  </packing>
-                </child>
-                <child>
-                  <widget class="GtkEntry" id="http_default_file_entry">
-                    <property name="visible">True</property>
-                    <property name="can_focus">True</property>
-                    <property name="invisible_char">&#x25CF;</property>
-                  </widget>
-                  <packing>
-                    <property name="left_attach">2</property>
-                    <property name="right_attach">3</property>
-                    <property name="top_attach">5</property>
-                    <property name="bottom_attach">6</property>
-                    <property name="y_options">GTK_FILL</property>
-                  </packing>
-                </child>
-                <child>
-                  <widget class="GtkButton" id="http_default_file_add_button">
-                    <property name="label" translatable="yes">add default file</property>
-                    <property name="visible">True</property>
-                    <property name="can_focus">True</property>
-                    <property name="receives_default">True</property>
-                  </widget>
-                  <packing>
-                    <property name="left_attach">2</property>
-                    <property name="right_attach">3</property>
-                    <property name="top_attach">6</property>
-                    <property name="bottom_attach">7</property>
-                    <property name="y_options">GTK_FILL</property>
-                  </packing>
-                </child>
-                <child>
-                  <widget class="GtkButton" id="http_default_file_remove_button">
-                    <property name="label" translatable="yes">remove selected default files</property>
-                    <property name="visible">True</property>
-                    <property name="can_focus">True</property>
-                    <property name="receives_default">True</property>
-                  </widget>
-                  <packing>
-                    <property name="left_attach">2</property>
-                    <property name="right_attach">3</property>
-                    <property name="top_attach">4</property>
-                    <property name="bottom_attach">5</property>
-                    <property name="y_options">GTK_FILL</property>
-                  </packing>
-                </child>
-                <child>
-                  <widget class="GtkLabel" id="http_fill_label_1">
-                    <property name="visible">True</property>
-                  </widget>
-                  <packing>
-                    <property name="left_attach">2</property>
-                    <property name="right_attach">3</property>
-                    <property name="top_attach">7</property>
-                    <property name="bottom_attach">8</property>
-                  </packing>
-                </child>
-                <child>
-                  <widget class="GtkCheckButton" id="http_dir_css_checkbutton">
-                    <property name="visible">True</property>
-                    <property name="can_focus">True</property>
-                    <property name="receives_default">False</property>
-                    <property name="draw_indicator">True</property>
-                  </widget>
-                  <packing>
-                    <property name="top_attach">3</property>
-                    <property name="bottom_attach">4</property>
-                    <property name="x_options">GTK_FILL</property>
-                    <property name="y_options">GTK_FILL</property>
-                  </packing>
-                </child>
-                <child>
-                  <widget class="GtkLabel" id="http_dir_css_label">
-                    <property name="visible">True</property>
-                    <property name="label" translatable="yes">http dir css</property>
-                  </widget>
-                  <packing>
-                    <property name="left_attach">1</property>
-                    <property name="right_attach">2</property>
-                    <property name="top_attach">3</property>
-                    <property name="bottom_attach">4</property>
-                    <property name="y_options">GTK_FILL</property>
-                  </packing>
-                </child>
-                <child>
-                  <widget class="GtkEntry" id="http_dir_css_entry">
-                    <property name="visible">True</property>
-                    <property name="can_focus">True</property>
-                    <property name="invisible_char">&#x25CF;</property>
-                  </widget>
-                  <packing>
-                    <property name="left_attach">2</property>
-                    <property name="right_attach">3</property>
-                    <property name="top_attach">3</property>
-                    <property name="bottom_attach">4</property>
-                    <property name="y_options">GTK_FILL</property>
-                  </packing>
-                </child>
-              </widget>
-              <packing>
-                <property name="position">2</property>
-              </packing>
-            </child>
-            <child>
-              <widget class="GtkLabel" id="http_label">
-                <property name="visible">True</property>
-                <property name="label" translatable="yes">HTTP</property>
-              </widget>
-              <packing>
-                <property name="position">2</property>
-                <property name="tab_fill">False</property>
-                <property name="type">tab</property>
-              </packing>
-            </child>
-            <child>
-              <widget class="GtkTable" id="server_table">
-                <property name="visible">True</property>
-                <property name="n_rows">13</property>
-                <property name="n_columns">3</property>
-                <child>
-                  <widget class="GtkCheckButton" id="server_language_checkbutton">
-                    <property name="visible">True</property>
-                    <property name="can_focus">True</property>
-                    <property name="receives_default">False</property>
-                    <property name="draw_indicator">True</property>
-                  </widget>
-                  <packing>
-                    <property name="x_options">GTK_FILL</property>
-                    <property name="y_options">GTK_FILL</property>
-                  </packing>
-                </child>
-                <child>
-                  <widget class="GtkLabel" id="server_language_label">
-                    <property name="visible">True</property>
-                    <property name="label" translatable="yes">language</property>
-                  </widget>
-                  <packing>
-                    <property name="left_attach">1</property>
-                    <property name="right_attach">2</property>
-                    <property name="y_options">GTK_FILL</property>
-                  </packing>
-                </child>
-                <child>
-                  <widget class="GtkComboBox" id="server_language_combobox">
-                    <property name="visible">True</property>
-                  </widget>
-                  <packing>
-                    <property name="left_attach">2</property>
-                    <property name="right_attach">3</property>
-                    <property name="y_options">GTK_FILL</property>
-                  </packing>
-                </child>
-                <child>
-                  <widget class="GtkCheckButton" id="server_verbosity_checkbutton">
-                    <property name="visible">True</property>
-                    <property name="can_focus">True</property>
-                    <property name="receives_default">False</property>
-                    <property name="draw_indicator">True</property>
-                  </widget>
-                  <packing>
-                    <property name="top_attach">1</property>
-                    <property name="bottom_attach">2</property>
-                    <property name="x_options">GTK_FILL</property>
-                    <property name="y_options">GTK_FILL</property>
-                  </packing>
-                </child>
-                <child>
-                  <widget class="GtkLabel" id="server_verbosity_label">
-                    <property name="visible">True</property>
-                    <property name="label" translatable="yes">verbosity</property>
-                  </widget>
-                  <packing>
-                    <property name="left_attach">1</property>
-                    <property name="right_attach">2</property>
-                    <property name="top_attach">1</property>
-                    <property name="bottom_attach">2</property>
-                    <property name="y_options">GTK_FILL</property>
-                  </packing>
-                </child>
-                <child>
-                  <widget class="GtkSpinButton" id="server_verbosity_spinbutton">
-                    <property name="visible">True</property>
-                    <property name="can_focus">True</property>
-                    <property name="invisible_char">&#x25CF;</property>
-                  </widget>
-                  <packing>
-                    <property name="left_attach">2</property>
-                    <property name="right_attach">3</property>
-                    <property name="top_attach">1</property>
-                    <property name="bottom_attach">2</property>
-                    <property name="y_options">GTK_FILL</property>
-                  </packing>
-                </child>
-                <child>
-                  <widget class="GtkCheckButton" id="server_static_threads_checkbutton">
-                    <property name="visible">True</property>
-                    <property name="can_focus">True</property>
-                    <property name="receives_default">False</property>
-                    <property name="draw_indicator">True</property>
-                  </widget>
-                  <packing>
-                    <property name="top_attach">2</property>
-                    <property name="bottom_attach">3</property>
-                    <property name="x_options">GTK_FILL</property>
-                    <property name="y_options">GTK_FILL</property>
-                  </packing>
-                </child>
-                <child>
-                  <widget class="GtkLabel" id="server_static_threads_label">
-                    <property name="visible">True</property>
-                    <property name="label" translatable="yes">static threads</property>
-                  </widget>
-                  <packing>
-                    <property name="left_attach">1</property>
-                    <property name="right_attach">2</property>
-                    <property name="top_attach">2</property>
-                    <property name="bottom_attach">3</property>
-                    <property name="y_options">GTK_FILL</property>
-                  </packing>
-                </child>
-                <child>
-                  <widget class="GtkSpinButton" id="server_static_threads_spinbutton">
-                    <property name="visible">True</property>
-                    <property name="can_focus">True</property>
-                    <property name="invisible_char">&#x25CF;</property>
-                  </widget>
-                  <packing>
-                    <property name="left_attach">2</property>
-                    <property name="right_attach">3</property>
-                    <property name="top_attach">2</property>
-                    <property name="bottom_attach">3</property>
-                    <property name="y_options">GTK_FILL</property>
-                  </packing>
-                </child>
-                <child>
-                  <widget class="GtkCheckButton" id="server_max_threads_checkbutton">
-                    <property name="visible">True</property>
-                    <property name="can_focus">True</property>
-                    <property name="receives_default">False</property>
-                    <property name="draw_indicator">True</property>
-                  </widget>
-                  <packing>
-                    <property name="top_attach">3</property>
-                    <property name="bottom_attach">4</property>
-                    <property name="x_options">GTK_FILL</property>
-                    <property name="y_options">GTK_FILL</property>
-                  </packing>
-                </child>
-                <child>
-                  <widget class="GtkLabel" id="server_max_threads_label">
-                    <property name="visible">True</property>
-                    <property name="label" translatable="yes">max threads</property>
-                  </widget>
-                  <packing>
-                    <property name="left_attach">1</property>
-                    <property name="right_attach">2</property>
-                    <property name="top_attach">3</property>
-                    <property name="bottom_attach">4</property>
-                    <property name="y_options">GTK_FILL</property>
-                  </packing>
-                </child>
-                <child>
-                  <widget class="GtkSpinButton" id="server_max_threads_spinbutton">
-                    <property name="visible">True</property>
-                    <property name="can_focus">True</property>
-                    <property name="invisible_char">&#x25CF;</property>
-                  </widget>
-                  <packing>
-                    <property name="left_attach">2</property>
-                    <property name="right_attach">3</property>
-                    <property name="top_attach">3</property>
-                    <property name="bottom_attach">4</property>
-                    <property name="y_options">GTK_FILL</property>
-                  </packing>
-                </child>
-                <child>
-                  <widget class="GtkCheckButton" id="server_buffer_size_checkbutton">
-                    <property name="visible">True</property>
-                    <property name="can_focus">True</property>
-                    <property name="receives_default">False</property>
-                    <property name="draw_indicator">True</property>
-                  </widget>
-                  <packing>
-                    <property name="top_attach">4</property>
-                    <property name="bottom_attach">5</property>
-                    <property name="x_options">GTK_FILL</property>
-                    <property name="y_options">GTK_FILL</property>
-                  </packing>
-                </child>
-                <child>
-                  <widget class="GtkLabel" id="server_buffer_size_label">
-                    <property name="visible">True</property>
-                    <property name="label" translatable="yes">buffer size</property>
-                  </widget>
-                  <packing>
-                    <property name="left_attach">1</property>
-                    <property name="right_attach">2</property>
-                    <property name="top_attach">4</property>
-                    <property name="bottom_attach">5</property>
-                    <property name="y_options">GTK_FILL</property>
-                  </packing>
-                </child>
-                <child>
-                  <widget class="GtkSpinButton" id="server_buffer_size_spinbutton">
-                    <property name="visible">True</property>
-                    <property name="can_focus">True</property>
-                    <property name="invisible_char">&#x25CF;</property>
-                  </widget>
-                  <packing>
-                    <property name="left_attach">2</property>
-                    <property name="right_attach">3</property>
-                    <property name="top_attach">4</property>
-                    <property name="bottom_attach">5</property>
-                    <property name="y_options">GTK_FILL</property>
-                  </packing>
-                </child>
-                <child>
-                  <widget class="GtkCheckButton" id="server_max_connections_checkbutton">
-                    <property name="visible">True</property>
-                    <property name="can_focus">True</property>
-                    <property name="receives_default">False</property>
-                    <property name="draw_indicator">True</property>
-                  </widget>
-                  <packing>
-                    <property name="top_attach">5</property>
-                    <property name="bottom_attach">6</property>
-                    <property name="x_options">GTK_FILL</property>
-                    <property name="y_options">GTK_FILL</property>
-                  </packing>
-                </child>
-                <child>
-                  <widget class="GtkLabel" id="server_max_connections_label">
-                    <property name="visible">True</property>
-                    <property name="label" translatable="yes">max connections</property>
-                  </widget>
-                  <packing>
-                    <property name="left_attach">1</property>
-                    <property name="right_attach">2</property>
-                    <property name="top_attach">5</property>
-                    <property name="bottom_attach">6</property>
-                    <property name="y_options">GTK_FILL</property>
-                  </packing>
-                </child>
-                <child>
-                  <widget class="GtkSpinButton" id="server_max_connections_spinbutton">
-                    <property name="visible">True</property>
-                    <property name="can_focus">True</property>
-                    <property name="invisible_char">&#x25CF;</property>
-                  </widget>
-                  <packing>
-                    <property name="left_attach">2</property>
-                    <property name="right_attach">3</property>
-                    <property name="top_attach">5</property>
-                    <property name="bottom_attach">6</property>
-                    <property name="y_options">GTK_FILL</property>
-                  </packing>
-                </child>
-                <child>
-                  <widget class="GtkCheckButton" id="server_max_accepted_connections_checkbutton">
-                    <property name="visible">True</property>
-                    <property name="can_focus">True</property>
-                    <property name="receives_default">False</property>
-                    <property name="draw_indicator">True</property>
-                  </widget>
-                  <packing>
-                    <property name="top_attach">6</property>
-                    <property name="bottom_attach">7</property>
-                    <property name="x_options">GTK_FILL</property>
-                    <property name="y_options">GTK_FILL</property>
-                  </packing>
-                </child>
-                <child>
-                  <widget class="GtkLabel" id="server_max_accepted_connections_label">
-                    <property name="visible">True</property>
-                    <property name="label" translatable="yes">max accepted connections</property>
-                  </widget>
-                  <packing>
-                    <property name="left_attach">1</property>
-                    <property name="right_attach">2</property>
-                    <property name="top_attach">6</property>
-                    <property name="bottom_attach">7</property>
-                    <property name="y_options">GTK_FILL</property>
-                  </packing>
-                </child>
-                <child>
-                  <widget class="GtkSpinButton" id="server_max_accepted_connections_spinbutton">
-                    <property name="visible">True</property>
-                    <property name="can_focus">True</property>
-                    <property name="invisible_char">&#x25CF;</property>
-                  </widget>
-                  <packing>
-                    <property name="left_attach">2</property>
-                    <property name="right_attach">3</property>
-                    <property name="top_attach">6</property>
-                    <property name="bottom_attach">7</property>
-                    <property name="y_options">GTK_FILL</property>
-                  </packing>
-                </child>
-                <child>
-                  <widget class="GtkCheckButton" id="server_admin_checkbutton">
-                    <property name="visible">True</property>
-                    <property name="can_focus">True</property>
-                    <property name="receives_default">False</property>
-                    <property name="draw_indicator">True</property>
-                  </widget>
-                  <packing>
-                    <property name="top_attach">7</property>
-                    <property name="bottom_attach">8</property>
-                    <property name="x_options">GTK_FILL</property>
-                    <property name="y_options">GTK_FILL</property>
-                  </packing>
-                </child>
-                <child>
-                  <widget class="GtkLabel" id="server_admin_label">
-                    <property name="visible">True</property>
-                    <property name="label" translatable="yes">admin</property>
-                  </widget>
-                  <packing>
-                    <property name="left_attach">1</property>
-                    <property name="right_attach">2</property>
-                    <property name="top_attach">7</property>
-                    <property name="bottom_attach">8</property>
-                    <property name="y_options">GTK_FILL</property>
-                  </packing>
-                </child>
-                <child>
-                  <widget class="GtkEntry" id="server_admin_entry">
-                    <property name="visible">True</property>
-                    <property name="can_focus">True</property>
-                    <property name="invisible_char">&#x25CF;</property>
-                  </widget>
-                  <packing>
-                    <property name="left_attach">2</property>
-                    <property name="right_attach">3</property>
-                    <property name="top_attach">7</property>
-                    <property name="bottom_attach">8</property>
-                    <property name="y_options">GTK_FILL</property>
-                  </packing>
-                </child>
-                <child>
-                  <widget class="GtkCheckButton" id="server_max_files_cache_checkbutton">
-                    <property name="visible">True</property>
-                    <property name="can_focus">True</property>
-                    <property name="receives_default">False</property>
-                    <property name="draw_indicator">True</property>
-                  </widget>
-                  <packing>
-                    <property name="top_attach">8</property>
-                    <property name="bottom_attach">9</property>
-                    <property name="x_options">GTK_FILL</property>
-                    <property name="y_options">GTK_FILL</property>
-                  </packing>
-                </child>
-                <child>
-                  <widget class="GtkLabel" id="server_max_files_cache_label">
-                    <property name="visible">True</property>
-                    <property name="label" translatable="yes">max files cache</property>
-                  </widget>
-                  <packing>
-                    <property name="left_attach">1</property>
-                    <property name="right_attach">2</property>
-                    <property name="top_attach">8</property>
-                    <property name="bottom_attach">9</property>
-                    <property name="y_options">GTK_FILL</property>
-                  </packing>
-                </child>
-                <child>
-                  <widget class="GtkSpinButton" id="server_max_files_cache_spinbutton">
-                    <property name="visible">True</property>
-                    <property name="can_focus">True</property>
-                    <property name="invisible_char">&#x25CF;</property>
-                  </widget>
-                  <packing>
-                    <property name="left_attach">2</property>
-                    <property name="right_attach">3</property>
-                    <property name="top_attach">8</property>
-                    <property name="bottom_attach">9</property>
-                    <property name="y_options">GTK_FILL</property>
-                  </packing>
-                </child>
-                <child>
-                  <widget class="GtkCheckButton" id="server_max_file_cache_checkbutton">
-                    <property name="visible">True</property>
-                    <property name="can_focus">True</property>
-                    <property name="receives_default">False</property>
-                    <property name="draw_indicator">True</property>
-                  </widget>
-                  <packing>
-                    <property name="top_attach">9</property>
-                    <property name="bottom_attach">10</property>
-                    <property name="x_options">GTK_FILL</property>
-                    <property name="y_options">GTK_FILL</property>
-                  </packing>
-                </child>
-                <child>
-                  <widget class="GtkLabel" id="server_max_file_cache_label">
-                    <property name="visible">True</property>
-                    <property name="label" translatable="yes">max file cache</property>
-                  </widget>
-                  <packing>
-                    <property name="left_attach">1</property>
-                    <property name="right_attach">2</property>
-                    <property name="top_attach">9</property>
-                    <property name="bottom_attach">10</property>
-                    <property name="y_options">GTK_FILL</property>
-                  </packing>
-                </child>
-                <child>
-                  <widget class="GtkSpinButton" id="server_max_file_cache_spinbutton">
-                    <property name="visible">True</property>
-                    <property name="can_focus">True</property>
-                    <property name="invisible_char">&#x25CF;</property>
-                  </widget>
-                  <packing>
-                    <property name="left_attach">2</property>
-                    <property name="right_attach">3</property>
-                    <property name="top_attach">9</property>
-                    <property name="bottom_attach">10</property>
-                    <property name="y_options">GTK_FILL</property>
-                  </packing>
-                </child>
-                <child>
-                  <widget class="GtkCheckButton" id="server_min_file_cache_checkbutton">
-                    <property name="visible">True</property>
-                    <property name="can_focus">True</property>
-                    <property name="receives_default">False</property>
-                    <property name="draw_indicator">True</property>
-                  </widget>
-                  <packing>
-                    <property name="top_attach">10</property>
-                    <property name="bottom_attach">11</property>
-                    <property name="x_options">GTK_FILL</property>
-                    <property name="y_options">GTK_FILL</property>
-                  </packing>
-                </child>
-                <child>
-                  <widget class="GtkLabel" id="server_min_file_cache_label">
-                    <property name="visible">True</property>
-                    <property name="label" translatable="yes">min file cache</property>
-                  </widget>
-                  <packing>
-                    <property name="left_attach">1</property>
-                    <property name="right_attach">2</property>
-                    <property name="top_attach">10</property>
-                    <property name="bottom_attach">11</property>
-                    <property name="y_options">GTK_FILL</property>
-                  </packing>
-                </child>
-                <child>
-                  <widget class="GtkSpinButton" id="server_min_file_cache_spinbutton">
-                    <property name="visible">True</property>
-                    <property name="can_focus">True</property>
-                    <property name="invisible_char">&#x25CF;</property>
-                  </widget>
-                  <packing>
-                    <property name="left_attach">2</property>
-                    <property name="right_attach">3</property>
-                    <property name="top_attach">10</property>
-                    <property name="bottom_attach">11</property>
-                    <property name="y_options">GTK_FILL</property>
-                  </packing>
-                </child>
-                <child>
-                  <widget class="GtkCheckButton" id="server_max_servers_checkbutton">
-                    <property name="visible">True</property>
-                    <property name="can_focus">True</property>
-                    <property name="receives_default">False</property>
-                    <property name="draw_indicator">True</property>
-                  </widget>
-                  <packing>
-                    <property name="top_attach">11</property>
-                    <property name="bottom_attach">12</property>
-                    <property name="x_options">GTK_FILL</property>
-                    <property name="y_options">GTK_FILL</property>
-                  </packing>
-                </child>
-                <child>
-                  <widget class="GtkLabel" id="server_max_servers_label">
-                    <property name="visible">True</property>
-                    <property name="label" translatable="yes">max servers</property>
-                  </widget>
-                  <packing>
-                    <property name="left_attach">1</property>
-                    <property name="right_attach">2</property>
-                    <property name="top_attach">11</property>
-                    <property name="bottom_attach">12</property>
-                    <property name="y_options">GTK_FILL</property>
-                  </packing>
-                </child>
-                <child>
-                  <widget class="GtkSpinButton" id="server_max_servers_spinbutton">
-                    <property name="visible">True</property>
-                    <property name="can_focus">True</property>
-                    <property name="invisible_char">&#x25CF;</property>
-                  </widget>
-                  <packing>
-                    <property name="left_attach">2</property>
-                    <property name="right_attach">3</property>
-                    <property name="top_attach">11</property>
-                    <property name="bottom_attach">12</property>
-                    <property name="y_options">GTK_FILL</property>
-                  </packing>
-                </child>
-                <child>
-                  <widget class="GtkCheckButton" id="server_max_log_size_checkbutton">
-                    <property name="visible">True</property>
-                    <property name="can_focus">True</property>
-                    <property name="receives_default">False</property>
-                    <property name="draw_indicator">True</property>
-                  </widget>
-                  <packing>
-                    <property name="top_attach">12</property>
-                    <property name="bottom_attach">13</property>
-                    <property name="x_options">GTK_FILL</property>
-                    <property name="y_options">GTK_FILL</property>
-                  </packing>
-                </child>
-                <child>
-                  <widget class="GtkLabel" id="server_max_log_size_label">
-                    <property name="visible">True</property>
-                    <property name="label" translatable="yes">max log size</property>
-                  </widget>
-                  <packing>
-                    <property name="left_attach">1</property>
-                    <property name="right_attach">2</property>
-                    <property name="top_attach">12</property>
-                    <property name="bottom_attach">13</property>
-                    <property name="y_options">GTK_FILL</property>
-                  </packing>
-                </child>
-                <child>
-                  <widget class="GtkSpinButton" id="server_max_log_size_spinbutton">
-                    <property name="visible">True</property>
-                    <property name="can_focus">True</property>
-                    <property name="invisible_char">&#x25CF;</property>
-                  </widget>
-                  <packing>
-                    <property name="left_attach">2</property>
-                    <property name="right_attach">3</property>
-                    <property name="top_attach">12</property>
-                    <property name="bottom_attach">13</property>
-                    <property name="y_options">GTK_FILL</property>
-                  </packing>
-                </child>
-              </widget>
-              <packing>
-                <property name="position">3</property>
-              </packing>
-            </child>
-            <child>
-              <widget class="GtkLabel" id="server_label">
-                <property name="visible">True</property>
-                <property name="label" translatable="yes">Server</property>
-              </widget>
-              <packing>
-                <property name="position">3</property>
-                <property name="tab_fill">False</property>
-                <property name="type">tab</property>
-              </packing>
-            </child>
-            <child>
-              <widget class="GtkTable" id="other_table">
-                <property name="visible">True</property>
-                <property name="n_rows">3</property>
-                <property name="n_columns">3</property>
-                <child>
-                  <widget class="GtkCheckButton" id="connection_timeout_checkbutton">
-                    <property name="visible">True</property>
-                    <property name="can_focus">True</property>
-                    <property name="receives_default">False</property>
-                    <property name="draw_indicator">True</property>
-                  </widget>
-                  <packing>
-                    <property name="x_options">GTK_FILL</property>
-                    <property name="y_options">GTK_FILL</property>
-                  </packing>
-                </child>
-                <child>
-                  <widget class="GtkLabel" id="connection_timeout_label">
-                    <property name="visible">True</property>
-                    <property name="label" translatable="yes">connection timeout</property>
-                  </widget>
-                  <packing>
-                    <property name="left_attach">1</property>
-                    <property name="right_attach">2</property>
-                    <property name="y_options">GTK_FILL</property>
-                  </packing>
-                </child>
-                <child>
-                  <widget class="GtkSpinButton" id="connection_timeout_spinbutton">
-                    <property name="visible">True</property>
-                    <property name="can_focus">True</property>
-                    <property name="invisible_char">&#x25CF;</property>
-                  </widget>
-                  <packing>
-                    <property name="left_attach">2</property>
-                    <property name="right_attach">3</property>
-                    <property name="y_options">GTK_FILL</property>
-                  </packing>
-                </child>
-                <child>
-                  <widget class="GtkCheckButton" id="gzip_threshold_checkbutton">
-                    <property name="visible">True</property>
-                    <property name="can_focus">True</property>
-                    <property name="receives_default">False</property>
-                    <property name="draw_indicator">True</property>
-                  </widget>
-                  <packing>
-                    <property name="top_attach">1</property>
-                    <property name="bottom_attach">2</property>
-                    <property name="x_options">GTK_FILL</property>
-                    <property name="y_options">GTK_FILL</property>
-                  </packing>
-                </child>
-                <child>
-                  <widget class="GtkLabel" id="gzip_threshold_label">
-                    <property name="visible">True</property>
-                    <property name="label" translatable="yes">gzip threshold</property>
-                  </widget>
-                  <packing>
-                    <property name="left_attach">1</property>
-                    <property name="right_attach">2</property>
-                    <property name="top_attach">1</property>
-                    <property name="bottom_attach">2</property>
-                    <property name="y_options">GTK_FILL</property>
-                  </packing>
-                </child>
-                <child>
-                  <widget class="GtkSpinButton" id="gzip_threshold_spinbutton">
-                    <property name="visible">True</property>
-                    <property name="can_focus">True</property>
-                    <property name="invisible_char">&#x25CF;</property>
-                  </widget>
-                  <packing>
-                    <property name="left_attach">2</property>
-                    <property name="right_attach">3</property>
-                    <property name="top_attach">1</property>
-                    <property name="bottom_attach">2</property>
-                    <property name="y_options">GTK_FILL</property>
-                  </packing>
-                </child>
-                <child>
-                  <widget class="GtkCheckButton" id="symlinks_follow_checkbutton">
-                    <property name="visible">True</property>
-                    <property name="can_focus">True</property>
-                    <property name="receives_default">False</property>
-                    <property name="draw_indicator">True</property>
-                  </widget>
-                  <packing>
-                    <property name="top_attach">2</property>
-                    <property name="bottom_attach">3</property>
-                    <property name="x_options">GTK_FILL</property>
-                    <property name="y_options">GTK_FILL</property>
-                  </packing>
-                </child>
-                <child>
-                  <widget class="GtkLabel" id="symlinks_follow_label">
-                    <property name="visible">True</property>
-                    <property name="label" translatable="yes">symlinks follow</property>
-                  </widget>
-                  <packing>
-                    <property name="left_attach">1</property>
-                    <property name="right_attach">2</property>
-                    <property name="top_attach">2</property>
-                    <property name="bottom_attach">3</property>
-                    <property name="y_options">GTK_FILL</property>
-                  </packing>
-                </child>
-                <child>
-                  <widget class="GtkComboBox" id="symlinks_follow_combobox">
-                    <property name="visible">True</property>
-                    <property name="active">0</property>
-                    <property name="items" translatable="yes">yes
-no</property>
-                  </widget>
-                  <packing>
-                    <property name="left_attach">2</property>
-                    <property name="right_attach">3</property>
-                    <property name="top_attach">2</property>
-                    <property name="bottom_attach">3</property>
-                    <property name="y_options">GTK_FILL</property>
-                  </packing>
-                </child>
-              </widget>
-              <packing>
-                <property name="position">4</property>
-              </packing>
-            </child>
-            <child>
-              <widget class="GtkLabel" id="other_label">
-                <property name="visible">True</property>
-                <property name="label" translatable="yes">Other</property>
-              </widget>
-              <packing>
-                <property name="position">4</property>
-                <property name="tab_fill">False</property>
-                <property name="type">tab</property>
-              </packing>
-            </child>
           </widget>
           <packing>
             <property name="position">1</property>



commit fbb478a19413cc0db6222da7bd5f19c75916785b
Author: Marek Aaron Sapota <maarons@gnu.org>
Date:   Mon Jul 13 22:47:26 2009 +0200

    First GUI design.

diff --git a/misc/PyGTK_Control/MyServerControl.py b/misc/PyGTK_Control/MyServerControl.py
new file mode 100644
index 0000000..0b497cb
--- /dev/null
+++ b/misc/PyGTK_Control/MyServerControl.py
@@ -0,0 +1,32 @@
+# -*- coding: utf-8 -*-
+'''
+MyServer
+Copyright (C) 2009 Free Software Foundation, Inc.
+This program 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 3 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program.  If not, see <http://www.gnu.org/licenses/>.
+'''
+
+import gtk
+import gtk.glade
+
+class PyGTKControl():
+    def __init__(self):
+        self.gladefile = 'PyGTKControl.glade'
+        self.widgets = gtk.glade.XML(self.gladefile, 'window')
+        self.widgets.signal_autoconnect(self)
+
+    def on_window_destroy(self, widget):
+        gtk.main_quit()
+
+PyGTKControl()
+gtk.main()
diff --git a/misc/PyGTK_Control/PyGTKControl.glade b/misc/PyGTK_Control/PyGTKControl.glade
new file mode 100644
index 0000000..9492698
--- /dev/null
+++ b/misc/PyGTK_Control/PyGTKControl.glade
@@ -0,0 +1,1463 @@
+<?xml version="1.0"?>
+<glade-interface>
+  <!-- interface-requires gtk+ 2.16 -->
+  <!-- interface-naming-policy toplevel-contextual -->
+  <widget class="GtkWindow" id="window">
+    <property name="visible">True</property>
+    <signal name="destroy" handler="on_window_destroy"/>
+    <child>
+      <widget class="GtkVBox" id="vbox1">
+        <property name="visible">True</property>
+        <property name="orientation">vertical</property>
+        <child>
+          <widget class="GtkMenuBar" id="menubar1">
+            <property name="visible">True</property>
+            <child>
+              <widget class="GtkMenuItem" id="menuitem1">
+                <property name="visible">True</property>
+                <property name="label" translatable="yes">_File</property>
+                <property name="use_underline">True</property>
+                <child>
+                  <widget class="GtkMenu" id="menu1">
+                    <property name="visible">True</property>
+                    <child>
+                      <widget class="GtkImageMenuItem" id="imagemenuitem1">
+                        <property name="label">gtk-new</property>
+                        <property name="visible">True</property>
+                        <property name="use_underline">True</property>
+                        <property name="use_stock">True</property>
+                      </widget>
+                    </child>
+                    <child>
+                      <widget class="GtkImageMenuItem" id="imagemenuitem2">
+                        <property name="label">gtk-open</property>
+                        <property name="visible">True</property>
+                        <property name="use_underline">True</property>
+                        <property name="use_stock">True</property>
+                      </widget>
+                    </child>
+                    <child>
+                      <widget class="GtkImageMenuItem" id="imagemenuitem3">
+                        <property name="label">gtk-save</property>
+                        <property name="visible">True</property>
+                        <property name="use_underline">True</property>
+                        <property name="use_stock">True</property>
+                      </widget>
+                    </child>
+                    <child>
+                      <widget class="GtkImageMenuItem" id="imagemenuitem4">
+                        <property name="label">gtk-save-as</property>
+                        <property name="visible">True</property>
+                        <property name="use_underline">True</property>
+                        <property name="use_stock">True</property>
+                      </widget>
+                    </child>
+                    <child>
+                      <widget class="GtkSeparatorMenuItem" id="separatormenuitem1">
+                        <property name="visible">True</property>
+                      </widget>
+                    </child>
+                    <child>
+                      <widget class="GtkImageMenuItem" id="imagemenuitem5">
+                        <property name="label">gtk-quit</property>
+                        <property name="visible">True</property>
+                        <property name="use_underline">True</property>
+                        <property name="use_stock">True</property>
+                      </widget>
+                    </child>
+                  </widget>
+                </child>
+              </widget>
+            </child>
+            <child>
+              <widget class="GtkMenuItem" id="menuitem2">
+                <property name="visible">True</property>
+                <property name="label" translatable="yes">_Edit</property>
+                <property name="use_underline">True</property>
+                <child>
+                  <widget class="GtkMenu" id="menu2">
+                    <property name="visible">True</property>
+                    <child>
+                      <widget class="GtkImageMenuItem" id="imagemenuitem6">
+                        <property name="label">gtk-cut</property>
+                        <property name="visible">True</property>
+                        <property name="use_underline">True</property>
+                        <property name="use_stock">True</property>
+                      </widget>
+                    </child>
+                    <child>
+                      <widget class="GtkImageMenuItem" id="imagemenuitem7">
+                        <property name="label">gtk-copy</property>
+                        <property name="visible">True</property>
+                        <property name="use_underline">True</property>
+                        <property name="use_stock">True</property>
+                      </widget>
+                    </child>
+                    <child>
+                      <widget class="GtkImageMenuItem" id="imagemenuitem8">
+                        <property name="label">gtk-paste</property>
+                        <property name="visible">True</property>
+                        <property name="use_underline">True</property>
+                        <property name="use_stock">True</property>
+                      </widget>
+                    </child>
+                    <child>
+                      <widget class="GtkImageMenuItem" id="imagemenuitem9">
+                        <property name="label">gtk-delete</property>
+                        <property name="visible">True</property>
+                        <property name="use_underline">True</property>
+                        <property name="use_stock">True</property>
+                      </widget>
+                    </child>
+                  </widget>
+                </child>
+              </widget>
+            </child>
+            <child>
+              <widget class="GtkMenuItem" id="menuitem3">
+                <property name="visible">True</property>
+                <property name="label" translatable="yes">_View</property>
+                <property name="use_underline">True</property>
+              </widget>
+            </child>
+            <child>
+              <widget class="GtkMenuItem" id="menuitem4">
+                <property name="visible">True</property>
+                <property name="label" translatable="yes">_Help</property>
+                <property name="use_underline">True</property>
+                <child>
+                  <widget class="GtkMenu" id="menu3">
+                    <property name="visible">True</property>
+                    <child>
+                      <widget class="GtkImageMenuItem" id="imagemenuitem10">
+                        <property name="label">gtk-about</property>
+                        <property name="visible">True</property>
+                        <property name="use_underline">True</property>
+                        <property name="use_stock">True</property>
+                      </widget>
+                    </child>
+                  </widget>
+                </child>
+              </widget>
+            </child>
+          </widget>
+          <packing>
+            <property name="expand">False</property>
+            <property name="position">0</property>
+          </packing>
+        </child>
+        <child>
+          <widget class="GtkNotebook" id="notebook">
+            <property name="visible">True</property>
+            <property name="can_focus">True</property>
+            <child>
+              <widget class="GtkTable" id="control_table">
+                <property name="visible">True</property>
+                <property name="n_rows">3</property>
+                <property name="n_columns">3</property>
+                <child>
+                  <widget class="GtkLabel" id="control_enabled_label">
+                    <property name="visible">True</property>
+                    <property name="label" translatable="yes">enabled</property>
+                  </widget>
+                  <packing>
+                    <property name="left_attach">1</property>
+                    <property name="right_attach">2</property>
+                    <property name="y_options">GTK_FILL</property>
+                  </packing>
+                </child>
+                <child>
+                  <widget class="GtkComboBox" id="control_enabled_combobox">
+                    <property name="visible">True</property>
+                    <property name="active">0</property>
+                    <property name="items" translatable="yes">yes
+no</property>
+                  </widget>
+                  <packing>
+                    <property name="left_attach">2</property>
+                    <property name="right_attach">3</property>
+                    <property name="y_options">GTK_FILL</property>
+                  </packing>
+                </child>
+                <child>
+                  <widget class="GtkLabel" id="control_admin_label">
+                    <property name="visible">True</property>
+                    <property name="label" translatable="yes">admin</property>
+                  </widget>
+                  <packing>
+                    <property name="left_attach">1</property>
+                    <property name="right_attach">2</property>
+                    <property name="top_attach">1</property>
+                    <property name="bottom_attach">2</property>
+                    <property name="y_options">GTK_FILL</property>
+                  </packing>
+                </child>
+                <child>
+                  <widget class="GtkEntry" id="control_admin_entry">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="invisible_char">&#x25CF;</property>
+                  </widget>
+                  <packing>
+                    <property name="left_attach">2</property>
+                    <property name="right_attach">3</property>
+                    <property name="top_attach">1</property>
+                    <property name="bottom_attach">2</property>
+                    <property name="y_options">GTK_FILL</property>
+                  </packing>
+                </child>
+                <child>
+                  <widget class="GtkLabel" id="control_password_label">
+                    <property name="visible">True</property>
+                    <property name="label" translatable="yes">password</property>
+                  </widget>
+                  <packing>
+                    <property name="left_attach">1</property>
+                    <property name="right_attach">2</property>
+                    <property name="top_attach">2</property>
+                    <property name="bottom_attach">3</property>
+                    <property name="y_options">GTK_FILL</property>
+                  </packing>
+                </child>
+                <child>
+                  <widget class="GtkEntry" id="control_password_entry">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="invisible_char">&#x25CF;</property>
+                  </widget>
+                  <packing>
+                    <property name="left_attach">2</property>
+                    <property name="right_attach">3</property>
+                    <property name="top_attach">2</property>
+                    <property name="bottom_attach">3</property>
+                    <property name="y_options">GTK_FILL</property>
+                  </packing>
+                </child>
+                <child>
+                  <widget class="GtkCheckButton" id="control_enabled_checkbutton">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">False</property>
+                    <property name="draw_indicator">True</property>
+                  </widget>
+                  <packing>
+                    <property name="x_options">GTK_FILL</property>
+                    <property name="y_options">GTK_FILL</property>
+                  </packing>
+                </child>
+                <child>
+                  <widget class="GtkCheckButton" id="control_admin_checkbutton">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">False</property>
+                    <property name="draw_indicator">True</property>
+                  </widget>
+                  <packing>
+                    <property name="top_attach">1</property>
+                    <property name="bottom_attach">2</property>
+                    <property name="x_options">GTK_FILL</property>
+                    <property name="y_options">GTK_FILL</property>
+                  </packing>
+                </child>
+                <child>
+                  <widget class="GtkCheckButton" id="control_password_checkbutton">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">False</property>
+                    <property name="draw_indicator">True</property>
+                  </widget>
+                  <packing>
+                    <property name="top_attach">2</property>
+                    <property name="bottom_attach">3</property>
+                    <property name="x_options">GTK_FILL</property>
+                    <property name="y_options">GTK_FILL</property>
+                  </packing>
+                </child>
+              </widget>
+            </child>
+            <child>
+              <widget class="GtkLabel" id="control_label">
+                <property name="visible">True</property>
+                <property name="label" translatable="yes">Control</property>
+              </widget>
+              <packing>
+                <property name="tab_fill">False</property>
+                <property name="type">tab</property>
+              </packing>
+            </child>
+            <child>
+              <widget class="GtkTable" id="ftp_table">
+                <property name="visible">True</property>
+                <property name="n_rows">5</property>
+                <property name="n_columns">3</property>
+                <child>
+                  <widget class="GtkLabel" id="ftp_allow_anonymous_label">
+                    <property name="visible">True</property>
+                    <property name="label" translatable="yes">allow anonymous</property>
+                  </widget>
+                  <packing>
+                    <property name="left_attach">1</property>
+                    <property name="right_attach">2</property>
+                    <property name="y_options">GTK_FILL</property>
+                  </packing>
+                </child>
+                <child>
+                  <widget class="GtkComboBox" id="ftp_allow_anonymous_combobox">
+                    <property name="visible">True</property>
+                    <property name="active">0</property>
+                    <property name="items" translatable="yes">yes
+no</property>
+                  </widget>
+                  <packing>
+                    <property name="left_attach">2</property>
+                    <property name="right_attach">3</property>
+                    <property name="y_options">GTK_FILL</property>
+                  </packing>
+                </child>
+                <child>
+                  <widget class="GtkLabel" id="ftp_anonymous_need_pass_label">
+                    <property name="visible">True</property>
+                    <property name="label" translatable="yes">anonymous need pass</property>
+                  </widget>
+                  <packing>
+                    <property name="left_attach">1</property>
+                    <property name="right_attach">2</property>
+                    <property name="top_attach">1</property>
+                    <property name="bottom_attach">2</property>
+                    <property name="y_options">GTK_FILL</property>
+                  </packing>
+                </child>
+                <child>
+                  <widget class="GtkComboBox" id="ftp_anonymous_need_pass_combobox">
+                    <property name="visible">True</property>
+                    <property name="active">0</property>
+                    <property name="items" translatable="yes">yes
+no</property>
+                  </widget>
+                  <packing>
+                    <property name="left_attach">2</property>
+                    <property name="right_attach">3</property>
+                    <property name="top_attach">1</property>
+                    <property name="bottom_attach">2</property>
+                    <property name="y_options">GTK_FILL</property>
+                  </packing>
+                </child>
+                <child>
+                  <widget class="GtkLabel" id="ftp_allow_asynchronous_cmds">
+                    <property name="visible">True</property>
+                    <property name="label" translatable="yes">allow asynchronous cmds</property>
+                  </widget>
+                  <packing>
+                    <property name="left_attach">1</property>
+                    <property name="right_attach">2</property>
+                    <property name="top_attach">2</property>
+                    <property name="bottom_attach">3</property>
+                    <property name="y_options">GTK_FILL</property>
+                  </packing>
+                </child>
+                <child>
+                  <widget class="GtkComboBox" id="ftp_allow_asynchronous_cmds_combobox">
+                    <property name="visible">True</property>
+                    <property name="active">0</property>
+                    <property name="items" translatable="yes">yes
+no</property>
+                  </widget>
+                  <packing>
+                    <property name="left_attach">2</property>
+                    <property name="right_attach">3</property>
+                    <property name="top_attach">2</property>
+                    <property name="bottom_attach">3</property>
+                    <property name="y_options">GTK_FILL</property>
+                  </packing>
+                </child>
+                <child>
+                  <widget class="GtkLabel" id="ftp_allow_pipelining_label">
+                    <property name="visible">True</property>
+                    <property name="label" translatable="yes">allow pipelining</property>
+                  </widget>
+                  <packing>
+                    <property name="left_attach">1</property>
+                    <property name="right_attach">2</property>
+                    <property name="top_attach">3</property>
+                    <property name="bottom_attach">4</property>
+                    <property name="y_options">GTK_FILL</property>
+                  </packing>
+                </child>
+                <child>
+                  <widget class="GtkComboBox" id="ftp_allow_pipelining_combobox">
+                    <property name="visible">True</property>
+                    <property name="active">0</property>
+                    <property name="items" translatable="yes">yes
+no</property>
+                  </widget>
+                  <packing>
+                    <property name="left_attach">2</property>
+                    <property name="right_attach">3</property>
+                    <property name="top_attach">3</property>
+                    <property name="bottom_attach">4</property>
+                    <property name="y_options">GTK_FILL</property>
+                  </packing>
+                </child>
+                <child>
+                  <widget class="GtkLabel" id="ftp_allow_store_label">
+                    <property name="visible">True</property>
+                    <property name="label" translatable="yes">allow store</property>
+                  </widget>
+                  <packing>
+                    <property name="left_attach">1</property>
+                    <property name="right_attach">2</property>
+                    <property name="top_attach">4</property>
+                    <property name="bottom_attach">5</property>
+                    <property name="y_options">GTK_FILL</property>
+                  </packing>
+                </child>
+                <child>
+                  <widget class="GtkComboBox" id="ftp_allow_store_combobox">
+                    <property name="visible">True</property>
+                    <property name="active">0</property>
+                    <property name="items" translatable="yes">yes
+no</property>
+                  </widget>
+                  <packing>
+                    <property name="left_attach">2</property>
+                    <property name="right_attach">3</property>
+                    <property name="top_attach">4</property>
+                    <property name="bottom_attach">5</property>
+                    <property name="y_options">GTK_FILL</property>
+                  </packing>
+                </child>
+                <child>
+                  <widget class="GtkCheckButton" id="ftp_allow_anonymous_checkbutton">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">False</property>
+                    <property name="draw_indicator">True</property>
+                  </widget>
+                  <packing>
+                    <property name="x_options">GTK_FILL</property>
+                    <property name="y_options">GTK_FILL</property>
+                  </packing>
+                </child>
+                <child>
+                  <widget class="GtkCheckButton" id="ftp_anonymous_need_pass_checkbutton">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">False</property>
+                    <property name="draw_indicator">True</property>
+                  </widget>
+                  <packing>
+                    <property name="top_attach">1</property>
+                    <property name="bottom_attach">2</property>
+                    <property name="x_options">GTK_FILL</property>
+                    <property name="y_options">GTK_FILL</property>
+                  </packing>
+                </child>
+                <child>
+                  <widget class="GtkCheckButton" id="ftp_allow_asynchronous_cmds_checkbutton">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">False</property>
+                    <property name="draw_indicator">True</property>
+                  </widget>
+                  <packing>
+                    <property name="top_attach">2</property>
+                    <property name="bottom_attach">3</property>
+                    <property name="x_options">GTK_FILL</property>
+                    <property name="y_options">GTK_FILL</property>
+                  </packing>
+                </child>
+                <child>
+                  <widget class="GtkCheckButton" id="ftp_allow_pipelining_checkbutton">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">False</property>
+                    <property name="draw_indicator">True</property>
+                  </widget>
+                  <packing>
+                    <property name="top_attach">3</property>
+                    <property name="bottom_attach">4</property>
+                    <property name="x_options">GTK_FILL</property>
+                    <property name="y_options">GTK_FILL</property>
+                  </packing>
+                </child>
+                <child>
+                  <widget class="GtkCheckButton" id="ftp_allow_store_checkbutton">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">False</property>
+                    <property name="draw_indicator">True</property>
+                  </widget>
+                  <packing>
+                    <property name="top_attach">4</property>
+                    <property name="bottom_attach">5</property>
+                    <property name="x_options">GTK_FILL</property>
+                    <property name="y_options">GTK_FILL</property>
+                  </packing>
+                </child>
+              </widget>
+              <packing>
+                <property name="position">1</property>
+              </packing>
+            </child>
+            <child>
+              <widget class="GtkLabel" id="ftp_label">
+                <property name="visible">True</property>
+                <property name="label" translatable="yes">FTP</property>
+              </widget>
+              <packing>
+                <property name="position">1</property>
+                <property name="tab_fill">False</property>
+                <property name="type">tab</property>
+              </packing>
+            </child>
+            <child>
+              <widget class="GtkTable" id="http_table">
+                <property name="visible">True</property>
+                <property name="n_rows">8</property>
+                <property name="n_columns">3</property>
+                <child>
+                  <widget class="GtkCheckButton" id="http_use_error_file_checkbutton">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">False</property>
+                    <property name="draw_indicator">True</property>
+                  </widget>
+                  <packing>
+                    <property name="x_options">GTK_FILL</property>
+                    <property name="y_options">GTK_FILL</property>
+                  </packing>
+                </child>
+                <child>
+                  <widget class="GtkLabel" id="http_use_error_file_label">
+                    <property name="visible">True</property>
+                    <property name="label" translatable="yes">use error file</property>
+                  </widget>
+                  <packing>
+                    <property name="left_attach">1</property>
+                    <property name="right_attach">2</property>
+                    <property name="y_options">GTK_FILL</property>
+                  </packing>
+                </child>
+                <child>
+                  <widget class="GtkComboBox" id="http_use_error_file_combobox">
+                    <property name="visible">True</property>
+                    <property name="active">0</property>
+                    <property name="items" translatable="yes">yes
+no</property>
+                  </widget>
+                  <packing>
+                    <property name="left_attach">2</property>
+                    <property name="right_attach">3</property>
+                    <property name="y_options">GTK_FILL</property>
+                  </packing>
+                </child>
+                <child>
+                  <widget class="GtkCheckButton" id="http_use_home_directory_checkbutton">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">False</property>
+                    <property name="draw_indicator">True</property>
+                  </widget>
+                  <packing>
+                    <property name="top_attach">1</property>
+                    <property name="bottom_attach">2</property>
+                    <property name="x_options">GTK_FILL</property>
+                    <property name="y_options">GTK_FILL</property>
+                  </packing>
+                </child>
+                <child>
+                  <widget class="GtkCheckButton" id="http_home_directory_checkbutton">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">False</property>
+                    <property name="draw_indicator">True</property>
+                  </widget>
+                  <packing>
+                    <property name="top_attach">2</property>
+                    <property name="bottom_attach">3</property>
+                    <property name="x_options">GTK_FILL</property>
+                    <property name="y_options">GTK_FILL</property>
+                  </packing>
+                </child>
+                <child>
+                  <widget class="GtkLabel" id="http_use_home_directory_label">
+                    <property name="visible">True</property>
+                    <property name="label" translatable="yes">use home directory</property>
+                  </widget>
+                  <packing>
+                    <property name="left_attach">1</property>
+                    <property name="right_attach">2</property>
+                    <property name="top_attach">1</property>
+                    <property name="bottom_attach">2</property>
+                    <property name="y_options">GTK_FILL</property>
+                  </packing>
+                </child>
+                <child>
+                  <widget class="GtkComboBox" id="use_home_directory_combobox">
+                    <property name="visible">True</property>
+                    <property name="active">0</property>
+                    <property name="items" translatable="yes">yes
+no</property>
+                  </widget>
+                  <packing>
+                    <property name="left_attach">2</property>
+                    <property name="right_attach">3</property>
+                    <property name="top_attach">1</property>
+                    <property name="bottom_attach">2</property>
+                    <property name="y_options">GTK_FILL</property>
+                  </packing>
+                </child>
+                <child>
+                  <widget class="GtkLabel" id="http_home_directory_label">
+                    <property name="visible">True</property>
+                    <property name="label" translatable="yes">home directory</property>
+                  </widget>
+                  <packing>
+                    <property name="left_attach">1</property>
+                    <property name="right_attach">2</property>
+                    <property name="top_attach">2</property>
+                    <property name="bottom_attach">3</property>
+                    <property name="y_options">GTK_FILL</property>
+                  </packing>
+                </child>
+                <child>
+                  <widget class="GtkEntry" id="http_home_directory_entry">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="invisible_char">&#x25CF;</property>
+                  </widget>
+                  <packing>
+                    <property name="left_attach">2</property>
+                    <property name="right_attach">3</property>
+                    <property name="top_attach">2</property>
+                    <property name="bottom_attach">3</property>
+                    <property name="y_options">GTK_FILL</property>
+                  </packing>
+                </child>
+                <child>
+                  <widget class="GtkTreeView" id="http_default_file_treeview">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                  </widget>
+                  <packing>
+                    <property name="right_attach">2</property>
+                    <property name="top_attach">4</property>
+                    <property name="bottom_attach">8</property>
+                  </packing>
+                </child>
+                <child>
+                  <widget class="GtkEntry" id="http_default_file_entry">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="invisible_char">&#x25CF;</property>
+                  </widget>
+                  <packing>
+                    <property name="left_attach">2</property>
+                    <property name="right_attach">3</property>
+                    <property name="top_attach">5</property>
+                    <property name="bottom_attach">6</property>
+                    <property name="y_options">GTK_FILL</property>
+                  </packing>
+                </child>
+                <child>
+                  <widget class="GtkButton" id="http_default_file_add_button">
+                    <property name="label" translatable="yes">add default file</property>
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">True</property>
+                  </widget>
+                  <packing>
+                    <property name="left_attach">2</property>
+                    <property name="right_attach">3</property>
+                    <property name="top_attach">6</property>
+                    <property name="bottom_attach">7</property>
+                    <property name="y_options">GTK_FILL</property>
+                  </packing>
+                </child>
+                <child>
+                  <widget class="GtkButton" id="http_default_file_remove_button">
+                    <property name="label" translatable="yes">remove selected default files</property>
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">True</property>
+                  </widget>
+                  <packing>
+                    <property name="left_attach">2</property>
+                    <property name="right_attach">3</property>
+                    <property name="top_attach">4</property>
+                    <property name="bottom_attach">5</property>
+                    <property name="y_options">GTK_FILL</property>
+                  </packing>
+                </child>
+                <child>
+                  <widget class="GtkLabel" id="http_fill_label_1">
+                    <property name="visible">True</property>
+                  </widget>
+                  <packing>
+                    <property name="left_attach">2</property>
+                    <property name="right_attach">3</property>
+                    <property name="top_attach">7</property>
+                    <property name="bottom_attach">8</property>
+                  </packing>
+                </child>
+                <child>
+                  <widget class="GtkCheckButton" id="http_dir_css_checkbutton">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">False</property>
+                    <property name="draw_indicator">True</property>
+                  </widget>
+                  <packing>
+                    <property name="top_attach">3</property>
+                    <property name="bottom_attach">4</property>
+                    <property name="x_options">GTK_FILL</property>
+                    <property name="y_options">GTK_FILL</property>
+                  </packing>
+                </child>
+                <child>
+                  <widget class="GtkLabel" id="http_dir_css_label">
+                    <property name="visible">True</property>
+                    <property name="label" translatable="yes">http dir css</property>
+                  </widget>
+                  <packing>
+                    <property name="left_attach">1</property>
+                    <property name="right_attach">2</property>
+                    <property name="top_attach">3</property>
+                    <property name="bottom_attach">4</property>
+                    <property name="y_options">GTK_FILL</property>
+                  </packing>
+                </child>
+                <child>
+                  <widget class="GtkEntry" id="http_dir_css_entry">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="invisible_char">&#x25CF;</property>
+                  </widget>
+                  <packing>
+                    <property name="left_attach">2</property>
+                    <property name="right_attach">3</property>
+                    <property name="top_attach">3</property>
+                    <property name="bottom_attach">4</property>
+                    <property name="y_options">GTK_FILL</property>
+                  </packing>
+                </child>
+              </widget>
+              <packing>
+                <property name="position">2</property>
+              </packing>
+            </child>
+            <child>
+              <widget class="GtkLabel" id="http_label">
+                <property name="visible">True</property>
+                <property name="label" translatable="yes">HTTP</property>
+              </widget>
+              <packing>
+                <property name="position">2</property>
+                <property name="tab_fill">False</property>
+                <property name="type">tab</property>
+              </packing>
+            </child>
+            <child>
+              <widget class="GtkTable" id="server_table">
+                <property name="visible">True</property>
+                <property name="n_rows">13</property>
+                <property name="n_columns">3</property>
+                <child>
+                  <widget class="GtkCheckButton" id="server_language_checkbutton">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">False</property>
+                    <property name="draw_indicator">True</property>
+                  </widget>
+                  <packing>
+                    <property name="x_options">GTK_FILL</property>
+                    <property name="y_options">GTK_FILL</property>
+                  </packing>
+                </child>
+                <child>
+                  <widget class="GtkLabel" id="server_language_label">
+                    <property name="visible">True</property>
+                    <property name="label" translatable="yes">language</property>
+                  </widget>
+                  <packing>
+                    <property name="left_attach">1</property>
+                    <property name="right_attach">2</property>
+                    <property name="y_options">GTK_FILL</property>
+                  </packing>
+                </child>
+                <child>
+                  <widget class="GtkComboBox" id="server_language_combobox">
+                    <property name="visible">True</property>
+                  </widget>
+                  <packing>
+                    <property name="left_attach">2</property>
+                    <property name="right_attach">3</property>
+                    <property name="y_options">GTK_FILL</property>
+                  </packing>
+                </child>
+                <child>
+                  <widget class="GtkCheckButton" id="server_verbosity_checkbutton">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">False</property>
+                    <property name="draw_indicator">True</property>
+                  </widget>
+                  <packing>
+                    <property name="top_attach">1</property>
+                    <property name="bottom_attach">2</property>
+                    <property name="x_options">GTK_FILL</property>
+                    <property name="y_options">GTK_FILL</property>
+                  </packing>
+                </child>
+                <child>
+                  <widget class="GtkLabel" id="server_verbosity_label">
+                    <property name="visible">True</property>
+                    <property name="label" translatable="yes">verbosity</property>
+                  </widget>
+                  <packing>
+                    <property name="left_attach">1</property>
+                    <property name="right_attach">2</property>
+                    <property name="top_attach">1</property>
+                    <property name="bottom_attach">2</property>
+                    <property name="y_options">GTK_FILL</property>
+                  </packing>
+                </child>
+                <child>
+                  <widget class="GtkSpinButton" id="server_verbosity_spinbutton">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="invisible_char">&#x25CF;</property>
+                  </widget>
+                  <packing>
+                    <property name="left_attach">2</property>
+                    <property name="right_attach">3</property>
+                    <property name="top_attach">1</property>
+                    <property name="bottom_attach">2</property>
+                    <property name="y_options">GTK_FILL</property>
+                  </packing>
+                </child>
+                <child>
+                  <widget class="GtkCheckButton" id="server_static_threads_checkbutton">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">False</property>
+                    <property name="draw_indicator">True</property>
+                  </widget>
+                  <packing>
+                    <property name="top_attach">2</property>
+                    <property name="bottom_attach">3</property>
+                    <property name="x_options">GTK_FILL</property>
+                    <property name="y_options">GTK_FILL</property>
+                  </packing>
+                </child>
+                <child>
+                  <widget class="GtkLabel" id="server_static_threads_label">
+                    <property name="visible">True</property>
+                    <property name="label" translatable="yes">static threads</property>
+                  </widget>
+                  <packing>
+                    <property name="left_attach">1</property>
+                    <property name="right_attach">2</property>
+                    <property name="top_attach">2</property>
+                    <property name="bottom_attach">3</property>
+                    <property name="y_options">GTK_FILL</property>
+                  </packing>
+                </child>
+                <child>
+                  <widget class="GtkSpinButton" id="server_static_threads_spinbutton">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="invisible_char">&#x25CF;</property>
+                  </widget>
+                  <packing>
+                    <property name="left_attach">2</property>
+                    <property name="right_attach">3</property>
+                    <property name="top_attach">2</property>
+                    <property name="bottom_attach">3</property>
+                    <property name="y_options">GTK_FILL</property>
+                  </packing>
+                </child>
+                <child>
+                  <widget class="GtkCheckButton" id="server_max_threads_checkbutton">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">False</property>
+                    <property name="draw_indicator">True</property>
+                  </widget>
+                  <packing>
+                    <property name="top_attach">3</property>
+                    <property name="bottom_attach">4</property>
+                    <property name="x_options">GTK_FILL</property>
+                    <property name="y_options">GTK_FILL</property>
+                  </packing>
+                </child>
+                <child>
+                  <widget class="GtkLabel" id="server_max_threads_label">
+                    <property name="visible">True</property>
+                    <property name="label" translatable="yes">max threads</property>
+                  </widget>
+                  <packing>
+                    <property name="left_attach">1</property>
+                    <property name="right_attach">2</property>
+                    <property name="top_attach">3</property>
+                    <property name="bottom_attach">4</property>
+                    <property name="y_options">GTK_FILL</property>
+                  </packing>
+                </child>
+                <child>
+                  <widget class="GtkSpinButton" id="server_max_threads_spinbutton">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="invisible_char">&#x25CF;</property>
+                  </widget>
+                  <packing>
+                    <property name="left_attach">2</property>
+                    <property name="right_attach">3</property>
+                    <property name="top_attach">3</property>
+                    <property name="bottom_attach">4</property>
+                    <property name="y_options">GTK_FILL</property>
+                  </packing>
+                </child>
+                <child>
+                  <widget class="GtkCheckButton" id="server_buffer_size_checkbutton">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">False</property>
+                    <property name="draw_indicator">True</property>
+                  </widget>
+                  <packing>
+                    <property name="top_attach">4</property>
+                    <property name="bottom_attach">5</property>
+                    <property name="x_options">GTK_FILL</property>
+                    <property name="y_options">GTK_FILL</property>
+                  </packing>
+                </child>
+                <child>
+                  <widget class="GtkLabel" id="server_buffer_size_label">
+                    <property name="visible">True</property>
+                    <property name="label" translatable="yes">buffer size</property>
+                  </widget>
+                  <packing>
+                    <property name="left_attach">1</property>
+                    <property name="right_attach">2</property>
+                    <property name="top_attach">4</property>
+                    <property name="bottom_attach">5</property>
+                    <property name="y_options">GTK_FILL</property>
+                  </packing>
+                </child>
+                <child>
+                  <widget class="GtkSpinButton" id="server_buffer_size_spinbutton">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="invisible_char">&#x25CF;</property>
+                  </widget>
+                  <packing>
+                    <property name="left_attach">2</property>
+                    <property name="right_attach">3</property>
+                    <property name="top_attach">4</property>
+                    <property name="bottom_attach">5</property>
+                    <property name="y_options">GTK_FILL</property>
+                  </packing>
+                </child>
+                <child>
+                  <widget class="GtkCheckButton" id="server_max_connections_checkbutton">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">False</property>
+                    <property name="draw_indicator">True</property>
+                  </widget>
+                  <packing>
+                    <property name="top_attach">5</property>
+                    <property name="bottom_attach">6</property>
+                    <property name="x_options">GTK_FILL</property>
+                    <property name="y_options">GTK_FILL</property>
+                  </packing>
+                </child>
+                <child>
+                  <widget class="GtkLabel" id="server_max_connections_label">
+                    <property name="visible">True</property>
+                    <property name="label" translatable="yes">max connections</property>
+                  </widget>
+                  <packing>
+                    <property name="left_attach">1</property>
+                    <property name="right_attach">2</property>
+                    <property name="top_attach">5</property>
+                    <property name="bottom_attach">6</property>
+                    <property name="y_options">GTK_FILL</property>
+                  </packing>
+                </child>
+                <child>
+                  <widget class="GtkSpinButton" id="server_max_connections_spinbutton">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="invisible_char">&#x25CF;</property>
+                  </widget>
+                  <packing>
+                    <property name="left_attach">2</property>
+                    <property name="right_attach">3</property>
+                    <property name="top_attach">5</property>
+                    <property name="bottom_attach">6</property>
+                    <property name="y_options">GTK_FILL</property>
+                  </packing>
+                </child>
+                <child>
+                  <widget class="GtkCheckButton" id="server_max_accepted_connections_checkbutton">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">False</property>
+                    <property name="draw_indicator">True</property>
+                  </widget>
+                  <packing>
+                    <property name="top_attach">6</property>
+                    <property name="bottom_attach">7</property>
+                    <property name="x_options">GTK_FILL</property>
+                    <property name="y_options">GTK_FILL</property>
+                  </packing>
+                </child>
+                <child>
+                  <widget class="GtkLabel" id="server_max_accepted_connections_label">
+                    <property name="visible">True</property>
+                    <property name="label" translatable="yes">max accepted connections</property>
+                  </widget>
+                  <packing>
+                    <property name="left_attach">1</property>
+                    <property name="right_attach">2</property>
+                    <property name="top_attach">6</property>
+                    <property name="bottom_attach">7</property>
+                    <property name="y_options">GTK_FILL</property>
+                  </packing>
+                </child>
+                <child>
+                  <widget class="GtkSpinButton" id="server_max_accepted_connections_spinbutton">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="invisible_char">&#x25CF;</property>
+                  </widget>
+                  <packing>
+                    <property name="left_attach">2</property>
+                    <property name="right_attach">3</property>
+                    <property name="top_attach">6</property>
+                    <property name="bottom_attach">7</property>
+                    <property name="y_options">GTK_FILL</property>
+                  </packing>
+                </child>
+                <child>
+                  <widget class="GtkCheckButton" id="server_admin_checkbutton">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">False</property>
+                    <property name="draw_indicator">True</property>
+                  </widget>
+                  <packing>
+                    <property name="top_attach">7</property>
+                    <property name="bottom_attach">8</property>
+                    <property name="x_options">GTK_FILL</property>
+                    <property name="y_options">GTK_FILL</property>
+                  </packing>
+                </child>
+                <child>
+                  <widget class="GtkLabel" id="server_admin_label">
+                    <property name="visible">True</property>
+                    <property name="label" translatable="yes">admin</property>
+                  </widget>
+                  <packing>
+                    <property name="left_attach">1</property>
+                    <property name="right_attach">2</property>
+                    <property name="top_attach">7</property>
+                    <property name="bottom_attach">8</property>
+                    <property name="y_options">GTK_FILL</property>
+                  </packing>
+                </child>
+                <child>
+                  <widget class="GtkEntry" id="server_admin_entry">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="invisible_char">&#x25CF;</property>
+                  </widget>
+                  <packing>
+                    <property name="left_attach">2</property>
+                    <property name="right_attach">3</property>
+                    <property name="top_attach">7</property>
+                    <property name="bottom_attach">8</property>
+                    <property name="y_options">GTK_FILL</property>
+                  </packing>
+                </child>
+                <child>
+                  <widget class="GtkCheckButton" id="server_max_files_cache_checkbutton">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">False</property>
+                    <property name="draw_indicator">True</property>
+                  </widget>
+                  <packing>
+                    <property name="top_attach">8</property>
+                    <property name="bottom_attach">9</property>
+                    <property name="x_options">GTK_FILL</property>
+                    <property name="y_options">GTK_FILL</property>
+                  </packing>
+                </child>
+                <child>
+                  <widget class="GtkLabel" id="server_max_files_cache_label">
+                    <property name="visible">True</property>
+                    <property name="label" translatable="yes">max files cache</property>
+                  </widget>
+                  <packing>
+                    <property name="left_attach">1</property>
+                    <property name="right_attach">2</property>
+                    <property name="top_attach">8</property>
+                    <property name="bottom_attach">9</property>
+                    <property name="y_options">GTK_FILL</property>
+                  </packing>
+                </child>
+                <child>
+                  <widget class="GtkSpinButton" id="server_max_files_cache_spinbutton">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="invisible_char">&#x25CF;</property>
+                  </widget>
+                  <packing>
+                    <property name="left_attach">2</property>
+                    <property name="right_attach">3</property>
+                    <property name="top_attach">8</property>
+                    <property name="bottom_attach">9</property>
+                    <property name="y_options">GTK_FILL</property>
+                  </packing>
+                </child>
+                <child>
+                  <widget class="GtkCheckButton" id="server_max_file_cache_checkbutton">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">False</property>
+                    <property name="draw_indicator">True</property>
+                  </widget>
+                  <packing>
+                    <property name="top_attach">9</property>
+                    <property name="bottom_attach">10</property>
+                    <property name="x_options">GTK_FILL</property>
+                    <property name="y_options">GTK_FILL</property>
+                  </packing>
+                </child>
+                <child>
+                  <widget class="GtkLabel" id="server_max_file_cache_label">
+                    <property name="visible">True</property>
+                    <property name="label" translatable="yes">max file cache</property>
+                  </widget>
+                  <packing>
+                    <property name="left_attach">1</property>
+                    <property name="right_attach">2</property>
+                    <property name="top_attach">9</property>
+                    <property name="bottom_attach">10</property>
+                    <property name="y_options">GTK_FILL</property>
+                  </packing>
+                </child>
+                <child>
+                  <widget class="GtkSpinButton" id="server_max_file_cache_spinbutton">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="invisible_char">&#x25CF;</property>
+                  </widget>
+                  <packing>
+                    <property name="left_attach">2</property>
+                    <property name="right_attach">3</property>
+                    <property name="top_attach">9</property>
+                    <property name="bottom_attach">10</property>
+                    <property name="y_options">GTK_FILL</property>
+                  </packing>
+                </child>
+                <child>
+                  <widget class="GtkCheckButton" id="server_min_file_cache_checkbutton">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">False</property>
+                    <property name="draw_indicator">True</property>
+                  </widget>
+                  <packing>
+                    <property name="top_attach">10</property>
+                    <property name="bottom_attach">11</property>
+                    <property name="x_options">GTK_FILL</property>
+                    <property name="y_options">GTK_FILL</property>
+                  </packing>
+                </child>
+                <child>
+                  <widget class="GtkLabel" id="server_min_file_cache_label">
+                    <property name="visible">True</property>
+                    <property name="label" translatable="yes">min file cache</property>
+                  </widget>
+                  <packing>
+                    <property name="left_attach">1</property>
+                    <property name="right_attach">2</property>
+                    <property name="top_attach">10</property>
+                    <property name="bottom_attach">11</property>
+                    <property name="y_options">GTK_FILL</property>
+                  </packing>
+                </child>
+                <child>
+                  <widget class="GtkSpinButton" id="server_min_file_cache_spinbutton">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="invisible_char">&#x25CF;</property>
+                  </widget>
+                  <packing>
+                    <property name="left_attach">2</property>
+                    <property name="right_attach">3</property>
+                    <property name="top_attach">10</property>
+                    <property name="bottom_attach">11</property>
+                    <property name="y_options">GTK_FILL</property>
+                  </packing>
+                </child>
+                <child>
+                  <widget class="GtkCheckButton" id="server_max_servers_checkbutton">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">False</property>
+                    <property name="draw_indicator">True</property>
+                  </widget>
+                  <packing>
+                    <property name="top_attach">11</property>
+                    <property name="bottom_attach">12</property>
+                    <property name="x_options">GTK_FILL</property>
+                    <property name="y_options">GTK_FILL</property>
+                  </packing>
+                </child>
+                <child>
+                  <widget class="GtkLabel" id="server_max_servers_label">
+                    <property name="visible">True</property>
+                    <property name="label" translatable="yes">max servers</property>
+                  </widget>
+                  <packing>
+                    <property name="left_attach">1</property>
+                    <property name="right_attach">2</property>
+                    <property name="top_attach">11</property>
+                    <property name="bottom_attach">12</property>
+                    <property name="y_options">GTK_FILL</property>
+                  </packing>
+                </child>
+                <child>
+                  <widget class="GtkSpinButton" id="server_max_servers_spinbutton">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="invisible_char">&#x25CF;</property>
+                  </widget>
+                  <packing>
+                    <property name="left_attach">2</property>
+                    <property name="right_attach">3</property>
+                    <property name="top_attach">11</property>
+                    <property name="bottom_attach">12</property>
+                    <property name="y_options">GTK_FILL</property>
+                  </packing>
+                </child>
+                <child>
+                  <widget class="GtkCheckButton" id="server_max_log_size_checkbutton">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">False</property>
+                    <property name="draw_indicator">True</property>
+                  </widget>
+                  <packing>
+                    <property name="top_attach">12</property>
+                    <property name="bottom_attach">13</property>
+                    <property name="x_options">GTK_FILL</property>
+                    <property name="y_options">GTK_FILL</property>
+                  </packing>
+                </child>
+                <child>
+                  <widget class="GtkLabel" id="server_max_log_size_label">
+                    <property name="visible">True</property>
+                    <property name="label" translatable="yes">max log size</property>
+                  </widget>
+                  <packing>
+                    <property name="left_attach">1</property>
+                    <property name="right_attach">2</property>
+                    <property name="top_attach">12</property>
+                    <property name="bottom_attach">13</property>
+                    <property name="y_options">GTK_FILL</property>
+                  </packing>
+                </child>
+                <child>
+                  <widget class="GtkSpinButton" id="server_max_log_size_spinbutton">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="invisible_char">&#x25CF;</property>
+                  </widget>
+                  <packing>
+                    <property name="left_attach">2</property>
+                    <property name="right_attach">3</property>
+                    <property name="top_attach">12</property>
+                    <property name="bottom_attach">13</property>
+                    <property name="y_options">GTK_FILL</property>
+                  </packing>
+                </child>
+              </widget>
+              <packing>
+                <property name="position">3</property>
+              </packing>
+            </child>
+            <child>
+              <widget class="GtkLabel" id="server_label">
+                <property name="visible">True</property>
+                <property name="label" translatable="yes">Server</property>
+              </widget>
+              <packing>
+                <property name="position">3</property>
+                <property name="tab_fill">False</property>
+                <property name="type">tab</property>
+              </packing>
+            </child>
+            <child>
+              <widget class="GtkTable" id="other_table">
+                <property name="visible">True</property>
+                <property name="n_rows">3</property>
+                <property name="n_columns">3</property>
+                <child>
+                  <widget class="GtkCheckButton" id="connection_timeout_checkbutton">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">False</property>
+                    <property name="draw_indicator">True</property>
+                  </widget>
+                  <packing>
+                    <property name="x_options">GTK_FILL</property>
+                    <property name="y_options">GTK_FILL</property>
+                  </packing>
+                </child>
+                <child>
+                  <widget class="GtkLabel" id="connection_timeout_label">
+                    <property name="visible">True</property>
+                    <property name="label" translatable="yes">connection timeout</property>
+                  </widget>
+                  <packing>
+                    <property name="left_attach">1</property>
+                    <property name="right_attach">2</property>
+                    <property name="y_options">GTK_FILL</property>
+                  </packing>
+                </child>
+                <child>
+                  <widget class="GtkSpinButton" id="connection_timeout_spinbutton">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="invisible_char">&#x25CF;</property>
+                  </widget>
+                  <packing>
+                    <property name="left_attach">2</property>
+                    <property name="right_attach">3</property>
+                    <property name="y_options">GTK_FILL</property>
+                  </packing>
+                </child>
+                <child>
+                  <widget class="GtkCheckButton" id="gzip_threshold_checkbutton">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">False</property>
+                    <property name="draw_indicator">True</property>
+                  </widget>
+                  <packing>
+                    <property name="top_attach">1</property>
+                    <property name="bottom_attach">2</property>
+                    <property name="x_options">GTK_FILL</property>
+                    <property name="y_options">GTK_FILL</property>
+                  </packing>
+                </child>
+                <child>
+                  <widget class="GtkLabel" id="gzip_threshold_label">
+                    <property name="visible">True</property>
+                    <property name="label" translatable="yes">gzip threshold</property>
+                  </widget>
+                  <packing>
+                    <property name="left_attach">1</property>
+                    <property name="right_attach">2</property>
+                    <property name="top_attach">1</property>
+                    <property name="bottom_attach">2</property>
+                    <property name="y_options">GTK_FILL</property>
+                  </packing>
+                </child>
+                <child>
+                  <widget class="GtkSpinButton" id="gzip_threshold_spinbutton">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="invisible_char">&#x25CF;</property>
+                  </widget>
+                  <packing>
+                    <property name="left_attach">2</property>
+                    <property name="right_attach">3</property>
+                    <property name="top_attach">1</property>
+                    <property name="bottom_attach">2</property>
+                    <property name="y_options">GTK_FILL</property>
+                  </packing>
+                </child>
+                <child>
+                  <widget class="GtkCheckButton" id="symlinks_follow_checkbutton">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">False</property>
+                    <property name="draw_indicator">True</property>
+                  </widget>
+                  <packing>
+                    <property name="top_attach">2</property>
+                    <property name="bottom_attach">3</property>
+                    <property name="x_options">GTK_FILL</property>
+                    <property name="y_options">GTK_FILL</property>
+                  </packing>
+                </child>
+                <child>
+                  <widget class="GtkLabel" id="symlinks_follow_label">
+                    <property name="visible">True</property>
+                    <property name="label" translatable="yes">symlinks follow</property>
+                  </widget>
+                  <packing>
+                    <property name="left_attach">1</property>
+                    <property name="right_attach">2</property>
+                    <property name="top_attach">2</property>
+                    <property name="bottom_attach">3</property>
+                    <property name="y_options">GTK_FILL</property>
+                  </packing>
+                </child>
+                <child>
+                  <widget class="GtkComboBox" id="symlinks_follow_combobox">
+                    <property name="visible">True</property>
+                    <property name="active">0</property>
+                    <property name="items" translatable="yes">yes
+no</property>
+                  </widget>
+                  <packing>
+                    <property name="left_attach">2</property>
+                    <property name="right_attach">3</property>
+                    <property name="top_attach">2</property>
+                    <property name="bottom_attach">3</property>
+                    <property name="y_options">GTK_FILL</property>
+                  </packing>
+                </child>
+              </widget>
+              <packing>
+                <property name="position">4</property>
+              </packing>
+            </child>
+            <child>
+              <widget class="GtkLabel" id="other_label">
+                <property name="visible">True</property>
+                <property name="label" translatable="yes">Other</property>
+              </widget>
+              <packing>
+                <property name="position">4</property>
+                <property name="tab_fill">False</property>
+                <property name="type">tab</property>
+              </packing>
+            </child>
+          </widget>
+          <packing>
+            <property name="position">1</property>
+          </packing>
+        </child>
+        <child>
+          <widget class="GtkStatusbar" id="statusbar">
+            <property name="visible">True</property>
+            <property name="spacing">2</property>
+          </widget>
+          <packing>
+            <property name="expand">False</property>
+            <property name="position">2</property>
+          </packing>
+        </child>
+      </widget>
+    </child>
+  </widget>
+</glade-interface>
diff --git a/misc/PyGTK_Control/ConfigGUI.py b/misc/PyGTK_Control/old/ConfigGUI.py
similarity index 100%
rename from misc/PyGTK_Control/ConfigGUI.py
rename to misc/PyGTK_Control/old/ConfigGUI.py
diff --git a/misc/PyGTK_Control/MIMEtypes.py b/misc/PyGTK_Control/old/MIMEtypes.py
similarity index 100%
rename from misc/PyGTK_Control/MIMEtypes.py
rename to misc/PyGTK_Control/old/MIMEtypes.py
diff --git a/misc/PyGTK_Control/MIMEtypes.xml b/misc/PyGTK_Control/old/MIMEtypes.xml
similarity index 100%
rename from misc/PyGTK_Control/MIMEtypes.xml
rename to misc/PyGTK_Control/old/MIMEtypes.xml
diff --git a/misc/PyGTK_Control/MyServer Configure.ico b/misc/PyGTK_Control/old/MyServer Configure.ico
similarity index 100%
rename from misc/PyGTK_Control/MyServer Configure.ico
rename to misc/PyGTK_Control/old/MyServer Configure.ico
diff --git a/misc/PyGTK_Control/XMLGui.glade b/misc/PyGTK_Control/old/XMLGui.glade
similarity index 100%
rename from misc/PyGTK_Control/XMLGui.glade
rename to misc/PyGTK_Control/old/XMLGui.glade



commit e89932b722ca91317d7bbb63bae5c2204132b4c8
Author: Marek Aaron Sapota <maarons@gnu.org>
Date:   Mon Jul 13 13:45:19 2009 +0200

    PyControlLib can now put files to server.

diff --git a/misc/py_control_client/MyServer/pycontrollib/controller.py b/misc/py_control_client/MyServer/pycontrollib/controller.py
index 660589e..847d93d 100644
--- a/misc/py_control_client/MyServer/pycontrollib/controller.py
+++ b/misc/py_control_client/MyServer/pycontrollib/controller.py
@@ -111,9 +111,13 @@ class BasicController():
             self.__check_return_code()
             return self.connection.read()
 
-    def put_file(self, local_path, remote_path):
+    def put_file(self, text, path):
         '''Put file to server.'''
-        pass # not implemented
+        if self.connection:
+            self.connection.send_header('PUTFILE', len(text), path)
+            self.connection.send(text)
+            self.connection.read_header()
+            self.__check_return_code()
 
 class Controller(BasicController):
     def get_MIME_type_configuration(self):



commit 7ed7acae01c06591c9db43849ced487053beca7e
Merge: c93d329 f8ea478
Author: Marek Aaron Sapota <maarons@gnu.org>
Date:   Mon Jul 13 12:38:57 2009 +0200

    Merge branch 'master' of git://git.savannah.gnu.org/myserver
    
    Conflicts:
    	misc/py_control_client/MyServer/pycontrol/pycontrol.py

diff --cc misc/py_control_client/MyServer/pycontrol/pycontrol.py
index 76cf76b,4066da5..f5224c3
--- a/misc/py_control_client/MyServer/pycontrol/pycontrol.py
+++ b/misc/py_control_client/MyServer/pycontrol/pycontrol.py
@@@ -43,10 -41,10 +43,10 @@@ class PyMyServerControl(object)
          self.port = port
          self.login = login
          self.password = password
 -        self.sock = socket.ssl(self.s)
 +        self.sock = ssl.wrap_socket(self.s)
  
-     def send_header(self, command, len, args = ""):
 -    #Build the CONTROL header and send it.
+     def send_header(self, command, length, args = ""):
 +        '''Build the CONTROL header and send it.'''
          self.buffer = ""
          self.response_values = {}
          self.response_code = None



commit c93d32970d1d2947f73853ff21cc42e5921dcc96
Merge: 1a50bf0 321a84c
Author: Marek Aaron Sapota <maarons@gnu.org>
Date:   Sun Jul 12 21:38:24 2009 +0200

    Merge branch 'master' of git://git.savannah.gnu.org/myserver




commit 1a50bf043a18938786ce237a88284b252092ad4d
Author: Marek Aaron Sapota <maarons@gnu.org>
Date:   Sun Jul 12 21:35:07 2009 +0200

    User ssl.wrap_socket instead of depreciated socket.ssl

diff --git a/misc/py_control_client/MyServer/pycontrol/pycontrol.py b/misc/py_control_client/MyServer/pycontrol/pycontrol.py
index 686e7e8..76cf76b 100644
--- a/misc/py_control_client/MyServer/pycontrol/pycontrol.py
+++ b/misc/py_control_client/MyServer/pycontrol/pycontrol.py
@@ -15,6 +15,7 @@ You should have received a copy of the GNU General Public License
 along with this program.  If not, see <http://www.gnu.org/licenses/>.
 '''
 import socket
+import ssl
 import time
 
 error_codes = {'100': 'CONTROL_OK',
@@ -42,7 +43,7 @@ class PyMyServerControl(object):
         self.port = port
         self.login = login
         self.password = password
-        self.sock = socket.ssl(self.s)
+        self.sock = ssl.wrap_socket(self.s)
 
     def send_header(self, command, len, args = ""):
         '''Build the CONTROL header and send it.'''



commit 420a86f9dd7181b5f8f42a8007cb9ff508721b11
Author: Marek Aaron Sapota <maarons@gnu.org>
Date:   Sun Jul 12 21:30:56 2009 +0200

    Fixed method name to be private.

diff --git a/misc/py_control_client/MyServer/pycontrollib/controller.py b/misc/py_control_client/MyServer/pycontrollib/controller.py
index 99cd336..660589e 100644
--- a/misc/py_control_client/MyServer/pycontrollib/controller.py
+++ b/misc/py_control_client/MyServer/pycontrollib/controller.py
@@ -33,7 +33,7 @@ class BasicController():
         self.username = username
         self.password = password
 
-    def __check_return_code__(self):
+    def __check_return_code(self):
         return_code = self.connection.response_code
         if error_codes.get(return_code, '') != 'CONTROL_OK':
             raise ServerError('MyServer returned {0}: {1}'.format(
@@ -56,14 +56,14 @@ class BasicController():
         if self.connection:
             self.connection.send_header('REBOOT', 0)
             self.connection.read_header()
-            self.__check_return_code__()
+            self.__check_return_code()
 
     def version(self):
         '''Get version string.'''
         if self.connection:
             self.connection.send_header('VERSION', 0)
             self.connection.read_header()
-            self.__check_return_code__()
+            self.__check_return_code()
             return self.connection.read()
 
     def enable_reboot(self):
@@ -71,21 +71,21 @@ class BasicController():
         if self.connection:
             self.connection.send_header('ENABLEREBOOT', 0)
             self.connection.read_header()
-            self.__check_return_code__()
+            self.__check_return_code()
 
     def disable_reboot(self):
         '''Disable server auto-reboot.'''
         if self.connection:
             self.connection.send_header('DISABLEREBOOT', 0)
             self.connection.read_header()
-            self.__check_return_code__()
+            self.__check_return_code()
 
     def show_connections(self):
         '''List active server connections.'''
         if self.connection:
             self.connection.send_header('SHOWCONNECTIONS', 0)
             self.connection.read_header()
-            self.__check_return_code__()
+            self.__check_return_code()
             return self.connection.read()
 
     def kill_connection(self, num):
@@ -93,14 +93,14 @@ class BasicController():
         if self.connection:
             self.connection.send_header('KILLCONNECTION', 0, str(num))
             self.connection.read_header()
-            self.__check_return_code__()
+            self.__check_return_code()
 
     def show_language_files(self):
         '''List available language files.'''
         if self.connection:
             self.connection.send_header('SHOWLANGUAGEFILES', 0)
             self.connection.read_header()
-            self.__check_return_code__()
+            self.__check_return_code()
             return self.connection.read()
 
     def get_file(self, path):
@@ -108,7 +108,7 @@ class BasicController():
         if self.connection:
             self.connection.send_header('GETFILE', 0, path)
             self.connection.read_header()
-            self.__check_return_code__()
+            self.__check_return_code()
             return self.connection.read()
 
     def put_file(self, local_path, remote_path):



commit e992b4a3e844e463df1189038aa579e337875fe7
Author: Marek Aaron Sapota <maarons@gnu.org>
Date:   Sun Jul 12 21:24:03 2009 +0200

    Made docstrings from comments in pycontrol.

diff --git a/misc/py_control_client/MyServer/pycontrol/pycontrol.py b/misc/py_control_client/MyServer/pycontrol/pycontrol.py
index f28c636..686e7e8 100644
--- a/misc/py_control_client/MyServer/pycontrol/pycontrol.py
+++ b/misc/py_control_client/MyServer/pycontrol/pycontrol.py
@@ -29,8 +29,9 @@ error_codes = {'100': 'CONTROL_OK',
                '208': 'CONTROL_FILE_NOT_FOUND'}
 
 class PyMyServerControl(object):
-    #Initialize a connection to server:port using login:password as credentials.
     def __init__(self, host, port, login, password):
+        '''Initialize a connection to server:port using login:password as
+        credentials.'''
 
         self.connectionType = "Keep-Alive"
 
@@ -43,8 +44,8 @@ class PyMyServerControl(object):
         self.password = password
         self.sock = socket.ssl(self.s)
 
-    #Build the CONTROL header and send it.
     def send_header(self, command, len, args = ""):
+        '''Build the CONTROL header and send it.'''
         self.buffer = ""
         self.response_values = {}
         self.response_code = None
@@ -55,13 +56,13 @@ class PyMyServerControl(object):
 
         self.sock.write(req_header)
 
-    #Send additional data after the header.
     def send(self, data):
+        '''Send additional data after the header.'''
         self.sock.write(data)
 
 
-    #Read a line from the socket.
     def __readline(self):
+        '''Read a line from the socket.'''
         while True:
             self.buffer = self.buffer + self.sock.read(1024)
             ind = self.buffer.find("\r\n")
@@ -71,12 +72,12 @@ class PyMyServerControl(object):
                 self.buffer = self.buffer[ind+2:len(self.buffer)]
                 return ret
 
-    #Returns the number of bytes to be read
     def available_data(self):
+        '''Returns the number of bytes to be read.'''
         return int(self.response_values['LEN']) - self.__bytes_read
 
-    #Read data that follows the the response header.
     def read(self):
+        '''Read data that follows the the response header.'''
         if len(self.buffer) > 0:
             self.__bytes_read = self.__bytes_read + len(self.buffer)
             return self.buffer
@@ -86,8 +87,8 @@ class PyMyServerControl(object):
 
         return data
 
-    #Read the response header.
     def read_header(self):
+        '''Read the response header.'''
         self.response_code = self.__readline()[1:4]
         self.__bytes_read = 0
 
@@ -106,7 +107,7 @@ class PyMyServerControl(object):
             self.response_values[header_name] = value
 
 
-    #Close the socket.
     def close(self):
+        '''Close the socket.'''
         del self.sock
         self.s.close()



commit da3b029e8c7d55ac4c38436303071bb53b04c0f7
Author: Marek Aaron Sapota <maarons@gnu.org>
Date:   Sun Jul 12 17:21:34 2009 +0200

    Fixed errors whith getting configuration from server.

diff --git a/misc/py_control_client/MyServer/pycontrollib/config.py b/misc/py_control_client/MyServer/pycontrollib/config.py
index deb0ed5..ad4e1fb 100644
--- a/misc/py_control_client/MyServer/pycontrollib/config.py
+++ b/misc/py_control_client/MyServer/pycontrollib/config.py
@@ -47,7 +47,8 @@ class MyServerConfig():
     @staticmethod
     def from_string(text):
         '''Factory to produce MyServerConfig by parsing a string.'''
-        return MyServerConfig.from_lxml_element(etree.XML(text))
+        return MyServerConfig.from_lxml_element(etree.XML(
+                text, parser = etree.XMLParser(remove_comments = True)))
 
     @staticmethod
     def from_lxml_element(root):
diff --git a/misc/py_control_client/MyServer/pycontrollib/controller.py b/misc/py_control_client/MyServer/pycontrollib/controller.py
index 37a0318..99cd336 100644
--- a/misc/py_control_client/MyServer/pycontrollib/controller.py
+++ b/misc/py_control_client/MyServer/pycontrollib/controller.py
@@ -18,7 +18,7 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 from MyServer.pycontrol.pycontrol import PyMyServerControl, error_codes
 from mimetypes import MIMETypes
-from vhosts import VHosts
+from vhost import VHosts
 from config import MyServerConfig
 
 class ServerError(Exception):
@@ -126,4 +126,4 @@ class Controller(BasicController):
 
     def get_server_configuration(self):
         '''Get server settings.'''
-        return MyServerConfig(self.get_file('myserver.xml'))
+        return MyServerConfig.from_string(self.get_file('myserver.xml'))
diff --git a/misc/py_control_client/MyServer/pycontrollib/log.py b/misc/py_control_client/MyServer/pycontrollib/log.py
index c2824c9..c9dbaf3 100644
--- a/misc/py_control_client/MyServer/pycontrollib/log.py
+++ b/misc/py_control_client/MyServer/pycontrollib/log.py
@@ -84,7 +84,8 @@ class Stream():
     @staticmethod
     def from_string(text):
         '''Factory to produce stream by parsing a string.'''
-        return Stream.from_lxml_element(etree.XML(text))
+        return Stream.from_lxml_element(etree.XML(
+                text, parser = etree.XMLParser(remove_comments = True)))
 
     @staticmethod
     def from_lxml_element(root):
@@ -176,7 +177,8 @@ class Log():
     @staticmethod
     def from_string(text):
         '''Factory to produce log by parsing a string.'''
-        return Log.from_lxml_element(etree.XML(text))
+        return Log.from_lxml_element(etree.XML(
+                text, parser = etree.XMLParser(remove_comments = True)))
 
     @staticmethod
     def from_lxml_element(root):
diff --git a/misc/py_control_client/MyServer/pycontrollib/mimetypes.py b/misc/py_control_client/MyServer/pycontrollib/mimetypes.py
index 3a62813..1f0bdde 100644
--- a/misc/py_control_client/MyServer/pycontrollib/mimetypes.py
+++ b/misc/py_control_client/MyServer/pycontrollib/mimetypes.py
@@ -200,7 +200,8 @@ class MIMEType():
     @staticmethod
     def from_string(text):
         '''Factory to produce MIMEType by parsing a string.'''
-        return MIMEType.from_lxml_element(etree.XML(text))
+        return MIMEType.from_lxml_element(etree.XML(
+                text, parser = etree.XMLParser(remove_comments = True)))
 
 class MIMETypes():
     def __init__(self, MIME_types = []):
@@ -230,4 +231,5 @@ class MIMETypes():
     @staticmethod
     def from_string(text):
         '''Factory to produce MIMETypes from parsing a string.'''
-        return MIMETypes.from_lxml_element(etree.XML(text))
+        return MIMETypes.from_lxml_element(etree.XML(
+                text, parser = etree.XMLParser(remove_comments = True)))
diff --git a/misc/py_control_client/MyServer/pycontrollib/vhost.py b/misc/py_control_client/MyServer/pycontrollib/vhost.py
index 44181bb..4609774 100644
--- a/misc/py_control_client/MyServer/pycontrollib/vhost.py
+++ b/misc/py_control_client/MyServer/pycontrollib/vhost.py
@@ -236,7 +236,8 @@ class VHost():
     @staticmethod
     def from_string(text):
         '''Factory to produce VHost by parsing a string.'''
-        return VHost.from_lxml_element(etree.XML(text))
+        return VHost.from_lxml_element(etree.XML(
+                text, parser = etree.XMLParser(remove_comments = True)))
 
 class VHosts():
     def __init__(self, VHosts):
@@ -267,4 +268,5 @@ class VHosts():
     @staticmethod
     def from_string(text):
         '''Factory to produce VHosts from parsing a string.'''
-        return VHosts.from_lxml_element(etree.XML(text))
+        return VHosts.from_lxml_element(etree.XML(
+                text, parser = etree.XMLParser(remove_comments = True)))



commit c723954a698f9c8384a91453727e32fc6c81009f
Author: Marek Aaron Sapota <maarons@gnu.org>
Date:   Sun Jul 12 16:47:52 2009 +0200

    Added definition.search_by_name

diff --git a/misc/py_control_client/MyServer/pycontrollib/definition.py b/misc/py_control_client/MyServer/pycontrollib/definition.py
index 949b7a5..ebd62d5 100644
--- a/misc/py_control_client/MyServer/pycontrollib/definition.py
+++ b/misc/py_control_client/MyServer/pycontrollib/definition.py
@@ -118,6 +118,9 @@ class DefinitionElement(Definition):
     def from_string(text):
         '''Factory to produce definition element by parsing a string.'''
         return DefinitionElement.from_lxml_element(etree.XML(text))
+    
+    def search_by_name(self, name):
+        return None if name != self.name else self
 
 class DefinitionTree(Definition):
     '''Definition element containing other definitions.'''
@@ -183,6 +186,13 @@ class DefinitionTree(Definition):
 
     def __str__(self):
         return etree.tostring(self.to_lxml_element(), pretty_print = True)
+    
+    def search_by_name(self, name):
+        for definition in reversed(self.definitions):
+            ret = definition.search_by_name(name)
+            if ret != None:
+                return ret
+        return None if name != self.name else self
 
 class DefinitionList():
     def __init__(self, definitions = []):
@@ -217,3 +227,10 @@ class DefinitionList():
 
     def __str__(self):
         return '\n'.join(map(str, self.definitions))
+
+    def search_by_name(self, name):
+        for definition in reversed(self.definitions):
+            ret = definition.search_by_name(name)
+            if ret != None:
+                return ret
+        return None
diff --git a/misc/py_control_client/MyServer/pycontrollib/test/definition_test.py b/misc/py_control_client/MyServer/pycontrollib/test/definition_test.py
index 71e06e8..b7917cf 100644
--- a/misc/py_control_client/MyServer/pycontrollib/test/definition_test.py
+++ b/misc/py_control_client/MyServer/pycontrollib/test/definition_test.py
@@ -206,6 +206,11 @@ class DefinitionElementTest(unittest.TestCase):
         self.assertRaises(AttributeError, Definition.from_lxml_element,
                           etree.XML(text))
 
+    def test_search_by_name(self):
+        definition = DefinitionElement('a')
+        self.assertEqual(None, definition.search_by_name('b'))
+        self.assertEqual(definition, definition.search_by_name('a'))
+
 class DefinitionTreeTest(unittest.TestCase):
     def setUp(self):
         self.element_0 = DefinitionElement('test', {'value': 'x'})
@@ -377,6 +382,18 @@ class DefinitionTreeTest(unittest.TestCase):
         self.assertRaises(AttributeError, Definition.from_lxml_element,
                           etree.XML(text))
 
+    def test_search_by_name(self):
+        element_0 = DefinitionElement('a')
+        element_1 = DefinitionElement('b')
+        element_2 = DefinitionElement('a')
+        tree = DefinitionTree('x', definitions = [element_0, element_1, element_2])
+        self.assertEqual(element_1, tree.search_by_name('b'))
+        self.assertEqual(element_2, tree.search_by_name('a'))
+        self.assertEqual(None, tree.search_by_name('c'))
+        self.assertEqual(tree, tree.search_by_name('x'))
+        tree = DefinitionTree('b', definitions = [element_0, element_1, element_2])
+        self.assertEqual(element_1, tree.search_by_name('b'))
+
 class DefinitionListTest(unittest.TestCase):
     def setUp(self):
         self.definitions = []
@@ -415,6 +432,21 @@ class DefinitionListTest(unittest.TestCase):
         self.assertNotEqual(DefinitionList(), DefinitionList(self.definitions))
         self.assertNotEqual(DefinitionList(), 'other type')
 
+    def test_search_by_name(self):
+        def_list = DefinitionList()
+        self.assertEqual(None, def_list.search_by_name('x'))
+        element_0 = DefinitionElement('x')
+        def_list.add_definition(element_0)
+        self.assertEqual(element_0, def_list.search_by_name('x'))
+        element_1 = DefinitionElement('x')
+        def_list.add_definition(element_1)
+        self.assertEqual(element_1, def_list.search_by_name('x'))
+        element_2 = DefinitionElement('x')
+        tree_1 = DefinitionTree('t', definitions = [element_2])
+        self.assertEqual(element_2, def_list.search_by_name('x'))
+        def_list.add_definition(element_1)
+        self.assertEqual(element_1, def_list.search_by_name('x'))
+
     def test_to_string(self):
         def_list = DefinitionList(self.definitions)
         text = '<wrap>{0}</wrap>'.format(def_list)



commit c592b21b60297ea739ed2a760bb6933f4671aeec
Author: Marek Aaron Sapota <maarons@gnu.org>
Date:   Sun Jul 12 16:25:51 2009 +0200

    Added SSL support in VHost class.

diff --git a/misc/py_control_client/MyServer/pycontrollib/test/vhost_test.py b/misc/py_control_client/MyServer/pycontrollib/test/vhost_test.py
index 28b0eee..d5e19ae 100644
--- a/misc/py_control_client/MyServer/pycontrollib/test/vhost_test.py
+++ b/misc/py_control_client/MyServer/pycontrollib/test/vhost_test.py
@@ -38,6 +38,14 @@ class VHostTest(unittest.TestCase):
                       [Log('ACCESSLOG'), Log('WARNINGLOG')],
                       ['127.0.0.0/8', '192.168.0.0/16'],
                       {'host.domain': None})
+        vhost = VHost('test vhost', 80, 'HTTP', '/www', '/system',
+                      [Log('ACCESSLOG'), Log('WARNINGLOG')],
+                      ['127.0.0.0/8', '192.168.0.0/16'],
+                      {'host.domain': None}, 'private_key')
+        vhost = VHost('test vhost', 80, 'HTTP', '/www', '/system',
+                      [Log('ACCESSLOG'), Log('WARNINGLOG')],
+                      ['127.0.0.0/8', '192.168.0.0/16'],
+                      {'host.domain': None}, 'private_key', 'certificate')
 
     def test_name(self):
         vhost = VHost('test vhost')
@@ -141,60 +149,75 @@ class VHostTest(unittest.TestCase):
                       host = {'test.me.org': None})
         self.assertEqual({'test.me.org': None}, vhost.get_host())
 
+    def test_private_key(self):
+        vhost = VHost()
+        self.assertEqual(None, vhost.get_private_key())
+        vhost.set_private_key('path')
+        self.assertEqual('path', vhost.get_private_key())
+        vhost.set_private_key(None)
+        self.assertEqual(None, vhost.get_private_key())
+        vhost = VHost('test vhost', 80, 'HTTP', '/www', '/system',
+                      [Log('ACCESSLOG'), Log('WARNINGLOG')],
+                      ['127.0.0.0/8', '192.168.0.0/16'],
+                      {'host.domain': None}, 'path')
+        self.assertEqual('path', vhost.get_private_key())
+        vhost = VHost(private_key = 'path')
+        self.assertEqual('path', vhost.get_private_key())
+
+    def test_certificate(self):
+        vhost = VHost()
+        self.assertEqual(None, vhost.get_certificate())
+        vhost.set_certificate('path')
+        self.assertEqual('path', vhost.get_certificate())
+        vhost.set_certificate(None)
+        self.assertEqual(None, vhost.get_certificate())
+        vhost = VHost('test vhost', 80, 'HTTP', '/www', '/system',
+                      [Log('ACCESSLOG'), Log('WARNINGLOG')],
+                      ['127.0.0.0/8', '192.168.0.0/16'],
+                      {'host.domain': None}, 'key', 'path')
+        self.assertEqual('path', vhost.get_certificate())
+        vhost = VHost(certificate = 'path')
+        self.assertEqual('path', vhost.get_certificate())
+
     def test_equality(self):
         vhost_0 = VHost('test vhost', 80, 'HTTP', '/www', '/system',
                         [Log('ACCESSLOG'), Log('WARNINGLOG')],
                         ['127.0.0.0/8', '192.168.0.0/16'],
-                        {'host.domain': None})
+                        {'host.domain': None}, 'private_key', 'certificate')
         vhost_1 = VHost('test vhost', 80, 'HTTP', '/www', '/system',
                         [Log('ACCESSLOG'), Log('WARNINGLOG')],
                         ['127.0.0.0/8', '192.168.0.0/16'],
-                        {'host.domain': None})
+                        {'host.domain': None}, 'private_key', 'certificate')
         self.assertEqual(vhost_0, vhost_1)
-        vhost_1 = VHost('different', 80, 'HTTP', '/www', '/system',
-                        [Log('ACCESSLOG'), Log('WARNINGLOG')],
-                        ['127.0.0.0/8', '192.168.0.0/16'],
-                        {'host.domain': None})
+        vhost_1 = VHost.from_string(str(vhost_0))
+        vhost_1.set_name('different')
         self.assertNotEqual(vhost_0, vhost_1)
-        vhost_1 = VHost('test vhost', 81, 'HTTP', '/www', '/system',
-                        [Log('ACCESSLOG'), Log('WARNINGLOG')],
-                        ['127.0.0.0/8', '192.168.0.0/16'],
-                        {'host.domain': None})
+        vhost_1 = VHost.from_string(str(vhost_0))
+        vhost_1.set_port(81)
         self.assertNotEqual(vhost_0, vhost_1)
-        vhost_1 = VHost('test_vhost', 80, 'HTTPS', '/www', '/system',
-                        [Log('ACCESSLOG'), Log('WARNINGLOG')],
-                        ['127.0.0.0/8', '192.168.0.0/16'],
-                        {'host.domain': None})
+        vhost_1 = VHost.from_string(str(vhost_0))
+        vhost_1.set_protocol('HTTPS')
         self.assertNotEqual(vhost_0, vhost_1)
-        vhost_1 = VHost('test vhost', 80, 'HTTP', '/var/www', '/system',
-                        [Log('ACCESSLOG'), Log('WARNINGLOG')],
-                        ['127.0.0.0/8', '192.168.0.0/16'],
-                        {'host.domain': None})
+        vhost_1 = VHost.from_string(str(vhost_0))
+        vhost_1.set_doc_root('/var/www')
         self.assertNotEqual(vhost_0, vhost_1)
-        vhost_1 = VHost('test vhost', 80, 'HTTP', '/www', '/var/system',
-                        [Log('ACCESSLOG'), Log('WARNINGLOG')],
-                        ['127.0.0.0/8', '192.168.0.0/16'],
-                        {'host.domain': None})
+        vhost_1 = VHost.from_string(str(vhost_0))
+        vhost_1.set_sys_folder('/var/system')
         self.assertNotEqual(vhost_0, vhost_1)
-        vhost_1 = VHost('test vhost', 80, 'HTTP', '/www', '/system',
-                        [Log('ACCESSLOG', type = 'combined'), Log('WARNINGLOG')],
-                        ['127.0.0.0/8', '192.168.0.0/16'],
-                        {'host.domain': None})
+        vhost_1 = VHost.from_string(str(vhost_0))
+        vhost_1.add_log(Log('NEWLOG'))
         self.assertNotEqual(vhost_0, vhost_1)
-        vhost_1 = VHost('test vhost', 80, 'HTTP', '/www', '/system',
-                        [Log('ACCESSLOG'), Log('WARNINGLOG', type = 'combined')],
-                        ['127.0.0.0/8', '192.168.0.0/16'],
-                        {'host.domain': None})
+        vhost_1 = VHost.from_string(str(vhost_0))
+        vhost_1.add_ip('10.0.0.0/8')
         self.assertNotEqual(vhost_0, vhost_1)
-        vhost_1 = VHost('test vhost', 80, 'HTTP', '/www', '/system',
-                        [Log('ACCESSLOG'), Log('WARNINGLOG')],
-                        ['127.0.0.0/24', '192.168.0.0/16'],
-                        {'host.domain': None})
+        vhost_1 = VHost.from_string(str(vhost_0))
+        vhost_1.add_host('newhost', None)
         self.assertNotEqual(vhost_0, vhost_1)
-        vhost_1 = VHost('test vhost', 80, 'HTTP', '/www', '/system',
-                        [Log('ACCESSLOG'), Log('WARNINGLOG')],
-                        ['127.0.0.0/8', '192.168.0.0/16'],
-                        {'host.domain': True})
+        vhost_1 = VHost.from_string(str(vhost_0))
+        vhost_1.set_private_key('new_key')
+        self.assertNotEqual(vhost_0, vhost_1)
+        vhost_1 = VHost.from_string(str(vhost_0))
+        vhost_1.set_certificate('new certificate')
         self.assertNotEqual(vhost_0, vhost_1)
         self.assertNotEqual(vhost_0, [])
 
@@ -252,6 +275,18 @@ class VHostTest(unittest.TestCase):
         right = VHost(host = {'.*': True, 'a.org': None})
         self.assertEqual(vhost, right)
 
+    def test_from_string_private_key(self):
+        text = '<VHOST><SSL_PRIVATEKEY>private_key</SSL_PRIVATEKEY></VHOST>'
+        vhost = VHost.from_string(text)
+        right = VHost(private_key = 'private_key')
+        self.assertEqual(vhost, right)
+
+    def test_from_string_certificate(self):
+        text = '<VHOST><SSL_CERTIFICATE>certificate</SSL_CERTIFICATE></VHOST>'
+        vhost = VHost.from_string(text)
+        right = VHost(certificate = 'certificate')
+        self.assertEqual(vhost, right)
+
     def test_from_string_full(self):
         text = '''<VHOST>
   <NAME>test vhost</NAME>
@@ -265,12 +300,15 @@ class VHostTest(unittest.TestCase):
   <IP>192.168.0.0/16</IP>
   <HOST useRegex="YES">host.domain</HOST>
   <HOST>test.domain</HOST>
+  <SSL_PRIVATEKEY>private_key</SSL_PRIVATEKEY>
+  <SSL_CERTIFICATE>certificate</SSL_CERTIFICATE>
 </VHOST>'''
         vhost = VHost.from_string(text)
         right = VHost('test vhost', 80, 'HTTP', '/www', '/system',
                       [Log('ACCESSLOG'), Log('WARNINGLOG')],
                       ['127.0.0.0/8', '192.168.0.0/16'],
-                      {'host.domain': True, 'test.domain': None})
+                      {'host.domain': True, 'test.domain': None},
+                      'private_key', 'certificate')
         self.assertEqual(vhost, right)
 
     def test_from_lxml(self):
@@ -327,6 +365,18 @@ class VHostTest(unittest.TestCase):
         right = VHost(host = {'.*': True, 'a.org': None})
         self.assertEqual(vhost, right)
 
+    def test_from_lxml_private_key(self):
+        text = '<VHOST><SSL_PRIVATEKEY>private_key</SSL_PRIVATEKEY></VHOST>'
+        vhost = VHost.from_lxml_element(etree.XML(text))
+        right = VHost(private_key = 'private_key')
+        self.assertEqual(vhost, right)
+
+    def test_from_lxml_certificate(self):
+        text = '<VHOST><SSL_CERTIFICATE>certificate</SSL_CERTIFICATE></VHOST>'
+        vhost = VHost.from_lxml_element(etree.XML(text))
+        right = VHost(certificate = 'certificate')
+        self.assertEqual(vhost, right)
+
     def test_from_lxml_full(self):
         text = '''<VHOST>
   <NAME>test vhost</NAME>
@@ -340,12 +390,15 @@ class VHostTest(unittest.TestCase):
   <IP>192.168.0.0/16</IP>
   <HOST useRegex="YES">host.domain</HOST>
   <HOST>test.domain</HOST>
+  <SSL_PRIVATEKEY>private_key</SSL_PRIVATEKEY>
+  <SSL_CERTIFICATE>certificate</SSL_CERTIFICATE>
 </VHOST>'''
         vhost = VHost.from_lxml_element(etree.XML(text))
         right = VHost('test vhost', 80, 'HTTP', '/www', '/system',
                       [Log('ACCESSLOG'), Log('WARNINGLOG')],
                       ['127.0.0.0/8', '192.168.0.0/16'],
-                      {'host.domain': True, 'test.domain': None})
+                      {'host.domain': True, 'test.domain': None},
+                      'private_key', 'certificate')
         self.assertEqual(vhost, right)
 
     def test_bad_root_tag(self):
@@ -399,11 +452,22 @@ class VHostTest(unittest.TestCase):
         copy = VHost.from_string(str(vhost))
         self.assertEqual(vhost, copy)
 
+    def test_to_string_private_key(self):
+        vhost = VHost(private_key = 'private_key')
+        copy = VHost.from_string(str(vhost))
+        self.assertEqual(vhost, copy)
+
+    def test_to_string_certificate(self):
+        vhost = VHost(certificate = 'certificate')
+        copy = VHost.from_string(str(vhost))
+        self.assertEqual(vhost, copy)
+
     def test_to_string_full(self):
         vhost = VHost('test vhost', 80, 'HTTP', '/www', '/system',
                       [Log('ACCESSLOG'), Log('WARNINGLOG')],
                       ['127.0.0.0/8', '192.168.0.0/16'],
-                      {'host.domain': True, 'test.domain': None})
+                      {'host.domain': True, 'test.domain': None},
+                      'private_key', 'certificate')
         copy = VHost.from_string(str(vhost))
         self.assertEqual(vhost, copy)
 
@@ -451,12 +515,23 @@ class VHostTest(unittest.TestCase):
         vhost = VHost(host = {'.*': True, 'a.org': None})
         copy = VHost.from_lxml_element(vhost.to_lxml_element())
         self.assertEqual(vhost, copy)
+        
+    def test_to_lxml_private_key(self):
+        vhost = VHost(private_key = 'private_key')
+        copy = VHost.from_lxml_element(vhost.to_lxml_element())
+        self.assertEqual(vhost, copy)
+
+    def test_to_lxml_certificate(self):
+        vhost = VHost(certificate = 'certificate')
+        copy = VHost.from_lxml_element(vhost.to_lxml_element())
+        self.assertEqual(vhost, copy)
 
     def test_to_lxml_full(self):
         vhost = VHost('test vhost', 80, 'HTTP', '/www', '/system',
                       [Log('ACCESSLOG'), Log('WARNINGLOG')],
                       ['127.0.0.0/8', '192.168.0.0/16'],
-                      {'host.domain': True, 'test.domain': None})
+                      {'host.domain': True, 'test.domain': None},
+                      'private_key', 'certificate')
         copy = VHost.from_lxml_element(vhost.to_lxml_element())
         self.assertEqual(vhost, copy)
 
diff --git a/misc/py_control_client/MyServer/pycontrollib/vhost.py b/misc/py_control_client/MyServer/pycontrollib/vhost.py
index cfa1cb0..44181bb 100644
--- a/misc/py_control_client/MyServer/pycontrollib/vhost.py
+++ b/misc/py_control_client/MyServer/pycontrollib/vhost.py
@@ -22,7 +22,7 @@ from log import Log
 class VHost():
     def __init__(self, name = None, port = None, protocol = None,
                  doc_root = None, sys_folder = None, logs = [],
-                 ip = [], host = {}):
+                 ip = [], host = {}, private_key = None, certificate = None):
         '''Create new instance of VHost. logs and ip are expected to be a
         collection and host is expected to be a dict {name: useRegex} where None
         means not set.'''
@@ -40,6 +40,8 @@ class VHost():
         self.host = {}
         for single_host in host.iteritems():
             self.add_host(single_host[0], single_host[1])
+        self.set_private_key(private_key)
+        self.set_certificate(certificate)
 
     def __eq__(self, other):
         return isinstance(other, VHost) and self.name == other.name and \
@@ -47,7 +49,9 @@ class VHost():
             self.doc_root == other.doc_root and \
             self.sys_folder == other.sys_folder and \
             self.logs == other.logs and self.ip == other.ip and \
-            self.host == other.host
+            self.host == other.host and \
+            self.private_key == other.private_key and \
+            self.certificate == other.certificate
 
     def get_name(self):
         '''Get VHost name.'''
@@ -136,6 +140,22 @@ class VHost():
         '''Remove host from VHost host dict.'''
         self.host.pop(host)
 
+    def get_private_key(self):
+        '''Get vhost private ssl key.'''
+        return self.private_key
+    
+    def set_private_key(self, private_key):
+        '''Set vhost private ssl key.'''
+        self.private_key = private_key
+
+    def get_certificate(self):
+        '''Get vhost ssl certificate.'''
+        return self.certificate
+
+    def set_certificate(self, certificate):
+        '''Set vhost ssl certificate.'''
+        self.certificate = certificate
+
     def __str__(self):
         return etree.tostring(self.to_lxml_element(), pretty_print = True)
 
@@ -156,6 +176,10 @@ class VHost():
             root.append(make_element('DOCROOT', self.doc_root))
         if self.sys_folder is not None:
             root.append(make_element('SYSFOLDER', self.sys_folder))
+        if self.private_key is not None:
+            root.append(make_element('SSL_PRIVATEKEY', self.private_key))
+        if self.certificate is not None:
+            root.append(make_element('SSL_CERTIFICATE', self.certificate))
         for ip_address in self.ip:
             root.append(make_element('IP', ip_address))
         for host, use_regex in self.host.iteritems():
@@ -177,6 +201,8 @@ class VHost():
         protocol = None
         doc_root = None
         sys_folder = None
+        private_key = None
+        certificate = None
         ip = []
         host = {}
         logs = []
@@ -198,9 +224,14 @@ class VHost():
                 if use_regex is not None:
                     use_regex = use_regex == 'YES'
                 host[child.text] = use_regex
+            elif child.tag == 'SSL_PRIVATEKEY':
+                private_key = child.text
+            elif child.tag == 'SSL_CERTIFICATE':
+                certificate = child.text
             else:
                 logs.append(Log.from_lxml_element(child))
-        return VHost(name, port, protocol, doc_root, sys_folder, logs, ip, host)
+        return VHost(name, port, protocol, doc_root, sys_folder, logs, ip, host,
+                     private_key, certificate)
     
     @staticmethod
     def from_string(text):



commit c3c98305bd84fd381b95f165e9a647542a966ae2
Author: Marek Aaron Sapota <maarons@gnu.org>
Date:   Fri Jul 10 18:04:19 2009 +0200

    Implemented MyServerConfig.

diff --git a/misc/py_control_client/MyServer/pycontrollib/config.py b/misc/py_control_client/MyServer/pycontrollib/config.py
index 2fd7ac9..deb0ed5 100644
--- a/misc/py_control_client/MyServer/pycontrollib/config.py
+++ b/misc/py_control_client/MyServer/pycontrollib/config.py
@@ -17,6 +17,51 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 '''
 
 from lxml import etree
+from definition import Definition, DefinitionList
 
 class MyServerConfig():
-    pass
+    def __init__(self, definitions = []):
+        self.definitions = DefinitionList(definitions)
+
+    def __eq__(self, other):
+        return isinstance(other, MyServerConfig) and \
+            self.definitions == other.definitions
+
+    def get_definitions(self):
+        '''Get current definitions.'''
+        return self.definitions.get_definitions()
+    
+    def add_definition(self, definition, index = None):
+        '''Append definition, if index is not None insert it at index-th
+        position.'''
+        self.definitions.add_definition(definition, index)
+
+    def get_definition(self, index):
+        '''Get index-th definition.'''
+        return self.definitions.get_definition(index)
+
+    def remove_definition(self, index):
+        '''Remove index-th definition.'''
+        self.definitions.remove_definition(index)
+
+    @staticmethod
+    def from_string(text):
+        '''Factory to produce MyServerConfig by parsing a string.'''
+        return MyServerConfig.from_lxml_element(etree.XML(text))
+
+    @staticmethod
+    def from_lxml_element(root):
+        '''Factory to produce MyServerConfig from lxml.etree.Element object.'''
+        if root.tag != 'MYSERVER':
+            raise AttributeError('Expected MYSERVER tag.')
+        return MyServerConfig(map(Definition.from_lxml_element, list(root)))
+
+    def __str__(self):
+        return etree.tostring(self.to_lxml_element(), pretty_print = True)
+
+    def to_lxml_element(self):
+        '''Convert MyServerConfig to lxml.etree.Element object.'''
+        root = etree.Element('MYSERVER')
+        for definition in self.definitions.get_definitions():
+            root.append(definition.to_lxml_element())
+        return root
diff --git a/misc/py_control_client/MyServer/pycontrollib/test/Makefile b/misc/py_control_client/MyServer/pycontrollib/test/Makefile
index d6b833d..6ccf7b7 100644
--- a/misc/py_control_client/MyServer/pycontrollib/test/Makefile
+++ b/misc/py_control_client/MyServer/pycontrollib/test/Makefile
@@ -16,9 +16,9 @@
 PYTHON=/usr/bin/python
 PYTHONPATH:=$(shell dirname `pwd`):${PYTHONPATH}
 
-.PHONY: test log_test definition_test mimetypes_test vhost_test
+.PHONY: test log_test definition_test mimetypes_test vhost_test config_test
 
-test: log_test definition_test mimetypes_test vhost_test
+test: log_test definition_test mimetypes_test vhost_test config_test
 
 log_test:
 	-${PYTHON} log_test.py
@@ -32,6 +32,9 @@ mimetypes_test:
 vhost_test:
 	-${PYTHON} vhost_test.py
 
+config_test:
+	-${PYTHON} config_test.py
+
 .PHONY: clean
 clean:
 	rm *.py[co]
diff --git a/misc/py_control_client/MyServer/pycontrollib/test/config_test.py b/misc/py_control_client/MyServer/pycontrollib/test/config_test.py
new file mode 100644
index 0000000..1f40262
--- /dev/null
+++ b/misc/py_control_client/MyServer/pycontrollib/test/config_test.py
@@ -0,0 +1,134 @@
+# -*- coding: utf-8 -*-
+'''
+MyServer
+Copyright (C) 2009 Free Software Foundation, Inc.
+This program 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 3 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program.  If not, see <http://www.gnu.org/licenses/>.
+'''
+
+import unittest
+from lxml import etree
+from config import MyServerConfig
+from definition import DefinitionElement, DefinitionTree
+
+class MyServerConfigTest(unittest.TestCase):
+    def setUp(self):
+        self.definitions = []
+        self.definitions.append(DefinitionElement('a'))
+        self.definitions.append(DefinitionElement('b'))
+        self.definitions.append(DefinitionElement('c'))
+
+    def test_creation(self):
+        config = MyServerConfig()
+        config = MyServerConfig(self.definitions)
+
+    def test_definitions(self):
+        config = MyServerConfig()
+        self.assertEqual([], config.get_definitions())
+        counter = 0
+        for definition in self.definitions:
+            config.add_definition(definition)
+            counter += 1
+            self.assertEqual(self.definitions[:counter],
+                             config.get_definitions())
+        for counter in xrange(len(self.definitions)):
+            self.assertEqual(self.definitions[counter],
+                             config.get_definition(counter))
+        config.add_definition(DefinitionElement('test'), 1)
+        self.assertEqual(DefinitionElement('test'), config.get_definition(1))
+        config.remove_definition(1)
+        self.assertEqual(self.definitions, config.get_definitions())
+        for counter in xrange(len(self.definitions)):
+            config.remove_definition(0)
+            self.assertEqual(self.definitions[counter + 1:],
+                             config.get_definitions())
+
+    def test_equality(self):
+        self.assertEqual(MyServerConfig(self.definitions),
+                         MyServerConfig(self.definitions))
+        self.assertNotEqual(MyServerConfig(), MyServerConfig(self.definitions))
+        self.assertNotEqual(MyServerConfig(), 'other type')
+
+    def test_from_string(self):
+        text = '<MYSERVER />'
+        config = MyServerConfig.from_string(text)
+        right = MyServerConfig()
+        self.assertEqual(config, right)
+
+    def test_from_string_definitions(self):
+        text = '''<MYSERVER>
+  <DEFINE name="a" />
+  <DEFINE>
+    <DEFINE name="b" />
+    <DEFINE name="c" />
+  </DEFINE>
+</MYSERVER>'''
+        config = MyServerConfig.from_string(text)
+        right = MyServerConfig([DefinitionElement('a'), DefinitionTree(
+                    definitions = [DefinitionElement('b'),
+                                   DefinitionElement('c')])])
+        self.assertEqual(config, right)
+
+    def test_from_lxml(self):
+        text = '<MYSERVER />'
+        config = MyServerConfig.from_lxml_element(etree.XML(text))
+        right = MyServerConfig()
+        self.assertEqual(config, right)
+
+    def test_from_lxml_definitions(self):
+        text = '''<MYSERVER>
+  <DEFINE name="a" />
+  <DEFINE>
+    <DEFINE name="b" />
+    <DEFINE name="c" />
+  </DEFINE>
+</MYSERVER>'''
+        config = MyServerConfig.from_lxml_element(etree.XML(text))
+        right = MyServerConfig([DefinitionElement('a'), DefinitionTree(
+                    definitions = [DefinitionElement('b'),
+                                   DefinitionElement('c')])])
+        self.assertEqual(config, right)
+
+    def test_to_string(self):
+        config = MyServerConfig()
+        copy = MyServerConfig.from_string(str(config))
+        self.assertEqual(config, copy)
+
+    def test_to_string_definitions(self):
+        config = MyServerConfig([DefinitionElement('a'), DefinitionTree(
+                    definitions = [DefinitionElement('b'),
+                                   DefinitionElement('c')])])
+        copy = MyServerConfig.from_string(str(config))
+        self.assertEqual(config, copy)
+
+    def test_to_string(self):
+        config = MyServerConfig()
+        copy = MyServerConfig.from_lxml_element(config.to_lxml_element())
+        self.assertEqual(config, copy)
+
+    def test_to_string_definitions(self):
+        config = MyServerConfig([DefinitionElement('a'), DefinitionTree(
+                    definitions = [DefinitionElement('b'),
+                                   DefinitionElement('c')])])
+        copy = MyServerConfig.from_lxml_element(config.to_lxml_element())
+        self.assertEqual(config, copy)
+
+    def test_bad_root_tag(self):
+        text = '<ERROR />'
+        self.assertRaises(AttributeError, MyServerConfig.from_string, text)
+        self.assertRaises(AttributeError, MyServerConfig.from_lxml_element,
+                          etree.XML(text))
+
+
+if __name__ == '__main__':
+    unittest.main()



commit 7794e0a8c9ea18c4792754f8890c8f8e4654c341
Author: Marek Aaron Sapota <maarons@gnu.org>
Date:   Fri Jul 10 16:34:00 2009 +0200

    Mimetypes use DefinitionList.

diff --git a/misc/py_control_client/MyServer/pycontrollib/mimetypes.py b/misc/py_control_client/MyServer/pycontrollib/mimetypes.py
index 8b6fe05..3a62813 100644
--- a/misc/py_control_client/MyServer/pycontrollib/mimetypes.py
+++ b/misc/py_control_client/MyServer/pycontrollib/mimetypes.py
@@ -16,7 +16,7 @@ You should have received a copy of the GNU General Public License
 along with this program.  If not, see <http://www.gnu.org/licenses/>.
 '''
 
-from definition import Definition
+from definition import Definition, DefinitionList
 from lxml import etree
 
 class MIMEType():
@@ -35,9 +35,7 @@ class MIMEType():
         for filter in filters:
             self.add_filter(filter)
         self.set_self_executed(self_executed)
-        self.definitions = []
-        for definition in definitions:
-            self.add_definition(definition)
+        self.definitions = DefinitionList(definitions)
 
     def get_mime(self):
         '''Get associated mime type.'''
@@ -116,23 +114,20 @@ class MIMEType():
 
     def get_definitions(self):
         '''Get all definitions.'''
-        return self.definitions
+        return self.definitions.get_definitions()
     
     def get_definition(self, index):
         '''Get definition with given index.'''
-        return self.definitions[index]
+        return self.definitions.get_definition(index)
 
     def add_definition(self, definition, index = None):
         '''Append definition after all other definitions, or insert it at
         index.'''
-        if index is None:
-            self.definitions.append(definition)
-        else:
-            self.definitions.insert(index, definition)
+        self.definitions.add_definition(definition, index)
 
     def remove_definition(self, index):
         '''Remove definition with given index.'''
-        self.definitions.pop(index)
+        self.definitions.remove_definition(index)
 
     def __eq__(self, other):
         return isinstance(other, MIMEType) and \
@@ -168,7 +163,7 @@ class MIMEType():
             root.append(element)
         for element in map(make_filter_element, self.filters):
             root.append(element)
-        for definition in self.definitions:
+        for definition in self.definitions.get_definitions():
             root.append(definition.to_lxml_element())
         return root
 



commit e2f770d7d8fde08d627b40151656928fecdc2c39
Author: Marek Aaron Sapota <maarons@gnu.org>
Date:   Fri Jul 10 16:03:06 2009 +0200

    Added DefinitionList class.

diff --git a/misc/py_control_client/MyServer/pycontrollib/definition.py b/misc/py_control_client/MyServer/pycontrollib/definition.py
index fd4c353..949b7a5 100644
--- a/misc/py_control_client/MyServer/pycontrollib/definition.py
+++ b/misc/py_control_client/MyServer/pycontrollib/definition.py
@@ -184,3 +184,36 @@ class DefinitionTree(Definition):
     def __str__(self):
         return etree.tostring(self.to_lxml_element(), pretty_print = True)
 
+class DefinitionList():
+    def __init__(self, definitions = []):
+        '''Construct new DefinitionList object with given definitions.'''
+        self.definitions = []
+        for definition in definitions:
+            self.add_definition(definition)
+
+    def add_definition(self, definition, index = None):
+        '''Append definition to current list of definitions, if index is not
+        None insert at index-th position.'''
+        if index is None:
+            self.definitions.append(definition)
+        else:
+            self.definitions.insert(index, definition)
+
+    def get_definitions(self):
+        '''Get current list of definitions.'''
+        return self.definitions
+
+    def get_definition(self, index):
+        '''Get index-th definition.'''
+        return self.definitions[index]
+
+    def remove_definition(self, index):
+        '''Remove index-th definition.'''
+        self.definitions.pop(index)
+
+    def __eq__(self, other):
+        return isinstance(other, DefinitionList) and \
+            self.definitions == other.definitions
+
+    def __str__(self):
+        return '\n'.join(map(str, self.definitions))
diff --git a/misc/py_control_client/MyServer/pycontrollib/test/definition_test.py b/misc/py_control_client/MyServer/pycontrollib/test/definition_test.py
index 6177b56..71e06e8 100644
--- a/misc/py_control_client/MyServer/pycontrollib/test/definition_test.py
+++ b/misc/py_control_client/MyServer/pycontrollib/test/definition_test.py
@@ -16,7 +16,7 @@ You should have received a copy of the GNU General Public License
 along with this program.  If not, see <http://www.gnu.org/licenses/>.
 '''
 
-from definition import Definition, DefinitionElement, DefinitionTree
+from definition import Definition, DefinitionElement, DefinitionTree, DefinitionList
 from lxml import etree
 import unittest
 
@@ -81,7 +81,7 @@ class DefinitionTest(unittest.TestCase):
 
     def test_equality(self):
         self.assertNotEqual(Definition(), 'different type')
-    
+
 class DefinitionElementTest(unittest.TestCase):
     def test_creation(self):
         definition = DefinitionElement()
@@ -126,7 +126,7 @@ class DefinitionElementTest(unittest.TestCase):
         definition = DefinitionElement.from_string(text)
         right = DefinitionElement('test', {'value': 'x', 'a': 'b'})
         self.assertEqual(definition, right)
-        
+
     def test_from_lxml(self):
         text = '<DEFINE />'
         definition = DefinitionElement.from_lxml_element(etree.XML(text))
@@ -164,7 +164,7 @@ class DefinitionElementTest(unittest.TestCase):
         definition = DefinitionElement()
         copy = DefinitionElement.from_string(str(definition))
         self.assertEqual(definition, copy)
-    
+
     def test_to_string_name(self):
         definition = DefinitionElement(name = 'test')
         copy = DefinitionElement.from_string(str(definition))
@@ -184,7 +184,7 @@ class DefinitionElementTest(unittest.TestCase):
         definition = DefinitionElement()
         copy = DefinitionElement.from_lxml_element(definition.to_lxml_element())
         self.assertEqual(definition, copy)
-    
+
     def test_to_lxml_name(self):
         definition = DefinitionElement(name = 'test')
         copy = DefinitionElement.from_lxml_element(definition.to_lxml_element())
@@ -199,7 +199,7 @@ class DefinitionElementTest(unittest.TestCase):
         definition = DefinitionElement('test', {'value': 'x', 'a': 'b'})
         copy = DefinitionElement.from_lxml_element(definition.to_lxml_element())
         self.assertEqual(definition, copy)
-    
+
     def test_bad_root_tag(self):
         text = '<ERROR name="http.error.file.404" value="404.html" />'
         self.assertRaises(AttributeError, Definition.from_string, text)
@@ -344,7 +344,7 @@ class DefinitionTreeTest(unittest.TestCase):
         definition = DefinitionTree('test', [self.element_0, self.element_1], {'a': 'b'})
         copy = DefinitionTree.from_string(str(definition))
         self.assertEqual(definition, copy)
-        
+
     def test_to_lxml(self):
         definition = DefinitionTree()
         copy = DefinitionTree.from_lxml_element(definition.to_lxml_element())
@@ -377,5 +377,51 @@ class DefinitionTreeTest(unittest.TestCase):
         self.assertRaises(AttributeError, Definition.from_lxml_element,
                           etree.XML(text))
 
+class DefinitionListTest(unittest.TestCase):
+    def setUp(self):
+        self.definitions = []
+        self.definitions.append(DefinitionElement('a'))
+        self.definitions.append(DefinitionElement('b'))
+        self.definitions.append(DefinitionElement('c'))
+
+    def test_creation(self):
+        def_list = DefinitionList()
+        def_list = DefinitionList(self.definitions)
+
+    def test_definitions(self):
+        def_list = DefinitionList()
+        self.assertEqual([], def_list.get_definitions())
+        counter = 0
+        for definition in self.definitions:
+            def_list.add_definition(definition)
+            counter += 1
+            self.assertEqual(self.definitions[:counter],
+                             def_list.get_definitions())
+        for counter in xrange(len(self.definitions)):
+            self.assertEqual(self.definitions[counter],
+                             def_list.get_definition(counter))
+        def_list.add_definition(DefinitionElement('test'), 1)
+        self.assertEqual(DefinitionElement('test'), def_list.get_definition(1))
+        def_list.remove_definition(1)
+        self.assertEqual(self.definitions, def_list.get_definitions())
+        for counter in xrange(len(self.definitions)):
+            def_list.remove_definition(0)
+            self.assertEqual(self.definitions[counter + 1:],
+                             def_list.get_definitions())
+
+    def test_equality(self):
+        self.assertEqual(DefinitionList(self.definitions),
+                         DefinitionList(self.definitions))
+        self.assertNotEqual(DefinitionList(), DefinitionList(self.definitions))
+        self.assertNotEqual(DefinitionList(), 'other type')
+
+    def test_to_string(self):
+        def_list = DefinitionList(self.definitions)
+        text = '<wrap>{0}</wrap>'.format(def_list)
+        copy = DefinitionList()
+        for lxml_definition in list(etree.XML(text)):
+            copy.add_definition(Definition.from_lxml_element(lxml_definition))
+        self.assertEqual(def_list, copy)
+
 if __name__ == '__main__':
     unittest.main()



commit 0010615eede49df77e800edc331c35603434bf26
Author: Marek Aaron Sapota <maarons@gnu.org>
Date:   Thu Jul 9 21:51:14 2009 +0200

    Implemented get methods of Controller.

diff --git a/misc/py_control_client/MyServer/pycontrollib/config.py b/misc/py_control_client/MyServer/pycontrollib/config.py
new file mode 100644
index 0000000..2fd7ac9
--- /dev/null
+++ b/misc/py_control_client/MyServer/pycontrollib/config.py
@@ -0,0 +1,22 @@
+# -*- coding: utf-8 -*-
+'''
+MyServer
+Copyright (C) 2009 Free Software Foundation, Inc.
+This program 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 3 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program.  If not, see <http://www.gnu.org/licenses/>.
+'''
+
+from lxml import etree
+
+class MyServerConfig():
+    pass
diff --git a/misc/py_control_client/MyServer/pycontrollib/controller.py b/misc/py_control_client/MyServer/pycontrollib/controller.py
index e9cda37..37a0318 100644
--- a/misc/py_control_client/MyServer/pycontrollib/controller.py
+++ b/misc/py_control_client/MyServer/pycontrollib/controller.py
@@ -17,6 +17,9 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 '''
 
 from MyServer.pycontrol.pycontrol import PyMyServerControl, error_codes
+from mimetypes import MIMETypes
+from vhosts import VHosts
+from config import MyServerConfig
 
 class ServerError(Exception):
     '''Raised when MyServer return code doesn't mean success.'''
@@ -112,3 +115,15 @@ class BasicController():
         '''Put file to server.'''
         pass # not implemented
 
+class Controller(BasicController):
+    def get_MIME_type_configuration(self):
+        '''Get MIME types settings.'''
+        return MIMETypes.from_string(self.get_file('mimetypes.xml'))
+
+    def get_vhost_configuration(self):
+        '''Get VHosts settings.'''
+        return VHosts.from_string(self.get_file('virtualhosts.xml'))
+
+    def get_server_configuration(self):
+        '''Get server settings.'''
+        return MyServerConfig(self.get_file('myserver.xml'))



commit 12e27e127621f4b010d27bfdcc15f5bbb307f125
Author: Marek Aaron Sapota <maarons@gnu.org>
Date:   Thu Jul 9 21:38:41 2009 +0200

    Implemented BasicController.
    
    Not implemented put_file method.

diff --git a/misc/py_control_client/MyServer/pycontrollib/controller.py b/misc/py_control_client/MyServer/pycontrollib/controller.py
new file mode 100644
index 0000000..e9cda37
--- /dev/null
+++ b/misc/py_control_client/MyServer/pycontrollib/controller.py
@@ -0,0 +1,114 @@
+# -*- coding: utf-8 -*-
+'''
+MyServer
+Copyright (C) 2009 Free Software Foundation, Inc.
+This program 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 3 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program.  If not, see <http://www.gnu.org/licenses/>.
+'''
+
+from MyServer.pycontrol.pycontrol import PyMyServerControl, error_codes
+
+class ServerError(Exception):
+    '''Raised when MyServer return code doesn't mean success.'''
+    pass
+
+class BasicController():
+    def __init__(self, host, port, username, password):
+        self.connection = None
+        self.host = host
+        self.port = port
+        self.username = username
+        self.password = password
+
+    def __check_return_code__(self):
+        return_code = self.connection.response_code
+        if error_codes.get(return_code, '') != 'CONTROL_OK':
+            raise ServerError('MyServer returned {0}: {1}'.format(
+                    return_code, error_codes.get(return_code, '')))
+
+    def connect(self):
+        '''Connect to server.'''
+        self.disconnect()
+        self.connection = PyMyServerControl(self.host, self.port,
+                                            self.username, self.password)
+
+    def disconnect(self):
+        '''Disconnect from server.'''
+        if self.connection is not None:
+            self.connection.close()
+            self.connection = None
+
+    def reboot(self):
+        '''Reboot server.'''
+        if self.connection:
+            self.connection.send_header('REBOOT', 0)
+            self.connection.read_header()
+            self.__check_return_code__()
+
+    def version(self):
+        '''Get version string.'''
+        if self.connection:
+            self.connection.send_header('VERSION', 0)
+            self.connection.read_header()
+            self.__check_return_code__()
+            return self.connection.read()
+
+    def enable_reboot(self):
+        '''Enable server auto-reboot.'''
+        if self.connection:
+            self.connection.send_header('ENABLEREBOOT', 0)
+            self.connection.read_header()
+            self.__check_return_code__()
+
+    def disable_reboot(self):
+        '''Disable server auto-reboot.'''
+        if self.connection:
+            self.connection.send_header('DISABLEREBOOT', 0)
+            self.connection.read_header()
+            self.__check_return_code__()
+
+    def show_connections(self):
+        '''List active server connections.'''
+        if self.connection:
+            self.connection.send_header('SHOWCONNECTIONS', 0)
+            self.connection.read_header()
+            self.__check_return_code__()
+            return self.connection.read()
+
+    def kill_connection(self, num):
+        '''Kill connection to server.'''
+        if self.connection:
+            self.connection.send_header('KILLCONNECTION', 0, str(num))
+            self.connection.read_header()
+            self.__check_return_code__()
+
+    def show_language_files(self):
+        '''List available language files.'''
+        if self.connection:
+            self.connection.send_header('SHOWLANGUAGEFILES', 0)
+            self.connection.read_header()
+            self.__check_return_code__()
+            return self.connection.read()
+
+    def get_file(self, path):
+        '''Get file from server.'''
+        if self.connection:
+            self.connection.send_header('GETFILE', 0, path)
+            self.connection.read_header()
+            self.__check_return_code__()
+            return self.connection.read()
+
+    def put_file(self, local_path, remote_path):
+        '''Put file to server.'''
+        pass # not implemented
+
diff --git a/misc/py_control_client/MyServer/pycontrollib/pycontrollib.py b/misc/py_control_client/MyServer/pycontrollib/pycontrollib.py
deleted file mode 100644
index a32133c..0000000
--- a/misc/py_control_client/MyServer/pycontrollib/pycontrollib.py
+++ /dev/null
@@ -1,176 +0,0 @@
-# -*- coding: utf-8 -*-
-'''
-MyServer
-Copyright (C) 2009 Free Software Foundation, Inc.
-This program 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 3 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program.  If not, see <http://www.gnu.org/licenses/>.
-'''
-
-import socket
-from myserver.pycontrol import PyMyServerControl
-from configWrapper import VHostWrapper, make_vhost_list
-
-import sys
-
-class Controller():
-    '''High level library to control GNU MyServer. Every method returns True
-    or requested data on success and False on error.'''
-    class Parser():
-        '''Parse command output.'''
-        def connections(self, lines): # TODO: split lines to dicts
-            '''Parse data returned by SHOWCONNECTIONS command.'''
-            l = []
-            for line in lines.splitlines():
-                parts = line.split(' - ')
-                l.append(dict(zip(['id', 'client_ip', 'client_port',
-                    'server_ip', 'server_port', '?a', '?b'], parts)))
-            return l
-
-        def language_files(self, lines):
-            '''Parse data returned by SHOWLANGUAGEFILES command.'''
-            return lines.splitlines()
-
-    def __init__(self, host, port, username, password):
-        self.connection = None
-        self.parser = self.Parser()
-        self.host = host
-        self.port = port
-        self.username = username
-        self.password = password
-        self.response_code = 100
-
-    def get_response_code(self):
-        '''Get response code of last issued command.'''
-        return self.response_code
-
-    def connect(self):
-        '''Connect to server.'''
-        self.disconnect()
-        try:
-            self.connection = PyMyServerControl(self.host, self.port,
-                self.username, self.password)
-        except socket.error:
-            return False
-        return True
-
-    def disconnect(self):
-        '''Disconnect from server.'''
-        if self.connection:
-            self.connection.close()
-            self.connection = None
-        return True
-
-    def reboot(self):
-        '''Reboot server.'''
-        if self.connection:
-            self.connection.send_header('REBOOT', 0)
-            self.connection.read_header()
-            self.response_code = self.connection.response_code
-            if self.response_code != '100':
-                return False
-            return True
-        else:
-            return False
-
-    def version(self):
-        '''Get version string.'''
-        if self.connection:
-            self.connection.send_header('VERSION', 0)
-            self.connection.read_header()
-            self.response_code = self.connection.response_code
-            if self.response_code != '100':
-                return False
-            return self.connection.read()
-        else:
-            return False
-
-    def enable_reboot(self):
-        '''Enable server auto-reboot.'''
-        if self.connection:
-            self.connection.send_header('ENABLEREBOOT', 0)
-            self.connection.read_header()
-            self.response_code = self.connection.response_code
-            if self.response_code != '100':
-                return False
-            return True
-        else:
-            return False
-
-    def disable_reboot(self):
-        '''Disable server auto-reboot.'''
-        if self.connection:
-            self.connection.send_header('DISABLEREBOOT', 0)
-            self.connection.read_header()
-            self.response_code = self.connection.response_code
-            if self.response_code != '100':
-                return False
-            return True
-        else:
-            return False
-
-    def show_connections(self):
-        '''List active server connections.'''
-        if self.connection:
-            self.connection.send_header('SHOWCONNECTIONS', 0)
-            self.connection.read_header()
-            self.response_code = self.connection.response_code
-            if self.response_code != '100':
-                return False
-            return self.parser.connections(self.connection.read())
-        else:
-            return False
-
-    def kill_connection(self, num):
-        '''Kill connection to server.'''
-        if self.connection:
-            self.connection.send_header('KILLCONNECTION', 0, str(num))
-            self.connection.read_header()
-            self.response_code = self.connection.response_code
-            if self.response_code != '100':
-                return False
-            return True
-        else:
-            return False
-
-    def show_language_files(self):
-        '''List available language files.'''
-        if self.connection:
-            self.connection.send_header('SHOWLANGUAGEFILES', 0)
-            self.connection.read_header()
-            self.response_code = self.connection.response_code
-            if self.response_code != '100':
-                return False
-            return self.parser.language_files(self.connection.read())
-        else:
-            return False
-
-    def get_file(self, file_name):
-        '''Get file from server.'''
-        if self.connection:
-            self.connection.send_header('GETFILE', 0, file_name)
-            self.connection.read_header()
-            self.response_code = self.connection.response_code
-            if self.response_code != '100':
-                return False
-            return self.connection.read()
-        else:
-            return False
-
-    def get_vhost_configuration(self):
-        '''Get virtual hosts configuration wrapped in list of VHostWrapper
-        objects.'''
-        text = self.get_file('virtualhosts.xml')
-        if text is not False:
-            return make_vhost_list(text)
-        return False
-



commit a4b940249c6c161fc18274ddef85ef34785f0a6e
Author: Marek Aaron Sapota <maarons@gnu.org>
Date:   Thu Jul 9 20:18:56 2009 +0200

    Split vhost  to/from string/lxml tests.

diff --git a/misc/py_control_client/MyServer/pycontrollib/test/vhost_test.py b/misc/py_control_client/MyServer/pycontrollib/test/vhost_test.py
index 8a7989e..28b0eee 100644
--- a/misc/py_control_client/MyServer/pycontrollib/test/vhost_test.py
+++ b/misc/py_control_client/MyServer/pycontrollib/test/vhost_test.py
@@ -199,95 +199,267 @@ class VHostTest(unittest.TestCase):
         self.assertNotEqual(vhost_0, [])
 
     def test_from_string(self):
+        text = '<VHOST />'
+        vhost = VHost.from_string(text)
+        right = VHost()
+        self.assertEqual(vhost, right)
+
+    def test_from_string_name(self):
+        text = '<VHOST><NAME>test vhost</NAME></VHOST>'
+        vhost = VHost.from_string(text)
+        right = VHost('test vhost')
+        self.assertEqual(vhost, right)
+
+    def test_from_string_port(self):
+        text = '<VHOST><PORT>80</PORT></VHOST>'
+        vhost = VHost.from_string(text)
+        right = VHost(port = 80)
+        self.assertEqual(vhost, right)
+
+    def test_from_string_protocol(self):
+        text = '<VHOST><PROTOCOL>HTTP</PROTOCOL></VHOST>'
+        vhost = VHost.from_string(text)
+        right = VHost(protocol = 'HTTP')
+        self.assertEqual(vhost, right)
+
+    def test_from_string_doc_root(self):
+        text = '<VHOST><DOCROOT>/www</DOCROOT></VHOST>'
+        vhost = VHost.from_string(text)
+        right = VHost(doc_root = '/www')
+        self.assertEqual(vhost, right)
+
+    def test_from_string_sys_folder(self):
+        text = '<VHOST><SYSFOLDER>/system</SYSFOLDER></VHOST>'
+        vhost = VHost.from_string(text)
+        right = VHost(sys_folder = '/system')
+        self.assertEqual(vhost, right)
+
+    def test_from_string_logs(self):
+        text = '<VHOST><ACCESSLOG /><SOMELOG /></VHOST>'
+        vhost = VHost.from_string(text)
+        right = VHost(logs = [Log('ACCESSLOG'), Log('SOMELOG')])
+        self.assertEqual(vhost, right)
+
+    def test_from_string_ip(self):
+        text = '<VHOST><IP>127.0.0.0/8</IP></VHOST>'
+        vhost = VHost.from_string(text)
+        right = VHost(ip = ['127.0.0.0/8'])
+        self.assertEqual(vhost, right)
+
+    def test_from_string_host(self):
+        text = '<VHOST><HOST useRegex="YES">.*</HOST><HOST>a.org</HOST></VHOST>'
+        vhost = VHost.from_string(text)
+        right = VHost(host = {'.*': True, 'a.org': None})
+        self.assertEqual(vhost, right)
+
+    def test_from_string_full(self):
         text = '''<VHOST>
   <NAME>test vhost</NAME>
   <PORT>80</PORT>
-  <IP>127.0.0.0/8</IP>
-  <IP>192.168.0.0/16</IP>
   <PROTOCOL>HTTP</PROTOCOL>
   <DOCROOT>/www</DOCROOT>
   <SYSFOLDER>/system</SYSFOLDER>
-  <HOST useRegex="YES">host.domain</HOST>
-  <HOST>test.domain</HOST>
   <ACCESSLOG />
   <WARNINGLOG />
-</VHOST>'''
-        vhost = VHost.from_string(text)
-        self.assertEqual(vhost, VHost('test vhost', 80, 'HTTP', '/www', '/system',
-                                      [Log('ACCESSLOG'), Log('WARNINGLOG')],
-                                      ['127.0.0.0/8', '192.168.0.0/16'],
-                                      {'host.domain': True, 'test.domain': None}))
-
-    def test_from_lxml(self):
-        text = '''<VHOST>
-  <NAME>test vhost</NAME>
-  <PORT>80</PORT>
   <IP>127.0.0.0/8</IP>
   <IP>192.168.0.0/16</IP>
-  <PROTOCOL>HTTP</PROTOCOL>
-  <DOCROOT>/www</DOCROOT>
-  <SYSFOLDER>/system</SYSFOLDER>
   <HOST useRegex="YES">host.domain</HOST>
   <HOST>test.domain</HOST>
-  <ACCESSLOG />
-  <WARNINGLOG />
 </VHOST>'''
+        vhost = VHost.from_string(text)
+        right = VHost('test vhost', 80, 'HTTP', '/www', '/system',
+                      [Log('ACCESSLOG'), Log('WARNINGLOG')],
+                      ['127.0.0.0/8', '192.168.0.0/16'],
+                      {'host.domain': True, 'test.domain': None})
+        self.assertEqual(vhost, right)
+
+    def test_from_lxml(self):
+        text = '<VHOST />'
         vhost = VHost.from_lxml_element(etree.XML(text))
-        self.assertEqual(vhost, VHost('test vhost', 80, 'HTTP', '/www', '/system',
-                                 [Log('ACCESSLOG'), Log('WARNINGLOG')],
-                                 ['127.0.0.0/8', '192.168.0.0/16'],
-                                 {'host.domain': True, 'test.domain': None}))
+        right = VHost()
+        self.assertEqual(vhost, right)
 
-    def test_to_string(self):
+    def test_from_lxml_name(self):
+        text = '<VHOST><NAME>test vhost</NAME></VHOST>'
+        vhost = VHost.from_lxml_element(etree.XML(text))
+        right = VHost('test vhost')
+        self.assertEqual(vhost, right)
+
+    def test_from_lxml_port(self):
+        text = '<VHOST><PORT>80</PORT></VHOST>'
+        vhost = VHost.from_lxml_element(etree.XML(text))
+        right = VHost(port = 80)
+        self.assertEqual(vhost, right)
+
+    def test_from_lxml_protocol(self):
+        text = '<VHOST><PROTOCOL>HTTP</PROTOCOL></VHOST>'
+        vhost = VHost.from_lxml_element(etree.XML(text))
+        right = VHost(protocol = 'HTTP')
+        self.assertEqual(vhost, right)
+
+    def test_from_lxml_doc_root(self):
+        text = '<VHOST><DOCROOT>/www</DOCROOT></VHOST>'
+        vhost = VHost.from_lxml_element(etree.XML(text))
+        right = VHost(doc_root = '/www')
+        self.assertEqual(vhost, right)
+
+    def test_from_lxml_sys_folder(self):
+        text = '<VHOST><SYSFOLDER>/system</SYSFOLDER></VHOST>'
+        vhost = VHost.from_lxml_element(etree.XML(text))
+        right = VHost(sys_folder = '/system')
+        self.assertEqual(vhost, right)
+
+    def test_from_lxml_logs(self):
+        text = '<VHOST><ACCESSLOG /><SOMELOG /></VHOST>'
+        vhost = VHost.from_lxml_element(etree.XML(text))
+        right = VHost(logs = [Log('ACCESSLOG'), Log('SOMELOG')])
+        self.assertEqual(vhost, right)
+
+    def test_from_lxml_ip(self):
+        text = '<VHOST><IP>127.0.0.0/8</IP></VHOST>'
+        vhost = VHost.from_lxml_element(etree.XML(text))
+        right = VHost(ip = ['127.0.0.0/8'])
+        self.assertEqual(vhost, right)
+
+    def test_from_lxml_host(self):
+        text = '<VHOST><HOST useRegex="YES">.*</HOST><HOST>a.org</HOST></VHOST>'
+        vhost = VHost.from_lxml_element(etree.XML(text))
+        right = VHost(host = {'.*': True, 'a.org': None})
+        self.assertEqual(vhost, right)
+
+    def test_from_lxml_full(self):
         text = '''<VHOST>
   <NAME>test vhost</NAME>
   <PORT>80</PORT>
-  <IP>127.0.0.0/8</IP>
-  <IP>192.168.0.0/16</IP>
   <PROTOCOL>HTTP</PROTOCOL>
   <DOCROOT>/www</DOCROOT>
   <SYSFOLDER>/system</SYSFOLDER>
-  <HOST useRegex="YES">host.domain</HOST>
-  <HOST>test.domain</HOST>
   <ACCESSLOG />
   <WARNINGLOG />
-</VHOST>'''
-        vhost = VHost.from_string(text)
-        copy = VHost.from_string(str(vhost))
-        self.assertEqual(vhost, copy)
-
-    def test_to_lxml(self):
-        text = '''<VHOST>
-  <NAME>test vhost</NAME>
-  <PORT>80</PORT>
   <IP>127.0.0.0/8</IP>
   <IP>192.168.0.0/16</IP>
-  <PROTOCOL>HTTP</PROTOCOL>
-  <DOCROOT>/www</DOCROOT>
-  <SYSFOLDER>/system</SYSFOLDER>
   <HOST useRegex="YES">host.domain</HOST>
   <HOST>test.domain</HOST>
-  <ACCESSLOG />
-  <WARNINGLOG />
 </VHOST>'''
-        vhost = VHost.from_string(text)
-        copy = VHost.from_lxml_element(vhost.to_lxml_element())
-        self.assertEqual(vhost, copy)
+        vhost = VHost.from_lxml_element(etree.XML(text))
+        right = VHost('test vhost', 80, 'HTTP', '/www', '/system',
+                      [Log('ACCESSLOG'), Log('WARNINGLOG')],
+                      ['127.0.0.0/8', '192.168.0.0/16'],
+                      {'host.domain': True, 'test.domain': None})
+        self.assertEqual(vhost, right)
 
     def test_bad_root_tag(self):
-        text = '''<ERROR>
-  <NAME>test vhost</NAME>
-  <PORT>80</PORT>
-  <PROTOCOL>HTTP</PROTOCOL>
-  <DOCROOT>/www</DOCROOT>
-  <SYSFOLDER>/system</SYSFOLDER>
-  <ACCESSLOG />
-  <WARNINGLOG />
-</ERROR>'''
+        text = '<ERROR />'
         self.assertRaises(AttributeError, VHost.from_string, text)
         self.assertRaises(AttributeError, VHost.from_lxml_element,
                           etree.XML(text))
 
+    def test_to_string(self):
+        vhost = VHost()
+        copy = VHost.from_string(str(vhost))
+        self.assertEqual(vhost, copy)
+
+    def test_to_string_name(self):
+        vhost = VHost('test vhost')
+        copy = VHost.from_string(str(vhost))
+        self.assertEqual(vhost, copy)
+
+    def test_to_string_port(self):
+        vhost = VHost(port = 80)
+        copy = VHost.from_string(str(vhost))
+        self.assertEqual(vhost, copy)
+
+    def test_to_string_protocol(self):
+        vhost = VHost(protocol = 'HTTP')
+        copy = VHost.from_string(str(vhost))
+        self.assertEqual(vhost, copy)
+
+    def test_to_string_doc_root(self):
+        vhost = VHost(doc_root = '/www')
+        copy = VHost.from_string(str(vhost))
+        self.assertEqual(vhost, copy)
+
+    def test_to_string_sys_folder(self):
+        vhost = VHost(doc_root = '/system')
+        copy = VHost.from_string(str(vhost))
+        self.assertEqual(vhost, copy)
+
+    def test_to_string_logs(self):
+        vhost = VHost(logs = [Log('ACCESSLOG'), Log('SOMELOG')])
+        copy = VHost.from_string(str(vhost))
+        self.assertEqual(vhost, copy)
+
+    def test_to_string_ip(self):
+        vhost = VHost(ip = ['127.0.0.0/8'])
+        copy = VHost.from_string(str(vhost))
+        self.assertEqual(vhost, copy)
+
+    def test_to_string_host(self):
+        vhost = VHost(host = {'.*': True, 'a.org': None})
+        copy = VHost.from_string(str(vhost))
+        self.assertEqual(vhost, copy)
+
+    def test_to_string_full(self):
+        vhost = VHost('test vhost', 80, 'HTTP', '/www', '/system',
+                      [Log('ACCESSLOG'), Log('WARNINGLOG')],
+                      ['127.0.0.0/8', '192.168.0.0/16'],
+                      {'host.domain': True, 'test.domain': None})
+        copy = VHost.from_string(str(vhost))
+        self.assertEqual(vhost, copy)
+
+    def test_to_lxml(self):
+        vhost = VHost()
+        copy = VHost.from_lxml_element(vhost.to_lxml_element())
+        self.assertEqual(vhost, copy)
+
+    def test_to_lxml_name(self):
+        vhost = VHost('test vhost')
+        copy = VHost.from_lxml_element(vhost.to_lxml_element())
+        self.assertEqual(vhost, copy)
+
+    def test_to_lxml_port(self):
+        vhost = VHost(port = 80)
+        copy = VHost.from_lxml_element(vhost.to_lxml_element())
+        self.assertEqual(vhost, copy)
+
+    def test_to_lxml_protocol(self):
+        vhost = VHost(protocol = 'HTTP')
+        copy = VHost.from_lxml_element(vhost.to_lxml_element())
+        self.assertEqual(vhost, copy)
+
+    def test_to_lxml_doc_root(self):
+        vhost = VHost(doc_root = '/www')
+        copy = VHost.from_lxml_element(vhost.to_lxml_element())
+        self.assertEqual(vhost, copy)
+
+    def test_to_lxml_sys_folder(self):
+        vhost = VHost(doc_root = '/system')
+        copy = VHost.from_lxml_element(vhost.to_lxml_element())
+        self.assertEqual(vhost, copy)
+
+    def test_to_lxml_logs(self):
+        vhost = VHost(logs = [Log('ACCESSLOG'), Log('SOMELOG')])
+        copy = VHost.from_lxml_element(vhost.to_lxml_element())
+        self.assertEqual(vhost, copy)
+
+    def test_to_lxml_ip(self):
+        vhost = VHost(ip = ['127.0.0.0/8'])
+        copy = VHost.from_lxml_element(vhost.to_lxml_element())
+        self.assertEqual(vhost, copy)
+
+    def test_to_lxml_host(self):
+        vhost = VHost(host = {'.*': True, 'a.org': None})
+        copy = VHost.from_lxml_element(vhost.to_lxml_element())
+        self.assertEqual(vhost, copy)
+
+    def test_to_lxml_full(self):
+        vhost = VHost('test vhost', 80, 'HTTP', '/www', '/system',
+                      [Log('ACCESSLOG'), Log('WARNINGLOG')],
+                      ['127.0.0.0/8', '192.168.0.0/16'],
+                      {'host.domain': True, 'test.domain': None})
+        copy = VHost.from_lxml_element(vhost.to_lxml_element())
+        self.assertEqual(vhost, copy)
+
 class VHostsTest(unittest.TestCase):
     def setUp(self):
         self.vhost_0 = VHost('vhost 0', 80, 'HTTP', '/www', '/system',



commit 212e40c400279374b006dc3f321e71ab4e41cc13
Author: Marek Aaron Sapota <maarons@gnu.org>
Date:   Thu Jul 9 19:42:50 2009 +0200

    Made VHost class more flexible.
    
    All attributes are optional, logs are not restricted to access log and
    warning log.

diff --git a/misc/py_control_client/MyServer/pycontrollib/test/vhost_test.py b/misc/py_control_client/MyServer/pycontrollib/test/vhost_test.py
index b8979d3..8a7989e 100644
--- a/misc/py_control_client/MyServer/pycontrollib/test/vhost_test.py
+++ b/misc/py_control_client/MyServer/pycontrollib/test/vhost_test.py
@@ -23,95 +23,89 @@ from lxml import etree
 
 class VHostTest(unittest.TestCase):
     def test_creation(self):
+        vhost = VHost()
+        vhost = VHost('test vhost')
+        vhost = VHost('test vhost', 80)
+        vhost = VHost('test vhost', 80, 'HTTP')
+        vhost = VHost('test vhost', 80, 'HTTP', '/www')
+        vhost = VHost('test vhost', 80, 'HTTP', '/www', '/system')
         vhost = VHost('test vhost', 80, 'HTTP', '/www', '/system',
-                      Log('ACCESSLOG'), Log('WARNINGLOG'))
+                      [Log('ACCESSLOG'), Log('WARNINGLOG')])
         vhost = VHost('test vhost', 80, 'HTTP', '/www', '/system',
-                      Log('ACCESSLOG'), Log('WARNINGLOG'),
+                      [Log('ACCESSLOG'), Log('WARNINGLOG')],
                       ['127.0.0.0/8', '192.168.0.0/16'])
         vhost = VHost('test vhost', 80, 'HTTP', '/www', '/system',
-                      Log('ACCESSLOG'), Log('WARNINGLOG'),
+                      [Log('ACCESSLOG'), Log('WARNINGLOG')],
                       ['127.0.0.0/8', '192.168.0.0/16'],
                       {'host.domain': None})
 
     def test_name(self):
-        vhost = VHost('test vhost', 80, 'HTTP', '/www', '/system',
-                      Log('ACCESSLOG'), Log('WARNINGLOG'))
+        vhost = VHost('test vhost')
         self.assertEqual('test vhost', vhost.get_name())
         vhost.set_name('vhost')
         self.assertEqual('vhost', vhost.get_name())
-        self.assertRaises(AttributeError, vhost.set_name, None)
-        self.assertRaises(AttributeError, VHost, None, 80, 'HTTP',
-                          '/www', '/system', Log('ACCESSLOG'), Log('WARNINGLOG'))
+        vhost.set_name(None)
+        self.assertEqual(None, vhost.get_name())
+        vhost = VHost(name = 'test vhost')
+        self.assertEqual('test vhost', vhost.get_name())
 
     def test_port(self):
-        vhost = VHost('test vhost', 80, 'HTTP', '/www', '/system',
-                      Log('ACCESSLOG'), Log('WARNINGLOG'))
+        vhost = VHost('test vhost', 80)
         self.assertEqual(80, vhost.get_port())
         vhost.set_port(8080)
         self.assertEqual(8080, vhost.get_port())
-        self.assertRaises(AttributeError, vhost.set_port, None)
-        self.assertRaises(AttributeError, VHost, 'test vhost', None, 'HTTP',
-                          '/www', '/system', Log('ACCESSLOG'), Log('WARNINGLOG'))
+        vhost.set_port(None)
+        self.assertEqual(None, vhost.get_port())
+        vhost = VHost(port = 80)
+        self.assertEqual(80, vhost.get_port())
 
     def test_protocol(self):
-        vhost = VHost('test vhost', 80, 'HTTP', '/www', '/system',
-                      Log('ACCESSLOG'), Log('WARNINGLOG'))
+        vhost = VHost('test vhost', 80, 'HTTP')
         self.assertEqual('HTTP', vhost.get_protocol())
-        vhost.set_protocol('HTTPS')
-        self.assertEqual('HTTPS', vhost.get_protocol())
         vhost.set_protocol('NEW PROTOCOL')
         self.assertEqual('NEW PROTOCOL', vhost.get_protocol())
-        self.assertRaises(AttributeError, vhost.set_protocol, None)
-        self.assertRaises(AttributeError, VHost, 'test vhost', 80, None, '/www',
-                          '/system', Log('ACCESSLOG'), Log('WARNINGLOG'))
+        vhost.set_protocol(None)
+        self.assertEqual(None, vhost.get_protocol())
+        vhost = VHost(protocol = 'HTTP')
+        self.assertEqual('HTTP', vhost.get_protocol())
 
     def test_doc_root(self):
-        vhost = VHost('test vhost', 80, 'HTTP', '/www', '/system',
-                      Log('ACCESSLOG'), Log('WARNINGLOG'))
+        vhost = VHost('test vhost', 80, 'HTTP', '/www')
         self.assertEqual('/www', vhost.get_doc_root())
         vhost.set_doc_root('/var/www')
         self.assertEqual('/var/www', vhost.get_doc_root())
-        self.assertRaises(AttributeError, vhost.set_doc_root, None)
-        self.assertRaises(AttributeError, VHost, 'test vhost', 80, 'HTTP',
-                          None, '/system', Log('ACCESSLOG'), Log('WARNINGLOG'))
+        vhost.set_doc_root(None)
+        self.assertEqual(None, vhost.get_doc_root())
+        vhost = VHost(doc_root = '/www')
+        self.assertEqual('/www', vhost.get_doc_root())
 
     def test_sys_folder(self):
-        vhost = VHost('test vhost', 80, 'HTTP', '/www', '/system',
-                      Log('ACCESSLOG'), Log('WARNINGLOG'))
+        vhost = VHost('test vhost', 80, 'HTTP', '/www', '/system')
         self.assertEqual('/system', vhost.get_sys_folder())
         vhost.set_sys_folder('/var/system')
         self.assertEqual('/var/system', vhost.get_sys_folder())
-        self.assertRaises(AttributeError, vhost.set_sys_folder, None)
-        self.assertRaises(AttributeError, VHost, 'test vhost', 80, 'HTTP',
-                          '/www', None, Log('ACCESSLOG'), Log('WARNINGLOG'))
+        vhost.set_sys_folder(None)
+        self.assertEqual(None, vhost.get_sys_folder())
+        vhost = VHost(sys_folder = '/system')
+        self.assertEqual('/system', vhost.get_sys_folder())
 
-    def test_log(self):
-        vhost = VHost('test vhost', 80, 'HTTP', '/www', '/system',
-                      Log('ACCESSLOG'), Log('WARNINGLOG'))
-        self.assertEqual(Log('ACCESSLOG'), vhost.get_access_log())
-        self.assertEqual(Log('WARNINGLOG'), vhost.get_warning_log())
-        vhost.set_access_log(Log('ACCESSLOG', type = 'combined'))
-        vhost.set_warning_log(Log('WARNINGLOG', type = 'combined'))
-        self.assertEqual(Log('ACCESSLOG', type = 'combined'),
-                         vhost.get_access_log())
-        self.assertEqual(Log('WARNINGLOG', type = 'combined'),
-                         vhost.get_warning_log())
-        self.assertRaises(AttributeError, vhost.set_access_log, None)
-        self.assertRaises(AttributeError, vhost.set_warning_log, None)
-        self.assertRaises(AttributeError, vhost.set_access_log, Log('ERROR'))
-        self.assertRaises(AttributeError, vhost.set_warning_log, Log('ERROR'))
-        self.assertRaises(AttributeError, VHost, 'test vhost', 80, 'HTTP',
-                          '/www', '/system', None, Log('WARNINGLOG'))
-        self.assertRaises(AttributeError, VHost, 'test vhost', 80, 'HTTP',
-                          '/www', '/system', Log('ACCESSLOG'), None)
-        self.assertRaises(AttributeError, VHost, 'test vhost', 80, 'HTTP',
-                          '/www', '/system', Log('ERROR'), Log('WARNINGLOG'))
-        self.assertRaises(AttributeError, VHost, 'test vhost', 80, 'HTTP',
-                          '/www', '/system', Log('ACCESSLOG'), Log('ERROR'))
+    def test_logs(self):
+        a_log = Log('ACCESSLOG')
+        w_log = Log('WARNINGLOG')
+        vhost = VHost('test vhost', 80, 'HTTP', '/www', '/system', [a_log, w_log])
+        self.assertEqual([a_log, w_log], vhost.get_logs())
+        vhost.add_log(a_log)
+        self.assertEqual([a_log, w_log, a_log], vhost.get_logs())
+        vhost.remove_log(0)
+        self.assertEqual([w_log, a_log], vhost.get_logs())
+        vhost.add_log(w_log, 0)
+        self.assertEqual([w_log, w_log, a_log], vhost.get_logs())
+        vhost = VHost(logs = [a_log, w_log])
+        self.assertEqual([a_log, w_log], vhost.get_logs())
 
     def test_ip(self):
         vhost = VHost('test vhost', 80, 'HTTP', '/www', '/system',
-                      Log('ACCESSLOG'), Log('WARNINGLOG'))
+                      [Log('ACCESSLOG')])
         self.assertEqual(set(), vhost.get_ip())
         vhost.add_ip('10.0.0.0/8')
         vhost.add_ip('192.168.0.0/16')
@@ -119,17 +113,17 @@ class VHostTest(unittest.TestCase):
         vhost.remove_ip('10.0.0.0/8')
         self.assertEqual(set(['192.168.0.0/16']), vhost.get_ip())
         vhost = VHost('test vhost', 80, 'HTTP', '/www', '/system',
-                      Log('ACCESSLOG'), Log('WARNINGLOG'),
+                      [Log('ACCESSLOG'), Log('WARNINGLOG')],
                       ['127.0.0.0/8', '192.168.0.0/16'])
         self.assertEqual(set(['127.0.0.0/8', '192.168.0.0/16']), vhost.get_ip())
         vhost = VHost('test vhost', 80, 'HTTP', '/www', '/system',
-                      Log('ACCESSLOG'), Log('WARNINGLOG'),
+                      [Log('ACCESSLOG'), Log('WARNINGLOG')],
                       ip = ['127.0.0.0/8', '192.168.0.0/16'])
         self.assertEqual(set(['127.0.0.0/8', '192.168.0.0/16']), vhost.get_ip())
 
     def test_host(self):
         vhost = VHost('test vhost', 80, 'HTTP', '/www', '/system',
-                      Log('ACCESSLOG'), Log('WARNINGLOG'))
+                      [Log('ACCESSLOG')])
         self.assertEqual({}, vhost.get_host())
         vhost.add_host('foo.bar.com', False)
         vhost.add_host('test.me.org')
@@ -138,67 +132,67 @@ class VHostTest(unittest.TestCase):
         vhost.remove_host('foo.bar.com')
         self.assertEqual({'test.me.org': None}, vhost.get_host())
         vhost = VHost('test vhost', 80, 'HTTP', '/www', '/system',
-                      Log('ACCESSLOG'), Log('WARNINGLOG'),
+                      [Log('ACCESSLOG'), Log('WARNINGLOG')],
                       ['127.0.0.0/8', '192.168.0.0/16'],
                       {'test.me.org': None})
         self.assertEqual({'test.me.org': None}, vhost.get_host())
         vhost = VHost('test vhost', 80, 'HTTP', '/www', '/system',
-                      Log('ACCESSLOG'), Log('WARNINGLOG'),
+                      [Log('ACCESSLOG'), Log('WARNINGLOG')],
                       host = {'test.me.org': None})
         self.assertEqual({'test.me.org': None}, vhost.get_host())
 
     def test_equality(self):
         vhost_0 = VHost('test vhost', 80, 'HTTP', '/www', '/system',
-                        Log('ACCESSLOG'), Log('WARNINGLOG'),
+                        [Log('ACCESSLOG'), Log('WARNINGLOG')],
                         ['127.0.0.0/8', '192.168.0.0/16'],
                         {'host.domain': None})
         vhost_1 = VHost('test vhost', 80, 'HTTP', '/www', '/system',
-                        Log('ACCESSLOG'), Log('WARNINGLOG'),
+                        [Log('ACCESSLOG'), Log('WARNINGLOG')],
                         ['127.0.0.0/8', '192.168.0.0/16'],
                         {'host.domain': None})
         self.assertEqual(vhost_0, vhost_1)
         vhost_1 = VHost('different', 80, 'HTTP', '/www', '/system',
-                        Log('ACCESSLOG'), Log('WARNINGLOG'),
+                        [Log('ACCESSLOG'), Log('WARNINGLOG')],
                         ['127.0.0.0/8', '192.168.0.0/16'],
                         {'host.domain': None})
         self.assertNotEqual(vhost_0, vhost_1)
         vhost_1 = VHost('test vhost', 81, 'HTTP', '/www', '/system',
-                        Log('ACCESSLOG'), Log('WARNINGLOG'),
+                        [Log('ACCESSLOG'), Log('WARNINGLOG')],
                         ['127.0.0.0/8', '192.168.0.0/16'],
                         {'host.domain': None})
         self.assertNotEqual(vhost_0, vhost_1)
         vhost_1 = VHost('test_vhost', 80, 'HTTPS', '/www', '/system',
-                        Log('ACCESSLOG'), Log('WARNINGLOG'),
+                        [Log('ACCESSLOG'), Log('WARNINGLOG')],
                         ['127.0.0.0/8', '192.168.0.0/16'],
                         {'host.domain': None})
         self.assertNotEqual(vhost_0, vhost_1)
         vhost_1 = VHost('test vhost', 80, 'HTTP', '/var/www', '/system',
-                        Log('ACCESSLOG'), Log('WARNINGLOG'),
+                        [Log('ACCESSLOG'), Log('WARNINGLOG')],
                         ['127.0.0.0/8', '192.168.0.0/16'],
                         {'host.domain': None})
         self.assertNotEqual(vhost_0, vhost_1)
         vhost_1 = VHost('test vhost', 80, 'HTTP', '/www', '/var/system',
-                        Log('ACCESSLOG'), Log('WARNINGLOG'),
+                        [Log('ACCESSLOG'), Log('WARNINGLOG')],
                         ['127.0.0.0/8', '192.168.0.0/16'],
                         {'host.domain': None})
         self.assertNotEqual(vhost_0, vhost_1)
         vhost_1 = VHost('test vhost', 80, 'HTTP', '/www', '/system',
-                        Log('ACCESSLOG', type = 'combined'), Log('WARNINGLOG'),
+                        [Log('ACCESSLOG', type = 'combined'), Log('WARNINGLOG')],
                         ['127.0.0.0/8', '192.168.0.0/16'],
                         {'host.domain': None})
         self.assertNotEqual(vhost_0, vhost_1)
         vhost_1 = VHost('test vhost', 80, 'HTTP', '/www', '/system',
-                        Log('ACCESSLOG'), Log('WARNINGLOG', type = 'combined'),
+                        [Log('ACCESSLOG'), Log('WARNINGLOG', type = 'combined')],
                         ['127.0.0.0/8', '192.168.0.0/16'],
                         {'host.domain': None})
         self.assertNotEqual(vhost_0, vhost_1)
         vhost_1 = VHost('test vhost', 80, 'HTTP', '/www', '/system',
-                        Log('ACCESSLOG'), Log('WARNINGLOG'),
+                        [Log('ACCESSLOG'), Log('WARNINGLOG')],
                         ['127.0.0.0/24', '192.168.0.0/16'],
                         {'host.domain': None})
         self.assertNotEqual(vhost_0, vhost_1)
         vhost_1 = VHost('test vhost', 80, 'HTTP', '/www', '/system',
-                        Log('ACCESSLOG'), Log('WARNINGLOG'),
+                        [Log('ACCESSLOG'), Log('WARNINGLOG')],
                         ['127.0.0.0/8', '192.168.0.0/16'],
                         {'host.domain': True})
         self.assertNotEqual(vhost_0, vhost_1)
@@ -220,7 +214,7 @@ class VHostTest(unittest.TestCase):
 </VHOST>'''
         vhost = VHost.from_string(text)
         self.assertEqual(vhost, VHost('test vhost', 80, 'HTTP', '/www', '/system',
-                                      Log('ACCESSLOG'), Log('WARNINGLOG'),
+                                      [Log('ACCESSLOG'), Log('WARNINGLOG')],
                                       ['127.0.0.0/8', '192.168.0.0/16'],
                                       {'host.domain': True, 'test.domain': None}))
 
@@ -240,7 +234,7 @@ class VHostTest(unittest.TestCase):
 </VHOST>'''
         vhost = VHost.from_lxml_element(etree.XML(text))
         self.assertEqual(vhost, VHost('test vhost', 80, 'HTTP', '/www', '/system',
-                                 Log('ACCESSLOG'), Log('WARNINGLOG'),
+                                 [Log('ACCESSLOG'), Log('WARNINGLOG')],
                                  ['127.0.0.0/8', '192.168.0.0/16'],
                                  {'host.domain': True, 'test.domain': None}))
 
@@ -297,11 +291,11 @@ class VHostTest(unittest.TestCase):
 class VHostsTest(unittest.TestCase):
     def setUp(self):
         self.vhost_0 = VHost('vhost 0', 80, 'HTTP', '/www', '/system',
-                             Log('ACCESSLOG'), Log('WARNINGLOG'),
+                             [Log('ACCESSLOG'), Log('WARNINGLOG')],
                              ['127.0.0.0/8', '192.168.0.0/16'],
                              {'host.domain': True, 'test.domain': None})
         self.vhost_1 = VHost('vhost 1', 443, 'HTTPS', '/www', '/system',
-                             Log('ACCESSLOG'), Log('WARNINGLOG'))
+                             [Log('ACCESSLOG'), Log('WARNINGLOG')])
         self.text = '<VHOSTS>{0}{1}</VHOSTS>'.format(str(self.vhost_0),
                                                      str(self.vhost_1))
 
diff --git a/misc/py_control_client/MyServer/pycontrollib/vhost.py b/misc/py_control_client/MyServer/pycontrollib/vhost.py
index 568b902..cfa1cb0 100644
--- a/misc/py_control_client/MyServer/pycontrollib/vhost.py
+++ b/misc/py_control_client/MyServer/pycontrollib/vhost.py
@@ -20,19 +20,20 @@ from lxml import etree
 from log import Log
 
 class VHost():
-    def __init__(self, name, port, protocol, doc_root, sys_folder, access_log,
-                 warning_log, ip = [], host = {}):
-        '''Create new instance of VHost. access_log and warning_log are expected
-        to be instances of MyServer.pycontrollib.log.Log class. ip is expected
-        to be a collection and host is expected to be a dict {name: useRegex}
-        where None means not set.'''
+    def __init__(self, name = None, port = None, protocol = None,
+                 doc_root = None, sys_folder = None, logs = [],
+                 ip = [], host = {}):
+        '''Create new instance of VHost. logs and ip are expected to be a
+        collection and host is expected to be a dict {name: useRegex} where None
+        means not set.'''
         self.set_name(name)
         self.set_port(port)
         self.set_protocol(protocol)
         self.set_doc_root(doc_root)
         self.set_sys_folder(sys_folder)
-        self.set_access_log(access_log)
-        self.set_warning_log(warning_log)
+        self.logs = []
+        for log in logs:
+            self.add_log(log)
         self.ip = set()
         for ip_address in ip:
             self.add_ip(ip_address)
@@ -45,8 +46,7 @@ class VHost():
             self.port == other.port and self.protocol == other.protocol and \
             self.doc_root == other.doc_root and \
             self.sys_folder == other.sys_folder and \
-            self.access_log == other.access_log and \
-            self.warning_log == other.warning_log and self.ip == other.ip and \
+            self.logs == other.logs and self.ip == other.ip and \
             self.host == other.host
 
     def get_name(self):
@@ -55,8 +55,6 @@ class VHost():
 
     def set_name(self, name):
         '''Set VHost name.'''
-        if name is None:
-            raise AttributeError('name is required and can\'t be None')
         self.name = name
 
     def get_doc_root(self):
@@ -65,8 +63,6 @@ class VHost():
 
     def set_doc_root(self, doc_root):
         '''Set VHost doc root.'''
-        if doc_root is None:
-            raise AttributeError('doc_root is required and can\'t be None')
         self.doc_root = doc_root
 
     def get_sys_folder(self):
@@ -75,8 +71,6 @@ class VHost():
 
     def set_sys_folder(self, sys_folder):
         '''Set VHost sys folder.'''
-        if sys_folder is None:
-            raise AttributeError('sys_folder is required and can\'t be None')
         self.sys_folder = sys_folder
 
     def get_protocol(self):
@@ -85,8 +79,6 @@ class VHost():
 
     def set_protocol(self, protocol):
         '''Set VHost protocol.'''
-        if protocol is None:
-            raise AttributeError('protocol is required and can\'t be None')
         self.protocol = protocol
 
     def get_port(self):
@@ -96,36 +88,29 @@ class VHost():
     def set_port(self, port):
         '''Set VHost port.'''
         if port is None:
-            raise AttributeError('port is required and can\'t be None')
-        self.port = int(port)
-
-    def get_access_log(self):
-        '''Get VHost access log.'''
-        return self.access_log
-
-    def set_access_log(self, access_log):
-        '''Set VHost access log. access_log is expected to be an instance of
-        MyServer.pycontrollib.log.Log class.'''
-        if access_log is None:
-            raise AttributeError('access_log is required and can\'t be None')
-        if not isinstance(access_log, Log) or \
-                access_log.get_log_type() != 'ACCESSLOG':
-            raise AttributeError('given attribute is not an access log')
-        self.access_log = access_log
-
-    def get_warning_log(self):
-        '''Get VHost warning_log.'''
-        return self.warning_log
-
-    def set_warning_log(self, warning_log):
-        '''Set VHost warning_log. warning_log is expected to be an instance of
-        MyServer.pycontrollib.log.Log class'''
-        if warning_log is None:
-            raise AttributeError('warning_log is required and can\'t be None')
-        if not isinstance(warning_log, Log) or \
-                warning_log.get_log_type() != 'WARNINGLOG':
-            raise AttributeError('given attribute is not a warning log')
-        self.warning_log = warning_log
+            self.port = None
+        else:
+            self.port = int(port)
+
+    def get_logs(self):
+        '''Get list of logs.'''
+        return self.logs
+
+    def get_log(self, index):
+        '''Get index-th log.'''
+        return self.logs[index]
+
+    def remove_log(self, index):
+        '''Remove index-th log.'''
+        self.logs.pop(index)
+
+    def add_log(self, log, index = None):
+        '''Add log to VHost's logs, if index is None append it, otherwise insert
+        at index position.'''
+        if index is None:
+            self.logs.append(log)
+        else:
+            self.logs.insert(index, log)
 
     def get_ip(self):
         '''Get VHost ip set.'''
@@ -161,11 +146,16 @@ class VHost():
             element.text = text
             return element
         root = etree.Element('VHOST')
-        root.append(make_element('NAME', self.name))
-        root.append(make_element('PORT', str(self.port)))
-        root.append(make_element('PROTOCOL', self.protocol))
-        root.append(make_element('DOCROOT', self.doc_root))
-        root.append(make_element('SYSFOLDER', self.sys_folder))
+        if self.name is not None:
+            root.append(make_element('NAME', self.name))
+        if self.port is not None:
+            root.append(make_element('PORT', str(self.port)))
+        if self.protocol is not None:
+            root.append(make_element('PROTOCOL', self.protocol))
+        if self.doc_root is not None:
+            root.append(make_element('DOCROOT', self.doc_root))
+        if self.sys_folder is not None:
+            root.append(make_element('SYSFOLDER', self.sys_folder))
         for ip_address in self.ip:
             root.append(make_element('IP', ip_address))
         for host, use_regex in self.host.iteritems():
@@ -173,8 +163,8 @@ class VHost():
             if use_regex is not None:
                 element.set('useRegex', 'YES' if use_regex else 'NO')
             root.append(element)
-        root.append(self.access_log.to_lxml_element())
-        root.append(self.warning_log.to_lxml_element())
+        for log in self.logs:
+            root.append(log.to_lxml_element())
         return root
 
     @staticmethod
@@ -189,8 +179,7 @@ class VHost():
         sys_folder = None
         ip = []
         host = {}
-        access_log = None
-        warning_log = None
+        logs = []
         for child in list(root):
             if child.tag == 'NAME':
                 name = child.text
@@ -209,12 +198,9 @@ class VHost():
                 if use_regex is not None:
                     use_regex = use_regex == 'YES'
                 host[child.text] = use_regex
-            elif child.tag == 'ACCESSLOG':
-                access_log = Log.from_lxml_element(child)
-            elif child.tag == 'WARNINGLOG':
-                warning_log = Log.from_lxml_element(child)
-        return VHost(name, port, protocol, doc_root, sys_folder, access_log,
-                     warning_log, ip, host)
+            else:
+                logs.append(Log.from_lxml_element(child))
+        return VHost(name, port, protocol, doc_root, sys_folder, logs, ip, host)
     
     @staticmethod
     def from_string(text):



commit 04266076faf692115a2dbf46a8426530216b5f46
Author: Marek Aaron Sapota <maarons@gnu.org>
Date:   Thu Jul 9 17:04:32 2009 +0200

    Split mimetypes to/from string/lxml tests.

diff --git a/misc/py_control_client/MyServer/pycontrollib/mimetypes.py b/misc/py_control_client/MyServer/pycontrollib/mimetypes.py
index d6f65e8..8b6fe05 100644
--- a/misc/py_control_client/MyServer/pycontrollib/mimetypes.py
+++ b/misc/py_control_client/MyServer/pycontrollib/mimetypes.py
@@ -20,20 +20,20 @@ from definition import Definition
 from lxml import etree
 
 class MIMEType():
-    def __init__(self, mime, handler, param = None, extension = [], path = None,
-                 filter = [], self_executed = None, definitions = []):
+    def __init__(self, mime, handler, param = None, extensions = [], path = None,
+                 filters = [], self_executed = None, definitions = []):
         '''Creates new MIMEType with specified attributes. extension, filter and
         definitions are expected to be iterable.'''
         self.set_mime(mime)
         self.set_handler(handler)
         self.set_param(param)
-        self.extension = set()
-        for single_extension in extension:
-            self.add_extension(single_extension)
+        self.extensions = set()
+        for extension in extensions:
+            self.add_extension(extension)
         self.set_path(path)
-        self.filter = []
-        for single_filter in filter:
-            self.add_filter(single_filter)
+        self.filters = []
+        for filter in filters:
+            self.add_filter(filter)
         self.set_self_executed(self_executed)
         self.definitions = []
         for definition in definitions:
@@ -69,15 +69,15 @@ class MIMEType():
 
     def get_extensions(self):
         '''Get associated extensions.'''
-        return self.extension
+        return self.extensions
 
     def remove_extension(self, extension):
         '''Remove extension from associated extensions.'''
-        self.extension.remove(extension)
+        self.extensions.remove(extension)
 
     def add_extension(self, extension):
         '''Add extension to associated extensions.'''
-        self.extension.add(extension)
+        self.extensions.add(extension)
 
     def get_path(self):
         '''Get associated path.'''
@@ -89,22 +89,22 @@ class MIMEType():
 
     def get_filters(self):
         '''Get associated filters.'''
-        return self.filter
+        return self.filters
 
     def get_filter(self, index):
         '''Get filter with given index.'''
-        return self.filter[index]
+        return self.filters[index]
 
     def remove_filter(self, index):
         '''Remove filter with given index.'''
-        self.filter.pop(index)
+        self.filters.pop(index)
 
     def add_filter(self, filter, index = None):
         '''Append filter after all other filters, or insert it at index.'''
         if index is None:
-            self.filter.append(filter)
+            self.filters.append(filter)
         else:
-            self.filter.insert(index, filter)
+            self.filters.insert(index, filter)
 
     def get_self_executed(self):
         '''Get self_executed setting.'''
@@ -139,9 +139,9 @@ class MIMEType():
             self.mime == other.mime and \
             self.handler == other.handler and \
             self.param == other.param and \
-            self.extension == other.extension and \
+            self.extensions == other.extensions and \
             self.path == other.path and \
-            self.filter == other.filter and \
+            self.filters == other.filters and \
             self.self_executed == other.self_executed and \
             self.definitions == other.definitions
 
@@ -164,9 +164,9 @@ class MIMEType():
             root.set('self', 'YES' if self.self_executed else 'NO')
         if self.path is not None:
             root.append(make_element('PATH', 'regex', self.path))
-        for element in map(make_extension_element, self.extension):
+        for element in map(make_extension_element, self.extensions):
             root.append(element)
-        for element in map(make_filter_element, self.filter):
+        for element in map(make_filter_element, self.filters):
             root.append(element)
         for definition in self.definitions:
             root.append(definition.to_lxml_element())
@@ -188,18 +188,18 @@ class MIMEType():
             self_executed = self_executed == 'YES'
         path = None
         extension = set()
-        filter = []
+        filters = []
         definitions = []
         for child in list(root):
             if child.tag == 'PATH':
                 path = child.get('regex')
             elif child.tag == 'FILTER':
-                filter.append(child.get('value'))
+                filters.append(child.get('value'))
             elif child.tag == 'EXTENSION':
                 extension.add(child.get('value'))
             elif child.tag == 'DEFINE':
                 definitions.append(Definition.from_lxml_element(child))
-        return MIMEType(mime, handler, param, extension, path, filter,
+        return MIMEType(mime, handler, param, extension, path, filters,
                         self_executed, definitions)
 
     @staticmethod
@@ -208,7 +208,7 @@ class MIMEType():
         return MIMEType.from_lxml_element(etree.XML(text))
 
 class MIMETypes():
-    def __init__(self, MIME_types):
+    def __init__(self, MIME_types = []):
         self.MIME_types = MIME_types
         
     def __eq__(self, other):
diff --git a/misc/py_control_client/MyServer/pycontrollib/test/mimetypes_test.py b/misc/py_control_client/MyServer/pycontrollib/test/mimetypes_test.py
index 6f2a768..ba25a6b 100644
--- a/misc/py_control_client/MyServer/pycontrollib/test/mimetypes_test.py
+++ b/misc/py_control_client/MyServer/pycontrollib/test/mimetypes_test.py
@@ -19,31 +19,31 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 import unittest
 from lxml import etree
 from mimetypes import MIMEType, MIMETypes
-from definition import Definition
+from definition import DefinitionElement, DefinitionTree
 
 class MIMETypeTest(unittest.TestCase):
     def setUp(self):
         self.definitions = []
-        self.definitions.append(Definition.from_string(
-                '<DEFINE name="http.use_error_file" value="YES" />'))
-        self.definitions.append(Definition.from_string(
-                '<DEFINE name="http.error.file.404" value="404.html" />'))
-        self.definitions.append(Definition.from_string(
-                '''<DEFINE name="http.default_file">
-  <DEFINE value="index.html" />
-  <DEFINE value="index.htm" />
-</DEFINE>'''))
-        self.text = \
-            '''<MIME mime="application/xhtml+xml" handler="CGI" param="/usr/bin/python" self="NO" >
-  <EXTENSION value="xhtml" />
-  <EXTENSION value="xml" />
-  <EXTENSION value="py" />
-  <FILTER value="gzip" />
-  <FILTER value="bzip2" />
-  {0}
-  <PATH regex="^/cgi-bin/python/.*$" />
-</MIME>'''.format('\n'.join(map(lambda element: str(element),
-                                self.definitions)))
+        self.definitions.append(DefinitionElement('http.use_error_file',
+                                                  {'value': 'YES'}))
+        self.definitions.append(DefinitionElement('http.error.file.404',
+                                                  {'value': '404.html'}))
+        self.definitions.append(
+            DefinitionTree(
+                'http.default_file',
+                [DefinitionElement(attributes = {'value': 'index.html'}),
+                 DefinitionElement(attributes = {'value': 'index.htm'})]))
+#        self.text = \
+#             '''<MIME mime="application/xhtml+xml" handler="CGI" param="/usr/bin/python" self="NO" >
+#   <EXTENSION value="xhtml" />
+#   <EXTENSION value="xml" />
+#   <EXTENSION value="py" />
+#   <FILTER value="gzip" />
+#   <FILTER value="bzip2" />
+#   {0}
+#   <PATH regex="^/cgi-bin/python/.*$" />
+# </MIME>'''.format('\n'.join(map(lambda element: str(element),
+#                                 self.definitions)))
     def test_creation(self):
         MIMEType('text/plain', 'CGI')
         MIMEType('text/plain', 'CGI', '/usr/bin/python')
@@ -57,28 +57,6 @@ class MIMETypeTest(unittest.TestCase):
         MIMEType('text/plain', 'CGI', '/usr/bin/python', set(['py']),
                  '^/cgi-bin/.*$', ['gzip'], False, self.definitions)
 
-    def test_from_string(self):
-        mime = MIMEType.from_string(self.text)
-        self.assertEqual(mime.get_mime(), 'application/xhtml+xml')
-        self.assertEqual(mime.get_handler(), 'CGI')
-        self.assertEqual(mime.get_param(), '/usr/bin/python')
-        self.assertEqual(mime.get_extensions(), set(['xhtml', 'xml', 'py']))
-        self.assertEqual(mime.get_path(), '^/cgi-bin/python/.*$')
-        self.assertEqual(mime.get_filters(), ['gzip', 'bzip2'])
-        self.assertEqual(mime.get_self_executed(), False)
-        self.assertEqual(mime.get_definitions(), self.definitions)
-
-    def test_from_lxml(self):
-        mime = MIMEType.from_lxml_element(etree.XML(self.text))
-        self.assertEqual(mime.get_mime(), 'application/xhtml+xml')
-        self.assertEqual(mime.get_handler(), 'CGI')
-        self.assertEqual(mime.get_param(), '/usr/bin/python')
-        self.assertEqual(mime.get_extensions(), set(['xhtml', 'xml', 'py']))
-        self.assertEqual(mime.get_path(), '^/cgi-bin/python/.*$')
-        self.assertEqual(mime.get_filters(), ['gzip', 'bzip2'])
-        self.assertEqual(mime.get_self_executed(), False)
-        self.assertEqual(mime.get_definitions(), self.definitions)
-
     def test_mime(self):
         mime = MIMEType('text/plain', 'SEND')
         self.assertEqual('text/plain', mime.get_mime())
@@ -113,7 +91,7 @@ class MIMETypeTest(unittest.TestCase):
         self.assertEqual(set(['py', 'html']), mime.get_extensions())
         mime.remove_extension('py')
         self.assertEqual(set(['html']), mime.get_extensions())
-        mime = MIMEType('text/plain', 'SEND', extension = set(['py', 'html']))
+        mime = MIMEType('text/plain', 'SEND', extensions = set(['py', 'html']))
         self.assertEqual(set(['py', 'html']), mime.get_extensions())
 
     def test_path(self):
@@ -126,7 +104,7 @@ class MIMETypeTest(unittest.TestCase):
         mime = MIMEType('text/plain', 'SEND', path = '^/www/.*$')
         self.assertEqual('^/www/.*$', mime.get_path())
 
-    def test_filter(self):
+    def test_filters(self):
         mime = MIMEType('text/plain', 'SEND')
         self.assertEqual([], mime.get_filters())
         mime.add_filter('gzip')
@@ -137,7 +115,7 @@ class MIMETypeTest(unittest.TestCase):
         mime.remove_filter(2)
         self.assertEqual(['bzip2', 'gzip'], mime.get_filters())
         self.assertEqual('gzip', mime.get_filter(1))
-        mime = MIMEType('text/plain', 'SEND', filter = ['gzip', 'bzip2'])
+        mime = MIMEType('text/plain', 'SEND', filters = ['gzip', 'bzip2'])
         self.assertEqual(['gzip', 'bzip2'], mime.get_filters())
 
     def test_self_executed(self):
@@ -164,64 +142,290 @@ class MIMETypeTest(unittest.TestCase):
         self.assertEqual(self.definitions, mime.get_definitions())
         
     def test_equality(self):
-        self.assertEqual(MIMEType.from_string(self.text),
-                         MIMEType.from_string(self.text))
-        self.assertNotEqual(MIMEType.from_string(self.text),
-                            MIMEType('text/plain', 'SEND'))
-        self.assertNotEqual(MIMEType.from_string(self.text), [])
+        self.assertEqual(MIMEType('text/plain', 'CGI', '/usr/bin/python',
+                                  set(['py']), '^/.*$', ['gzip'], False,
+                                  self.definitions),
+                         MIMEType('text/plain', 'CGI', '/usr/bin/python',
+                                  set(['py']), '^/.*$', ['gzip'], False,
+                                  self.definitions))
+        self.assertNotEqual(MIMEType('text/plain', 'CGI', '/usr/bin/python',
+                                  set(['py']), '^/.*$', ['gzip'], False,
+                                  self.definitions),
+                            MIMEType('other', 'CGI', '/usr/bin/python',
+                                  set(['py']), '^/.*$', ['gzip'], False,
+                                     self.definitions))
+        self.assertNotEqual(MIMEType('text/plain', 'CGI', '/usr/bin/python',
+                                     set(['py']), '^/.*$', ['gzip'], False,
+                                     self.definitions),
+                            MIMEType('text/plain', 'SEND', '/usr/bin/python',
+                                     set(['py']), '^/.*$', ['gzip'], False,
+                                     self.definitions))
+        self.assertNotEqual(MIMEType('text/plain', 'CGI', '/usr/bin/python',
+                                     set(['py']), '^/.*$', ['gzip'], False,
+                                     self.definitions),
+                            MIMEType('text/plain', 'CGI', '/usr/bin/python26',
+                                     set(['py']), '^/.*$', ['gzip'], False,
+                                     self.definitions))
+        self.assertNotEqual(MIMEType('text/plain', 'CGI', '/usr/bin/python',
+                                     set(['py']), '^/.*$', ['gzip'], False,
+                                     self.definitions),
+                            MIMEType('text/plain', 'CGI', '/usr/bin/python',
+                                     set(['pyc']), '^/.*$', ['gzip'], False,
+                                     self.definitions))
+        self.assertNotEqual(MIMEType('text/plain', 'CGI', '/usr/bin/python',
+                                     set(['py']), '^/.*$', ['gzip'], False,
+                                     self.definitions),
+                            MIMEType('text/plain', 'CGI', '/usr/bin/python',
+                                     set(['py']), '^/other/.*$', ['gzip'], False,
+                                     self.definitions))
+        self.assertNotEqual(MIMEType('text/plain', 'CGI', '/usr/bin/python',
+                                     set(['py']), '^/.*$', ['gzip'], False,
+                                     self.definitions),
+                            MIMEType('text/plain', 'CGI', '/usr/bin/python',
+                                     set(['py']), '^/.*$', ['bzip2'], False,
+                                     self.definitions))
+        self.assertNotEqual(MIMEType('text/plain', 'CGI', '/usr/bin/python',
+                                     set(['py']), '^/.*$', ['gzip'], False,
+                                     self.definitions),
+                            MIMEType('text/plain', 'CGI', '/usr/bin/python',
+                                     set(['py']), '^/.*$', ['gzip'], True,
+                                     self.definitions))
+        self.assertNotEqual(MIMEType('text/plain', 'CGI', '/usr/bin/python',
+                                     set(['py']), '^/.*$', ['gzip'], False,
+                                     self.definitions),
+                            MIMEType('text/plain', 'CGI', '/usr/bin/python',
+                                     set(['py']), '^/.*$', ['gzip'], False,
+                                     []))
+        self.assertNotEqual(MIMEType('text/plain', 'SEND'), 'other type')
+
+    def test_from_string(self):
+        text = '<MIME mime="text/plain" handler="SEND" />'
+        mime = MIMEType.from_string(text)
+        right = MIMEType('text/plain', 'SEND')
+        self.assertEqual(mime, right)
+
+    def test_from_string_param(self):
+        text = '<MIME mime="text/plain" handler="SEND" param="/usr/bin/python" />'
+        mime = MIMEType.from_string(text)
+        right = MIMEType('text/plain', 'SEND', '/usr/bin/python')
+        self.assertEqual(mime, right)
+
+    def test_from_string_extension(self):
+        text = '<MIME mime="text/plain" handler="SEND"><EXTENSION value="py" /></MIME>'
+        mime = MIMEType.from_string(text)
+        right = MIMEType('text/plain', 'SEND', extensions = ['py'])
+        self.assertEqual(mime, right)
+
+    def test_from_string_path(self):
+        text = '<MIME mime="text/plain" handler="SEND"><PATH regex="^/.*$" /></MIME>'
+        mime = MIMEType.from_string(text)
+        right = MIMEType('text/plain', 'SEND', path = '^/.*$')
+        self.assertEqual(mime, right)
+
+    def test_from_string_filter(self):
+        text = '''<MIME mime="text/plain" handler="SEND">
+  <FILTER value="gzip" />
+  <FILTER value="bzip2" />
+</MIME>'''
+        mime = MIMEType.from_string(text)
+        right = MIMEType('text/plain', 'SEND', filters = ['gzip', 'bzip2'])
+        self.assertEqual(mime, right)
+
+    def test_from_string_self_executed(self):
+        text = '<MIME mime="text/plain" handler="SEND" self="YES" />'
+        mime = MIMEType.from_string(text)
+        right = MIMEType('text/plain', 'SEND', self_executed = True)
+        self.assertEqual(mime, right)
+
+    def test_from_string_definitions(self):
+        text = '<MIME mime="text/plain" handler="SEND">{0}</MIME>'.format(
+            '\n'.join(map(str, self.definitions)))
+        mime = MIMEType.from_string(text)
+        right = MIMEType('text/plain', 'SEND', definitions = self.definitions)
+        self.assertEqual(mime, right)
+        
+    def test_from_string_full(self):
+        text = '''<MIME mime="text/plain" handler="SEND" self="YES" param="python">
+  <EXTENSION value="py" />
+  <FILTER value="gzip" />
+  <FILTER value="bzip2" />
+  <PATH regex="^/.*$" />
+  {0}
+</MIME>'''.format('\n'.join(map(str, self.definitions)))
+        mime = MIMEType.from_string(text)
+        right = MIMEType('text/plain', 'SEND', 'python', ['py'], '^/.*$',
+                         ['gzip', 'bzip2'], True, self.definitions)
+        self.assertEqual(mime, right)
+
+    def test_from_lxml(self):
+        text = '<MIME mime="text/plain" handler="SEND" />'
+        mime = MIMEType.from_lxml_element(etree.XML(text))
+        right = MIMEType('text/plain', 'SEND')
+        self.assertEqual(mime, right)
+
+    def test_from_lxml_param(self):
+        text = '<MIME mime="text/plain" handler="SEND" param="/usr/bin/python" />'
+        mime = MIMEType.from_lxml_element(etree.XML(text))
+        right = MIMEType('text/plain', 'SEND', '/usr/bin/python')
+        self.assertEqual(mime, right)
+
+    def test_from_lxml_extension(self):
+        text = '<MIME mime="text/plain" handler="SEND"><EXTENSION value="py" /></MIME>'
+        mime = MIMEType.from_lxml_element(etree.XML(text))
+        right = MIMEType('text/plain', 'SEND', extensions = ['py'])
+        self.assertEqual(mime, right)
+
+    def test_from_lxml_path(self):
+        text = '<MIME mime="text/plain" handler="SEND"><PATH regex="^/.*$" /></MIME>'
+        mime = MIMEType.from_lxml_element(etree.XML(text))
+        right = MIMEType('text/plain', 'SEND', path = '^/.*$')
+        self.assertEqual(mime, right)
+
+    def test_from_lxml_filter(self):
+        text = '''<MIME mime="text/plain" handler="SEND">
+  <FILTER value="gzip" />
+  <FILTER value="bzip2" />
+</MIME>'''
+        mime = MIMEType.from_lxml_element(etree.XML(text))
+        right = MIMEType('text/plain', 'SEND', filters = ['gzip', 'bzip2'])
+        self.assertEqual(mime, right)
+
+    def test_from_lxml_self_executed(self):
+        text = '<MIME mime="text/plain" handler="SEND" self="YES" />'
+        mime = MIMEType.from_lxml_element(etree.XML(text))
+        right = MIMEType('text/plain', 'SEND', self_executed = True)
+        self.assertEqual(mime, right)
+
+    def test_from_lxml_definitions(self):
+        text = '<MIME mime="text/plain" handler="SEND">{0}</MIME>'.format(
+            '\n'.join(map(str, self.definitions)))
+        mime = MIMEType.from_lxml_element(etree.XML(text))
+        right = MIMEType('text/plain', 'SEND', definitions = self.definitions)
+        self.assertEqual(mime, right)
+
+    def test_from_lxml_full(self):
+        text = '''<MIME mime="text/plain" handler="SEND" self="YES" param="python">
+  <EXTENSION value="py" />
+  <FILTER value="gzip" />
+  <FILTER value="bzip2" />
+  <PATH regex="^/.*$" />
+  {0}
+</MIME>'''.format('\n'.join(map(str, self.definitions)))
+        mime = MIMEType.from_lxml_element(etree.XML(text))
+        right = MIMEType('text/plain', 'SEND', 'python', ['py'], '^/.*$',
+                         ['gzip', 'bzip2'], True, self.definitions)
+        self.assertEqual(mime, right)
+
+    def test_bad_root_tag(self):
+        text = '<ERROR mime="application/xhtml+xml" handler="CGI" />'
+        self.assertRaises(AttributeError, MIMEType.from_string, text)
+        self.assertRaises(AttributeError, MIMEType.from_lxml_element,
+                          etree.XML(text))
         
     def test_to_string(self):
-        mime = MIMEType.from_string(self.text)
+        mime = MIMEType('text/plain', 'SEND')
+        copy = MIMEType.from_string(str(mime))
+        self.assertEqual(mime, copy)
+
+    def test_to_string_param(self):
+        mime = MIMEType('text/plain', 'SEND', '/usr/bin/python')
+        copy = MIMEType.from_string(str(mime))
+        self.assertEqual(mime, copy)
+
+    def test_to_string_extension(self):
+        mime = MIMEType('text/plain', 'SEND', extensions = ['py'])
+        copy = MIMEType.from_string(str(mime))
+        self.assertEqual(mime, copy)
+
+    def test_to_string_path(self):
+        mime = MIMEType('text/plain', 'SEND', path = '^/.*$')
+        copy = MIMEType.from_string(str(mime))
+        self.assertEqual(mime, copy)
+
+    def test_to_string_filter(self):
+        mime = MIMEType('text/plain', 'SEND', filters = ['gzip', 'bzip2'])
+        copy = MIMEType.from_string(str(mime))
+        self.assertEqual(mime, copy)
+
+    def test_to_string_self_executed(self):
+        mime = MIMEType('text/plain', 'SEND', self_executed = True)
+        copy = MIMEType.from_string(str(mime))
+        self.assertEqual(mime, copy)
+
+    def test_to_string_definitions(self):
+        mime = MIMEType('text/plain', 'SEND', definitions = self.definitions)
         copy = MIMEType.from_string(str(mime))
         self.assertEqual(mime, copy)
         
+    def test_to_string_full(self):
+        mime = MIMEType('text/plain', 'SEND', 'python', ['py'], '^/.*$',
+                        ['gzip', 'bzip2'], True, self.definitions)
+        copy = MIMEType.from_string(str(mime))
+        self.assertEqual(mime, copy)
+
     def test_to_lxml(self):
-        mime = MIMEType.from_string(self.text)
+        mime = MIMEType('text/plain', 'SEND')
         copy = MIMEType.from_lxml_element(mime.to_lxml_element())
         self.assertEqual(mime, copy)
-        
 
-    def test_bad_root_tag(self):
-        text = '''<ERROR mime="application/xhtml+xml" handler="CGI" param="/usr/bin/python" self="NO" >
-  <EXTENSION value="xhtml" />
-</ERROR>'''
-        self.assertRaises(AttributeError, MIMEType.from_string, text)
-        self.assertRaises(AttributeError, MIMEType.from_lxml_element,
-                          etree.XML(text))
+    def test_to_lxml_param(self):
+        mime = MIMEType('text/plain', 'SEND', '/usr/bin/python')
+        copy = MIMEType.from_lxml_element(mime.to_lxml_element())
+        self.assertEqual(mime, copy)
+
+    def test_to_lxml_extension(self):
+        mime = MIMEType('text/plain', 'SEND', extensions = ['py'])
+        copy = MIMEType.from_lxml_element(mime.to_lxml_element())
+        self.assertEqual(mime, copy)
+
+    def test_to_lxml_path(self):
+        mime = MIMEType('text/plain', 'SEND', path = '^/.*$')
+        copy = MIMEType.from_lxml_element(mime.to_lxml_element())
+        self.assertEqual(mime, copy)
+
+    def test_to_lxml_filter(self):
+        mime = MIMEType('text/plain', 'SEND', filters = ['gzip', 'bzip2'])
+        copy = MIMEType.from_lxml_element(mime.to_lxml_element())
+        self.assertEqual(mime, copy)
+
+    def test_to_lxml_self_executed(self):
+        mime = MIMEType('text/plain', 'SEND', self_executed = True)
+        copy = MIMEType.from_lxml_element(mime.to_lxml_element())
+        self.assertEqual(mime, copy)
+
+    def test_to_lxml_definitions(self):
+        mime = MIMEType('text/plain', 'SEND', definitions = self.definitions)
+        copy = MIMEType.from_lxml_element(mime.to_lxml_element())
+        self.assertEqual(mime, copy)
         
+    def test_to_lxml_full(self):
+        mime = MIMEType('text/plain', 'SEND', 'python', ['py'], '^/.*$',
+                        ['gzip', 'bzip2'], True, self.definitions)
+        copy = MIMEType.from_lxml_element(mime.to_lxml_element())
+        self.assertEqual(mime, copy)
+
 class MIMETypesTest(unittest.TestCase):
     def setUp(self):
-        self.mime_0 = '''<MIME mime="text/html" handler="FASTCGI" self="YES" param="">
-  <EXTENSION value="fcgi"/>
-</MIME>'''
-        self.mime_1 = '''<MIME mime="text/plain" handler="SEND" param="">
-  <EXTENSION value="asc"/>
-  <EXTENSION value="c"/>
-  <EXTENSION value="cc"/>
-  <EXTENSION value="f"/>
-  <EXTENSION value="f90"/>
-  <EXTENSION value="h"/>
-  <EXTENSION value="hh"/>
-  <EXTENSION value="m"/>
-  <EXTENSION value="txt"/>
-</MIME>'''
+        self.mime_0 = MIMEType('text/html', 'FASTCGI', '', self_executed = True,
+                               extensions = ['fcgi'])
+        self.mime_1 = MIMEType('text/plain', 'SEND', '',
+                               extensions = ['asc', 'c', 'cc', 'f', 'f90', 'h', 'hh'])
         self.text = '<MIMES>{0}{1}</MIMES>'.format(self.mime_0, self.mime_1)
     
     def test_creation(self):
-        mimes = MIMETypes([MIMEType.from_string(self.mime_0),
-                           MIMEType.from_string(self.mime_1)])
-        self.assertEqual(mimes.MIME_types[0], MIMEType.from_string(self.mime_0))
-        self.assertEqual(mimes.MIME_types[1], MIMEType.from_string(self.mime_1))
+        mimes = MIMETypes([self.mime_0, self.mime_1])
+        self.assertEqual(mimes.MIME_types[0], self.mime_0)
+        self.assertEqual(mimes.MIME_types[1], self.mime_1)
 
     def test_from_string(self):
         mimes = MIMETypes.from_string(self.text)
-        self.assertEqual(mimes.MIME_types[0], MIMEType.from_string(self.mime_0))
-        self.assertEqual(mimes.MIME_types[1], MIMEType.from_string(self.mime_1))
+        self.assertEqual(mimes.MIME_types[0], self.mime_0)
+        self.assertEqual(mimes.MIME_types[1], self.mime_1)
 
     def test_from_lxml(self):
         mimes = MIMETypes.from_lxml_element(etree.XML(self.text))
-        self.assertEqual(mimes.MIME_types[0], MIMEType.from_string(self.mime_0))
-        self.assertEqual(mimes.MIME_types[1], MIMEType.from_string(self.mime_1))
+        self.assertEqual(mimes.MIME_types[0], self.mime_0)
+        self.assertEqual(mimes.MIME_types[1], self.mime_1)
         
     def test_to_string(self):
         mimes = MIMETypes.from_string(self.text)



commit 46ad12574dae76f375e1fb29b1770176eb2036a4
Author: Marek Aaron Sapota <maarons@gnu.org>
Date:   Wed Jul 8 20:53:29 2009 +0200

    Split log.py tests for easy testing.
    
    Removed non-empty location restriction from Stream class.

diff --git a/misc/py_control_client/MyServer/pycontrollib/log.py b/misc/py_control_client/MyServer/pycontrollib/log.py
index ac9d052..c2824c9 100644
--- a/misc/py_control_client/MyServer/pycontrollib/log.py
+++ b/misc/py_control_client/MyServer/pycontrollib/log.py
@@ -19,21 +19,21 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 from lxml import etree
 
 class Stream():
-    def __init__(self, location, cycle = None, cycle_gzip = None, filter = []):
+    def __init__(self, location = None, cycle = None, cycle_gzip = None, filters = []):
         '''Create new Stream instance. filter is expected to be iterable.'''
         self.set_location(location)
         self.set_cycle(cycle)
         self.set_cycle_gzip(cycle_gzip)
-        self.filter = []
-        for single_filter in filter:
-            self.add_filter(single_filter)
+        self.filters = []
+        for filter in filters:
+            self.add_filter(filter)
 
     def __eq__(self, other):
         return isinstance(other, Stream) and \
             self.location == other.location and \
             self.cycle == other.cycle and \
             self.cycle_gzip == other.cycle_gzip and \
-            self.filter == other.filter
+            self.filters == other.filters
 
     def get_location(self):
         '''Get stream location.'''
@@ -41,8 +41,6 @@ class Stream():
 
     def set_location(self, location):
         '''Set stream location.'''
-        if location is None:
-            raise AttributeError('location is required and can\'t be None')
         self.location = location
 
     def get_cycle(self):
@@ -51,7 +49,10 @@ class Stream():
 
     def set_cycle(self, cycle):
         '''Set cycle value, None means not set.'''
-        self.cycle = cycle
+        if cycle is not None:
+            self.cycle = int(cycle)
+        else:
+            self.cycle = cycle
 
     def get_cycle_gzip(self):
         '''Get stream cycle_gzip value.'''
@@ -63,22 +64,22 @@ class Stream():
 
     def get_filters(self):
         '''Get list of stream filters.'''
-        return self.filter
+        return self.filters
 
     def get_filter(self, index):
         '''Get index-th filter.'''
-        return self.filter[index]
+        return self.filters[index]
 
     def add_filter(self, filter, index = None):
         '''Append a new filter, or insert it at index position.'''
         if index is None:
-            self.filter.append(filter)
+            self.filters.append(filter)
         else:
-            self.filter.insert(index, filter)
+            self.filters.insert(index, filter)
 
     def remove_filter(self, index):
         '''Remove index-th filter.'''
-        self.filter.pop(index)
+        self.filters.pop(index)
 
     @staticmethod
     def from_string(text):
@@ -95,11 +96,11 @@ class Stream():
         cycle_gzip = root.get('cycle_gzip', None)
         if cycle_gzip is not None:
             cycle_gzip = True if cycle_gzip == 'YES' else False
-        filter = []
+        filters = []
         for child in list(root):
             if child.tag == 'FILTER':
-                filter.append(child.text)
-        return Stream(location, cycle, cycle_gzip, filter)
+                filters.append(child.text)
+        return Stream(location, cycle, cycle_gzip, filters)
 
     def __str__(self):
         return etree.tostring(self.to_lxml_element(), pretty_print = True)
@@ -107,30 +108,31 @@ class Stream():
     def to_lxml_element(self):
         '''Convert to lxml.etree.Element.'''
         root = etree.Element('STREAM')
-        root.set('location', self.location)
+        if self.location is not None:
+            root.set('location', self.location)
         if self.cycle is not None:
-            root.set('cycle', self.cycle)
+            root.set('cycle', str(self.cycle))
         if self.cycle_gzip is not None:
             root.set('cycle_gzip', 'YES' if self.cycle_gzip else 'NO')
-        for filter in self.filter:
+        for filter in self.filters:
             element = etree.Element('FILTER')
             element.text = filter
             root.append(element)
         return root
 
 class Log():
-    def __init__(self, log_type, stream = [], type = None):
+    def __init__(self, log_type, streams = [], type = None):
         '''Create new Log instance. stream is expected to be iterable.'''
         self.set_log_type(log_type)
         self.set_type(type)
-        self.stream = []
-        for single_stream in stream:
-            self.add_stream(single_stream)
+        self.streams = []
+        for stream in streams:
+            self.add_stream(stream)
 
     def __eq__(self, other):
         return isinstance(other, Log) and \
             self.log_type == other.log_type and \
-            self.stream == other.stream and \
+            self.streams == other.streams and \
             self.type == other.type
     
     def get_type(self):
@@ -153,23 +155,23 @@ class Log():
 
     def get_streams(self):
         '''Get streams associated with this log.'''
-        return self.stream
+        return self.streams
 
     def add_stream(self, stream, index = None):
         '''Append stream to current streams or if index is not None insert
         stream ad index-th position.'''
         if index is None:
-            self.stream.append(stream)
+            self.streams.append(stream)
         else:
-            self.stream.insert(index, stream)
+            self.streams.insert(index, stream)
 
     def remove_stream(self, index):
         '''Remove stream from index-th position.'''
-        self.stream.pop(index)
+        self.streams.pop(index)
     
     def get_stream(self, index):
         '''Get index-th stream.'''
-        return self.stream[index]
+        return self.streams[index]
 
     @staticmethod
     def from_string(text):
@@ -181,11 +183,11 @@ class Log():
         '''Factory to produce log from lxml.etree.Element object.'''
         log_type = root.tag
         type = root.get('type', None)
-        stream = []
+        streams = []
         for child in list(root):
             if child.tag == 'STREAM':
-                stream.append(Stream.from_lxml_element(child))
-        return Log(log_type, stream, type)
+                streams.append(Stream.from_lxml_element(child))
+        return Log(log_type, streams, type)
 
     def __str__(self):
         return etree.tostring(self.to_lxml_element(), pretty_print = True)
@@ -195,6 +197,6 @@ class Log():
         root = etree.Element(self.log_type)
         if self.type is not None:
             root.set('type', self.type)
-        for stream in self.stream:
+        for stream in self.streams:
             root.append(stream.to_lxml_element())
         return root
diff --git a/misc/py_control_client/MyServer/pycontrollib/test/log_test.py b/misc/py_control_client/MyServer/pycontrollib/test/log_test.py
index 55c86a0..9e01f57 100644
--- a/misc/py_control_client/MyServer/pycontrollib/test/log_test.py
+++ b/misc/py_control_client/MyServer/pycontrollib/test/log_test.py
@@ -22,21 +22,26 @@ from lxml import etree
 
 class StreamTest(unittest.TestCase):
     def test_creation(self):
+        log = Stream()
         log = Stream('/logs/MyServer.log')
         log = Stream('/logs/MyServer.log', 1048576)
         log = Stream('/logs/MyServer.log', 1048576, False)
         log = Stream('/logs/MyServer.log', 1048576, False, ['gzip', 'bzip2'])
 
     def test_location(self):
-        log = Stream('/logs/MyServer.log')
-        self.assertEqual('/logs/MyServer.log', log.get_location())
+        log = Stream()
+        self.assertEqual(None, log.get_location())
         log.set_location('/logs/new.log')
         self.assertEqual('/logs/new.log', log.get_location())
-        self.assertRaises(AttributeError, log.set_location, None)
-        self.assertRaises(AttributeError, Stream, None)
+        log.set_location(None)
+        self.assertEqual(None, log.get_location())
+        log = Stream('/logs/MyServer.log')
+        self.assertEqual('/logs/MyServer.log', log.get_location())
+        log = Stream(location = '/logs/MyServer.log')
+        self.assertEqual('/logs/MyServer.log', log.get_location())
 
     def test_cycle(self):
-        log = Stream('path')
+        log = Stream()
         self.assertEqual(None, log.get_cycle())
         log.set_cycle(123)
         self.assertEqual(123, log.get_cycle())
@@ -44,9 +49,11 @@ class StreamTest(unittest.TestCase):
         self.assertEqual(None, log.get_cycle())
         log = Stream('path', 123)
         self.assertEqual(123, log.get_cycle())
+        log = Stream(cycle = 123)
+        self.assertEqual(123, log.get_cycle())
 
     def test_cycle_gzip(self):
-        log = Stream('path')
+        log = Stream()
         self.assertEqual(None, log.get_cycle_gzip())
         log.set_cycle_gzip(True)
         self.assertEqual(True, log.get_cycle_gzip())
@@ -54,11 +61,11 @@ class StreamTest(unittest.TestCase):
         self.assertEqual(None, log.get_cycle_gzip())
         log = Stream('path', 123, False)
         self.assertEqual(False, log.get_cycle_gzip())
-        log = Stream('path', cycle_gzip = False)
+        log = Stream(cycle_gzip = False)
         self.assertEqual(False, log.get_cycle_gzip())
 
-    def test_filter(self):
-        log = Stream('path')
+    def test_filters(self):
+        log = Stream()
         self.assertEqual([], log.get_filters())
         log.add_filter('gzip')
         self.assertEqual(['gzip'], log.get_filters())
@@ -71,42 +78,86 @@ class StreamTest(unittest.TestCase):
         self.assertEqual(['bzip2', 'bzip2'], log.get_filters())
         log = Stream('path', 123, False, ['gzip'])
         self.assertEqual(['gzip'], log.get_filters())
-        log = Stream('path', filter = ['gzip'])
+        log = Stream(filters = ['gzip'])
         self.assertEqual(['gzip'], log.get_filters())
 
     def test_from_string(self):
+        text = '<STREAM />'
+        log = Stream.from_string(text)
+        right = Stream()
+        self.assertEqual(log, right)
+
+    def test_from_string_location(self):
+        text = '<STREAM location="path" />'
+        log = Stream.from_string(text)
+        right = Stream(location = 'path')
+        self.assertEqual(log, right)
+
+    def test_from_string_cycle(self):
+        text = '<STREAM cycle="123" />'
+        log = Stream.from_string(text)
+        right = Stream(cycle = 123)
+        self.assertEqual(log, right)
+
+    def test_from_string_cycle_gzip(self):
+        text = '<STREAM cycle_gzip="NO" />'
+        log = Stream.from_string(text)
+        right = Stream(cycle_gzip = False)
+        self.assertEqual(log, right)
+
+    def test_from_string_filters(self):
+        text = '<STREAM><FILTER>gzip</FILTER><FILTER>bzip2</FILTER></STREAM>'
+        log = Stream.from_string(text)
+        right = Stream(filters = ['gzip', 'bzip2'])
+        self.assertEqual(log, right)
+
+    def test_from_string_full(self):
         text = '''<STREAM location="path" cycle="123" cycle_gzip="NO">
   <FILTER>gzip</FILTER>
   <FILTER>bzip2</FILTER>
 </STREAM>'''
         log = Stream.from_string(text)
-        self.assertEqual('path', log.get_location())
-        self.assertEqual('123', log.get_cycle())
-        self.assertFalse(log.get_cycle_gzip())
-        self.assertEqual(['gzip', 'bzip2'], log.get_filters())
-        text = '<STREAM location="path" />'
-        log = Stream.from_string(text)
-        self.assertEqual('path', log.get_location())
-        self.assertEqual(None, log.get_cycle())
-        self.assertEqual(None, log.get_cycle_gzip())
-        self.assertEqual([], log.get_filters())
+        right = Stream('path', 123, False, ['gzip', 'bzip2'])
+        self.assertEqual(log, right)
 
     def test_from_lxml(self):
+        text = '<STREAM />'
+        log = Stream.from_lxml_element(etree.XML(text))
+        right = Stream()
+        self.assertEqual(log, right)
+
+    def test_from_lxml_location(self):
+        text = '<STREAM location="path" />'
+        log = Stream.from_lxml_element(etree.XML(text))
+        right = Stream(location = 'path')
+        self.assertEqual(log, right)
+
+    def test_from_lxml_cycle(self):
+        text = '<STREAM cycle="123" />'
+        log = Stream.from_lxml_element(etree.XML(text))
+        right = Stream(cycle = 123)
+        self.assertEqual(log, right)
+
+    def test_from_lxml_cycle_gzip(self):
+        text = '<STREAM cycle_gzip="NO" />'
+        log = Stream.from_lxml_element(etree.XML(text))
+        right = Stream(cycle_gzip = False)
+        self.assertEqual(log, right)
+
+    def test_from_lxml_filters(self):
+        text = '<STREAM><FILTER>gzip</FILTER><FILTER>bzip2</FILTER></STREAM>'
+        log = Stream.from_lxml_element(etree.XML(text))
+        right = Stream(filters = ['gzip', 'bzip2'])
+        self.assertEqual(log, right)
+
+    def test_from_lxml_full(self):
         text = '''<STREAM location="path" cycle="123" cycle_gzip="NO">
   <FILTER>gzip</FILTER>
   <FILTER>bzip2</FILTER>
 </STREAM>'''
         log = Stream.from_lxml_element(etree.XML(text))
-        self.assertEqual('path', log.get_location())
-        self.assertEqual('123', log.get_cycle())
-        self.assertFalse(log.get_cycle_gzip())
-        self.assertEqual(['gzip', 'bzip2'], log.get_filters())
-        text = '<STREAM location="path" />'
-        log = Stream.from_lxml_element(etree.XML(text))
-        self.assertEqual('path', log.get_location())
-        self.assertEqual(None, log.get_cycle())
-        self.assertEqual(None, log.get_cycle_gzip())
-        self.assertEqual([], log.get_filters())
+        right = Stream('path', 123, False, ['gzip', 'bzip2'])
+        self.assertEqual(log, right)
 
     def test_bad_root_tag(self):
         text = '<ERROR location="path" />'
@@ -123,34 +174,74 @@ class StreamTest(unittest.TestCase):
                             Stream('path', 123, False, ['gzip', 'bzip2']))
         self.assertNotEqual(Stream('path', 123, True, ['gzip', 'bzip2']),
                             Stream('path', 123, False, ['gzip', 'bzip2']))
-        self.assertNotEqual(Stream('path', 123, True, ['bzip2']),
+        self.assertNotEqual(Stream('path', 123, False, ['bzip2']),
                             Stream('path', 123, False, ['gzip', 'bzip2']))
         self.assertNotEqual([], Stream('path'))
 
     def test_to_string(self):
-        text = '''<STREAM location="path" cycle="123" cycle_gzip="NO">
-  <FILTER>gzip</FILTER>
-  <FILTER>bzip2</FILTER>
-</STREAM>'''
-        log = Stream.from_string(text)
+        log = Stream()
+        copy = Stream.from_string(str(log))
+        self.assertEqual(log, copy)
+
+    def test_to_string_location(self):
+        log = Stream(location = 'path')
+        copy = Stream.from_string(str(log))
+        self.assertEqual(log, copy)
+
+    def test_to_string_cycle(self):
+        log = Stream(cycle = 123)
+        copy = Stream.from_string(str(log))
+        self.assertEqual(log, copy)
+
+    def test_to_string_cycle_gzip(self):
+        log = Stream(cycle_gzip = False)
+        copy = Stream.from_string(str(log))
+        self.assertEqual(log, copy)
+
+    def test_to_string_filters(self):
+        log = Stream(filters = ['gzip', 'bzip2'])
+        copy = Stream.from_string(str(log))
+        self.assertEqual(log, copy)
+
+    def test_to_string_full(self):
+        log = Stream('path', 123, False, ['gzip', 'bzip2'])
         copy = Stream.from_string(str(log))
         self.assertEqual(log, copy)
 
     def test_to_lxml(self):
-        text = '''<STREAM location="path" cycle="123" cycle_gzip="NO">
-  <FILTER>gzip</FILTER>
-  <FILTER>bzip2</FILTER>
-</STREAM>'''
-        log = Stream.from_string(text)
+        log = Stream()
+        copy = Stream.from_lxml_element(log.to_lxml_element())
+        self.assertEqual(log, copy)
+
+    def test_to_lxml_location(self):
+        log = Stream(location = 'path')
+        copy = Stream.from_lxml_element(log.to_lxml_element())
+        self.assertEqual(log, copy)
+
+    def test_to_lxml_cycle(self):
+        log = Stream(cycle = 123)
+        copy = Stream.from_lxml_element(log.to_lxml_element())
+        self.assertEqual(log, copy)
+
+    def test_to_lxml_cycle_gzip(self):
+        log = Stream(cycle_gzip = False)
+        copy = Stream.from_lxml_element(log.to_lxml_element())
+        self.assertEqual(log, copy)
+
+    def test_to_lxml_filters(self):
+        log = Stream(filters = ['gzip', 'bzip2'])
+        copy = Stream.from_lxml_element(log.to_lxml_element())
+        self.assertEqual(log, copy)
+
+    def test_to_lxml_full(self):
+        log = Stream('path', 123, False, ['gzip', 'bzip2'])
         copy = Stream.from_lxml_element(log.to_lxml_element())
         self.assertEqual(log, copy)
 
 class LogTest(unittest.TestCase):
     def setUp(self):
-        text_0 = '<STREAM location="file://logs/MyServerHTTP.log" />'
-        self.stream_0 = Stream.from_string(text_0)
-        text_1 = '<STREAM location="console://stdout" />'
-        self.stream_1 = Stream.from_string(text_1)
+        self.stream_0 = Stream(location = 'file://logs/MyServerHTTP.log')
+        self.stream_1 = Stream(location = 'console://stdout', filters = ['gzip'])
 
     def test_creation(self):
         log = Log('ACCESSLOG')
@@ -193,34 +284,52 @@ class LogTest(unittest.TestCase):
         self.assertEqual([self.stream_0], log.get_streams())
 
     def test_from_string(self):
-        text = '''<ACCESSLOG type="combined">{0}{1}</ACCESSLOG>'''.format( \
-            self.stream_0, self.stream_1)
+        text = '<ACCESSLOG />'
         log = Log.from_string(text)
-        self.assertEqual('ACCESSLOG', log.get_log_type())
-        self.assertEqual('combined', log.get_type())
-        self.assertEqual([self.stream_0, self.stream_1], log.get_streams())
+        right = Log('ACCESSLOG')
+        self.assertEqual(log, right)
 
-    def test_from_lxml(self):
-        text = '''<ACCESSLOG type="combined">{0}{1}</ACCESSLOG>'''.format( \
-            self.stream_0, self.stream_1)
-        log = Log.from_lxml_element(etree.XML(text))
-        self.assertEqual('ACCESSLOG', log.get_log_type())
-        self.assertEqual('combined', log.get_type())
-        self.assertEqual([self.stream_0, self.stream_1], log.get_streams())
+    def test_from_string_type(self):
+        text = '<ACCESSLOG type="combined" />'
+        log = Log.from_string(text)
+        right = Log('ACCESSLOG', type = "combined")
+        self.assertEqual(log, right)
 
-    def test_to_string(self):
-        text = '''<ACCESSLOG type="combined">{0}{1}</ACCESSLOG>'''.format( \
-            self.stream_0, self.stream_1)
+    def test_from_string_streams(self):
+        text = '<ACCESSLOG>{0}{1}</ACCESSLOG>'.format(self.stream_0, self.stream_1)
         log = Log.from_string(text)
-        copy = Log.from_string(str(log))
-        self.assertEqual(log, copy)
+        right = Log('ACCESSLOG', streams = [self.stream_0, self.stream_1])
+        self.assertEqual(log, right)
 
-    def test_to_lxml(self):
-        text = '''<ACCESSLOG type="combined">{0}{1}</ACCESSLOG>'''.format( \
-            self.stream_0, self.stream_1)
+    def test_from_string_full(self):
+        text = '<ACCESSLOG type="combined">{0}{1}</ACCESSLOG>'.format(self.stream_0, self.stream_1)
         log = Log.from_string(text)
-        copy = Log.from_lxml_element(log.to_lxml_element())
-        self.assertEqual(log, copy)
+        right = Log('ACCESSLOG', [self.stream_0, self.stream_1], 'combined')
+        self.assertEqual(log, right)
+
+    def test_from_lxml(self):
+        text = '<ACCESSLOG />'
+        log = Log.from_lxml_element(etree.XML(text))
+        right = Log('ACCESSLOG')
+        self.assertEqual(log, right)
+
+    def test_from_lxml_type(self):
+        text = '<ACCESSLOG type="combined" />'
+        log = Log.from_lxml_element(etree.XML(text))
+        right = Log('ACCESSLOG', type = "combined")
+        self.assertEqual(log, right)
+
+    def test_from_lxml_streams(self):
+        text = '<ACCESSLOG>{0}{1}</ACCESSLOG>'.format(self.stream_0, self.stream_1)
+        log = Log.from_lxml_element(etree.XML(text))
+        right = Log('ACCESSLOG', streams = [self.stream_0, self.stream_1])
+        self.assertEqual(log, right)
+
+    def test_from_lxml_full(self):
+        text = '<ACCESSLOG type="combined">{0}{1}</ACCESSLOG>'.format(self.stream_0, self.stream_1)
+        log = Log.from_lxml_element(etree.XML(text))
+        right = Log('ACCESSLOG', [self.stream_0, self.stream_1], 'combined')
+        self.assertEqual(log, right)
 
     def test_equality(self):
         self.assertEqual(Log('ACCESSLOG', [self.stream_0, self.stream_1], 'combined'),
@@ -233,5 +342,45 @@ class LogTest(unittest.TestCase):
                             Log('WARNINGLOG', [self.stream_0], None))
         self.assertNotEqual([], Log('ACCESSLOG'))
 
+    def test_to_string(self):
+        log = Log('ACCESSLOG')
+        copy = Log.from_string(str(log))
+        self.assertEqual(log, copy)
+
+    def test_to_string_type(self):
+        log = Log('ACCESSLOG', type = "combined")
+        copy = Log.from_string(str(log))
+        self.assertEqual(log, copy)
+
+    def test_to_string_streams(self):
+        log = Log('ACCESSLOG', streams = [self.stream_0, self.stream_1])
+        copy = Log.from_string(str(log))
+        self.assertEqual(log, copy)
+
+    def test_to_string_full(self):
+        log = Log('ACCESSLOG', [self.stream_0, self.stream_1], 'combined')
+        copy = Log.from_string(str(log))
+        self.assertEqual(log, copy)
+        
+    def test_to_lxml(self):
+        log = Log('ACCESSLOG')
+        copy = Log.from_lxml_element(log.to_lxml_element())
+        self.assertEqual(log, copy)
+
+    def test_to_lxml_type(self):
+        log = Log('ACCESSLOG', type = "combined")
+        copy = Log.from_lxml_element(log.to_lxml_element())
+        self.assertEqual(log, copy)
+
+    def test_to_lxml_streams(self):
+        log = Log('ACCESSLOG', streams = [self.stream_0, self.stream_1])
+        copy = Log.from_lxml_element(log.to_lxml_element())
+        self.assertEqual(log, copy)
+
+    def test_to_lxml_full(self):
+        log = Log('ACCESSLOG', [self.stream_0, self.stream_1], 'combined')
+        copy = Log.from_lxml_element(log.to_lxml_element())
+        self.assertEqual(log, copy)
+
 if __name__ == '__main__':
     unittest.main()



commit d3324c64a1aeac6cd067bc19437b7d7735dd44d2
Author: Marek Aaron Sapota <maarons@gnu.org>
Date:   Wed Jul 8 19:13:00 2009 +0200

    Update and refactoring of definitions.
    
    - split tests for easy testing
    - definition.get_attribute generates KeyError if attribute doesn't exist
    - renamed values to definitions in DefinitionTree

diff --git a/misc/py_control_client/MyServer/pycontrollib/definition.py b/misc/py_control_client/MyServer/pycontrollib/definition.py
index 351b898..fd4c353 100644
--- a/misc/py_control_client/MyServer/pycontrollib/definition.py
+++ b/misc/py_control_client/MyServer/pycontrollib/definition.py
@@ -44,7 +44,7 @@ class Definition():
 
     def get_attribute(self, key):
         '''Get value of attribute key.'''
-        return self.attributes.get(key)
+        return self.attributes[key]
 
     def set_attribute(self, key, value):
         '''Set attribute key to given value.'''
@@ -122,38 +122,38 @@ class DefinitionElement(Definition):
 class DefinitionTree(Definition):
     '''Definition element containing other definitions.'''
 
-    def __init__(self, name = None, values = [], attributes = {}):
+    def __init__(self, name = None, definitions = [], attributes = {}):
         '''Creates new definition tree with given name, sub-definitions and
         attributes. values is expected to be iterable.'''
         Definition.__init__(self, name, attributes)
-        self.values = []
-        for value in values:
-            self.add_value(value)
+        self.definitions = []
+        for definition in definitions:
+            self.add_definition(definition)
 
     def __eq__(self, other):
         return isinstance(other, DefinitionTree) and \
             Definition.__eq__(self, other) and \
-            self.values == other.values
+            self.definitions == other.definitions
 
-    def get_values(self):
+    def get_definitions(self):
         '''Get all sub-definitions.'''
-        return self.values
+        return self.definitions
 
-    def get_value(self, index):
+    def get_definition(self, index):
         '''Get sub-definition with given index.'''
-        return self.values[index]
+        return self.definitions[index]
 
-    def add_value(self, value, index = None):
+    def add_definition(self, value, index = None):
         '''Add value to sub-definitions, either at given position, or at the
         end.'''
         if index is None:
-            self.values.append(value)
+            self.definitions.append(value)
         else:
-            self.values.insert(index, value)
+            self.definitions.insert(index, value)
 
-    def remove_value(self, index):
+    def remove_definition(self, index):
         '''Remove sub-definition with given index.'''
-        self.values.pop(index)
+        self.definitions.pop(index)
 
     @staticmethod
     def from_lxml_element(root):
@@ -162,8 +162,8 @@ class DefinitionTree(Definition):
             raise AttributeError('Expected DEFINE tag.')
         attributes = root.attrib
         name = attributes.pop('name', None)
-        values = map(Definition.from_lxml_element, list(root))
-        return DefinitionTree(name, values, attributes)
+        definitions = map(Definition.from_lxml_element, list(root))
+        return DefinitionTree(name, definitions, attributes)
 
     @staticmethod
     def from_string(text):
@@ -177,8 +177,8 @@ class DefinitionTree(Definition):
             root.set(key, value)
         if self.name is not None:
             root.set('name', self.name)
-        for value in self.values:
-            root.append(value.to_lxml_element())
+        for definition in self.definitions:
+            root.append(definition.to_lxml_element())
         return root
 
     def __str__(self):
diff --git a/misc/py_control_client/MyServer/pycontrollib/test/definition_test.py b/misc/py_control_client/MyServer/pycontrollib/test/definition_test.py
index adf3533..6177b56 100644
--- a/misc/py_control_client/MyServer/pycontrollib/test/definition_test.py
+++ b/misc/py_control_client/MyServer/pycontrollib/test/definition_test.py
@@ -31,19 +31,26 @@ class DefinitionTest(unittest.TestCase):
         self.assertEqual('name1', definition.get_name())
         definition.set_name('name2')
         self.assertEqual('name2', definition.get_name())
+        definition.set_name(None)
+        self.assertEqual(None, definition.get_name())
+        definition = Definition(name = 'name1')
+        self.assertEqual('name1', definition.get_name())
 
     def test_attributes(self):
         definition = Definition('with attributes', {'a': 'b', 'c': 'd'})
         self.assertEqual('b', definition.get_attribute('a'))
         self.assertEqual('d', definition.get_attribute('c'))
-        self.assertEqual(None, definition.get_attribute('e'))
+        self.assertRaises(KeyError, definition.get_attribute, 'e')
         definition.set_attribute('e', 'f')
         self.assertEqual('f', definition.get_attribute('e'))
         definition.set_attribute('e', 'g')
         self.assertEqual('g', definition.get_attribute('e'))
         definition.remove_attribute('e')
-        self.assertEqual(None, definition.get_attribute('e'))
+        self.assertRaises(KeyError, definition.get_attribute, 'e')
         self.assertRaises(KeyError, definition.remove_attribute, 'e')
+        definition = Definition(attributes = {'a': 'b'})
+        self.assertEqual('b', definition.get_attribute('a'))
+        self.assertRaises(KeyError, definition.get_attribute, 'e')
 
     def test_value(self):
         self.assertRaises(KeyError, Definition, 'name', {'value': 'x'})
@@ -89,48 +96,60 @@ class DefinitionElementTest(unittest.TestCase):
         self.assertEqual('x', definition.get_attribute('value'))
         definition.set_attribute('value', 'y')
         self.assertEqual('y', definition.get_attribute('value'))
-        definition.remove_attribute('value')
+        definition.set_attribute('value', None)
         self.assertEqual(None, definition.get_attribute('value'))
+        definition.remove_attribute('value')
+        self.assertRaises(KeyError, definition.get_attribute, 'value')
+        definition = DefinitionElement()
+        self.assertRaises(KeyError, definition.get_attribute, 'value')
 
     def test_from_string(self):
-        text = '<DEFINE name="http.error.file.404" value="404.html" />'
+        text = '<DEFINE />'
         definition = DefinitionElement.from_string(text)
-        self.assertEqual('http.error.file.404', definition.get_name())
-        self.assertEqual('404.html', definition.get_attribute('value'))
-        text = '''<DEFINE server="/opt/bin/fastcgi_server" domain="fastcgi"
-host="localhost" port="2010" local="yes" uid="1000" gid="1000" />'''
+        right = DefinitionElement()
+        self.assertEqual(definition, right)
+
+    def test_from_string_name(self):
+        text = '<DEFINE name="test" />'
         definition = DefinitionElement.from_string(text)
-        self.assertEqual(None, definition.get_attribute('value'))
-        self.assertEqual(None, definition.get_name())
-        self.assertEqual('/opt/bin/fastcgi_server',
-                         definition.get_attribute('server'))
-        self.assertEqual('fastcgi', definition.get_attribute('domain'))
-        self.assertEqual('localhost', definition.get_attribute('host'))
-        self.assertEqual('2010', definition.get_attribute('port'))
-        self.assertEqual('yes', definition.get_attribute('local'))
-        self.assertEqual('1000', definition.get_attribute('uid'))
-        self.assertEqual('1000', definition.get_attribute('gid'))
+        right = DefinitionElement(name = "test")
+        self.assertEqual(definition, right)
 
+    def test_from_string_attributes(self):
+        text = '<DEFINE a="b" b="c" value="x" />'
+        definition = DefinitionElement.from_string(text)
+        right = DefinitionElement(attributes = {'a': 'b', 'b': 'c', 'value': 'x'})
+        self.assertEqual(definition, right)
+
+    def test_from_string_full(self):
+        text = '<DEFINE name="test" value="x" a="b" />'
+        definition = DefinitionElement.from_string(text)
+        right = DefinitionElement('test', {'value': 'x', 'a': 'b'})
+        self.assertEqual(definition, right)
+        
     def test_from_lxml(self):
-        root = etree.Element('DEFINE')
-        root.set('server', '/opt/bin/fastcgi_server')
-        root.set('domain', 'fastcgi')
-        root.set('host', 'localhost')
-        root.set('port', '2010')
-        root.set('local', 'yes')
-        root.set('uid', '1000')
-        root.set('gid', '1000')
-        definition = DefinitionElement.from_lxml_element(root)
-        self.assertEqual(None, definition.get_attribute('value'))
-        self.assertEqual(None, definition.get_name())
-        self.assertEqual('/opt/bin/fastcgi_server',
-                         definition.get_attribute('server'))
-        self.assertEqual('fastcgi', definition.get_attribute('domain'))
-        self.assertEqual('localhost', definition.get_attribute('host'))
-        self.assertEqual('2010', definition.get_attribute('port'))
-        self.assertEqual('yes', definition.get_attribute('local'))
-        self.assertEqual('1000', definition.get_attribute('uid'))
-        self.assertEqual('1000', definition.get_attribute('gid'))
+        text = '<DEFINE />'
+        definition = DefinitionElement.from_lxml_element(etree.XML(text))
+        right = DefinitionElement()
+        self.assertEqual(definition, right)
+
+    def test_from_xml_name(self):
+        text = '<DEFINE name="test" />'
+        definition = DefinitionElement.from_lxml_element(etree.XML(text))
+        right = DefinitionElement(name = "test")
+        self.assertEqual(definition, right)
+
+    def test_from_lxml_attributes(self):
+        text = '<DEFINE a="b" b="c" value="x" />'
+        definition = DefinitionElement.from_lxml_element(etree.XML(text))
+        right = DefinitionElement(attributes = {'a': 'b', 'b': 'c', 'value': 'x'})
+        self.assertEqual(definition, right)
+
+    def test_from_lxml_full(self):
+        text = '<DEFINE name="test" value="x" a="b" />'
+        definition = DefinitionElement.from_lxml_element(etree.XML(text))
+        right = DefinitionElement('test', {'value': 'x', 'a': 'b'})
+        self.assertEqual(definition, right)
 
     def test_equality(self):
         self.assertEqual(DefinitionElement('name', {'some': 'attributes'}),
@@ -142,20 +161,45 @@ host="localhost" port="2010" local="yes" uid="1000" gid="1000" />'''
         self.assertNotEqual(DefinitionElement(), 'different type')
 
     def test_to_string(self):
-        text = '''<DEFINE server="/opt/bin/fastcgi_server" domain="fastcgi"
-host="localhost" port="2010" local="yes" uid="1000" gid="1000" />'''
-        definition = DefinitionElement.from_string(text)
+        definition = DefinitionElement()
+        copy = DefinitionElement.from_string(str(definition))
+        self.assertEqual(definition, copy)
+    
+    def test_to_string_name(self):
+        definition = DefinitionElement(name = 'test')
+        copy = DefinitionElement.from_string(str(definition))
+        self.assertEqual(definition, copy)
+
+    def test_to_string_attributes(self):
+        definition = DefinitionElement(attributes = {'a': 'b', 'b': 'c', 'value': 'x'})
+        copy = DefinitionElement.from_string(str(definition))
+        self.assertEqual(definition, copy)
+
+    def test_to_string_full(self):
+        definition = DefinitionElement('test', {'value': 'x', 'a': 'b'})
         copy = DefinitionElement.from_string(str(definition))
         self.assertEqual(definition, copy)
 
     def test_to_lxml(self):
-        text = '''<DEFINE name="test" server="/opt/bin/fastcgi_server"
-domain="fastcgi" host="localhost" port="2010" local="yes" uid="1000" gid="1000"
-/>'''
-        definition = DefinitionElement.from_string(text)
+        definition = DefinitionElement()
+        copy = DefinitionElement.from_lxml_element(definition.to_lxml_element())
+        self.assertEqual(definition, copy)
+    
+    def test_to_lxml_name(self):
+        definition = DefinitionElement(name = 'test')
+        copy = DefinitionElement.from_lxml_element(definition.to_lxml_element())
+        self.assertEqual(definition, copy)
+
+    def test_to_lxml_attributes(self):
+        definition = DefinitionElement(attributes = {'a': 'b', 'b': 'c', 'value': 'x'})
         copy = DefinitionElement.from_lxml_element(definition.to_lxml_element())
         self.assertEqual(definition, copy)
 
+    def test_to_lxml_full(self):
+        definition = DefinitionElement('test', {'value': 'x', 'a': 'b'})
+        copy = DefinitionElement.from_lxml_element(definition.to_lxml_element())
+        self.assertEqual(definition, copy)
+    
     def test_bad_root_tag(self):
         text = '<ERROR name="http.error.file.404" value="404.html" />'
         self.assertRaises(AttributeError, Definition.from_string, text)
@@ -164,22 +208,17 @@ domain="fastcgi" host="localhost" port="2010" local="yes" uid="1000" gid="1000"
 
 class DefinitionTreeTest(unittest.TestCase):
     def setUp(self):
-        self.element_1 = DefinitionElement('http.error.file.404',
-                                           {'value': '404.html'})
-        self.element_2 = DefinitionElement(
-            attributes = {'server': '/opt/bin/fastcgi_server',
-                          'domain': 'fastcgi', 'host': 'localhost',
-                          'port': '2010', 'local': 'yes',
-                          'uid': '1000', 'gid': '1000'})
+        self.element_0 = DefinitionElement('test', {'value': 'x'})
+        self.element_1 = DefinitionElement(attributes = {'a': 'b', 'b': 'c'})
 
     def test_creation(self):
         definition = DefinitionTree()
         self.assertTrue(isinstance(definition, Definition))
         definition = DefinitionTree('name')
         self.assertTrue(isinstance(definition, Definition))
-        definition = DefinitionTree('name', [self.element_1])
+        definition = DefinitionTree('name', [self.element_0])
         self.assertTrue(isinstance(definition, Definition))
-        definition = DefinitionTree('name', [self.element_2], {'key': 'value'})
+        definition = DefinitionTree('name', [self.element_1], {'key': 'value'})
         self.assertTrue(isinstance(definition, Definition))
 
     def test_value(self):
@@ -187,73 +226,153 @@ class DefinitionTreeTest(unittest.TestCase):
         definition = Definition('name')
         self.assertRaises(KeyError, definition.set_attribute, 'value', 'x')
 
-    def test_values(self):
+    def test_definitions(self):
         definition = DefinitionTree()
-        self.assertEqual(0, len(definition.get_values()))
-        definition.add_value(self.element_1)
-        self.assertEqual(1, len(definition.get_values()))
-        self.assertEqual(self.element_1, definition.get_value(0))
-        definition.add_value(self.element_2)
-        self.assertEqual(2, len(definition.get_values()))
-        self.assertEqual(self.element_1, definition.get_value(0))
-        self.assertEqual(self.element_2, definition.get_value(1))
-        definition.remove_value(0)
-        self.assertEqual(1, len(definition.get_values()))
-        self.assertEqual(self.element_2, definition.get_value(0))
-        definition.add_value(self.element_1, 0)
-        self.assertEqual(2, len(definition.get_values()))
-        self.assertEqual(self.element_1, definition.get_value(0))
-        self.assertEqual(self.element_2, definition.get_value(1))
+        self.assertEqual(0, len(definition.get_definitions()))
+        definition.add_definition(self.element_0)
+        self.assertEqual(1, len(definition.get_definitions()))
+        self.assertEqual(self.element_0, definition.get_definition(0))
+        definition.add_definition(self.element_1)
+        self.assertEqual(2, len(definition.get_definitions()))
+        self.assertEqual(self.element_0, definition.get_definition(0))
+        self.assertEqual(self.element_1, definition.get_definition(1))
+        definition.remove_definition(0)
+        self.assertEqual(1, len(definition.get_definitions()))
+        self.assertEqual(self.element_1, definition.get_definition(0))
+        definition.add_definition(self.element_0, 0)
+        self.assertEqual(2, len(definition.get_definitions()))
+        self.assertEqual(self.element_0, definition.get_definition(0))
+        self.assertEqual(self.element_1, definition.get_definition(1))
+        self.assertRaises(IndexError, definition.get_definition, 2)
+        definition = DefinitionTree(definitions = [self.element_0, self.element_1])
+        self.assertEqual(2, len(definition.get_definitions()))
+        self.assertEqual(self.element_0, definition.get_definition(0))
+        self.assertEqual(self.element_1, definition.get_definition(1))
 
     def test_from_string(self):
-        text = '<DEFINE name="test" key="value">{0}{1}</DEFINE>'.format(
-            self.element_1, self.element_2)
+        text = '<DEFINE />'
         definition = DefinitionTree.from_string(text)
-        self.assertEqual('test', definition.get_name())
-        self.assertEqual('value', definition.get_attribute('key'))
-        definitions = definition.get_values()
-        self.assertEqual(2, len(definitions))
-        self.assertEqual(self.element_1, definitions[0])
-        self.assertEqual(self.element_2, definitions[1])
+        right = DefinitionTree()
+        self.assertEqual(definition, right)
+
+    def test_from_string_name(self):
+        text = '<DEFINE name="test" />'
+        definition = DefinitionTree.from_string(text)
+        right = DefinitionTree(name = "test")
+        self.assertEqual(definition, right)
+
+    def test_from_string_definitions(self):
+        text = '<DEFINE>{0}{1}</DEFINE>'.format(self.element_0, self.element_1)
+        definition = DefinitionTree.from_string(text)
+        right = DefinitionTree(definitions = [self.element_0, self.element_1])
+        self.assertEqual(definition, right)
+
+    def test_from_string_attributes(self):
+        text = '<DEFINE a="b" b="c" />'
+        definition = DefinitionTree.from_string(text)
+        right = DefinitionTree(attributes = {'a': 'b', 'b': 'c'})
+        self.assertEqual(definition, right)
+
+    def test_from_string_full(self):
+        text = '<DEFINE name="test" a="b">{0}{1}</DEFINE>'.format(
+            self.element_0, self.element_1)
+        definition = DefinitionTree.from_string(text)
+        right = DefinitionTree('test', [self.element_0, self.element_1], {'a': 'b'})
+        self.assertEqual(definition, right)
 
     def test_from_lxml(self):
-        root = etree.Element('DEFINE')
-        root.set('name', 'test')
-        root.set('key', 'value')
-        root.append(self.element_1.to_lxml_element())
-        root.append(self.element_2.to_lxml_element())
-        definition = DefinitionTree.from_lxml_element(root)
-        self.assertEqual('test', definition.get_name())
-        self.assertEqual('value', definition.get_attribute('key'))
-        definitions = definition.get_values()
-        self.assertEqual(2, len(definitions))
-        self.assertEqual(self.element_1, definitions[0])
-        self.assertEqual(self.element_2, definitions[1])
+        text = '<DEFINE />'
+        definition = DefinitionTree.from_lxml_element(etree.XML(text))
+        right = DefinitionTree()
+        self.assertEqual(definition, right)
+
+    def test_from_lxml_name(self):
+        text = '<DEFINE name="test" />'
+        definition = DefinitionTree.from_lxml_element(etree.XML(text))
+        right = DefinitionTree(name = "test")
+        self.assertEqual(definition, right)
+
+    def test_from_lxml_definitions(self):
+        text = '<DEFINE>{0}{1}</DEFINE>'.format(self.element_0, self.element_1)
+        definition = DefinitionTree.from_lxml_element(etree.XML(text))
+        right = DefinitionTree(definitions = [self.element_0, self.element_1])
+        self.assertEqual(definition, right)
+
+    def test_from_lxml_attributes(self):
+        text = '<DEFINE a="b" b="c" />'
+        definition = DefinitionTree.from_lxml_element(etree.XML(text))
+        right = DefinitionTree(attributes = {'a': 'b', 'b': 'c'})
+        self.assertEqual(definition, right)
+
+    def test_from_lxml_full(self):
+        text = '<DEFINE name="test" a="b">{0}{1}</DEFINE>'.format(
+            self.element_0, self.element_1)
+        definition = DefinitionTree.from_lxml_element(etree.XML(text))
+        right = DefinitionTree('test', [self.element_0, self.element_1], {'a': 'b'})
+        self.assertEqual(definition, right)
 
     def test_equality(self):
-        text = '<DEFINE name="test" key="value">{0}{1}</DEFINE>'.format(
-            self.element_1, self.element_2)
-        self.assertEqual(DefinitionTree.from_string(text), DefinitionTree.from_string(text))
-        self.assertNotEqual(DefinitionTree.from_string(text), DefinitionTree('test'))
+        definition_0 = DefinitionTree('test', [self.element_0], {'a': 'b'})
+        definition_1 = DefinitionTree('test', [self.element_0], {'a': 'b'})
+        self.assertEqual(definition_0, definition_1)
+        self.assertNotEqual(definition_0, DefinitionTree('', [self.element_0], {'a': 'b'}))
+        self.assertNotEqual(definition_0, DefinitionTree('name', [], {'a': 'b'}))
+        self.assertNotEqual(definition_0, DefinitionTree('name', [self.element_0], {'b': 'b'}))
         self.assertNotEqual(DefinitionTree(), 'different type')
 
     def test_to_string(self):
-        text = '<DEFINE name="test" key="value">{0}{1}</DEFINE>'.format(
-            self.element_1, self.element_2)
-        definition = DefinitionTree.from_string(text)
+        definition = DefinitionTree()
+        copy = DefinitionTree.from_string(str(definition))
+        self.assertEqual(definition, copy)
+
+    def test_to_string_name(self):
+        definition = DefinitionTree(name = "test")
+        copy = DefinitionTree.from_string(str(definition))
+        self.assertEqual(definition, copy)
+
+    def test_top_string_definitions(self):
+        definition = DefinitionTree(definitions = [self.element_0, self.element_1])
         copy = DefinitionTree.from_string(str(definition))
         self.assertEqual(definition, copy)
 
+    def test_top_string_attributes(self):
+        definition = DefinitionTree(attributes = {'a': 'b', 'b': 'c'})
+        copy = DefinitionTree.from_string(str(definition))
+        self.assertEqual(definition, copy)
+
+    def test_to_string_full(self):
+        definition = DefinitionTree('test', [self.element_0, self.element_1], {'a': 'b'})
+        copy = DefinitionTree.from_string(str(definition))
+        self.assertEqual(definition, copy)
+        
     def test_to_lxml(self):
-        text = '<DEFINE name="test" key="value">{0}{1}</DEFINE>'.format(
-            self.element_1, self.element_2)
-        definition = DefinitionTree.from_string(text)
+        definition = DefinitionTree()
+        copy = DefinitionTree.from_lxml_element(definition.to_lxml_element())
+        self.assertEqual(definition, copy)
+
+    def test_to_lxml_name(self):
+        definition = DefinitionTree(name = "test")
+        copy = DefinitionTree.from_lxml_element(definition.to_lxml_element())
+        self.assertEqual(definition, copy)
+
+    def test_top_lxml_definitions(self):
+        definition = DefinitionTree(definitions = [self.element_0, self.element_1])
+        copy = DefinitionTree.from_lxml_element(definition.to_lxml_element())
+        self.assertEqual(definition, copy)
+
+    def test_top_lxml_attributes(self):
+        definition = DefinitionTree(attributes = {'a': 'b', 'b': 'c'})
+        copy = DefinitionTree.from_lxml_element(definition.to_lxml_element())
+        self.assertEqual(definition, copy)
+
+    def test_to_lxml_full(self):
+        definition = DefinitionTree('test', [self.element_0, self.element_1], {'a': 'b'})
         copy = DefinitionTree.from_lxml_element(definition.to_lxml_element())
         self.assertEqual(definition, copy)
 
     def test_bad_root_tag(self):
         text = '<ERROR name="test" key="value">{0}{1}</ERROR>'.format(
-            self.element_1, self.element_2)
+            self.element_0, self.element_1)
         self.assertRaises(AttributeError, Definition.from_string, text)
         self.assertRaises(AttributeError, Definition.from_lxml_element,
                           etree.XML(text))



commit cbfd8d9703f7930d71aa05b01e5415187164cad8
Author: Marek Aaron Sapota <maarons@gnu.org>
Date:   Tue Jul 7 22:04:59 2009 +0200

    Removed valid_* from pycontrollib for greater flexibility.

diff --git a/misc/py_control_client/MyServer/pycontrollib/mimetypes.py b/misc/py_control_client/MyServer/pycontrollib/mimetypes.py
index 031136b..d6f65e8 100644
--- a/misc/py_control_client/MyServer/pycontrollib/mimetypes.py
+++ b/misc/py_control_client/MyServer/pycontrollib/mimetypes.py
@@ -20,9 +20,6 @@ from definition import Definition
 from lxml import etree
 
 class MIMEType():
-    valid_handlers = set(['SEND', 'CGI', 'FASTCGI', 'SCGI', 'MSCGI', 'ISAPI',
-                          'WINCGI', 'PROXY'])
-
     def __init__(self, mime, handler, param = None, extension = [], path = None,
                  filter = [], self_executed = None, definitions = []):
         '''Creates new MIMEType with specified attributes. extension, filter and
@@ -58,9 +55,8 @@ class MIMEType():
 
     def set_handler(self, handler):
         '''Set associated handler.'''
-        if handler not in MIMEType.valid_handlers:
-            raise AttributeError(
-                '{0} is not a valid handler'.format(handler))
+        if handler is None:
+            raise AttributeError('handler is required and can\'t be None')
         self.handler = handler
 
     def get_param(self):
diff --git a/misc/py_control_client/MyServer/pycontrollib/test/mimetypes_test.py b/misc/py_control_client/MyServer/pycontrollib/test/mimetypes_test.py
index 7681af5..6f2a768 100644
--- a/misc/py_control_client/MyServer/pycontrollib/test/mimetypes_test.py
+++ b/misc/py_control_client/MyServer/pycontrollib/test/mimetypes_test.py
@@ -89,11 +89,11 @@ class MIMETypeTest(unittest.TestCase):
         
     def test_handler(self):
         mime = MIMEType('text/plain', 'SEND')
-        for handler in MIMEType.valid_handlers:
-            mime.set_handler(handler)
-            self.assertEqual(handler, mime.get_handler())
-        self.assertRaises(AttributeError, mime.set_handler, 'ERROR')
-        self.assertRaises(AttributeError, MIMEType, 'text/plain', 'ERROR')
+        self.assertEqual('SEND', mime.get_handler())
+        mime.set_handler('SOME HANDLER')
+        self.assertEqual('SOME HANDLER', mime.get_handler())
+        self.assertRaises(AttributeError, mime.set_handler, None)
+        self.assertRaises(AttributeError, MIMEType, 'text/plain', None)
 
     def test_param(self):
         mime = MIMEType('text/plain', 'SEND')
diff --git a/misc/py_control_client/MyServer/pycontrollib/test/vhost_test.py b/misc/py_control_client/MyServer/pycontrollib/test/vhost_test.py
index 0cbb673..b8979d3 100644
--- a/misc/py_control_client/MyServer/pycontrollib/test/vhost_test.py
+++ b/misc/py_control_client/MyServer/pycontrollib/test/vhost_test.py
@@ -57,15 +57,13 @@ class VHostTest(unittest.TestCase):
         vhost = VHost('test vhost', 80, 'HTTP', '/www', '/system',
                       Log('ACCESSLOG'), Log('WARNINGLOG'))
         self.assertEqual('HTTP', vhost.get_protocol())
-        for protocol in VHost.valid_protocols:
-            vhost.set_protocol(protocol)
-            self.assertEqual(protocol, vhost.get_protocol())
+        vhost.set_protocol('HTTPS')
+        self.assertEqual('HTTPS', vhost.get_protocol())
+        vhost.set_protocol('NEW PROTOCOL')
+        self.assertEqual('NEW PROTOCOL', vhost.get_protocol())
         self.assertRaises(AttributeError, vhost.set_protocol, None)
-        self.assertRaises(AttributeError, vhost.set_protocol, 'ERROR')
         self.assertRaises(AttributeError, VHost, 'test vhost', 80, None, '/www',
                           '/system', Log('ACCESSLOG'), Log('WARNINGLOG'))
-        self.assertRaises(AttributeError, VHost, 'test vhost', 80, 'ERROR',
-                          '/www', '/system', Log('ACCESSLOG'), Log('WARNINGLOG'))
 
     def test_doc_root(self):
         vhost = VHost('test vhost', 80, 'HTTP', '/www', '/system',
diff --git a/misc/py_control_client/MyServer/pycontrollib/vhost.py b/misc/py_control_client/MyServer/pycontrollib/vhost.py
index 0c8b0d3..568b902 100644
--- a/misc/py_control_client/MyServer/pycontrollib/vhost.py
+++ b/misc/py_control_client/MyServer/pycontrollib/vhost.py
@@ -20,9 +20,6 @@ from lxml import etree
 from log import Log
 
 class VHost():
-    valid_protocols = set(['HTTP', 'FTP', 'HTTPS', 'ISAPI', 'CGI', 'SCGI',
-                           'FastCGI', 'WinCGI', 'CONTROL'])
-    
     def __init__(self, name, port, protocol, doc_root, sys_folder, access_log,
                  warning_log, ip = [], host = {}):
         '''Create new instance of VHost. access_log and warning_log are expected
@@ -88,8 +85,6 @@ class VHost():
 
     def set_protocol(self, protocol):
         '''Set VHost protocol.'''
-        if protocol not in self.valid_protocols:
-            raise AttributeError('protocol is not valid')
         if protocol is None:
             raise AttributeError('protocol is required and can\'t be None')
         self.protocol = protocol



commit 0831902383662bdb633b4a3dbb53559dc9428dfc
Author: Marek Aaron Sapota <maarons@gnu.org>
Date:   Sat Jul 4 23:24:35 2009 +0200

    Added instructions how to install pycontrol libraries.

diff --git a/misc/py_control_client/INSTALL b/misc/py_control_client/INSTALL
new file mode 100644
index 0000000..84a158d
--- /dev/null
+++ b/misc/py_control_client/INSTALL
@@ -0,0 +1,11 @@
+To install MyServer python control libraries run:
+
+$ python setup.py install
+
+or
+
+$ python setup.py install --prefix=/custom/path
+
+To generate tar.gz package with this libraries run:
+
+$ python setup.py sdist



commit 22a84c341826c11dbb6a89c6dbb113fbd855c264
Author: Marek Aaron Sapota <maarons@gnu.org>
Date:   Sat Jul 4 23:17:37 2009 +0200

    Cleaned mimetypes constructors.

diff --git a/misc/py_control_client/MyServer/pycontrollib/mimetypes.py b/misc/py_control_client/MyServer/pycontrollib/mimetypes.py
index 4103343..031136b 100644
--- a/misc/py_control_client/MyServer/pycontrollib/mimetypes.py
+++ b/misc/py_control_client/MyServer/pycontrollib/mimetypes.py
@@ -23,22 +23,24 @@ class MIMEType():
     valid_handlers = set(['SEND', 'CGI', 'FASTCGI', 'SCGI', 'MSCGI', 'ISAPI',
                           'WINCGI', 'PROXY'])
 
-    def __init__(self, mime, handler, param = None, extension = set(), path = None,
+    def __init__(self, mime, handler, param = None, extension = [], path = None,
                  filter = [], self_executed = None, definitions = []):
-        '''Creates new MIMEType with specified attributes.'''
-        self.mime = mime
-        if mime is None:
-            raise AttributeError('mime is required and can\'t be None')
-        if handler not in MIMEType.valid_handlers:
-            raise AttributeError(
-                '{0} is not a valid handler'.format(handler))
-        self.handler = handler
-        self.param = param
-        self.extension = extension
-        self.path = path
-        self.filter = filter
-        self.self_executed = self_executed
-        self.definitions = definitions
+        '''Creates new MIMEType with specified attributes. extension, filter and
+        definitions are expected to be iterable.'''
+        self.set_mime(mime)
+        self.set_handler(handler)
+        self.set_param(param)
+        self.extension = set()
+        for single_extension in extension:
+            self.add_extension(single_extension)
+        self.set_path(path)
+        self.filter = []
+        for single_filter in filter:
+            self.add_filter(single_filter)
+        self.set_self_executed(self_executed)
+        self.definitions = []
+        for definition in definitions:
+            self.add_definition(definition)
 
     def get_mime(self):
         '''Get associated mime type.'''
@@ -147,7 +149,8 @@ class MIMEType():
             self.self_executed == other.self_executed and \
             self.definitions == other.definitions
 
-    def to_lxml_element(self): 
+    def to_lxml_element(self):
+        '''Convert to lxml.etree.Element.'''
         def make_element(tag, attribute, value):
             element = etree.Element(tag)
             element.set(attribute, value)
@@ -178,7 +181,7 @@ class MIMEType():
 
     @staticmethod
     def from_lxml_element(root):
-        '''Factory to produce MIMEType from etree.Element object.'''
+        '''Factory to produce MIMEType from lxml.etree.Element object.'''
         if root.tag != 'MIME':
             raise AttributeError('Expected MIME tag.')
         mime = root.get('mime', None)
@@ -217,6 +220,7 @@ class MIMETypes():
             self.MIME_types == other.MIME_types
 
     def to_lxml_element(self):
+        '''Convert to lxml.etree.Element.'''
         root = etree.Element('MIMES')
         for mime in self.MIME_types:
             root.append(mime.to_lxml_element())
@@ -227,7 +231,7 @@ class MIMETypes():
         
     @staticmethod
     def from_lxml_element(root):
-        '''Factory to produce MIMETypes from etree.Element object.'''
+        '''Factory to produce MIMETypes from lxml.etree.Element object.'''
         if root.tag != 'MIMES':
             raise AttributeError('Expected MIMES tag.')
         return MIMETypes(map(MIMEType.from_lxml_element, list(root)))



commit d77a6a2d6d3e12e0f4bc2cb107de0071dd06daf6
Author: Marek Aaron Sapota <maarons@gnu.org>
Date:   Sat Jul 4 23:10:21 2009 +0200

    Cleaned up definition constructors.

diff --git a/misc/py_control_client/MyServer/pycontrollib/definition.py b/misc/py_control_client/MyServer/pycontrollib/definition.py
index 1344723..351b898 100644
--- a/misc/py_control_client/MyServer/pycontrollib/definition.py
+++ b/misc/py_control_client/MyServer/pycontrollib/definition.py
@@ -24,10 +24,10 @@ class Definition():
 
     def __init__(self, name = None, attributes = {}):
         '''Creates new definition with given name and attributes.'''
-        if attributes.has_key('value'):
-            raise KeyError('value is not an allowed key')
-        self.name = name
-        self.attributes = attributes
+        self.set_name(name)
+        self.attributes = {}
+        for key, value in attributes.iteritems():
+            self.set_attribute(key, value)
 
     def __eq__(self, other):
         return isinstance(other, Definition) and \
@@ -49,7 +49,7 @@ class Definition():
     def set_attribute(self, key, value):
         '''Set attribute key to given value.'''
         if key == 'value':
-            raise KeyError('value is not an allowd key')
+            raise KeyError('value is not an allowed key')
         self.attributes[key] = value
 
     def remove_attribute(self, key):
@@ -58,7 +58,7 @@ class Definition():
 
     @staticmethod
     def from_lxml_element(root):
-        '''Factory to produce definition element or tree from etree.Element
+        '''Factory to produce definition element or tree from lxml.etree.Element
         object.'''
         if root.tag != 'DEFINE':
             raise AttributeError('Expected DEFINE tag.')
@@ -77,12 +77,9 @@ class DefinitionElement(Definition):
 
     def __init__(self, name = None, attributes = {}):
         '''Creates new definition element with given name and attributes.'''
-        if attributes.has_key('value'):
-            value = attributes.pop('value')
-            Definition.__init__(self, name, attributes)
-            self.attributes['value'] = value
-        else:
-            Definition.__init__(self, name, attributes)
+        Definition.__init__(self, name)
+        for key, value in attributes.iteritems():
+            self.set_attribute(key, value)
 
     def __eq__(self, other):
         return isinstance(other, DefinitionElement) and \
@@ -96,7 +93,7 @@ class DefinitionElement(Definition):
             Definition.set_attribute(self, key, value)
 
     def to_lxml_element(self):
-        '''Convert definition element to etree.Element object.'''
+        '''Convert definition element to lxml.etree.Element object.'''
         root = etree.Element('DEFINE')
         for key, value in self.attributes.iteritems():
             root.set(key, value)
@@ -109,7 +106,8 @@ class DefinitionElement(Definition):
 
     @staticmethod
     def from_lxml_element(root):
-        '''Factory to produce definition element from etree.Element object.'''
+        '''Factory to produce definition element from lxml.etree.Element
+        object.'''
         if root.tag != 'DEFINE':
             raise AttributeError('Expected DEFINE tag.')
         attributes = root.attrib
@@ -126,9 +124,11 @@ class DefinitionTree(Definition):
 
     def __init__(self, name = None, values = [], attributes = {}):
         '''Creates new definition tree with given name, sub-definitions and
-        attributes.'''
+        attributes. values is expected to be iterable.'''
         Definition.__init__(self, name, attributes)
-        self.values = values
+        self.values = []
+        for value in values:
+            self.add_value(value)
 
     def __eq__(self, other):
         return isinstance(other, DefinitionTree) and \
@@ -157,7 +157,7 @@ class DefinitionTree(Definition):
 
     @staticmethod
     def from_lxml_element(root):
-        '''Factory to produce definition tree from etree.Element object.'''
+        '''Factory to produce definition tree from lxml.etree.Element object.'''
         if root.tag != 'DEFINE':
             raise AttributeError('Expected DEFINE tag.')
         attributes = root.attrib
@@ -171,7 +171,7 @@ class DefinitionTree(Definition):
         return DefinitionTree.from_lxml_element(etree.XML(text))
 
     def to_lxml_element(self):
-        '''Convert definition tree to etree.Element object.'''
+        '''Convert definition tree to lxml.etree.Element object.'''
         root = etree.Element('DEFINE')
         for key, value in self.attributes.iteritems():
             root.set(key, value)



commit ed8d39eb36f7fe6a8800db2f7ddb26a389b5b693
Author: Marek Aaron Sapota <maarons@gnu.org>
Date:   Sat Jul 4 23:02:07 2009 +0200

    Cleaned up log constructors.

diff --git a/misc/py_control_client/MyServer/pycontrollib/log.py b/misc/py_control_client/MyServer/pycontrollib/log.py
index 44a65a0..ac9d052 100644
--- a/misc/py_control_client/MyServer/pycontrollib/log.py
+++ b/misc/py_control_client/MyServer/pycontrollib/log.py
@@ -20,12 +20,13 @@ from lxml import etree
 
 class Stream():
     def __init__(self, location, cycle = None, cycle_gzip = None, filter = []):
-        if location is None:
-            raise AttributeError('location is required and can\'t be None')
-        self.location = location
-        self.cycle = cycle
-        self.cycle_gzip = cycle_gzip
-        self.filter = filter
+        '''Create new Stream instance. filter is expected to be iterable.'''
+        self.set_location(location)
+        self.set_cycle(cycle)
+        self.set_cycle_gzip(cycle_gzip)
+        self.filter = []
+        for single_filter in filter:
+            self.add_filter(single_filter)
 
     def __eq__(self, other):
         return isinstance(other, Stream) and \
@@ -86,7 +87,7 @@ class Stream():
 
     @staticmethod
     def from_lxml_element(root):
-        '''Factory to produce stream from etree.Element object.'''
+        '''Factory to produce stream from lxml.etree.Element object.'''
         if root.tag != 'STREAM':
             raise AttributeError('Expected STREAM tag.')
         location = root.get('location')
@@ -104,6 +105,7 @@ class Stream():
         return etree.tostring(self.to_lxml_element(), pretty_print = True)
 
     def to_lxml_element(self):
+        '''Convert to lxml.etree.Element.'''
         root = etree.Element('STREAM')
         root.set('location', self.location)
         if self.cycle is not None:
@@ -118,11 +120,12 @@ class Stream():
 
 class Log():
     def __init__(self, log_type, stream = [], type = None):
-        if log_type is None:
-            raise AttributeError('log_type is required and can\'t be None')
-        self.log_type = log_type
-        self.stream = stream
-        self.type = type
+        '''Create new Log instance. stream is expected to be iterable.'''
+        self.set_log_type(log_type)
+        self.set_type(type)
+        self.stream = []
+        for single_stream in stream:
+            self.add_stream(single_stream)
 
     def __eq__(self, other):
         return isinstance(other, Log) and \
@@ -175,7 +178,7 @@ class Log():
 
     @staticmethod
     def from_lxml_element(root):
-        '''Factory to produce log from etree.Element object.'''
+        '''Factory to produce log from lxml.etree.Element object.'''
         log_type = root.tag
         type = root.get('type', None)
         stream = []
@@ -188,6 +191,7 @@ class Log():
         return etree.tostring(self.to_lxml_element(), pretty_print = True)
 
     def to_lxml_element(self):
+        '''Convert to lxml.etree.Element.'''
         root = etree.Element(self.log_type)
         if self.type is not None:
             root.set('type', self.type)



commit d12a997bfa7d627901ee9de2cf9095d9cd61f6d4
Author: Marek Aaron Sapota <maarons@gnu.org>
Date:   Sat Jul 4 22:51:29 2009 +0200

    Updated method docstrings.

diff --git a/misc/py_control_client/MyServer/pycontrollib/vhost.py b/misc/py_control_client/MyServer/pycontrollib/vhost.py
index a69a94e..0c8b0d3 100644
--- a/misc/py_control_client/MyServer/pycontrollib/vhost.py
+++ b/misc/py_control_client/MyServer/pycontrollib/vhost.py
@@ -25,6 +25,10 @@ class VHost():
     
     def __init__(self, name, port, protocol, doc_root, sys_folder, access_log,
                  warning_log, ip = [], host = {}):
+        '''Create new instance of VHost. access_log and warning_log are expected
+        to be instances of MyServer.pycontrollib.log.Log class. ip is expected
+        to be a collection and host is expected to be a dict {name: useRegex}
+        where None means not set.'''
         self.set_name(name)
         self.set_port(port)
         self.set_protocol(protocol)
@@ -105,7 +109,8 @@ class VHost():
         return self.access_log
 
     def set_access_log(self, access_log):
-        '''Set VHost access log.'''
+        '''Set VHost access log. access_log is expected to be an instance of
+        MyServer.pycontrollib.log.Log class.'''
         if access_log is None:
             raise AttributeError('access_log is required and can\'t be None')
         if not isinstance(access_log, Log) or \
@@ -118,7 +123,8 @@ class VHost():
         return self.warning_log
 
     def set_warning_log(self, warning_log):
-        '''Set VHost warning_log.'''
+        '''Set VHost warning_log. warning_log is expected to be an instance of
+        MyServer.pycontrollib.log.Log class'''
         if warning_log is None:
             raise AttributeError('warning_log is required and can\'t be None')
         if not isinstance(warning_log, Log) or \
@@ -143,7 +149,7 @@ class VHost():
         return self.host
 
     def add_host(self, host, use_regex = None):
-        '''Add host to VHost dict.'''
+        '''Add host to VHost host dict.'''
         self.host[host] = use_regex
 
     def remove_host(self, host):
@@ -154,6 +160,7 @@ class VHost():
         return etree.tostring(self.to_lxml_element(), pretty_print = True)
 
     def to_lxml_element(self):
+        '''Convert to instance of lxml.etree.Element.'''
         def make_element(tag, text):
             element = etree.Element(tag)
             element.text = text
@@ -177,7 +184,7 @@ class VHost():
 
     @staticmethod
     def from_lxml_element(root):
-        '''Factory to produce VHost from etree.Element object.'''
+        '''Factory to produce VHost from lxml.etree.Element object.'''
         if root.tag != 'VHOST':
             raise AttributeError('Expected VHOST tag.')
         name = None
@@ -221,12 +228,15 @@ class VHost():
 
 class VHosts():
     def __init__(self, VHosts):
+        '''Create a new instance of VHosts. VHosts attribute is expected to be a
+        list.'''
         self.VHosts = VHosts
 
     def __eq__(self, other):
         return isinstance(other, VHosts) and self.VHosts == other.VHosts
 
     def to_lxml_element(self):
+        '''Convert to lxml.etree.Element.'''
         root = etree.Element('VHOSTS')
         for vhost in self.VHosts:
             root.append(vhost.to_lxml_element())
@@ -237,7 +247,7 @@ class VHosts():
 
     @staticmethod
     def from_lxml_element(root):
-        '''Factory to produce VHosts from etree.Element object.'''
+        '''Factory to produce VHosts from lxml.etree.Element object.'''
         if root.tag != 'VHOSTS':
             raise AttributeError('Expected VHOSTS tag.')
         return VHosts(map(VHost.from_lxml_element, list(root)))



commit 9800f5ab48f188c8059d31655aa07d93af1c205b
Author: Marek Aaron Sapota <maarons@gnu.org>
Date:   Sat Jul 4 22:40:09 2009 +0200

    Added control to valid protocols.

diff --git a/misc/py_control_client/MyServer/pycontrollib/vhost.py b/misc/py_control_client/MyServer/pycontrollib/vhost.py
index 9a8329a..a69a94e 100644
--- a/misc/py_control_client/MyServer/pycontrollib/vhost.py
+++ b/misc/py_control_client/MyServer/pycontrollib/vhost.py
@@ -21,7 +21,7 @@ from log import Log
 
 class VHost():
     valid_protocols = set(['HTTP', 'FTP', 'HTTPS', 'ISAPI', 'CGI', 'SCGI',
-                           'FastCGI', 'WinCGI'])
+                           'FastCGI', 'WinCGI', 'CONTROL'])
     
     def __init__(self, name, port, protocol, doc_root, sys_folder, access_log,
                  warning_log, ip = [], host = {}):



commit f8cb67b5f730bb0e7e4dde7e32ef62a4766ee25e
Author: Marek Aaron Sapota <maarons@gnu.org>
Date:   Sat Jul 4 22:22:42 2009 +0200

    Added setup script for packaging and distribution of pycontrol.

diff --git a/misc/py_control_client/setup.py b/misc/py_control_client/setup.py
new file mode 100644
index 0000000..17415cd
--- /dev/null
+++ b/misc/py_control_client/setup.py
@@ -0,0 +1,22 @@
+# -*- coding: utf-8 -*-
+'''
+MyServer
+Copyright (C) 2009 Free Software Foundation, Inc.
+This program 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 3 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program.  If not, see <http://www.gnu.org/licenses/>.
+'''
+
+from distutils.core import setup
+setup(name = 'MyServer', version = '0.0',
+      py_modules = ['MyServer.__init__'],
+      packages = ['MyServer/pycontrol', 'MyServer/pycontrollib'])



commit 104c01ca3fa9b00bb9c1c7904025e55475c32789
Author: Marek Aaron Sapota <maarons@gnu.org>
Date:   Sat Jul 4 21:33:51 2009 +0200

    Added VHosts class.
    
    VHosts is ordered collection of VHost classes.

diff --git a/misc/py_control_client/MyServer/pycontrollib/test/vhost_test.py b/misc/py_control_client/MyServer/pycontrollib/test/vhost_test.py
index 7342f05..0cbb673 100644
--- a/misc/py_control_client/MyServer/pycontrollib/test/vhost_test.py
+++ b/misc/py_control_client/MyServer/pycontrollib/test/vhost_test.py
@@ -17,7 +17,7 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 '''
 
 import unittest
-from vhost import VHost
+from vhost import VHost, VHosts
 from log import Log
 from lxml import etree
 
@@ -296,5 +296,49 @@ class VHostTest(unittest.TestCase):
         self.assertRaises(AttributeError, VHost.from_lxml_element,
                           etree.XML(text))
 
+class VHostsTest(unittest.TestCase):
+    def setUp(self):
+        self.vhost_0 = VHost('vhost 0', 80, 'HTTP', '/www', '/system',
+                             Log('ACCESSLOG'), Log('WARNINGLOG'),
+                             ['127.0.0.0/8', '192.168.0.0/16'],
+                             {'host.domain': True, 'test.domain': None})
+        self.vhost_1 = VHost('vhost 1', 443, 'HTTPS', '/www', '/system',
+                             Log('ACCESSLOG'), Log('WARNINGLOG'))
+        self.text = '<VHOSTS>{0}{1}</VHOSTS>'.format(str(self.vhost_0),
+                                                     str(self.vhost_1))
+
+    def test_creation(self):
+        vhosts = VHosts([self.vhost_0, self.vhost_1])
+        self.assertEqual(vhosts.VHosts[0], self.vhost_0)
+        self.assertEqual(vhosts.VHosts[1], self.vhost_1)
+
+    def test_from_string(self):
+        vhosts = VHosts.from_string(self.text)
+        self.assertEqual(vhosts.VHosts[0], self.vhost_0)
+        self.assertEqual(vhosts.VHosts[1], self.vhost_1)
+
+    def test_from_string(self):
+        vhosts = VHosts.from_lxml_element(etree.XML(self.text))
+        self.assertEqual(vhosts.VHosts[0], self.vhost_0)
+        self.assertEqual(vhosts.VHosts[1], self.vhost_1)
+
+    def test_to_string(self):
+        vhosts = VHosts.from_string(self.text)
+        copy = VHosts.from_string(str(vhosts))
+        self.assertEqual(vhosts, copy)
+
+    def test_to_lxml(self):
+        vhosts = VHosts.from_string(self.text)
+        copy = VHosts.from_lxml_element(vhosts.to_lxml_element())
+        self.assertEqual(vhosts, copy)
+
+    def test_equality(self):
+        self.assertEqual(VHosts.from_string(self.text),
+                         VHosts.from_string(self.text))
+        self.assertNotEqual(VHosts.from_string(self.text),
+                            VHosts.from_string(
+                '<VHOSTS>{0}</VHOSTS>'.format(str(self.vhost_0))))
+        self.assertNotEqual(VHosts.from_string(self.text), [])
+
 if __name__ == '__main__':
     unittest.main()
diff --git a/misc/py_control_client/MyServer/pycontrollib/vhost.py b/misc/py_control_client/MyServer/pycontrollib/vhost.py
index cc8adf3..9a8329a 100644
--- a/misc/py_control_client/MyServer/pycontrollib/vhost.py
+++ b/misc/py_control_client/MyServer/pycontrollib/vhost.py
@@ -218,3 +218,31 @@ class VHost():
     def from_string(text):
         '''Factory to produce VHost by parsing a string.'''
         return VHost.from_lxml_element(etree.XML(text))
+
+class VHosts():
+    def __init__(self, VHosts):
+        self.VHosts = VHosts
+
+    def __eq__(self, other):
+        return isinstance(other, VHosts) and self.VHosts == other.VHosts
+
+    def to_lxml_element(self):
+        root = etree.Element('VHOSTS')
+        for vhost in self.VHosts:
+            root.append(vhost.to_lxml_element())
+        return root
+
+    def __str__(self):
+        return etree.tostring(self.to_lxml_element(), pretty_print = True)
+
+    @staticmethod
+    def from_lxml_element(root):
+        '''Factory to produce VHosts from etree.Element object.'''
+        if root.tag != 'VHOSTS':
+            raise AttributeError('Expected VHOSTS tag.')
+        return VHosts(map(VHost.from_lxml_element, list(root)))
+
+    @staticmethod
+    def from_string(text):
+        '''Factory to produce VHosts from parsing a string.'''
+        return VHosts.from_lxml_element(etree.XML(text))



commit f07fbf3093aa9ac5617313795b7d4aae68ac73ce
Author: Marek Aaron Sapota <maarons@gnu.org>
Date:   Sat Jul 4 21:22:41 2009 +0200

    Added constructor tests for mimetypes.

diff --git a/misc/py_control_client/MyServer/pycontrollib/test/mimetypes_test.py b/misc/py_control_client/MyServer/pycontrollib/test/mimetypes_test.py
index 011ba02..7681af5 100644
--- a/misc/py_control_client/MyServer/pycontrollib/test/mimetypes_test.py
+++ b/misc/py_control_client/MyServer/pycontrollib/test/mimetypes_test.py
@@ -207,6 +207,12 @@ class MIMETypesTest(unittest.TestCase):
 </MIME>'''
         self.text = '<MIMES>{0}{1}</MIMES>'.format(self.mime_0, self.mime_1)
     
+    def test_creation(self):
+        mimes = MIMETypes([MIMEType.from_string(self.mime_0),
+                           MIMEType.from_string(self.mime_1)])
+        self.assertEqual(mimes.MIME_types[0], MIMEType.from_string(self.mime_0))
+        self.assertEqual(mimes.MIME_types[1], MIMEType.from_string(self.mime_1))
+
     def test_from_string(self):
         mimes = MIMETypes.from_string(self.text)
         self.assertEqual(mimes.MIME_types[0], MIMEType.from_string(self.mime_0))



commit 4f880beec5e188d1386d04ab974f954ba50fd862
Author: Marek Aaron Sapota <maarons@gnu.org>
Date:   Sat Jul 4 21:16:50 2009 +0200

    Changed Makefile rules to match test filenames.

diff --git a/misc/py_control_client/MyServer/pycontrollib/test/Makefile b/misc/py_control_client/MyServer/pycontrollib/test/Makefile
index e8e455b..d6b833d 100644
--- a/misc/py_control_client/MyServer/pycontrollib/test/Makefile
+++ b/misc/py_control_client/MyServer/pycontrollib/test/Makefile
@@ -16,20 +16,20 @@
 PYTHON=/usr/bin/python
 PYTHONPATH:=$(shell dirname `pwd`):${PYTHONPATH}
 
-.PHONY: test test_log test_definition test_mimetypes test_vhost
+.PHONY: test log_test definition_test mimetypes_test vhost_test
 
-test: test_log test_definition test_mimetypes test_vhost
+test: log_test definition_test mimetypes_test vhost_test
 
-test_log:
+log_test:
 	-${PYTHON} log_test.py
 
-test_definition:
+definition_test:
 	-${PYTHON} definition_test.py
 
-test_mimetypes:
+mimetypes_test:
 	-${PYTHON} mimetypes_test.py
 
-test_vhost:
+vhost_test:
 	-${PYTHON} vhost_test.py
 
 .PHONY: clean



commit 5a1090eeb67304fea24bdf4d11edcec371e595b1
Author: Marek Aaron Sapota <maarons@gnu.org>
Date:   Sat Jul 4 00:05:51 2009 +0200

    Added factory methods for VHost.

diff --git a/misc/py_control_client/MyServer/pycontrollib/test/vhost_test.py b/misc/py_control_client/MyServer/pycontrollib/test/vhost_test.py
index 1b35ebe..7342f05 100644
--- a/misc/py_control_client/MyServer/pycontrollib/test/vhost_test.py
+++ b/misc/py_control_client/MyServer/pycontrollib/test/vhost_test.py
@@ -206,5 +206,95 @@ class VHostTest(unittest.TestCase):
         self.assertNotEqual(vhost_0, vhost_1)
         self.assertNotEqual(vhost_0, [])
 
+    def test_from_string(self):
+        text = '''<VHOST>
+  <NAME>test vhost</NAME>
+  <PORT>80</PORT>
+  <IP>127.0.0.0/8</IP>
+  <IP>192.168.0.0/16</IP>
+  <PROTOCOL>HTTP</PROTOCOL>
+  <DOCROOT>/www</DOCROOT>
+  <SYSFOLDER>/system</SYSFOLDER>
+  <HOST useRegex="YES">host.domain</HOST>
+  <HOST>test.domain</HOST>
+  <ACCESSLOG />
+  <WARNINGLOG />
+</VHOST>'''
+        vhost = VHost.from_string(text)
+        self.assertEqual(vhost, VHost('test vhost', 80, 'HTTP', '/www', '/system',
+                                      Log('ACCESSLOG'), Log('WARNINGLOG'),
+                                      ['127.0.0.0/8', '192.168.0.0/16'],
+                                      {'host.domain': True, 'test.domain': None}))
+
+    def test_from_lxml(self):
+        text = '''<VHOST>
+  <NAME>test vhost</NAME>
+  <PORT>80</PORT>
+  <IP>127.0.0.0/8</IP>
+  <IP>192.168.0.0/16</IP>
+  <PROTOCOL>HTTP</PROTOCOL>
+  <DOCROOT>/www</DOCROOT>
+  <SYSFOLDER>/system</SYSFOLDER>
+  <HOST useRegex="YES">host.domain</HOST>
+  <HOST>test.domain</HOST>
+  <ACCESSLOG />
+  <WARNINGLOG />
+</VHOST>'''
+        vhost = VHost.from_lxml_element(etree.XML(text))
+        self.assertEqual(vhost, VHost('test vhost', 80, 'HTTP', '/www', '/system',
+                                 Log('ACCESSLOG'), Log('WARNINGLOG'),
+                                 ['127.0.0.0/8', '192.168.0.0/16'],
+                                 {'host.domain': True, 'test.domain': None}))
+
+    def test_to_string(self):
+        text = '''<VHOST>
+  <NAME>test vhost</NAME>
+  <PORT>80</PORT>
+  <IP>127.0.0.0/8</IP>
+  <IP>192.168.0.0/16</IP>
+  <PROTOCOL>HTTP</PROTOCOL>
+  <DOCROOT>/www</DOCROOT>
+  <SYSFOLDER>/system</SYSFOLDER>
+  <HOST useRegex="YES">host.domain</HOST>
+  <HOST>test.domain</HOST>
+  <ACCESSLOG />
+  <WARNINGLOG />
+</VHOST>'''
+        vhost = VHost.from_string(text)
+        copy = VHost.from_string(str(vhost))
+        self.assertEqual(vhost, copy)
+
+    def test_to_lxml(self):
+        text = '''<VHOST>
+  <NAME>test vhost</NAME>
+  <PORT>80</PORT>
+  <IP>127.0.0.0/8</IP>
+  <IP>192.168.0.0/16</IP>
+  <PROTOCOL>HTTP</PROTOCOL>
+  <DOCROOT>/www</DOCROOT>
+  <SYSFOLDER>/system</SYSFOLDER>
+  <HOST useRegex="YES">host.domain</HOST>
+  <HOST>test.domain</HOST>
+  <ACCESSLOG />
+  <WARNINGLOG />
+</VHOST>'''
+        vhost = VHost.from_string(text)
+        copy = VHost.from_lxml_element(vhost.to_lxml_element())
+        self.assertEqual(vhost, copy)
+
+    def test_bad_root_tag(self):
+        text = '''<ERROR>
+  <NAME>test vhost</NAME>
+  <PORT>80</PORT>
+  <PROTOCOL>HTTP</PROTOCOL>
+  <DOCROOT>/www</DOCROOT>
+  <SYSFOLDER>/system</SYSFOLDER>
+  <ACCESSLOG />
+  <WARNINGLOG />
+</ERROR>'''
+        self.assertRaises(AttributeError, VHost.from_string, text)
+        self.assertRaises(AttributeError, VHost.from_lxml_element,
+                          etree.XML(text))
+
 if __name__ == '__main__':
     unittest.main()
diff --git a/misc/py_control_client/MyServer/pycontrollib/vhost.py b/misc/py_control_client/MyServer/pycontrollib/vhost.py
index 4375905..cc8adf3 100644
--- a/misc/py_control_client/MyServer/pycontrollib/vhost.py
+++ b/misc/py_control_client/MyServer/pycontrollib/vhost.py
@@ -98,7 +98,7 @@ class VHost():
         '''Set VHost port.'''
         if port is None:
             raise AttributeError('port is required and can\'t be None')
-        self.port = port
+        self.port = int(port)
 
     def get_access_log(self):
         '''Get VHost access log.'''
@@ -149,3 +149,72 @@ class VHost():
     def remove_host(self, host):
         '''Remove host from VHost host dict.'''
         self.host.pop(host)
+
+    def __str__(self):
+        return etree.tostring(self.to_lxml_element(), pretty_print = True)
+
+    def to_lxml_element(self):
+        def make_element(tag, text):
+            element = etree.Element(tag)
+            element.text = text
+            return element
+        root = etree.Element('VHOST')
+        root.append(make_element('NAME', self.name))
+        root.append(make_element('PORT', str(self.port)))
+        root.append(make_element('PROTOCOL', self.protocol))
+        root.append(make_element('DOCROOT', self.doc_root))
+        root.append(make_element('SYSFOLDER', self.sys_folder))
+        for ip_address in self.ip:
+            root.append(make_element('IP', ip_address))
+        for host, use_regex in self.host.iteritems():
+            element = make_element('HOST', host)
+            if use_regex is not None:
+                element.set('useRegex', 'YES' if use_regex else 'NO')
+            root.append(element)
+        root.append(self.access_log.to_lxml_element())
+        root.append(self.warning_log.to_lxml_element())
+        return root
+
+    @staticmethod
+    def from_lxml_element(root):
+        '''Factory to produce VHost from etree.Element object.'''
+        if root.tag != 'VHOST':
+            raise AttributeError('Expected VHOST tag.')
+        name = None
+        port = None
+        protocol = None
+        doc_root = None
+        sys_folder = None
+        ip = []
+        host = {}
+        access_log = None
+        warning_log = None
+        for child in list(root):
+            if child.tag == 'NAME':
+                name = child.text
+            elif child.tag == 'PORT':
+                port = child.text
+            elif child.tag == 'PROTOCOL':
+                protocol = child.text
+            elif child.tag == 'DOCROOT':
+                doc_root = child.text
+            elif child.tag == 'SYSFOLDER':
+                sys_folder = child.text
+            elif child.tag == 'IP':
+                ip.append(child.text)
+            elif child.tag == 'HOST':
+                use_regex = child.get('useRegex', None)
+                if use_regex is not None:
+                    use_regex = use_regex == 'YES'
+                host[child.text] = use_regex
+            elif child.tag == 'ACCESSLOG':
+                access_log = Log.from_lxml_element(child)
+            elif child.tag == 'WARNINGLOG':
+                warning_log = Log.from_lxml_element(child)
+        return VHost(name, port, protocol, doc_root, sys_folder, access_log,
+                     warning_log, ip, host)
+    
+    @staticmethod
+    def from_string(text):
+        '''Factory to produce VHost by parsing a string.'''
+        return VHost.from_lxml_element(etree.XML(text))



commit daf0d6ba253e47b2dd150519c1eb561672d38c0f
Author: Marek Aaron Sapota <maarons@gnu.org>
Date:   Fri Jul 3 22:46:06 2009 +0200

    Extended VHost class.
    
    Still there are no factories for VHost.

diff --git a/misc/py_control_client/MyServer/pycontrollib/test/vhost_test.py b/misc/py_control_client/MyServer/pycontrollib/test/vhost_test.py
index 72b0702..1b35ebe 100644
--- a/misc/py_control_client/MyServer/pycontrollib/test/vhost_test.py
+++ b/misc/py_control_client/MyServer/pycontrollib/test/vhost_test.py
@@ -17,68 +17,78 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 '''
 
 import unittest
-from vhost import Vhost
+from vhost import VHost
 from log import Log
 from lxml import etree
 
-class VhostTest(unittest.TestCase):
+class VHostTest(unittest.TestCase):
     def test_creation(self):
-        vhost = Vhost('test vhost', 80, 'HTTP', '/www', '/system',
+        vhost = VHost('test vhost', 80, 'HTTP', '/www', '/system',
                       Log('ACCESSLOG'), Log('WARNINGLOG'))
-        vhost = Vhost('test vhost', 80, 'HTTP', '/www', '/system',
+        vhost = VHost('test vhost', 80, 'HTTP', '/www', '/system',
                       Log('ACCESSLOG'), Log('WARNINGLOG'),
-                      set(['127.0.0.0/8', '192.168.0.0/16']))
-        vhost = Vhost('test vhost', 80, 'HTTP', '/www', '/system',
+                      ['127.0.0.0/8', '192.168.0.0/16'])
+        vhost = VHost('test vhost', 80, 'HTTP', '/www', '/system',
                       Log('ACCESSLOG'), Log('WARNINGLOG'),
-                      set(['127.0.0.0/8', '192.168.0.0/16']),
-                      set(['host.domain']))
-        vhost = Vhost('test vhost', 80, 'HTTP', '/www', '/system',
-                      Log('ACCESSLOG'), Log('WARNINGLOG'),
-                      set(['127.0.0.0/8', '192.168.0.0/16']),
-                      set(['host.domain']), True)
+                      ['127.0.0.0/8', '192.168.0.0/16'],
+                      {'host.domain': None})
 
     def test_name(self):
-        vhost = Vhost('test vhost', 80, 'HTTP', '/www', '/system',
+        vhost = VHost('test vhost', 80, 'HTTP', '/www', '/system',
                       Log('ACCESSLOG'), Log('WARNINGLOG'))
         self.assertEqual('test vhost', vhost.get_name())
         vhost.set_name('vhost')
         self.assertEqual('vhost', vhost.get_name())
         self.assertRaises(AttributeError, vhost.set_name, None)
+        self.assertRaises(AttributeError, VHost, None, 80, 'HTTP',
+                          '/www', '/system', Log('ACCESSLOG'), Log('WARNINGLOG'))
 
     def test_port(self):
-        vhost = Vhost('test vhost', 80, 'HTTP', '/www', '/system',
+        vhost = VHost('test vhost', 80, 'HTTP', '/www', '/system',
                       Log('ACCESSLOG'), Log('WARNINGLOG'))
         self.assertEqual(80, vhost.get_port())
         vhost.set_port(8080)
         self.assertEqual(8080, vhost.get_port())
         self.assertRaises(AttributeError, vhost.set_port, None)
+        self.assertRaises(AttributeError, VHost, 'test vhost', None, 'HTTP',
+                          '/www', '/system', Log('ACCESSLOG'), Log('WARNINGLOG'))
 
     def test_protocol(self):
-        vhost = Vhost('test vhost', 80, 'HTTP', '/www', '/system',
+        vhost = VHost('test vhost', 80, 'HTTP', '/www', '/system',
                       Log('ACCESSLOG'), Log('WARNINGLOG'))
         self.assertEqual('HTTP', vhost.get_protocol())
-        vhost.set_protocol('FTP')
-        self.assertEqual('FTP', vhost.get_protocol())
+        for protocol in VHost.valid_protocols:
+            vhost.set_protocol(protocol)
+            self.assertEqual(protocol, vhost.get_protocol())
         self.assertRaises(AttributeError, vhost.set_protocol, None)
+        self.assertRaises(AttributeError, vhost.set_protocol, 'ERROR')
+        self.assertRaises(AttributeError, VHost, 'test vhost', 80, None, '/www',
+                          '/system', Log('ACCESSLOG'), Log('WARNINGLOG'))
+        self.assertRaises(AttributeError, VHost, 'test vhost', 80, 'ERROR',
+                          '/www', '/system', Log('ACCESSLOG'), Log('WARNINGLOG'))
 
-    def test_docroot(self):
-        vhost = Vhost('test vhost', 80, 'HTTP', '/www', '/system',
+    def test_doc_root(self):
+        vhost = VHost('test vhost', 80, 'HTTP', '/www', '/system',
                       Log('ACCESSLOG'), Log('WARNINGLOG'))
-        self.assertEqual('/www', vhost.get_docroot())
-        vhost.set_docroot('/var/www')
-        self.assertEqual('/var/www', vhost.get_docroot())
-        self.assertRaises(AttributeError, vhost.set_docroot, None)
+        self.assertEqual('/www', vhost.get_doc_root())
+        vhost.set_doc_root('/var/www')
+        self.assertEqual('/var/www', vhost.get_doc_root())
+        self.assertRaises(AttributeError, vhost.set_doc_root, None)
+        self.assertRaises(AttributeError, VHost, 'test vhost', 80, 'HTTP',
+                          None, '/system', Log('ACCESSLOG'), Log('WARNINGLOG'))
 
-    def test_sysfolder(self):
-        vhost = Vhost('test vhost', 80, 'HTTP', '/www', '/system',
+    def test_sys_folder(self):
+        vhost = VHost('test vhost', 80, 'HTTP', '/www', '/system',
                       Log('ACCESSLOG'), Log('WARNINGLOG'))
-        self.assertEqual('/system', vhost.get_sysfolder())
-        vhost.set_sysfolder('/var/system')
-        self.assertEqual('/var/system', vhost.get_sysfolder())
-        self.assertRaises(AttributeError, vhost.set_sysfolder, None)
+        self.assertEqual('/system', vhost.get_sys_folder())
+        vhost.set_sys_folder('/var/system')
+        self.assertEqual('/var/system', vhost.get_sys_folder())
+        self.assertRaises(AttributeError, vhost.set_sys_folder, None)
+        self.assertRaises(AttributeError, VHost, 'test vhost', 80, 'HTTP',
+                          '/www', None, Log('ACCESSLOG'), Log('WARNINGLOG'))
 
     def test_log(self):
-        vhost = Vhost('test vhost', 80, 'HTTP', '/www', '/system',
+        vhost = VHost('test vhost', 80, 'HTTP', '/www', '/system',
                       Log('ACCESSLOG'), Log('WARNINGLOG'))
         self.assertEqual(Log('ACCESSLOG'), vhost.get_access_log())
         self.assertEqual(Log('WARNINGLOG'), vhost.get_warning_log())
@@ -90,9 +100,19 @@ class VhostTest(unittest.TestCase):
                          vhost.get_warning_log())
         self.assertRaises(AttributeError, vhost.set_access_log, None)
         self.assertRaises(AttributeError, vhost.set_warning_log, None)
+        self.assertRaises(AttributeError, vhost.set_access_log, Log('ERROR'))
+        self.assertRaises(AttributeError, vhost.set_warning_log, Log('ERROR'))
+        self.assertRaises(AttributeError, VHost, 'test vhost', 80, 'HTTP',
+                          '/www', '/system', None, Log('WARNINGLOG'))
+        self.assertRaises(AttributeError, VHost, 'test vhost', 80, 'HTTP',
+                          '/www', '/system', Log('ACCESSLOG'), None)
+        self.assertRaises(AttributeError, VHost, 'test vhost', 80, 'HTTP',
+                          '/www', '/system', Log('ERROR'), Log('WARNINGLOG'))
+        self.assertRaises(AttributeError, VHost, 'test vhost', 80, 'HTTP',
+                          '/www', '/system', Log('ACCESSLOG'), Log('ERROR'))
 
     def test_ip(self):
-        vhost = Vhost('test vhost', 80, 'HTTP', '/www', '/system',
+        vhost = VHost('test vhost', 80, 'HTTP', '/www', '/system',
                       Log('ACCESSLOG'), Log('WARNINGLOG'))
         self.assertEqual(set(), vhost.get_ip())
         vhost.add_ip('10.0.0.0/8')
@@ -100,39 +120,91 @@ class VhostTest(unittest.TestCase):
         self.assertEqual(set(['10.0.0.0/8', '192.168.0.0/16']), vhost.get_ip())
         vhost.remove_ip('10.0.0.0/8')
         self.assertEqual(set(['192.168.0.0/16']), vhost.get_ip())
-        vhost = Vhost('test vhost', 80, 'HTTP', '/www', '/system',
+        vhost = VHost('test vhost', 80, 'HTTP', '/www', '/system',
+                      Log('ACCESSLOG'), Log('WARNINGLOG'),
+                      ['127.0.0.0/8', '192.168.0.0/16'])
+        self.assertEqual(set(['127.0.0.0/8', '192.168.0.0/16']), vhost.get_ip())
+        vhost = VHost('test vhost', 80, 'HTTP', '/www', '/system',
                       Log('ACCESSLOG'), Log('WARNINGLOG'),
-                      set(['127.0.0.0/8', '192.168.0.0/16']))
+                      ip = ['127.0.0.0/8', '192.168.0.0/16'])
         self.assertEqual(set(['127.0.0.0/8', '192.168.0.0/16']), vhost.get_ip())
 
     def test_host(self):
-        vhost = Vhost('test vhost', 80, 'HTTP', '/www', '/system',
+        vhost = VHost('test vhost', 80, 'HTTP', '/www', '/system',
                       Log('ACCESSLOG'), Log('WARNINGLOG'))
-        self.assertEqual(set(), vhost.get_host())
-        vhost.add_host('foo.bar.com')
+        self.assertEqual({}, vhost.get_host())
+        vhost.add_host('foo.bar.com', False)
         vhost.add_host('test.me.org')
-        self.assertEqual(set(['foo.bar.com', 'test.me.org']), vhost.get_host())
+        self.assertEqual({'foo.bar.com': False, 'test.me.org': None},
+                         vhost.get_host())
         vhost.remove_host('foo.bar.com')
-        self.assertEqual(set(['test.me.org']), vhost.get_host())
-        vhost = Vhost('test vhost', 80, 'HTTP', '/www', '/system',
+        self.assertEqual({'test.me.org': None}, vhost.get_host())
+        vhost = VHost('test vhost', 80, 'HTTP', '/www', '/system',
                       Log('ACCESSLOG'), Log('WARNINGLOG'),
-                      set(['127.0.0.0/8', '192.168.0.0/16']),
-                      set(['test.me.org']))
-        self.assertEqual(set(['test.me.org']), vhost.get_host())
-
-    def test_host_use_regex(self):
-        vhost = Vhost('test vhost', 80, 'HTTP', '/www', '/system',
-                      Log('ACCESSLOG'), Log('WARNINGLOG'))
-        self.assertEqual(None, vhost.get_host_use_regex())
-        vhost.set_host_use_regex(True)
-        self.assertEqual(True, vhost.get_use_regex())
-        vhost.set_host_use_regex(None)
-        self.assertEqual(None, vhost.get_host_use_regex())
-        vhost = Vhost('test vhost', 80, 'HTTP', '/www', '/system',
+                      ['127.0.0.0/8', '192.168.0.0/16'],
+                      {'test.me.org': None})
+        self.assertEqual({'test.me.org': None}, vhost.get_host())
+        vhost = VHost('test vhost', 80, 'HTTP', '/www', '/system',
                       Log('ACCESSLOG'), Log('WARNINGLOG'),
-                      set(['127.0.0.0/8', '192.168.0.0/16']),
-                      set(['host.domain']), True)
-        self.assertEqual(True, vhost.get_use_regex())
+                      host = {'test.me.org': None})
+        self.assertEqual({'test.me.org': None}, vhost.get_host())
+
+    def test_equality(self):
+        vhost_0 = VHost('test vhost', 80, 'HTTP', '/www', '/system',
+                        Log('ACCESSLOG'), Log('WARNINGLOG'),
+                        ['127.0.0.0/8', '192.168.0.0/16'],
+                        {'host.domain': None})
+        vhost_1 = VHost('test vhost', 80, 'HTTP', '/www', '/system',
+                        Log('ACCESSLOG'), Log('WARNINGLOG'),
+                        ['127.0.0.0/8', '192.168.0.0/16'],
+                        {'host.domain': None})
+        self.assertEqual(vhost_0, vhost_1)
+        vhost_1 = VHost('different', 80, 'HTTP', '/www', '/system',
+                        Log('ACCESSLOG'), Log('WARNINGLOG'),
+                        ['127.0.0.0/8', '192.168.0.0/16'],
+                        {'host.domain': None})
+        self.assertNotEqual(vhost_0, vhost_1)
+        vhost_1 = VHost('test vhost', 81, 'HTTP', '/www', '/system',
+                        Log('ACCESSLOG'), Log('WARNINGLOG'),
+                        ['127.0.0.0/8', '192.168.0.0/16'],
+                        {'host.domain': None})
+        self.assertNotEqual(vhost_0, vhost_1)
+        vhost_1 = VHost('test_vhost', 80, 'HTTPS', '/www', '/system',
+                        Log('ACCESSLOG'), Log('WARNINGLOG'),
+                        ['127.0.0.0/8', '192.168.0.0/16'],
+                        {'host.domain': None})
+        self.assertNotEqual(vhost_0, vhost_1)
+        vhost_1 = VHost('test vhost', 80, 'HTTP', '/var/www', '/system',
+                        Log('ACCESSLOG'), Log('WARNINGLOG'),
+                        ['127.0.0.0/8', '192.168.0.0/16'],
+                        {'host.domain': None})
+        self.assertNotEqual(vhost_0, vhost_1)
+        vhost_1 = VHost('test vhost', 80, 'HTTP', '/www', '/var/system',
+                        Log('ACCESSLOG'), Log('WARNINGLOG'),
+                        ['127.0.0.0/8', '192.168.0.0/16'],
+                        {'host.domain': None})
+        self.assertNotEqual(vhost_0, vhost_1)
+        vhost_1 = VHost('test vhost', 80, 'HTTP', '/www', '/system',
+                        Log('ACCESSLOG', type = 'combined'), Log('WARNINGLOG'),
+                        ['127.0.0.0/8', '192.168.0.0/16'],
+                        {'host.domain': None})
+        self.assertNotEqual(vhost_0, vhost_1)
+        vhost_1 = VHost('test vhost', 80, 'HTTP', '/www', '/system',
+                        Log('ACCESSLOG'), Log('WARNINGLOG', type = 'combined'),
+                        ['127.0.0.0/8', '192.168.0.0/16'],
+                        {'host.domain': None})
+        self.assertNotEqual(vhost_0, vhost_1)
+        vhost_1 = VHost('test vhost', 80, 'HTTP', '/www', '/system',
+                        Log('ACCESSLOG'), Log('WARNINGLOG'),
+                        ['127.0.0.0/24', '192.168.0.0/16'],
+                        {'host.domain': None})
+        self.assertNotEqual(vhost_0, vhost_1)
+        vhost_1 = VHost('test vhost', 80, 'HTTP', '/www', '/system',
+                        Log('ACCESSLOG'), Log('WARNINGLOG'),
+                        ['127.0.0.0/8', '192.168.0.0/16'],
+                        {'host.domain': True})
+        self.assertNotEqual(vhost_0, vhost_1)
+        self.assertNotEqual(vhost_0, [])
 
 if __name__ == '__main__':
     unittest.main()
diff --git a/misc/py_control_client/MyServer/pycontrollib/vhost.py b/misc/py_control_client/MyServer/pycontrollib/vhost.py
index 6d7af7a..4375905 100644
--- a/misc/py_control_client/MyServer/pycontrollib/vhost.py
+++ b/misc/py_control_client/MyServer/pycontrollib/vhost.py
@@ -17,20 +17,36 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 '''
 
 from lxml import etree
-
-class Vhost():
-    def __init__(self, name, port, protocol, docroot, sysfolder, access_log,
-                 warning_log, ip = set(), host = set(), host_use_regex = None):
-        self.name = name
-        self.port = port
-        self.protocol = protocol
-        self.docroot = docroot
-        self.sysfolder = sysfolder
-        self.access_log = access_log
-        self.warning_log = warning_log
-        self.ip = ip
-        self.host = host
-        self.host_use_regex = host_use_regex
+from log import Log
+
+class VHost():
+    valid_protocols = set(['HTTP', 'FTP', 'HTTPS', 'ISAPI', 'CGI', 'SCGI',
+                           'FastCGI', 'WinCGI'])
+    
+    def __init__(self, name, port, protocol, doc_root, sys_folder, access_log,
+                 warning_log, ip = [], host = {}):
+        self.set_name(name)
+        self.set_port(port)
+        self.set_protocol(protocol)
+        self.set_doc_root(doc_root)
+        self.set_sys_folder(sys_folder)
+        self.set_access_log(access_log)
+        self.set_warning_log(warning_log)
+        self.ip = set()
+        for ip_address in ip:
+            self.add_ip(ip_address)
+        self.host = {}
+        for single_host in host.iteritems():
+            self.add_host(single_host[0], single_host[1])
+
+    def __eq__(self, other):
+        return isinstance(other, VHost) and self.name == other.name and \
+            self.port == other.port and self.protocol == other.protocol and \
+            self.doc_root == other.doc_root and \
+            self.sys_folder == other.sys_folder and \
+            self.access_log == other.access_log and \
+            self.warning_log == other.warning_log and self.ip == other.ip and \
+            self.host == other.host
 
     def get_name(self):
         '''Get VHost name.'''
@@ -42,15 +58,25 @@ class Vhost():
             raise AttributeError('name is required and can\'t be None')
         self.name = name
 
-    def get_sysfolder(self):
-        '''Get VHost sysfolder.'''
-        return self.sysfolder
+    def get_doc_root(self):
+        '''Get VHost doc root.'''
+        return self.doc_root
 
-    def set_sysfolder(self, sysfolder):
-        '''Set VHost sysfolder.'''
-        if sysfolder is None:
-            raise AttributeError('sysfolder is required and can\'t be None')
-        self.sysfolder = sysfolder
+    def set_doc_root(self, doc_root):
+        '''Set VHost doc root.'''
+        if doc_root is None:
+            raise AttributeError('doc_root is required and can\'t be None')
+        self.doc_root = doc_root
+
+    def get_sys_folder(self):
+        '''Get VHost sys folder.'''
+        return self.sys_folder
+
+    def set_sys_folder(self, sys_folder):
+        '''Set VHost sys folder.'''
+        if sys_folder is None:
+            raise AttributeError('sys_folder is required and can\'t be None')
+        self.sys_folder = sys_folder
 
     def get_protocol(self):
         '''Get VHost protocol.'''
@@ -58,6 +84,8 @@ class Vhost():
 
     def set_protocol(self, protocol):
         '''Set VHost protocol.'''
+        if protocol not in self.valid_protocols:
+            raise AttributeError('protocol is not valid')
         if protocol is None:
             raise AttributeError('protocol is required and can\'t be None')
         self.protocol = protocol
@@ -80,6 +108,9 @@ class Vhost():
         '''Set VHost access log.'''
         if access_log is None:
             raise AttributeError('access_log is required and can\'t be None')
+        if not isinstance(access_log, Log) or \
+                access_log.get_log_type() != 'ACCESSLOG':
+            raise AttributeError('given attribute is not an access log')
         self.access_log = access_log
 
     def get_warning_log(self):
@@ -90,6 +121,9 @@ class Vhost():
         '''Set VHost warning_log.'''
         if warning_log is None:
             raise AttributeError('warning_log is required and can\'t be None')
+        if not isinstance(warning_log, Log) or \
+                warning_log.get_log_type() != 'WARNINGLOG':
+            raise AttributeError('given attribute is not a warning log')
         self.warning_log = warning_log
 
     def get_ip(self):
@@ -103,3 +137,15 @@ class Vhost():
     def remove_ip(self, ip):
         '''Remove ip from VHost ip set.'''
         self.ip.remove(ip)
+
+    def get_host(self):
+        '''Get VHost host dict.'''
+        return self.host
+
+    def add_host(self, host, use_regex = None):
+        '''Add host to VHost dict.'''
+        self.host[host] = use_regex
+
+    def remove_host(self, host):
+        '''Remove host from VHost host dict.'''
+        self.host.pop(host)



commit 5849c91c06ae47de0dac22178291e2e4e4eb4f2f
Author: Marek Aaron Sapota <maarons@gnu.org>
Date:   Fri Jul 3 20:46:19 2009 +0200

    Removed old, unused code.

diff --git a/misc/py_control_client/MyServer/pycontrollib/configWrapper.py b/misc/py_control_client/MyServer/pycontrollib/configWrapper.py
deleted file mode 100644
index 63248e2..0000000
--- a/misc/py_control_client/MyServer/pycontrollib/configWrapper.py
+++ /dev/null
@@ -1,185 +0,0 @@
-# -*- coding: utf-8 -*-
-'''
-MyServer
-Copyright (C) 2009 Free Software Foundation, Inc.
-This program 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 3 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program.  If not, see <http://www.gnu.org/licenses/>.
-'''
-
-from lxml import etree
-
-def make_vhost_list(data):
-    '''Make a list of VHostWrapper objects from data in format as
-    virtualhosts.xml configuration file.'''
-    parser = etree.XMLParser(remove_blank_text = True)
-    tree = etree.XML(data, parser)
-    return [VHostWrapper(host, from_text = False) for host in \
-        tree.findall('VHOST')]
-
-class VHostWrapper():
-    '''Class wrapping around vhost configuration.'''
-
-    allowed_protocols = set(['CONTROL', 'FTP', 'HTTP', 'HTTPS'])
-    
-    class ProtocolError(ValueError):
-        '''Exception raised when user tried to use invalid protocol.'''
-        def __init__(self, protocol):
-            '''protocol is the invalid protocol that user tried to use.'''
-            ValueError.__init__(self)
-            self.protocol = protocol
-        
-        def __str__(self):
-            return self.protocol + ' is not a valid protocol'
-
-    def __init__(self, data, from_text = True):
-        '''Create new VHostWrapper by parsing data, if from_text is False, then
-        it is assumed that data has already been parsed and is an lxml
-        object.'''
-        if from_text:
-            parser = etree.XMLParser(remove_blank_text = True)
-            self.tree = etree.XML(data, parser)
-        else:
-            self.tree = data
-        
-    def __str__(self):
-        return self.to_xml()
-
-    def to_xml(self):
-        '''Return configuration representation in xml format.'''
-        return etree.tostring(self.tree, encoding = 'utf-8',
-            xml_declaration = True, pretty_print = True)
-
-    def get_node(self, name, multiple = False):
-        '''Get value stored in node of given name. If multiple is True, returns
-        list of all values stored in nodes of given name'''
-        if not multiple:
-            node = self.tree.find(name)
-            if node is not None:
-                return node.text
-            return None
-        else:
-            nodes = self.tree.findal(name)
-            return map(lambda node: node.text, nodes)
-
-    def set_node(self, name, data):
-        '''Set value stored in node of given name to data. Don't use it when
-        multiple nodes with given name are present, use add_node and del_node
-        instead.'''
-        node = self.tree.find(name)
-        if data is None:
-            if node is not None:
-                self.tree.remove(node)
-            return
-        if node is not None:
-            node.text = data
-        else:
-            node = etree.Element(name)
-            node.text = data
-            self.tree.append(node)
-            
-    def add_node(self, name, data):
-        '''Add new node with given name and value to tree.'''
-        node = self.tree.makeelement(name)
-        node.text = data
-        self.tree.append(node)
-        
-    def del_node(self, name, data):
-        '''Remove node with given name and value from tree.'''
-        for node in self.tree.findall(name):
-            if node.text == data:
-                self.tree.remove(node)
-                break
-
-    def get_name(self):
-        '''Get vhost name.'''
-        return self.get_node('NAME')
-
-    def set_name(self, name):
-        '''Set vhost name.'''
-        self.set_node('NAME', name)
-
-    def get_port(self):
-        '''Get port used to accept connections.'''
-        return self.get_node('PORT')
-
-    def set_port(self, port):
-        '''Set port used to accept connections.'''
-        self.set_node('PORT', str(port))
-
-    def get_ip(self):
-        '''Get list of CIDR subnet masks for this vhost.'''
-        return self.get_node('IP', multiple = True)
-
-    def add_ip(self, ip):
-        '''Add CIDR subnet mask for this vhost.'''
-        self.add_node('IP', ip)
-        
-    def del_ip(self, ip):
-        '''Remove CIDR subnet mast for this vhost.'''
-        self.del_node('IP', ip)
-
-    def get_protocol(self):
-        '''Get used protocol.'''
-        return self.get_node('PROTOCOL')
-
-    def set_protocol(self, protocol):
-        '''Set used protocol. Will raise ProtocolError if there is no such
-        protocol.'''
-        if protocol not in self.allowed_protocols:
-            raise self.ProtocolError(protocol)
-        self.set_node('PROTOCOL', protocol)
-
-    def get_docroot(self):
-        '''Get document root directory.'''
-        return self.get_node('DOCROOT')
-
-    def set_docroot(self, docroot):
-        '''Set document root directory.'''
-        self.set_node('DOCROOT', docroot)
-
-    def get_sysfolder(self):
-        '''Get system directory.'''
-        return self.get_node('SYSFOLDER')
-
-    def set_sysfolder(self, sysfolder):
-        '''Set system directory.'''
-        self.set_node('SYSFOLDER', sysfolder)
-
-    def get_host(self): # TODO: useRegex option
-        '''Get list of host names.'''
-        return self.get_node('HOST', multiple = True)
-
-    def add_host(self, host): # TODO: useRegex option
-        '''Add host name.'''
-        self.add_node('HOST', host)
-
-    def del_host(self, host): # TODO: useRegex option
-        '''Remove host name.'''
-        self.del_node('HOST', host)
-
-    def get_accesslog(self): # TODO: streams, etc.
-        '''Get access log used by this vhost.'''
-        return self.get_node('ACCESSLOG')
-
-    def set_accesslog(self, accesslog): # TODO: streams, etc.
-        '''Set access log used by this vhost.'''
-        self.set_node('ACCESSLOG', accesslog)
-
-    def get_warninglog(self): # TODO: streams, etc.
-        '''Get errors log used by this vhost.'''
-        return self.get_node('WARNINGLOG')
-
-    def set_warninglog(self, warninglog): # TODO: streams, etc.
-        '''Set errors log used by this vhost.'''
-        self.set_node('WARNINGLOG', warninglog)
-



commit 7e19a0eb34f000df5d91c9ced6a955bca3a0f0df
Author: Marek Aaron Sapota <maarons@gnu.org>
Date:   Fri Jul 3 20:43:10 2009 +0200

    Move tests to their own directory.

diff --git a/misc/py_control_client/MyServer/pycontrollib/__init__.py b/misc/py_control_client/MyServer/pycontrollib/__init__.py
index c671cf0..792d600 100644
--- a/misc/py_control_client/MyServer/pycontrollib/__init__.py
+++ b/misc/py_control_client/MyServer/pycontrollib/__init__.py
@@ -1,20 +1 @@
-# -*- coding: utf-8 -*-
-'''
-MyServer
-Copyright (C) 2009 Free Software Foundation, Inc.
-This program 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 3 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program.  If not, see <http://www.gnu.org/licenses/>.
-'''
-
-from pycontrollib import Controller
-import configWrapper
+#
diff --git a/misc/py_control_client/MyServer/pycontrollib/Makefile b/misc/py_control_client/MyServer/pycontrollib/test/Makefile
similarity index 95%
rename from misc/py_control_client/MyServer/pycontrollib/Makefile
rename to misc/py_control_client/MyServer/pycontrollib/test/Makefile
index 1c02cb4..e8e455b 100644
--- a/misc/py_control_client/MyServer/pycontrollib/Makefile
+++ b/misc/py_control_client/MyServer/pycontrollib/test/Makefile
@@ -14,6 +14,7 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 PYTHON=/usr/bin/python
+PYTHONPATH:=$(shell dirname `pwd`):${PYTHONPATH}
 
 .PHONY: test test_log test_definition test_mimetypes test_vhost
 
diff --git a/misc/py_control_client/MyServer/pycontrollib/definition_test.py b/misc/py_control_client/MyServer/pycontrollib/test/definition_test.py
similarity index 100%
rename from misc/py_control_client/MyServer/pycontrollib/definition_test.py
rename to misc/py_control_client/MyServer/pycontrollib/test/definition_test.py
diff --git a/misc/py_control_client/MyServer/pycontrollib/log_test.py b/misc/py_control_client/MyServer/pycontrollib/test/log_test.py
similarity index 100%
rename from misc/py_control_client/MyServer/pycontrollib/log_test.py
rename to misc/py_control_client/MyServer/pycontrollib/test/log_test.py
diff --git a/misc/py_control_client/MyServer/pycontrollib/mimetypes_test.py b/misc/py_control_client/MyServer/pycontrollib/test/mimetypes_test.py
similarity index 100%
rename from misc/py_control_client/MyServer/pycontrollib/mimetypes_test.py
rename to misc/py_control_client/MyServer/pycontrollib/test/mimetypes_test.py
diff --git a/misc/py_control_client/MyServer/pycontrollib/vhost_test.py b/misc/py_control_client/MyServer/pycontrollib/test/vhost_test.py
similarity index 100%
rename from misc/py_control_client/MyServer/pycontrollib/vhost_test.py
rename to misc/py_control_client/MyServer/pycontrollib/test/vhost_test.py



commit b8939650ccef039a9e38e4003a3ceadd9ee7ffb6
Author: Marek Aaron Sapota <maarons@gnu.org>
Date:   Fri Jul 3 18:06:24 2009 +0200

    Moved pycontrol and pycontrollib to MyServer package.

diff --git a/misc/py_control_client/README b/misc/py_control_client/MyServer/README
similarity index 100%
rename from misc/py_control_client/README
rename to misc/py_control_client/MyServer/README
diff --git a/misc/py_control_client/__init__.py b/misc/py_control_client/MyServer/__init__.py
similarity index 100%
rename from misc/py_control_client/__init__.py
rename to misc/py_control_client/MyServer/__init__.py
diff --git a/misc/py_control_client/pycontrol/__init__.py b/misc/py_control_client/MyServer/pycontrol/__init__.py
similarity index 100%
rename from misc/py_control_client/pycontrol/__init__.py
rename to misc/py_control_client/MyServer/pycontrol/__init__.py
diff --git a/misc/py_control_client/pycontrol/pycontrol.py b/misc/py_control_client/MyServer/pycontrol/pycontrol.py
similarity index 100%
rename from misc/py_control_client/pycontrol/pycontrol.py
rename to misc/py_control_client/MyServer/pycontrol/pycontrol.py
diff --git a/misc/py_control_client/pycontrollib/Makefile b/misc/py_control_client/MyServer/pycontrollib/Makefile
similarity index 100%
rename from misc/py_control_client/pycontrollib/Makefile
rename to misc/py_control_client/MyServer/pycontrollib/Makefile
diff --git a/misc/py_control_client/pycontrollib/__init__.py b/misc/py_control_client/MyServer/pycontrollib/__init__.py
similarity index 100%
rename from misc/py_control_client/pycontrollib/__init__.py
rename to misc/py_control_client/MyServer/pycontrollib/__init__.py
diff --git a/misc/py_control_client/pycontrollib/configWrapper.py b/misc/py_control_client/MyServer/pycontrollib/configWrapper.py
similarity index 100%
rename from misc/py_control_client/pycontrollib/configWrapper.py
rename to misc/py_control_client/MyServer/pycontrollib/configWrapper.py
diff --git a/misc/py_control_client/pycontrollib/definition.py b/misc/py_control_client/MyServer/pycontrollib/definition.py
similarity index 100%
rename from misc/py_control_client/pycontrollib/definition.py
rename to misc/py_control_client/MyServer/pycontrollib/definition.py
diff --git a/misc/py_control_client/pycontrollib/definition_test.py b/misc/py_control_client/MyServer/pycontrollib/definition_test.py
similarity index 100%
rename from misc/py_control_client/pycontrollib/definition_test.py
rename to misc/py_control_client/MyServer/pycontrollib/definition_test.py
diff --git a/misc/py_control_client/pycontrollib/log.py b/misc/py_control_client/MyServer/pycontrollib/log.py
similarity index 100%
rename from misc/py_control_client/pycontrollib/log.py
rename to misc/py_control_client/MyServer/pycontrollib/log.py
diff --git a/misc/py_control_client/pycontrollib/log_test.py b/misc/py_control_client/MyServer/pycontrollib/log_test.py
similarity index 100%
rename from misc/py_control_client/pycontrollib/log_test.py
rename to misc/py_control_client/MyServer/pycontrollib/log_test.py
diff --git a/misc/py_control_client/pycontrollib/mimetypes.py b/misc/py_control_client/MyServer/pycontrollib/mimetypes.py
similarity index 100%
rename from misc/py_control_client/pycontrollib/mimetypes.py
rename to misc/py_control_client/MyServer/pycontrollib/mimetypes.py
diff --git a/misc/py_control_client/pycontrollib/mimetypes_test.py b/misc/py_control_client/MyServer/pycontrollib/mimetypes_test.py
similarity index 100%
rename from misc/py_control_client/pycontrollib/mimetypes_test.py
rename to misc/py_control_client/MyServer/pycontrollib/mimetypes_test.py
diff --git a/misc/py_control_client/pycontrollib/pycontrollib.py b/misc/py_control_client/MyServer/pycontrollib/pycontrollib.py
similarity index 100%
rename from misc/py_control_client/pycontrollib/pycontrollib.py
rename to misc/py_control_client/MyServer/pycontrollib/pycontrollib.py
diff --git a/misc/py_control_client/pycontrollib/vhost.py b/misc/py_control_client/MyServer/pycontrollib/vhost.py
similarity index 100%
rename from misc/py_control_client/pycontrollib/vhost.py
rename to misc/py_control_client/MyServer/pycontrollib/vhost.py
diff --git a/misc/py_control_client/pycontrollib/vhost_test.py b/misc/py_control_client/MyServer/pycontrollib/vhost_test.py
similarity index 100%
rename from misc/py_control_client/pycontrollib/vhost_test.py
rename to misc/py_control_client/MyServer/pycontrollib/vhost_test.py
diff --git a/misc/py_control_client/sample.py b/misc/py_control_client/MyServer/sample.py
similarity index 100%
rename from misc/py_control_client/sample.py
rename to misc/py_control_client/MyServer/sample.py



commit 2376d719fa8b2ae79adb58f8f36ba2791f010ff1
Author: Marek Aaron Sapota <maarons@gnu.org>
Date:   Fri Jul 3 18:03:26 2009 +0200

    Added clean action to Makefile.

diff --git a/misc/py_control_client/pycontrollib/Makefile b/misc/py_control_client/pycontrollib/Makefile
index 70d2d4c..1c02cb4 100644
--- a/misc/py_control_client/pycontrollib/Makefile
+++ b/misc/py_control_client/pycontrollib/Makefile
@@ -29,4 +29,8 @@ test_mimetypes:
 	-${PYTHON} mimetypes_test.py
 
 test_vhost:
-	-${PYTHON} vhost_test.py
\ No newline at end of file
+	-${PYTHON} vhost_test.py
+
+.PHONY: clean
+clean:
+	rm *.py[co]



commit d428818d42962674193ea30b2992419d1e9aef3a
Author: Marek Aaron Sapota <maarons@gnu.org>
Date:   Fri Jul 3 18:01:55 2009 +0200

    Partial vhost implementation.

diff --git a/misc/py_control_client/pycontrollib/vhost.py b/misc/py_control_client/pycontrollib/vhost.py
new file mode 100644
index 0000000..6d7af7a
--- /dev/null
+++ b/misc/py_control_client/pycontrollib/vhost.py
@@ -0,0 +1,105 @@
+# -*- coding: utf-8 -*-
+'''
+MyServer
+Copyright (C) 2009 Free Software Foundation, Inc.
+This program 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 3 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program.  If not, see <http://www.gnu.org/licenses/>.
+'''
+
+from lxml import etree
+
+class Vhost():
+    def __init__(self, name, port, protocol, docroot, sysfolder, access_log,
+                 warning_log, ip = set(), host = set(), host_use_regex = None):
+        self.name = name
+        self.port = port
+        self.protocol = protocol
+        self.docroot = docroot
+        self.sysfolder = sysfolder
+        self.access_log = access_log
+        self.warning_log = warning_log
+        self.ip = ip
+        self.host = host
+        self.host_use_regex = host_use_regex
+
+    def get_name(self):
+        '''Get VHost name.'''
+        return self.name
+
+    def set_name(self, name):
+        '''Set VHost name.'''
+        if name is None:
+            raise AttributeError('name is required and can\'t be None')
+        self.name = name
+
+    def get_sysfolder(self):
+        '''Get VHost sysfolder.'''
+        return self.sysfolder
+
+    def set_sysfolder(self, sysfolder):
+        '''Set VHost sysfolder.'''
+        if sysfolder is None:
+            raise AttributeError('sysfolder is required and can\'t be None')
+        self.sysfolder = sysfolder
+
+    def get_protocol(self):
+        '''Get VHost protocol.'''
+        return self.protocol
+
+    def set_protocol(self, protocol):
+        '''Set VHost protocol.'''
+        if protocol is None:
+            raise AttributeError('protocol is required and can\'t be None')
+        self.protocol = protocol
+
+    def get_port(self):
+        '''Get VHost port.'''
+        return self.port
+
+    def set_port(self, port):
+        '''Set VHost port.'''
+        if port is None:
+            raise AttributeError('port is required and can\'t be None')
+        self.port = port
+
+    def get_access_log(self):
+        '''Get VHost access log.'''
+        return self.access_log
+
+    def set_access_log(self, access_log):
+        '''Set VHost access log.'''
+        if access_log is None:
+            raise AttributeError('access_log is required and can\'t be None')
+        self.access_log = access_log
+
+    def get_warning_log(self):
+        '''Get VHost warning_log.'''
+        return self.warning_log
+
+    def set_warning_log(self, warning_log):
+        '''Set VHost warning_log.'''
+        if warning_log is None:
+            raise AttributeError('warning_log is required and can\'t be None')
+        self.warning_log = warning_log
+
+    def get_ip(self):
+        '''Get VHost ip set.'''
+        return self.ip
+
+    def add_ip(self, ip):
+        '''Add ip to VHost ip set.'''
+        self.ip.add(ip)
+
+    def remove_ip(self, ip):
+        '''Remove ip from VHost ip set.'''
+        self.ip.remove(ip)



commit 16aa7785a4d22f4b317e46408a3fff213f5ebe70
Author: Marek Aaron Sapota <maarons@gnu.org>
Date:   Fri Jul 3 18:01:41 2009 +0200

    Makefile for running tests.

diff --git a/misc/py_control_client/pycontrollib/Makefile b/misc/py_control_client/pycontrollib/Makefile
new file mode 100644
index 0000000..70d2d4c
--- /dev/null
+++ b/misc/py_control_client/pycontrollib/Makefile
@@ -0,0 +1,32 @@
+# MyServer
+# Copyright (C) 2009 Free Software Foundation, Inc.
+# This program 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 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+PYTHON=/usr/bin/python
+
+.PHONY: test test_log test_definition test_mimetypes test_vhost
+
+test: test_log test_definition test_mimetypes test_vhost
+
+test_log:
+	-${PYTHON} log_test.py
+
+test_definition:
+	-${PYTHON} definition_test.py
+
+test_mimetypes:
+	-${PYTHON} mimetypes_test.py
+
+test_vhost:
+	-${PYTHON} vhost_test.py
\ No newline at end of file



commit 61ac4a10693bea6f209bfda238d0a4787bbc6f0a
Author: Marek Aaron Sapota <maarons@gnu.org>
Date:   Fri Jul 3 18:01:01 2009 +0200

    Updated tests for vhost.

diff --git a/misc/py_control_client/pycontrollib/vhost_test.py b/misc/py_control_client/pycontrollib/vhost_test.py
index 60333ce..72b0702 100644
--- a/misc/py_control_client/pycontrollib/vhost_test.py
+++ b/misc/py_control_client/pycontrollib/vhost_test.py
@@ -57,10 +57,26 @@ class VhostTest(unittest.TestCase):
         vhost = Vhost('test vhost', 80, 'HTTP', '/www', '/system',
                       Log('ACCESSLOG'), Log('WARNINGLOG'))
         self.assertEqual('HTTP', vhost.get_protocol())
-        vhost.set_port('FTP')
+        vhost.set_protocol('FTP')
         self.assertEqual('FTP', vhost.get_protocol())
         self.assertRaises(AttributeError, vhost.set_protocol, None)
 
+    def test_docroot(self):
+        vhost = Vhost('test vhost', 80, 'HTTP', '/www', '/system',
+                      Log('ACCESSLOG'), Log('WARNINGLOG'))
+        self.assertEqual('/www', vhost.get_docroot())
+        vhost.set_docroot('/var/www')
+        self.assertEqual('/var/www', vhost.get_docroot())
+        self.assertRaises(AttributeError, vhost.set_docroot, None)
+
+    def test_sysfolder(self):
+        vhost = Vhost('test vhost', 80, 'HTTP', '/www', '/system',
+                      Log('ACCESSLOG'), Log('WARNINGLOG'))
+        self.assertEqual('/system', vhost.get_sysfolder())
+        vhost.set_sysfolder('/var/system')
+        self.assertEqual('/var/system', vhost.get_sysfolder())
+        self.assertRaises(AttributeError, vhost.set_sysfolder, None)
+
     def test_log(self):
         vhost = Vhost('test vhost', 80, 'HTTP', '/www', '/system',
                       Log('ACCESSLOG'), Log('WARNINGLOG'))
@@ -91,7 +107,7 @@ class VhostTest(unittest.TestCase):
 
     def test_host(self):
         vhost = Vhost('test vhost', 80, 'HTTP', '/www', '/system',
-                      Log('ACCESSLOG'), Log('WARNINGLOG'))h
+                      Log('ACCESSLOG'), Log('WARNINGLOG'))
         self.assertEqual(set(), vhost.get_host())
         vhost.add_host('foo.bar.com')
         vhost.add_host('test.me.org')
@@ -106,7 +122,7 @@ class VhostTest(unittest.TestCase):
 
     def test_host_use_regex(self):
         vhost = Vhost('test vhost', 80, 'HTTP', '/www', '/system',
-                      Log('ACCESSLOG'), Log('WARNINGLOG'))h
+                      Log('ACCESSLOG'), Log('WARNINGLOG'))
         self.assertEqual(None, vhost.get_host_use_regex())
         vhost.set_host_use_regex(True)
         self.assertEqual(True, vhost.get_use_regex())
@@ -117,3 +133,6 @@ class VhostTest(unittest.TestCase):
                       set(['127.0.0.0/8', '192.168.0.0/16']),
                       set(['host.domain']), True)
         self.assertEqual(True, vhost.get_use_regex())
+
+if __name__ == '__main__':
+    unittest.main()



commit afe67f2f23bd7750d32095e70e14bb8708068af0
Author: Marek Aaron Sapota <maarons@gnu.org>
Date:   Fri Jul 3 00:43:16 2009 +0200

    Fixed equality comparision between MIMETypes and other types.

diff --git a/misc/py_control_client/pycontrollib/mimetypes.py b/misc/py_control_client/pycontrollib/mimetypes.py
index a2102f9..4103343 100644
--- a/misc/py_control_client/pycontrollib/mimetypes.py
+++ b/misc/py_control_client/pycontrollib/mimetypes.py
@@ -213,7 +213,8 @@ class MIMETypes():
         self.MIME_types = MIME_types
         
     def __eq__(self, other):
-        return self.MIME_types == other.MIME_types
+        return isinstance(other, MIMETypes) and \
+            self.MIME_types == other.MIME_types
 
     def to_lxml_element(self):
         root = etree.Element('MIMES')
diff --git a/misc/py_control_client/pycontrollib/mimetypes_test.py b/misc/py_control_client/pycontrollib/mimetypes_test.py
index 02db1fc..011ba02 100644
--- a/misc/py_control_client/pycontrollib/mimetypes_test.py
+++ b/misc/py_control_client/pycontrollib/mimetypes_test.py
@@ -233,6 +233,7 @@ class MIMETypesTest(unittest.TestCase):
         self.assertNotEqual(MIMETypes.from_string(self.text),
                             MIMETypes.from_string(
                 '<MIMES>{0}</MIMES>'.format(self.mime_0)))
+        self.assertNotEqual(MIMETypes.from_string(self.text), [])
 
     def test_bad_root_tag(self):
         text = '<ERROR>{0}{1}</ERROR>'.format(



commit 2cfed9a1f282424766351086df9ee5c6cdb9ff35
Author: Marek Aaron Sapota <maarons@gnu.org>
Date:   Fri Jul 3 00:41:07 2009 +0200

    Extended tests for mimetypes.

diff --git a/misc/py_control_client/pycontrollib/mimetypes.py b/misc/py_control_client/pycontrollib/mimetypes.py
index a6a4190..a2102f9 100644
--- a/misc/py_control_client/pycontrollib/mimetypes.py
+++ b/misc/py_control_client/pycontrollib/mimetypes.py
@@ -21,12 +21,14 @@ from lxml import etree
 
 class MIMEType():
     valid_handlers = set(['SEND', 'CGI', 'FASTCGI', 'SCGI', 'MSCGI', 'ISAPI',
-                          'WINCGI', 'PROxY'])
+                          'WINCGI', 'PROXY'])
 
     def __init__(self, mime, handler, param = None, extension = set(), path = None,
                  filter = [], self_executed = None, definitions = []):
         '''Creates new MIMEType with specified attributes.'''
         self.mime = mime
+        if mime is None:
+            raise AttributeError('mime is required and can\'t be None')
         if handler not in MIMEType.valid_handlers:
             raise AttributeError(
                 '{0} is not a valid handler'.format(handler))
@@ -44,6 +46,8 @@ class MIMEType():
 
     def set_mime(self, mime):
         '''Set associated mime type.'''
+        if mime is None:
+            raise AttributeError('mime is required and can\'t be None')
         self.mime = mime
 
     def get_handler(self):
@@ -133,7 +137,7 @@ class MIMEType():
         self.definitions.pop(index)
 
     def __eq__(self, other):
-        return \
+        return isinstance(other, MIMEType) and \
             self.mime == other.mime and \
             self.handler == other.handler and \
             self.param == other.param and \
diff --git a/misc/py_control_client/pycontrollib/mimetypes_test.py b/misc/py_control_client/pycontrollib/mimetypes_test.py
index 607e2cb..02db1fc 100644
--- a/misc/py_control_client/pycontrollib/mimetypes_test.py
+++ b/misc/py_control_client/pycontrollib/mimetypes_test.py
@@ -44,7 +44,19 @@ class MIMETypeTest(unittest.TestCase):
   <PATH regex="^/cgi-bin/python/.*$" />
 </MIME>'''.format('\n'.join(map(lambda element: str(element),
                                 self.definitions)))
-    
+    def test_creation(self):
+        MIMEType('text/plain', 'CGI')
+        MIMEType('text/plain', 'CGI', '/usr/bin/python')
+        MIMEType('text/plain', 'CGI', '/usr/bin/python', set(['py']))
+        MIMEType('text/plain', 'CGI', '/usr/bin/python', set(['py']),
+                 '^/cgi-bin/.*$')
+        MIMEType('text/plain', 'CGI', '/usr/bin/python', set(['py']),
+                 '^/cgi-bin/.*$', ['gzip'])
+        MIMEType('text/plain', 'CGI', '/usr/bin/python', set(['py']),
+                 '^/cgi-bin/.*$', ['gzip'], False)
+        MIMEType('text/plain', 'CGI', '/usr/bin/python', set(['py']),
+                 '^/cgi-bin/.*$', ['gzip'], False, self.definitions)
+
     def test_from_string(self):
         mime = MIMEType.from_string(self.text)
         self.assertEqual(mime.get_mime(), 'application/xhtml+xml')
@@ -67,53 +79,96 @@ class MIMETypeTest(unittest.TestCase):
         self.assertEqual(mime.get_self_executed(), False)
         self.assertEqual(mime.get_definitions(), self.definitions)
 
+    def test_mime(self):
+        mime = MIMEType('text/plain', 'SEND')
+        self.assertEqual('text/plain', mime.get_mime())
+        mime.set_mime('application/xhtml+xml')
+        self.assertEqual('application/xhtml+xml', mime.get_mime())
+        self.assertRaises(AttributeError, mime.set_mime, None)
+        self.assertRaises(AttributeError, MIMEType, None, 'SEND')
+        
     def test_handler(self):
-        mime = MIMEType.from_string(self.text)
+        mime = MIMEType('text/plain', 'SEND')
         for handler in MIMEType.valid_handlers:
             mime.set_handler(handler)
+            self.assertEqual(handler, mime.get_handler())
         self.assertRaises(AttributeError, mime.set_handler, 'ERROR')
-        
-    def test_attributes(self):
-        mime = MIMEType.from_string(self.text)
-        mime.set_mime('plain/text')
-        self.assertEqual(mime.get_mime(), 'plain/text')
-        mime.set_handler('SEND')
-        self.assertEqual(mime.get_handler(), 'SEND')
-        mime.set_param('')
-        self.assertEqual(mime.get_param(), '')
+        self.assertRaises(AttributeError, MIMEType, 'text/plain', 'ERROR')
+
+    def test_param(self):
+        mime = MIMEType('text/plain', 'SEND')
+        self.assertEqual(None, mime.get_param())
+        mime.set_param('/usr/bin/python')
+        self.assertEqual('/usr/bin/python', mime.get_param())
+        mime.set_param(None)
+        self.assertEqual(None, mime.get_param())
+        mime = MIMEType('text/plain', 'SEND', param = '/usr/bin/python')
+        self.assertEqual('/usr/bin/python', mime.get_param())
+    
+    def test_extension(self):
+        mime = MIMEType('text/plain', 'SEND')
+        self.assertEqual(set(), mime.get_extensions())
+        mime.add_extension('py')
+        mime.add_extension('html')
+        self.assertEqual(set(['py', 'html']), mime.get_extensions())
         mime.remove_extension('py')
-        self.assertEqual(mime.get_extensions(), set(['xhtml', 'xml']))
-        mime.add_extension('pyc')
-        self.assertEqual(mime.get_extensions(), set(['xhtml', 'xml', 'pyc']))
-        mime.set_path('^/python/')
-        self.assertEqual(mime.get_path(), '^/python/')
-        mime.remove_filter(0)
-        self.assertEqual(mime.get_filters(), ['bzip2'])
+        self.assertEqual(set(['html']), mime.get_extensions())
+        mime = MIMEType('text/plain', 'SEND', extension = set(['py', 'html']))
+        self.assertEqual(set(['py', 'html']), mime.get_extensions())
+
+    def test_path(self):
+        mime = MIMEType('text/plain', 'SEND')
+        self.assertEqual(None, mime.get_path())
+        mime.set_path('^/www/.*$')
+        self.assertEqual('^/www/.*$', mime.get_path())
+        mime.set_path(None)
+        self.assertEqual(None, mime.get_path())
+        mime = MIMEType('text/plain', 'SEND', path = '^/www/.*$')
+        self.assertEqual('^/www/.*$', mime.get_path())
+
+    def test_filter(self):
+        mime = MIMEType('text/plain', 'SEND')
+        self.assertEqual([], mime.get_filters())
         mime.add_filter('gzip')
-        self.assertEqual(mime.get_filters(), ['bzip2', 'gzip'])
-        mime.add_filter('gzip', 0)
-        self.assertEqual(mime.get_filters(), ['gzip', 'bzip2', 'gzip'])
-        self.assertEqual(mime.get_filter(1), 'bzip2')
+        mime.add_filter('bzip2')
+        self.assertEqual(['gzip', 'bzip2'], mime.get_filters())
+        mime.add_filter('bzip2', 0)
+        self.assertEqual(['bzip2', 'gzip', 'bzip2'], mime.get_filters())
+        mime.remove_filter(2)
+        self.assertEqual(['bzip2', 'gzip'], mime.get_filters())
+        self.assertEqual('gzip', mime.get_filter(1))
+        mime = MIMEType('text/plain', 'SEND', filter = ['gzip', 'bzip2'])
+        self.assertEqual(['gzip', 'bzip2'], mime.get_filters())
+
+    def test_self_executed(self):
+        mime = MIMEType('text/plain', 'SEND')
+        self.assertEqual(None, mime.get_self_executed())
         mime.set_self_executed(True)
-        self.assertEqual(mime.get_self_executed(), True)
-        definition = Definition.from_string(
-            '<DEFINE name="http.error.file.404" value="404.html" />')
-        mime.add_definition(definition)
-        self.definitions.append(definition)
-        self.assertEqual(mime.get_definitions(), self.definitions)
-        mime.add_definition(definition, 0)
-        self.definitions.insert(0, definition)
-        self.assertEqual(mime.get_definitions(), self.definitions)
-        mime.remove_definition(1)
-        self.definitions.pop(1)
-        self.assertEqual(mime.get_definitions(), self.definitions)
-        self.assertEqual(mime.get_definition(1), self.definitions[1])
+        self.assertEqual(True, mime.get_self_executed())
+        mime.set_self_executed(None)
+        self.assertEqual(None, mime.get_self_executed())
+        mime = MIMEType('text/plain', 'SEND', self_executed = True)
+        self.assertEqual(True, mime.get_self_executed())
+        
+    def test_definitions(self):
+        mime = MIMEType('text/plain', 'SEND')
+        self.assertEqual([], mime.get_definitions())
+        for definition in self.definitions:
+            mime.add_definition(definition)
+        self.assertEqual(self.definitions, mime.get_definitions())
+        for i in xrange(len(self.definitions)):
+            self.assertEqual(self.definitions[i], mime.get_definition(i))
+        mime.remove_definition(0)
+        self.assertEqual(self.definitions[1:], mime.get_definitions())
+        mime = MIMEType('text/plain', 'SEND', definitions = self.definitions)
+        self.assertEqual(self.definitions, mime.get_definitions())
         
     def test_equality(self):
         self.assertEqual(MIMEType.from_string(self.text),
                          MIMEType.from_string(self.text))
         self.assertNotEqual(MIMEType.from_string(self.text),
                             MIMEType('text/plain', 'SEND'))
+        self.assertNotEqual(MIMEType.from_string(self.text), [])
         
     def test_to_string(self):
         mime = MIMEType.from_string(self.text)



commit c66b92cc63c15a55abae354e818bcab4086f2d61
Author: Marek Aaron Sapota <maarons@gnu.org>
Date:   Wed Jul 1 23:34:32 2009 +0200

    Basic vhost tests.

diff --git a/misc/py_control_client/pycontrollib/vhost_test.py b/misc/py_control_client/pycontrollib/vhost_test.py
new file mode 100644
index 0000000..60333ce
--- /dev/null
+++ b/misc/py_control_client/pycontrollib/vhost_test.py
@@ -0,0 +1,119 @@
+# -*- coding: utf-8 -*-
+'''
+MyServer
+Copyright (C) 2009 Free Software Foundation, Inc.
+This program 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 3 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program.  If not, see <http://www.gnu.org/licenses/>.
+'''
+
+import unittest
+from vhost import Vhost
+from log import Log
+from lxml import etree
+
+class VhostTest(unittest.TestCase):
+    def test_creation(self):
+        vhost = Vhost('test vhost', 80, 'HTTP', '/www', '/system',
+                      Log('ACCESSLOG'), Log('WARNINGLOG'))
+        vhost = Vhost('test vhost', 80, 'HTTP', '/www', '/system',
+                      Log('ACCESSLOG'), Log('WARNINGLOG'),
+                      set(['127.0.0.0/8', '192.168.0.0/16']))
+        vhost = Vhost('test vhost', 80, 'HTTP', '/www', '/system',
+                      Log('ACCESSLOG'), Log('WARNINGLOG'),
+                      set(['127.0.0.0/8', '192.168.0.0/16']),
+                      set(['host.domain']))
+        vhost = Vhost('test vhost', 80, 'HTTP', '/www', '/system',
+                      Log('ACCESSLOG'), Log('WARNINGLOG'),
+                      set(['127.0.0.0/8', '192.168.0.0/16']),
+                      set(['host.domain']), True)
+
+    def test_name(self):
+        vhost = Vhost('test vhost', 80, 'HTTP', '/www', '/system',
+                      Log('ACCESSLOG'), Log('WARNINGLOG'))
+        self.assertEqual('test vhost', vhost.get_name())
+        vhost.set_name('vhost')
+        self.assertEqual('vhost', vhost.get_name())
+        self.assertRaises(AttributeError, vhost.set_name, None)
+
+    def test_port(self):
+        vhost = Vhost('test vhost', 80, 'HTTP', '/www', '/system',
+                      Log('ACCESSLOG'), Log('WARNINGLOG'))
+        self.assertEqual(80, vhost.get_port())
+        vhost.set_port(8080)
+        self.assertEqual(8080, vhost.get_port())
+        self.assertRaises(AttributeError, vhost.set_port, None)
+
+    def test_protocol(self):
+        vhost = Vhost('test vhost', 80, 'HTTP', '/www', '/system',
+                      Log('ACCESSLOG'), Log('WARNINGLOG'))
+        self.assertEqual('HTTP', vhost.get_protocol())
+        vhost.set_port('FTP')
+        self.assertEqual('FTP', vhost.get_protocol())
+        self.assertRaises(AttributeError, vhost.set_protocol, None)
+
+    def test_log(self):
+        vhost = Vhost('test vhost', 80, 'HTTP', '/www', '/system',
+                      Log('ACCESSLOG'), Log('WARNINGLOG'))
+        self.assertEqual(Log('ACCESSLOG'), vhost.get_access_log())
+        self.assertEqual(Log('WARNINGLOG'), vhost.get_warning_log())
+        vhost.set_access_log(Log('ACCESSLOG', type = 'combined'))
+        vhost.set_warning_log(Log('WARNINGLOG', type = 'combined'))
+        self.assertEqual(Log('ACCESSLOG', type = 'combined'),
+                         vhost.get_access_log())
+        self.assertEqual(Log('WARNINGLOG', type = 'combined'),
+                         vhost.get_warning_log())
+        self.assertRaises(AttributeError, vhost.set_access_log, None)
+        self.assertRaises(AttributeError, vhost.set_warning_log, None)
+
+    def test_ip(self):
+        vhost = Vhost('test vhost', 80, 'HTTP', '/www', '/system',
+                      Log('ACCESSLOG'), Log('WARNINGLOG'))
+        self.assertEqual(set(), vhost.get_ip())
+        vhost.add_ip('10.0.0.0/8')
+        vhost.add_ip('192.168.0.0/16')
+        self.assertEqual(set(['10.0.0.0/8', '192.168.0.0/16']), vhost.get_ip())
+        vhost.remove_ip('10.0.0.0/8')
+        self.assertEqual(set(['192.168.0.0/16']), vhost.get_ip())
+        vhost = Vhost('test vhost', 80, 'HTTP', '/www', '/system',
+                      Log('ACCESSLOG'), Log('WARNINGLOG'),
+                      set(['127.0.0.0/8', '192.168.0.0/16']))
+        self.assertEqual(set(['127.0.0.0/8', '192.168.0.0/16']), vhost.get_ip())
+
+    def test_host(self):
+        vhost = Vhost('test vhost', 80, 'HTTP', '/www', '/system',
+                      Log('ACCESSLOG'), Log('WARNINGLOG'))h
+        self.assertEqual(set(), vhost.get_host())
+        vhost.add_host('foo.bar.com')
+        vhost.add_host('test.me.org')
+        self.assertEqual(set(['foo.bar.com', 'test.me.org']), vhost.get_host())
+        vhost.remove_host('foo.bar.com')
+        self.assertEqual(set(['test.me.org']), vhost.get_host())
+        vhost = Vhost('test vhost', 80, 'HTTP', '/www', '/system',
+                      Log('ACCESSLOG'), Log('WARNINGLOG'),
+                      set(['127.0.0.0/8', '192.168.0.0/16']),
+                      set(['test.me.org']))
+        self.assertEqual(set(['test.me.org']), vhost.get_host())
+
+    def test_host_use_regex(self):
+        vhost = Vhost('test vhost', 80, 'HTTP', '/www', '/system',
+                      Log('ACCESSLOG'), Log('WARNINGLOG'))h
+        self.assertEqual(None, vhost.get_host_use_regex())
+        vhost.set_host_use_regex(True)
+        self.assertEqual(True, vhost.get_use_regex())
+        vhost.set_host_use_regex(None)
+        self.assertEqual(None, vhost.get_host_use_regex())
+        vhost = Vhost('test vhost', 80, 'HTTP', '/www', '/system',
+                      Log('ACCESSLOG'), Log('WARNINGLOG'),
+                      set(['127.0.0.0/8', '192.168.0.0/16']),
+                      set(['host.domain']), True)
+        self.assertEqual(True, vhost.get_use_regex())



commit 101f031c7d413535def126b9f59a8f918e8d8468
Author: Marek Aaron Sapota <maarons@gnu.org>
Date:   Wed Jul 1 18:11:12 2009 +0200

    Implemented Log class.

diff --git a/misc/py_control_client/pycontrollib/log.py b/misc/py_control_client/pycontrollib/log.py
index b813ccc..44a65a0 100644
--- a/misc/py_control_client/pycontrollib/log.py
+++ b/misc/py_control_client/pycontrollib/log.py
@@ -20,6 +20,8 @@ from lxml import etree
 
 class Stream():
     def __init__(self, location, cycle = None, cycle_gzip = None, filter = []):
+        if location is None:
+            raise AttributeError('location is required and can\'t be None')
         self.location = location
         self.cycle = cycle
         self.cycle_gzip = cycle_gzip
@@ -113,3 +115,82 @@ class Stream():
             element.text = filter
             root.append(element)
         return root
+
+class Log():
+    def __init__(self, log_type, stream = [], type = None):
+        if log_type is None:
+            raise AttributeError('log_type is required and can\'t be None')
+        self.log_type = log_type
+        self.stream = stream
+        self.type = type
+
+    def __eq__(self, other):
+        return isinstance(other, Log) and \
+            self.log_type == other.log_type and \
+            self.stream == other.stream and \
+            self.type == other.type
+    
+    def get_type(self):
+        '''Get log's type attribute.'''
+        return self.type
+
+    def set_type(self, type):
+        '''Set log's type attribute, None means not set'''
+        self.type = type
+
+    def get_log_type(self):
+        '''Get log's type.'''
+        return self.log_type
+
+    def set_log_type(self, log_type):
+        '''Set log's type.'''
+        if log_type is None:
+            raise AttributeError('log_type is required and can\'t be None')
+        self.log_type = log_type
+
+    def get_streams(self):
+        '''Get streams associated with this log.'''
+        return self.stream
+
+    def add_stream(self, stream, index = None):
+        '''Append stream to current streams or if index is not None insert
+        stream ad index-th position.'''
+        if index is None:
+            self.stream.append(stream)
+        else:
+            self.stream.insert(index, stream)
+
+    def remove_stream(self, index):
+        '''Remove stream from index-th position.'''
+        self.stream.pop(index)
+    
+    def get_stream(self, index):
+        '''Get index-th stream.'''
+        return self.stream[index]
+
+    @staticmethod
+    def from_string(text):
+        '''Factory to produce log by parsing a string.'''
+        return Log.from_lxml_element(etree.XML(text))
+
+    @staticmethod
+    def from_lxml_element(root):
+        '''Factory to produce log from etree.Element object.'''
+        log_type = root.tag
+        type = root.get('type', None)
+        stream = []
+        for child in list(root):
+            if child.tag == 'STREAM':
+                stream.append(Stream.from_lxml_element(child))
+        return Log(log_type, stream, type)
+
+    def __str__(self):
+        return etree.tostring(self.to_lxml_element(), pretty_print = True)
+
+    def to_lxml_element(self):
+        root = etree.Element(self.log_type)
+        if self.type is not None:
+            root.set('type', self.type)
+        for stream in self.stream:
+            root.append(stream.to_lxml_element())
+        return root
diff --git a/misc/py_control_client/pycontrollib/log_test.py b/misc/py_control_client/pycontrollib/log_test.py
index 1bf968d..55c86a0 100644
--- a/misc/py_control_client/pycontrollib/log_test.py
+++ b/misc/py_control_client/pycontrollib/log_test.py
@@ -33,6 +33,7 @@ class StreamTest(unittest.TestCase):
         log.set_location('/logs/new.log')
         self.assertEqual('/logs/new.log', log.get_location())
         self.assertRaises(AttributeError, log.set_location, None)
+        self.assertRaises(AttributeError, Stream, None)
 
     def test_cycle(self):
         log = Stream('path')
@@ -154,8 +155,8 @@ class LogTest(unittest.TestCase):
     def test_creation(self):
         log = Log('ACCESSLOG')
         log = Log('WARNINGLOG')
-        log = Log('ACCESSLOG', [self.stream])
-        log = Log('ACCESSLOG', [self.stream], 'combined')
+        log = Log('ACCESSLOG', [self.stream_0])
+        log = Log('ACCESSLOG', [self.stream_0], 'combined')
 
     def test_log_type(self):
         log = Log('ACCESSLOG')
@@ -163,6 +164,7 @@ class LogTest(unittest.TestCase):
         log.set_log_type('WARNINGLOG')
         self.assertEqual('WARNINGLOG', log.get_log_type())
         self.assertRaises(AttributeError, log.set_log_type, None)
+        self.assertRaises(AttributeError, Log, None)
 
     def test_type(self):
         log = Log('ACCESSLOG')
@@ -210,14 +212,14 @@ class LogTest(unittest.TestCase):
         text = '''<ACCESSLOG type="combined">{0}{1}</ACCESSLOG>'''.format( \
             self.stream_0, self.stream_1)
         log = Log.from_string(text)
-        copy = Stream.from_string(str(log))
+        copy = Log.from_string(str(log))
         self.assertEqual(log, copy)
 
     def test_to_lxml(self):
         text = '''<ACCESSLOG type="combined">{0}{1}</ACCESSLOG>'''.format( \
             self.stream_0, self.stream_1)
         log = Log.from_string(text)
-        copy = Stream.from_lxml_element(log.to_lxml_element())
+        copy = Log.from_lxml_element(log.to_lxml_element())
         self.assertEqual(log, copy)
 
     def test_equality(self):



commit 8cb4b723a21d59214f73b9b5b82efbb7efae711d
Author: Marek Aaron Sapota <maarons@gnu.org>
Date:   Wed Jul 1 15:02:03 2009 +0200

    Tests for Log class.

diff --git a/misc/py_control_client/pycontrollib/log_test.py b/misc/py_control_client/pycontrollib/log_test.py
index 6480fa8..1bf968d 100644
--- a/misc/py_control_client/pycontrollib/log_test.py
+++ b/misc/py_control_client/pycontrollib/log_test.py
@@ -17,7 +17,7 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 '''
 
 import unittest
-from log import Stream
+from log import Stream, Log
 from lxml import etree
 
 class StreamTest(unittest.TestCase):
@@ -144,5 +144,92 @@ class StreamTest(unittest.TestCase):
         copy = Stream.from_lxml_element(log.to_lxml_element())
         self.assertEqual(log, copy)
 
+class LogTest(unittest.TestCase):
+    def setUp(self):
+        text_0 = '<STREAM location="file://logs/MyServerHTTP.log" />'
+        self.stream_0 = Stream.from_string(text_0)
+        text_1 = '<STREAM location="console://stdout" />'
+        self.stream_1 = Stream.from_string(text_1)
+
+    def test_creation(self):
+        log = Log('ACCESSLOG')
+        log = Log('WARNINGLOG')
+        log = Log('ACCESSLOG', [self.stream])
+        log = Log('ACCESSLOG', [self.stream], 'combined')
+
+    def test_log_type(self):
+        log = Log('ACCESSLOG')
+        self.assertEqual('ACCESSLOG', log.get_log_type())
+        log.set_log_type('WARNINGLOG')
+        self.assertEqual('WARNINGLOG', log.get_log_type())
+        self.assertRaises(AttributeError, log.set_log_type, None)
+
+    def test_type(self):
+        log = Log('ACCESSLOG')
+        self.assertEqual(None, log.get_type())
+        log.set_type('combined')
+        self.assertEqual('combined', log.get_type())
+        log.set_type(None)
+        self.assertEqual(None, log.get_type())
+        log = Log('ACCESSLOG', [], 'combined')
+        self.assertEqual('combined', log.get_type())
+
+    def test_stream(self):
+        log = Log('ACCESSLOG')
+        self.assertEqual([], log.get_streams())
+        log.add_stream(self.stream_0)
+        self.assertEqual([self.stream_0], log.get_streams())
+        log.add_stream(self.stream_1)
+        self.assertEqual([self.stream_0, self.stream_1], log.get_streams())
+        log.add_stream(self.stream_1, 0)
+        self.assertEqual([self.stream_1, self.stream_0, self.stream_1],
+                         log.get_streams())
+        self.assertEqual(self.stream_0, log.get_stream(1))
+        log.remove_stream(1)
+        self.assertEqual([self.stream_1, self.stream_1], log.get_streams())
+        log = Log('ACCESSLOG', [self.stream_0])
+        self.assertEqual([self.stream_0], log.get_streams())
+
+    def test_from_string(self):
+        text = '''<ACCESSLOG type="combined">{0}{1}</ACCESSLOG>'''.format( \
+            self.stream_0, self.stream_1)
+        log = Log.from_string(text)
+        self.assertEqual('ACCESSLOG', log.get_log_type())
+        self.assertEqual('combined', log.get_type())
+        self.assertEqual([self.stream_0, self.stream_1], log.get_streams())
+
+    def test_from_lxml(self):
+        text = '''<ACCESSLOG type="combined">{0}{1}</ACCESSLOG>'''.format( \
+            self.stream_0, self.stream_1)
+        log = Log.from_lxml_element(etree.XML(text))
+        self.assertEqual('ACCESSLOG', log.get_log_type())
+        self.assertEqual('combined', log.get_type())
+        self.assertEqual([self.stream_0, self.stream_1], log.get_streams())
+
+    def test_to_string(self):
+        text = '''<ACCESSLOG type="combined">{0}{1}</ACCESSLOG>'''.format( \
+            self.stream_0, self.stream_1)
+        log = Log.from_string(text)
+        copy = Stream.from_string(str(log))
+        self.assertEqual(log, copy)
+
+    def test_to_lxml(self):
+        text = '''<ACCESSLOG type="combined">{0}{1}</ACCESSLOG>'''.format( \
+            self.stream_0, self.stream_1)
+        log = Log.from_string(text)
+        copy = Stream.from_lxml_element(log.to_lxml_element())
+        self.assertEqual(log, copy)
+
+    def test_equality(self):
+        self.assertEqual(Log('ACCESSLOG', [self.stream_0, self.stream_1], 'combined'),
+                         Log('ACCESSLOG', [self.stream_0, self.stream_1], 'combined'))
+        self.assertNotEqual(Log('ACCESSLOG', [self.stream_0], 'combined'),
+                            Log('WARNINGLOG', [self.stream_0], 'combined'))
+        self.assertNotEqual(Log('ACCESSLOG', [self.stream_0], 'combined'),
+                            Log('ACCESSLOG', [self.stream_1], 'combined'))
+        self.assertNotEqual(Log('ACCESSLOG', [self.stream_0], 'combined'),
+                            Log('WARNINGLOG', [self.stream_0], None))
+        self.assertNotEqual([], Log('ACCESSLOG'))
+
 if __name__ == '__main__':
     unittest.main()



commit 2e4765307dd1a8ac4f63d89af67a9544bc45a8dc
Author: Marek Aaron Sapota <maarons@gnu.org>
Date:   Tue Jun 30 17:55:00 2009 +0200

    Log Stream class added.

diff --git a/misc/py_control_client/pycontrollib/log.py b/misc/py_control_client/pycontrollib/log.py
new file mode 100644
index 0000000..b813ccc
--- /dev/null
+++ b/misc/py_control_client/pycontrollib/log.py
@@ -0,0 +1,115 @@
+# -*- coding: utf-8 -*-
+'''
+MyServer
+Copyright (C) 2009 Free Software Foundation, Inc.
+This program 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 3 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program.  If not, see <http://www.gnu.org/licenses/>.
+'''
+
+from lxml import etree
+
+class Stream():
+    def __init__(self, location, cycle = None, cycle_gzip = None, filter = []):
+        self.location = location
+        self.cycle = cycle
+        self.cycle_gzip = cycle_gzip
+        self.filter = filter
+
+    def __eq__(self, other):
+        return isinstance(other, Stream) and \
+            self.location == other.location and \
+            self.cycle == other.cycle and \
+            self.cycle_gzip == other.cycle_gzip and \
+            self.filter == other.filter
+
+    def get_location(self):
+        '''Get stream location.'''
+        return self.location
+
+    def set_location(self, location):
+        '''Set stream location.'''
+        if location is None:
+            raise AttributeError('location is required and can\'t be None')
+        self.location = location
+
+    def get_cycle(self):
+        '''Get stream cycle value.'''
+        return self.cycle
+
+    def set_cycle(self, cycle):
+        '''Set cycle value, None means not set.'''
+        self.cycle = cycle
+
+    def get_cycle_gzip(self):
+        '''Get stream cycle_gzip value.'''
+        return self.cycle_gzip
+
+    def set_cycle_gzip(self, cycle_gzip):
+        '''Set stream cycle_gzip value, None means not set'''
+        self.cycle_gzip = cycle_gzip
+
+    def get_filters(self):
+        '''Get list of stream filters.'''
+        return self.filter
+
+    def get_filter(self, index):
+        '''Get index-th filter.'''
+        return self.filter[index]
+
+    def add_filter(self, filter, index = None):
+        '''Append a new filter, or insert it at index position.'''
+        if index is None:
+            self.filter.append(filter)
+        else:
+            self.filter.insert(index, filter)
+
+    def remove_filter(self, index):
+        '''Remove index-th filter.'''
+        self.filter.pop(index)
+
+    @staticmethod
+    def from_string(text):
+        '''Factory to produce stream by parsing a string.'''
+        return Stream.from_lxml_element(etree.XML(text))
+
+    @staticmethod
+    def from_lxml_element(root):
+        '''Factory to produce stream from etree.Element object.'''
+        if root.tag != 'STREAM':
+            raise AttributeError('Expected STREAM tag.')
+        location = root.get('location')
+        cycle = root.get('cycle', None)
+        cycle_gzip = root.get('cycle_gzip', None)
+        if cycle_gzip is not None:
+            cycle_gzip = True if cycle_gzip == 'YES' else False
+        filter = []
+        for child in list(root):
+            if child.tag == 'FILTER':
+                filter.append(child.text)
+        return Stream(location, cycle, cycle_gzip, filter)
+
+    def __str__(self):
+        return etree.tostring(self.to_lxml_element(), pretty_print = True)
+
+    def to_lxml_element(self):
+        root = etree.Element('STREAM')
+        root.set('location', self.location)
+        if self.cycle is not None:
+            root.set('cycle', self.cycle)
+        if self.cycle_gzip is not None:
+            root.set('cycle_gzip', 'YES' if self.cycle_gzip else 'NO')
+        for filter in self.filter:
+            element = etree.Element('FILTER')
+            element.text = filter
+            root.append(element)
+        return root
diff --git a/misc/py_control_client/pycontrollib/log_test.py b/misc/py_control_client/pycontrollib/log_test.py
index 8d61ead..6480fa8 100644
--- a/misc/py_control_client/pycontrollib/log_test.py
+++ b/misc/py_control_client/pycontrollib/log_test.py
@@ -74,16 +74,16 @@ class StreamTest(unittest.TestCase):
         self.assertEqual(['gzip'], log.get_filters())
 
     def test_from_string(self):
-        text = '''<STREAM location="path" cycle=123 cycle_gzip="NO">
+        text = '''<STREAM location="path" cycle="123" cycle_gzip="NO">
   <FILTER>gzip</FILTER>
   <FILTER>bzip2</FILTER>
 </STREAM>'''
         log = Stream.from_string(text)
         self.assertEqual('path', log.get_location())
-        self.assertEqual(123, log.get_cycle())
+        self.assertEqual('123', log.get_cycle())
         self.assertFalse(log.get_cycle_gzip())
         self.assertEqual(['gzip', 'bzip2'], log.get_filters())
-        text = '<STREAM location="path />'
+        text = '<STREAM location="path" />'
         log = Stream.from_string(text)
         self.assertEqual('path', log.get_location())
         self.assertEqual(None, log.get_cycle())
@@ -91,16 +91,16 @@ class StreamTest(unittest.TestCase):
         self.assertEqual([], log.get_filters())
 
     def test_from_lxml(self):
-        text = '''<STREAM location="path" cycle=123 cycle_gzip="NO">
+        text = '''<STREAM location="path" cycle="123" cycle_gzip="NO">
   <FILTER>gzip</FILTER>
   <FILTER>bzip2</FILTER>
 </STREAM>'''
         log = Stream.from_lxml_element(etree.XML(text))
         self.assertEqual('path', log.get_location())
-        self.assertEqual(123, log.get_cycle())
+        self.assertEqual('123', log.get_cycle())
         self.assertFalse(log.get_cycle_gzip())
         self.assertEqual(['gzip', 'bzip2'], log.get_filters())
-        text = '<STREAM location="path />'
+        text = '<STREAM location="path" />'
         log = Stream.from_lxml_element(etree.XML(text))
         self.assertEqual('path', log.get_location())
         self.assertEqual(None, log.get_cycle())
@@ -116,17 +116,18 @@ class StreamTest(unittest.TestCase):
     def test_equality(self):
         self.assertEqual(Stream('path', 123, False, ['gzip', 'bzip2']),
                          Stream('path', 123, False, ['gzip', 'bzip2']))
-        self.assertEqual(Stream('path1', 123, False, ['gzip', 'bzip2']),
-                         Stream('path2', 123, False, ['gzip', 'bzip2']))
-        self.assertEqual(Stream('path', 1234, False, ['gzip', 'bzip2']),
-                         Stream('path', 123, False, ['gzip', 'bzip2']))
-        self.assertEqual(Stream('path', 123, True, ['gzip', 'bzip2']),
-                         Stream('path', 123, False, ['gzip', 'bzip2']))
-        self.assertEqual(Stream('path', 123, True, ['bzip2']),
-                         Stream('path', 123, False, ['gzip', 'bzip2']))
+        self.assertNotEqual(Stream('path1', 123, False, ['gzip', 'bzip2']),
+                            Stream('path2', 123, False, ['gzip', 'bzip2']))
+        self.assertNotEqual(Stream('path', 1234, False, ['gzip', 'bzip2']),
+                            Stream('path', 123, False, ['gzip', 'bzip2']))
+        self.assertNotEqual(Stream('path', 123, True, ['gzip', 'bzip2']),
+                            Stream('path', 123, False, ['gzip', 'bzip2']))
+        self.assertNotEqual(Stream('path', 123, True, ['bzip2']),
+                            Stream('path', 123, False, ['gzip', 'bzip2']))
+        self.assertNotEqual([], Stream('path'))
 
     def test_to_string(self):
-        text = '''<STREAM location="path" cycle=123 cycle_gzip="NO">
+        text = '''<STREAM location="path" cycle="123" cycle_gzip="NO">
   <FILTER>gzip</FILTER>
   <FILTER>bzip2</FILTER>
 </STREAM>'''
@@ -135,10 +136,13 @@ class StreamTest(unittest.TestCase):
         self.assertEqual(log, copy)
 
     def test_to_lxml(self):
-        text = '''<STREAM location="path" cycle=123 cycle_gzip="NO">
+        text = '''<STREAM location="path" cycle="123" cycle_gzip="NO">
   <FILTER>gzip</FILTER>
   <FILTER>bzip2</FILTER>
 </STREAM>'''
         log = Stream.from_string(text)
         copy = Stream.from_lxml_element(log.to_lxml_element())
         self.assertEqual(log, copy)
+
+if __name__ == '__main__':
+    unittest.main()



commit fbdd0f4735ccddda0530adc0ab706ff1d8e8b12e
Author: Marek Aaron Sapota <maarons@gnu.org>
Date:   Mon Jun 29 17:01:47 2009 +0200

    Tests for log stream.

diff --git a/misc/py_control_client/pycontrollib/log_test.py b/misc/py_control_client/pycontrollib/log_test.py
new file mode 100644
index 0000000..8d61ead
--- /dev/null
+++ b/misc/py_control_client/pycontrollib/log_test.py
@@ -0,0 +1,144 @@
+# -*- coding: utf-8 -*-
+'''
+MyServer
+Copyright (C) 2009 Free Software Foundation, Inc.
+This program 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 3 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program.  If not, see <http://www.gnu.org/licenses/>.
+'''
+
+import unittest
+from log import Stream
+from lxml import etree
+
+class StreamTest(unittest.TestCase):
+    def test_creation(self):
+        log = Stream('/logs/MyServer.log')
+        log = Stream('/logs/MyServer.log', 1048576)
+        log = Stream('/logs/MyServer.log', 1048576, False)
+        log = Stream('/logs/MyServer.log', 1048576, False, ['gzip', 'bzip2'])
+
+    def test_location(self):
+        log = Stream('/logs/MyServer.log')
+        self.assertEqual('/logs/MyServer.log', log.get_location())
+        log.set_location('/logs/new.log')
+        self.assertEqual('/logs/new.log', log.get_location())
+        self.assertRaises(AttributeError, log.set_location, None)
+
+    def test_cycle(self):
+        log = Stream('path')
+        self.assertEqual(None, log.get_cycle())
+        log.set_cycle(123)
+        self.assertEqual(123, log.get_cycle())
+        log.set_cycle(None)
+        self.assertEqual(None, log.get_cycle())
+        log = Stream('path', 123)
+        self.assertEqual(123, log.get_cycle())
+
+    def test_cycle_gzip(self):
+        log = Stream('path')
+        self.assertEqual(None, log.get_cycle_gzip())
+        log.set_cycle_gzip(True)
+        self.assertEqual(True, log.get_cycle_gzip())
+        log.set_cycle_gzip(None)
+        self.assertEqual(None, log.get_cycle_gzip())
+        log = Stream('path', 123, False)
+        self.assertEqual(False, log.get_cycle_gzip())
+        log = Stream('path', cycle_gzip = False)
+        self.assertEqual(False, log.get_cycle_gzip())
+
+    def test_filter(self):
+        log = Stream('path')
+        self.assertEqual([], log.get_filters())
+        log.add_filter('gzip')
+        self.assertEqual(['gzip'], log.get_filters())
+        log.add_filter('bzip2')
+        self.assertEqual(['gzip', 'bzip2'], log.get_filters())
+        log.add_filter('bzip2', 0)
+        self.assertEqual(['bzip2', 'gzip', 'bzip2'], log.get_filters())
+        self.assertEqual('gzip', log.get_filter(1))
+        log.remove_filter(1)
+        self.assertEqual(['bzip2', 'bzip2'], log.get_filters())
+        log = Stream('path', 123, False, ['gzip'])
+        self.assertEqual(['gzip'], log.get_filters())
+        log = Stream('path', filter = ['gzip'])
+        self.assertEqual(['gzip'], log.get_filters())
+
+    def test_from_string(self):
+        text = '''<STREAM location="path" cycle=123 cycle_gzip="NO">
+  <FILTER>gzip</FILTER>
+  <FILTER>bzip2</FILTER>
+</STREAM>'''
+        log = Stream.from_string(text)
+        self.assertEqual('path', log.get_location())
+        self.assertEqual(123, log.get_cycle())
+        self.assertFalse(log.get_cycle_gzip())
+        self.assertEqual(['gzip', 'bzip2'], log.get_filters())
+        text = '<STREAM location="path />'
+        log = Stream.from_string(text)
+        self.assertEqual('path', log.get_location())
+        self.assertEqual(None, log.get_cycle())
+        self.assertEqual(None, log.get_cycle_gzip())
+        self.assertEqual([], log.get_filters())
+
+    def test_from_lxml(self):
+        text = '''<STREAM location="path" cycle=123 cycle_gzip="NO">
+  <FILTER>gzip</FILTER>
+  <FILTER>bzip2</FILTER>
+</STREAM>'''
+        log = Stream.from_lxml_element(etree.XML(text))
+        self.assertEqual('path', log.get_location())
+        self.assertEqual(123, log.get_cycle())
+        self.assertFalse(log.get_cycle_gzip())
+        self.assertEqual(['gzip', 'bzip2'], log.get_filters())
+        text = '<STREAM location="path />'
+        log = Stream.from_lxml_element(etree.XML(text))
+        self.assertEqual('path', log.get_location())
+        self.assertEqual(None, log.get_cycle())
+        self.assertEqual(None, log.get_cycle_gzip())
+        self.assertEqual([], log.get_filters())
+
+    def test_bad_root_tag(self):
+        text = '<ERROR location="path" />'
+        self.assertRaises(AttributeError, Stream.from_string, text)
+        self.assertRaises(AttributeError, Stream.from_lxml_element,
+                          etree.XML(text))
+    
+    def test_equality(self):
+        self.assertEqual(Stream('path', 123, False, ['gzip', 'bzip2']),
+                         Stream('path', 123, False, ['gzip', 'bzip2']))
+        self.assertEqual(Stream('path1', 123, False, ['gzip', 'bzip2']),
+                         Stream('path2', 123, False, ['gzip', 'bzip2']))
+        self.assertEqual(Stream('path', 1234, False, ['gzip', 'bzip2']),
+                         Stream('path', 123, False, ['gzip', 'bzip2']))
+        self.assertEqual(Stream('path', 123, True, ['gzip', 'bzip2']),
+                         Stream('path', 123, False, ['gzip', 'bzip2']))
+        self.assertEqual(Stream('path', 123, True, ['bzip2']),
+                         Stream('path', 123, False, ['gzip', 'bzip2']))
+
+    def test_to_string(self):
+        text = '''<STREAM location="path" cycle=123 cycle_gzip="NO">
+  <FILTER>gzip</FILTER>
+  <FILTER>bzip2</FILTER>
+</STREAM>'''
+        log = Stream.from_string(text)
+        copy = Stream.from_string(str(log))
+        self.assertEqual(log, copy)
+
+    def test_to_lxml(self):
+        text = '''<STREAM location="path" cycle=123 cycle_gzip="NO">
+  <FILTER>gzip</FILTER>
+  <FILTER>bzip2</FILTER>
+</STREAM>'''
+        log = Stream.from_string(text)
+        copy = Stream.from_lxml_element(log.to_lxml_element())
+        self.assertEqual(log, copy)



commit 5064583a62c20962fd089ff747b8d0d9538a574b
Author: Marek Aaron Sapota <maarons@gnu.org>
Date:   Sun Jun 28 21:41:05 2009 +0200

    Extended mime types classes and tests for them.

diff --git a/misc/py_control_client/pycontrollib/mimetypes.py b/misc/py_control_client/pycontrollib/mimetypes.py
index b9f4877..a6a4190 100644
--- a/misc/py_control_client/pycontrollib/mimetypes.py
+++ b/misc/py_control_client/pycontrollib/mimetypes.py
@@ -16,23 +16,19 @@ You should have received a copy of the GNU General Public License
 along with this program.  If not, see <http://www.gnu.org/licenses/>.
 '''
 
+from definition import Definition
 from lxml import etree
 
 class MIMEType():
     valid_handlers = set(['SEND', 'CGI', 'FASTCGI', 'SCGI', 'MSCGI', 'ISAPI',
                           'WINCGI', 'PROxY'])
 
-    class WrongArguments(Exception):
-        '''Exception raised when MIMEType is constructed with invalid
-        arguments.'''
-        pass
-
-    def __init__(self, mime, handler, param, extension, path = None,
-                 filter = None, self_executed = None, definitions = None):
+    def __init__(self, mime, handler, param = None, extension = set(), path = None,
+                 filter = [], self_executed = None, definitions = []):
         '''Creates new MIMEType with specified attributes.'''
         self.mime = mime
         if handler not in MIMEType.valid_handlers:
-            raise MIMEType.WrongArguments(
+            raise AttributeError(
                 '{0} is not a valid handler'.format(handler))
         self.handler = handler
         self.param = param
@@ -41,7 +37,101 @@ class MIMEType():
         self.filter = filter
         self.self_executed = self_executed
         self.definitions = definitions
-        
+
+    def get_mime(self):
+        '''Get associated mime type.'''
+        return self.mime
+
+    def set_mime(self, mime):
+        '''Set associated mime type.'''
+        self.mime = mime
+
+    def get_handler(self):
+        '''Get associated handler.'''
+        return self.handler
+
+    def set_handler(self, handler):
+        '''Set associated handler.'''
+        if handler not in MIMEType.valid_handlers:
+            raise AttributeError(
+                '{0} is not a valid handler'.format(handler))
+        self.handler = handler
+
+    def get_param(self):
+        '''Get associated param.'''
+        return self.param
+
+    def set_param(self, param):
+        '''Set associated param. None means no param.'''
+        self.param = param
+
+    def get_extensions(self):
+        '''Get associated extensions.'''
+        return self.extension
+
+    def remove_extension(self, extension):
+        '''Remove extension from associated extensions.'''
+        self.extension.remove(extension)
+
+    def add_extension(self, extension):
+        '''Add extension to associated extensions.'''
+        self.extension.add(extension)
+
+    def get_path(self):
+        '''Get associated path.'''
+        return self.path
+
+    def set_path(self, path):
+        '''Set associated path. None means no path.'''
+        self.path = path
+
+    def get_filters(self):
+        '''Get associated filters.'''
+        return self.filter
+
+    def get_filter(self, index):
+        '''Get filter with given index.'''
+        return self.filter[index]
+
+    def remove_filter(self, index):
+        '''Remove filter with given index.'''
+        self.filter.pop(index)
+
+    def add_filter(self, filter, index = None):
+        '''Append filter after all other filters, or insert it at index.'''
+        if index is None:
+            self.filter.append(filter)
+        else:
+            self.filter.insert(index, filter)
+
+    def get_self_executed(self):
+        '''Get self_executed setting.'''
+        return self.self_executed
+
+    def set_self_executed(self, self_executed):
+        '''Set self_executed setting.'''
+        self.self_executed = self_executed
+
+    def get_definitions(self):
+        '''Get all definitions.'''
+        return self.definitions
+    
+    def get_definition(self, index):
+        '''Get definition with given index.'''
+        return self.definitions[index]
+
+    def add_definition(self, definition, index = None):
+        '''Append definition after all other definitions, or insert it at
+        index.'''
+        if index is None:
+            self.definitions.append(definition)
+        else:
+            self.definitions.insert(index, definition)
+
+    def remove_definition(self, index):
+        '''Remove definition with given index.'''
+        self.definitions.pop(index)
+
     def __eq__(self, other):
         return \
             self.mime == other.mime and \
@@ -60,42 +150,54 @@ class MIMEType():
             return element
         def make_extension_element(extension):
             return make_element('EXTENSION', 'value', extension)
+        def make_filter_element(filter):
+            return make_element('FILTER', 'value', filter)
         root = etree.Element('MIME')
         root.set('mime', self.mime)
         root.set('handler', self.handler)
-        root.set('param', self.param)
+        if self.param is not None:
+            root.set('param', self.param)
         if self.self_executed is not None:
             root.set('self', 'YES' if self.self_executed else 'NO')
-        for element in map(make_extension_element, self.extension):
-            root.append(element)
         if self.path is not None:
             root.append(make_element('PATH', 'regex', self.path))
-        if self.filter is not None:
-            root.append(make_element('FILTER', 'value', self.filter))
+        for element in map(make_extension_element, self.extension):
+            root.append(element)
+        for element in map(make_filter_element, self.filter):
+            root.append(element)
+        for definition in self.definitions:
+            root.append(definition.to_lxml_element())
         return root
 
-    def __str__(self): # TODO: definitions
+    def __str__(self):
         return etree.tostring(self.to_lxml_element(), pretty_print = True)
 
     @staticmethod
-    def from_lxml_element(root): # TODO: definitions
+    def from_lxml_element(root):
         '''Factory to produce MIMEType from etree.Element object.'''
+        if root.tag != 'MIME':
+            raise AttributeError('Expected MIME tag.')
         mime = root.get('mime', None)
         handler = root.get('handler', None)
         param = root.get('param', None)
         self_executed = root.get('self', None)
         if self_executed is not None:
-            self_executed = False if self_executed == 'NO' else True
-        extension = set(map(lambda element: element.get('value'),
-                            root.findall('EXTENSION')))
-        path = root.find('PATH')
-        if path is not None:
-            path = path.get('regex')
-        filter = root.find('FILTER')
-        if filter is not None:
-            filter = filter.get('value')
+            self_executed = self_executed == 'YES'
+        path = None
+        extension = set()
+        filter = []
+        definitions = []
+        for child in list(root):
+            if child.tag == 'PATH':
+                path = child.get('regex')
+            elif child.tag == 'FILTER':
+                filter.append(child.get('value'))
+            elif child.tag == 'EXTENSION':
+                extension.add(child.get('value'))
+            elif child.tag == 'DEFINE':
+                definitions.append(Definition.from_lxml_element(child))
         return MIMEType(mime, handler, param, extension, path, filter,
-                        self_executed, None)
+                        self_executed, definitions)
 
     @staticmethod
     def from_string(text):
@@ -121,7 +223,9 @@ class MIMETypes():
     @staticmethod
     def from_lxml_element(root):
         '''Factory to produce MIMETypes from etree.Element object.'''
-        return MIMETypes(map(MIMEType.from_lxml_element, root.findall('MIME')))
+        if root.tag != 'MIMES':
+            raise AttributeError('Expected MIMES tag.')
+        return MIMETypes(map(MIMEType.from_lxml_element, list(root)))
     
     @staticmethod
     def from_string(text):
diff --git a/misc/py_control_client/pycontrollib/mimetypes_test.py b/misc/py_control_client/pycontrollib/mimetypes_test.py
index ec96779..607e2cb 100644
--- a/misc/py_control_client/pycontrollib/mimetypes_test.py
+++ b/misc/py_control_client/pycontrollib/mimetypes_test.py
@@ -17,38 +17,129 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 '''
 
 import unittest
+from lxml import etree
 from mimetypes import MIMEType, MIMETypes
+from definition import Definition
 
 class MIMETypeTest(unittest.TestCase):
-    text = '''<MIME mime="application/xhtml+xml" handler="CGI" param="/usr/bin/python" self="NO" >
+    def setUp(self):
+        self.definitions = []
+        self.definitions.append(Definition.from_string(
+                '<DEFINE name="http.use_error_file" value="YES" />'))
+        self.definitions.append(Definition.from_string(
+                '<DEFINE name="http.error.file.404" value="404.html" />'))
+        self.definitions.append(Definition.from_string(
+                '''<DEFINE name="http.default_file">
+  <DEFINE value="index.html" />
+  <DEFINE value="index.htm" />
+</DEFINE>'''))
+        self.text = \
+            '''<MIME mime="application/xhtml+xml" handler="CGI" param="/usr/bin/python" self="NO" >
   <EXTENSION value="xhtml" />
   <EXTENSION value="xml" />
   <EXTENSION value="py" />
   <FILTER value="gzip" />
+  <FILTER value="bzip2" />
+  {0}
   <PATH regex="^/cgi-bin/python/.*$" />
-</MIME>'''
+</MIME>'''.format('\n'.join(map(lambda element: str(element),
+                                self.definitions)))
     
     def test_from_string(self):
-        mime = MIMEType.from_string(MIMETypeTest.text)
-        self.assertEqual(mime.mime, 'application/xhtml+xml')
-        self.assertEqual(mime.handler, 'CGI')
-        self.assertEqual(mime.param, '/usr/bin/python')
-        self.assertEqual(mime.extension, set(['xhtml', 'xml', 'py']))
-        self.assertEqual(mime.path, '^/cgi-bin/python/.*$')
-        self.assertEqual(mime.filter, 'gzip')
-        self.assertEqual(mime.self_executed, False)
+        mime = MIMEType.from_string(self.text)
+        self.assertEqual(mime.get_mime(), 'application/xhtml+xml')
+        self.assertEqual(mime.get_handler(), 'CGI')
+        self.assertEqual(mime.get_param(), '/usr/bin/python')
+        self.assertEqual(mime.get_extensions(), set(['xhtml', 'xml', 'py']))
+        self.assertEqual(mime.get_path(), '^/cgi-bin/python/.*$')
+        self.assertEqual(mime.get_filters(), ['gzip', 'bzip2'])
+        self.assertEqual(mime.get_self_executed(), False)
+        self.assertEqual(mime.get_definitions(), self.definitions)
+
+    def test_from_lxml(self):
+        mime = MIMEType.from_lxml_element(etree.XML(self.text))
+        self.assertEqual(mime.get_mime(), 'application/xhtml+xml')
+        self.assertEqual(mime.get_handler(), 'CGI')
+        self.assertEqual(mime.get_param(), '/usr/bin/python')
+        self.assertEqual(mime.get_extensions(), set(['xhtml', 'xml', 'py']))
+        self.assertEqual(mime.get_path(), '^/cgi-bin/python/.*$')
+        self.assertEqual(mime.get_filters(), ['gzip', 'bzip2'])
+        self.assertEqual(mime.get_self_executed(), False)
+        self.assertEqual(mime.get_definitions(), self.definitions)
+
+    def test_handler(self):
+        mime = MIMEType.from_string(self.text)
+        for handler in MIMEType.valid_handlers:
+            mime.set_handler(handler)
+        self.assertRaises(AttributeError, mime.set_handler, 'ERROR')
+        
+    def test_attributes(self):
+        mime = MIMEType.from_string(self.text)
+        mime.set_mime('plain/text')
+        self.assertEqual(mime.get_mime(), 'plain/text')
+        mime.set_handler('SEND')
+        self.assertEqual(mime.get_handler(), 'SEND')
+        mime.set_param('')
+        self.assertEqual(mime.get_param(), '')
+        mime.remove_extension('py')
+        self.assertEqual(mime.get_extensions(), set(['xhtml', 'xml']))
+        mime.add_extension('pyc')
+        self.assertEqual(mime.get_extensions(), set(['xhtml', 'xml', 'pyc']))
+        mime.set_path('^/python/')
+        self.assertEqual(mime.get_path(), '^/python/')
+        mime.remove_filter(0)
+        self.assertEqual(mime.get_filters(), ['bzip2'])
+        mime.add_filter('gzip')
+        self.assertEqual(mime.get_filters(), ['bzip2', 'gzip'])
+        mime.add_filter('gzip', 0)
+        self.assertEqual(mime.get_filters(), ['gzip', 'bzip2', 'gzip'])
+        self.assertEqual(mime.get_filter(1), 'bzip2')
+        mime.set_self_executed(True)
+        self.assertEqual(mime.get_self_executed(), True)
+        definition = Definition.from_string(
+            '<DEFINE name="http.error.file.404" value="404.html" />')
+        mime.add_definition(definition)
+        self.definitions.append(definition)
+        self.assertEqual(mime.get_definitions(), self.definitions)
+        mime.add_definition(definition, 0)
+        self.definitions.insert(0, definition)
+        self.assertEqual(mime.get_definitions(), self.definitions)
+        mime.remove_definition(1)
+        self.definitions.pop(1)
+        self.assertEqual(mime.get_definitions(), self.definitions)
+        self.assertEqual(mime.get_definition(1), self.definitions[1])
+        
+    def test_equality(self):
+        self.assertEqual(MIMEType.from_string(self.text),
+                         MIMEType.from_string(self.text))
+        self.assertNotEqual(MIMEType.from_string(self.text),
+                            MIMEType('text/plain', 'SEND'))
         
     def test_to_string(self):
-        mime = MIMEType.from_string(MIMETypeTest.text)
+        mime = MIMEType.from_string(self.text)
         copy = MIMEType.from_string(str(mime))
         self.assertEqual(mime, copy)
         
+    def test_to_lxml(self):
+        mime = MIMEType.from_string(self.text)
+        copy = MIMEType.from_lxml_element(mime.to_lxml_element())
+        self.assertEqual(mime, copy)
+        
+
+    def test_bad_root_tag(self):
+        text = '''<ERROR mime="application/xhtml+xml" handler="CGI" param="/usr/bin/python" self="NO" >
+  <EXTENSION value="xhtml" />
+</ERROR>'''
+        self.assertRaises(AttributeError, MIMEType.from_string, text)
+        self.assertRaises(AttributeError, MIMEType.from_lxml_element,
+                          etree.XML(text))
+        
 class MIMETypesTest(unittest.TestCase):
-    mime_0 = '''<MIME mime="text/html" handler="FASTCGI" self="YES" param="">
+    def setUp(self):
+        self.mime_0 = '''<MIME mime="text/html" handler="FASTCGI" self="YES" param="">
   <EXTENSION value="fcgi"/>
 </MIME>'''
-
-    mime_1 = '''<MIME mime="text/plain" handler="SEND" param="">
+        self.mime_1 = '''<MIME mime="text/plain" handler="SEND" param="">
   <EXTENSION value="asc"/>
   <EXTENSION value="c"/>
   <EXTENSION value="cc"/>
@@ -59,20 +150,41 @@ class MIMETypesTest(unittest.TestCase):
   <EXTENSION value="m"/>
   <EXTENSION value="txt"/>
 </MIME>'''
-    
-    text = '<MIMES>{0}{1}</MIMES>'.format(mime_0, mime_1)
+        self.text = '<MIMES>{0}{1}</MIMES>'.format(self.mime_0, self.mime_1)
     
     def test_from_string(self):
-        mimes = MIMETypes.from_string(MIMETypesTest.text)
-        self.assertEqual(mimes.MIME_types[0],
-                         MIMEType.from_string(MIMETypesTest.mime_0))
-        self.assertEqual(mimes.MIME_types[1],
-                         MIMEType.from_string(MIMETypesTest.mime_1))
+        mimes = MIMETypes.from_string(self.text)
+        self.assertEqual(mimes.MIME_types[0], MIMEType.from_string(self.mime_0))
+        self.assertEqual(mimes.MIME_types[1], MIMEType.from_string(self.mime_1))
+
+    def test_from_lxml(self):
+        mimes = MIMETypes.from_lxml_element(etree.XML(self.text))
+        self.assertEqual(mimes.MIME_types[0], MIMEType.from_string(self.mime_0))
+        self.assertEqual(mimes.MIME_types[1], MIMEType.from_string(self.mime_1))
         
     def test_to_string(self):
-        mimes = MIMETypes.from_string(MIMETypesTest.text)
+        mimes = MIMETypes.from_string(self.text)
         copy = MIMETypes.from_string(str(mimes))
         self.assertEqual(mimes, copy)
         
+    def test_to_lxml(self):
+        mimes = MIMETypes.from_string(self.text)
+        copy = MIMETypes.from_lxml_element(mimes.to_lxml_element())
+        self.assertEqual(mimes, copy)
+
+    def test_equality(self):
+        self.assertEqual(MIMETypes.from_string(self.text),
+                         MIMETypes.from_string(self.text))
+        self.assertNotEqual(MIMETypes.from_string(self.text),
+                            MIMETypes.from_string(
+                '<MIMES>{0}</MIMES>'.format(self.mime_0)))
+
+    def test_bad_root_tag(self):
+        text = '<ERROR>{0}{1}</ERROR>'.format(
+            self.mime_0, self.mime_1)
+        self.assertRaises(AttributeError, MIMETypes.from_string, text)
+        self.assertRaises(AttributeError, MIMETypes.from_lxml_element,
+                          etree.XML(text))
+        
 if __name__ == '__main__':
     unittest.main()



commit c32449cf08ef4588c38a8fbd679db03c0c76be4c
Author: Marek Aaron Sapota <maarons@gnu.org>
Date:   Sun Jun 28 21:36:28 2009 +0200

    Fix equality of definitions an other types.

diff --git a/misc/py_control_client/pycontrollib/definition.py b/misc/py_control_client/pycontrollib/definition.py
index aa3dc94..1344723 100644
--- a/misc/py_control_client/pycontrollib/definition.py
+++ b/misc/py_control_client/pycontrollib/definition.py
@@ -30,7 +30,9 @@ class Definition():
         self.attributes = attributes
 
     def __eq__(self, other):
-        return self.name == other.name and self.attributes == other.attributes
+        return isinstance(other, Definition) and \
+            self.name == other.name and \
+            self.attributes == other.attributes
 
     def get_name(self):
         '''Definition name, None means no name.'''
@@ -83,7 +85,8 @@ class DefinitionElement(Definition):
             Definition.__init__(self, name, attributes)
 
     def __eq__(self, other):
-        return Definition.__eq__(self, other)
+        return isinstance(other, DefinitionElement) and \
+            Definition.__eq__(self, other)
 
     def set_attribute(self, key, value):
         '''Set attribute key to given value.'''
@@ -128,7 +131,9 @@ class DefinitionTree(Definition):
         self.values = values
 
     def __eq__(self, other):
-        return Definition.__eq__(self, other) and self.values == other.values
+        return isinstance(other, DefinitionTree) and \
+            Definition.__eq__(self, other) and \
+            self.values == other.values
 
     def get_values(self):
         '''Get all sub-definitions.'''
diff --git a/misc/py_control_client/pycontrollib/definition_test.py b/misc/py_control_client/pycontrollib/definition_test.py
index 387ba57..adf3533 100644
--- a/misc/py_control_client/pycontrollib/definition_test.py
+++ b/misc/py_control_client/pycontrollib/definition_test.py
@@ -71,6 +71,9 @@ class DefinitionTest(unittest.TestCase):
         self.assertRaises(AttributeError, Definition.from_string, text)
         self.assertRaises(AttributeError, Definition.from_lxml_element,
                           etree.XML(text))
+
+    def test_equality(self):
+        self.assertNotEqual(Definition(), 'different type')
     
 class DefinitionElementTest(unittest.TestCase):
     def test_creation(self):
@@ -136,6 +139,7 @@ host="localhost" port="2010" local="yes" uid="1000" gid="1000" />'''
                             DefinitionElement('name2'))
         self.assertNotEqual(DefinitionElement('name', {'attribute': '1'}),
                             DefinitionElement('name', {'attribute': '2'}))
+        self.assertNotEqual(DefinitionElement(), 'different type')
 
     def test_to_string(self):
         text = '''<DEFINE server="/opt/bin/fastcgi_server" domain="fastcgi"
@@ -231,6 +235,7 @@ class DefinitionTreeTest(unittest.TestCase):
             self.element_1, self.element_2)
         self.assertEqual(DefinitionTree.from_string(text), DefinitionTree.from_string(text))
         self.assertNotEqual(DefinitionTree.from_string(text), DefinitionTree('test'))
+        self.assertNotEqual(DefinitionTree(), 'different type')
 
     def test_to_string(self):
         text = '<DEFINE name="test" key="value">{0}{1}</DEFINE>'.format(



commit 4a5ec3753456e100c888234c97712fcd4f039237
Author: Marek Aaron Sapota <maarons@gnu.org>
Date:   Sun Jun 28 20:28:44 2009 +0200

    Check if tag names are right when creating definitions.

diff --git a/misc/py_control_client/pycontrollib/definition.py b/misc/py_control_client/pycontrollib/definition.py
index 9074903..aa3dc94 100644
--- a/misc/py_control_client/pycontrollib/definition.py
+++ b/misc/py_control_client/pycontrollib/definition.py
@@ -58,6 +58,8 @@ class Definition():
     def from_lxml_element(root):
         '''Factory to produce definition element or tree from etree.Element
         object.'''
+        if root.tag != 'DEFINE':
+            raise AttributeError('Expected DEFINE tag.')
         if len(list(root)):
             return DefinitionTree.from_lxml_element(root)
         else:
@@ -105,6 +107,8 @@ class DefinitionElement(Definition):
     @staticmethod
     def from_lxml_element(root):
         '''Factory to produce definition element from etree.Element object.'''
+        if root.tag != 'DEFINE':
+            raise AttributeError('Expected DEFINE tag.')
         attributes = root.attrib
         name = attributes.pop('name', None)
         return DefinitionElement(name, attributes)
@@ -149,6 +153,8 @@ class DefinitionTree(Definition):
     @staticmethod
     def from_lxml_element(root):
         '''Factory to produce definition tree from etree.Element object.'''
+        if root.tag != 'DEFINE':
+            raise AttributeError('Expected DEFINE tag.')
         attributes = root.attrib
         name = attributes.pop('name', None)
         values = map(Definition.from_lxml_element, list(root))
diff --git a/misc/py_control_client/pycontrollib/definition_test.py b/misc/py_control_client/pycontrollib/definition_test.py
index 3c5917c..387ba57 100644
--- a/misc/py_control_client/pycontrollib/definition_test.py
+++ b/misc/py_control_client/pycontrollib/definition_test.py
@@ -66,6 +66,12 @@ class DefinitionTest(unittest.TestCase):
         definition = Definition.from_lxml_element(etree.XML(text))
         self.assertTrue(isinstance(definition, DefinitionTree))
 
+    def test_bad_root_tag(self):
+        text = '<ERROR name="http.error.file.404" value="404.html" />'
+        self.assertRaises(AttributeError, Definition.from_string, text)
+        self.assertRaises(AttributeError, Definition.from_lxml_element,
+                          etree.XML(text))
+    
 class DefinitionElementTest(unittest.TestCase):
     def test_creation(self):
         definition = DefinitionElement()
@@ -146,6 +152,12 @@ domain="fastcgi" host="localhost" port="2010" local="yes" uid="1000" gid="1000"
         copy = DefinitionElement.from_lxml_element(definition.to_lxml_element())
         self.assertEqual(definition, copy)
 
+    def test_bad_root_tag(self):
+        text = '<ERROR name="http.error.file.404" value="404.html" />'
+        self.assertRaises(AttributeError, Definition.from_string, text)
+        self.assertRaises(AttributeError, Definition.from_lxml_element,
+                          etree.XML(text))
+
 class DefinitionTreeTest(unittest.TestCase):
     def setUp(self):
         self.element_1 = DefinitionElement('http.error.file.404',
@@ -234,5 +246,12 @@ class DefinitionTreeTest(unittest.TestCase):
         copy = DefinitionTree.from_lxml_element(definition.to_lxml_element())
         self.assertEqual(definition, copy)
 
+    def test_bad_root_tag(self):
+        text = '<ERROR name="test" key="value">{0}{1}</ERROR>'.format(
+            self.element_1, self.element_2)
+        self.assertRaises(AttributeError, Definition.from_string, text)
+        self.assertRaises(AttributeError, Definition.from_lxml_element,
+                          etree.XML(text))
+
 if __name__ == '__main__':
     unittest.main()



commit 58e336c9d612a1db3073b80d079652eae6dd1cbc
Author: Marek Aaron Sapota <maarons@gnu.org>
Date:   Sun Jun 28 19:01:02 2009 +0200

    Changed definitions, so only DefinitionElement accepts value attribute.

diff --git a/misc/py_control_client/pycontrollib/definition.py b/misc/py_control_client/pycontrollib/definition.py
index 1d7e6c4..9074903 100644
--- a/misc/py_control_client/pycontrollib/definition.py
+++ b/misc/py_control_client/pycontrollib/definition.py
@@ -24,6 +24,8 @@ class Definition():
 
     def __init__(self, name = None, attributes = {}):
         '''Creates new definition with given name and attributes.'''
+        if attributes.has_key('value'):
+            raise KeyError('value is not an allowed key')
         self.name = name
         self.attributes = attributes
 
@@ -44,6 +46,8 @@ class Definition():
 
     def set_attribute(self, key, value):
         '''Set attribute key to given value.'''
+        if key == 'value':
+            raise KeyError('value is not an allowd key')
         self.attributes[key] = value
 
     def remove_attribute(self, key):
@@ -69,11 +73,23 @@ class DefinitionElement(Definition):
 
     def __init__(self, name = None, attributes = {}):
         '''Creates new definition element with given name and attributes.'''
-        Definition.__init__(self, name, attributes)
+        if attributes.has_key('value'):
+            value = attributes.pop('value')
+            Definition.__init__(self, name, attributes)
+            self.attributes['value'] = value
+        else:
+            Definition.__init__(self, name, attributes)
 
     def __eq__(self, other):
         return Definition.__eq__(self, other)
 
+    def set_attribute(self, key, value):
+        '''Set attribute key to given value.'''
+        if key == 'value':
+            self.attributes['value'] = value
+        else:
+            Definition.set_attribute(self, key, value)
+
     def to_lxml_element(self):
         '''Convert definition element to etree.Element object.'''
         root = etree.Element('DEFINE')
diff --git a/misc/py_control_client/pycontrollib/definition_test.py b/misc/py_control_client/pycontrollib/definition_test.py
index d4b06f6..3c5917c 100644
--- a/misc/py_control_client/pycontrollib/definition_test.py
+++ b/misc/py_control_client/pycontrollib/definition_test.py
@@ -23,14 +23,8 @@ import unittest
 class DefinitionTest(unittest.TestCase):
     def test_creation(self):
         definition = Definition()
-        self.assertEqual(None, definition.get_name())
-        self.assertEqual({}, definition.attributes)
         definition = Definition('no attributes')
-        self.assertEqual('no attributes', definition.get_name())
-        self.assertEqual({}, definition.attributes)
         definition = Definition('with attributes', {'a': 'b', 'c': 'd'})
-        self.assertEqual('with attributes', definition.get_name())
-        self.assertEqual({'a': 'b', 'c': 'd'}, definition.attributes)
 
     def test_name(self):
         definition = Definition('name1')
@@ -51,6 +45,11 @@ class DefinitionTest(unittest.TestCase):
         self.assertEqual(None, definition.get_attribute('e'))
         self.assertRaises(KeyError, definition.remove_attribute, 'e')
 
+    def test_value(self):
+        self.assertRaises(KeyError, Definition, 'name', {'value': 'x'})
+        definition = Definition('name')
+        self.assertRaises(KeyError, definition.set_attribute, 'value', 'x')
+
     def test_from_string(self):
         text = '<DEFINE name="http.error.file.404" value="404.html" />'
         definition = Definition.from_string(text)
@@ -76,6 +75,14 @@ class DefinitionElementTest(unittest.TestCase):
         definition = DefinitionElement('name', {'value': 'value'})
         self.assertTrue(isinstance(definition, Definition))
 
+    def test_value(self):
+        definition = DefinitionElement('name', {'value': 'x'})
+        self.assertEqual('x', definition.get_attribute('value'))
+        definition.set_attribute('value', 'y')
+        self.assertEqual('y', definition.get_attribute('value'))
+        definition.remove_attribute('value')
+        self.assertEqual(None, definition.get_attribute('value'))
+
     def test_from_string(self):
         text = '<DEFINE name="http.error.file.404" value="404.html" />'
         definition = DefinitionElement.from_string(text)
@@ -140,80 +147,89 @@ domain="fastcgi" host="localhost" port="2010" local="yes" uid="1000" gid="1000"
         self.assertEqual(definition, copy)
 
 class DefinitionTreeTest(unittest.TestCase):
-    element_1 = DefinitionElement('http.error.file.404', {'value': '404.html'})
-    element_2 = DefinitionElement(attributes = {'server': '/opt/bin/fastcgi_server',
-                                                'domain': 'fastcgi', 'host': 'localhost',
-                                                'port': '2010', 'local': 'yes',
-                                                'uid': '1000', 'gid': '1000'})
+    def setUp(self):
+        self.element_1 = DefinitionElement('http.error.file.404',
+                                           {'value': '404.html'})
+        self.element_2 = DefinitionElement(
+            attributes = {'server': '/opt/bin/fastcgi_server',
+                          'domain': 'fastcgi', 'host': 'localhost',
+                          'port': '2010', 'local': 'yes',
+                          'uid': '1000', 'gid': '1000'})
+
     def test_creation(self):
         definition = DefinitionTree()
         self.assertTrue(isinstance(definition, Definition))
         definition = DefinitionTree('name')
         self.assertTrue(isinstance(definition, Definition))
-        definition = DefinitionTree('name', [DefinitionTreeTest.element_1])
+        definition = DefinitionTree('name', [self.element_1])
         self.assertTrue(isinstance(definition, Definition))
-        definition = DefinitionTree('name', [DefinitionTreeTest.element_2], {'value': '1'})
+        definition = DefinitionTree('name', [self.element_2], {'key': 'value'})
         self.assertTrue(isinstance(definition, Definition))
 
+    def test_value(self):
+        self.assertRaises(KeyError, DefinitionTree, 'name', [], {'value': 'x'})
+        definition = Definition('name')
+        self.assertRaises(KeyError, definition.set_attribute, 'value', 'x')
+
     def test_values(self):
         definition = DefinitionTree()
         self.assertEqual(0, len(definition.get_values()))
-        definition.add_value(DefinitionTreeTest.element_1)
+        definition.add_value(self.element_1)
         self.assertEqual(1, len(definition.get_values()))
-        self.assertEqual(DefinitionTreeTest.element_1, definition.get_value(0))
-        definition.add_value(DefinitionTreeTest.element_2)
+        self.assertEqual(self.element_1, definition.get_value(0))
+        definition.add_value(self.element_2)
         self.assertEqual(2, len(definition.get_values()))
-        self.assertEqual(DefinitionTreeTest.element_1, definition.get_value(0))
-        self.assertEqual(DefinitionTreeTest.element_2, definition.get_value(1))
+        self.assertEqual(self.element_1, definition.get_value(0))
+        self.assertEqual(self.element_2, definition.get_value(1))
         definition.remove_value(0)
         self.assertEqual(1, len(definition.get_values()))
-        self.assertEqual(DefinitionTreeTest.element_2, definition.get_value(0))
-        definition.add_value(DefinitionTreeTest.element_1, 0)
+        self.assertEqual(self.element_2, definition.get_value(0))
+        definition.add_value(self.element_1, 0)
         self.assertEqual(2, len(definition.get_values()))
-        self.assertEqual(DefinitionTreeTest.element_1, definition.get_value(0))
-        self.assertEqual(DefinitionTreeTest.element_2, definition.get_value(1))
+        self.assertEqual(self.element_1, definition.get_value(0))
+        self.assertEqual(self.element_2, definition.get_value(1))
 
     def test_from_string(self):
         text = '<DEFINE name="test" key="value">{0}{1}</DEFINE>'.format(
-            DefinitionTreeTest.element_1, DefinitionTreeTest.element_2)
+            self.element_1, self.element_2)
         definition = DefinitionTree.from_string(text)
         self.assertEqual('test', definition.get_name())
         self.assertEqual('value', definition.get_attribute('key'))
         definitions = definition.get_values()
         self.assertEqual(2, len(definitions))
-        self.assertEqual(DefinitionTreeTest.element_1, definitions[0])
-        self.assertEqual(DefinitionTreeTest.element_2, definitions[1])
+        self.assertEqual(self.element_1, definitions[0])
+        self.assertEqual(self.element_2, definitions[1])
 
     def test_from_lxml(self):
         root = etree.Element('DEFINE')
         root.set('name', 'test')
         root.set('key', 'value')
-        root.append(DefinitionTreeTest.element_1.to_lxml_element())
-        root.append(DefinitionTreeTest.element_2.to_lxml_element())
+        root.append(self.element_1.to_lxml_element())
+        root.append(self.element_2.to_lxml_element())
         definition = DefinitionTree.from_lxml_element(root)
         self.assertEqual('test', definition.get_name())
         self.assertEqual('value', definition.get_attribute('key'))
         definitions = definition.get_values()
         self.assertEqual(2, len(definitions))
-        self.assertEqual(DefinitionTreeTest.element_1, definitions[0])
-        self.assertEqual(DefinitionTreeTest.element_2, definitions[1])
+        self.assertEqual(self.element_1, definitions[0])
+        self.assertEqual(self.element_2, definitions[1])
 
     def test_equality(self):
         text = '<DEFINE name="test" key="value">{0}{1}</DEFINE>'.format(
-            DefinitionTreeTest.element_1, DefinitionTreeTest.element_2)
+            self.element_1, self.element_2)
         self.assertEqual(DefinitionTree.from_string(text), DefinitionTree.from_string(text))
         self.assertNotEqual(DefinitionTree.from_string(text), DefinitionTree('test'))
 
     def test_to_string(self):
         text = '<DEFINE name="test" key="value">{0}{1}</DEFINE>'.format(
-            DefinitionTreeTest.element_1, DefinitionTreeTest.element_2)
+            self.element_1, self.element_2)
         definition = DefinitionTree.from_string(text)
         copy = DefinitionTree.from_string(str(definition))
         self.assertEqual(definition, copy)
 
     def test_to_lxml(self):
         text = '<DEFINE name="test" key="value">{0}{1}</DEFINE>'.format(
-            DefinitionTreeTest.element_1, DefinitionTreeTest.element_2)
+            self.element_1, self.element_2)
         definition = DefinitionTree.from_string(text)
         copy = DefinitionTree.from_lxml_element(definition.to_lxml_element())
         self.assertEqual(definition, copy)



commit fae84295c23e72dca20766fba304f030f882365f
Author: Marek Aaron Sapota <maarons@gnu.org>
Date:   Sat Jun 27 16:21:57 2009 +0200

    Added Definition, DefinitionElement and DefinitionTree classes.

diff --git a/misc/py_control_client/pycontrollib/definition.py b/misc/py_control_client/pycontrollib/definition.py
new file mode 100644
index 0000000..1d7e6c4
--- /dev/null
+++ b/misc/py_control_client/pycontrollib/definition.py
@@ -0,0 +1,159 @@
+# -*- coding: utf-8 -*-
+'''
+MyServer
+Copyright (C) 2009 Free Software Foundation, Inc.
+This program 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 3 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program.  If not, see <http://www.gnu.org/licenses/>.
+'''
+
+from lxml import etree
+
+class Definition():
+    '''Common interface for DefinitionElement and DefinitionTree. Objects of
+    this type should not exist alone.'''
+
+    def __init__(self, name = None, attributes = {}):
+        '''Creates new definition with given name and attributes.'''
+        self.name = name
+        self.attributes = attributes
+
+    def __eq__(self, other):
+        return self.name == other.name and self.attributes == other.attributes
+
+    def get_name(self):
+        '''Definition name, None means no name.'''
+        return self.name
+
+    def set_name(self, name):
+        '''Set definition name, None means no name.'''
+        self.name = name
+
+    def get_attribute(self, key):
+        '''Get value of attribute key.'''
+        return self.attributes.get(key)
+
+    def set_attribute(self, key, value):
+        '''Set attribute key to given value.'''
+        self.attributes[key] = value
+
+    def remove_attribute(self, key):
+        '''Remove attribute key.'''
+        self.attributes.pop(key)
+
+    @staticmethod
+    def from_lxml_element(root):
+        '''Factory to produce definition element or tree from etree.Element
+        object.'''
+        if len(list(root)):
+            return DefinitionTree.from_lxml_element(root)
+        else:
+            return DefinitionElement.from_lxml_element(root)
+
+    @staticmethod
+    def from_string(text):
+        '''Factory to produce definition element or tree by parsing a string.'''
+        return Definition.from_lxml_element(etree.XML(text))
+
+class DefinitionElement(Definition):
+    '''Single definition element.'''
+
+    def __init__(self, name = None, attributes = {}):
+        '''Creates new definition element with given name and attributes.'''
+        Definition.__init__(self, name, attributes)
+
+    def __eq__(self, other):
+        return Definition.__eq__(self, other)
+
+    def to_lxml_element(self):
+        '''Convert definition element to etree.Element object.'''
+        root = etree.Element('DEFINE')
+        for key, value in self.attributes.iteritems():
+            root.set(key, value)
+        if self.name is not None:
+            root.set('name', self.name)
+        return root
+
+    def __str__(self):
+        return etree.tostring(self.to_lxml_element(), pretty_print = True)
+
+    @staticmethod
+    def from_lxml_element(root):
+        '''Factory to produce definition element from etree.Element object.'''
+        attributes = root.attrib
+        name = attributes.pop('name', None)
+        return DefinitionElement(name, attributes)
+
+    @staticmethod
+    def from_string(text):
+        '''Factory to produce definition element by parsing a string.'''
+        return DefinitionElement.from_lxml_element(etree.XML(text))
+
+class DefinitionTree(Definition):
+    '''Definition element containing other definitions.'''
+
+    def __init__(self, name = None, values = [], attributes = {}):
+        '''Creates new definition tree with given name, sub-definitions and
+        attributes.'''
+        Definition.__init__(self, name, attributes)
+        self.values = values
+
+    def __eq__(self, other):
+        return Definition.__eq__(self, other) and self.values == other.values
+
+    def get_values(self):
+        '''Get all sub-definitions.'''
+        return self.values
+
+    def get_value(self, index):
+        '''Get sub-definition with given index.'''
+        return self.values[index]
+
+    def add_value(self, value, index = None):
+        '''Add value to sub-definitions, either at given position, or at the
+        end.'''
+        if index is None:
+            self.values.append(value)
+        else:
+            self.values.insert(index, value)
+
+    def remove_value(self, index):
+        '''Remove sub-definition with given index.'''
+        self.values.pop(index)
+
+    @staticmethod
+    def from_lxml_element(root):
+        '''Factory to produce definition tree from etree.Element object.'''
+        attributes = root.attrib
+        name = attributes.pop('name', None)
+        values = map(Definition.from_lxml_element, list(root))
+        return DefinitionTree(name, values, attributes)
+
+    @staticmethod
+    def from_string(text):
+        '''Factory to produce definition tree by parsing a string.'''
+        return DefinitionTree.from_lxml_element(etree.XML(text))
+
+    def to_lxml_element(self):
+        '''Convert definition tree to etree.Element object.'''
+        root = etree.Element('DEFINE')
+        for key, value in self.attributes.iteritems():
+            root.set(key, value)
+        if self.name is not None:
+            root.set('name', self.name)
+        for value in self.values:
+            root.append(value.to_lxml_element())
+        return root
+
+    def __str__(self):
+        return etree.tostring(self.to_lxml_element(), pretty_print = True)
+
diff --git a/misc/py_control_client/pycontrollib/definition_test.py b/misc/py_control_client/pycontrollib/definition_test.py
new file mode 100644
index 0000000..d4b06f6
--- /dev/null
+++ b/misc/py_control_client/pycontrollib/definition_test.py
@@ -0,0 +1,222 @@
+# -*- coding: utf-8 -*-
+'''
+MyServer
+Copyright (C) 2009 Free Software Foundation, Inc.
+This program 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 3 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program.  If not, see <http://www.gnu.org/licenses/>.
+'''
+
+from definition import Definition, DefinitionElement, DefinitionTree
+from lxml import etree
+import unittest
+
+class DefinitionTest(unittest.TestCase):
+    def test_creation(self):
+        definition = Definition()
+        self.assertEqual(None, definition.get_name())
+        self.assertEqual({}, definition.attributes)
+        definition = Definition('no attributes')
+        self.assertEqual('no attributes', definition.get_name())
+        self.assertEqual({}, definition.attributes)
+        definition = Definition('with attributes', {'a': 'b', 'c': 'd'})
+        self.assertEqual('with attributes', definition.get_name())
+        self.assertEqual({'a': 'b', 'c': 'd'}, definition.attributes)
+
+    def test_name(self):
+        definition = Definition('name1')
+        self.assertEqual('name1', definition.get_name())
+        definition.set_name('name2')
+        self.assertEqual('name2', definition.get_name())
+
+    def test_attributes(self):
+        definition = Definition('with attributes', {'a': 'b', 'c': 'd'})
+        self.assertEqual('b', definition.get_attribute('a'))
+        self.assertEqual('d', definition.get_attribute('c'))
+        self.assertEqual(None, definition.get_attribute('e'))
+        definition.set_attribute('e', 'f')
+        self.assertEqual('f', definition.get_attribute('e'))
+        definition.set_attribute('e', 'g')
+        self.assertEqual('g', definition.get_attribute('e'))
+        definition.remove_attribute('e')
+        self.assertEqual(None, definition.get_attribute('e'))
+        self.assertRaises(KeyError, definition.remove_attribute, 'e')
+
+    def test_from_string(self):
+        text = '<DEFINE name="http.error.file.404" value="404.html" />'
+        definition = Definition.from_string(text)
+        self.assertTrue(isinstance(definition, DefinitionElement))
+        text = '<DEFINE name="x"><DEFINE value="y" /><DEFINE value="z" /></DEFINE>'
+        definition = Definition.from_string(text)
+        self.assertTrue(isinstance(definition, DefinitionTree))
+
+    def test_from_lxml(self):
+        text = '<DEFINE name="http.error.file.404" value="404.html" />'
+        definition = Definition.from_lxml_element(etree.XML(text))
+        self.assertTrue(isinstance(definition, DefinitionElement))
+        text = '<DEFINE name="x"><DEFINE value="y" /><DEFINE value="z" /></DEFINE>'
+        definition = Definition.from_lxml_element(etree.XML(text))
+        self.assertTrue(isinstance(definition, DefinitionTree))
+
+class DefinitionElementTest(unittest.TestCase):
+    def test_creation(self):
+        definition = DefinitionElement()
+        self.assertTrue(isinstance(definition, Definition))
+        definition = DefinitionElement('name')
+        self.assertTrue(isinstance(definition, Definition))
+        definition = DefinitionElement('name', {'value': 'value'})
+        self.assertTrue(isinstance(definition, Definition))
+
+    def test_from_string(self):
+        text = '<DEFINE name="http.error.file.404" value="404.html" />'
+        definition = DefinitionElement.from_string(text)
+        self.assertEqual('http.error.file.404', definition.get_name())
+        self.assertEqual('404.html', definition.get_attribute('value'))
+        text = '''<DEFINE server="/opt/bin/fastcgi_server" domain="fastcgi"
+host="localhost" port="2010" local="yes" uid="1000" gid="1000" />'''
+        definition = DefinitionElement.from_string(text)
+        self.assertEqual(None, definition.get_attribute('value'))
+        self.assertEqual(None, definition.get_name())
+        self.assertEqual('/opt/bin/fastcgi_server',
+                         definition.get_attribute('server'))
+        self.assertEqual('fastcgi', definition.get_attribute('domain'))
+        self.assertEqual('localhost', definition.get_attribute('host'))
+        self.assertEqual('2010', definition.get_attribute('port'))
+        self.assertEqual('yes', definition.get_attribute('local'))
+        self.assertEqual('1000', definition.get_attribute('uid'))
+        self.assertEqual('1000', definition.get_attribute('gid'))
+
+    def test_from_lxml(self):
+        root = etree.Element('DEFINE')
+        root.set('server', '/opt/bin/fastcgi_server')
+        root.set('domain', 'fastcgi')
+        root.set('host', 'localhost')
+        root.set('port', '2010')
+        root.set('local', 'yes')
+        root.set('uid', '1000')
+        root.set('gid', '1000')
+        definition = DefinitionElement.from_lxml_element(root)
+        self.assertEqual(None, definition.get_attribute('value'))
+        self.assertEqual(None, definition.get_name())
+        self.assertEqual('/opt/bin/fastcgi_server',
+                         definition.get_attribute('server'))
+        self.assertEqual('fastcgi', definition.get_attribute('domain'))
+        self.assertEqual('localhost', definition.get_attribute('host'))
+        self.assertEqual('2010', definition.get_attribute('port'))
+        self.assertEqual('yes', definition.get_attribute('local'))
+        self.assertEqual('1000', definition.get_attribute('uid'))
+        self.assertEqual('1000', definition.get_attribute('gid'))
+
+    def test_equality(self):
+        self.assertEqual(DefinitionElement('name', {'some': 'attributes'}),
+                         DefinitionElement('name', {'some': 'attributes'}))
+        self.assertNotEqual(DefinitionElement('name1'),
+                            DefinitionElement('name2'))
+        self.assertNotEqual(DefinitionElement('name', {'attribute': '1'}),
+                            DefinitionElement('name', {'attribute': '2'}))
+
+    def test_to_string(self):
+        text = '''<DEFINE server="/opt/bin/fastcgi_server" domain="fastcgi"
+host="localhost" port="2010" local="yes" uid="1000" gid="1000" />'''
+        definition = DefinitionElement.from_string(text)
+        copy = DefinitionElement.from_string(str(definition))
+        self.assertEqual(definition, copy)
+
+    def test_to_lxml(self):
+        text = '''<DEFINE name="test" server="/opt/bin/fastcgi_server"
+domain="fastcgi" host="localhost" port="2010" local="yes" uid="1000" gid="1000"
+/>'''
+        definition = DefinitionElement.from_string(text)
+        copy = DefinitionElement.from_lxml_element(definition.to_lxml_element())
+        self.assertEqual(definition, copy)
+
+class DefinitionTreeTest(unittest.TestCase):
+    element_1 = DefinitionElement('http.error.file.404', {'value': '404.html'})
+    element_2 = DefinitionElement(attributes = {'server': '/opt/bin/fastcgi_server',
+                                                'domain': 'fastcgi', 'host': 'localhost',
+                                                'port': '2010', 'local': 'yes',
+                                                'uid': '1000', 'gid': '1000'})
+    def test_creation(self):
+        definition = DefinitionTree()
+        self.assertTrue(isinstance(definition, Definition))
+        definition = DefinitionTree('name')
+        self.assertTrue(isinstance(definition, Definition))
+        definition = DefinitionTree('name', [DefinitionTreeTest.element_1])
+        self.assertTrue(isinstance(definition, Definition))
+        definition = DefinitionTree('name', [DefinitionTreeTest.element_2], {'value': '1'})
+        self.assertTrue(isinstance(definition, Definition))
+
+    def test_values(self):
+        definition = DefinitionTree()
+        self.assertEqual(0, len(definition.get_values()))
+        definition.add_value(DefinitionTreeTest.element_1)
+        self.assertEqual(1, len(definition.get_values()))
+        self.assertEqual(DefinitionTreeTest.element_1, definition.get_value(0))
+        definition.add_value(DefinitionTreeTest.element_2)
+        self.assertEqual(2, len(definition.get_values()))
+        self.assertEqual(DefinitionTreeTest.element_1, definition.get_value(0))
+        self.assertEqual(DefinitionTreeTest.element_2, definition.get_value(1))
+        definition.remove_value(0)
+        self.assertEqual(1, len(definition.get_values()))
+        self.assertEqual(DefinitionTreeTest.element_2, definition.get_value(0))
+        definition.add_value(DefinitionTreeTest.element_1, 0)
+        self.assertEqual(2, len(definition.get_values()))
+        self.assertEqual(DefinitionTreeTest.element_1, definition.get_value(0))
+        self.assertEqual(DefinitionTreeTest.element_2, definition.get_value(1))
+
+    def test_from_string(self):
+        text = '<DEFINE name="test" key="value">{0}{1}</DEFINE>'.format(
+            DefinitionTreeTest.element_1, DefinitionTreeTest.element_2)
+        definition = DefinitionTree.from_string(text)
+        self.assertEqual('test', definition.get_name())
+        self.assertEqual('value', definition.get_attribute('key'))
+        definitions = definition.get_values()
+        self.assertEqual(2, len(definitions))
+        self.assertEqual(DefinitionTreeTest.element_1, definitions[0])
+        self.assertEqual(DefinitionTreeTest.element_2, definitions[1])
+
+    def test_from_lxml(self):
+        root = etree.Element('DEFINE')
+        root.set('name', 'test')
+        root.set('key', 'value')
+        root.append(DefinitionTreeTest.element_1.to_lxml_element())
+        root.append(DefinitionTreeTest.element_2.to_lxml_element())
+        definition = DefinitionTree.from_lxml_element(root)
+        self.assertEqual('test', definition.get_name())
+        self.assertEqual('value', definition.get_attribute('key'))
+        definitions = definition.get_values()
+        self.assertEqual(2, len(definitions))
+        self.assertEqual(DefinitionTreeTest.element_1, definitions[0])
+        self.assertEqual(DefinitionTreeTest.element_2, definitions[1])
+
+    def test_equality(self):
+        text = '<DEFINE name="test" key="value">{0}{1}</DEFINE>'.format(
+            DefinitionTreeTest.element_1, DefinitionTreeTest.element_2)
+        self.assertEqual(DefinitionTree.from_string(text), DefinitionTree.from_string(text))
+        self.assertNotEqual(DefinitionTree.from_string(text), DefinitionTree('test'))
+
+    def test_to_string(self):
+        text = '<DEFINE name="test" key="value">{0}{1}</DEFINE>'.format(
+            DefinitionTreeTest.element_1, DefinitionTreeTest.element_2)
+        definition = DefinitionTree.from_string(text)
+        copy = DefinitionTree.from_string(str(definition))
+        self.assertEqual(definition, copy)
+
+    def test_to_lxml(self):
+        text = '<DEFINE name="test" key="value">{0}{1}</DEFINE>'.format(
+            DefinitionTreeTest.element_1, DefinitionTreeTest.element_2)
+        definition = DefinitionTree.from_string(text)
+        copy = DefinitionTree.from_lxml_element(definition.to_lxml_element())
+        self.assertEqual(definition, copy)
+
+if __name__ == '__main__':
+    unittest.main()



commit 6ad378bcc4489348696a846ae8f17b5c8f8455eb
Author: Marek Aaron Sapota <maarons@gnu.org>
Date:   Fri Jun 26 23:09:31 2009 +0200

    Rename test.py to include module name.

diff --git a/misc/py_control_client/pycontrollib/test.py b/misc/py_control_client/pycontrollib/mimetypes_test.py
similarity index 100%
rename from misc/py_control_client/pycontrollib/test.py
rename to misc/py_control_client/pycontrollib/mimetypes_test.py



commit 6c4d700d2fc3a4e9174ebae276cd9e3bb5a4da2f
Author: Marek Aaron Sapota <maarons@gnu.org>
Date:   Fri Jun 26 12:36:59 2009 +0200

    Skeleton class for handling MIME types configuration.

diff --git a/misc/py_control_client/pycontrollib/mimetypes.py b/misc/py_control_client/pycontrollib/mimetypes.py
new file mode 100644
index 0000000..b9f4877
--- /dev/null
+++ b/misc/py_control_client/pycontrollib/mimetypes.py
@@ -0,0 +1,129 @@
+# -*- coding: utf-8 -*-
+'''
+MyServer
+Copyright (C) 2009 Free Software Foundation, Inc.
+This program 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 3 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program.  If not, see <http://www.gnu.org/licenses/>.
+'''
+
+from lxml import etree
+
+class MIMEType():
+    valid_handlers = set(['SEND', 'CGI', 'FASTCGI', 'SCGI', 'MSCGI', 'ISAPI',
+                          'WINCGI', 'PROxY'])
+
+    class WrongArguments(Exception):
+        '''Exception raised when MIMEType is constructed with invalid
+        arguments.'''
+        pass
+
+    def __init__(self, mime, handler, param, extension, path = None,
+                 filter = None, self_executed = None, definitions = None):
+        '''Creates new MIMEType with specified attributes.'''
+        self.mime = mime
+        if handler not in MIMEType.valid_handlers:
+            raise MIMEType.WrongArguments(
+                '{0} is not a valid handler'.format(handler))
+        self.handler = handler
+        self.param = param
+        self.extension = extension
+        self.path = path
+        self.filter = filter
+        self.self_executed = self_executed
+        self.definitions = definitions
+        
+    def __eq__(self, other):
+        return \
+            self.mime == other.mime and \
+            self.handler == other.handler and \
+            self.param == other.param and \
+            self.extension == other.extension and \
+            self.path == other.path and \
+            self.filter == other.filter and \
+            self.self_executed == other.self_executed and \
+            self.definitions == other.definitions
+
+    def to_lxml_element(self): 
+        def make_element(tag, attribute, value):
+            element = etree.Element(tag)
+            element.set(attribute, value)
+            return element
+        def make_extension_element(extension):
+            return make_element('EXTENSION', 'value', extension)
+        root = etree.Element('MIME')
+        root.set('mime', self.mime)
+        root.set('handler', self.handler)
+        root.set('param', self.param)
+        if self.self_executed is not None:
+            root.set('self', 'YES' if self.self_executed else 'NO')
+        for element in map(make_extension_element, self.extension):
+            root.append(element)
+        if self.path is not None:
+            root.append(make_element('PATH', 'regex', self.path))
+        if self.filter is not None:
+            root.append(make_element('FILTER', 'value', self.filter))
+        return root
+
+    def __str__(self): # TODO: definitions
+        return etree.tostring(self.to_lxml_element(), pretty_print = True)
+
+    @staticmethod
+    def from_lxml_element(root): # TODO: definitions
+        '''Factory to produce MIMEType from etree.Element object.'''
+        mime = root.get('mime', None)
+        handler = root.get('handler', None)
+        param = root.get('param', None)
+        self_executed = root.get('self', None)
+        if self_executed is not None:
+            self_executed = False if self_executed == 'NO' else True
+        extension = set(map(lambda element: element.get('value'),
+                            root.findall('EXTENSION')))
+        path = root.find('PATH')
+        if path is not None:
+            path = path.get('regex')
+        filter = root.find('FILTER')
+        if filter is not None:
+            filter = filter.get('value')
+        return MIMEType(mime, handler, param, extension, path, filter,
+                        self_executed, None)
+
+    @staticmethod
+    def from_string(text):
+        '''Factory to produce MIMEType by parsing a string.'''
+        return MIMEType.from_lxml_element(etree.XML(text))
+
+class MIMETypes():
+    def __init__(self, MIME_types):
+        self.MIME_types = MIME_types
+        
+    def __eq__(self, other):
+        return self.MIME_types == other.MIME_types
+
+    def to_lxml_element(self):
+        root = etree.Element('MIMES')
+        for mime in self.MIME_types:
+            root.append(mime.to_lxml_element())
+        return root
+
+    def __str__(self):
+        return etree.tostring(self.to_lxml_element(), pretty_print = True)
+        
+    @staticmethod
+    def from_lxml_element(root):
+        '''Factory to produce MIMETypes from etree.Element object.'''
+        return MIMETypes(map(MIMEType.from_lxml_element, root.findall('MIME')))
+    
+    @staticmethod
+    def from_string(text):
+        '''Factory to produce MIMETypes from parsing a string.'''
+        return MIMETypes.from_lxml_element(etree.XML(text))
diff --git a/misc/py_control_client/pycontrollib/test.py b/misc/py_control_client/pycontrollib/test.py
new file mode 100644
index 0000000..ec96779
--- /dev/null
+++ b/misc/py_control_client/pycontrollib/test.py
@@ -0,0 +1,78 @@
+# -*- coding: utf-8 -*-
+'''
+MyServer
+Copyright (C) 2009 Free Software Foundation, Inc.
+This program 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 3 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program.  If not, see <http://www.gnu.org/licenses/>.
+'''
+
+import unittest
+from mimetypes import MIMEType, MIMETypes
+
+class MIMETypeTest(unittest.TestCase):
+    text = '''<MIME mime="application/xhtml+xml" handler="CGI" param="/usr/bin/python" self="NO" >
+  <EXTENSION value="xhtml" />
+  <EXTENSION value="xml" />
+  <EXTENSION value="py" />
+  <FILTER value="gzip" />
+  <PATH regex="^/cgi-bin/python/.*$" />
+</MIME>'''
+    
+    def test_from_string(self):
+        mime = MIMEType.from_string(MIMETypeTest.text)
+        self.assertEqual(mime.mime, 'application/xhtml+xml')
+        self.assertEqual(mime.handler, 'CGI')
+        self.assertEqual(mime.param, '/usr/bin/python')
+        self.assertEqual(mime.extension, set(['xhtml', 'xml', 'py']))
+        self.assertEqual(mime.path, '^/cgi-bin/python/.*$')
+        self.assertEqual(mime.filter, 'gzip')
+        self.assertEqual(mime.self_executed, False)
+        
+    def test_to_string(self):
+        mime = MIMEType.from_string(MIMETypeTest.text)
+        copy = MIMEType.from_string(str(mime))
+        self.assertEqual(mime, copy)
+        
+class MIMETypesTest(unittest.TestCase):
+    mime_0 = '''<MIME mime="text/html" handler="FASTCGI" self="YES" param="">
+  <EXTENSION value="fcgi"/>
+</MIME>'''
+
+    mime_1 = '''<MIME mime="text/plain" handler="SEND" param="">
+  <EXTENSION value="asc"/>
+  <EXTENSION value="c"/>
+  <EXTENSION value="cc"/>
+  <EXTENSION value="f"/>
+  <EXTENSION value="f90"/>
+  <EXTENSION value="h"/>
+  <EXTENSION value="hh"/>
+  <EXTENSION value="m"/>
+  <EXTENSION value="txt"/>
+</MIME>'''
+    
+    text = '<MIMES>{0}{1}</MIMES>'.format(mime_0, mime_1)
+    
+    def test_from_string(self):
+        mimes = MIMETypes.from_string(MIMETypesTest.text)
+        self.assertEqual(mimes.MIME_types[0],
+                         MIMEType.from_string(MIMETypesTest.mime_0))
+        self.assertEqual(mimes.MIME_types[1],
+                         MIMEType.from_string(MIMETypesTest.mime_1))
+        
+    def test_to_string(self):
+        mimes = MIMETypes.from_string(MIMETypesTest.text)
+        copy = MIMETypes.from_string(str(mimes))
+        self.assertEqual(mimes, copy)
+        
+if __name__ == '__main__':
+    unittest.main()



commit 2e82879117b0d54b6c9a61519a3511e6e4be4136
Author: Marek Aaron Sapota <maarons@gnu.org>
Date:   Mon Jun 22 21:37:18 2009 +0200

    Added files needed for installation on unix systems.

diff --git a/myserver/binaries/MIMEtypes.xml.unix.default b/myserver/binaries/MIMEtypes.xml.unix.default
new file mode 100755
index 0000000..f6830f6
--- /dev/null
+++ b/myserver/binaries/MIMEtypes.xml.unix.default
@@ -0,0 +1,503 @@
+<?xml version="1.0"?>
+
+<MIMES>
+  <MIME mime="text/html" handler="MSCGI" param="">
+    <EXTENSION value="mscgi"/>
+  </MIME>
+  
+  <MIME mime="text/html" handler="CGI" self="YES" param="">
+    <EXTENSION value="cgi"/>
+  </MIME>
+  
+  <MIME mime="text/html" handler="ISAPI" param="">
+    <EXTENSION value="isapi"/>
+  </MIME>
+  
+  <MIME mime="text/html" handler="SCGI" self="YES" param="">
+    <EXTENSION value="scgi"/>
+  </MIME>
+
+  <MIME mime="text/html" handler="FASTCGI" self="YES" param="">
+    <EXTENSION value="fcgi"/>
+  </MIME>
+  
+  <MIME mime="text/html" handler="WINCGI" param="">
+    <EXTENSION value="wincgi"/>
+  </MIME>
+
+
+  <MIME mime="application/postscript" handler="SEND" param="">
+    <EXTENSION value="ai"/>
+    <EXTENSION value="eps"/>
+    <EXTENSION value="ps"/>
+  </MIME>
+  
+  <MIME mime="video/quicktime" handler="SEND" param="">
+    <EXTENSION value="mov"/>
+    <EXTENSION value="qt"/>
+  </MIME>
+
+  <MIME mime="image/png" handler="SEND" param="">
+    <EXTENSION value="png"/>
+  </MIME>
+
+  <MIME mime="video/vndvivo" handler="SEND" param="">
+    <EXTENSION value="viv"/>
+    <EXTENSION value="vivo"/>
+  </MIME>
+
+  <MIME mime="application/xtex" handler="SEND" param="">
+    <EXTENSION value="tex"/>
+  </MIME>
+
+  <MIME mime="text/xsetext" handler="SEND" param="">
+    <EXTENSION value="etx"/>
+  </MIME>
+
+  <MIME mime="application/vda" handler="SEND" param="">
+    <EXTENSION value="vda"/>
+  </MIME>
+
+  <MIME mime="application/dsptype" handler="SEND" param="">
+    <EXTENSION value="tsp"/>
+  </MIME>
+
+  <MIME mime="application/xstuffit" handler="SEND" param="">
+    <EXTENSION value="sit"/>
+  </MIME>
+
+  <MIME mime="application/solids" handler="SEND" param="">
+    <EXTENSION value="sol"/>
+  </MIME>
+
+  <MIME mime="application/xfuturesplash" handler="SEND" param="">
+    <EXTENSION value="spl"/>
+  </MIME>
+
+  <MIME mime="application/xbcpio" handler="SEND" param="">
+    <EXTENSION value="bcpio"/>
+  </MIME>
+
+  <MIME mime="application/oda" handler="SEND" param="">
+    <EXTENSION value="oda"/>
+  </MIME>
+
+  <MIME mime="application/pro_eng" handler="SEND" param="">
+    <EXTENSION value="prt"/>
+  </MIME>
+
+  <MIME mime="model/iges" handler="SEND" param="">
+    <EXTENSION value="iges"/>
+    <EXTENSION value="igs"/>
+  </MIME>
+
+  <MIME mime="audio/TSPaudio" handler="SEND" param="">
+    <EXTENSION value="tsi"/>
+  </MIME>
+
+  <MIME mime="image/xportablegraymap" handler="SEND" param="">
+    <EXTENSION value="pgm"/>
+  </MIME>
+
+  <MIME mime="application/xlatex" handler="SEND" param="">
+    <EXTENSION value="latex"/>
+  </MIME>
+
+  <MIME mime="application/xsh" handler="SEND" param="">
+    <EXTENSION value="sh"/>
+  </MIME>
+
+  <MIME mime="application/drafting" handler="SEND" param="">
+    <EXTENSION value="drw"/>
+  </MIME>
+
+  <MIME mime="text/html" handler="SEND" param="">
+    <EXTENSION value="htm"/>
+    <EXTENSION value="html"/>
+  </MIME>
+
+  <MIME mime="application/smil" handler="SEND" param="">
+    <EXTENSION value="smi"/>
+    <EXTENSION value="smil"/>
+  </MIME>
+
+  <MIME mime="application/vndmif" handler="SEND" param="">
+    <EXTENSION value="mif"/>
+  </MIME>
+
+  <MIME mime="application/xipix" handler="SEND" param="">
+    <EXTENSION value="ipx"/>
+  </MIME>
+
+  <MIME mime="model/mesh" handler="SEND" param="">
+    <EXTENSION value="mesh"/>
+    <EXTENSION value="msh"/>
+    <EXTENSION value="silo"/>
+  </MIME>
+
+  <MIME mime="application/xtroffman" handler="SEND" param="">
+    <EXTENSION value="man"/>
+  </MIME>
+
+  <MIME mime="application/xcsh" handler="SEND" param="">
+    <EXTENSION value="csh"/>
+  </MIME>
+
+  <MIME mime="audio/xpnrealaudioplugin" handler="SEND" param="">
+    <EXTENSION value="rpm"/>
+  </MIME>
+
+  <MIME mime="image/cmuraster" handler="SEND" param="">
+    <EXTENSION value="ras"/>
+  </MIME>
+
+  <MIME mime="www/mime" handler="SEND" param="">
+    <EXTENSION value="mime"/>
+  </MIME>
+
+  <MIME mime="application/xdirector" handler="SEND" param="">
+    <EXTENSION value="dcr"/>
+    <EXTENSION value="dir"/>
+    <EXTENSION value="dxr"/>
+  </MIME>
+
+  <MIME mime="text/xml" handler="SEND" param="">
+    <EXTENSION value="xml"/>
+  </MIME>
+
+  <MIME mime="application/xfreelance" handler="SEND" param="">
+    <EXTENSION value="pre"/>
+  </MIME>
+
+  <MIME mime="image/ief" handler="SEND" param="">
+    <EXTENSION value="ief"/>
+  </MIME>
+
+  <MIME mime="application/xshar" handler="SEND" param="">
+    <EXTENSION value="shar"/>
+  </MIME>
+
+  <MIME mime="audio/xrealaudio" handler="SEND" param="">
+    <EXTENSION value="ra"/>
+  </MIME>
+
+  <MIME mime="application/mspowerpoint" handler="SEND" param="">
+    <EXTENSION value="pot"/>
+    <EXTENSION value="pps"/>
+    <EXTENSION value="ppt"/>
+    <EXTENSION value="ppz"/>
+  </MIME>
+
+  <MIME mime="audio/midi" handler="SEND" param="">
+    <EXTENSION value="kar"/>
+    <EXTENSION value="mid"/>
+    <EXTENSION value="midi"/>
+  </MIME>
+
+  <MIME mime="image/jpeg" handler="SEND" param="">
+    <EXTENSION value="jpe"/>
+    <EXTENSION value="jpeg"/>
+    <EXTENSION value="jpg"/>
+  </MIME>
+
+  <MIME mime="application/xkoan" handler="SEND" param="">
+    <EXTENSION value="skd"/>
+    <EXTENSION value="skm"/>
+    <EXTENSION value="skp"/>
+    <EXTENSION value="skt"/>
+  </MIME>
+
+  <MIME mime="application/SLA" handler="SEND" param="">
+    <EXTENSION value="stl"/>
+  </MIME>
+
+  <MIME mime="application/STEP" handler="SEND" param="">
+    <EXTENSION value="step"/>
+    <EXTENSION value="stp"/>
+  </MIME>
+
+  <MIME mime="application/xshockwaveflash" handler="SEND" param="">
+    <EXTENSION value="swf"/>
+  </MIME>
+
+  <MIME mime="image/xxwindowdump" handler="SEND" param="">
+    <EXTENSION value="xwd"/>
+  </MIME>
+
+  <MIME mime="image/xxbitmap" handler="SEND" param="">
+    <EXTENSION value="xbm"/>
+  </MIME>
+
+  <MIME mime="application/dxf" handler="SEND" param="">
+    <EXTENSION value="dxf"/>
+  </MIME>
+
+  <MIME mime="text/sgml" handler="SEND" param="">
+    <EXTENSION value="sgm"/>
+    <EXTENSION value="sgml"/>
+  </MIME>
+
+  <MIME mime="model/vrml" handler="SEND" param="">
+    <EXTENSION value="vrml"/>
+    <EXTENSION value="wrl"/>
+  </MIME>
+
+  <MIME mime="application/xipscript" handler="SEND" param="">
+    <EXTENSION value="ips"/>
+  </MIME>
+
+  <MIME mime="image/xportablepixmap" handler="SEND" param="">
+    <EXTENSION value="ppm"/>
+  </MIME>
+
+  <MIME mime="text/plain" handler="SEND" param="">
+    <EXTENSION value="asc"/>
+    <EXTENSION value="c"/>
+    <EXTENSION value="cc"/>
+    <EXTENSION value="f"/>
+    <EXTENSION value="f90"/>
+    <EXTENSION value="h"/>
+    <EXTENSION value="hh"/>
+    <EXTENSION value="m"/>
+    <EXTENSION value="txt"/>
+  </MIME>
+
+  <MIME mime="application/set" handler="SEND" param="">
+    <EXTENSION value="set"/>
+  </MIME>
+
+  <MIME mime="video/xmsvideo" handler="SEND" param="">
+    <EXTENSION value="avi"/>
+  </MIME>
+
+  <MIME mime="audio/xwav" handler="SEND" param="">
+    <EXTENSION value="wav"/>
+  </MIME>
+
+  <MIME mime="application/xgtar" handler="SEND" param="">
+    <EXTENSION value="gtar"/>
+  </MIME>
+
+  <MIME mime="application/xwaissource" handler="SEND" param="">
+    <EXTENSION value="src"/>
+  </MIME>
+
+  <MIME mime="application/acad" handler="SEND" param="">
+    <EXTENSION value="dwg"/>
+  </MIME>
+
+  <MIME mime="application/xlisp" handler="SEND" param="">
+    <EXTENSION value="lsp"/>
+  </MIME>
+
+  <MIME mime="application/zip" handler="SEND" param="">
+    <EXTENSION value="zip"/>
+  </MIME>
+
+  <MIME mime="audio/xpnrealaudio" handler="SEND" param="">
+    <EXTENSION value="ram"/>
+    <EXTENSION value="rm"/>
+  </MIME>
+
+  <MIME mime="text/tabseparatedvalues" handler="SEND" param="">
+    <EXTENSION value="tsv"/>
+  </MIME>
+
+  <MIME mime="image/xxpixmap" handler="SEND" param="">
+    <EXTENSION value="xpm"/>
+  </MIME>
+
+  <MIME mime="application/xtexinfo" handler="SEND" param="">
+    <EXTENSION value="texi"/>
+    <EXTENSION value="texinfo"/>
+  </MIME>
+
+  <MIME mime="application/xustar" handler="SEND" param="">
+    <EXTENSION value="ustar"/>
+  </MIME>
+
+  <MIME mime="application/xcpio" handler="SEND" param="">
+    <EXTENSION value="cpio"/>
+  </MIME>
+
+  <MIME mime="application/vndmsexcel" handler="SEND" param="">
+    <EXTENSION value="xlc"/>
+    <EXTENSION value="xll"/>
+    <EXTENSION value="xlm"/>
+    <EXTENSION value="xls"/>
+    <EXTENSION value="xlw"/>
+  </MIME>
+
+  <MIME mime="image/xrgb" handler="SEND" param="">
+    <EXTENSION value="rgb"/>
+  </MIME>
+
+  <MIME mime="image/xportablebitmap" handler="SEND" param="">
+    <EXTENSION value="pbm"/>
+  </MIME>
+
+  <MIME mime="application/pdf" handler="SEND" param="">
+    <EXTENSION value="pdf"/>
+  </MIME>
+
+  <MIME mime="application/xjavascript" handler="SEND" param="">
+    <EXTENSION value="js"/>
+  </MIME>
+
+  <MIME mime="application/xcdlink" handler="SEND" param="">
+    <EXTENSION value="vcd"/>
+  </MIME>
+
+  <MIME mime="chemical/xpdb" handler="SEND" param="">
+    <EXTENSION value="pdb"/>
+    <EXTENSION value="xyz"/>
+  </MIME>
+
+  <MIME mime="application/xsv4crc" handler="SEND" param="">
+    <EXTENSION value="sv4crc"/>
+  </MIME>
+
+  <MIME mime="image/gif" handler="SEND" param="">
+    <EXTENSION value="gif"/>
+  </MIME>
+
+  <MIME mime="application/xlotusscreencam" handler="SEND" param="">
+    <EXTENSION value="scm"/>
+  </MIME>
+
+  <MIME mime="image/tiff" handler="SEND" param="">
+    <EXTENSION value="tif"/>
+    <EXTENSION value="tiff"/>
+  </MIME>
+
+  <MIME mime="application/maccompactpro" handler="SEND" param="">
+    <EXTENSION value="cpt"/>
+  </MIME>
+
+  <MIME mime="application/clariscad" handler="SEND" param="">
+    <EXTENSION value="ccad"/>
+  </MIME>
+
+  <MIME mime="video/mpeg" handler="SEND" param="">
+    <EXTENSION value="mpe"/>
+    <EXTENSION value="mpeg"/>
+    <EXTENSION value="mpg"/>
+  </MIME>
+
+  <MIME mime="application/xtcl" handler="SEND" param="">
+    <EXTENSION value="tcl"/>
+  </MIME>
+
+  <MIME mime="application/xhdf" handler="SEND" param="">
+    <EXTENSION value="hdf"/>
+  </MIME>
+
+  <MIME mime="text/css" handler="SEND" param="">
+    <EXTENSION value="css"/>
+  </MIME>
+
+  <MIME mime="application/xtroff" handler="SEND" param="">
+    <EXTENSION value="roff"/>
+    <EXTENSION value="t"/>
+    <EXTENSION value="tr"/>
+  </MIME>
+
+  <MIME mime="application/macbinhex40" handler="SEND" param="">
+    <EXTENSION value="hqx"/>
+  </MIME>
+
+  <MIME mime="application/ideas" handler="SEND" param="">
+    <EXTENSION value="unv"/>
+  </MIME>
+
+  <MIME mime="audio/xaiff" handler="SEND" param="">
+    <EXTENSION value="aif"/>
+    <EXTENSION value="aifc"/>
+    <EXTENSION value="aiff"/>
+  </MIME>
+
+  <MIME mime="application/xdvi" handler="SEND" param="">
+    <EXTENSION value="dvi"/>
+  </MIME>
+
+  <MIME mime="application/andrewinset" handler="SEND" param="">
+    <EXTENSION value="ez"/>
+  </MIME>
+
+  <MIME mime="application/xnetcdf" handler="SEND" param="">
+    <EXTENSION value="cdf"/>
+    <EXTENSION value="nc"/>
+  </MIME>
+
+  <MIME mime="application/xsv4cpio" handler="SEND" param="">
+    <EXTENSION value="sv4cpio"/>
+  </MIME>
+
+  <MIME mime="video/xsgimovie" handler="SEND" param="">
+    <EXTENSION value="movie"/>
+  </MIME>
+
+  <MIME mime="audio/mpeg" handler="SEND" param="">
+    <EXTENSION value="mp2"/>
+    <EXTENSION value="mp3"/>
+    <EXTENSION value="mpga"/>
+  </MIME>
+
+  <MIME mime="application/xtroffme" handler="SEND" param="">
+    <EXTENSION value="me"/>
+  </MIME>
+
+  <MIME mime="xconference/xcooltalk" handler="SEND" param="">
+    <EXTENSION value="ice"/>
+  </MIME>
+
+  <MIME mime="application/octetstream" handler="SEND" param="">
+    <EXTENSION value="bin"/>
+    <EXTENSION value="class"/>
+    <EXTENSION value="dms"/>
+    <EXTENSION value="exe"/>
+    <EXTENSION value="lha"/>
+    <EXTENSION value="lzh"/>
+  </MIME>
+
+  <MIME mime="application/xtroffms" handler="SEND" param="">
+    <EXTENSION value="ms"/>
+  </MIME>
+
+  <MIME mime="application/xgzip" handler="SEND" param="">
+    <EXTENSION value="gz"/>
+  </MIME>
+
+  <MIME mime="audio/basic" handler="SEND" param="">
+    <EXTENSION value="au"/>
+    <EXTENSION value="snd"/>
+  </MIME>
+
+  <MIME mime="application/xtar" handler="SEND" param="">
+    <EXTENSION value="tar"/>
+  </MIME>
+
+  <MIME mime="text/rtf" handler="SEND" param="">
+    <EXTENSION value="rtf"/>
+  </MIME>
+
+  <MIME mime="text/richtext" handler="SEND" param="">
+    <EXTENSION value="rtx"/>
+  </MIME>
+
+  <MIME mime="image/xportableanymap" handler="SEND" param="">
+    <EXTENSION value="pnm"/>
+  </MIME>
+
+  <MIME mime="application/xchesspgn" handler="SEND" param="">
+    <EXTENSION value="pgn"/>
+  </MIME>
+
+  <MIME mime="video/xfli" handler="SEND" param="">
+    <EXTENSION value="fli"/>
+  </MIME>
+
+  <MIME mime="application/msword" handler="SEND" param="">
+    <EXTENSION value="doc"/>
+  </MIME>
+</MIMES>
diff --git a/myserver/binaries/myserver.xml.unix.default b/myserver/binaries/myserver.xml.unix.default
new file mode 100755
index 0000000..77f11ad
--- /dev/null
+++ b/myserver/binaries/myserver.xml.unix.default
@@ -0,0 +1,122 @@
+<?xml version="1.0"?>
+
+<!--MODIFY THE FILE ONLY IF YOU ARE SURE OF WHAT YOU ARE DOING-->
+<MYSERVER>
+
+	<!--CHOOSE THE LANGUAGE TO USE FOR THE SERVER-->
+	<DEFINE name="server.language" value="english.xml" />
+
+	<!--VERBOSITY ON LOG FILE-->
+	<DEFINE name="server.verbosity" value="2" />
+
+	<!--NUMBER OF SERVING THREADS ALWAYS ACTIVE-->
+  <DEFINE name="server.static_threads" value="5" />
+
+	<!--MAXIMUM NUMBER OF SERVING THREADS THAT THE SCHEDULER CAN
+			CREATE-->
+	<DEFINE name="server.max_threads" value="200" />
+
+	<!--DIMENSION OF EVERY BUFFER IN BYTES IF ON THE MACHINE THERE IS A
+			LOT OF RAM	THIS VALUES CAN BE INCREASED TO MAKE MYSERVER
+			FASTER. NORMALLY THE MEMORY USED BY BUFFERS IS EQUAL TO
+			BUFFER_SIZE * 2 * NUM_OF_THREADS-->
+	<DEFINE name="server.buffer_size" value="102400" />
+
+	<!--DEFAULT FILENAME TO SEND IN A DIRECTORY
+			IF THE FILE ISN'T IN THE PATH THEN THE DIRECTORY
+			CONTENT IS SENT	-->
+  <DEFINE name="http.default_file">
+    <DEFINE value="default.html"/>
+    <DEFINE value="default.htm"/>
+    <DEFINE value="index.html"/>
+    <DEFINE value="index.htm"/>
+  </DEFINE>
+
+	<!--TIMEOUT OF EVERY CLIENTS CONNECTED TO THE SERVER.
+			IF THE CLIENT DOESN'T REQUEST ANYTHING FOR N
+			SECONDS THE CONNECTION WITH THE CLIENT IS
+			CLOSED. SET THIS TO 0 IF YOU DON'T WANT USE
+			KEEP-ALIVE CONNECTIONS	-->
+	<DEFINE name="connection.timeout" value="180" />
+
+	<!--SET THIS TO YES FOR USE PERSONALIZED PAGES TO SEND MESSAGE,
+			PERSONALIZED PAGES ARE IN THE SYSTEM DIRECTORY	-->
+	<DEFINE name="http.use_error_file" value="YES" />
+
+	<!--DEFINE THE MAX NUMBER OF CONNECTIONS TO ALLOW TO THE SERVER. IF
+			0 THEN INFINITE CONNECTIONS ARE ALLOWED.-->
+	<DEFINE name="server.max_connections" value="0" />
+
+	<!--DEFINE THE MAX NUMBER OF CONNECTIONS TO ACCEPT.-->
+	<DEFINE name="server.max_accepted_connections" value="0" />
+
+  <!--TEXT AND BACKGROUND ATTRIBUTES FOR CONSOLE LOG MESSAGES. -->
+  <DEFINE name="log_color.info_fg" value="white" />
+  <DEFINE name="log_color.info_bg" value="black" />
+
+  <DEFINE name="log_color.warning_fg" value="yellow" />
+  <DEFINE name="log_color.warning_bg" value="black" />
+
+  <DEFINE name="log_color.error_fg" value="red" />
+  <DEFINE name="log_color.error_bg" value="black" />
+
+	<!--MAX SIZE OF THE LOG FILE IN BYTES	-->
+	<DEFINE name="server.max_log_size" value="1048576" />
+
+	<!--DEFINE THE FOLDER BROWSING STYLE-->
+	<DEFINE name="http.dir.css" value="/sys/css/browsestyle.css" />
+
+	<!--DEFINE THE ADMINISTRATOR E-MAIL-->
+	<DEFINE name="server.admin" value="administrator@localhost" />
+
+	<!--DEFINE THE GZIP COMPRESSION THRESHOLD VALUE-->
+	<DEFINE name="gzip.threshold" value="1048576" />
+
+	<!--DEFINE IF LINKS SHOULD BE FOLLOWED-->
+	<DEFINE name="symlinks.follow" value="YES" />
+
+	<!--MAX CACHE SIZE FOR STATIC FILES-->
+	<DEFINE name="server.max_files_cache" value="10485760" />
+
+	<!--MAX CACHE SIZE FOR SINGLE STATIC FILE-->
+	<DEFINE name="server.max_file_cache" value="1048576" />
+
+	<!--MIN CACHE SIZE FOR SINGLE STATIC FILE-->
+	<DEFINE name="server.min_file_cache" value="1048576" />
+
+	<!-- ENABLE HOME DIRECTORY PER USER -->
+	<DEFINE name="http.use_home_directory" value="NO" />
+
+	<!-- DEFINE NAME FOR HOME DIRECTORY BROWSING, BY DEFAULT THE SERVER
+			 USES public_html -->
+	<DEFINE name="http.home_directory" value="public_html" />
+
+  <!--SET THIS TO YES IF YOU WANT TO ENABLE THE CONTROL PROTOCOL-->
+	<DEFINE name="control.enabled" value="NO" />
+
+	<!--MAXIMUM NUMBER OF EXTERNAL SERVERS THAT CAN BE EXECUTED-->
+	<DEFINE name="server.max_servers" value="100" />
+
+  <!--SET HERE THE NAME FOR THE CONTROL ADMIN. WE SUGGEST YOU YO USE
+      SOMETHING DIFFERENT FROM ADMIN, ADMINISTRATOR OR ROOT-->
+  <DEFINE name="control.admin" value="ADMIN" />
+
+  <!--DEFINE HERE A GOOD STRONG PASSWORD FOR THE ADMIN-->
+  <DEFINE name="control.password" value="PLEASE_CHANGE_THIS_PASSWORD" />
+
+  <!--FTP GLOBAL CONFIGURATION-->
+  <!--ALLOW ANONYMOUS LOGIN-->
+  <DEFINE name="ftp.allow_anonymous" value="NO" />
+
+  <!--IF ANONYMOUS ALLOWED, TELLS IF NEEDS PASS-->
+  <DEFINE name="ftp.anonymous_need_pass" value="NO" />
+
+  <!--ALLOW ASYNCHRONOUS CMDS LIKE Abor, Quit, Stat-->
+  <DEFINE name="ftp.allow_asynchronous_cmds" value="YES" />
+
+  <!--ALLOW CLIENTS TO SEND MORE THAN ONE COMMAND TO SERVER INTO ONE REQUEST-->
+  <DEFINE name="ftp.allow_pipelining" value="NO" />
+
+  <!--ALLOW CLIENTS TO CHANGE SERVER FILES-->
+  <DEFINE name="ftp.allow_store" value="NO" />
+</MYSERVER>
diff --git a/myserver/binaries/virtualhosts.xml.unix.default b/myserver/binaries/virtualhosts.xml.unix.default
new file mode 100755
index 0000000..3d1897b
--- /dev/null
+++ b/myserver/binaries/virtualhosts.xml.unix.default
@@ -0,0 +1,40 @@
+<?xml version="1.0"?>
+
+<VHOSTS>
+
+	<VHOST>
+		<NAME>Every HTTP connection</NAME>
+		
+		<PORT>80</PORT>
+		<PROTOCOL>HTTP</PROTOCOL>
+		
+		<DOCROOT>web</DOCROOT>
+		<SYSFOLDER>system</SYSFOLDER>
+
+		<ACCESSLOG>
+                  <STREAM location="file://logs/MyServerHTTP.log" cycle="1048576"/>
+                </ACCESSLOG>
+
+                <WARNINGLOG>
+                  <STREAM location="file://logs/MyServerHTTP.err" cycle="1048576"/>
+                </WARNINGLOG>
+	</VHOST>
+
+	<VHOST>
+		<NAME>FTP connection</NAME>
+		
+		<PORT>21</PORT>
+		<PROTOCOL>FTP</PROTOCOL>
+		
+		<DOCROOT>web</DOCROOT>
+		<SYSFOLDER>system</SYSFOLDER>
+		
+		<ACCESSLOG>
+                  <STREAM location="file://logs/MyServerFTP.log" cycle="1048576"/>
+                </ACCESSLOG>
+
+		<WARNINGLOG>
+                  <STREAM location="file://logs/MyServerFTP.err" cycle="1048576"/>
+                </WARNINGLOG>
+	</VHOST>
+</VHOSTS>



commit 055e94570934d1e39f40552d0af4c762f57dbdeb
Merge: 2123234 55be25f
Author: Marek Aaron Sapota <maarons@gnu.org>
Date:   Tue Jun 16 23:35:36 2009 +0200

    Merge branch 'master' of git://git.savannah.gnu.org/myserver




commit 2123234285a7d3c72911f42f5b270e4a91bc149e
Author: Marek Aaron Sapota <maarons@gnu.org>
Date:   Tue Jun 16 12:10:23 2009 +0200

    Imported pycontrollib to main tree.

diff --git a/misc/py_control_client/__init__.py b/misc/py_control_client/__init__.py
new file mode 100644
index 0000000..8fa2136
--- /dev/null
+++ b/misc/py_control_client/__init__.py
@@ -0,0 +1,2 @@
+#
+
diff --git a/misc/py_control_client/pycontrollib/__init__.py b/misc/py_control_client/pycontrollib/__init__.py
new file mode 100644
index 0000000..c671cf0
--- /dev/null
+++ b/misc/py_control_client/pycontrollib/__init__.py
@@ -0,0 +1,20 @@
+# -*- coding: utf-8 -*-
+'''
+MyServer
+Copyright (C) 2009 Free Software Foundation, Inc.
+This program 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 3 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program.  If not, see <http://www.gnu.org/licenses/>.
+'''
+
+from pycontrollib import Controller
+import configWrapper
diff --git a/misc/py_control_client/pycontrollib/configWrapper.py b/misc/py_control_client/pycontrollib/configWrapper.py
new file mode 100644
index 0000000..63248e2
--- /dev/null
+++ b/misc/py_control_client/pycontrollib/configWrapper.py
@@ -0,0 +1,185 @@
+# -*- coding: utf-8 -*-
+'''
+MyServer
+Copyright (C) 2009 Free Software Foundation, Inc.
+This program 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 3 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program.  If not, see <http://www.gnu.org/licenses/>.
+'''
+
+from lxml import etree
+
+def make_vhost_list(data):
+    '''Make a list of VHostWrapper objects from data in format as
+    virtualhosts.xml configuration file.'''
+    parser = etree.XMLParser(remove_blank_text = True)
+    tree = etree.XML(data, parser)
+    return [VHostWrapper(host, from_text = False) for host in \
+        tree.findall('VHOST')]
+
+class VHostWrapper():
+    '''Class wrapping around vhost configuration.'''
+
+    allowed_protocols = set(['CONTROL', 'FTP', 'HTTP', 'HTTPS'])
+    
+    class ProtocolError(ValueError):
+        '''Exception raised when user tried to use invalid protocol.'''
+        def __init__(self, protocol):
+            '''protocol is the invalid protocol that user tried to use.'''
+            ValueError.__init__(self)
+            self.protocol = protocol
+        
+        def __str__(self):
+            return self.protocol + ' is not a valid protocol'
+
+    def __init__(self, data, from_text = True):
+        '''Create new VHostWrapper by parsing data, if from_text is False, then
+        it is assumed that data has already been parsed and is an lxml
+        object.'''
+        if from_text:
+            parser = etree.XMLParser(remove_blank_text = True)
+            self.tree = etree.XML(data, parser)
+        else:
+            self.tree = data
+        
+    def __str__(self):
+        return self.to_xml()
+
+    def to_xml(self):
+        '''Return configuration representation in xml format.'''
+        return etree.tostring(self.tree, encoding = 'utf-8',
+            xml_declaration = True, pretty_print = True)
+
+    def get_node(self, name, multiple = False):
+        '''Get value stored in node of given name. If multiple is True, returns
+        list of all values stored in nodes of given name'''
+        if not multiple:
+            node = self.tree.find(name)
+            if node is not None:
+                return node.text
+            return None
+        else:
+            nodes = self.tree.findal(name)
+            return map(lambda node: node.text, nodes)
+
+    def set_node(self, name, data):
+        '''Set value stored in node of given name to data. Don't use it when
+        multiple nodes with given name are present, use add_node and del_node
+        instead.'''
+        node = self.tree.find(name)
+        if data is None:
+            if node is not None:
+                self.tree.remove(node)
+            return
+        if node is not None:
+            node.text = data
+        else:
+            node = etree.Element(name)
+            node.text = data
+            self.tree.append(node)
+            
+    def add_node(self, name, data):
+        '''Add new node with given name and value to tree.'''
+        node = self.tree.makeelement(name)
+        node.text = data
+        self.tree.append(node)
+        
+    def del_node(self, name, data):
+        '''Remove node with given name and value from tree.'''
+        for node in self.tree.findall(name):
+            if node.text == data:
+                self.tree.remove(node)
+                break
+
+    def get_name(self):
+        '''Get vhost name.'''
+        return self.get_node('NAME')
+
+    def set_name(self, name):
+        '''Set vhost name.'''
+        self.set_node('NAME', name)
+
+    def get_port(self):
+        '''Get port used to accept connections.'''
+        return self.get_node('PORT')
+
+    def set_port(self, port):
+        '''Set port used to accept connections.'''
+        self.set_node('PORT', str(port))
+
+    def get_ip(self):
+        '''Get list of CIDR subnet masks for this vhost.'''
+        return self.get_node('IP', multiple = True)
+
+    def add_ip(self, ip):
+        '''Add CIDR subnet mask for this vhost.'''
+        self.add_node('IP', ip)
+        
+    def del_ip(self, ip):
+        '''Remove CIDR subnet mast for this vhost.'''
+        self.del_node('IP', ip)
+
+    def get_protocol(self):
+        '''Get used protocol.'''
+        return self.get_node('PROTOCOL')
+
+    def set_protocol(self, protocol):
+        '''Set used protocol. Will raise ProtocolError if there is no such
+        protocol.'''
+        if protocol not in self.allowed_protocols:
+            raise self.ProtocolError(protocol)
+        self.set_node('PROTOCOL', protocol)
+
+    def get_docroot(self):
+        '''Get document root directory.'''
+        return self.get_node('DOCROOT')
+
+    def set_docroot(self, docroot):
+        '''Set document root directory.'''
+        self.set_node('DOCROOT', docroot)
+
+    def get_sysfolder(self):
+        '''Get system directory.'''
+        return self.get_node('SYSFOLDER')
+
+    def set_sysfolder(self, sysfolder):
+        '''Set system directory.'''
+        self.set_node('SYSFOLDER', sysfolder)
+
+    def get_host(self): # TODO: useRegex option
+        '''Get list of host names.'''
+        return self.get_node('HOST', multiple = True)
+
+    def add_host(self, host): # TODO: useRegex option
+        '''Add host name.'''
+        self.add_node('HOST', host)
+
+    def del_host(self, host): # TODO: useRegex option
+        '''Remove host name.'''
+        self.del_node('HOST', host)
+
+    def get_accesslog(self): # TODO: streams, etc.
+        '''Get access log used by this vhost.'''
+        return self.get_node('ACCESSLOG')
+
+    def set_accesslog(self, accesslog): # TODO: streams, etc.
+        '''Set access log used by this vhost.'''
+        self.set_node('ACCESSLOG', accesslog)
+
+    def get_warninglog(self): # TODO: streams, etc.
+        '''Get errors log used by this vhost.'''
+        return self.get_node('WARNINGLOG')
+
+    def set_warninglog(self, warninglog): # TODO: streams, etc.
+        '''Set errors log used by this vhost.'''
+        self.set_node('WARNINGLOG', warninglog)
+
diff --git a/misc/py_control_client/pycontrollib/pycontrollib.py b/misc/py_control_client/pycontrollib/pycontrollib.py
new file mode 100644
index 0000000..a32133c
--- /dev/null
+++ b/misc/py_control_client/pycontrollib/pycontrollib.py
@@ -0,0 +1,176 @@
+# -*- coding: utf-8 -*-
+'''
+MyServer
+Copyright (C) 2009 Free Software Foundation, Inc.
+This program 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 3 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program.  If not, see <http://www.gnu.org/licenses/>.
+'''
+
+import socket
+from myserver.pycontrol import PyMyServerControl
+from configWrapper import VHostWrapper, make_vhost_list
+
+import sys
+
+class Controller():
+    '''High level library to control GNU MyServer. Every method returns True
+    or requested data on success and False on error.'''
+    class Parser():
+        '''Parse command output.'''
+        def connections(self, lines): # TODO: split lines to dicts
+            '''Parse data returned by SHOWCONNECTIONS command.'''
+            l = []
+            for line in lines.splitlines():
+                parts = line.split(' - ')
+                l.append(dict(zip(['id', 'client_ip', 'client_port',
+                    'server_ip', 'server_port', '?a', '?b'], parts)))
+            return l
+
+        def language_files(self, lines):
+            '''Parse data returned by SHOWLANGUAGEFILES command.'''
+            return lines.splitlines()
+
+    def __init__(self, host, port, username, password):
+        self.connection = None
+        self.parser = self.Parser()
+        self.host = host
+        self.port = port
+        self.username = username
+        self.password = password
+        self.response_code = 100
+
+    def get_response_code(self):
+        '''Get response code of last issued command.'''
+        return self.response_code
+
+    def connect(self):
+        '''Connect to server.'''
+        self.disconnect()
+        try:
+            self.connection = PyMyServerControl(self.host, self.port,
+                self.username, self.password)
+        except socket.error:
+            return False
+        return True
+
+    def disconnect(self):
+        '''Disconnect from server.'''
+        if self.connection:
+            self.connection.close()
+            self.connection = None
+        return True
+
+    def reboot(self):
+        '''Reboot server.'''
+        if self.connection:
+            self.connection.send_header('REBOOT', 0)
+            self.connection.read_header()
+            self.response_code = self.connection.response_code
+            if self.response_code != '100':
+                return False
+            return True
+        else:
+            return False
+
+    def version(self):
+        '''Get version string.'''
+        if self.connection:
+            self.connection.send_header('VERSION', 0)
+            self.connection.read_header()
+            self.response_code = self.connection.response_code
+            if self.response_code != '100':
+                return False
+            return self.connection.read()
+        else:
+            return False
+
+    def enable_reboot(self):
+        '''Enable server auto-reboot.'''
+        if self.connection:
+            self.connection.send_header('ENABLEREBOOT', 0)
+            self.connection.read_header()
+            self.response_code = self.connection.response_code
+            if self.response_code != '100':
+                return False
+            return True
+        else:
+            return False
+
+    def disable_reboot(self):
+        '''Disable server auto-reboot.'''
+        if self.connection:
+            self.connection.send_header('DISABLEREBOOT', 0)
+            self.connection.read_header()
+            self.response_code = self.connection.response_code
+            if self.response_code != '100':
+                return False
+            return True
+        else:
+            return False
+
+    def show_connections(self):
+        '''List active server connections.'''
+        if self.connection:
+            self.connection.send_header('SHOWCONNECTIONS', 0)
+            self.connection.read_header()
+            self.response_code = self.connection.response_code
+            if self.response_code != '100':
+                return False
+            return self.parser.connections(self.connection.read())
+        else:
+            return False
+
+    def kill_connection(self, num):
+        '''Kill connection to server.'''
+        if self.connection:
+            self.connection.send_header('KILLCONNECTION', 0, str(num))
+            self.connection.read_header()
+            self.response_code = self.connection.response_code
+            if self.response_code != '100':
+                return False
+            return True
+        else:
+            return False
+
+    def show_language_files(self):
+        '''List available language files.'''
+        if self.connection:
+            self.connection.send_header('SHOWLANGUAGEFILES', 0)
+            self.connection.read_header()
+            self.response_code = self.connection.response_code
+            if self.response_code != '100':
+                return False
+            return self.parser.language_files(self.connection.read())
+        else:
+            return False
+
+    def get_file(self, file_name):
+        '''Get file from server.'''
+        if self.connection:
+            self.connection.send_header('GETFILE', 0, file_name)
+            self.connection.read_header()
+            self.response_code = self.connection.response_code
+            if self.response_code != '100':
+                return False
+            return self.connection.read()
+        else:
+            return False
+
+    def get_vhost_configuration(self):
+        '''Get virtual hosts configuration wrapped in list of VHostWrapper
+        objects.'''
+        text = self.get_file('virtualhosts.xml')
+        if text is not False:
+            return make_vhost_list(text)
+        return False
+

-----------------------------------------------------------------------

Summary of changes:
 misc/PyGTK_Control/ConfigGUI.py                    |  372 ----
 misc/PyGTK_Control/MIMEtypes.py                    |   61 -
 misc/PyGTK_Control/MIMEtypes.xml                   |  985 -----------
 misc/PyGTK_Control/MyServer Configure.ico          |  Bin 2238 -> 0 bytes
 misc/PyGTK_Control/MyServerControl.py              |  461 +++++
 misc/PyGTK_Control/PyGTKControl.glade              | 1436 ++++++++++++++++
 misc/PyGTK_Control/XMLGui.glade                    | 1810 --------------------
 misc/py_control_client/INSTALL                     |   11 +
 .../py_control_client/MyServer/GUI/AboutWindow.py  |   21 +-
 .../MyServer/GUI/BrowserWidgets.py                 |   80 +
 .../MyServer/GUI/ConnectionWindow.py               |   45 +
 .../MyServer/GUI/DefinitionWidgets.py              |  304 ++++
 misc/py_control_client/MyServer/GUI/GUIConfig.py   |   91 +
 misc/py_control_client/MyServer/GUI/MIMEWidgets.py |  204 +++
 .../MyServer/GUI/SecurityWidgets.py                |  732 ++++++++
 .../py_control_client/MyServer/GUI/VHostWidgets.py |  515 ++++++
 .../{pycontrol => MyServer/GUI}/__init__.py        |    0
 misc/py_control_client/{ => MyServer}/README       |    0
 .../MyServer}/__init__.py                          |    0
 .../MyServer/pycontrol}/__init__.py                |    0
 .../{ => MyServer}/pycontrol/pycontrol.py          |   20 +-
 .../MyServer/pycontrollib}/__init__.py             |    1 -
 .../MyServer/pycontrollib/browser.py               |   86 +
 .../MyServer/pycontrollib/config.py                |   70 +
 .../MyServer/pycontrollib/controller.py            |  145 ++
 .../MyServer/pycontrollib/definition.py            |  252 +++
 .../py_control_client/MyServer/pycontrollib/log.py |  242 +++
 .../MyServer/pycontrollib/mimetypes.py             |  270 +++
 .../MyServer/pycontrollib/security.py              |  474 +++++
 .../MyServer/pycontrollib/test/Makefile            |   45 +
 .../MyServer/pycontrollib/test/config_test.py      |  134 ++
 .../MyServer/pycontrollib/test/definition_test.py  |  481 ++++++
 .../MyServer/pycontrollib/test/log_test.py         |  425 +++++
 .../MyServer/pycontrollib/test/mimetypes_test.py   |  484 ++++++
 .../MyServer/pycontrollib/test/security_test.py    | 1122 ++++++++++++
 .../MyServer/pycontrollib/test/vhost_test.py       |  623 +++++++
 .../MyServer/pycontrollib/vhost.py                 |  306 ++++
 misc/py_control_client/{ => MyServer}/sample.py    |    0
 .../nodetree.h => misc/py_control_client/setup.py  |   16 +-
 39 files changed, 9070 insertions(+), 3254 deletions(-)
 delete mode 100755 misc/PyGTK_Control/ConfigGUI.py
 delete mode 100644 misc/PyGTK_Control/MIMEtypes.py
 delete mode 100644 misc/PyGTK_Control/MIMEtypes.xml
 delete mode 100755 misc/PyGTK_Control/MyServer Configure.ico
 create mode 100644 misc/PyGTK_Control/MyServerControl.py
 create mode 100644 misc/PyGTK_Control/PyGTKControl.glade
 delete mode 100644 misc/PyGTK_Control/XMLGui.glade
 create mode 100644 misc/py_control_client/INSTALL
 copy myserver/include/conf/nodetree.h => misc/py_control_client/MyServer/GUI/AboutWindow.py (63%)
 create mode 100644 misc/py_control_client/MyServer/GUI/BrowserWidgets.py
 create mode 100644 misc/py_control_client/MyServer/GUI/ConnectionWindow.py
 create mode 100644 misc/py_control_client/MyServer/GUI/DefinitionWidgets.py
 create mode 100644 misc/py_control_client/MyServer/GUI/GUIConfig.py
 create mode 100644 misc/py_control_client/MyServer/GUI/MIMEWidgets.py
 create mode 100644 misc/py_control_client/MyServer/GUI/SecurityWidgets.py
 create mode 100644 misc/py_control_client/MyServer/GUI/VHostWidgets.py
 rename misc/py_control_client/{pycontrol => MyServer/GUI}/__init__.py (100%)
 rename misc/py_control_client/{ => MyServer}/README (100%)
 copy misc/{myserver-get/myserverGetLib => py_control_client/MyServer}/__init__.py (100%)
 copy misc/{myserver-get/myserverGetLib => py_control_client/MyServer/pycontrol}/__init__.py (100%)
 rename misc/py_control_client/{ => MyServer}/pycontrol/pycontrol.py (87%)
 copy misc/{myserver-get/myserverGetLib => py_control_client/MyServer/pycontrollib}/__init__.py (66%)
 create mode 100644 misc/py_control_client/MyServer/pycontrollib/browser.py
 create mode 100644 misc/py_control_client/MyServer/pycontrollib/config.py
 create mode 100644 misc/py_control_client/MyServer/pycontrollib/controller.py
 create mode 100644 misc/py_control_client/MyServer/pycontrollib/definition.py
 create mode 100644 misc/py_control_client/MyServer/pycontrollib/log.py
 create mode 100644 misc/py_control_client/MyServer/pycontrollib/mimetypes.py
 create mode 100644 misc/py_control_client/MyServer/pycontrollib/security.py
 create mode 100644 misc/py_control_client/MyServer/pycontrollib/test/Makefile
 create mode 100644 misc/py_control_client/MyServer/pycontrollib/test/config_test.py
 create mode 100644 misc/py_control_client/MyServer/pycontrollib/test/definition_test.py
 create mode 100644 misc/py_control_client/MyServer/pycontrollib/test/log_test.py
 create mode 100644 misc/py_control_client/MyServer/pycontrollib/test/mimetypes_test.py
 create mode 100644 misc/py_control_client/MyServer/pycontrollib/test/security_test.py
 create mode 100644 misc/py_control_client/MyServer/pycontrollib/test/vhost_test.py
 create mode 100644 misc/py_control_client/MyServer/pycontrollib/vhost.py
 rename misc/py_control_client/{ => MyServer}/sample.py (100%)
 copy myserver/include/conf/nodetree.h => misc/py_control_client/setup.py (74%)


hooks/post-receive
-- 
GNU MyServer



From MAILER-DAEMON Sun Aug 30 14:32:32 2009
Received: from mailman by lists.gnu.org with archive (Exim 4.43)
	id 1MhpCa-00077d-Ja
	for mharc-myserver-commit@gnu.org; Sun, 30 Aug 2009 14:32:32 -0400
Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43)
	id 1MhpCY-000775-Sd
	for myserver-commit@gnu.org; Sun, 30 Aug 2009 14:32:30 -0400
Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43)
	id 1MhpCW-00076l-7f
	for myserver-commit@gnu.org; Sun, 30 Aug 2009 14:32:29 -0400
Received: from [199.232.76.173] (port=53864 helo=monty-python.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43) id 1MhpCW-00076i-1n
	for myserver-commit@gnu.org; Sun, 30 Aug 2009 14:32:28 -0400
Received: from savannah.gnu.org ([199.232.41.3]:41618 helo=sv.gnu.org)
	by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32)
	(Exim 4.60) (envelope-from <gscrivano@gnu.org>) id 1MhpCV-0004oD-NF
	for myserver-commit@gnu.org; Sun, 30 Aug 2009 14:32:27 -0400
Received: from download.savannah.gnu.org ([199.232.41.75]
	helo=cvs.savannah.gnu.org) by sv.gnu.org with esmtp (Exim 4.69)
	(envelope-from <gscrivano@gnu.org>) id 1MhpCV-0004Ch-4E
	for myserver-commit@gnu.org; Sun, 30 Aug 2009 18:32:27 +0000
Received: from gscrivano by cvs.savannah.gnu.org with local (Exim 4.69)
	(envelope-from <gscrivano@savannah.gnu.org>) id 1MhpCT-0004C3-83
	for myserver-commit@gnu.org; Sun, 30 Aug 2009 18:32:27 +0000
To: myserver-commit@gnu.org
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: 1826f042a7284e3eb05cc74d648ee452457a1306
X-Git-Newrev: 6e6ac19bb972dfbe05a4caf96c38aedc6df34fb9
Message-Id: <E1MhpCT-0004C3-83@cvs.savannah.gnu.org>
From: Giuseppe Scrivano <gscrivano@gnu.org>
Date: Sun, 30 Aug 2009 18:32:26 +0000
X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2)
Subject: [myserver-commit] [SCM] GNU MyServer branch, master,
	updated. 6e6ac19bb972dfbe05a4caf96c38aedc6df34fb9
X-BeenThere: myserver-commit@gnu.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: myserver-commit.gnu.org
List-Unsubscribe: <http://lists.gnu.org/mailman/listinfo/myserver-commit>,
	<mailto:myserver-commit-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/pipermail/myserver-commit>
List-Post: <mailto:myserver-commit@gnu.org>
List-Help: <mailto:myserver-commit-request@gnu.org?subject=help>
List-Subscribe: <http://lists.gnu.org/mailman/listinfo/myserver-commit>,
	<mailto:myserver-commit-request@gnu.org?subject=subscribe>
X-List-Received-Date: Sun, 30 Aug 2009 18:32:31 -0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU MyServer".

The branch, master has been updated
       via  6e6ac19bb972dfbe05a4caf96c38aedc6df34fb9 (commit)
       via  08a6e59c15353641abd1852bbda8b81b24c5ed70 (commit)
       via  6dc817fcf7b8be6292eacb5f87777316d628b7b4 (commit)
      from  1826f042a7284e3eb05cc74d648ee452457a1306 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------


commit 6e6ac19bb972dfbe05a4caf96c38aedc6df34fb9
Merge: 08a6e59 1826f04
Author: Giuseppe Scrivano <gscrivano@gnu.org>
Date:   Sun Aug 30 20:32:01 2009 +0200

    Merge branch 'master' of ssh://git.sv.gnu.org/srv/git/myserver




commit 08a6e59c15353641abd1852bbda8b81b24c5ed70
Author: Giuseppe Scrivano <gscrivano@gnu.org>
Date:   Sun Aug 30 20:31:19 2009 +0200

    Use position independent code (PIC) when it is possible.

diff --git a/myserver/configure.ac b/myserver/configure.ac
index c6a803a..4d83bd6 100644
--- a/myserver/configure.ac
+++ b/myserver/configure.ac
@@ -318,10 +318,12 @@ else
   MAKE_TESTS=no
 fi
 
-LDFLAGS="$LDFLAGS $LIBS"
+CFLAGS="$CFLAGS $pic_flag"
+CXXFLAGS="$CXXFLAGS $pic_flag"
+LDFLAGS="$LDFLAGS $LIBS $pic_flag"
 
 AC_SUBST(CFLAGS)
-AC_SUBST(CXFLAGS)
+AC_SUBST(CXXFLAGS)
 AC_SUBST(LDFLAGS)
 AC_SUBST(CPPUNIT_LDFLAGS)
 



commit 6dc817fcf7b8be6292eacb5f87777316d628b7b4
Author: Giuseppe Scrivano <gscrivano@gnu.org>
Date:   Sun Aug 30 20:30:55 2009 +0200

    Define a single macro when a regex library is present.

diff --git a/myserver/src/base/regex/myserver_regex.cpp b/myserver/src/base/regex/myserver_regex.cpp
index 575b49e..c7a45d1 100644
--- a/myserver/src/base/regex/myserver_regex.cpp
+++ b/myserver/src/base/regex/myserver_regex.cpp
@@ -1,6 +1,6 @@
 /*
 MyServer
-Copyright (C) 2002, 2003, 2004, 2007, 2008 Free Software Foundation, Inc.
+Copyright (C) 2002, 2003, 2004, 2007, 2008, 2009 Free Software Foundation, Inc.
 This program 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 3 of the License, or
@@ -17,16 +17,23 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 #include <include/base/regex/myserver_regex.h>
 
+#ifdef REGEX
+# define REGLIB 1
+#elif TRE
+# define REGLIB 1
+#else
+# undef REGLIB
+#endif
 /*!
  * Compile the regex pattern.
  */
-int Regex::compile(const char *p, int f)
+int Regex::compile (const char *p, int f)
 {
-#ifdef REGEX | TRE
-  int ret = regcomp(&compiledRegex, p, f);
-  pattern.assign(p);
+#ifdef REGLIB
+  int ret = regcomp (&compiledRegex, p, f);
+  pattern.assign (p);
   flags = f;
-  if(!ret)
+  if (!ret)
     compiled = 1;
   return ret;
 #endif
@@ -36,11 +43,11 @@ int Regex::compile(const char *p, int f)
 /*!
  * Match the pattern against strings.
  */
-int Regex::exec(const char *text, size_t nmatch, regmatch_t matchptr [],
-                int eflags)
+int Regex::exec (const char *text, size_t nmatch, regmatch_t matchptr [],
+                 int eflags)
 {
-#ifdef REGEX | TRE
-  if(!compiled)
+#ifdef REGLIB
+  if (!compiled)
     return 1;
   int ret = regexec (&compiledRegex, text, nmatch, matchptr, eflags);
   return ret;
@@ -51,11 +58,11 @@ int Regex::exec(const char *text, size_t nmatch, regmatch_t matchptr [],
 /*!
  * Free the used memory.
  */
-void Regex::free()
+void Regex::free ()
 {
-#ifdef REGEX | TRE
-  if(compiled)
-    regfree(&compiledRegex);
+#ifdef REGLIB
+  if (compiled)
+    regfree (&compiledRegex);
   compiled = 0;
 #endif
 }
@@ -63,26 +70,26 @@ void Regex::free()
 /*!
  * Destructor for the class
  */
-Regex::~Regex()
+Regex::~Regex ()
 {
-#ifdef REGEX | TRE
-  free();
+#ifdef REGLIB
+  free ();
 #endif
 }
 
 /*!
  * Constructor for the class.
  */
-Regex::Regex(const char *pattern, int flags)
+Regex::Regex (const char *pattern, int flags)
 {
-#ifdef REGEX | TRE
-  compile(pattern, flags);
+#ifdef REGLIB
+  compile (pattern, flags);
 #endif
 }
 /*!
  * Return a nonzero value if the regex was compiled.
  */
-int Regex::isCompiled()
+int Regex::isCompiled ()
 {
   return compiled;
 }
@@ -90,17 +97,17 @@ int Regex::isCompiled()
 /*!
  * Construct by copy.
  */
-Regex::Regex(Regex& r)
+Regex::Regex (Regex& r)
 {
-  clone(r);
+  clone (r);
 }
 
 /*!
  * Create a clone.
  */
-void Regex::clone(Regex& r)
+void Regex::clone (Regex& r)
 {
-#ifdef REGEX | TRE
-  compile(r.pattern.c_str(), r.flags);
+#ifdef REGLIB
+  compile (r.pattern.c_str (), r.flags);
 #endif
 }

-----------------------------------------------------------------------

Summary of changes:
 myserver/configure.ac                      |    6 ++-
 myserver/src/base/regex/myserver_regex.cpp |   59 +++++++++++++++------------
 2 files changed, 37 insertions(+), 28 deletions(-)


hooks/post-receive
-- 
GNU MyServer



From MAILER-DAEMON Sun Aug 30 15:44:58 2009
Received: from mailman by lists.gnu.org with archive (Exim 4.43)
	id 1MhqKg-0007cV-IQ
	for mharc-myserver-commit@gnu.org; Sun, 30 Aug 2009 15:44:58 -0400
Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43)
	id 1MhqEj-00038p-IB
	for myserver-commit@gnu.org; Sun, 30 Aug 2009 15:38:49 -0400
Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43)
	id 1MhqEi-00037p-NI
	for myserver-commit@gnu.org; Sun, 30 Aug 2009 15:38:48 -0400
Received: from [199.232.76.173] (port=56978 helo=monty-python.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43) id 1MhqEi-00037G-As
	for myserver-commit@gnu.org; Sun, 30 Aug 2009 15:38:48 -0400
Received: from savannah.gnu.org ([199.232.41.3]:57095 helo=sv.gnu.org)
	by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32)
	(Exim 4.60) (envelope-from <maarons@gnu.org>) id 1MhqEd-0006lX-Fe
	for myserver-commit@gnu.org; Sun, 30 Aug 2009 15:38:47 -0400
Received: from download.savannah.gnu.org ([199.232.41.75]
	helo=cvs.savannah.gnu.org) by sv.gnu.org with esmtp (Exim 4.69)
	(envelope-from <maarons@gnu.org>) id 1MhqEc-000849-QX
	for myserver-commit@gnu.org; Sun, 30 Aug 2009 19:38:43 +0000
Received: from maarons by cvs.savannah.gnu.org with local (Exim 4.69)
	(envelope-from <maarons@savannah.gnu.org>) id 1MhqEa-00083b-8s
	for myserver-commit@gnu.org; Sun, 30 Aug 2009 19:38:42 +0000
To: myserver-commit@gnu.org
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: 6e6ac19bb972dfbe05a4caf96c38aedc6df34fb9
X-Git-Newrev: 1357e42c30c239a6f1e3fc1b93e5c2eaf8e3f016
Message-Id: <E1MhqEa-00083b-8s@cvs.savannah.gnu.org>
From: Marek Aaron Sapota <maarons@gnu.org>
Date: Sun, 30 Aug 2009 19:38:41 +0000
X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2)
X-Mailman-Approved-At: Sun, 30 Aug 2009 15:44:56 -0400
Subject: [myserver-commit] [SCM] GNU MyServer branch, master,
	updated. 1357e42c30c239a6f1e3fc1b93e5c2eaf8e3f016
X-BeenThere: myserver-commit@gnu.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: myserver-commit.gnu.org
List-Unsubscribe: <http://lists.gnu.org/mailman/listinfo/myserver-commit>,
	<mailto:myserver-commit-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/pipermail/myserver-commit>
List-Post: <mailto:myserver-commit@gnu.org>
List-Help: <mailto:myserver-commit-request@gnu.org?subject=help>
List-Subscribe: <http://lists.gnu.org/mailman/listinfo/myserver-commit>,
	<mailto:myserver-commit-request@gnu.org?subject=subscribe>
X-List-Received-Date: Sun, 30 Aug 2009 19:38:50 -0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU MyServer".

The branch, master has been updated
       via  1357e42c30c239a6f1e3fc1b93e5c2eaf8e3f016 (commit)
       via  54701d1a22bdd44c8603f0b8342b52f5de3ee77f (commit)
       via  6125a854026badd386c2f89d9e939a19cf2808e1 (commit)
      from  6e6ac19bb972dfbe05a4caf96c38aedc6df34fb9 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------


commit 1357e42c30c239a6f1e3fc1b93e5c2eaf8e3f016
Merge: 54701d1 6e6ac19
Author: Marek Aaron Sapota <maarons@gnu.org>
Date:   Sun Aug 30 21:10:38 2009 +0200

    Merge branch 'master' of git.sv.gnu.org:/srv/git/myserver
    
    Conflicts:
    	myserver/configure.ac

diff --cc myserver/configure.ac
index 2449f6a,4d83bd6..4e8a481
--- a/myserver/configure.ac
+++ b/myserver/configure.ac
@@@ -320,16 -318,12 +320,18 @@@ els
    MAKE_TESTS=no
  fi
  
 +if test x$enable_gui == xyes; then
 +  MAKE_GUI=yes
 +else
 +  MAKE_GUI=no
 +fi
 +
- LDFLAGS="$LDFLAGS $LIBS"
+ CFLAGS="$CFLAGS $pic_flag"
+ CXXFLAGS="$CXXFLAGS $pic_flag"
+ LDFLAGS="$LDFLAGS $LIBS $pic_flag"
  
  AC_SUBST(CFLAGS)
- AC_SUBST(CXFLAGS)
+ AC_SUBST(CXXFLAGS)
  AC_SUBST(LDFLAGS)
  AC_SUBST(CPPUNIT_LDFLAGS)
  



commit 54701d1a22bdd44c8603f0b8342b52f5de3ee77f
Merge: 1826f04 6125a85
Author: Marek Aaron Sapota <maarons@gnu.org>
Date:   Sun Aug 30 21:02:33 2009 +0200

    Merge branch 'master' of ../MyServer




commit 6125a854026badd386c2f89d9e939a19cf2808e1
Author: Marek Aaron Sapota <maarons@gnu.org>
Date:   Sun Aug 30 15:22:35 2009 +0200

    GUI can be installed with ./configure --enable-gui
    
    Autoconf doesn't check for python or required libraries, also glade file
    is plced in bindir. This file will be removed in future version of GUI.

diff --git a/myserver/configure.ac b/myserver/configure.ac
index c6a803a..2449f6a 100644
--- a/myserver/configure.ac
+++ b/myserver/configure.ac
@@ -68,6 +68,8 @@ AC_ARG_ENABLE([ipv6], [--enable-ipv6 Build with IPv6 support], enable_ipv6="yes"
 AC_ARG_ENABLE([tests], [--disable-tests Disable the tests suite],
                        enable_tests="$enableval", enable_tests="yes")
 
+AC_ARG_ENABLE([gui], [--enable-gui Build and install GUI application], enable_gui="yes", enable_gui="")
+
 dnl Looking for argp.h
 AC_CHECK_HEADER([argp.h], AC_DEFINE(ARGP, 1, [Define if GNU argp tools are available]))
 
@@ -318,6 +320,12 @@ else
   MAKE_TESTS=no
 fi
 
+if test x$enable_gui == xyes; then
+  MAKE_GUI=yes
+else
+  MAKE_GUI=no
+fi
+
 LDFLAGS="$LDFLAGS $LIBS"
 
 AC_SUBST(CFLAGS)
@@ -331,6 +339,7 @@ AC_TYPE_GETGROUPS
 AM_CONDITIONAL(BUILD_TESTS, test "$MAKE_TESTS" = "yes")
 AM_CONDITIONAL(BUILD_MSCGI, test "$MAKE_MSCGI" = "yes")
 AM_CONDITIONAL(BUILD_DOC, test "$MAKE_DOC" = "yes")
+AM_CONDITIONAL(BUILD_GUI, test "$MAKE_GUI" = "yes")
 
 AC_SUBST(BUILD_TESTS)
 AC_SUBST(BUILD_DOC)
@@ -462,6 +471,7 @@ AC_CONFIG_FILES([ po/Makefile.in
     src/filter/gzip/Makefile
     src/plugin/Makefile
     src/server/Makefile
+    src/GUI/Makefile
     tests/Makefile
     ])
 AC_OUTPUT
diff --git a/myserver/src/GUI/Makefile.am b/myserver/src/GUI/Makefile.am
new file mode 100644
index 0000000..946f24d
--- /dev/null
+++ b/myserver/src/GUI/Makefile.am
@@ -0,0 +1,6 @@
+install:
+if BUILD_GUI
+	python setup.py install --prefix=${prefix}
+	mkdir -p ${bindir}
+	cp MyServerControl.py PyGTKControl.glade ${bindir}
+endif
diff --git a/myserver/src/GUI/MyServer/GUI/AboutWindow.py b/myserver/src/GUI/MyServer/GUI/AboutWindow.py
new file mode 100644
index 0000000..252081f
--- /dev/null
+++ b/myserver/src/GUI/MyServer/GUI/AboutWindow.py
@@ -0,0 +1,31 @@
+# -*- coding: utf-8 -*-
+'''
+MyServer
+Copyright (C) 2009 Free Software Foundation, Inc.
+This program 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 3 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program.  If not, see <http://www.gnu.org/licenses/>.
+'''
+
+import gtk
+import gtk.glade
+
+class About():
+    '''GNU MyServer Control about window.'''
+
+    def __init__(self):
+        self.gladefile = 'PyGTKControl.glade'
+        self.widgets = gtk.glade.XML(self.gladefile, 'aboutdialog')
+        self.widgets.signal_autoconnect(self)
+
+    def on_aboutdialog_response(self, widget, response):
+        widget.destroy()
diff --git a/myserver/src/GUI/MyServer/GUI/BrowserWidgets.py b/myserver/src/GUI/MyServer/GUI/BrowserWidgets.py
new file mode 100644
index 0000000..219ef16
--- /dev/null
+++ b/myserver/src/GUI/MyServer/GUI/BrowserWidgets.py
@@ -0,0 +1,80 @@
+# -*- coding: utf-8 -*-
+'''
+MyServer
+Copyright (C) 2009 Free Software Foundation, Inc.
+This program 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 3 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program.  If not, see <http://www.gnu.org/licenses/>.
+'''
+
+import gtk
+from gtk import gdk
+import gobject
+from MyServer.pycontrollib.browser import LocalFileBrowser
+
+class BrowserTreeView(gtk.TreeView):
+    def __init__(self, callback):
+        gtk.TreeView.__init__(self, gtk.ListStore(
+                gdk.Pixbuf,
+                gobject.TYPE_STRING))
+        self.callback = callback
+        self.model = self.get_model()
+        renderer = gtk.CellRendererPixbuf()
+        column = gtk.TreeViewColumn()
+        column.pack_start(renderer)
+        column.add_attribute(renderer, 'pixbuf', 0)
+        self.append_column(column)
+        renderer = gtk.CellRendererText()
+        column = gtk.TreeViewColumn('File')
+        column.pack_start(renderer)
+        column.add_attribute(renderer, 'text', 1)
+        self.append_column(column)
+
+        self.browser = LocalFileBrowser()
+        self.browser.show_hidden(False)
+        icon_theme = gtk.icon_theme_get_default()
+        self.dir_icon = icon_theme.load_icon('gtk-directory', 16, 0)
+        self.update()
+        self.connect('row-activated', self.change_dir)
+        callback(self.browser)
+
+        self.scroll = gtk.ScrolledWindow()
+        self.scroll.set_policy(gtk.POLICY_AUTOMATIC, gtk.POLICY_AUTOMATIC)
+        self.scroll.set_shadow_type(gtk.SHADOW_OUT)
+        self.scroll.set_border_width(5)
+        self.scroll.add(self)
+
+    def update(self):
+        '''Show contents of current directory.'''
+        self.model.clear()
+        for d in self.browser.list_dir():
+            self.model.append((self.dir_icon, d, ))
+
+    def change_dir(self, widget, path, view_column):
+        self.browser.change_dir(self.model[path][1])
+        self.update()
+        self.callback(self.browser)
+
+class BrowserTable(gtk.Table):
+    def __init__(self, callback):
+        gtk.Table.__init__(self, 2, 1)
+
+        self.browser_tree = BrowserTreeView(callback)
+
+        def set_show_hidden(button):
+            self.browser_tree.browser.show_hidden(button.get_active())
+            self.browser_tree.update()
+        hide_check = gtk.CheckButton('Show hidden directories.')
+        hide_check.connect('toggled', set_show_hidden)
+
+        self.attach(hide_check, 0, 1, 0, 1, yoptions = gtk.FILL)
+        self.attach(self.browser_tree.scroll, 0, 1, 1, 2)
diff --git a/myserver/src/GUI/MyServer/GUI/ConnectionWindow.py b/myserver/src/GUI/MyServer/GUI/ConnectionWindow.py
new file mode 100644
index 0000000..16d4ddf
--- /dev/null
+++ b/myserver/src/GUI/MyServer/GUI/ConnectionWindow.py
@@ -0,0 +1,45 @@
+# -*- coding: utf-8 -*-
+'''
+MyServer
+Copyright (C) 2009 Free Software Foundation, Inc.
+This program 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 3 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program.  If not, see <http://www.gnu.org/licenses/>.
+'''
+
+import gtk
+import gtk.glade
+
+class Connection():
+    def __init__(self):
+        self.gladefile = 'PyGTKControl.glade'
+        self.widgets = gtk.glade.XML(self.gladefile, 'connectiondialog')
+        self.widgets.signal_autoconnect(self)
+
+    def destroy(self):
+        '''Destroys this widget.'''
+        self.widgets.get_widget('connectiondialog').destroy()
+
+    def on_cancel_button_clicked(self, widget):
+        self.destroy()
+
+    def get_host(self):
+        return self.widgets.get_widget('host_entry').get_text()
+
+    def get_port(self):
+        return self.widgets.get_widget('port_entry').get_text()
+
+    def get_username(self):
+        return self.widgets.get_widget('username_entry').get_text()
+
+    def get_password(self):
+        return self.widgets.get_widget('password_entry').get_text()
diff --git a/myserver/src/GUI/MyServer/GUI/DefinitionWidgets.py b/myserver/src/GUI/MyServer/GUI/DefinitionWidgets.py
new file mode 100644
index 0000000..079dbee
--- /dev/null
+++ b/myserver/src/GUI/MyServer/GUI/DefinitionWidgets.py
@@ -0,0 +1,304 @@
+# -*- coding: utf-8 -*-
+'''
+MyServer
+Copyright (C) 2009 Free Software Foundation, Inc.
+This program 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 3 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program.  If not, see <http://www.gnu.org/licenses/>.
+'''
+
+import gtk
+import gobject
+from MyServer.pycontrollib.definition import DefinitionElement, DefinitionTree
+
+class DefinitionTable(gtk.Table):
+    def __init__(self, tree):
+        gtk.Table.__init__(self, 7, 3)
+
+        tree.connect('cursor-changed', self.cursor_changed)
+        self.last_selected = None
+
+        enabled_label = gtk.Label('enabled:')
+        self.enabled_field = enabled_checkbutton = gtk.CheckButton()
+        enabled_checkbutton.set_tooltip_text('If not active, definition won\'t be included in saved configuration.')
+        self.attach(enabled_label, 0, 1, 0, 1, gtk.FILL, gtk.FILL)
+        self.attach(enabled_checkbutton, 1, 3, 0, 1, yoptions = gtk.FILL)
+
+        value_label = gtk.Label('value:')
+        self.value_field = value_entry = gtk.Entry()
+        self.value_check_field = value_checkbutton = gtk.CheckButton()
+        value_checkbutton.set_tooltip_text('If not active value won\'t be saved in configuration.')
+        value_checkbutton.set_active(True)
+
+        self.attach(value_label, 0, 1, 1, 2, gtk.FILL, gtk.FILL)
+        self.attach(value_entry, 1, 2, 1, 2, yoptions = gtk.FILL)
+        self.attach(value_checkbutton, 2, 3, 1, 2, gtk.FILL, gtk.FILL)
+
+        add_definition_button = gtk.Button('add sub-definition')
+        def add_sub_definition(button):
+            model, selected = tree.get_selection().get_selected()
+            if selected is not None:
+                model.append(selected, ('', '', False, True, '', False, {}, ))
+                self.value_check_field.set_active(False) # auto disable value
+        add_definition_button.connect('clicked', add_sub_definition)
+        self.attach(add_definition_button, 0, 3, 2, 3, yoptions = gtk.FILL)
+
+        remove_definition_button = gtk.Button('remove this definition')
+        def remove_definition(button):
+            model, selected = tree.get_selection().get_selected()
+            if selected is not None and not model[selected][2]:
+                model.remove(selected)
+                self.clear()
+        remove_definition_button.connect('clicked', remove_definition)
+        self.attach(remove_definition_button, 0, 3, 3, 4, yoptions = gtk.FILL)
+
+        add_attribute_button = gtk.Button('add attribute')
+        remove_attribute_button = gtk.Button('remove attribute')
+        button_table = gtk.Table(1, 2)
+        add_attribute_button.connect(
+            'clicked',
+            lambda button: attributes_model.append(('', '', )))
+        def remove_attribute(button):
+            model, selected = attributes_list.get_selection().get_selected()
+            if selected is not None:
+                model.remove(selected)
+        remove_attribute_button.connect('clicked', remove_attribute)
+        button_table.attach(add_attribute_button, 0, 1, 0, 1)
+        button_table.attach(remove_attribute_button, 1, 2, 0, 1)
+        self.attach(button_table, 0, 3, 4, 5, yoptions = gtk.FILL)
+
+        attributes_label = gtk.Label('attributes:')
+        attributes_list = gtk.TreeView(gtk.ListStore(gobject.TYPE_STRING,
+                                                     gobject.TYPE_STRING))
+        attributes_scroll = gtk.ScrolledWindow()
+        attributes_scroll.set_policy(gtk.POLICY_AUTOMATIC, gtk.POLICY_AUTOMATIC)
+        attributes_scroll.set_shadow_type(gtk.SHADOW_OUT)
+        attributes_scroll.set_border_width(5)
+        attributes_scroll.add(attributes_list)
+        self.attributes_field = attributes_model = attributes_list.get_model()
+
+        def edited_handler(cell, path, text, data):
+            model, col = data
+            model[path][col] = text
+        variable_column = gtk.TreeViewColumn('variable')
+        variable_renderer = gtk.CellRendererText()
+        variable_renderer.set_property('editable', True)
+        variable_renderer.connect('edited', edited_handler,
+                                  (attributes_model, 0, ))
+        variable_column.pack_start(variable_renderer)
+        variable_column.add_attribute(variable_renderer, 'text', 0)
+
+        value_column = gtk.TreeViewColumn('value')
+        value_renderer = gtk.CellRendererText()
+        value_renderer.set_property('editable', True)
+        value_renderer.connect('edited', edited_handler,
+                                  (attributes_model, 1, ))
+        value_column.pack_start(value_renderer)
+        value_column.add_attribute(value_renderer, 'text', 1)
+
+        attributes_list.append_column(variable_column)
+        attributes_list.append_column(value_column)
+        self.attach(attributes_label, 0, 3, 5, 6, yoptions = gtk.FILL)
+        self.attach(attributes_scroll, 0, 3, 6, 7)
+
+    def clear(self):
+        '''Clear input widgets.'''
+        self.enabled_field.set_active(False)
+        self.value_field.set_text('')
+        self.value_check_field.set_active(False)
+        self.attributes_field.clear()
+        self.last_selected = None
+
+    def save_changed(self, tree):
+        '''Save data from input widgets to tree.'''
+        if self.last_selected is not None:
+            attributes = {}
+            i = self.attributes_field.iter_children(None)
+            while i is not None: # iterate over attributes
+                attributes[self.attributes_field.get_value(i, 0)] = \
+                    self.attributes_field.get_value(i, 1)
+                i = self.attributes_field.iter_next(i)
+            row = tree.get_model()[self.last_selected]
+            row[3] = self.enabled_field.get_active()
+            row[4] = self.value_field.get_text()
+            row[5] = self.value_check_field.get_active()
+            row[6] = attributes
+
+    def cursor_changed(self, tree):
+        '''Save data, and display data of current selected row.'''
+        self.save_changed(tree)
+
+        self.clear()
+
+        self.last_selected = current = self.get_selected(tree)
+        row = tree.get_model()[current]
+        self.enabled_field.set_active(row[3])
+        self.value_field.set_text(row[4])
+        self.value_check_field.set_active(row[5])
+        for attribute in row[6]:
+            self.attributes_field.append((attribute, row[6][attribute], ))
+
+    def get_selected(self, tree):
+        '''Get iterator of currently selected row.'''
+        model, selected = tree.get_selection().get_selected()
+        return selected
+
+    def make_def(self, tree):
+        '''Export all data as list of definitions.'''
+        self.save_changed(tree)
+        model = tree.get_model()
+        definitions = []
+        i = model.iter_children(None)
+        while i is not None: # iterate over options
+            definition = tree.make_def(i)
+            if definition is not None:
+                definitions.append(definition)
+            i = model.iter_next(i)
+        return definitions
+
+class DefinitionTreeView(gtk.TreeView):
+    def __init__(self):
+        gtk.TreeView.__init__(self, gtk.TreeStore(
+                gobject.TYPE_STRING, # option name
+                gobject.TYPE_STRING, # option tooltip
+                gobject.TYPE_BOOLEAN, # True if option is known
+                gobject.TYPE_BOOLEAN, # enabled
+                gobject.TYPE_STRING, # value
+                gobject.TYPE_BOOLEAN, # value_check
+                gobject.TYPE_PYOBJECT)) # attributes dict
+        model = self.get_model()
+        def name_edited_handler(cell, path, text, data):
+            model = data
+            row = model[path]
+            if not row[2]: # don't edit names of known options
+                row[0] = text
+        name_renderer = gtk.CellRendererText()
+        name_renderer.set_property('editable', True)
+        name_renderer.connect('edited', name_edited_handler, model)
+        name_column = gtk.TreeViewColumn('name')
+        name_column.pack_start(name_renderer)
+        name_column.add_attribute(name_renderer, 'text', 0)
+        self.append_column(name_column)
+        value_renderer = gtk.CellRendererText()
+        value_column = gtk.TreeViewColumn('value')
+        value_column.pack_start(value_renderer)
+        value_column.add_attribute(value_renderer, 'text', 4)
+        self.append_column(value_column)
+
+        self.scroll = gtk.ScrolledWindow()
+        self.scroll.set_policy(gtk.POLICY_AUTOMATIC, gtk.POLICY_AUTOMATIC)
+        self.scroll.set_shadow_type(gtk.SHADOW_OUT)
+        self.scroll.set_border_width(5)
+        self.scroll.add(self)
+
+        def show_tooltip(widget, x, y, keyboard_tip, tooltip):
+            if not widget.get_tooltip_context(x, y, keyboard_tip):
+                return False
+            else:
+                model, path, it = widget.get_tooltip_context(x, y, keyboard_tip)
+                tooltip.set_text(model[it][1])
+                widget.set_tooltip_row(tooltip, path)
+                return True
+        self.props.has_tooltip = True
+        self.connect("query-tooltip", show_tooltip)
+
+    def make_def(self, current):
+        '''Return row pointed by current exported as definition.'''
+        model = self.get_model()
+        row = model[current]
+        name = row[0]
+        enabled = row[3]
+        value = row[4]
+        value_check = row[5]
+        attributes = row[6]
+        if value_check:
+            attributes['value'] = value
+        if not enabled:
+            return None
+        i = model.iter_children(current)
+        if i is None:
+            return DefinitionElement(name, attributes)
+        else:
+            definitions = []
+            while i is not None: # iterate over children
+                definition = self.make_def(i)
+                if definition is not None:
+                    definitions.append(definition)
+                i = model.iter_next(i)
+            return DefinitionTree(name, definitions, attributes)
+
+    def make_clear(self):
+        '''Remove all sub-definitions, reset values of level-1 definitions.'''
+        model = self.get_model()
+        self.get_selection().unselect_all()
+        i = model.iter_children(None)
+        while i is not None: # iterate over options
+            row = model[i]
+            row[3] = False
+            row[4] = ''
+            row[5] = False
+            row[6] = {}
+            child = model.iter_children(i)
+            if child is not None: # remove node children
+                while model.remove(child):
+                    pass
+            i = model.iter_next(i)
+
+    def set_up(self, definitions, search):
+        '''Sets up model reading from given definition list. If search is True
+        will substitute alreaty present model data, if it is false will append
+        all the definitions.'''
+
+        def get_value_and_attributes(definition):
+            '''Get column values from definition instance.'''
+            name = definition.get_name()
+            enabled = True
+            try:
+                value = definition.get_attribute('value')
+                value_check = True
+            except KeyError:
+                value = ''
+                value_check = False
+            attributes = definition.get_attributes()
+            attributes.pop('value', None)
+            return (name, enabled, value, value_check, attributes, )
+
+        def add_children(parent, definition):
+            '''Insert sub-definitions of given definition as children of given
+            parent tree iterator.'''
+            if isinstance(definition, DefinitionTree):
+                for d in definition.get_definitions():
+                    name, enabled, value, value_check, attributes = \
+                        get_value_and_attributes(d)
+                    i = self.get_model().append(
+                        parent,
+                        (name, '', False, enabled, value, value_check,
+                         attributes, ))
+                    add_children(i, d)
+
+        model = self.get_model()
+        for definition in definitions:
+            name, enabled, value, value_check, attributes = \
+                get_value_and_attributes(definition)
+            if search:
+                i = model.iter_children(None) # find this option
+                while model[i][0] != name:
+                    i = model.iter_next(i)
+            else:
+                i = model.append(None,
+                                 (name, '', False, False, '', False, {}, ))
+            row = model[i]
+            row[3] = enabled
+            row[4] = value
+            row[5] = value_check
+            row[6] = attributes
+            add_children(i, definition)
diff --git a/myserver/src/GUI/MyServer/GUI/GUIConfig.py b/myserver/src/GUI/MyServer/GUI/GUIConfig.py
new file mode 100644
index 0000000..fc14f6e
--- /dev/null
+++ b/myserver/src/GUI/MyServer/GUI/GUIConfig.py
@@ -0,0 +1,91 @@
+# -*- coding: utf-8 -*-
+'''
+MyServer
+Copyright (C) 2009 Free Software Foundation, Inc.
+This program 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 3 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program.  If not, see <http://www.gnu.org/licenses/>.
+'''
+
+from gobject import TYPE_STRING, TYPE_BOOLEAN
+
+options = {}
+
+# Control
+options['control.enabled'] = ('Set this to yes if you want to enable control protocol.', 'bool', )
+options['control.admin'] = ('Set here the name for the control admin.', 'string', )
+options['control.password'] = ('Define here a good, strong password for the admin.', 'string', )
+
+# FTP
+options['ftp.allow_anonymous'] = ('Allow anonymous login.', 'bool', )
+options['ftp.anonymous_need_pass'] = ('If anonymous allowed, tells if needs pass.', 'bool', )
+options['ftp.allow_asynchronous_cmds'] = ('Allow asynchronous cmds like Abor, Quit, Stat.', 'bool', )
+options['ftp.allow_pipelining'] = ('Allow clients to send more than one command to server in one request.', 'bool', )
+options['ftp.allow_store'] = ('Allow clients to change server files.', 'bool', )
+
+# HTTP
+options['http.use_error_file'] = ('Set this to yes to use personalized error pages from system directory.', 'bool', )
+options['http.dir.css'] = ('Define the folder browsing style.', 'string', )
+options['http.use_home_directory'] = ('Enable home directory per user', 'bool', )
+options['http.home_directory'] = ('Define name for home directory browsing.', 'string', )
+options['http.default_file'] = ('Default filename to send in a directory if the file isn\'t in the path then the directory content is sent.', 'list', )
+
+# Server
+options['server.language'] = ('Choose the language to use for the server.', 'string', )
+options['server.verbosity'] = ('Verbosity on log file.', 'integer', )
+options['server.static_threads'] = ('Number of serving threads always active.', 'integer', )
+options['server.max_threads'] = ('Maximum number of serving threads that the scheduler can create.', 'integer', )
+options['server.buffer_size'] = ('Dimension of every buffer in bytes.', 'integer', )
+options['server.max_connections'] = ('Define the max number of connections to allow to server. 0 means allow infinite connections.', 'integer', )
+options['server.max_accepted_connections'] = ('Define max number of connections to accept.', 'integer', )
+options['server.max_log_size'] = ('Max size of the log file in bytes.', 'integer', )
+options['server.admin'] = ('Administrator e-mail.', 'string', )
+options['server.max_files_cache'] = ('Max cache size for static files.', 'integer', )
+options['server.max_file_cache'] = ('Max cache size for single static file.', 'integer', )
+options['server.min_file_cache'] = ('Min cache size for single static file.', 'integer', )
+options['server.max_servers'] = ('Maximum number of external servers that can be executed.', 'integer', )
+
+# Log color
+options['log_color.info_fg'] = ('Info log foreground colour.', 'string', )
+options['log_color.info_bg'] = ('Info log background colour.', 'string', )
+options['log_color.warning_fg'] = ('Warning log foreground colour.', 'string', )
+options['log_color.warning_bg'] = ('Warning log background colour.', 'string', )
+options['log_color.error_fg'] = ('Error log foreground colour.', 'string', )
+options['log_color.error_bg'] = ('Error log background colour.', 'string', )
+
+# Other
+options['connection.timeout'] = ('Timeout for every client\'s connected to server. If the client doesn\'t request anything for n seconds the connection with the client is closed. Set this to 0 if you don\'t want to use keep-alive-connections', 'integer', )
+options['gzip.threshold'] = ('Define the gzip compression threshold value.', 'integer', )
+options['symlinks.follow'] = ('Define if links should be followed.', 'bool', )
+
+# don't put 'other' or 'unknown' here
+tabs = ['server', 'control', 'ftp', 'http', 'log_color']
+
+# MIME types
+mime_name = 'mime'
+mime_attributes = ['handler', 'self_executed', 'param', 'path']
+mime_lists = ['extensions', 'filters']
+
+# VHosts
+vhost_name = 'name'
+vhost_attributes = ['port', 'protocol', 'doc_root', 'sys_root', 'private_key', 'certificate']
+vhost_lists = [
+    ('ip', (
+            ('ip', TYPE_STRING, '', ),
+            ),
+     ),
+     ('host', (
+            ('host name', TYPE_STRING, '', ),
+            ('use regexp', TYPE_BOOLEAN, False, ),
+            ),
+      ),
+    ]
diff --git a/myserver/src/GUI/MyServer/GUI/MIMEWidgets.py b/myserver/src/GUI/MyServer/GUI/MIMEWidgets.py
new file mode 100644
index 0000000..2f3ed7e
--- /dev/null
+++ b/myserver/src/GUI/MyServer/GUI/MIMEWidgets.py
@@ -0,0 +1,204 @@
+# -*- coding: utf-8 -*-
+'''
+MyServer
+Copyright (C) 2009 Free Software Foundation, Inc.
+This program 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 3 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program.  If not, see <http://www.gnu.org/licenses/>.
+'''
+
+import gtk
+import gobject
+import GUIConfig
+from MyServer.pycontrollib.mimetypes import MIMEType
+
+class MimeTreeView(gtk.TreeView):
+    def __init__(self):
+        gtk.TreeView.__init__(self, gtk.ListStore(
+                gobject.TYPE_STRING, # mime name
+                gobject.TYPE_PYOBJECT, # mime single attributes
+                gobject.TYPE_PYOBJECT, # mime attribute lists
+                gobject.TYPE_PYOBJECT, # mime definitions
+                gobject.TYPE_PYOBJECT, # mime custom
+                gobject.TYPE_PYOBJECT)) # mime custom attrib
+        model = self.get_model()
+        def mime_edited_handler(cell, path, text, data):
+            model = data
+            model[path][0] = text
+        mime_renderer = gtk.CellRendererText()
+        mime_renderer.set_property('editable', True)
+        mime_renderer.connect('edited', mime_edited_handler, model)
+        mime_column = gtk.TreeViewColumn('MIME Type')
+        mime_column.pack_start(mime_renderer)
+        mime_column.add_attribute(mime_renderer, 'text', 0)
+        self.append_column(mime_column)
+
+        self.scroll = gtk.ScrolledWindow()
+        self.scroll.set_policy(gtk.POLICY_AUTOMATIC, gtk.POLICY_AUTOMATIC)
+        self.scroll.set_shadow_type(gtk.SHADOW_OUT)
+        self.scroll.set_border_width(5)
+        self.scroll.add(self)
+
+    def set_up(self, MIME_types):
+        '''Fill model with data provided as list of MIME types.'''
+        model = self.get_model()
+        for mime in MIME_types:
+            attributes = {}
+            for attribute in GUIConfig.mime_attributes:
+                a = getattr(mime, 'get_' + attribute)()
+                if a is not None:
+                    attributes[attribute] = (a, True, )
+            mime_lists = {}
+            for mime_list in GUIConfig.mime_lists:
+                mime_lists[mime_list] = getattr(mime, 'get_' + mime_list)()
+            model.append((getattr(mime, 'get_' + GUIConfig.mime_name)(),
+                          attributes,
+                          mime_lists,
+                          mime.get_definitions(),
+                          mime.custom,
+                          mime.custom_attrib, ))
+
+class MimeTable(gtk.Table):
+    def __init__(self, tree, def_tree, def_table):
+        gtk.Table.__init__(self, len(GUIConfig.mime_attributes) +
+                           3 * len(GUIConfig.mime_lists), 3)
+
+        tree.connect('cursor-changed', self.cursor_changed)
+        self.last_selected = None
+        self.def_tree = def_tree
+        self.def_table = def_table
+
+        self.attributes = {}
+        i = 0
+        for attribute in GUIConfig.mime_attributes:
+            label = gtk.Label(attribute)
+            entry = gtk.Entry()
+            check = gtk.CheckButton()
+            self.attributes[attribute] = (entry, check, )
+            self.attach(label, 0, 1, i, i + 1, yoptions = gtk.FILL)
+            self.attach(entry, 1, 2, i, i + 1, yoptions = gtk.FILL)
+            self.attach(check, 2, 3, i, i + 1, gtk.FILL, gtk.FILL)
+            i += 1
+        self.mime_lists = {}
+        for mime_list in GUIConfig.mime_lists:
+            tree = gtk.TreeView(gtk.ListStore(gobject.TYPE_STRING))
+            tree_model = tree.get_model()
+            def tree_edited_handler(cell, path, text, data):
+                model = data
+                model[path][0] = text
+            tree_renderer = gtk.CellRendererText()
+            tree_renderer.set_property('editable', True)
+            tree_renderer.connect('edited', tree_edited_handler, tree_model)
+            tree_column = gtk.TreeViewColumn(mime_list)
+            tree_column.pack_start(tree_renderer)
+            tree_column.add_attribute(tree_renderer, 'text', 0)
+            tree.append_column(tree_column)
+            tree_scroll = gtk.ScrolledWindow()
+            tree_scroll.set_policy(gtk.POLICY_AUTOMATIC, gtk.POLICY_AUTOMATIC)
+            tree_scroll.set_shadow_type(gtk.SHADOW_OUT)
+            tree_scroll.set_border_width(5)
+            tree_scroll.add(tree)
+
+            def add_to_tree(button, model):
+                model.append(('', ))
+            add_button = gtk.Button('Add')
+            add_button.connect('clicked', add_to_tree, tree_model)
+            def remove_from_tree(button, tree):
+                model, selected = tree.get_selection().get_selected()
+                if selected is not None:
+                    model.remove(selected)
+            remove_button = gtk.Button('Remove')
+            remove_button.connect('clicked', remove_from_tree, tree)
+
+            self.mime_lists[mime_list] = tree_model
+            self.attach(tree_scroll, 1, 2, i, i + 3)
+            self.attach(add_button, 0, 1, i, i + 1, yoptions = gtk.FILL)
+            self.attach(remove_button, 0, 1, i + 1, i + 2, yoptions = gtk.FILL)
+            self.attach(gtk.Label(), 0, 1, i + 2, i + 3)
+            i += 3
+
+    def remove_current(self, tree):
+        '''Remove currently selected MIME type.'''
+        if self.last_selected is not None:
+            model = tree.get_model()
+            model.remove(self.last_selected)
+            self.clear()
+
+    def clear(self):
+        '''Clear input widgets (including connected definition widgets).'''
+        for entry, check in self.attributes.itervalues():
+            entry.set_text('')
+            check.set_active(False)
+        for model in self.mime_lists.itervalues():
+            model.clear()
+        self.def_table.clear()
+        self.def_tree.get_model().clear()
+        self.last_selected = None
+
+    def save_changed(self, tree):
+        '''Save data from input widgets to model.'''
+        if self.last_selected is not None:
+            attributes = {}
+            for attribute in self.attributes:
+                entry, check = self.attributes[attribute]
+                attributes[attribute] = (entry.get_text(), check.get_active(), )
+            mime_lists = {}
+            for mime_list in GUIConfig.mime_lists:
+                container = mime_lists[mime_list] = []
+                model = self.mime_lists[mime_list]
+                i = model.iter_children(None)
+                while i is not None: # iterate over list elements
+                    container.append(model.get_value(i, 0))
+                    i = model.iter_next(i)
+            row = tree.get_model()[self.last_selected]
+            row[1] = attributes
+            row[2] = mime_lists
+            row[3] = self.def_table.make_def(self.def_tree)
+
+    def cursor_changed(self, tree):
+        self.save_changed(tree)
+
+        self.clear()
+
+        self.last_selected = current = tree.get_selection().get_selected()[1]
+        row = tree.get_model()[current]
+        for attribute in row[1]:
+            entry, check = self.attributes[attribute]
+            entry.set_text(row[1][attribute][0])
+            check.set_active(row[1][attribute][1])
+        for mime_list in row[2]:
+            model = self.mime_lists[mime_list]
+            for element in row[2][mime_list]:
+                model.append((element, ))
+        self.def_tree.set_up(row[3], False)
+
+    def make_def(self, tree):
+        '''Export all data as list of MIME types.'''
+        self.save_changed(tree)
+        model = tree.get_model()
+        mimes = []
+        i = model.iter_children(None)
+        while i is not None: # iterate over MIME types
+            row = model[i]
+            mime = MIMEType(row[0], definitions = row[3])
+            mime.custom = row[4]
+            mime.custom_attrib = row[5]
+            for attribute in row[1]:
+                text, enabled = row[1][attribute]
+                if enabled:
+                    getattr(mime, 'set_' + attribute)(text)
+            for mime_list in row[2]:
+                for entry in row[2][mime_list]:
+                    getattr(mime, 'add_' + mime_list[:-1])(entry)
+            mimes.append(mime)
+            i = model.iter_next(i)
+        return mimes
diff --git a/myserver/src/GUI/MyServer/GUI/SecurityWidgets.py b/myserver/src/GUI/MyServer/GUI/SecurityWidgets.py
new file mode 100644
index 0000000..9957fbe
--- /dev/null
+++ b/myserver/src/GUI/MyServer/GUI/SecurityWidgets.py
@@ -0,0 +1,732 @@
+# -*- coding: utf-8 -*-
+'''
+MyServer
+Copyright (C) 2009 Free Software Foundation, Inc.
+This program 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 3 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program.  If not, see <http://www.gnu.org/licenses/>.
+'''
+
+import gtk
+import gobject
+from MyServer.pycontrollib.security import SecurityList, User, Return, \
+    Condition, Permission, SecurityElement
+from MyServer.pycontrollib.definition import DefinitionElement, DefinitionTree
+
+class SecurityTree(gtk.TreeView):
+    def __init__(self, security_table):
+        gtk.TreeView.__init__(self, gtk.TreeStore(
+                gobject.TYPE_STRING, # tag
+                gobject.TYPE_PYOBJECT)) # object
+        renderer = gtk.CellRendererText()
+        column = gtk.TreeViewColumn('tag')
+        column.pack_start(renderer)
+        column.add_attribute(renderer, 'text', 0)
+        self.append_column(column)
+
+        self.security_table = security_table
+
+        self.last_selected = None
+        self.connect('cursor-changed', self.cursor_changed)
+        
+        self.enable_model_drag_source(gtk.gdk.BUTTON1_MASK,
+                                      [('text/plain', 0, 0)],
+                                      gtk.gdk.ACTION_MOVE)
+        self.enable_model_drag_dest([('text/plain', gtk.TARGET_SAME_WIDGET, 0)],
+                                    gtk.gdk.ACTION_MOVE)
+        def get_data(tree, context, selection, target_id, etime):
+            model, selected = tree.get_selection().get_selected()
+            data = model.get_value(selected, 1)
+            selection.set(selection.target, 8, str(data))
+        self.connect('drag_data_get', get_data)
+        def data_received(tree, context, x, y, selection, info, etime):
+            model = tree.get_model()
+            try:
+                data = SecurityElement.from_string(selection.data)
+            except:
+                return # will fall if someone moves SECURITY
+            drop_info = tree.get_dest_row_at_pos(x, y)
+            if drop_info:
+                path, position = drop_info
+                it = model.get_iter(path)
+                if position in [gtk.TREE_VIEW_DROP_BEFORE,
+                                gtk.TREE_VIEW_DROP_AFTER]:
+                    parent_tag = model.get_value(model.iter_parent(it), 0)
+                else:
+                    parent_tag = model.get_value(it, 0)
+                # limit places where rows can be dropped
+                if not ((data.tag == 'DEFINE element' and
+                         parent_tag == 'DEFINE tree') or
+                        parent_tag in ['SECURITY', 'CONDITION']):
+                    return
+                if position == gtk.TREE_VIEW_DROP_BEFORE:
+                    model.insert_before(None, it, (data.tag, data, ))
+                elif position == gtk.TREE_VIEW_DROP_AFTER:
+                    model.insert_after(None, it, (data.tag, data, ))
+                else:
+                    model.append(it, (data.tag, data, ))
+            else:
+                return # drop on widget but not on any row
+            if context.action == gtk.gdk.ACTION_MOVE:
+                context.finish(True, True, etime)
+        self.connect('drag_data_received', data_received)
+
+        self.scroll = gtk.ScrolledWindow()
+        self.scroll.set_policy(gtk.POLICY_AUTOMATIC, gtk.POLICY_AUTOMATIC)
+        self.scroll.set_shadow_type(gtk.SHADOW_OUT)
+        self.scroll.set_border_width(5)
+        self.scroll.add(self)
+
+    def clear(self):
+        self.get_model().clear()
+        self.last_selected = None
+        self.get_model().append(None, ('SECURITY', SecurityList(), ))
+        self.security_table.empty_table.security_check.set_active(False)
+        self.security_table.switch_table('SECURITY')
+
+    def set_up(self, security_list):
+        def add_from_definition_tree(parent, model, definition):
+            for element in definition.get_definitions():
+                x = model.append(parent, (element.tag, element, ))
+                if element.tag == 'DEFINE tree':
+                    add_from_definition_tree(x, model, element)
+        def add_from_condition(parent, model, condition):
+            for element in condition.get_sub_elements():
+                x = model.append(parent, (element.tag, element, ))
+                if element.tag == 'CONDITION':
+                    add_from_condition(x, model, element)
+        self.security_table.empty_table.security_check.set_active(True)
+        self.security_table.switch_table('SECURITY')
+        model = self.get_model()
+        self.last_selected = None
+        model.clear()
+        parent = model.append(None, ('SECURITY', security_list))
+        for element in security_list.get_elements():
+            x = model.append(parent, (element.tag, element, ))
+            if element.tag == 'CONDITION':
+                add_from_condition(x, model, element)
+            elif element.tag == 'DEFINE tree':
+                add_from_definition_tree(x, model, element)
+
+    def save(self):
+        if self.last_selected is None:
+            return
+        model = self.get_model()
+        row = model[self.last_selected]
+        tag = row[0]
+        data = row[1]
+        if tag == 'USER':
+            table = self.security_table.user_table
+            if table.name_check.get_active():
+                data.set_name(table.name_entry.get_text())
+            else:
+                data.set_name(None)
+            if table.password_check.get_active():
+                data.set_password(table.password_entry.get_text())
+            else:
+                data.set_password(None)
+            combo = table.read_combo
+            value = combo.get_model()[combo.get_active()][0]
+            data.set_read(value == 'Yes' if value != 'empty' else None)
+            combo = table.execute_combo
+            value = combo.get_model()[combo.get_active()][0]
+            data.set_execute(value == 'Yes' if value != 'empty' else None)
+            combo = table.browse_combo
+            value = combo.get_model()[combo.get_active()][0]
+            data.set_browse(value == 'Yes'if value != 'empty' else None)
+            combo = table.delete_combo
+            value = combo.get_model()[combo.get_active()][0]
+            data.set_delete(value == 'Yes' if value != 'empty' else None)
+            combo = table.write_combo
+            value = combo.get_model()[combo.get_active()][0]
+            data.set_write(value == 'Yes' if value != 'empty' else None)
+        elif tag == 'CONDITION':
+            table = self.security_table.condition_table
+            if table.name_check.get_active():
+                data.set_name(table.name_entry.get_text())
+            else:
+                data.set_name(None)
+            if table.value_check.get_active():
+                data.set_value(table.value_entry.get_text())
+            else:
+                data.set_value(None)
+            combo = table.regex_combo
+            value = combo.get_model()[combo.get_active()][0]
+            data.set_regex(value == 'Yes' if value != 'empty' else None)
+            combo = table.reverse_combo
+            value = combo.get_model()[combo.get_active()][0]
+            data.set_reverse(value == 'Yes' if value != 'empty' else None)
+        elif tag == 'PERMISSION':
+            table = self.security_table.permission_table
+            combo = table.read_combo
+            value = combo.get_model()[combo.get_active()][0]
+            data.set_read(value == 'Yes' if value != 'empty' else None)
+            combo = table.execute_combo
+            value = combo.get_model()[combo.get_active()][0]
+            data.set_execute(value == 'Yes' if value != 'empty' else None)
+            combo = table.browse_combo
+            value = combo.get_model()[combo.get_active()][0]
+            data.set_browse(value == 'Yes'if value != 'empty' else None)
+            combo = table.delete_combo
+            value = combo.get_model()[combo.get_active()][0]
+            data.set_delete(value == 'Yes' if value != 'empty' else None)
+            combo = table.write_combo
+            value = combo.get_model()[combo.get_active()][0]
+            data.set_write(value == 'Yes' if value != 'empty' else None)
+        elif tag == 'RETURN':
+            table = self.security_table.return_table
+            combo = table.value_combo
+            value = combo.get_model()[combo.get_active()][0]
+            data.set_value(value if value != 'empty' else None)
+        elif tag == 'DEFINE element' or tag == 'DEFINE tree':
+            table = self.security_table.definition_table
+            if table.name_check.get_active():
+                data.set_name(table.name_entry.get_text())
+            else:
+                data.set_name(None)
+            variables = []
+            for variable in data.get_attributes():
+                variables.append(variable)
+            for variable in variables:
+                data.remove_attribute(variable)
+            model = table.attribute_tree.get_model()
+            i = model.iter_children(None)
+            while i is not None: # iterate over attributes
+                data.set_attribute(
+                    model.get_value(i, 0),
+                    model.get_value(i, 1))
+                i = model.iter_next(i)
+            if tag == 'DEFINE element':
+                if table.value_check.get_active():
+                    data.set_attribute('value', table.value_entry.get_text())
+
+    def update_gui(self, tag, data):
+        if tag == 'USER':
+            table = self.security_table.user_table
+            if data.get_name() is None:
+                table.name_check.set_active(False)
+                table.name_entry.set_text('')
+            else:
+                table.name_check.set_active(True)
+                table.name_entry.set_text(data.get_name())
+            if data.get_password() is None:
+                table.password_check.set_active(False)
+                table.password_entry.set_text('')
+            else:
+                table.password_check.set_active(True)
+                table.password_entry.set_text(data.get_password())
+            combo = table.read_combo
+            value =  2 if data.get_read() is None else int(not data.get_read())
+            combo.set_active(value)
+            combo = table.execute_combo
+            value =  2 if data.get_execute() is None else int(not data.get_execute())
+            combo.set_active(value)
+            combo = table.browse_combo
+            value =  2 if data.get_browse() is None else int(not data.get_browse())
+            combo.set_active(value)
+            combo = table.delete_combo
+            value =  2 if data.get_delete() is None else int(not data.get_delete())
+            combo.set_active(value)
+            combo = table.write_combo
+            value =  2 if data.get_write() is None else int(not data.get_write())
+            combo.set_active(value)
+        elif tag == 'CONDITION':
+            table = self.security_table.condition_table
+            if data.get_name() is None:
+                table.name_check.set_active(False)
+                table.name_entry.set_text('')
+            else:
+                table.name_check.set_active(True)
+                table.name_entry.set_text(data.get_name())
+            if data.get_value() is None:
+                table.value_check.set_active(False)
+                table.value_entry.set_text('')
+            else:
+                table.value_check.set_active(True)
+                table.value_entry.set_text(data.get_value())
+            combo = table.regex_combo
+            value =  2 if data.get_regex() is None else int(not data.get_regex())
+            combo.set_active(value)
+            combo = table.reverse_combo
+            value =  2 if data.get_reverse() is None else int(not data.get_reverse())
+            combo.set_active(value)
+        elif tag == 'PERMISSION':
+            table = self.security_table.permission_table
+            combo = table.read_combo
+            value =  2 if data.get_read() is None else int(not data.get_read())
+            combo.set_active(value)
+            combo = table.execute_combo
+            value =  2 if data.get_execute() is None else int(not data.get_execute())
+            combo.set_active(value)
+            combo = table.browse_combo
+            value =  2 if data.get_browse() is None else int(not data.get_browse())
+            combo.set_active(value)
+            combo = table.delete_combo
+            value =  2 if data.get_delete() is None else int(not data.get_delete())
+            combo.set_active(value)
+            combo = table.write_combo
+            value =  2 if data.get_write() is None else int(not data.get_write())
+            combo.set_active(value)
+        elif tag == 'RETURN':
+            table = self.security_table.return_table
+            combo = table.value_combo
+            value =  2 if data.get_value() is None else int(data.get_value() == 'DENY')
+            combo.set_active(value)
+        elif tag == 'DEFINE element' or tag == 'DEFINE tree':
+            table = self.security_table.definition_table
+            model = table.attribute_tree.get_model()
+            model.clear()
+            for variable, value in data.get_attributes().iteritems():
+                if variable != 'value':
+                    model.append((variable, value, ))
+            if data.get_name() is None:
+                table.name_check.set_active(False)
+                table.name_entry.set_text('')
+            else:
+                table.name_check.set_active(True)
+                table.name_entry.set_text(data.get_name())
+            if tag == 'DEFINE element':
+                try:
+                    table.value_check.set_active(True)
+                    table.value_entry.set_text(data.get_attribute('value'))
+                except KeyError:
+                    table.value_check.set_active(False)
+                    table.value_entry.set_text('')
+
+    def cursor_changed(self, tree):
+        self.save()
+
+        model, selected = tree.get_selection().get_selected()
+        self.last_selected = selected
+        row = model[selected]
+        self.security_table.switch_table(row[0])
+
+        self.update_gui(row[0], row[1])
+
+    def add_sub_element(self, tag):
+        model, selected = self.get_selection().get_selected()
+        if selected is None:
+            return
+        if tag == 'USER':
+            add = User()
+        elif tag == 'RETURN':
+            add = Return()
+        elif tag == 'CONDITION':
+            add = Condition()
+        elif tag == 'PERMISSION':
+            add = Permission()
+        elif tag == 'DEFINE element':
+            add = DefinitionElement()
+        elif tag == 'DEFINE tree':
+            add = DefinitionTree()
+        model.append(selected, (tag, add, ))
+
+    def remove_element(self):
+        model, selected = self.get_selection().get_selected()
+        model.remove(selected)
+        self.last_selected = None
+        self.security_table.switch_table('SECURITY')
+
+    def export(self):
+        def add_definition_tree(parent, i, model):
+            while len(parent.get_definitions()): # remove all children
+                parent.remove_definition(0)
+            i = model.iter_children(i)
+            while i is not None:
+                tag = model.get_value(i, 0)
+                data = model.get_value(i, 1)
+                parent.add_definition(data)
+                if tag == 'DEFINE tree':
+                    add_definition_tree(data, i, model)
+                i = model.iter_next(i)
+        def add_condition(parent, i, model):
+            while len(parent.get_sub_elements()): # remove all children
+                parent.remove_sub_element(0)
+            i = model.iter_children(i)
+            while i is not None:
+                tag = model.get_value(i, 0)
+                data = model.get_value(i, 1)
+                parent.add_sub_element(data)
+                if tag == 'DEFINE tree':
+                    add_definition_tree(data, i, model)
+                elif tag == 'CONDITION':
+                    add_condition(data, i, model)
+                i = model.iter_next(i)
+        self.save()
+        model = self.get_model()
+        i = model.iter_children(None)
+        security = model.get_value(i, 1)
+        while len(security.get_elements()): # remove all children
+            security.remove_element(0)
+        i = model.iter_children(i)
+        while i is not None:
+            tag = model.get_value(i, 0)
+            data = model.get_value(i, 1)
+            security.add_element(data)
+            if tag == 'DEFINE tree':
+                add_definition_tree(data, i, model)
+            elif tag == 'CONDITION':
+                add_condition(data, i, model)
+            i = model.iter_next(i)
+        return security
+
+class UserTable(gtk.Table):
+    def __init__(self, security_tree):
+        gtk.Table.__init__(self, 8, 3)
+
+        def remove_element(button, tree):
+            tree.remove_element()
+        button = gtk.Button('Remove this element')
+        button.connect('clicked', remove_element, security_tree)
+        self.attach(button, 0, 2, 0, 1, yoptions = gtk.FILL)
+
+        self.attach(gtk.Label('name'), 0, 1, 1, 2, gtk.FILL, gtk.FILL)
+        self.name_entry = gtk.Entry()
+        self.attach(self.name_entry, 1, 2, 1, 2, yoptions = gtk.FILL)
+        self.name_check = gtk.CheckButton()
+        self.attach(self.name_check, 2, 3, 1, 2, gtk.FILL, gtk.FILL)
+
+        self.attach(gtk.Label('password'), 0, 1, 2, 3, gtk.FILL, gtk.FILL)
+        self.password_entry = gtk.Entry()
+        self.attach(self.password_entry, 1, 2, 2, 3, yoptions = gtk.FILL)
+        self.password_check = gtk.CheckButton()
+        self.attach(self.password_check, 2, 3, 2, 3, gtk.FILL, gtk.FILL)
+
+        def add_options(combo):
+            combo.append_text('Yes')
+            combo.append_text('No')
+            combo.append_text('empty')
+
+        self.attach(gtk.Label('READ'), 0, 1, 3, 4, gtk.FILL, gtk.FILL)
+        self.read_combo = gtk.combo_box_new_text()
+        add_options(self.read_combo)
+        self.attach(self.read_combo, 1, 2, 3, 4, yoptions = gtk.FILL)
+
+        self.attach(gtk.Label('EXECUTE'), 0, 1, 4, 5, gtk.FILL, gtk.FILL)
+        self.execute_combo = gtk.combo_box_new_text()
+        add_options(self.execute_combo)
+        self.attach(self.execute_combo, 1, 2, 4, 5, yoptions = gtk.FILL)
+
+        self.attach(gtk.Label('BROWSE'), 0, 1, 5, 6, gtk.FILL, gtk.FILL)
+        self.browse_combo = gtk.combo_box_new_text()
+        add_options(self.browse_combo)
+        self.attach(self.browse_combo, 1, 2, 5, 6, yoptions = gtk.FILL)
+
+        self.attach(gtk.Label('DELETE'), 0, 1, 6, 7, gtk.FILL, gtk.FILL)
+        self.delete_combo = gtk.combo_box_new_text()
+        add_options(self.delete_combo)
+        self.attach(self.delete_combo, 1, 2, 6, 7, yoptions = gtk.FILL)
+
+        self.attach(gtk.Label('WRITE'), 0, 1, 7, 8, gtk.FILL, gtk.FILL)
+        self.write_combo = gtk.combo_box_new_text()
+        add_options(self.write_combo)
+        self.attach(self.write_combo, 1, 2, 7, 8, yoptions = gtk.FILL)
+
+class ConditionTable(gtk.Table):
+    def __init__(self, security_tree):
+        gtk.Table.__init__(self, 6, 3)
+
+        def remove_element(button, tree):
+            tree.remove_element()
+        button = gtk.Button('Remove this element')
+        button.connect('clicked', remove_element, security_tree)
+        self.attach(button, 0, 2, 0, 1, yoptions = gtk.FILL)
+
+        self.attach(gtk.Label('name'), 0, 1, 1, 2, gtk.FILL, gtk.FILL)
+        self.name_entry = gtk.Entry()
+        self.attach(self.name_entry, 1, 2, 1, 2, yoptions = gtk.FILL)
+        self.name_check = gtk.CheckButton()
+        self.attach(self.name_check, 2, 3, 1, 2, gtk.FILL, gtk.FILL)
+
+        self.attach(gtk.Label('value'), 0, 1, 2, 3, gtk.FILL, gtk.FILL)
+        self.value_entry = gtk.Entry()
+        self.attach(self.value_entry, 1, 2, 2, 3, yoptions = gtk.FILL)
+        self.value_check = gtk.CheckButton()
+        self.attach(self.value_check, 2, 3, 2, 3, gtk.FILL, gtk.FILL)
+
+        def add_options(combo):
+            combo.append_text('Yes')
+            combo.append_text('No')
+            combo.append_text('empty')
+
+        self.attach(gtk.Label('regex'), 0, 1, 3, 4, gtk.FILL, gtk.FILL)
+        self.regex_combo = gtk.combo_box_new_text()
+        add_options(self.regex_combo)
+        self.attach(self.regex_combo, 1, 2, 3, 4, yoptions = gtk.FILL)
+
+        self.attach(gtk.Label('reverse'), 0, 1, 4, 5, gtk.FILL, gtk.FILL)
+        self.reverse_combo = gtk.combo_box_new_text()
+        add_options(self.reverse_combo)
+        self.attach(self.reverse_combo, 1, 2, 4, 5, yoptions = gtk.FILL)
+
+        def add_sub_element(button, combo, tree):
+            tag = combo.get_model()[combo.get_active()][0]
+            tree.add_sub_element(tag)
+        self.add_sub_element_button = gtk.Button('Add sub-element')
+        self.attach(self.add_sub_element_button, 0, 1, 5, 6, gtk.FILL, gtk.FILL)
+        self.add_sub_element_combo = gtk.combo_box_new_text()
+        self.add_sub_element_combo.append_text('USER')
+        self.add_sub_element_combo.append_text('CONDITION')
+        self.add_sub_element_combo.append_text('PERMISSION')
+        self.add_sub_element_combo.append_text('RETURN')
+        self.add_sub_element_combo.append_text('DEFINE element')
+        self.add_sub_element_combo.append_text('DEFINE tree')
+        self.add_sub_element_combo.set_active(0)
+        self.attach(self.add_sub_element_combo, 1, 2, 5, 6, gtk.FILL, gtk.FILL)
+        self.add_sub_element_button.connect('clicked', add_sub_element,
+                                            self.add_sub_element_combo,
+                                            security_tree)
+
+class PermissionTable(gtk.Table):
+    def __init__(self, security_tree):
+        gtk.Table.__init__(self, 6, 2)
+
+        def remove_element(button, tree):
+            tree.remove_element()
+        button = gtk.Button('Remove this element')
+        button.connect('clicked', remove_element, security_tree)
+        self.attach(button, 0, 2, 0, 1, yoptions = gtk.FILL)
+
+        def add_options(combo):
+            combo.append_text('Yes')
+            combo.append_text('No')
+            combo.append_text('empty')
+
+        self.attach(gtk.Label('READ'), 0, 1, 1, 2, gtk.FILL, gtk.FILL)
+        self.read_combo = gtk.combo_box_new_text()
+        add_options(self.read_combo)
+        self.attach(self.read_combo, 1, 2, 1, 2, yoptions = gtk.FILL)
+
+        self.attach(gtk.Label('EXECUTE'), 0, 1, 2, 3, gtk.FILL, gtk.FILL)
+        self.execute_combo = gtk.combo_box_new_text()
+        add_options(self.execute_combo)
+        self.attach(self.execute_combo, 1, 2, 2, 3, yoptions = gtk.FILL)
+
+        self.attach(gtk.Label('BROWSE'), 0, 1, 3, 4, gtk.FILL, gtk.FILL)
+        self.browse_combo = gtk.combo_box_new_text()
+        add_options(self.browse_combo)
+        self.attach(self.browse_combo, 1, 2, 3, 4, yoptions = gtk.FILL)
+
+        self.attach(gtk.Label('DELETE'), 0, 1, 4, 5, gtk.FILL, gtk.FILL)
+        self.delete_combo = gtk.combo_box_new_text()
+        add_options(self.delete_combo)
+        self.attach(self.delete_combo, 1, 2, 4, 5, yoptions = gtk.FILL)
+
+        self.attach(gtk.Label('WRITE'), 0, 1, 5, 6, gtk.FILL, gtk.FILL)
+        self.write_combo = gtk.combo_box_new_text()
+        add_options(self.write_combo)
+        self.attach(self.write_combo, 1, 2, 5, 6, yoptions = gtk.FILL)
+
+class ReturnTable(gtk.Table):
+    def __init__(self, security_tree):
+        gtk.Table.__init__(self, 2, 2)
+
+        def remove_element(button, tree):
+            tree.remove_element()
+        button = gtk.Button('Remove this element')
+        button.connect('clicked', remove_element, security_tree)
+        self.attach(button, 0, 2, 0, 1, yoptions = gtk.FILL)
+
+        self.attach(gtk.Label('value'), 0, 1, 1, 2, gtk.FILL, gtk.FILL)
+        self.value_combo = gtk.combo_box_new_text()
+        self.value_combo.append_text('ALLOW')
+        self.value_combo.append_text('DENY')
+        self.value_combo.append_text('empty')
+        self.attach(self.value_combo, 1, 2, 1, 2, yoptions = gtk.FILL)
+
+class DefinitionTable(gtk.Table):
+    def __init__(self, security_tree):
+        gtk.Table.__init__(self, 7, 3)
+
+        def remove_element(button, tree):
+            tree.remove_element()
+        button = gtk.Button('Remove this element')
+        button.connect('clicked', remove_element, security_tree)
+        self.attach(button, 0, 2, 0, 1, yoptions = gtk.FILL)
+
+        def add_sub_element(button, combo, tree):
+            tag = combo.get_model()[combo.get_active()][0]
+            tree.add_sub_element(tag)
+        self.add_sub_element_button = gtk.Button('Add sub-element')
+        self.attach(self.add_sub_element_button, 0, 1, 1, 2, gtk.FILL, gtk.FILL)
+        self.add_sub_element_combo = gtk.combo_box_new_text()
+        self.add_sub_element_combo.append_text('DEFINE element')
+        self.add_sub_element_combo.append_text('DEFINE tree')
+        self.add_sub_element_combo.set_active(0)
+        self.attach(self.add_sub_element_combo, 1, 2, 1, 2, gtk.FILL, gtk.FILL)
+        self.add_sub_element_button.connect('clicked', add_sub_element,
+                                            self.add_sub_element_combo,
+                                            security_tree)
+
+        self.attach(gtk.Label('name'), 0, 1, 2, 3, gtk.FILL, gtk.FILL)
+        self.name_entry = gtk.Entry()
+        self.attach(self.name_entry, 1, 2, 2, 3, yoptions = gtk.FILL)
+        self.name_check = gtk.CheckButton()
+        self.attach(self.name_check, 2, 3, 2, 3, gtk.FILL, gtk.FILL)
+
+        self.value_label = gtk.Label('value')
+        self.attach(self.value_label, 0, 1, 3, 4, gtk.FILL, gtk.FILL)
+        self.value_entry = gtk.Entry()
+        self.attach(self.value_entry, 1, 2, 3, 4, yoptions = gtk.FILL)
+        self.value_check = gtk.CheckButton()
+        self.attach(self.value_check, 2, 3, 3, 4, gtk.FILL, gtk.FILL)
+
+        self.attribute_tree = gtk.TreeView(gtk.ListStore(
+                gobject.TYPE_STRING, # variable
+                gobject.TYPE_STRING)) # value
+        model = self.attribute_tree.get_model()
+        def edited_handler(cell, path, text, data):
+            model, col = data
+            model[path][col] = text
+        renderer = gtk.CellRendererText()
+        renderer.set_property('editable', True)
+        renderer.connect('edited', edited_handler, (model, 0, ))
+        column = gtk.TreeViewColumn('variable')
+        column.pack_start(renderer)
+        column.add_attribute(renderer, 'text', 0)
+        self.attribute_tree.append_column(column)
+        renderer = gtk.CellRendererText()
+        renderer.set_property('editable', True)
+        renderer.connect('edited', edited_handler, (model, 1, ))
+        column = gtk.TreeViewColumn('value')
+        column.pack_start(renderer)
+        column.add_attribute(renderer, 'text', 1)
+        self.attribute_tree.append_column(column)
+        scroll = gtk.ScrolledWindow()
+        scroll.set_policy(gtk.POLICY_AUTOMATIC, gtk.POLICY_AUTOMATIC)
+        scroll.set_shadow_type(gtk.SHADOW_OUT)
+        scroll.set_border_width(5)
+        scroll.add(self.attribute_tree)
+        self.attach(scroll, 0, 2, 6, 7)
+
+        def add_attribute(button, model):
+            model.append(('', '', ))
+        add_button = gtk.Button('add')
+        add_button.connect('clicked', add_attribute, model)
+        self.attach(add_button, 0, 2, 4, 5, gtk.FILL, gtk.FILL)
+
+        def remove_attribute(button, tree):
+            model, selected = tree.get_selection().get_selected()
+            if selected is not None:
+                model.remove(selected)
+        remove_button = gtk.Button('remove')
+        remove_button.connect('clicked', remove_attribute, self.attribute_tree)
+        self.attach(remove_button, 0, 2, 5, 6, gtk.FILL, gtk.FILL)
+
+    def set_tree(self, tree):
+        if tree:
+            self.add_sub_element_button.show()
+            self.add_sub_element_combo.show()
+            self.value_label.hide()
+            self.value_entry.hide()
+            self.value_check.hide()
+        else:
+            self.add_sub_element_button.hide()
+            self.add_sub_element_combo.hide()
+            self.value_label.show()
+            self.value_entry.show()
+            self.value_check.show()
+
+class EmptyTable(gtk.Table):
+    def __init__(self, security_tree):
+        gtk.Table.__init__(self, 2, 2)
+
+        self.attach(gtk.Label('Use security file'), 0, 1, 0, 1, gtk.FILL, gtk.FILL)
+        self.security_check = gtk.CheckButton()
+        self.attach(self.security_check, 1, 2, 0, 1, yoptions = gtk.FILL)
+
+        def add_sub_element(button, combo, tree):
+            tag = combo.get_model()[combo.get_active()][0]
+            tree.add_sub_element(tag)
+        self.add_sub_element_button = gtk.Button('Add sub-element')
+        self.attach(self.add_sub_element_button, 0, 1, 1, 2, gtk.FILL, gtk.FILL)
+        self.add_sub_element_combo = gtk.combo_box_new_text()
+        self.add_sub_element_combo.append_text('USER')
+        self.add_sub_element_combo.append_text('CONDITION')
+        self.add_sub_element_combo.append_text('PERMISSION')
+        self.add_sub_element_combo.append_text('RETURN')
+        self.add_sub_element_combo.append_text('DEFINE element')
+        self.add_sub_element_combo.append_text('DEFINE tree')
+        self.add_sub_element_combo.set_active(0)
+        self.attach(self.add_sub_element_combo, 1, 2, 1, 2, gtk.FILL, gtk.FILL)
+        self.add_sub_element_button.connect('clicked', add_sub_element,
+                                            self.add_sub_element_combo,
+                                            security_tree)
+
+class SecurityTable(gtk.Table):
+    def __init__(self):
+        gtk.Table.__init__(self, 1, 2)
+
+        self.security_tree = SecurityTree(self)
+
+        self.empty_table = EmptyTable(self.security_tree)
+        self.user_table = UserTable(self.security_tree)
+        self.condition_table = ConditionTable(self.security_tree)
+        self.permission_table = PermissionTable(self.security_tree)
+        self.return_table = ReturnTable(self.security_tree)
+        self.definition_table = DefinitionTable(self.security_tree)
+        self.table_notebook = gtk.Notebook()
+        self.table_notebook.append_page(self.empty_table)
+        self.table_notebook.append_page(self.user_table)
+        self.table_notebook.append_page(self.condition_table)
+        self.table_notebook.append_page(self.permission_table)
+        self.table_notebook.append_page(self.return_table)
+        self.table_notebook.append_page(self.definition_table)
+        self.table_notebook.set_show_tabs(False)
+
+        self.attach(self.security_tree.scroll, 0, 1, 0, 1)
+        self.attach(self.table_notebook, 1, 2, 0, 1, gtk.FILL)
+
+    def read_from_file(self, browser):
+        self.switch_table('SECURITY')
+        self.security_tree.clear()
+        try:
+            security = SecurityList.from_string(
+                browser.get_file('security.xml'))
+            self.security_tree.set_up(security)
+        except:
+            self.security_tree.clear()
+
+    def write_to_file(self, browser):
+        if self.empty_table.security_check.get_active():
+            security = self.security_tree.export()
+            browser.put_file('security.xml', str(security))
+        else:
+            try:
+                browser.remove_file('security.xml')
+            except OSError: # file does not exist
+                pass
+
+    def switch_table(self, tag):
+        if tag == 'SECURITY':
+            self.current_table = self.empty_table
+            self.table_notebook.set_current_page(0)
+        elif tag == 'USER':
+            self.current_table = self.user_table
+            self.table_notebook.set_current_page(1)
+        elif tag == 'CONDITION':
+            self.current_table = self.condition_table
+            self.table_notebook.set_current_page(2)
+        elif tag == 'PERMISSION':
+            self.current_table = self.permission_table
+            self.table_notebook.set_current_page(3)
+        elif tag == 'RETURN':
+            self.current_table = self.return_table
+            self.table_notebook.set_current_page(4)
+        elif tag == 'DEFINE element':
+            self.current_table = self.definition_table
+            self.definition_table.set_tree(False)
+            self.table_notebook.set_current_page(5)
+        elif tag == 'DEFINE tree':
+            self.current_table = self.definition_table
+            self.definition_table.set_tree(True)
+            self.table_notebook.set_current_page(5)
diff --git a/myserver/src/GUI/MyServer/GUI/VHostWidgets.py b/myserver/src/GUI/MyServer/GUI/VHostWidgets.py
new file mode 100644
index 0000000..165b1df
--- /dev/null
+++ b/myserver/src/GUI/MyServer/GUI/VHostWidgets.py
@@ -0,0 +1,515 @@
+# -*- coding: utf-8 -*-
+'''
+MyServer
+Copyright (C) 2009 Free Software Foundation, Inc.
+This program 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 3 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program.  If not, see <http://www.gnu.org/licenses/>.
+'''
+
+import gtk
+import gobject
+import GUIConfig
+from MyServer.pycontrollib.log import Log, Stream
+from MyServer.pycontrollib.vhost import VHost
+
+class FilterTreeView(gtk.TreeView):
+    def __init__(self):
+        gtk.TreeView.__init__(self, gtk.ListStore(
+                gobject.TYPE_STRING))
+        model = self.get_model()
+        def edited_handler(cell, path, text, model):
+            model[path][0] = text
+        renderer = gtk.CellRendererText()
+        renderer.set_property('editable', True)
+        renderer.connect('edited', edited_handler, model)
+        column = gtk.TreeViewColumn('Filter')
+        column.pack_start(renderer)
+        column.add_attribute(renderer, 'text', 0)
+        self.append_column(column)
+        self.scroll = gtk.ScrolledWindow()
+        self.scroll.set_policy(gtk.POLICY_AUTOMATIC, gtk.POLICY_AUTOMATIC)
+        self.scroll.set_shadow_type(gtk.SHADOW_OUT)
+        self.scroll.set_border_width(5)
+        self.scroll.add(self)
+
+class StreamTreeView(gtk.TreeView):
+    def __init__(self, filter_tree, cycle, cycle_gzip):
+        gtk.TreeView.__init__(self, gtk.ListStore(
+                gobject.TYPE_STRING, # stream location
+                gobject.TYPE_PYOBJECT, # list of filters
+                gobject.TYPE_PYOBJECT, # (cycle, cycle active, )
+                gobject.TYPE_BOOLEAN, # cycle_gzip
+                gobject.TYPE_PYOBJECT, # stream custom
+                gobject.TYPE_PYOBJECT)) # stream custom attrib
+        self.cycle = cycle
+        self.cycle_gzip = cycle_gzip
+        self.filter_model = filter_tree.get_model()
+        model = self.get_model()
+        def edited_handler(cell, path, text, model):
+            model[path][0] = text
+        renderer = gtk.CellRendererText()
+        renderer.set_property('editable', True)
+        renderer.connect('edited', edited_handler, model)
+        column = gtk.TreeViewColumn('Stream')
+        column.pack_start(renderer)
+        column.add_attribute(renderer, 'text', 0)
+        self.append_column(column)
+
+        self.scroll = gtk.ScrolledWindow()
+        self.scroll.set_policy(gtk.POLICY_AUTOMATIC, gtk.POLICY_AUTOMATIC)
+        self.scroll.set_shadow_type(gtk.SHADOW_OUT)
+        self.scroll.set_border_width(5)
+        self.scroll.add(self)
+
+        self.last_selected = None
+        self.connect('cursor-changed', self.cursor_changed)
+
+    def clear(self):
+        self.filter_model.clear()
+        self.last_selected = None
+        entry, check = self.cycle
+        entry.set_value(0)
+        check.set_active(False)
+        self.cycle_gzip.set_active(False)
+
+    def save_changed(self):
+        model = self.filter_model
+        if self.last_selected is not None:
+            filters = []
+            i = model.iter_children(None)
+            while i is not None: # iterate over filters
+                filters.append(model[i][0])
+                i = model.iter_next(i)
+            row = self.get_model()[self.last_selected]
+            row[1] = filters
+            entry, check = self.cycle
+            row[2] = (entry.get_value(), check.get_active(), )
+            row[3] = self.cycle_gzip.get_active()
+
+    def cursor_changed(self, tree):
+        self.save_changed()
+
+        self.clear()
+        model = self.filter_model
+
+        self.last_selected = current = \
+            tree.get_selection().get_selected()[1]
+        row = tree.get_model()[current]
+        for element in row[1]: # add all filters
+            model.append((element, ))
+        entry, check = self.cycle
+        entry.set_value(row[2][0])
+        check.set_active(row[2][1])
+        self.cycle_gzip.set_active(row[3])
+
+class LogTreeView(gtk.TreeView):
+    def __init__(self, stream_tree, log_type):
+        gtk.TreeView.__init__(self, gtk.ListStore(
+                gobject.TYPE_STRING, # log name
+                gobject.TYPE_PYOBJECT, # list of streams
+                gobject.TYPE_PYOBJECT, # (log_type, log_type enabled, )
+                gobject.TYPE_PYOBJECT, # log custom
+                gobject.TYPE_PYOBJECT)) # log custom attrib
+        self.stream_tree = stream_tree
+        self.log_type = log_type
+        model = self.get_model()
+        def edited_handler(cell, path, text, model):
+            model[path][0] = text
+        renderer = gtk.CellRendererText()
+        renderer.set_property('editable', True)
+        renderer.connect('edited', edited_handler, model)
+        column = gtk.TreeViewColumn('Log')
+        column.pack_start(renderer)
+        column.add_attribute(renderer, 'text', 0)
+        self.append_column(column)
+        self.scroll = gtk.ScrolledWindow()
+        self.scroll.set_policy(gtk.POLICY_AUTOMATIC, gtk.POLICY_AUTOMATIC)
+        self.scroll.set_shadow_type(gtk.SHADOW_OUT)
+        self.scroll.set_border_width(5)
+        self.scroll.add(self)
+
+        self.last_selected = None
+        self.connect('cursor-changed', self.cursor_changed)
+
+    def clear(self):
+        self.stream_tree.clear()
+        self.last_selected = None
+        self.stream_tree.get_model().clear()
+        entry, check = self.log_type
+        entry.set_text('')
+        check.set_active(False)
+
+    def save_changed(self):
+        self.stream_tree.save_changed()
+        model = self.stream_tree.get_model()
+        if self.last_selected is not None:
+            streams = []
+            i = model.iter_children(None)
+            while i is not None: # iterate over streams
+                row = model[i]
+                streams.append((row[0], row[1], row[2], row[3], row[4], row[5], ))
+                i = model.iter_next(i)
+            row = self.get_model()[self.last_selected]
+            row[1] = streams
+            entry, check = self.log_type
+            row[2] = (entry.get_text(), check.get_active(), )
+
+    def cursor_changed(self, tree):
+        self.save_changed()
+
+        self.clear()
+        model = self.stream_tree.get_model()
+
+        self.last_selected = current = \
+            tree.get_selection().get_selected()[1]
+        row = tree.get_model()[current]
+        for stream in row[1]:
+            model.append(stream)
+        entry, check = self.log_type
+        entry.set_text(row[2][0])
+        check.set_active(row[2][1])
+
+    def get_logs(self):
+        self.save_changed()
+        model = self.get_model()
+        logs = []
+        i = model.iter_children(None)
+        while i is not None: # iterate over logs
+            row = model[i]
+            logs.append((row[0], row[1], row[2], row[3], row[4], ))
+            i = model.iter_next(i)
+        return logs
+
+    def set_logs(self, logs):
+        self.clear()
+        self.last_selected = None
+        model = self.get_model()
+        model.clear()
+        for log in logs:
+            model.append((log[0], log[1], log[2], log[3], log[4], ))
+
+class VHostTreeView(gtk.TreeView):
+    def __init__(self):
+        gtk.TreeView.__init__(self, gtk.ListStore(
+                gobject.TYPE_STRING, # vhost name
+                gobject.TYPE_PYOBJECT, # vhost single attributes
+                gobject.TYPE_PYOBJECT, # vhost attribute lists
+                gobject.TYPE_PYOBJECT, # vhost logs
+                gobject.TYPE_PYOBJECT, # vhost custom
+                gobject.TYPE_PYOBJECT)) # vhost custom attrib
+        model = self.get_model()
+        def vhost_edited_handler(cell, path, text, data):
+            model = data
+            model[path][0] = text
+        vhost_renderer = gtk.CellRendererText()
+        vhost_renderer.set_property('editable', True)
+        vhost_renderer.connect('edited', vhost_edited_handler, model)
+        vhost_column = gtk.TreeViewColumn('VHost')
+        vhost_column.pack_start(vhost_renderer)
+        vhost_column.add_attribute(vhost_renderer, 'text', 0)
+        self.append_column(vhost_column)
+
+        self.scroll = gtk.ScrolledWindow()
+        self.scroll.set_policy(gtk.POLICY_AUTOMATIC, gtk.POLICY_AUTOMATIC)
+        self.scroll.set_shadow_type(gtk.SHADOW_OUT)
+        self.scroll.set_border_width(5)
+        self.scroll.add(self)
+
+    def set_up(self, vhosts):
+        '''Fill model with data provided as list of Vhosts.'''
+        model = self.get_model()
+        for vhost in vhosts:
+            attributes = {}
+            for attribute in GUIConfig.vhost_attributes:
+                a = getattr(vhost, 'get_' + attribute)()
+                if a is not None:
+                    attributes[attribute] = (str(a), True, )
+            vhost_lists = {}
+            for vhost_list in GUIConfig.vhost_lists:
+                vhost_list = vhost_list[0]
+                l = getattr(vhost, 'get_' + vhost_list)()
+                m = []
+                for element in l:
+                    if isinstance(l, dict):
+                        m.append((element, l[element], ))
+                    else:
+                        m.append((element, ))
+                vhost_lists[vhost_list] = m
+            logs = []
+            for log in vhost.get_logs():
+                streams = []
+                for stream in log.get_streams():
+                    filters = stream.get_filters()
+                    cycle = stream.get_cycle()
+                    cycle_active = cycle is not None
+                    if cycle is None:
+                        cycle = ''
+                    cycle_gzip = stream.get_cycle_gzip()
+                    streams.append((stream.get_location(), filters,
+                                    (cycle, cycle_active, ), cycle_gzip,
+                                    stream.custom, stream.custom_attrib, ))
+                log_type = log.get_type()
+                log_type_enabled = log_type is not None
+                if log_type is None:
+                    log_type = ''
+                logs.append((log.get_log_type(), streams,
+                             (log_type, log_type_enabled, ), log.custom,
+                             log.custom_attrib, ))
+            model.append((getattr(vhost, 'get_' + GUIConfig.vhost_name)(),
+                          attributes,
+                          vhost_lists,
+                          logs,
+                          vhost.custom,
+                          vhost.custom_attrib, ))
+
+class VHostTable(gtk.Table):
+    def __init__(self, tree):
+        gtk.Table.__init__(self, len(GUIConfig.vhost_attributes) +
+                           3 * len(GUIConfig.vhost_lists) + 6, 3)
+
+        tree.connect('cursor-changed', self.cursor_changed)
+        self.last_selected = None
+
+        self.attributes = {}
+        i = 0
+        for attribute in GUIConfig.vhost_attributes: # Add single attributes
+            label = gtk.Label(attribute)
+            entry = gtk.Entry()
+            check = gtk.CheckButton()
+            self.attributes[attribute] = (entry, check, )
+            self.attach(label, 0, 1, i, i + 1, yoptions = gtk.FILL)
+            self.attach(entry, 1, 2, i, i + 1, yoptions = gtk.FILL)
+            self.attach(check, 2, 3, i, i + 1, gtk.FILL, gtk.FILL)
+            i += 1
+
+        self.vhost_lists = {}
+        for vhost_list in GUIConfig.vhost_lists: # Add attribute lists
+            name = vhost_list[0]
+            column_names = []
+            columns = []
+            defaults = []
+            for element in vhost_list[1]:
+                column_names.append(element[0])
+                columns.append(element[1])
+                defaults.append(element[2])
+            tree = gtk.TreeView(gtk.ListStore(*(columns)))
+            tree_model = tree.get_model()
+            def tree_edited_handler(cell, path, text, data):
+                model, col_index = data
+                model[path][col_index] = text
+            col_index = 0
+            for column in column_names:
+                tree_renderer = gtk.CellRendererText()
+                tree_renderer.set_property('editable', True)
+                tree_renderer.connect('edited', tree_edited_handler,
+                                      (tree_model, col_index, ))
+                tree_column = gtk.TreeViewColumn(column)
+                tree_column.pack_start(tree_renderer)
+                tree_column.add_attribute(tree_renderer, 'text', col_index)
+                tree.append_column(tree_column)
+                col_index += 1
+            tree_scroll = gtk.ScrolledWindow()
+            tree_scroll.set_policy(gtk.POLICY_AUTOMATIC, gtk.POLICY_AUTOMATIC)
+            tree_scroll.set_shadow_type(gtk.SHADOW_OUT)
+            tree_scroll.set_border_width(5)
+            tree_scroll.add(tree)
+
+            def add_to_tree(button, data):
+                model, defaults = data
+                model.append(defaults)
+            add_button = gtk.Button('Add')
+            add_button.connect('clicked', add_to_tree, (tree_model, defaults, ))
+            def remove_from_tree(button, tree):
+                model, selected = tree.get_selection().get_selected()
+                if selected is not None:
+                    model.remove(selected)
+            remove_button = gtk.Button('Remove')
+            remove_button.connect('clicked', remove_from_tree, tree)
+
+            self.vhost_lists[name] = tree_model
+            self.attach(tree_scroll, 1, 2, i, i + 3)
+            self.attach(add_button, 0, 1, i, i + 1, yoptions = gtk.FILL)
+            self.attach(remove_button, 0, 1, i + 1, i + 2, yoptions = gtk.FILL)
+            self.attach(gtk.Label(), 0, 1, i + 2, i + 3)
+            i += 3
+
+        # Add logs
+        log_type_label = gtk.Label('log type')
+        log_type_entry = gtk.Entry()
+        log_type_check = gtk.CheckButton()
+        self.attach(log_type_label, 0, 1, i + 3, i + 4, yoptions = gtk.FILL)
+        self.attach(log_type_entry, 1, 2, i + 3, i + 4, yoptions = gtk.FILL)
+        self.attach(log_type_check, 2, 3, i + 3, i + 4, gtk.FILL, gtk.FILL)
+
+        cycle_label = gtk.Label('cycle')
+        cycle_entry = gtk.SpinButton(gtk.Adjustment(upper = 2 ** 32,
+                                                    step_incr = 1))
+        cycle_check = gtk.CheckButton()
+        cycle_gzip_label = gtk.Label('cycle gzip')
+        cycle_gzip_check = gtk.CheckButton()
+        self.attach(cycle_label, 0, 1, i + 4, i + 5, yoptions = gtk.FILL)
+        self.attach(cycle_entry, 1, 2, i + 4, i + 5, yoptions = gtk.FILL)
+        self.attach(cycle_check, 2, 3, i + 4, i + 5, gtk.FILL, gtk.FILL)
+        self.attach(cycle_gzip_label, 0, 1, i + 5, i + 6, yoptions = gtk.FILL)
+        self.attach(cycle_gzip_check, 2, 3, i + 5, i + 6, gtk.FILL, gtk.FILL)
+
+        filter_tree = FilterTreeView()
+        stream_tree = StreamTreeView(filter_tree,
+                                     (cycle_entry, cycle_check, ),
+                                     cycle_gzip_check)
+        self.log_tree = LogTreeView(stream_tree, (log_type_entry,
+                                                  log_type_check, ))
+        self.log_model = self.log_tree.get_model()
+
+        def add_stream(button, model):
+            model.append(('', [], (0, False, ), False, [], {}, ))
+        add_stream_button = gtk.Button('Add stream')
+        add_stream_button.connect(
+            'clicked', add_stream, stream_tree.get_model())
+        def add_filter(button, model):
+            model.append(('', ))
+        add_filter_button = gtk.Button('Add filter')
+        add_filter_button.connect(
+            'clicked', add_filter, filter_tree.get_model())
+
+        def remove_selected(button, tree):
+            model, selected = tree.get_selection().get_selected()
+            if selected is not None:
+                model.remove(selected)
+                tree.last_selected = None
+        remove_stream_button = gtk.Button('Remove stream')
+        remove_stream_button.connect('clicked', remove_selected, stream_tree)
+        remove_filter_button = gtk.Button('Remove filter')
+        remove_filter_button.connect('clicked', remove_selected, filter_tree)
+
+        button_grid = gtk.Table(2, 2)
+        button_grid.attach(add_stream_button, 0, 1, 0, 1)
+        button_grid.attach(add_filter_button, 1, 2, 0, 1)
+        button_grid.attach(remove_stream_button, 0, 1, 1, 2)
+        button_grid.attach(remove_filter_button, 1, 2, 1, 2)
+
+        self.attach(self.log_tree.scroll, 0, 1, i, i + 3)
+        self.attach(button_grid, 1, 2, i, i + 1, yoptions = gtk.FILL)
+        self.attach(stream_tree.scroll, 1, 2, i + 1, i + 2)
+        self.attach(filter_tree.scroll, 1, 2, i + 2, i + 3)
+
+        self.scroll = gtk.ScrolledWindow()
+        self.scroll.set_policy(gtk.POLICY_AUTOMATIC, gtk.POLICY_AUTOMATIC)
+        self.scroll.add_with_viewport(self)
+
+    def add_log(self):
+        '''Add a log to currently selected VHost.'''
+        self.log_model.append(('', [], ('', False, ), [], {}, ))
+
+    def remove_log(self):
+        '''Remove currently selected log.'''
+        if self.log_tree.last_selected is not None:
+            self.log_model.remove(self.log_tree.last_selected)
+            self.log_tree.clear()
+
+    def remove_current(self, tree):
+        '''Remove currently selected VHost.'''
+        if self.last_selected is not None:
+            model = tree.get_model()
+            model.remove(self.last_selected)
+            self.clear()
+
+    def clear(self):
+        '''Clear input widgets.'''
+        for entry, check in self.attributes.itervalues():
+            entry.set_text('')
+            check.set_active(False)
+        for model in self.vhost_lists.itervalues():
+            model.clear()
+        self.log_tree.clear()
+        self.log_tree.get_model().clear()
+        self.last_selected = None
+
+    def save_changed(self, tree):
+        '''Save data from input widgets to model.'''
+        if self.last_selected is not None:
+            attributes = {}
+            for attribute in self.attributes:
+                entry, check = self.attributes[attribute]
+                attributes[attribute] = (entry.get_text(), check.get_active(), )
+            vhost_lists = {}
+            for vhost_list in GUIConfig.vhost_lists:
+                container = vhost_lists[vhost_list[0]] = []
+                model = self.vhost_lists[vhost_list[0]]
+                i = model.iter_children(None)
+                while i is not None: # iterate over list elements
+                    row = []
+                    for counter in xrange(len(vhost_list[1])):
+                        row.append(model[i][counter])
+                    container.append(tuple(row))
+                    i = model.iter_next(i)
+            row = tree.get_model()[self.last_selected]
+            row[1] = attributes
+            row[2] = vhost_lists
+            row[3] = self.log_tree.get_logs()
+
+    def cursor_changed(self, tree):
+        self.save_changed(tree)
+
+        self.clear()
+
+        self.last_selected = current = tree.get_selection().get_selected()[1]
+        row = tree.get_model()[current]
+        for attribute in row[1]:
+            entry, check = self.attributes[attribute]
+            entry.set_text(row[1][attribute][0])
+            check.set_active(row[1][attribute][1])
+        for vhost_list in row[2]:
+            model = self.vhost_lists[vhost_list]
+            for element in row[2][vhost_list]:
+                model.append(element)
+        self.log_tree.set_logs(row[3])
+
+    def make_def(self, tree):
+        '''Export all data as list of VHosts.'''
+        self.save_changed(tree)
+        model = tree.get_model()
+        vhosts = []
+        i = model.iter_children(None)
+        while i is not None: # iterate over VHosts
+            row = model[i]
+            logs = []
+            for log in row[3]:
+                streams = []
+                for stream in log[1]:
+                    cycle, enabled = stream[2]
+                    if not enabled:
+                        cycle = None
+                    cycle_gzip = stream[3]
+                    streams.append(Stream(stream[0], cycle, cycle_gzip, stream[1]))
+                    streams[-1].custom = stream[4]
+                    streams[-1].custom_attrib = stream[5]
+                log_type, enabled = log[2]
+                if not enabled:
+                    log_type = None
+                logs.append(Log(log[0], streams, log_type))
+                logs[-1].custom = log[3]
+                logs[-1].custom_attrib = log[4]
+            vhost = VHost(row[0], logs = logs)
+            for attribute in row[1]:
+                text, enabled = row[1][attribute]
+                if enabled:
+                    getattr(vhost, 'set_' + attribute)(text)
+            for vhost_list in row[2]:
+                for entry in row[2][vhost_list]:
+                    getattr(vhost, 'add_' + vhost_list)(*entry)
+            vhost.custom = row[4]
+            vhost.custom_attrib = row[5]
+            vhosts.append(vhost)
+            i = model.iter_next(i)
+        return vhosts
diff --git a/myserver/src/GUI/MyServer/GUI/__init__.py b/myserver/src/GUI/MyServer/GUI/__init__.py
new file mode 100644
index 0000000..8fa2136
--- /dev/null
+++ b/myserver/src/GUI/MyServer/GUI/__init__.py
@@ -0,0 +1,2 @@
+#
+
diff --git a/myserver/src/GUI/MyServer/README b/myserver/src/GUI/MyServer/README
new file mode 100644
index 0000000..6ea5727
--- /dev/null
+++ b/myserver/src/GUI/MyServer/README
@@ -0,0 +1,2 @@
+The py_control_client library implements the client side of the
+CONTROL protocol present in MyServer in the python language.
diff --git a/myserver/src/GUI/MyServer/__init__.py b/myserver/src/GUI/MyServer/__init__.py
new file mode 100644
index 0000000..8fa2136
--- /dev/null
+++ b/myserver/src/GUI/MyServer/__init__.py
@@ -0,0 +1,2 @@
+#
+
diff --git a/myserver/src/GUI/MyServer/pycontrol/__init__.py b/myserver/src/GUI/MyServer/pycontrol/__init__.py
new file mode 100644
index 0000000..8fa2136
--- /dev/null
+++ b/myserver/src/GUI/MyServer/pycontrol/__init__.py
@@ -0,0 +1,2 @@
+#
+
diff --git a/myserver/src/GUI/MyServer/pycontrol/pycontrol.py b/myserver/src/GUI/MyServer/pycontrol/pycontrol.py
new file mode 100644
index 0000000..f5224c3
--- /dev/null
+++ b/myserver/src/GUI/MyServer/pycontrol/pycontrol.py
@@ -0,0 +1,115 @@
+'''
+MyServer
+Copyright (C) 2008, 2009 The MyServer Team
+This program 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 3 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program.  If not, see <http://www.gnu.org/licenses/>.
+'''
+import socket
+import ssl
+import time
+
+error_codes = {'100': 'CONTROL_OK',
+               '200': 'CONTROL_ERROR',
+               '201': 'CONTROL_INTERNAL',
+               '202': 'CONTROL_AUTH',     
+               '203': 'CONTROL_MALFORMED',
+               '204': 'CONTROL_CMD_NOT_FOUND',
+               '205': 'CONTROL_BAD_LEN',
+               '206': 'CONTROL_SERVER_BUSY',
+               '207': 'CONTROL_BAD_VERSION',
+               '208': 'CONTROL_FILE_NOT_FOUND'}
+
+class PyMyServerControl(object):
+    def __init__(self, host, port, login, password):
+        '''Initialize a connection to server:port using login:password as
+        credentials.'''
+
+        self.connectionType = "Keep-Alive"
+
+        self.s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
+        self.s.connect((host, port))
+
+        self.host = host
+        self.port = port
+        self.login = login
+        self.password = password
+        self.sock = ssl.wrap_socket(self.s)
+
+    def send_header(self, command, length, args = ""):
+        '''Build the CONTROL header and send it.'''
+        self.buffer = ""
+        self.response_values = {}
+        self.response_code = None
+        req_header = "/" + command + " CONTROL/1.0 " +args + "\r\n"
+        req_header = req_header + "/AUTH " + self.login +":" + self.password + "\r\n"
+        req_header = req_header + "/LEN " + str (length) + "\r\n"
+        req_header = req_header + "/CONNECTION " + self.connectionType + "\r\n"
+        req_header = req_header + "\r\n"
+
+        self.sock.write(req_header)
+
+    def send(self, data):
+        '''Send additional data after the header.'''
+        self.sock.write(data)
+
+
+    def __readline(self):
+        '''Read a line from the socket.'''
+        while True:
+            self.buffer = self.buffer + self.sock.read(1024)
+            ind = self.buffer.find("\r\n")
+
+            if ind != 1:
+                ret = self.buffer[0:ind]
+                self.buffer = self.buffer[ind+2:len(self.buffer)]
+                return ret
+
+    def available_data(self):
+        '''Returns the number of bytes to be read.'''
+        return int(self.response_values['LEN']) - self.__bytes_read
+
+    def read(self):
+        '''Read data that follows the the response header.'''
+        if len(self.buffer) > 0:
+            self.__bytes_read = self.__bytes_read + len(self.buffer)
+            return self.buffer
+
+        data = self.sock.read(int(self.response_values['LEN']) - self.__bytes_read)
+        self.__bytes_read = self.__bytes_read + len(data)
+
+        return data
+
+    def read_header(self):
+        '''Read the response header.'''
+        self.response_code = self.__readline()[1:4]
+        self.__bytes_read = 0
+
+        while True:
+            line = self.__readline()
+            if len(line) == 0:
+                break
+            ind = line.find(" ")
+
+            if ind == -1:
+                return
+
+            header_name = line[1:ind]
+            value = line[ind+1:len(line)]
+
+            self.response_values[header_name] = value
+
+
+    def close(self):
+        '''Close the socket.'''
+        del self.sock
+        self.s.close()
diff --git a/myserver/src/GUI/MyServer/pycontrollib/__init__.py b/myserver/src/GUI/MyServer/pycontrollib/__init__.py
new file mode 100644
index 0000000..792d600
--- /dev/null
+++ b/myserver/src/GUI/MyServer/pycontrollib/__init__.py
@@ -0,0 +1 @@
+#
diff --git a/myserver/src/GUI/MyServer/pycontrollib/browser.py b/myserver/src/GUI/MyServer/pycontrollib/browser.py
new file mode 100644
index 0000000..82c0456
--- /dev/null
+++ b/myserver/src/GUI/MyServer/pycontrollib/browser.py
@@ -0,0 +1,86 @@
+# -*- coding: utf-8 -*-
+'''
+MyServer
+Copyright (C) 2009 Free Software Foundation, Inc.
+This program 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 3 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program.  If not, see <http://www.gnu.org/licenses/>.
+'''
+
+import os
+
+class FileBrowser():
+    'Abstract file browser class.'
+    def list_dir(self):
+        raise NotImplementedError()
+
+    def list_files(self):
+        raise NotImplementedError()
+    
+    def get_file(self, path):
+        raise NotImplementedError()
+    
+    def put_file(self, path, text):
+        raise NotImplementedError()
+
+    def remove_file(self, path):
+        raise NotImplementedError()
+    
+    def get_path(self):
+        raise NotImplementedError()
+
+    def change_dir(self, path):
+        raise NotImplementedError()
+
+    def show_hidden(self, show):
+        raise NotImplementedError()
+
+class LocalFileBrowser(FileBrowser):
+    'Local file browser class.'
+    def __init__(self, path = os.path.expanduser('~')):
+        self.path = path
+        self.show = False
+
+    def list_dir(self):
+        return ['..'] + sorted(
+            [path for path in os.listdir(self.path) if \
+                 not os.path.isfile(os.path.join(self.path, path)) \
+                and (self.show or not path.startswith('.'))])
+
+    def list_files(self):
+        return ['..'] + sorted(
+            [path for path in os.listdir(self.path) if \
+                 os.path.isfile(os.path.join(self.path, path)) \
+                and (self.show or not path.startswith('.'))])
+
+    def get_file(self, path):
+        with open(os.path.join(self.path, path)) as f:
+            return f.read()
+
+    def put_file(self, path, text):
+        with open(os.path.join(self.path, path), 'w') as f:
+            f.write(text)
+
+    def remove_file(self, path):
+        os.remove(os.path.join(self.path, path))
+
+    def get_path(self):
+        return self.path
+
+    def change_dir(self, path):
+        if path == '..':
+            self.path = os.path.split(self.path)[0]
+        else:
+            self.path = os.path.join(self.path, path)
+
+    def show_hidden(self, show):
+        self.show = show
diff --git a/myserver/src/GUI/MyServer/pycontrollib/config.py b/myserver/src/GUI/MyServer/pycontrollib/config.py
new file mode 100644
index 0000000..cdb5643
--- /dev/null
+++ b/myserver/src/GUI/MyServer/pycontrollib/config.py
@@ -0,0 +1,70 @@
+# -*- coding: utf-8 -*-
+'''
+MyServer
+Copyright (C) 2009 Free Software Foundation, Inc.
+This program 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 3 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program.  If not, see <http://www.gnu.org/licenses/>.
+'''
+
+from lxml import etree
+from definition import Definition, DefinitionList
+
+class MyServerConfig():
+    def __init__(self, definitions = []):
+        self.definitions = DefinitionList(definitions)
+
+    def __eq__(self, other):
+        return isinstance(other, MyServerConfig) and \
+            self.definitions == other.definitions
+
+    def get_definitions(self):
+        '''Get current definitions.'''
+        return self.definitions.get_definitions()
+    
+    def add_definition(self, definition, index = None):
+        '''Append definition, if index is not None insert it at index-th
+        position.'''
+        self.definitions.add_definition(definition, index)
+
+    def get_definition(self, index):
+        '''Get index-th definition.'''
+        return self.definitions.get_definition(index)
+
+    def remove_definition(self, index):
+        '''Remove index-th definition.'''
+        self.definitions.remove_definition(index)
+
+    @staticmethod
+    def from_string(text):
+        '''Factory to produce MyServerConfig by parsing a string.'''
+        return MyServerConfig.from_lxml_element(etree.XML(
+                text, parser = etree.XMLParser(remove_comments = True)))
+
+    @staticmethod
+    def from_lxml_element(root):
+        '''Factory to produce MyServerConfig from lxml.etree.Element object.'''
+        if root.tag != 'MYSERVER':
+            raise AttributeError('Expected MYSERVER tag.')
+        return MyServerConfig(map(Definition.from_lxml_element, list(root)))
+
+    def __str__(self):
+        return etree.tostring(self.to_lxml_element(), pretty_print = True)
+
+    def to_lxml_element(self):
+        '''Convert MyServerConfig to lxml.etree.Element object.'''
+        root = etree.Element('MYSERVER')
+        for definition in self.definitions.get_definitions():
+            root.append(definition.to_lxml_element())
+        for element in self.definitions.custom:
+            root.append(element)
+        return root
diff --git a/myserver/src/GUI/MyServer/pycontrollib/controller.py b/myserver/src/GUI/MyServer/pycontrollib/controller.py
new file mode 100644
index 0000000..64cb7c6
--- /dev/null
+++ b/myserver/src/GUI/MyServer/pycontrollib/controller.py
@@ -0,0 +1,145 @@
+# -*- coding: utf-8 -*-
+'''
+MyServer
+Copyright (C) 2009 Free Software Foundation, Inc.
+This program 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 3 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program.  If not, see <http://www.gnu.org/licenses/>.
+'''
+
+from MyServer.pycontrol.pycontrol import PyMyServerControl, error_codes
+from mimetypes import MIMETypes
+from vhost import VHosts
+from config import MyServerConfig
+
+class ServerError(Exception):
+    '''Raised when MyServer return code doesn't mean success.'''
+    pass
+
+class BasicController():
+    def __init__(self, host, port, username, password):
+        self.connection = None
+        self.host = host
+        self.port = int(port)
+        self.username = username
+        self.password = password
+
+    def __check_return_code(self):
+        return_code = self.connection.response_code
+        if error_codes.get(return_code, '') != 'CONTROL_OK':
+            raise ServerError('MyServer returned {0}: {1}'.format(
+                    return_code, error_codes.get(return_code, '')))
+
+    def connect(self):
+        '''Connect to server.'''
+        self.disconnect()
+        self.connection = PyMyServerControl(self.host, self.port,
+                                            self.username, self.password)
+
+    def disconnect(self):
+        '''Disconnect from server.'''
+        if self.connection is not None:
+            self.connection.close()
+            self.connection = None
+
+    def reboot(self):
+        '''Reboot server.'''
+        if self.connection:
+            self.connection.send_header('REBOOT', 0)
+            self.connection.read_header()
+            self.__check_return_code()
+
+    def version(self):
+        '''Get version string.'''
+        if self.connection:
+            self.connection.send_header('VERSION', 0)
+            self.connection.read_header()
+            self.__check_return_code()
+            return self.connection.read()
+
+    def enable_reboot(self):
+        '''Enable server auto-reboot.'''
+        if self.connection:
+            self.connection.send_header('ENABLEREBOOT', 0)
+            self.connection.read_header()
+            self.__check_return_code()
+
+    def disable_reboot(self):
+        '''Disable server auto-reboot.'''
+        if self.connection:
+            self.connection.send_header('DISABLEREBOOT', 0)
+            self.connection.read_header()
+            self.__check_return_code()
+
+    def show_connections(self):
+        '''List active server connections.'''
+        if self.connection:
+            self.connection.send_header('SHOWCONNECTIONS', 0)
+            self.connection.read_header()
+            self.__check_return_code()
+            return self.connection.read()
+
+    def kill_connection(self, num):
+        '''Kill connection to server.'''
+        if self.connection:
+            self.connection.send_header('KILLCONNECTION', 0, str(num))
+            self.connection.read_header()
+            self.__check_return_code()
+
+    def show_language_files(self):
+        '''List available language files.'''
+        if self.connection:
+            self.connection.send_header('SHOWLANGUAGEFILES', 0)
+            self.connection.read_header()
+            self.__check_return_code()
+            return self.connection.read()
+
+    def get_file(self, path):
+        '''Get file from server.'''
+        if self.connection:
+            self.connection.send_header('GETFILE', 0, path)
+            self.connection.read_header()
+            self.__check_return_code()
+            return self.connection.read()
+
+    def put_file(self, text, path):
+        '''Put file to server.'''
+        if self.connection:
+            self.connection.send_header('PUTFILE', len(text), path)
+            self.connection.send(text)
+            self.connection.read_header()
+            self.__check_return_code()
+
+class Controller(BasicController):
+    def get_MIME_type_configuration(self):
+        '''Get MIME types settings.'''
+        return MIMETypes.from_string(self.get_file('mimetypes.xml'))
+
+    def get_vhost_configuration(self):
+        '''Get VHosts settings.'''
+        return VHosts.from_string(self.get_file('virtualhosts.xml'))
+
+    def get_server_configuration(self):
+        '''Get server settings.'''
+        return MyServerConfig.from_string(self.get_file('myserver.xml'))
+
+    def put_MIME_type_configuration(self, config):
+        '''Put MIME types settings.'''
+        self.put_file(str(config), 'mimetypes.xml')
+
+    def put_vhost_configuration(self, config):
+        '''Put VHost settings.'''
+        self.put_file(str(config), 'virtualhosts.xml')
+
+    def put_server_configuration(self, config):
+        '''Put server settings.'''
+        self.put_file(str(config), 'myserver.xml')
diff --git a/myserver/src/GUI/MyServer/pycontrollib/definition.py b/myserver/src/GUI/MyServer/pycontrollib/definition.py
new file mode 100644
index 0000000..9ac2f55
--- /dev/null
+++ b/myserver/src/GUI/MyServer/pycontrollib/definition.py
@@ -0,0 +1,252 @@
+# -*- coding: utf-8 -*-
+'''
+MyServer
+Copyright (C) 2009 Free Software Foundation, Inc.
+This program 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 3 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program.  If not, see <http://www.gnu.org/licenses/>.
+'''
+
+from lxml import etree
+
+class Definition():
+    '''Common interface for DefinitionElement and DefinitionTree. Objects of
+    this type should not exist alone.'''
+
+    def __init__(self, name = None, attributes = {}):
+        '''Creates new definition with given name and attributes.'''
+        self.set_name(name)
+        self.attributes = {}
+        for key, value in attributes.iteritems():
+            self.set_attribute(key, value)
+
+    def __eq__(self, other):
+        return isinstance(other, Definition) and \
+            self.name == other.name and \
+            self.attributes == other.attributes
+
+    def get_name(self):
+        '''Definition name, None means no name.'''
+        return self.name
+
+    def set_name(self, name):
+        '''Set definition name, None means no name.'''
+        self.name = name
+
+    def get_attributes(self):
+        '''Get dict of all attributes.'''
+        return self.attributes
+
+    def get_attribute(self, key):
+        '''Get value of attribute key.'''
+        return self.attributes[key]
+
+    def set_attribute(self, key, value):
+        '''Set attribute key to given value.'''
+        if key == 'value':
+            raise KeyError('value is not an allowed key')
+        self.attributes[key] = value
+
+    def remove_attribute(self, key):
+        '''Remove attribute key.'''
+        self.attributes.pop(key)
+
+    @staticmethod
+    def from_lxml_element(root):
+        '''Factory to produce definition element or tree from lxml.etree.Element
+        object.'''
+        if root.tag != 'DEFINE': # don't touch unknown things
+            return root
+        if len(list(root)):
+            return DefinitionTree.from_lxml_element(root)
+        else:
+            return DefinitionElement.from_lxml_element(root)
+
+    @staticmethod
+    def from_string(text):
+        '''Factory to produce definition element or tree by parsing a string.'''
+        return Definition.from_lxml_element(etree.XML(text))
+
+class DefinitionElement(Definition):
+    '''Single definition element.'''
+
+    def __init__(self, name = None, attributes = {}):
+        '''Creates new definition element with given name and attributes.'''
+        Definition.__init__(self, name)
+        self.tag = 'DEFINE element'
+        for key, value in attributes.iteritems():
+            self.set_attribute(key, value)
+
+    def __eq__(self, other):
+        return isinstance(other, DefinitionElement) and \
+            Definition.__eq__(self, other)
+
+    def set_attribute(self, key, value):
+        '''Set attribute key to given value.'''
+        if key == 'value':
+            self.attributes['value'] = value
+        else:
+            Definition.set_attribute(self, key, value)
+
+    def to_lxml_element(self):
+        '''Convert definition element to lxml.etree.Element object.'''
+        root = etree.Element('DEFINE')
+        for key, value in self.attributes.iteritems():
+            root.set(key, value)
+        if self.name is not None:
+            root.set('name', self.name)
+        return root
+
+    def __str__(self):
+        return etree.tostring(self.to_lxml_element(), pretty_print = True)
+
+    @staticmethod
+    def from_lxml_element(root):
+        '''Factory to produce definition element from lxml.etree.Element
+        object.'''
+        if root.tag != 'DEFINE':
+            raise AttributeError('Expected DEFINE tag.')
+        attributes = root.attrib
+        name = attributes.pop('name', None)
+        return DefinitionElement(name, attributes)
+
+    @staticmethod
+    def from_string(text):
+        '''Factory to produce definition element by parsing a string.'''
+        return DefinitionElement.from_lxml_element(etree.XML(text))
+
+    def search_by_name(self, name):
+        return None if name != self.name else self
+
+class DefinitionTree(Definition):
+    '''Definition element containing other definitions.'''
+
+    def __init__(self, name = None, definitions = [], attributes = {}):
+        '''Creates new definition tree with given name, sub-definitions and
+        attributes. values is expected to be iterable.'''
+        Definition.__init__(self, name, attributes)
+        self.tag = 'DEFINE tree'
+        self.definitions = []
+        self.custom = [] # list of children not being definitions
+        for definition in definitions:
+            self.add_definition(definition)
+
+    def __eq__(self, other):
+        return isinstance(other, DefinitionTree) and \
+            Definition.__eq__(self, other) and \
+            self.definitions == other.definitions
+
+    def get_definitions(self):
+        '''Get all sub-definitions.'''
+        return self.definitions
+
+    def get_definition(self, index):
+        '''Get sub-definition with given index.'''
+        return self.definitions[index]
+
+    def add_definition(self, value, index = None):
+        '''Add value to sub-definitions, either at given position, or at the
+        end.'''
+        if not isinstance(value, Definition):
+            self.custom.append(value)
+        else:
+            if index is None:
+                self.definitions.append(value)
+            else:
+                self.definitions.insert(index, value)
+
+    def remove_definition(self, index):
+        '''Remove sub-definition with given index.'''
+        self.definitions.pop(index)
+
+    @staticmethod
+    def from_lxml_element(root):
+        '''Factory to produce definition tree from lxml.etree.Element object.'''
+        if root.tag != 'DEFINE':
+            raise AttributeError('Expected DEFINE tag.')
+        attributes = root.attrib
+        name = attributes.pop('name', None)
+        definitions = map(Definition.from_lxml_element, list(root))
+        return DefinitionTree(name, definitions, attributes)
+
+    @staticmethod
+    def from_string(text):
+        '''Factory to produce definition tree by parsing a string.'''
+        return DefinitionTree.from_lxml_element(etree.XML(text))
+
+    def to_lxml_element(self):
+        '''Convert definition tree to lxml.etree.Element object.'''
+        root = etree.Element('DEFINE')
+        for key, value in self.attributes.iteritems():
+            root.set(key, value)
+        if self.name is not None:
+            root.set('name', self.name)
+        for definition in self.definitions:
+            root.append(definition.to_lxml_element())
+        for element in self.custom:
+            root.append(element)
+        return root
+
+    def __str__(self):
+        return etree.tostring(self.to_lxml_element(), pretty_print = True)
+
+    def search_by_name(self, name):
+        for definition in reversed(self.definitions):
+            ret = definition.search_by_name(name)
+            if ret != None:
+                return ret
+        return None if name != self.name else self
+
+class DefinitionList():
+    def __init__(self, definitions = []):
+        '''Construct new DefinitionList object with given definitions.'''
+        self.definitions = []
+        self.custom = []
+        for definition in definitions:
+            self.add_definition(definition)
+
+    def add_definition(self, definition, index = None):
+        '''Append definition to current list of definitions, if index is not
+        None insert at index-th position.'''
+        if not isinstance(definition, Definition):
+            self.custom.append(definition)
+        else:
+            if index is None:
+                self.definitions.append(definition)
+            else:
+                self.definitions.insert(index, definition)
+
+    def get_definitions(self):
+        '''Get current list of definitions.'''
+        return self.definitions
+
+    def get_definition(self, index):
+        '''Get index-th definition.'''
+        return self.definitions[index]
+
+    def remove_definition(self, index):
+        '''Remove index-th definition.'''
+        self.definitions.pop(index)
+
+    def __eq__(self, other):
+        return isinstance(other, DefinitionList) and \
+            self.definitions == other.definitions
+
+    def __str__(self):
+        return '\n'.join(map(str, self.definitions))
+
+    def search_by_name(self, name):
+        for definition in reversed(self.definitions):
+            ret = definition.search_by_name(name)
+            if ret != None:
+                return ret
+        return None
diff --git a/myserver/src/GUI/MyServer/pycontrollib/log.py b/myserver/src/GUI/MyServer/pycontrollib/log.py
new file mode 100644
index 0000000..8752f1b
--- /dev/null
+++ b/myserver/src/GUI/MyServer/pycontrollib/log.py
@@ -0,0 +1,242 @@
+# -*- coding: utf-8 -*-
+'''
+MyServer
+Copyright (C) 2009 Free Software Foundation, Inc.
+This program 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 3 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program.  If not, see <http://www.gnu.org/licenses/>.
+'''
+
+from lxml import etree
+
+class Stream():
+    def __init__(self, location = None, cycle = None, cycle_gzip = None, filters = []):
+        '''Create new Stream instance. filter is expected to be iterable.'''
+        self.set_location(location)
+        self.set_cycle(cycle)
+        self.set_cycle_gzip(cycle_gzip)
+        self.filters = []
+        for filter in filters:
+            self.add_filter(filter)
+        self.custom = []
+        self.custom_attrib = {}
+
+    def __eq__(self, other):
+        return isinstance(other, Stream) and \
+            self.location == other.location and \
+            self.cycle == other.cycle and \
+            self.cycle_gzip == other.cycle_gzip and \
+            self.filters == other.filters
+
+    def get_location(self):
+        '''Get stream location.'''
+        return self.location
+
+    def set_location(self, location):
+        '''Set stream location.'''
+        self.location = location
+
+    def get_cycle(self):
+        '''Get stream cycle value.'''
+        return self.cycle
+
+    def set_cycle(self, cycle):
+        '''Set cycle value, None means not set.'''
+        if cycle is not None:
+            self.cycle = int(cycle)
+        else:
+            self.cycle = cycle
+
+    def get_cycle_gzip(self):
+        '''Get stream cycle_gzip value.'''
+        return self.cycle_gzip
+
+    def set_cycle_gzip(self, cycle_gzip):
+        '''Set stream cycle_gzip value, None means not set'''
+        self.cycle_gzip = cycle_gzip
+
+    def get_filters(self):
+        '''Get list of stream filters.'''
+        return self.filters
+
+    def get_filter(self, index):
+        '''Get index-th filter.'''
+        return self.filters[index]
+
+    def add_filter(self, filter, index = None):
+        '''Append a new filter, or insert it at index position.'''
+        if index is None:
+            self.filters.append(filter)
+        else:
+            self.filters.insert(index, filter)
+
+    def remove_filter(self, index):
+        '''Remove index-th filter.'''
+        self.filters.pop(index)
+
+    @staticmethod
+    def from_string(text):
+        '''Factory to produce stream by parsing a string.'''
+        return Stream.from_lxml_element(etree.XML(
+                text, parser = etree.XMLParser(remove_comments = True)))
+
+    @staticmethod
+    def from_lxml_element(root):
+        '''Factory to produce stream from lxml.etree.Element object.'''
+        if root.tag != 'STREAM':
+            raise AttributeError('Expected STREAM tag.')
+        known_attrib = set(['location', 'cycle', 'cycle_gzip'])
+        custom_attrib = {}
+        for key, value in root.attrib.iteritems():
+            if key not in known_attrib:
+                custom_attrib[key] = value
+        location = root.get('location')
+        cycle = root.get('cycle', None)
+        cycle_gzip = root.get('cycle_gzip', None)
+        if cycle_gzip is not None:
+            cycle_gzip = cycle_gzip.upper() == 'YES'
+        filters = []
+        custom = []
+        for child in list(root):
+            if child.tag == 'FILTER':
+                filters.append(child.text)
+            else:
+                custom.append(child)
+        stream = Stream(location, cycle, cycle_gzip, filters)
+        stream.custom = custom
+        stream.custom_attrib = custom_attrib
+        return stream
+
+    def __str__(self):
+        return etree.tostring(self.to_lxml_element(), pretty_print = True)
+
+    def to_lxml_element(self):
+        '''Convert to lxml.etree.Element.'''
+        root = etree.Element('STREAM')
+        if self.location is not None:
+            root.set('location', self.location)
+        if self.cycle is not None:
+            root.set('cycle', str(self.cycle))
+        if self.cycle_gzip is not None:
+            root.set('cycle_gzip', 'YES' if self.cycle_gzip else 'NO')
+        for filter in self.filters:
+            element = etree.Element('FILTER')
+            element.text = filter
+            root.append(element)
+
+        for element in self.custom:
+            root.append(element)
+        for key, value in self.custom_attrib.iteritems():
+            root.set(key, value)
+
+        return root
+
+class Log():
+    def __init__(self, log_type, streams = [], type = None):
+        '''Create new Log instance. stream is expected to be iterable.'''
+        self.set_log_type(log_type)
+        self.set_type(type)
+        self.streams = []
+        for stream in streams:
+            self.add_stream(stream)
+        self.custom = []
+        self.custom_attrib = {}
+
+    def __eq__(self, other):
+        return isinstance(other, Log) and \
+            self.log_type == other.log_type and \
+            self.streams == other.streams and \
+            self.type == other.type
+
+    def get_type(self):
+        '''Get log's type attribute.'''
+        return self.type
+
+    def set_type(self, type):
+        '''Set log's type attribute, None means not set'''
+        self.type = type
+
+    def get_log_type(self):
+        '''Get log's type.'''
+        return self.log_type
+
+    def set_log_type(self, log_type):
+        '''Set log's type.'''
+        if log_type is None:
+            raise AttributeError('log_type is required and can\'t be None')
+        self.log_type = log_type
+
+    def get_streams(self):
+        '''Get streams associated with this log.'''
+        return self.streams
+
+    def add_stream(self, stream, index = None):
+        '''Append stream to current streams or if index is not None insert
+        stream ad index-th position.'''
+        if index is None:
+            self.streams.append(stream)
+        else:
+            self.streams.insert(index, stream)
+
+    def remove_stream(self, index):
+        '''Remove stream from index-th position.'''
+        self.streams.pop(index)
+
+    def get_stream(self, index):
+        '''Get index-th stream.'''
+        return self.streams[index]
+
+    @staticmethod
+    def from_string(text):
+        '''Factory to produce log by parsing a string.'''
+        return Log.from_lxml_element(etree.XML(
+                text, parser = etree.XMLParser(remove_comments = True)))
+
+    @staticmethod
+    def from_lxml_element(root):
+        '''Factory to produce log from lxml.etree.Element object.'''
+        log_type = root.tag
+        custom_attrib = {}
+        known_attrib = set(['type'])
+        for key, value in root.attrib.iteritems():
+            if key not in known_attrib:
+                custom_attrib[key] = value
+        type = root.get('type', None)
+        streams = []
+        custom = []
+        for element in list(root):
+            try:
+                streams.append(Stream.from_lxml_element(element))
+            except AttributeError:
+                custom.append(element)
+        log = Log(log_type, streams, type)
+        log.custom = custom
+        log.custom_attrib = custom_attrib
+        return log
+
+    def __str__(self):
+        return etree.tostring(self.to_lxml_element(), pretty_print = True)
+
+    def to_lxml_element(self):
+        '''Convert to lxml.etree.Element.'''
+        root = etree.Element(self.log_type)
+        if self.type is not None:
+            root.set('type', self.type)
+        for stream in self.streams:
+            root.append(stream.to_lxml_element())
+
+        for element in self.custom:
+            root.append(element)
+        for key, value in self.custom_attrib.iteritems():
+            root.set(key, value)
+
+        return root
diff --git a/myserver/src/GUI/MyServer/pycontrollib/mimetypes.py b/myserver/src/GUI/MyServer/pycontrollib/mimetypes.py
new file mode 100644
index 0000000..df978c2
--- /dev/null
+++ b/myserver/src/GUI/MyServer/pycontrollib/mimetypes.py
@@ -0,0 +1,270 @@
+# -*- coding: utf-8 -*-
+'''
+MyServer
+Copyright (C) 2009 Free Software Foundation, Inc.
+This program 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 3 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program.  If not, see <http://www.gnu.org/licenses/>.
+'''
+
+from definition import Definition, DefinitionList
+from lxml import etree
+
+class MIMEType():
+    def __init__(self, mime, handler = None, param = None, extensions = [],
+                 path = None, filters = [], self_executed = None,
+                 definitions = []):
+        '''Creates new MIMEType with specified attributes. extension, filter and
+        definitions are expected to be iterable.'''
+        self.set_mime(mime)
+        self.set_handler(handler)
+        self.set_param(param)
+        self.extensions = set()
+        for extension in extensions:
+            self.add_extension(extension)
+        self.set_path(path)
+        self.filters = []
+        for filter in filters:
+            self.add_filter(filter)
+        self.set_self_executed(self_executed)
+        self.definitions = DefinitionList(definitions)
+        self.custom = []
+        self.custom_attrib = {}
+
+    def get_mime(self):
+        '''Get associated mime type.'''
+        return self.mime
+
+    def set_mime(self, mime):
+        '''Set associated mime type.'''
+        if mime is None:
+            raise AttributeError('mime is required and can\'t be None')
+        self.mime = mime
+
+    def get_handler(self):
+        '''Get associated handler.'''
+        return self.handler
+
+    def set_handler(self, handler):
+        '''Set associated handler.'''
+        self.handler = handler
+
+    def get_param(self):
+        '''Get associated param.'''
+        return self.param
+
+    def set_param(self, param):
+        '''Set associated param. None means no param.'''
+        self.param = param
+
+    def get_extensions(self):
+        '''Get associated extensions.'''
+        return self.extensions
+
+    def remove_extension(self, extension):
+        '''Remove extension from associated extensions.'''
+        self.extensions.remove(extension)
+
+    def add_extension(self, extension):
+        '''Add extension to associated extensions.'''
+        self.extensions.add(extension)
+
+    def get_path(self):
+        '''Get associated path.'''
+        return self.path
+
+    def set_path(self, path):
+        '''Set associated path. None means no path.'''
+        self.path = path
+
+    def get_filters(self):
+        '''Get associated filters.'''
+        return self.filters
+
+    def get_filter(self, index):
+        '''Get filter with given index.'''
+        return self.filters[index]
+
+    def remove_filter(self, index):
+        '''Remove filter with given index.'''
+        self.filters.pop(index)
+
+    def add_filter(self, filter, index = None):
+        '''Append filter after all other filters, or insert it at index.'''
+        if index is None:
+            self.filters.append(filter)
+        else:
+            self.filters.insert(index, filter)
+
+    def get_self_executed(self):
+        '''Get self_executed setting.'''
+        return self.self_executed
+
+    def set_self_executed(self, self_executed):
+        '''Set self_executed setting.'''
+        self.self_executed = self_executed
+
+    def get_definitions(self):
+        '''Get all definitions.'''
+        return self.definitions.get_definitions()
+
+    def get_definition(self, index):
+        '''Get definition with given index.'''
+        return self.definitions.get_definition(index)
+
+    def add_definition(self, definition, index = None):
+        '''Append definition after all other definitions, or insert it at
+        index.'''
+        self.definitions.add_definition(definition, index)
+
+    def remove_definition(self, index):
+        '''Remove definition with given index.'''
+        self.definitions.remove_definition(index)
+
+    def __eq__(self, other):
+        return isinstance(other, MIMEType) and \
+            self.mime == other.mime and \
+            self.handler == other.handler and \
+            self.param == other.param and \
+            self.extensions == other.extensions and \
+            self.path == other.path and \
+            self.filters == other.filters and \
+            self.self_executed == other.self_executed and \
+            self.definitions == other.definitions
+
+    def to_lxml_element(self):
+        '''Convert to lxml.etree.Element.'''
+        def make_element(tag, attribute, value):
+            element = etree.Element(tag)
+            element.set(attribute, value)
+            return element
+        def make_extension_element(extension):
+            return make_element('EXTENSION', 'value', extension)
+        def make_filter_element(filter):
+            return make_element('FILTER', 'value', filter)
+        root = etree.Element('MIME')
+        root.set('mime', self.mime)
+        if self.handler is not None:
+            root.set('handler', self.handler)
+        if self.param is not None:
+            root.set('param', self.param)
+        if self.self_executed is not None:
+            root.set('self', self.self_executed)
+        if self.path is not None:
+            root.append(make_element('PATH', 'regex', self.path))
+        for element in map(make_extension_element, self.extensions):
+            root.append(element)
+        for element in map(make_filter_element, self.filters):
+            root.append(element)
+        for definition in self.definitions.get_definitions():
+            root.append(definition.to_lxml_element())
+
+        for element in self.custom:
+            root.append(element)
+        for key, value in self.custom_attrib.iteritems():
+            root.set(key, value)
+
+        return root
+
+    def __str__(self):
+        return etree.tostring(self.to_lxml_element(), pretty_print = True)
+
+    @staticmethod
+    def from_lxml_element(root):
+        '''Factory to produce MIMEType from lxml.etree.Element object.'''
+        if root.tag != 'MIME':
+            raise AttributeError('Expected MIME tag.')
+        mime = root.get('mime', None)
+        handler = root.get('handler', None)
+        param = root.get('param', None)
+        self_executed = root.get('self', None)
+        known_attrib = set(['mime', 'handler', 'param', 'self'])
+        custom_attrib = {}
+        for key, value in root.attrib.iteritems():
+            if key not in known_attrib:
+                custom_attrib[key] = value
+        path = None
+        extension = set()
+        filters = []
+        definitions = []
+        custom = []
+        for child in list(root):
+            if child.tag == 'PATH':
+                path = child.get('regex')
+            elif child.tag == 'FILTER':
+                filters.append(child.get('value'))
+            elif child.tag == 'EXTENSION':
+                extension.add(child.get('value'))
+            elif child.tag == 'DEFINE':
+                definitions.append(Definition.from_lxml_element(child))
+            else:
+                custom.append(child)
+        mime = MIMEType(mime, handler, param, extension, path, filters,
+                        self_executed, definitions)
+        mime.custom = custom
+        mime.custom_attrib = custom_attrib
+        return mime
+
+    @staticmethod
+    def from_string(text):
+        '''Factory to produce MIMEType by parsing a string.'''
+        return MIMEType.from_lxml_element(etree.XML(
+                text, parser = etree.XMLParser(remove_comments = True)))
+
+class MIMETypes():
+    def __init__(self, MIME_types = []):
+        self.MIME_types = MIME_types
+        self.custom = []
+        self.custom_attrib = {}
+
+    def __eq__(self, other):
+        return isinstance(other, MIMETypes) and \
+            self.MIME_types == other.MIME_types
+
+    def to_lxml_element(self):
+        '''Convert to lxml.etree.Element.'''
+        root = etree.Element('MIMES')
+        for mime in self.MIME_types:
+            root.append(mime.to_lxml_element())
+
+        for element in self.custom:
+            root.append(element)
+        for key, value in self.custom_attrib.iteritems():
+            root.set(key, value)
+
+        return root
+
+    def __str__(self):
+        return etree.tostring(self.to_lxml_element(), pretty_print = True)
+
+    @staticmethod
+    def from_lxml_element(root):
+        '''Factory to produce MIMETypes from lxml.etree.Element object.'''
+        if root.tag != 'MIMES':
+            raise AttributeError('Expected MIMES tag.')
+        types = []
+        custom = []
+        for element in list(root):
+            try:
+                types.append(MIMEType.from_lxml_element(element))
+            except AttributeError:
+                custom.append(element)
+        mimes = MIMETypes(types)
+        mimes.custom = custom
+        mimes.custom_attrib = root.attrib
+        return mimes
+
+    @staticmethod
+    def from_string(text):
+        '''Factory to produce MIMETypes from parsing a string.'''
+        return MIMETypes.from_lxml_element(etree.XML(
+                text, parser = etree.XMLParser(remove_comments = True)))
diff --git a/myserver/src/GUI/MyServer/pycontrollib/security.py b/myserver/src/GUI/MyServer/pycontrollib/security.py
new file mode 100644
index 0000000..74e0dc1
--- /dev/null
+++ b/myserver/src/GUI/MyServer/pycontrollib/security.py
@@ -0,0 +1,474 @@
+# -*- coding: utf-8 -*-
+'''
+MyServer
+Copyright (C) 2009 Free Software Foundation, Inc.
+This program 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 3 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program.  If not, see <http://www.gnu.org/licenses/>.
+'''
+
+from lxml import etree
+from definition import Definition
+
+class SecurityElement():
+    @staticmethod
+    def from_lxml_element(root):
+        if root.tag == 'USER':
+            return User.from_lxml_element(root)
+        if root.tag == 'CONDITION':
+            return Condition.from_lxml_element(root)
+        elif root.tag == 'PERMISSION':
+            return Permission.from_lxml_element(root)
+        elif root.tag == 'RETURN':
+            return Return.from_lxml_element(root)
+        elif root.tag == 'DEFINE':
+            return Definition.from_lxml_element(root)
+        else:
+            raise AttributeError(
+                '{0} is not allowed in security files'.format(root.tag))
+
+    @staticmethod
+    def from_string(text):
+        '''Factory to produce security element by parsing a string.'''
+        return SecurityElement.from_lxml_element(etree.XML(text))
+
+    def __str__(self):
+        return etree.tostring(self.to_lxml_element(), pretty_print = True)
+
+class Condition(SecurityElement):
+    def __init__(self, name = None, value = None, reverse = None, regex = None,
+                 sub_elements = []):
+        self.tag = 'CONDITION'
+        self.set_name(name)
+        self.set_value(value)
+        self.set_reverse(reverse)
+        self.set_regex(regex)
+        self.custom_attrib = {}
+        self.custom = []
+        self.sub_elements = []
+        for element in sub_elements:
+            self.add_sub_element(element)
+
+    def __eq__(self, other):
+        return isinstance(other, Condition) and self.name == other.name and \
+            self.value == other.value and self.reverse == other.reverse and \
+            self.regex == other.regex and \
+            self.sub_elements == other.sub_elements
+
+    def set_name(self, name):
+        self.name = name
+
+    def get_name(self):
+        return self.name
+
+    def set_value(self, value):
+        self.value = value
+
+    def get_value(self):
+        return self.value
+
+    def set_reverse(self, reverse):
+        self.reverse = reverse
+
+    def get_reverse(self):
+        return self.reverse
+
+    def set_regex(self, regex):
+        self.regex = regex
+
+    def get_regex(self):
+        return self.regex
+
+    def add_sub_element(self, element, index = None):
+        if isinstance(element, Definition) or \
+                isinstance(element, SecurityElement):
+            if index is None:
+                self.sub_elements.append(element)
+            else:
+                self.sub_elements.insert(index, element)
+        else:
+            self.custom.append(element)
+
+    def get_sub_elements(self):
+        return self.sub_elements
+
+    def get_sub_element(self, index):
+        return self.sub_elements[index]
+
+    def remove_sub_element(self, index):
+        self.sub_elements.pop(index)
+
+    def to_lxml_element(self):
+        root = etree.Element('CONDITION')
+        if self.name is not None:
+            root.set('name', self.name)
+        if self.value is not None:
+            root.set('value', self.value)
+        if self.reverse is not None:
+            root.set('not', 'yes' if self.reverse else 'no')
+        if self.regex is not None:
+            root.set('regex', 'yes' if self.regex else 'no')
+        for key, value in self.custom_attrib.iteritems():
+            root.set(key, value)
+        for element in self.sub_elements:
+            root.append(element.to_lxml_element())
+        for element in self.custom:
+            root.append(element)
+        return root
+
+    @staticmethod
+    def from_lxml_element(root):
+        if root.tag != 'CONDITION':
+            raise AttributeError('Expected CONDITION tag.')
+        custom_attrib = root.attrib
+        name = custom_attrib.pop('name', None)
+        value = custom_attrib.pop('value', None)
+        reverse = custom_attrib.pop('not', None)
+        if reverse is not None:
+            reverse = reverse.upper() == 'YES'
+        regex = custom_attrib.pop('regex', None)
+        if regex is not None:
+            regex = regex.upper() == 'YES'
+        custom = []
+        sub_elements = []
+        for child in list(root):
+            try:
+                sub_elements.append(SecurityElement.from_lxml_element(child))
+            except:
+                custom.append(child)
+        condition = Condition(name, value, reverse, regex, sub_elements)
+        condition.custom = custom
+        condition.custom_attrib = custom_attrib
+        return condition
+
+    @staticmethod
+    def from_string(text):
+        '''Factory to produce condition element by parsing a string.'''
+        return Condition.from_lxml_element(etree.XML(text))
+
+class Permission(SecurityElement):
+    def __init__(self, read = None, execute = None, browse = None,
+                 delete = None, write = None):
+        self.tag = 'PERMISSION'
+        self.set_read(read)
+        self.set_execute(execute)
+        self.set_browse(browse)
+        self.set_delete(delete)
+        self.set_write(write)
+        self.custom_attrib = {}
+        self.custom = []
+
+    def __eq__(self, other):
+        return isinstance(other, Permission) and self.read == other.read and \
+            self.execute == other.execute and self.browse == other.browse and \
+            self.delete == other.delete and self.write == other.write
+
+    def set_read(self, read):
+        self.read = read
+
+    def get_read(self):
+        return self.read
+
+    def set_execute(self, execute):
+        self.execute = execute
+
+    def get_execute(self):
+        return self.execute
+
+    def set_browse(self, browse):
+        self.browse = browse
+
+    def get_browse(self):
+        return self.browse
+
+    def set_delete(self, delete):
+        self.delete = delete
+
+    def get_delete(self):
+        return self.delete
+
+    def set_write(self, write):
+        self.write = write
+
+    def get_write(self):
+        return self.write
+
+    def to_lxml_element(self):
+        root = etree.Element('PERMISSION')
+        if self.read is not None:
+            root.set('READ', 'YES' if self.read else 'NO')
+        if self.execute is not None:
+            root.set('EXECUTE', 'YES' if self.execute else 'NO')
+        if self.browse is not None:
+            root.set('BROWSE', 'YES' if self.browse else 'NO')
+        if self.delete is not None:
+            root.set('DELETE', 'YES' if self.delete else 'NO')
+        if self.write is not None:
+            root.set('WRITE', 'YES' if self.write else 'NO')
+        for key, value in self.custom_attrib.iteritems():
+            root.set(key, value)
+        for element in self.custom:
+            root.append(element)
+        return root
+
+    @staticmethod
+    def from_lxml_element(root):
+        if root.tag != 'PERMISSION':
+            raise AttributeError('Expected PERMISSION tag.')
+        custom_attrib = root.attrib
+        read = custom_attrib.pop('READ', None)
+        if read is not None:
+            read = read.upper() == 'YES'
+        execute = custom_attrib.pop('EXECUTE', None)
+        if execute is not None:
+            execute = execute.upper() == 'YES'
+        browse = custom_attrib.pop('BROWSE', None)
+        if browse is not None:
+            browse = browse.upper() == 'YES'
+        delete = custom_attrib.pop('DELETE', None)
+        if delete is not None:
+            delete = delete.upper() == 'YES'
+        write = custom_attrib.pop('WRITE', None)
+        if write is not None:
+            write = write.upper() == 'YES'
+        custom = list(root)
+        permission = Permission(read, execute, browse, delete, write)
+        permission.custom_attrib = custom_attrib
+        permission.custom = custom
+        return permission
+
+    @staticmethod
+    def from_string(text):
+        '''Factory to produce permission element by parsing a string.'''
+        return Permission.from_lxml_element(etree.XML(text))
+
+class User(SecurityElement):
+    def __init__(self, name = None, password = None, read = None,
+                 execute = None, browse = None, delete = None, write = None):
+        self.tag = 'USER'
+        self.set_name(name)
+        self.set_password(password)
+        self.set_read(read)
+        self.set_execute(execute)
+        self.set_browse(browse)
+        self.set_delete(delete)
+        self.set_write(write)
+        self.custom_attrib = {}
+        self.custom = []
+
+    def __eq__(self, other):
+        return isinstance(other, User) and self.name == other.name and \
+            self.password == other.password and self.read == other.read and \
+            self.execute == other.execute and self.browse == other.browse and \
+            self.delete == other.delete and self.write == other.write
+
+    def set_name(self, name):
+        self.name = name
+
+    def get_name(self):
+        return self.name
+
+    def set_password(self, password):
+        self.password = password
+
+    def get_password(self):
+        return self.password
+
+    def set_read(self, read):
+        self.read = read
+
+    def get_read(self):
+        return self.read
+
+    def set_execute(self, execute):
+        self.execute = execute
+
+    def get_execute(self):
+        return self.execute
+
+    def set_browse(self, browse):
+        self.browse = browse
+
+    def get_browse(self):
+        return self.browse
+
+    def set_delete(self, delete):
+        self.delete = delete
+
+    def get_delete(self):
+        return self.delete
+
+    def set_write(self, write):
+        self.write = write
+
+    def get_write(self):
+        return self.write
+
+    def to_lxml_element(self):
+        root = etree.Element('USER')
+        if self.name is not None:
+            root.set('name', self.name)
+        if self.password is not None:
+            root.set('password', self.password)
+        if self.read is not None:
+            root.set('READ', 'YES' if self.read else 'NO')
+        if self.execute is not None:
+            root.set('EXECUTE', 'YES' if self.execute else 'NO')
+        if self.browse is not None:
+            root.set('BROWSE', 'YES' if self.browse else 'NO')
+        if self.delete is not None:
+            root.set('DELETE', 'YES' if self.delete else 'NO')
+        if self.write is not None:
+            root.set('WRITE', 'YES' if self.write else 'NO')
+        for key, value in self.custom_attrib.iteritems():
+            root.set(key, value)
+        for element in self.custom:
+            root.append(element)
+        return root
+
+    @staticmethod
+    def from_lxml_element(root):
+        if root.tag != 'USER':
+            raise AttributeError('Expected USER tag.')
+        custom_attrib = root.attrib
+        name = custom_attrib.pop('name', None)
+        password = custom_attrib.pop('password', None)
+        read = custom_attrib.pop('READ', None)
+        if read is not None:
+            read = read.upper() == 'YES'
+        execute = custom_attrib.pop('EXECUTE', None)
+        if execute is not None:
+            execute = execute.upper() == 'YES'
+        browse = custom_attrib.pop('BROWSE', None)
+        if browse is not None:
+            browse = browse.upper() == 'YES'
+        delete = custom_attrib.pop('DELETE', None)
+        if delete is not None:
+            delete = delete.upper() == 'YES'
+        write = custom_attrib.pop('WRITE', None)
+        if write is not None:
+            write = write.upper() == 'YES'
+        custom = list(root)
+        user = User(name, password, read, execute, browse,
+                    delete, write)
+        user.custom_attrib = custom_attrib
+        user.custom = custom
+        return user
+
+    @staticmethod
+    def from_string(text):
+        '''Factory to produce user element by parsing a string.'''
+        return User.from_lxml_element(etree.XML(text))
+
+class Return(SecurityElement):
+    def __init__(self, value = None):
+        self.tag = 'RETURN'
+        self.set_value(value)
+        self.custom_attrib = {}
+        self.custom = []
+
+    def __eq__(self, other):
+        return isinstance(other, Return) and self.value == other.value
+
+    def set_value(self, value):
+        self.value = value
+
+    def get_value(self):
+        return self.value
+
+    def to_lxml_element(self):
+        root = etree.Element('RETURN')
+        if self.value is not None:
+            root.set('value', self.value)
+        for key, value in self.custom_attrib.iteritems():
+            root.set(key, value)
+        for element in self.custom:
+            root.append(element)
+        return root
+
+    @staticmethod
+    def from_lxml_element(root):
+        if root.tag != 'RETURN':
+            raise AttributeError('Expected RETURN tag.')
+        custom_attrib = root.attrib
+        value = custom_attrib.pop('value', None)
+        custom = list(root)
+        ret = Return(value)
+        ret.custom_attrib = custom_attrib
+        ret.custom = custom
+        return ret
+
+    @staticmethod
+    def from_string(text):
+        '''Factory to produce return element by parsing a string.'''
+        return Return.from_lxml_element(etree.XML(text))
+
+class SecurityList():
+    def __init__(self, elements = []):
+        self.elements = []
+        for element in elements:
+            self.add_element(element)
+        self.custom = []
+        self.custom_attrib = {}
+
+    def __eq__(self, other):
+        return isinstance(other, SecurityList) and \
+            self.elements == other.elements
+
+    def get_elements(self):
+        return self.elements
+
+    def get_element(self, index):
+        return self.elements[index]
+
+    def add_element(self, element, index = None):
+        if index is None:
+            self.elements.append(element)
+        else:
+            self.elements.insert(index, element)
+
+    def remove_element(self, index):
+        self.elements.pop(index)
+
+    @staticmethod
+    def from_lxml_element(root):
+        if root.tag != 'SECURITY':
+            raise AttributeError('Expected SECURITY tag.')
+        elements = []
+        custom = []
+        for element in list(root):
+            try:
+                elements.append(SecurityElement.from_lxml_element(element))
+            except:
+                custom.append(element)
+        security_list = SecurityList(elements)
+        security_list.custom = custom
+        security_list.custom_attrib = root.attrib
+        return security_list
+
+    @staticmethod
+    def from_string(text):
+        '''Factory to produce security list by parsing a string.'''
+        return SecurityList.from_lxml_element(etree.XML(text))
+
+    def to_lxml_element(self):
+        root = etree.Element('SECURITY')
+        for element in self.elements:
+            root.append(element.to_lxml_element())
+        for key, value in self.custom_attrib.iteritems():
+            root.set(key, value)
+        for element in self.custom:
+            root.append(element)
+        return root
+
+    def __str__(self):
+        return etree.tostring(self.to_lxml_element(), pretty_print = True)
diff --git a/myserver/src/GUI/MyServer/pycontrollib/test/Makefile b/myserver/src/GUI/MyServer/pycontrollib/test/Makefile
new file mode 100644
index 0000000..7c7179e
--- /dev/null
+++ b/myserver/src/GUI/MyServer/pycontrollib/test/Makefile
@@ -0,0 +1,45 @@
+# MyServer
+# Copyright (C) 2009 Free Software Foundation, Inc.
+# This program 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 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+PYTHON=/usr/bin/python
+PYTHONPATH:=$(shell dirname `pwd`):${PYTHONPATH}
+
+.PHONY: test log_test definition_test mimetypes_test vhost_test config_test \
+	security_test
+
+test: log_test definition_test mimetypes_test vhost_test config_test \
+	security_test
+
+log_test:
+	-PYTHONPATH=${PYTHONPATH} ${PYTHON} log_test.py
+
+definition_test:
+	-PYTHONPATH=${PYTHONPATH} ${PYTHON} definition_test.py
+
+mimetypes_test:
+	-PYTHONPATH=${PYTHONPATH} ${PYTHON} mimetypes_test.py
+
+vhost_test:
+	-PYTHONPATH=${PYTHONPATH} ${PYTHON} vhost_test.py
+
+config_test:
+	-PYTHONPATH=${PYTHONPATH} ${PYTHON} config_test.py
+
+security_test:
+	-PYTHONPATH=${PYTHONPATH} ${PYTHON} security_test.py
+
+.PHONY: clean
+clean:
+	rm *.py[co]
diff --git a/myserver/src/GUI/MyServer/pycontrollib/test/config_test.py b/myserver/src/GUI/MyServer/pycontrollib/test/config_test.py
new file mode 100644
index 0000000..1f40262
--- /dev/null
+++ b/myserver/src/GUI/MyServer/pycontrollib/test/config_test.py
@@ -0,0 +1,134 @@
+# -*- coding: utf-8 -*-
+'''
+MyServer
+Copyright (C) 2009 Free Software Foundation, Inc.
+This program 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 3 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program.  If not, see <http://www.gnu.org/licenses/>.
+'''
+
+import unittest
+from lxml import etree
+from config import MyServerConfig
+from definition import DefinitionElement, DefinitionTree
+
+class MyServerConfigTest(unittest.TestCase):
+    def setUp(self):
+        self.definitions = []
+        self.definitions.append(DefinitionElement('a'))
+        self.definitions.append(DefinitionElement('b'))
+        self.definitions.append(DefinitionElement('c'))
+
+    def test_creation(self):
+        config = MyServerConfig()
+        config = MyServerConfig(self.definitions)
+
+    def test_definitions(self):
+        config = MyServerConfig()
+        self.assertEqual([], config.get_definitions())
+        counter = 0
+        for definition in self.definitions:
+            config.add_definition(definition)
+            counter += 1
+            self.assertEqual(self.definitions[:counter],
+                             config.get_definitions())
+        for counter in xrange(len(self.definitions)):
+            self.assertEqual(self.definitions[counter],
+                             config.get_definition(counter))
+        config.add_definition(DefinitionElement('test'), 1)
+        self.assertEqual(DefinitionElement('test'), config.get_definition(1))
+        config.remove_definition(1)
+        self.assertEqual(self.definitions, config.get_definitions())
+        for counter in xrange(len(self.definitions)):
+            config.remove_definition(0)
+            self.assertEqual(self.definitions[counter + 1:],
+                             config.get_definitions())
+
+    def test_equality(self):
+        self.assertEqual(MyServerConfig(self.definitions),
+                         MyServerConfig(self.definitions))
+        self.assertNotEqual(MyServerConfig(), MyServerConfig(self.definitions))
+        self.assertNotEqual(MyServerConfig(), 'other type')
+
+    def test_from_string(self):
+        text = '<MYSERVER />'
+        config = MyServerConfig.from_string(text)
+        right = MyServerConfig()
+        self.assertEqual(config, right)
+
+    def test_from_string_definitions(self):
+        text = '''<MYSERVER>
+  <DEFINE name="a" />
+  <DEFINE>
+    <DEFINE name="b" />
+    <DEFINE name="c" />
+  </DEFINE>
+</MYSERVER>'''
+        config = MyServerConfig.from_string(text)
+        right = MyServerConfig([DefinitionElement('a'), DefinitionTree(
+                    definitions = [DefinitionElement('b'),
+                                   DefinitionElement('c')])])
+        self.assertEqual(config, right)
+
+    def test_from_lxml(self):
+        text = '<MYSERVER />'
+        config = MyServerConfig.from_lxml_element(etree.XML(text))
+        right = MyServerConfig()
+        self.assertEqual(config, right)
+
+    def test_from_lxml_definitions(self):
+        text = '''<MYSERVER>
+  <DEFINE name="a" />
+  <DEFINE>
+    <DEFINE name="b" />
+    <DEFINE name="c" />
+  </DEFINE>
+</MYSERVER>'''
+        config = MyServerConfig.from_lxml_element(etree.XML(text))
+        right = MyServerConfig([DefinitionElement('a'), DefinitionTree(
+                    definitions = [DefinitionElement('b'),
+                                   DefinitionElement('c')])])
+        self.assertEqual(config, right)
+
+    def test_to_string(self):
+        config = MyServerConfig()
+        copy = MyServerConfig.from_string(str(config))
+        self.assertEqual(config, copy)
+
+    def test_to_string_definitions(self):
+        config = MyServerConfig([DefinitionElement('a'), DefinitionTree(
+                    definitions = [DefinitionElement('b'),
+                                   DefinitionElement('c')])])
+        copy = MyServerConfig.from_string(str(config))
+        self.assertEqual(config, copy)
+
+    def test_to_string(self):
+        config = MyServerConfig()
+        copy = MyServerConfig.from_lxml_element(config.to_lxml_element())
+        self.assertEqual(config, copy)
+
+    def test_to_string_definitions(self):
+        config = MyServerConfig([DefinitionElement('a'), DefinitionTree(
+                    definitions = [DefinitionElement('b'),
+                                   DefinitionElement('c')])])
+        copy = MyServerConfig.from_lxml_element(config.to_lxml_element())
+        self.assertEqual(config, copy)
+
+    def test_bad_root_tag(self):
+        text = '<ERROR />'
+        self.assertRaises(AttributeError, MyServerConfig.from_string, text)
+        self.assertRaises(AttributeError, MyServerConfig.from_lxml_element,
+                          etree.XML(text))
+
+
+if __name__ == '__main__':
+    unittest.main()
diff --git a/myserver/src/GUI/MyServer/pycontrollib/test/definition_test.py b/myserver/src/GUI/MyServer/pycontrollib/test/definition_test.py
new file mode 100644
index 0000000..669a2a8
--- /dev/null
+++ b/myserver/src/GUI/MyServer/pycontrollib/test/definition_test.py
@@ -0,0 +1,481 @@
+# -*- coding: utf-8 -*-
+'''
+MyServer
+Copyright (C) 2009 Free Software Foundation, Inc.
+This program 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 3 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program.  If not, see <http://www.gnu.org/licenses/>.
+'''
+
+from definition import Definition, DefinitionElement, DefinitionTree, DefinitionList
+from lxml import etree
+import unittest
+
+class DefinitionTest(unittest.TestCase):
+    def test_creation(self):
+        definition = Definition()
+        definition = Definition('no attributes')
+        definition = Definition('with attributes', {'a': 'b', 'c': 'd'})
+
+    def test_name(self):
+        definition = Definition('name1')
+        self.assertEqual('name1', definition.get_name())
+        definition.set_name('name2')
+        self.assertEqual('name2', definition.get_name())
+        definition.set_name(None)
+        self.assertEqual(None, definition.get_name())
+        definition = Definition(name = 'name1')
+        self.assertEqual('name1', definition.get_name())
+
+    def test_attributes(self):
+        definition = Definition('with attributes', {'a': 'b', 'c': 'd'})
+        self.assertEqual('b', definition.get_attribute('a'))
+        self.assertEqual('d', definition.get_attribute('c'))
+        self.assertEqual({'a': 'b', 'c': 'd'}, definition.get_attributes())
+        self.assertRaises(KeyError, definition.get_attribute, 'e')
+        definition.set_attribute('e', 'f')
+        self.assertEqual('f', definition.get_attribute('e'))
+        definition.set_attribute('e', 'g')
+        self.assertEqual('g', definition.get_attribute('e'))
+        definition.remove_attribute('e')
+        self.assertRaises(KeyError, definition.get_attribute, 'e')
+        self.assertRaises(KeyError, definition.remove_attribute, 'e')
+        definition = Definition(attributes = {'a': 'b'})
+        self.assertEqual('b', definition.get_attribute('a'))
+        self.assertRaises(KeyError, definition.get_attribute, 'e')
+
+    def test_value(self):
+        self.assertRaises(KeyError, Definition, 'name', {'value': 'x'})
+        definition = Definition('name')
+        self.assertRaises(KeyError, definition.set_attribute, 'value', 'x')
+
+    def test_from_string(self):
+        text = '<DEFINE name="http.error.file.404" value="404.html" />'
+        definition = Definition.from_string(text)
+        self.assertTrue(isinstance(definition, DefinitionElement))
+        text = '<DEFINE name="x"><DEFINE value="y" /><DEFINE value="z" /></DEFINE>'
+        definition = Definition.from_string(text)
+        self.assertTrue(isinstance(definition, DefinitionTree))
+
+    def test_from_lxml(self):
+        text = '<DEFINE name="http.error.file.404" value="404.html" />'
+        definition = Definition.from_lxml_element(etree.XML(text))
+        self.assertTrue(isinstance(definition, DefinitionElement))
+        text = '<DEFINE name="x"><DEFINE value="y" /><DEFINE value="z" /></DEFINE>'
+        definition = Definition.from_lxml_element(etree.XML(text))
+        self.assertTrue(isinstance(definition, DefinitionTree))
+
+    def test_bad_root_tag(self):
+        text = '<ERROR name="http.error.file.404" value="404.html" />'
+        self.assertEqual('ERROR', Definition.from_string(text).tag)
+        self.assertEqual('ERROR', Definition.from_lxml_element(
+                etree.XML(text)).tag)
+
+    def test_equality(self):
+        self.assertNotEqual(Definition(), 'different type')
+
+class DefinitionElementTest(unittest.TestCase):
+    def test_creation(self):
+        definition = DefinitionElement()
+        self.assertTrue(isinstance(definition, Definition))
+        definition = DefinitionElement('name')
+        self.assertTrue(isinstance(definition, Definition))
+        definition = DefinitionElement('name', {'value': 'value'})
+        self.assertTrue(isinstance(definition, Definition))
+
+    def test_value(self):
+        definition = DefinitionElement('name', {'value': 'x'})
+        self.assertEqual('x', definition.get_attribute('value'))
+        definition.set_attribute('value', 'y')
+        self.assertEqual('y', definition.get_attribute('value'))
+        definition.set_attribute('value', None)
+        self.assertEqual(None, definition.get_attribute('value'))
+        definition.remove_attribute('value')
+        self.assertRaises(KeyError, definition.get_attribute, 'value')
+        definition = DefinitionElement()
+        self.assertRaises(KeyError, definition.get_attribute, 'value')
+
+    def test_from_string(self):
+        text = '<DEFINE />'
+        definition = DefinitionElement.from_string(text)
+        right = DefinitionElement()
+        self.assertEqual(definition, right)
+
+    def test_from_string_name(self):
+        text = '<DEFINE name="test" />'
+        definition = DefinitionElement.from_string(text)
+        right = DefinitionElement(name = "test")
+        self.assertEqual(definition, right)
+
+    def test_from_string_attributes(self):
+        text = '<DEFINE a="b" b="c" value="x" />'
+        definition = DefinitionElement.from_string(text)
+        right = DefinitionElement(attributes = {'a': 'b', 'b': 'c', 'value': 'x'})
+        self.assertEqual(definition, right)
+
+    def test_from_string_full(self):
+        text = '<DEFINE name="test" value="x" a="b" />'
+        definition = DefinitionElement.from_string(text)
+        right = DefinitionElement('test', {'value': 'x', 'a': 'b'})
+        self.assertEqual(definition, right)
+
+    def test_from_lxml(self):
+        text = '<DEFINE />'
+        definition = DefinitionElement.from_lxml_element(etree.XML(text))
+        right = DefinitionElement()
+        self.assertEqual(definition, right)
+
+    def test_from_xml_name(self):
+        text = '<DEFINE name="test" />'
+        definition = DefinitionElement.from_lxml_element(etree.XML(text))
+        right = DefinitionElement(name = "test")
+        self.assertEqual(definition, right)
+
+    def test_from_lxml_attributes(self):
+        text = '<DEFINE a="b" b="c" value="x" />'
+        definition = DefinitionElement.from_lxml_element(etree.XML(text))
+        right = DefinitionElement(attributes = {'a': 'b', 'b': 'c', 'value': 'x'})
+        self.assertEqual(definition, right)
+
+    def test_from_lxml_full(self):
+        text = '<DEFINE name="test" value="x" a="b" />'
+        definition = DefinitionElement.from_lxml_element(etree.XML(text))
+        right = DefinitionElement('test', {'value': 'x', 'a': 'b'})
+        self.assertEqual(definition, right)
+
+    def test_equality(self):
+        self.assertEqual(DefinitionElement('name', {'some': 'attributes'}),
+                         DefinitionElement('name', {'some': 'attributes'}))
+        self.assertNotEqual(DefinitionElement('name1'),
+                            DefinitionElement('name2'))
+        self.assertNotEqual(DefinitionElement('name', {'attribute': '1'}),
+                            DefinitionElement('name', {'attribute': '2'}))
+        self.assertNotEqual(DefinitionElement(), 'different type')
+
+    def test_to_string(self):
+        definition = DefinitionElement()
+        copy = DefinitionElement.from_string(str(definition))
+        self.assertEqual(definition, copy)
+
+    def test_to_string_name(self):
+        definition = DefinitionElement(name = 'test')
+        copy = DefinitionElement.from_string(str(definition))
+        self.assertEqual(definition, copy)
+
+    def test_to_string_attributes(self):
+        definition = DefinitionElement(attributes = {'a': 'b', 'b': 'c', 'value': 'x'})
+        copy = DefinitionElement.from_string(str(definition))
+        self.assertEqual(definition, copy)
+
+    def test_to_string_full(self):
+        definition = DefinitionElement('test', {'value': 'x', 'a': 'b'})
+        copy = DefinitionElement.from_string(str(definition))
+        self.assertEqual(definition, copy)
+
+    def test_to_lxml(self):
+        definition = DefinitionElement()
+        copy = DefinitionElement.from_lxml_element(definition.to_lxml_element())
+        self.assertEqual(definition, copy)
+
+    def test_to_lxml_name(self):
+        definition = DefinitionElement(name = 'test')
+        copy = DefinitionElement.from_lxml_element(definition.to_lxml_element())
+        self.assertEqual(definition, copy)
+
+    def test_to_lxml_attributes(self):
+        definition = DefinitionElement(attributes = {'a': 'b', 'b': 'c', 'value': 'x'})
+        copy = DefinitionElement.from_lxml_element(definition.to_lxml_element())
+        self.assertEqual(definition, copy)
+
+    def test_to_lxml_full(self):
+        definition = DefinitionElement('test', {'value': 'x', 'a': 'b'})
+        copy = DefinitionElement.from_lxml_element(definition.to_lxml_element())
+        self.assertEqual(definition, copy)
+
+    def test_bad_root_tag(self):
+        text = '<ERROR name="http.error.file.404" value="404.html" />'
+        self.assertRaises(AttributeError, DefinitionElement.from_string, text)
+        self.assertRaises(AttributeError, DefinitionElement.from_lxml_element,
+                          etree.XML(text))
+
+    def test_search_by_name(self):
+        definition = DefinitionElement('a')
+        self.assertEqual(None, definition.search_by_name('b'))
+        self.assertEqual(definition, definition.search_by_name('a'))
+
+class DefinitionTreeTest(unittest.TestCase):
+    def setUp(self):
+        self.element_0 = DefinitionElement('test', {'value': 'x'})
+        self.element_1 = DefinitionElement(attributes = {'a': 'b', 'b': 'c'})
+
+    def test_creation(self):
+        definition = DefinitionTree()
+        self.assertTrue(isinstance(definition, Definition))
+        definition = DefinitionTree('name')
+        self.assertTrue(isinstance(definition, Definition))
+        definition = DefinitionTree('name', [self.element_0])
+        self.assertTrue(isinstance(definition, Definition))
+        definition = DefinitionTree('name', [self.element_1], {'key': 'value'})
+        self.assertTrue(isinstance(definition, Definition))
+
+    def test_value(self):
+        self.assertRaises(KeyError, DefinitionTree, 'name', [], {'value': 'x'})
+        definition = Definition('name')
+        self.assertRaises(KeyError, definition.set_attribute, 'value', 'x')
+
+    def test_definitions(self):
+        definition = DefinitionTree()
+        self.assertEqual(0, len(definition.get_definitions()))
+        definition.add_definition(self.element_0)
+        self.assertEqual(1, len(definition.get_definitions()))
+        self.assertEqual(self.element_0, definition.get_definition(0))
+        definition.add_definition(self.element_1)
+        self.assertEqual(2, len(definition.get_definitions()))
+        self.assertEqual(self.element_0, definition.get_definition(0))
+        self.assertEqual(self.element_1, definition.get_definition(1))
+        definition.remove_definition(0)
+        self.assertEqual(1, len(definition.get_definitions()))
+        self.assertEqual(self.element_1, definition.get_definition(0))
+        definition.add_definition(self.element_0, 0)
+        self.assertEqual(2, len(definition.get_definitions()))
+        self.assertEqual(self.element_0, definition.get_definition(0))
+        self.assertEqual(self.element_1, definition.get_definition(1))
+        self.assertRaises(IndexError, definition.get_definition, 2)
+        definition = DefinitionTree(definitions = [self.element_0, self.element_1])
+        self.assertEqual(2, len(definition.get_definitions()))
+        self.assertEqual(self.element_0, definition.get_definition(0))
+        self.assertEqual(self.element_1, definition.get_definition(1))
+
+    def test_from_string(self):
+        text = '<DEFINE />'
+        definition = DefinitionTree.from_string(text)
+        right = DefinitionTree()
+        self.assertEqual(definition, right)
+
+    def test_from_string_name(self):
+        text = '<DEFINE name="test" />'
+        definition = DefinitionTree.from_string(text)
+        right = DefinitionTree(name = "test")
+        self.assertEqual(definition, right)
+
+    def test_from_string_definitions(self):
+        text = '<DEFINE>{0}{1}</DEFINE>'.format(self.element_0, self.element_1)
+        definition = DefinitionTree.from_string(text)
+        right = DefinitionTree(definitions = [self.element_0, self.element_1])
+        self.assertEqual(definition, right)
+
+    def test_from_string_attributes(self):
+        text = '<DEFINE a="b" b="c" />'
+        definition = DefinitionTree.from_string(text)
+        right = DefinitionTree(attributes = {'a': 'b', 'b': 'c'})
+        self.assertEqual(definition, right)
+
+    def test_from_string_full(self):
+        text = '<DEFINE name="test" a="b">{0}{1}</DEFINE>'.format(
+            self.element_0, self.element_1)
+        definition = DefinitionTree.from_string(text)
+        right = DefinitionTree('test', [self.element_0, self.element_1], {'a': 'b'})
+        self.assertEqual(definition, right)
+
+    def test_from_lxml(self):
+        text = '<DEFINE />'
+        definition = DefinitionTree.from_lxml_element(etree.XML(text))
+        right = DefinitionTree()
+        self.assertEqual(definition, right)
+
+    def test_from_lxml_name(self):
+        text = '<DEFINE name="test" />'
+        definition = DefinitionTree.from_lxml_element(etree.XML(text))
+        right = DefinitionTree(name = "test")
+        self.assertEqual(definition, right)
+
+    def test_from_lxml_definitions(self):
+        text = '<DEFINE>{0}{1}</DEFINE>'.format(self.element_0, self.element_1)
+        definition = DefinitionTree.from_lxml_element(etree.XML(text))
+        right = DefinitionTree(definitions = [self.element_0, self.element_1])
+        self.assertEqual(definition, right)
+
+    def test_from_lxml_attributes(self):
+        text = '<DEFINE a="b" b="c" />'
+        definition = DefinitionTree.from_lxml_element(etree.XML(text))
+        right = DefinitionTree(attributes = {'a': 'b', 'b': 'c'})
+        self.assertEqual(definition, right)
+
+    def test_from_lxml_full(self):
+        text = '<DEFINE name="test" a="b">{0}{1}</DEFINE>'.format(
+            self.element_0, self.element_1)
+        definition = DefinitionTree.from_lxml_element(etree.XML(text))
+        right = DefinitionTree('test', [self.element_0, self.element_1], {'a': 'b'})
+        self.assertEqual(definition, right)
+
+    def test_equality(self):
+        definition_0 = DefinitionTree('test', [self.element_0], {'a': 'b'})
+        definition_1 = DefinitionTree('test', [self.element_0], {'a': 'b'})
+        self.assertEqual(definition_0, definition_1)
+        self.assertNotEqual(definition_0, DefinitionTree('', [self.element_0], {'a': 'b'}))
+        self.assertNotEqual(definition_0, DefinitionTree('name', [], {'a': 'b'}))
+        self.assertNotEqual(definition_0, DefinitionTree('name', [self.element_0], {'b': 'b'}))
+        self.assertNotEqual(DefinitionTree(), 'different type')
+
+    def test_to_string(self):
+        definition = DefinitionTree()
+        copy = DefinitionTree.from_string(str(definition))
+        self.assertEqual(definition, copy)
+
+    def test_to_string_name(self):
+        definition = DefinitionTree(name = "test")
+        copy = DefinitionTree.from_string(str(definition))
+        self.assertEqual(definition, copy)
+
+    def test_top_string_definitions(self):
+        definition = DefinitionTree(definitions = [self.element_0, self.element_1])
+        copy = DefinitionTree.from_string(str(definition))
+        self.assertEqual(definition, copy)
+
+    def test_top_string_attributes(self):
+        definition = DefinitionTree(attributes = {'a': 'b', 'b': 'c'})
+        copy = DefinitionTree.from_string(str(definition))
+        self.assertEqual(definition, copy)
+
+    def test_to_string_full(self):
+        definition = DefinitionTree('test', [self.element_0, self.element_1], {'a': 'b'})
+        copy = DefinitionTree.from_string(str(definition))
+        self.assertEqual(definition, copy)
+
+    def test_to_lxml(self):
+        definition = DefinitionTree()
+        copy = DefinitionTree.from_lxml_element(definition.to_lxml_element())
+        self.assertEqual(definition, copy)
+
+    def test_to_lxml_name(self):
+        definition = DefinitionTree(name = "test")
+        copy = DefinitionTree.from_lxml_element(definition.to_lxml_element())
+        self.assertEqual(definition, copy)
+
+    def test_top_lxml_definitions(self):
+        definition = DefinitionTree(definitions = [self.element_0, self.element_1])
+        copy = DefinitionTree.from_lxml_element(definition.to_lxml_element())
+        self.assertEqual(definition, copy)
+
+    def test_top_lxml_attributes(self):
+        definition = DefinitionTree(attributes = {'a': 'b', 'b': 'c'})
+        copy = DefinitionTree.from_lxml_element(definition.to_lxml_element())
+        self.assertEqual(definition, copy)
+
+    def test_to_lxml_full(self):
+        definition = DefinitionTree('test', [self.element_0, self.element_1], {'a': 'b'})
+        copy = DefinitionTree.from_lxml_element(definition.to_lxml_element())
+        self.assertEqual(definition, copy)
+
+    def test_bad_root_tag(self):
+        text = '<ERROR name="test" key="value">{0}{1}</ERROR>'.format(
+            self.element_0, self.element_1)
+        self.assertRaises(AttributeError, DefinitionTree.from_string, text)
+        self.assertRaises(AttributeError, DefinitionTree.from_lxml_element,
+                          etree.XML(text))
+
+    def test_search_by_name(self):
+        element_0 = DefinitionElement('a')
+        element_1 = DefinitionElement('b')
+        element_2 = DefinitionElement('a')
+        tree = DefinitionTree('x', definitions = [element_0, element_1, element_2])
+        self.assertEqual(element_1, tree.search_by_name('b'))
+        self.assertEqual(element_2, tree.search_by_name('a'))
+        self.assertEqual(None, tree.search_by_name('c'))
+        self.assertEqual(tree, tree.search_by_name('x'))
+        tree = DefinitionTree('b', definitions = [element_0, element_1, element_2])
+        self.assertEqual(element_1, tree.search_by_name('b'))
+
+class DefinitionListTest(unittest.TestCase):
+    def setUp(self):
+        self.definitions = []
+        self.definitions.append(DefinitionElement('a'))
+        self.definitions.append(DefinitionElement('b'))
+        self.definitions.append(DefinitionElement('c'))
+
+    def test_creation(self):
+        def_list = DefinitionList()
+        def_list = DefinitionList(self.definitions)
+
+    def test_definitions(self):
+        def_list = DefinitionList()
+        self.assertEqual([], def_list.get_definitions())
+        counter = 0
+        for definition in self.definitions:
+            def_list.add_definition(definition)
+            counter += 1
+            self.assertEqual(self.definitions[:counter],
+                             def_list.get_definitions())
+        for counter in xrange(len(self.definitions)):
+            self.assertEqual(self.definitions[counter],
+                             def_list.get_definition(counter))
+        def_list.add_definition(DefinitionElement('test'), 1)
+        self.assertEqual(DefinitionElement('test'), def_list.get_definition(1))
+        def_list.remove_definition(1)
+        self.assertEqual(self.definitions, def_list.get_definitions())
+        for counter in xrange(len(self.definitions)):
+            def_list.remove_definition(0)
+            self.assertEqual(self.definitions[counter + 1:],
+                             def_list.get_definitions())
+
+    def test_equality(self):
+        self.assertEqual(DefinitionList(self.definitions),
+                         DefinitionList(self.definitions))
+        self.assertNotEqual(DefinitionList(), DefinitionList(self.definitions))
+        self.assertNotEqual(DefinitionList(), 'other type')
+
+    def test_search_by_name(self):
+        def_list = DefinitionList()
+        self.assertEqual(None, def_list.search_by_name('x'))
+        element_0 = DefinitionElement('x')
+        def_list.add_definition(element_0)
+        self.assertEqual(element_0, def_list.search_by_name('x'))
+        element_1 = DefinitionElement('x')
+        def_list.add_definition(element_1)
+        self.assertEqual(element_1, def_list.search_by_name('x'))
+        element_2 = DefinitionElement('x')
+        tree_1 = DefinitionTree('t', definitions = [element_2])
+        self.assertEqual(element_2, def_list.search_by_name('x'))
+        def_list.add_definition(element_1)
+        self.assertEqual(element_1, def_list.search_by_name('x'))
+
+    def test_to_string(self):
+        def_list = DefinitionList(self.definitions)
+        text = '<wrap>{0}</wrap>'.format(def_list)
+        copy = DefinitionList()
+        for lxml_definition in list(etree.XML(text)):
+            copy.add_definition(Definition.from_lxml_element(lxml_definition))
+        self.assertEqual(def_list, copy)
+
+class BadMarkupTest(unittest.TestCase):
+    def test_definition_tree(self):
+        text = '''
+<DEFINE>
+  <DEFINE value="x" />
+  <DEFINE vlaue="y" />
+  <UNKNOWN>
+    <CUSTOM />
+  </UNKNOWN>
+</DEFINE>'''
+        definition = Definition.from_string(text)
+        def_tree = definition.to_lxml_element()
+        self.assertEqual(2, len(def_tree.findall('DEFINE')))
+        unknown = def_tree.findall('UNKNOWN')
+        self.assertEqual(1, len(unknown))
+        unknown = unknown[0]
+        custom = list(unknown)
+        self.assertEqual(1, len(custom))
+        custom = custom[0]
+        self.assertEqual('CUSTOM', custom.tag)
+
+if __name__ == '__main__':
+    unittest.main()
diff --git a/myserver/src/GUI/MyServer/pycontrollib/test/log_test.py b/myserver/src/GUI/MyServer/pycontrollib/test/log_test.py
new file mode 100644
index 0000000..823eacb
--- /dev/null
+++ b/myserver/src/GUI/MyServer/pycontrollib/test/log_test.py
@@ -0,0 +1,425 @@
+# -*- coding: utf-8 -*-
+'''
+MyServer
+Copyright (C) 2009 Free Software Foundation, Inc.
+This program 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 3 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program.  If not, see <http://www.gnu.org/licenses/>.
+'''
+
+import unittest
+from log import Stream, Log
+from lxml import etree
+
+class StreamTest(unittest.TestCase):
+    def test_creation(self):
+        log = Stream()
+        log = Stream('/logs/MyServer.log')
+        log = Stream('/logs/MyServer.log', 1048576)
+        log = Stream('/logs/MyServer.log', 1048576, False)
+        log = Stream('/logs/MyServer.log', 1048576, False, ['gzip', 'bzip2'])
+
+    def test_location(self):
+        log = Stream()
+        self.assertEqual(None, log.get_location())
+        log.set_location('/logs/new.log')
+        self.assertEqual('/logs/new.log', log.get_location())
+        log.set_location(None)
+        self.assertEqual(None, log.get_location())
+        log = Stream('/logs/MyServer.log')
+        self.assertEqual('/logs/MyServer.log', log.get_location())
+        log = Stream(location = '/logs/MyServer.log')
+        self.assertEqual('/logs/MyServer.log', log.get_location())
+
+    def test_cycle(self):
+        log = Stream()
+        self.assertEqual(None, log.get_cycle())
+        log.set_cycle(123)
+        self.assertEqual(123, log.get_cycle())
+        log.set_cycle(None)
+        self.assertEqual(None, log.get_cycle())
+        log = Stream('path', 123)
+        self.assertEqual(123, log.get_cycle())
+        log = Stream(cycle = 123)
+        self.assertEqual(123, log.get_cycle())
+
+    def test_cycle_gzip(self):
+        log = Stream()
+        self.assertEqual(None, log.get_cycle_gzip())
+        log.set_cycle_gzip(True)
+        self.assertEqual(True, log.get_cycle_gzip())
+        log.set_cycle_gzip(None)
+        self.assertEqual(None, log.get_cycle_gzip())
+        log = Stream('path', 123, False)
+        self.assertEqual(False, log.get_cycle_gzip())
+        log = Stream(cycle_gzip = False)
+        self.assertEqual(False, log.get_cycle_gzip())
+
+    def test_filters(self):
+        log = Stream()
+        self.assertEqual([], log.get_filters())
+        log.add_filter('gzip')
+        self.assertEqual(['gzip'], log.get_filters())
+        log.add_filter('bzip2')
+        self.assertEqual(['gzip', 'bzip2'], log.get_filters())
+        log.add_filter('bzip2', 0)
+        self.assertEqual(['bzip2', 'gzip', 'bzip2'], log.get_filters())
+        self.assertEqual('gzip', log.get_filter(1))
+        log.remove_filter(1)
+        self.assertEqual(['bzip2', 'bzip2'], log.get_filters())
+        log = Stream('path', 123, False, ['gzip'])
+        self.assertEqual(['gzip'], log.get_filters())
+        log = Stream(filters = ['gzip'])
+        self.assertEqual(['gzip'], log.get_filters())
+
+    def test_from_string(self):
+        text = '<STREAM />'
+        log = Stream.from_string(text)
+        right = Stream()
+        self.assertEqual(log, right)
+
+    def test_from_string_location(self):
+        text = '<STREAM location="path" />'
+        log = Stream.from_string(text)
+        right = Stream(location = 'path')
+        self.assertEqual(log, right)
+
+    def test_from_string_cycle(self):
+        text = '<STREAM cycle="123" />'
+        log = Stream.from_string(text)
+        right = Stream(cycle = 123)
+        self.assertEqual(log, right)
+
+    def test_from_string_cycle_gzip(self):
+        text = '<STREAM cycle_gzip="NO" />'
+        log = Stream.from_string(text)
+        right = Stream(cycle_gzip = False)
+        self.assertEqual(log, right)
+
+    def test_from_string_filters(self):
+        text = '<STREAM><FILTER>gzip</FILTER><FILTER>bzip2</FILTER></STREAM>'
+        log = Stream.from_string(text)
+        right = Stream(filters = ['gzip', 'bzip2'])
+        self.assertEqual(log, right)
+
+    def test_from_string_full(self):
+        text = '''<STREAM location="path" cycle="123" cycle_gzip="NO">
+  <FILTER>gzip</FILTER>
+  <FILTER>bzip2</FILTER>
+</STREAM>'''
+        log = Stream.from_string(text)
+        right = Stream('path', 123, False, ['gzip', 'bzip2'])
+        self.assertEqual(log, right)
+
+    def test_from_lxml(self):
+        text = '<STREAM />'
+        log = Stream.from_lxml_element(etree.XML(text))
+        right = Stream()
+        self.assertEqual(log, right)
+
+    def test_from_lxml_location(self):
+        text = '<STREAM location="path" />'
+        log = Stream.from_lxml_element(etree.XML(text))
+        right = Stream(location = 'path')
+        self.assertEqual(log, right)
+
+    def test_from_lxml_cycle(self):
+        text = '<STREAM cycle="123" />'
+        log = Stream.from_lxml_element(etree.XML(text))
+        right = Stream(cycle = 123)
+        self.assertEqual(log, right)
+
+    def test_from_lxml_cycle_gzip(self):
+        text = '<STREAM cycle_gzip="NO" />'
+        log = Stream.from_lxml_element(etree.XML(text))
+        right = Stream(cycle_gzip = False)
+        self.assertEqual(log, right)
+
+    def test_from_lxml_filters(self):
+        text = '<STREAM><FILTER>gzip</FILTER><FILTER>bzip2</FILTER></STREAM>'
+        log = Stream.from_lxml_element(etree.XML(text))
+        right = Stream(filters = ['gzip', 'bzip2'])
+        self.assertEqual(log, right)
+
+    def test_from_lxml_full(self):
+        text = '''<STREAM location="path" cycle="123" cycle_gzip="NO">
+  <FILTER>gzip</FILTER>
+  <FILTER>bzip2</FILTER>
+</STREAM>'''
+        log = Stream.from_lxml_element(etree.XML(text))
+        right = Stream('path', 123, False, ['gzip', 'bzip2'])
+        self.assertEqual(log, right)
+
+    def test_bad_root_tag(self):
+        text = '<ERROR location="path" />'
+        self.assertRaises(AttributeError, Stream.from_string, text)
+        self.assertRaises(AttributeError, Stream.from_lxml_element,
+                          etree.XML(text))
+    
+    def test_equality(self):
+        self.assertEqual(Stream('path', 123, False, ['gzip', 'bzip2']),
+                         Stream('path', 123, False, ['gzip', 'bzip2']))
+        self.assertNotEqual(Stream('path1', 123, False, ['gzip', 'bzip2']),
+                            Stream('path2', 123, False, ['gzip', 'bzip2']))
+        self.assertNotEqual(Stream('path', 1234, False, ['gzip', 'bzip2']),
+                            Stream('path', 123, False, ['gzip', 'bzip2']))
+        self.assertNotEqual(Stream('path', 123, True, ['gzip', 'bzip2']),
+                            Stream('path', 123, False, ['gzip', 'bzip2']))
+        self.assertNotEqual(Stream('path', 123, False, ['bzip2']),
+                            Stream('path', 123, False, ['gzip', 'bzip2']))
+        self.assertNotEqual([], Stream('path'))
+
+    def test_to_string(self):
+        log = Stream()
+        copy = Stream.from_string(str(log))
+        self.assertEqual(log, copy)
+
+    def test_to_string_location(self):
+        log = Stream(location = 'path')
+        copy = Stream.from_string(str(log))
+        self.assertEqual(log, copy)
+
+    def test_to_string_cycle(self):
+        log = Stream(cycle = 123)
+        copy = Stream.from_string(str(log))
+        self.assertEqual(log, copy)
+
+    def test_to_string_cycle_gzip(self):
+        log = Stream(cycle_gzip = False)
+        copy = Stream.from_string(str(log))
+        self.assertEqual(log, copy)
+
+    def test_to_string_filters(self):
+        log = Stream(filters = ['gzip', 'bzip2'])
+        copy = Stream.from_string(str(log))
+        self.assertEqual(log, copy)
+
+    def test_to_string_full(self):
+        log = Stream('path', 123, False, ['gzip', 'bzip2'])
+        copy = Stream.from_string(str(log))
+        self.assertEqual(log, copy)
+
+    def test_to_lxml(self):
+        log = Stream()
+        copy = Stream.from_lxml_element(log.to_lxml_element())
+        self.assertEqual(log, copy)
+
+    def test_to_lxml_location(self):
+        log = Stream(location = 'path')
+        copy = Stream.from_lxml_element(log.to_lxml_element())
+        self.assertEqual(log, copy)
+
+    def test_to_lxml_cycle(self):
+        log = Stream(cycle = 123)
+        copy = Stream.from_lxml_element(log.to_lxml_element())
+        self.assertEqual(log, copy)
+
+    def test_to_lxml_cycle_gzip(self):
+        log = Stream(cycle_gzip = False)
+        copy = Stream.from_lxml_element(log.to_lxml_element())
+        self.assertEqual(log, copy)
+
+    def test_to_lxml_filters(self):
+        log = Stream(filters = ['gzip', 'bzip2'])
+        copy = Stream.from_lxml_element(log.to_lxml_element())
+        self.assertEqual(log, copy)
+
+    def test_to_lxml_full(self):
+        log = Stream('path', 123, False, ['gzip', 'bzip2'])
+        copy = Stream.from_lxml_element(log.to_lxml_element())
+        self.assertEqual(log, copy)
+
+class LogTest(unittest.TestCase):
+    def setUp(self):
+        self.stream_0 = Stream(location = 'file://logs/MyServerHTTP.log')
+        self.stream_1 = Stream(location = 'console://stdout', filters = ['gzip'])
+
+    def test_creation(self):
+        log = Log('ACCESSLOG')
+        log = Log('WARNINGLOG')
+        log = Log('ACCESSLOG', [self.stream_0])
+        log = Log('ACCESSLOG', [self.stream_0], 'combined')
+
+    def test_log_type(self):
+        log = Log('ACCESSLOG')
+        self.assertEqual('ACCESSLOG', log.get_log_type())
+        log.set_log_type('WARNINGLOG')
+        self.assertEqual('WARNINGLOG', log.get_log_type())
+        self.assertRaises(AttributeError, log.set_log_type, None)
+        self.assertRaises(AttributeError, Log, None)
+
+    def test_type(self):
+        log = Log('ACCESSLOG')
+        self.assertEqual(None, log.get_type())
+        log.set_type('combined')
+        self.assertEqual('combined', log.get_type())
+        log.set_type(None)
+        self.assertEqual(None, log.get_type())
+        log = Log('ACCESSLOG', [], 'combined')
+        self.assertEqual('combined', log.get_type())
+
+    def test_stream(self):
+        log = Log('ACCESSLOG')
+        self.assertEqual([], log.get_streams())
+        log.add_stream(self.stream_0)
+        self.assertEqual([self.stream_0], log.get_streams())
+        log.add_stream(self.stream_1)
+        self.assertEqual([self.stream_0, self.stream_1], log.get_streams())
+        log.add_stream(self.stream_1, 0)
+        self.assertEqual([self.stream_1, self.stream_0, self.stream_1],
+                         log.get_streams())
+        self.assertEqual(self.stream_0, log.get_stream(1))
+        log.remove_stream(1)
+        self.assertEqual([self.stream_1, self.stream_1], log.get_streams())
+        log = Log('ACCESSLOG', [self.stream_0])
+        self.assertEqual([self.stream_0], log.get_streams())
+
+    def test_from_string(self):
+        text = '<ACCESSLOG />'
+        log = Log.from_string(text)
+        right = Log('ACCESSLOG')
+        self.assertEqual(log, right)
+
+    def test_from_string_type(self):
+        text = '<ACCESSLOG type="combined" />'
+        log = Log.from_string(text)
+        right = Log('ACCESSLOG', type = "combined")
+        self.assertEqual(log, right)
+
+    def test_from_string_streams(self):
+        text = '<ACCESSLOG>{0}{1}</ACCESSLOG>'.format(self.stream_0, self.stream_1)
+        log = Log.from_string(text)
+        right = Log('ACCESSLOG', streams = [self.stream_0, self.stream_1])
+        self.assertEqual(log, right)
+
+    def test_from_string_full(self):
+        text = '<ACCESSLOG type="combined">{0}{1}</ACCESSLOG>'.format(self.stream_0, self.stream_1)
+        log = Log.from_string(text)
+        right = Log('ACCESSLOG', [self.stream_0, self.stream_1], 'combined')
+        self.assertEqual(log, right)
+
+    def test_from_lxml(self):
+        text = '<ACCESSLOG />'
+        log = Log.from_lxml_element(etree.XML(text))
+        right = Log('ACCESSLOG')
+        self.assertEqual(log, right)
+
+    def test_from_lxml_type(self):
+        text = '<ACCESSLOG type="combined" />'
+        log = Log.from_lxml_element(etree.XML(text))
+        right = Log('ACCESSLOG', type = "combined")
+        self.assertEqual(log, right)
+
+    def test_from_lxml_streams(self):
+        text = '<ACCESSLOG>{0}{1}</ACCESSLOG>'.format(self.stream_0, self.stream_1)
+        log = Log.from_lxml_element(etree.XML(text))
+        right = Log('ACCESSLOG', streams = [self.stream_0, self.stream_1])
+        self.assertEqual(log, right)
+
+    def test_from_lxml_full(self):
+        text = '<ACCESSLOG type="combined">{0}{1}</ACCESSLOG>'.format(self.stream_0, self.stream_1)
+        log = Log.from_lxml_element(etree.XML(text))
+        right = Log('ACCESSLOG', [self.stream_0, self.stream_1], 'combined')
+        self.assertEqual(log, right)
+
+    def test_equality(self):
+        self.assertEqual(Log('ACCESSLOG', [self.stream_0, self.stream_1], 'combined'),
+                         Log('ACCESSLOG', [self.stream_0, self.stream_1], 'combined'))
+        self.assertNotEqual(Log('ACCESSLOG', [self.stream_0], 'combined'),
+                            Log('WARNINGLOG', [self.stream_0], 'combined'))
+        self.assertNotEqual(Log('ACCESSLOG', [self.stream_0], 'combined'),
+                            Log('ACCESSLOG', [self.stream_1], 'combined'))
+        self.assertNotEqual(Log('ACCESSLOG', [self.stream_0], 'combined'),
+                            Log('WARNINGLOG', [self.stream_0], None))
+        self.assertNotEqual([], Log('ACCESSLOG'))
+
+    def test_to_string(self):
+        log = Log('ACCESSLOG')
+        copy = Log.from_string(str(log))
+        self.assertEqual(log, copy)
+
+    def test_to_string_type(self):
+        log = Log('ACCESSLOG', type = "combined")
+        copy = Log.from_string(str(log))
+        self.assertEqual(log, copy)
+
+    def test_to_string_streams(self):
+        log = Log('ACCESSLOG', streams = [self.stream_0, self.stream_1])
+        copy = Log.from_string(str(log))
+        self.assertEqual(log, copy)
+
+    def test_to_string_full(self):
+        log = Log('ACCESSLOG', [self.stream_0, self.stream_1], 'combined')
+        copy = Log.from_string(str(log))
+        self.assertEqual(log, copy)
+        
+    def test_to_lxml(self):
+        log = Log('ACCESSLOG')
+        copy = Log.from_lxml_element(log.to_lxml_element())
+        self.assertEqual(log, copy)
+
+    def test_to_lxml_type(self):
+        log = Log('ACCESSLOG', type = "combined")
+        copy = Log.from_lxml_element(log.to_lxml_element())
+        self.assertEqual(log, copy)
+
+    def test_to_lxml_streams(self):
+        log = Log('ACCESSLOG', streams = [self.stream_0, self.stream_1])
+        copy = Log.from_lxml_element(log.to_lxml_element())
+        self.assertEqual(log, copy)
+
+    def test_to_lxml_full(self):
+        log = Log('ACCESSLOG', [self.stream_0, self.stream_1], 'combined')
+        copy = Log.from_lxml_element(log.to_lxml_element())
+        self.assertEqual(log, copy)
+
+class BadMarkupTest(unittest.TestCase):
+    def test_stream(self):
+        text = '''
+<STREAM custom="unknown">
+  abc
+  <UNKNOWN>
+    <CUSTOM />
+  </UNKNOWN>
+</STREAM>'''
+        stream = Stream.from_string(text)
+        tree = stream.to_lxml_element()
+        self.assertEqual('unknown', tree.get('custom'))
+        unknown = tree.findall('UNKNOWN')
+        self.assertEqual(1, len(unknown))
+        unknown = unknown[0]
+        custom = list(unknown)
+        self.assertEqual(1, len(custom))
+        custom = custom[0]
+        self.assertEqual('CUSTOM', custom.tag)
+
+    def test_log(self):
+        text = '''
+<SOMELOG custom="unknown">
+  <STREAM>abc</STREAM>
+  <UNKNOWN>
+    <CUSTOM />
+  </UNKNOWN>
+</SOMELOG>'''
+        log = Log.from_string(text)
+        tree = log.to_lxml_element()
+        self.assertEqual('unknown', tree.get('custom'))
+        unknown = tree.findall('UNKNOWN')
+        self.assertEqual(1, len(unknown))
+        unknown = unknown[0]
+        custom = list(unknown)
+        self.assertEqual(1, len(custom))
+        custom = custom[0]
+        self.assertEqual('CUSTOM', custom.tag)
+
+if __name__ == '__main__':
+    unittest.main()
diff --git a/myserver/src/GUI/MyServer/pycontrollib/test/mimetypes_test.py b/myserver/src/GUI/MyServer/pycontrollib/test/mimetypes_test.py
new file mode 100644
index 0000000..4183577
--- /dev/null
+++ b/myserver/src/GUI/MyServer/pycontrollib/test/mimetypes_test.py
@@ -0,0 +1,484 @@
+# -*- coding: utf-8 -*-
+'''
+MyServer
+Copyright (C) 2009 Free Software Foundation, Inc.
+This program 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 3 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program.  If not, see <http://www.gnu.org/licenses/>.
+'''
+
+import unittest
+from lxml import etree
+from mimetypes import MIMEType, MIMETypes
+from definition import DefinitionElement, DefinitionTree
+
+class MIMETypeTest(unittest.TestCase):
+    def setUp(self):
+        self.definitions = []
+        self.definitions.append(DefinitionElement('http.use_error_file',
+                                                  {'value': 'YES'}))
+        self.definitions.append(DefinitionElement('http.error.file.404',
+                                                  {'value': '404.html'}))
+        self.definitions.append(
+            DefinitionTree(
+                'http.default_file',
+                [DefinitionElement(attributes = {'value': 'index.html'}),
+                 DefinitionElement(attributes = {'value': 'index.htm'})]))
+
+    def test_creation(self):
+        MIMEType('text/plain')
+        MIMEType('text/plain', 'CGI')
+        MIMEType('text/plain', 'CGI', '/usr/bin/python')
+        MIMEType('text/plain', 'CGI', '/usr/bin/python', set(['py']))
+        MIMEType('text/plain', 'CGI', '/usr/bin/python', set(['py']),
+                 '^/cgi-bin/.*$')
+        MIMEType('text/plain', 'CGI', '/usr/bin/python', set(['py']),
+                 '^/cgi-bin/.*$', ['gzip'])
+        MIMEType('text/plain', 'CGI', '/usr/bin/python', set(['py']),
+                 '^/cgi-bin/.*$', ['gzip'], 'NO')
+        MIMEType('text/plain', 'CGI', '/usr/bin/python', set(['py']),
+                 '^/cgi-bin/.*$', ['gzip'], 'NO', self.definitions)
+
+    def test_mime(self):
+        mime = MIMEType('text/plain', 'SEND')
+        self.assertEqual('text/plain', mime.get_mime())
+        mime.set_mime('application/xhtml+xml')
+        self.assertEqual('application/xhtml+xml', mime.get_mime())
+        self.assertRaises(AttributeError, mime.set_mime, None)
+        self.assertRaises(AttributeError, MIMEType, None, 'SEND')
+        
+    def test_handler(self):
+        mime = MIMEType('text/plain',)
+        self.assertEqual(None, mime.get_handler())
+        mime.set_handler('SEND')
+        self.assertEqual('SEND', mime.get_handler())
+        mime.set_handler(None)
+        self.assertEqual(None, mime.get_handler())
+        mime = MIMEType('text/plain', 'SEND')
+        self.assertEqual('SEND', mime.get_handler())
+        mime = MIMEType('text/plain', handler = 'SEND')
+        self.assertEqual('SEND', mime.get_handler())
+
+    def test_param(self):
+        mime = MIMEType('text/plain', 'SEND')
+        self.assertEqual(None, mime.get_param())
+        mime.set_param('/usr/bin/python')
+        self.assertEqual('/usr/bin/python', mime.get_param())
+        mime.set_param(None)
+        self.assertEqual(None, mime.get_param())
+        mime = MIMEType('text/plain', 'SEND', param = '/usr/bin/python')
+        self.assertEqual('/usr/bin/python', mime.get_param())
+    
+    def test_extension(self):
+        mime = MIMEType('text/plain', 'SEND')
+        self.assertEqual(set(), mime.get_extensions())
+        mime.add_extension('py')
+        mime.add_extension('html')
+        self.assertEqual(set(['py', 'html']), mime.get_extensions())
+        mime.remove_extension('py')
+        self.assertEqual(set(['html']), mime.get_extensions())
+        mime = MIMEType('text/plain', 'SEND', extensions = set(['py', 'html']))
+        self.assertEqual(set(['py', 'html']), mime.get_extensions())
+
+    def test_path(self):
+        mime = MIMEType('text/plain', 'SEND')
+        self.assertEqual(None, mime.get_path())
+        mime.set_path('^/www/.*$')
+        self.assertEqual('^/www/.*$', mime.get_path())
+        mime.set_path(None)
+        self.assertEqual(None, mime.get_path())
+        mime = MIMEType('text/plain', 'SEND', path = '^/www/.*$')
+        self.assertEqual('^/www/.*$', mime.get_path())
+
+    def test_filters(self):
+        mime = MIMEType('text/plain', 'SEND')
+        self.assertEqual([], mime.get_filters())
+        mime.add_filter('gzip')
+        mime.add_filter('bzip2')
+        self.assertEqual(['gzip', 'bzip2'], mime.get_filters())
+        mime.add_filter('bzip2', 0)
+        self.assertEqual(['bzip2', 'gzip', 'bzip2'], mime.get_filters())
+        mime.remove_filter(2)
+        self.assertEqual(['bzip2', 'gzip'], mime.get_filters())
+        self.assertEqual('gzip', mime.get_filter(1))
+        mime = MIMEType('text/plain', 'SEND', filters = ['gzip', 'bzip2'])
+        self.assertEqual(['gzip', 'bzip2'], mime.get_filters())
+
+    def test_self_executed(self):
+        mime = MIMEType('text/plain', 'SEND')
+        self.assertEqual(None, mime.get_self_executed())
+        mime.set_self_executed('YES')
+        self.assertEqual('YES', mime.get_self_executed())
+        mime.set_self_executed(None)
+        self.assertEqual(None, mime.get_self_executed())
+        mime = MIMEType('text/plain', 'SEND', self_executed = 'YES')
+        self.assertEqual('YES', mime.get_self_executed())
+        
+    def test_definitions(self):
+        mime = MIMEType('text/plain', 'SEND')
+        self.assertEqual([], mime.get_definitions())
+        for definition in self.definitions:
+            mime.add_definition(definition)
+        self.assertEqual(self.definitions, mime.get_definitions())
+        for i in xrange(len(self.definitions)):
+            self.assertEqual(self.definitions[i], mime.get_definition(i))
+        mime.remove_definition(0)
+        self.assertEqual(self.definitions[1:], mime.get_definitions())
+        mime = MIMEType('text/plain', 'SEND', definitions = self.definitions)
+        self.assertEqual(self.definitions, mime.get_definitions())
+        
+    def test_equality(self):
+        self.assertEqual(MIMEType('text/plain', 'CGI', '/usr/bin/python',
+                                  set(['py']), '^/.*$', ['gzip'], 'NO',
+                                  self.definitions),
+                         MIMEType('text/plain', 'CGI', '/usr/bin/python',
+                                  set(['py']), '^/.*$', ['gzip'], 'NO',
+                                  self.definitions))
+        self.assertNotEqual(MIMEType('text/plain', 'CGI', '/usr/bin/python',
+                                  set(['py']), '^/.*$', ['gzip'], 'NO',
+                                  self.definitions),
+                            MIMEType('other', 'CGI', '/usr/bin/python',
+                                  set(['py']), '^/.*$', ['gzip'], 'NO',
+                                     self.definitions))
+        self.assertNotEqual(MIMEType('text/plain', 'CGI', '/usr/bin/python',
+                                     set(['py']), '^/.*$', ['gzip'], 'NO',
+                                     self.definitions),
+                            MIMEType('text/plain', 'SEND', '/usr/bin/python',
+                                     set(['py']), '^/.*$', ['gzip'], 'NO',
+                                     self.definitions))
+        self.assertNotEqual(MIMEType('text/plain', 'CGI', '/usr/bin/python',
+                                     set(['py']), '^/.*$', ['gzip'], 'NO',
+                                     self.definitions),
+                            MIMEType('text/plain', 'CGI', '/usr/bin/python26',
+                                     set(['py']), '^/.*$', ['gzip'], 'NO',
+                                     self.definitions))
+        self.assertNotEqual(MIMEType('text/plain', 'CGI', '/usr/bin/python',
+                                     set(['py']), '^/.*$', ['gzip'], 'NO',
+                                     self.definitions),
+                            MIMEType('text/plain', 'CGI', '/usr/bin/python',
+                                     set(['pyc']), '^/.*$', ['gzip'], 'NO',
+                                     self.definitions))
+        self.assertNotEqual(MIMEType('text/plain', 'CGI', '/usr/bin/python',
+                                     set(['py']), '^/.*$', ['gzip'], 'NO',
+                                     self.definitions),
+                            MIMEType('text/plain', 'CGI', '/usr/bin/python',
+                                     set(['py']), '^/other/.*$', ['gzip'], 'NO',
+                                     self.definitions))
+        self.assertNotEqual(MIMEType('text/plain', 'CGI', '/usr/bin/python',
+                                     set(['py']), '^/.*$', ['gzip'], 'NO',
+                                     self.definitions),
+                            MIMEType('text/plain', 'CGI', '/usr/bin/python',
+                                     set(['py']), '^/.*$', ['bzip2'], 'NO',
+                                     self.definitions))
+        self.assertNotEqual(MIMEType('text/plain', 'CGI', '/usr/bin/python',
+                                     set(['py']), '^/.*$', ['gzip'], 'NO',
+                                     self.definitions),
+                            MIMEType('text/plain', 'CGI', '/usr/bin/python',
+                                     set(['py']), '^/.*$', ['gzip'], 'YES',
+                                     self.definitions))
+        self.assertNotEqual(MIMEType('text/plain', 'CGI', '/usr/bin/python',
+                                     set(['py']), '^/.*$', ['gzip'], 'NO',
+                                     self.definitions),
+                            MIMEType('text/plain', 'CGI', '/usr/bin/python',
+                                     set(['py']), '^/.*$', ['gzip'], 'NO',
+                                     []))
+        self.assertNotEqual(MIMEType('text/plain', 'SEND'), 'other type')
+
+    def test_from_string(self):
+        text = '<MIME mime="text/plain" handler="SEND" />'
+        mime = MIMEType.from_string(text)
+        right = MIMEType('text/plain', 'SEND')
+        self.assertEqual(mime, right)
+
+    def test_from_string_param(self):
+        text = '<MIME mime="text/plain" handler="SEND" param="/usr/bin/python" />'
+        mime = MIMEType.from_string(text)
+        right = MIMEType('text/plain', 'SEND', '/usr/bin/python')
+        self.assertEqual(mime, right)
+
+    def test_from_string_extension(self):
+        text = '<MIME mime="text/plain" handler="SEND"><EXTENSION value="py" /></MIME>'
+        mime = MIMEType.from_string(text)
+        right = MIMEType('text/plain', 'SEND', extensions = ['py'])
+        self.assertEqual(mime, right)
+
+    def test_from_string_path(self):
+        text = '<MIME mime="text/plain" handler="SEND"><PATH regex="^/.*$" /></MIME>'
+        mime = MIMEType.from_string(text)
+        right = MIMEType('text/plain', 'SEND', path = '^/.*$')
+        self.assertEqual(mime, right)
+
+    def test_from_string_filter(self):
+        text = '''<MIME mime="text/plain" handler="SEND">
+  <FILTER value="gzip" />
+  <FILTER value="bzip2" />
+</MIME>'''
+        mime = MIMEType.from_string(text)
+        right = MIMEType('text/plain', 'SEND', filters = ['gzip', 'bzip2'])
+        self.assertEqual(mime, right)
+
+    def test_from_string_self_executed(self):
+        text = '<MIME mime="text/plain" handler="SEND" self="YES" />'
+        mime = MIMEType.from_string(text)
+        right = MIMEType('text/plain', 'SEND', self_executed = 'YES')
+        self.assertEqual(mime, right)
+
+    def test_from_string_definitions(self):
+        text = '<MIME mime="text/plain" handler="SEND">{0}</MIME>'.format(
+            '\n'.join(map(str, self.definitions)))
+        mime = MIMEType.from_string(text)
+        right = MIMEType('text/plain', 'SEND', definitions = self.definitions)
+        self.assertEqual(mime, right)
+        
+    def test_from_string_full(self):
+        text = '''<MIME mime="text/plain" handler="SEND" self="YES" param="python">
+  <EXTENSION value="py" />
+  <FILTER value="gzip" />
+  <FILTER value="bzip2" />
+  <PATH regex="^/.*$" />
+  {0}
+</MIME>'''.format('\n'.join(map(str, self.definitions)))
+        mime = MIMEType.from_string(text)
+        right = MIMEType('text/plain', 'SEND', 'python', ['py'], '^/.*$',
+                         ['gzip', 'bzip2'], 'YES', self.definitions)
+        self.assertEqual(mime, right)
+
+    def test_from_lxml(self):
+        text = '<MIME mime="text/plain" handler="SEND" />'
+        mime = MIMEType.from_lxml_element(etree.XML(text))
+        right = MIMEType('text/plain', 'SEND')
+        self.assertEqual(mime, right)
+
+    def test_from_lxml_param(self):
+        text = '<MIME mime="text/plain" handler="SEND" param="/usr/bin/python" />'
+        mime = MIMEType.from_lxml_element(etree.XML(text))
+        right = MIMEType('text/plain', 'SEND', '/usr/bin/python')
+        self.assertEqual(mime, right)
+
+    def test_from_lxml_extension(self):
+        text = '<MIME mime="text/plain" handler="SEND"><EXTENSION value="py" /></MIME>'
+        mime = MIMEType.from_lxml_element(etree.XML(text))
+        right = MIMEType('text/plain', 'SEND', extensions = ['py'])
+        self.assertEqual(mime, right)
+
+    def test_from_lxml_path(self):
+        text = '<MIME mime="text/plain" handler="SEND"><PATH regex="^/.*$" /></MIME>'
+        mime = MIMEType.from_lxml_element(etree.XML(text))
+        right = MIMEType('text/plain', 'SEND', path = '^/.*$')
+        self.assertEqual(mime, right)
+
+    def test_from_lxml_filter(self):
+        text = '''<MIME mime="text/plain" handler="SEND">
+  <FILTER value="gzip" />
+  <FILTER value="bzip2" />
+</MIME>'''
+        mime = MIMEType.from_lxml_element(etree.XML(text))
+        right = MIMEType('text/plain', 'SEND', filters = ['gzip', 'bzip2'])
+        self.assertEqual(mime, right)
+
+    def test_from_lxml_self_executed(self):
+        text = '<MIME mime="text/plain" handler="SEND" self="YES" />'
+        mime = MIMEType.from_lxml_element(etree.XML(text))
+        right = MIMEType('text/plain', 'SEND', self_executed = 'YES')
+        self.assertEqual(mime, right)
+
+    def test_from_lxml_definitions(self):
+        text = '<MIME mime="text/plain" handler="SEND">{0}</MIME>'.format(
+            '\n'.join(map(str, self.definitions)))
+        mime = MIMEType.from_lxml_element(etree.XML(text))
+        right = MIMEType('text/plain', 'SEND', definitions = self.definitions)
+        self.assertEqual(mime, right)
+
+    def test_from_lxml_full(self):
+        text = '''<MIME mime="text/plain" handler="SEND" self="YES" param="python">
+  <EXTENSION value="py" />
+  <FILTER value="gzip" />
+  <FILTER value="bzip2" />
+  <PATH regex="^/.*$" />
+  {0}
+</MIME>'''.format('\n'.join(map(str, self.definitions)))
+        mime = MIMEType.from_lxml_element(etree.XML(text))
+        right = MIMEType('text/plain', 'SEND', 'python', ['py'], '^/.*$',
+                         ['gzip', 'bzip2'], 'YES', self.definitions)
+        self.assertEqual(mime, right)
+
+    def test_bad_root_tag(self):
+        text = '<ERROR mime="application/xhtml+xml" handler="CGI" />'
+        self.assertRaises(AttributeError, MIMEType.from_string, text)
+        self.assertRaises(AttributeError, MIMEType.from_lxml_element,
+                          etree.XML(text))
+        
+    def test_to_string(self):
+        mime = MIMEType('text/plain', 'SEND')
+        copy = MIMEType.from_string(str(mime))
+        self.assertEqual(mime, copy)
+
+    def test_to_string_param(self):
+        mime = MIMEType('text/plain', 'SEND', '/usr/bin/python')
+        copy = MIMEType.from_string(str(mime))
+        self.assertEqual(mime, copy)
+
+    def test_to_string_extension(self):
+        mime = MIMEType('text/plain', 'SEND', extensions = ['py'])
+        copy = MIMEType.from_string(str(mime))
+        self.assertEqual(mime, copy)
+
+    def test_to_string_path(self):
+        mime = MIMEType('text/plain', 'SEND', path = '^/.*$')
+        copy = MIMEType.from_string(str(mime))
+        self.assertEqual(mime, copy)
+
+    def test_to_string_filter(self):
+        mime = MIMEType('text/plain', 'SEND', filters = ['gzip', 'bzip2'])
+        copy = MIMEType.from_string(str(mime))
+        self.assertEqual(mime, copy)
+
+    def test_to_string_self_executed(self):
+        mime = MIMEType('text/plain', 'SEND', self_executed = 'YES')
+        copy = MIMEType.from_string(str(mime))
+        self.assertEqual(mime, copy)
+
+    def test_to_string_definitions(self):
+        mime = MIMEType('text/plain', 'SEND', definitions = self.definitions)
+        copy = MIMEType.from_string(str(mime))
+        self.assertEqual(mime, copy)
+        
+    def test_to_string_full(self):
+        mime = MIMEType('text/plain', 'SEND', 'python', ['py'], '^/.*$',
+                        ['gzip', 'bzip2'], 'YES', self.definitions)
+        copy = MIMEType.from_string(str(mime))
+        self.assertEqual(mime, copy)
+
+    def test_to_lxml(self):
+        mime = MIMEType('text/plain', 'SEND')
+        copy = MIMEType.from_lxml_element(mime.to_lxml_element())
+        self.assertEqual(mime, copy)
+
+    def test_to_lxml_param(self):
+        mime = MIMEType('text/plain', 'SEND', '/usr/bin/python')
+        copy = MIMEType.from_lxml_element(mime.to_lxml_element())
+        self.assertEqual(mime, copy)
+
+    def test_to_lxml_extension(self):
+        mime = MIMEType('text/plain', 'SEND', extensions = ['py'])
+        copy = MIMEType.from_lxml_element(mime.to_lxml_element())
+        self.assertEqual(mime, copy)
+
+    def test_to_lxml_path(self):
+        mime = MIMEType('text/plain', 'SEND', path = '^/.*$')
+        copy = MIMEType.from_lxml_element(mime.to_lxml_element())
+        self.assertEqual(mime, copy)
+
+    def test_to_lxml_filter(self):
+        mime = MIMEType('text/plain', 'SEND', filters = ['gzip', 'bzip2'])
+        copy = MIMEType.from_lxml_element(mime.to_lxml_element())
+        self.assertEqual(mime, copy)
+
+    def test_to_lxml_self_executed(self):
+        mime = MIMEType('text/plain', 'SEND', self_executed = 'YES')
+        copy = MIMEType.from_lxml_element(mime.to_lxml_element())
+        self.assertEqual(mime, copy)
+
+    def test_to_lxml_definitions(self):
+        mime = MIMEType('text/plain', 'SEND', definitions = self.definitions)
+        copy = MIMEType.from_lxml_element(mime.to_lxml_element())
+        self.assertEqual(mime, copy)
+        
+    def test_to_lxml_full(self):
+        mime = MIMEType('text/plain', 'SEND', 'python', ['py'], '^/.*$',
+                        ['gzip', 'bzip2'], 'YES', self.definitions)
+        copy = MIMEType.from_lxml_element(mime.to_lxml_element())
+        self.assertEqual(mime, copy)
+
+class MIMETypesTest(unittest.TestCase):
+    def setUp(self):
+        self.mime_0 = MIMEType('text/html', 'FASTCGI', '', self_executed = 'YES',
+                               extensions = ['fcgi'])
+        self.mime_1 = MIMEType('text/plain', 'SEND', '',
+                               extensions = ['asc', 'c', 'cc', 'f', 'f90', 'h', 'hh'])
+        self.text = '<MIMES>{0}{1}</MIMES>'.format(self.mime_0, self.mime_1)
+    
+    def test_creation(self):
+        mimes = MIMETypes([self.mime_0, self.mime_1])
+        self.assertEqual(mimes.MIME_types[0], self.mime_0)
+        self.assertEqual(mimes.MIME_types[1], self.mime_1)
+
+    def test_from_string(self):
+        mimes = MIMETypes.from_string(self.text)
+        self.assertEqual(mimes.MIME_types[0], self.mime_0)
+        self.assertEqual(mimes.MIME_types[1], self.mime_1)
+
+    def test_from_lxml(self):
+        mimes = MIMETypes.from_lxml_element(etree.XML(self.text))
+        self.assertEqual(mimes.MIME_types[0], self.mime_0)
+        self.assertEqual(mimes.MIME_types[1], self.mime_1)
+        
+    def test_to_string(self):
+        mimes = MIMETypes.from_string(self.text)
+        copy = MIMETypes.from_string(str(mimes))
+        self.assertEqual(mimes, copy)
+        
+    def test_to_lxml(self):
+        mimes = MIMETypes.from_string(self.text)
+        copy = MIMETypes.from_lxml_element(mimes.to_lxml_element())
+        self.assertEqual(mimes, copy)
+
+    def test_equality(self):
+        self.assertEqual(MIMETypes.from_string(self.text),
+                         MIMETypes.from_string(self.text))
+        self.assertNotEqual(MIMETypes.from_string(self.text),
+                            MIMETypes.from_string(
+                '<MIMES>{0}</MIMES>'.format(self.mime_0)))
+        self.assertNotEqual(MIMETypes.from_string(self.text), [])
+
+    def test_bad_root_tag(self):
+        text = '<ERROR>{0}{1}</ERROR>'.format(
+            self.mime_0, self.mime_1)
+        self.assertRaises(AttributeError, MIMETypes.from_string, text)
+        self.assertRaises(AttributeError, MIMETypes.from_lxml_element,
+                          etree.XML(text))
+
+class BadMarkupTest(unittest.TestCase):
+    def test_mime_types(self):
+        text = '''
+<MIMES custom="unknown">
+  <MIME mime="text/plain" />
+  <MIME mime="text/html" />
+  <UNKNOWN>
+    <CUSTOM />
+  </UNKNOWN>
+</MIMES>'''
+        mimes = MIMETypes.from_string(text)
+        tree = mimes.to_lxml_element()
+        self.assertEqual('unknown', tree.get('custom'))
+        self.assertEqual(2, len(tree.findall('MIME')))
+        unknown = tree.findall('UNKNOWN')
+        self.assertEqual(1, len(unknown))
+        unknown = unknown[0]
+        custom = list(unknown)
+        self.assertEqual(1, len(custom))
+        custom = custom[0]
+        self.assertEqual('CUSTOM', custom.tag)
+
+    def test_mime_type(self):
+        text = '''
+<MIME mime="text/plain" custom="unknown">
+  <CUSTOM />
+</MIME>'''
+        mime = MIMEType.from_string(text)
+        tree = mime.to_lxml_element()
+        self.assertEqual('unknown', tree.get('custom'))
+        custom = tree.findall('CUSTOM')
+        self.assertEqual(1, len(custom))
+        
+if __name__ == '__main__':
+    unittest.main()
diff --git a/myserver/src/GUI/MyServer/pycontrollib/test/security_test.py b/myserver/src/GUI/MyServer/pycontrollib/test/security_test.py
new file mode 100644
index 0000000..a9e4ba3
--- /dev/null
+++ b/myserver/src/GUI/MyServer/pycontrollib/test/security_test.py
@@ -0,0 +1,1122 @@
+# -*- coding: utf-8 -*-
+'''
+MyServer
+Copyright (C) 2009 Free Software Foundation, Inc.
+This program 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 3 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program.  If not, see <http://www.gnu.org/licenses/>.
+'''
+
+from security import SecurityElement, User, Condition, Permission, Return, SecurityList
+from definition import Definition
+from lxml import etree
+import unittest
+
+class SecurityElementTest(unittest.TestCase):
+    def test_creation(self):
+        element = SecurityElement()
+
+    def test_from_string(self):
+        text = '<USER />'
+        element = SecurityElement.from_string(text)
+        self.assertTrue(isinstance(element, User))
+        text = '<CONDITION />'
+        element = SecurityElement.from_string(text)
+        self.assertTrue(isinstance(element, Condition))
+        text = '<PERMISSION />'
+        element = SecurityElement.from_string(text)
+        self.assertTrue(isinstance(element, Permission))
+        text = '<RETURN />'
+        element = SecurityElement.from_string(text)
+        self.assertTrue(isinstance(element, Return))
+        text = '<DEFINE />'
+        element = SecurityElement.from_string(text)
+        self.assertTrue(isinstance(element, Definition))
+
+class ConditionTest(unittest.TestCase):
+    def test_creation(self):
+        condition = Condition()
+        condition = Condition('name')
+        condition = Condition('name', 'value')
+        condition = Condition('name', 'value', False)
+        condition = Condition('name', 'value', False, False)
+        condition = Condition('name', 'value', False, False, [])
+
+    def test_name(self):
+        condition = Condition('name1')
+        self.assertEqual('name1', condition.get_name())
+        condition.set_name('name2')
+        self.assertEqual('name2', condition.get_name())
+        condition.set_name(None)
+        self.assertEqual(None, condition.get_name())
+        condition = Condition(name = 'name1')
+        self.assertEqual('name1', condition.get_name())
+
+    def test_value(self):
+        condition = Condition('name1', 'value1')
+        self.assertEqual('value1', condition.get_value())
+        condition.set_value('value2')
+        self.assertEqual('value2', condition.get_value())
+        condition.set_value(None)
+        self.assertEqual(None, condition.get_value())
+        condition = Condition(value = 'value1')
+        self.assertEqual('value1', condition.get_value())
+
+    def test_reverse(self):
+        condition = Condition('name1', 'value1', False)
+        self.assertFalse(condition.get_reverse())
+        condition.set_reverse(True)
+        self.assertTrue(condition.get_reverse())
+        condition.set_reverse(None)
+        self.assertEqual(None, condition.get_reverse())
+        condition = Condition(reverse = True)
+        self.assertTrue(condition.get_reverse())
+
+    def test_regex(self):
+        condition = Condition('name1', 'value1', False, False)
+        self.assertFalse(condition.get_regex())
+        condition.set_regex(True)
+        self.assertTrue(condition.get_regex())
+        condition.set_regex(None)
+        self.assertEqual(None, condition.get_regex())
+        condition = Condition(regex = True)
+        self.assertTrue(condition.get_regex())
+
+    def test_sub_elements(self):
+        element_0 = Condition()
+        element_1 = Return()
+        condition = Condition()
+        self.assertEqual(0, len(condition.get_sub_elements()))
+        condition.add_sub_element(element_0)
+        self.assertEqual(1, len(condition.get_sub_elements()))
+        self.assertEqual(element_0, condition.get_sub_element(0))
+        condition.add_sub_element(element_1)
+        self.assertEqual(2, len(condition.get_sub_elements()))
+        self.assertEqual(element_0, condition.get_sub_element(0))
+        self.assertEqual(element_1, condition.get_sub_element(1))
+        condition.remove_sub_element(0)
+        self.assertEqual(1, len(condition.get_sub_elements()))
+        self.assertEqual(element_1, condition.get_sub_element(0))
+        condition.add_sub_element(element_0, 0)
+        self.assertEqual(2, len(condition.get_sub_elements()))
+        self.assertEqual(element_0, condition.get_sub_element(0))
+        self.assertEqual(element_1, condition.get_sub_element(1))
+        self.assertRaises(IndexError, condition.get_sub_element, 2)
+        condition = Condition(sub_elements = [element_0, element_1])
+        self.assertEqual(2, len(condition.get_sub_elements()))
+        self.assertEqual(element_0, condition.get_sub_element(0))
+        self.assertEqual(element_1, condition.get_sub_element(1))
+
+    def test_equality(self):
+        self.assertEqual(
+            Condition('name1', 'value1', False, False, []),
+            Condition('name1', 'value1', False, False, []))
+        self.assertNotEqual(
+            Condition('name1', 'value1', False, False, []),
+            Condition('name2', 'value1', False, False, []))
+        self.assertNotEqual(
+            Condition('name1', 'value1', False, False, []),
+            Condition('name1', 'value2', False, False, []))
+        self.assertNotEqual(
+            Condition('name1', 'value1', False, False, []),
+            Condition('name1', 'value1', True, False, []))
+        self.assertNotEqual(
+            Condition('name1', 'value1', False, False, []),
+            Condition('name1', 'value1', False, True, []))
+        self.assertNotEqual(
+            Condition('name1', 'value1', False, False, []),
+            Condition('name1', 'value1', False, False, [Condition()]))
+        self.assertNotEqual(Condition(), 'another type')
+
+    def test_from_string(self):
+        text = '<CONDITION />'
+        condition = Condition.from_string(text)
+        right = Condition()
+        self.assertEqual(condition, right)
+
+    def test_from_string_name(self):
+        text = '<CONDITION name="test" />'
+        condition = Condition.from_string(text)
+        right = Condition(name = 'test')
+        self.assertEqual(condition, right)
+
+    def test_from_string_value(self):
+        text = '<CONDITION value="test" />'
+        condition = Condition.from_string(text)
+        right = Condition(value = 'test')
+        self.assertEqual(condition, right)
+
+    def test_from_string_reverse(self):
+        text = '<CONDITION not="yes" />'
+        condition = Condition.from_string(text)
+        right = Condition(reverse = True)
+        self.assertEqual(condition, right)
+
+    def test_from_string_regex(self):
+        text = '<CONDITION regex="yes" />'
+        condition = Condition.from_string(text)
+        right = Condition(regex = True)
+        self.assertEqual(condition, right)
+
+    def test_from_string_sub_elements(self):
+        text = '<CONDITION><PERMISSION /><RETURN /></CONDITION>'
+        condition = Condition.from_string(text)
+        right = Condition(sub_elements = [Permission(), Return()])
+        self.assertEqual(condition, right)
+
+    def test_from_string_full(self):
+        text = '''
+<CONDITION name="name" value="value" not="yes" regex="yes">
+  <PERMISSION />
+  <RETURN />
+</CONDITION>'''
+        condition = Condition.from_string(text)
+        right = Condition('name', 'value', True, True,
+                          [Permission(), Return()])
+        self.assertEqual(condition, right)
+
+    def test_from_lxml(self):
+        text = '<CONDITION />'
+        condition = Condition.from_lxml_element(etree.XML(text))
+        right = Condition()
+        self.assertEqual(condition, right)
+
+    def test_from_lxml_name(self):
+        text = '<CONDITION name="test" />'
+        condition = Condition.from_lxml_element(etree.XML(text))
+        right = Condition(name = 'test')
+        self.assertEqual(condition, right)
+
+    def test_from_lxml_value(self):
+        text = '<CONDITION value="test" />'
+        condition = Condition.from_lxml_element(etree.XML(text))
+        right = Condition(value = 'test')
+        self.assertEqual(condition, right)
+
+    def test_from_lxml_reverse(self):
+        text = '<CONDITION not="yes" />'
+        condition = Condition.from_lxml_element(etree.XML(text))
+        right = Condition(reverse = True)
+        self.assertEqual(condition, right)
+
+    def test_from_lxml_regex(self):
+        text = '<CONDITION regex="yes" />'
+        condition = Condition.from_lxml_element(etree.XML(text))
+        right = Condition(regex = True)
+        self.assertEqual(condition, right)
+
+    def test_from_lxml_sub_elements(self):
+        text = '<CONDITION><PERMISSION /><RETURN /></CONDITION>'
+        condition = Condition.from_lxml_element(etree.XML(text))
+        right = Condition(sub_elements = [Permission(), Return()])
+        self.assertEqual(condition, right)
+
+    def test_from_lxml_full(self):
+        text = '''
+<CONDITION name="name" value="value" not="yes" regex="yes">
+  <PERMISSION />
+  <RETURN />
+</CONDITION>'''
+        condition = Condition.from_lxml_element(etree.XML(text))
+        right = Condition('name', 'value', True, True,
+                          [Permission(), Return()])
+        self.assertEqual(condition, right)
+
+    def test_to_string(self):
+        condition = Condition()
+        copy = Condition.from_string(str(condition))
+        self.assertEqual(condition, copy)
+
+    def test_to_string_name(self):
+        condition = Condition(name = 'name')
+        copy = Condition.from_string(str(condition))
+        self.assertEqual(condition, copy)
+
+    def test_to_string_value(self):
+        condition = Condition(value = 'value')
+        copy = Condition.from_string(str(condition))
+        self.assertEqual(condition, copy)
+
+    def test_to_string_reverse(self):
+        condition = Condition(reverse = True)
+        copy = Condition.from_string(str(condition))
+        self.assertEqual(condition, copy)
+
+    def test_to_string_regex(self):
+        condition = Condition(regex = True)
+        copy = Condition.from_string(str(condition))
+        self.assertEqual(condition, copy)
+
+    def test_to_string_sub_elements(self):
+        condition = Condition(sub_elements = [Permission(), Return()])
+        copy = Condition.from_string(str(condition))
+        self.assertEqual(condition, copy)
+
+    def test_to_string_full(self):
+        condition = Condition('name', 'value', True, True,
+                              [Permission(), Return()])
+        copy = Condition.from_string(str(condition))
+        self.assertEqual(condition, copy)
+
+    def test_to_lxml(self):
+        condition = Condition()
+        copy = Condition.from_lxml_element(condition.to_lxml_element())
+        self.assertEqual(condition, copy)
+
+    def test_to_lxml_name(self):
+        condition = Condition(name = 'name')
+        copy = Condition.from_lxml_element(condition.to_lxml_element())
+        self.assertEqual(condition, copy)
+
+    def test_to_lxml_value(self):
+        condition = Condition(value = 'value')
+        copy = Condition.from_lxml_element(condition.to_lxml_element())
+        self.assertEqual(condition, copy)
+
+    def test_to_lxml_reverse(self):
+        condition = Condition(reverse = True)
+        copy = Condition.from_lxml_element(condition.to_lxml_element())
+        self.assertEqual(condition, copy)
+
+    def test_to_lxml_regex(self):
+        condition = Condition(regex = True)
+        copy = Condition.from_lxml_element(condition.to_lxml_element())
+        self.assertEqual(condition, copy)
+
+    def test_to_lxml_sub_elements(self):
+        condition = Condition(sub_elements = [Permission(), Return()])
+        copy = Condition.from_lxml_element(condition.to_lxml_element())
+        self.assertEqual(condition, copy)
+
+    def test_to_lxml_full(self):
+        condition = Condition('name', 'value', True, True,
+                              [Permission(), Return()])
+        copy = Condition.from_lxml_element(condition.to_lxml_element())
+        self.assertEqual(condition, copy)
+
+    def test_bad_root_tag(self):
+        text = '<ERROR />'
+        self.assertRaises(AttributeError, Condition.from_string, text)
+        self.assertRaises(AttributeError, Condition.from_lxml_element,
+                          etree.XML(text))
+
+class PermissionTest(unittest.TestCase):
+    def test_creation(self):
+        permission = Permission()
+        permission = Permission(True)
+        permission = Permission(True, True)
+        permission = Permission(True, True, True)
+        permission = Permission(True, True, True, True)
+        permission = Permission(True, True, True, True, True)
+
+    def test_read(self):
+        permission = Permission(True)
+        self.assertTrue(permission.get_read())
+        permission.set_read(False)
+        self.assertFalse(permission.get_read())
+        permission.set_read(None)
+        self.assertEqual(None, permission.get_read())
+        permission = Permission(read = True)
+        self.assertTrue(permission.get_read())
+
+    def test_execute(self):
+        permission = Permission(True, True)
+        self.assertTrue(permission.get_execute())
+        permission.set_execute(False)
+        self.assertFalse(permission.get_execute())
+        permission.set_execute(None)
+        self.assertEqual(None, permission.get_execute())
+        permission = Permission(execute = True)
+        self.assertTrue(permission.get_execute())
+
+    def test_browse(self):
+        permission = Permission(True, True, False)
+        self.assertFalse(permission.get_browse())
+        permission.set_browse(True)
+        self.assertTrue(permission.get_browse())
+        permission.set_browse(None)
+        self.assertEqual(None, permission.get_browse())
+        permission = Permission(browse = True)
+        self.assertTrue(permission.get_browse())
+
+    def test_delete(self):
+        permission = Permission(True, True, False, False)
+        self.assertFalse(permission.get_delete())
+        permission.set_delete(True)
+        self.assertTrue(permission.get_delete())
+        permission.set_delete(None)
+        self.assertEqual(None, permission.get_delete())
+        permission = Permission(delete = True)
+        self.assertTrue(permission.get_delete())
+
+    def test_write(self):
+        permission = Permission(True, True, False, False, False)
+        self.assertFalse(permission.get_write())
+        permission.set_write(True)
+        self.assertTrue(permission.get_write())
+        permission.set_write(None)
+        self.assertEqual(None, permission.get_write())
+        permission = Permission(write = True)
+        self.assertTrue(permission.get_write())
+
+    def test_equality(self):
+        self.assertEqual(
+            Permission(False, False, False, False, False),
+            Permission(False, False, False, False, False))
+        self.assertNotEqual(
+            Permission(False, False, False, False, False),
+            Permission(True, False, False, False, False))
+        self.assertNotEqual(
+            Permission(False, False, False, False, False),
+            Permission(False, True, False, False, False))
+        self.assertNotEqual(
+            Permission(False, False, False, False, False),
+            Permission(False, False, True, False, False))
+        self.assertNotEqual(
+            Permission(False, False, False, False, False),
+            Permission(False, False, False, True, False))
+        self.assertNotEqual(
+            Permission(False, False, False, False, False),
+            Permission(False, False, False, False, True))
+        self.assertNotEqual(Permission(), 'another type')
+
+    def test_from_string(self):
+        text = '<PERMISSION />'
+        permission = Permission.from_string(text)
+        right = Permission()
+        self.assertEqual(permission, right)
+
+    def test_from_string_read(self):
+        text = '<PERMISSION READ="NO" />'
+        permission = Permission.from_string(text)
+        right = Permission(read = False)
+        self.assertEqual(permission, right)
+
+    def test_from_string_execute(self):
+        text = '<PERMISSION EXECUTE="NO" />'
+        permission = Permission.from_string(text)
+        right = Permission(execute = False)
+        self.assertEqual(permission, right)
+
+    def test_from_string_browse(self):
+        text = '<PERMISSION BROWSE="NO" />'
+        permission = Permission.from_string(text)
+        right = Permission(browse = False)
+        self.assertEqual(permission, right)
+
+    def test_from_string_delete(self):
+        text = '<PERMISSION DELETE="NO" />'
+        permission = Permission.from_string(text)
+        right = Permission(delete = False)
+        self.assertEqual(permission, right)
+
+    def test_from_string_write(self):
+        text = '<PERMISSION WRITE="NO" />'
+        permission = Permission.from_string(text)
+        right = Permission(write = False)
+        self.assertEqual(permission, right)
+
+    def test_from_string_full(self):
+        text = '''
+<PERMISSION READ="NO" EXECUTE="YES" BROWSE="NO" DELETE="YES" WRITE="NO" />'''
+        permission = Permission.from_string(text)
+        right = Permission(False, True, False, True, False)
+        self.assertEqual(permission, right)
+
+    def test_from_lxml(self):
+        text = '<PERMISSION />'
+        permission = Permission.from_lxml_element(etree.XML(text))
+        right = Permission()
+        self.assertEqual(permission, right)
+
+    def test_from_lxml_read(self):
+        text = '<PERMISSION READ="NO" />'
+        permission = Permission.from_lxml_element(etree.XML(text))
+        right = Permission(read = False)
+        self.assertEqual(permission, right)
+
+    def test_from_lxml_execute(self):
+        text = '<PERMISSION EXECUTE="NO" />'
+        permission = Permission.from_lxml_element(etree.XML(text))
+        right = Permission(execute = False)
+        self.assertEqual(permission, right)
+
+    def test_from_lxml_browse(self):
+        text = '<PERMISSION BROWSE="NO" />'
+        permission = Permission.from_lxml_element(etree.XML(text))
+        right = Permission(browse = False)
+        self.assertEqual(permission, right)
+
+    def test_from_lxml_delete(self):
+        text = '<PERMISSION DELETE="NO" />'
+        permission = Permission.from_lxml_element(etree.XML(text))
+        right = Permission(delete = False)
+        self.assertEqual(permission, right)
+
+    def test_from_lxml_write(self):
+        text = '<PERMISSION WRITE="NO" />'
+        permission = Permission.from_lxml_element(etree.XML(text))
+        right = Permission(write = False)
+        self.assertEqual(permission, right)
+
+    def test_from_lxml_full(self):
+        text = '''
+<PERMISSION READ="NO" EXECUTE="YES" BROWSE="NO" DELETE="YES" WRITE="NO" />'''
+        permission = Permission.from_lxml_element(etree.XML(text))
+        right = Permission(False, True, False, True, False)
+        self.assertEqual(permission, right)
+
+    def test_to_string(self):
+        permission = Permission()
+        copy = Permission.from_string(str(permission))
+        self.assertEqual(permission, copy)
+
+    def test_to_string_read(self):
+        permission = Permission(read = True)
+        copy = Permission.from_string(str(permission))
+        self.assertEqual(permission, copy)
+
+    def test_to_string_execute(self):
+        permission = Permission(execute = True)
+        copy = Permission.from_string(str(permission))
+        self.assertEqual(permission, copy)
+
+    def test_to_string_browse(self):
+        permission = Permission(browse = True)
+        copy = Permission.from_string(str(permission))
+        self.assertEqual(permission, copy)
+
+    def test_to_string_delete(self):
+        permission = Permission(delete = True)
+        copy = Permission.from_string(str(permission))
+        self.assertEqual(permission, copy)
+
+    def test_to_string_write(self):
+        permission = Permission(write = True)
+        copy = Permission.from_string(str(permission))
+        self.assertEqual(permission, copy)
+
+    def test_to_string_full(self):
+        permission = Permission(True, False, True, False, True)
+        copy = Permission.from_string(str(permission))
+        self.assertEqual(permission, copy)
+
+    def test_to_lxml(self):
+        permission = Permission()
+        copy = Permission.from_lxml_element(permission.to_lxml_element())
+        self.assertEqual(permission, copy)
+
+    def test_to_lxml_read(self):
+        permission = Permission(read = True)
+        copy = Permission.from_lxml_element(permission.to_lxml_element())
+        self.assertEqual(permission, copy)
+
+    def test_to_lxml_execute(self):
+        permission = Permission(execute = True)
+        copy = Permission.from_lxml_element(permission.to_lxml_element())
+        self.assertEqual(permission, copy)
+
+    def test_to_lxml_browse(self):
+        permission = Permission(browse = True)
+        copy = Permission.from_lxml_element(permission.to_lxml_element())
+        self.assertEqual(permission, copy)
+
+    def test_to_lxml_delete(self):
+        permission = Permission(delete = True)
+        copy = Permission.from_lxml_element(permission.to_lxml_element())
+        self.assertEqual(permission, copy)
+
+    def test_to_lxml_write(self):
+        permission = Permission(write = True)
+        copy = Permission.from_lxml_element(permission.to_lxml_element())
+        self.assertEqual(permission, copy)
+
+    def test_to_lxml_full(self):
+        permission = Permission(True, False, True, False, True)
+        copy = Permission.from_lxml_element(permission.to_lxml_element())
+        self.assertEqual(permission, copy)
+
+    def test_bad_root_tag(self):
+        text = '<ERROR />'
+        self.assertRaises(AttributeError, Permission.from_string, text)
+        self.assertRaises(AttributeError, Permission.from_lxml_element,
+                          etree.XML(text))
+
+class UserTest(unittest.TestCase):
+    def test_creation(self):
+        user = User()
+        user = User('name')
+        user = User('name', 'password')
+        user = User('name', 'password', True)
+        user = User('name', 'password', True, True)
+        user = User('name', 'password', True, True, True)
+        user = User('name', 'password', True, True, True, True)
+        user = User('name', 'password', True, True, True, True, True)
+
+    def test_name(self):
+        user = User('name')
+        self.assertEqual('name', user.get_name())
+        user.set_name('other')
+        self.assertEqual('other', user.get_name())
+        user.set_name(None)
+        self.assertEqual(None, user.get_name())
+        user = User(name = 'name')
+        self.assertEqual('name', user.get_name())
+
+    def test_password(self):
+        user = User('name', 'password')
+        self.assertEqual('password', user.get_password())
+        user.set_password('other')
+        self.assertEqual('other', user.get_password())
+        user.set_password(None)
+        self.assertEqual(None, user.get_password())
+        user = User(password = 'password')
+        self.assertEqual('password', user.get_password())
+
+    def test_read(self):
+        user = User('name', 'password', True)
+        self.assertTrue(user.get_read())
+        user.set_read(False)
+        self.assertFalse(user.get_read())
+        user.set_read(None)
+        self.assertEqual(None, user.get_read())
+        user = User(read = True)
+        self.assertTrue(user.get_read())
+
+    def test_execute(self):
+        user = User('name', 'password', True, True)
+        self.assertTrue(user.get_execute())
+        user.set_execute(False)
+        self.assertFalse(user.get_execute())
+        user.set_execute(None)
+        self.assertEqual(None, user.get_execute())
+        user = User(execute = True)
+        self.assertTrue(user.get_execute())
+
+    def test_browse(self):
+        user = User('name', 'password', True, True, False)
+        self.assertFalse(user.get_browse())
+        user.set_browse(True)
+        self.assertTrue(user.get_browse())
+        user.set_browse(None)
+        self.assertEqual(None, user.get_browse())
+        user = User(browse = True)
+        self.assertTrue(user.get_browse())
+
+    def test_delete(self):
+        user = User('name', 'password', True, True, False, False)
+        self.assertFalse(user.get_delete())
+        user.set_delete(True)
+        self.assertTrue(user.get_delete())
+        user.set_delete(None)
+        self.assertEqual(None, user.get_delete())
+        user = User(delete = True)
+        self.assertTrue(user.get_delete())
+
+    def test_write(self):
+        user = User('name', 'password', True, True, False, False, False)
+        self.assertFalse(user.get_write())
+        user.set_write(True)
+        self.assertTrue(user.get_write())
+        user.set_write(None)
+        self.assertEqual(None, user.get_write())
+        user = User(write = True)
+        self.assertTrue(user.get_write())
+
+    def test_equality(self):
+        self.assertEqual(
+            User('name', 'password', False, False, False, False, False),
+            User('name', 'password', False, False, False, False, False))
+        self.assertNotEqual(
+            User('name', 'password', False, False, False, False, False),
+            User('other', 'password', False, False, False, False, False))
+        self.assertNotEqual(
+            User('name', 'password', False, False, False, False, False),
+            User('name', 'other', False, False, False, False, False))
+        self.assertNotEqual(
+            User('name', 'password', False, False, False, False, False),
+            User('name', 'password', True, False, False, False, False))
+        self.assertNotEqual(
+            User('name', 'password', False, False, False, False, False),
+            User('name', 'password', False, True, False, False, False))
+        self.assertNotEqual(
+            User('name', 'password', False, False, False, False, False),
+            User('name', 'password', False, False, True, False, False))
+        self.assertNotEqual(
+            User('name', 'password', False, False, False, False, False),
+            User('name', 'password', False, False, False, True, False))
+        self.assertNotEqual(
+            User('name', 'password', False, False, False, False, False),
+            User('name', 'password', False, False, False, False, True))
+        self.assertNotEqual(User(), 'another type')
+
+    def test_from_string(self):
+        text = '<USER />'
+        user = User.from_string(text)
+        right = User()
+        self.assertEqual(user, right)
+
+    def test_from_string_name(self):
+        text = '<USER name="name" />'
+        user = User.from_string(text)
+        right = User(name = 'name')
+        self.assertEqual(user, right)
+
+    def test_from_string_password(self):
+        text = '<USER password="pass" />'
+        user = User.from_string(text)
+        right = User(password = 'pass')
+        self.assertEqual(user, right)
+
+    def test_from_string_read(self):
+        text = '<USER READ="NO" />'
+        user = User.from_string(text)
+        right = User(read = False)
+        self.assertEqual(user, right)
+
+    def test_from_string_execute(self):
+        text = '<USER EXECUTE="NO" />'
+        user = User.from_string(text)
+        right = User(execute = False)
+        self.assertEqual(user, right)
+
+    def test_from_string_browse(self):
+        text = '<USER BROWSE="NO" />'
+        user = User.from_string(text)
+        right = User(browse = False)
+        self.assertEqual(user, right)
+
+    def test_from_string_delete(self):
+        text = '<USER DELETE="NO" />'
+        user = User.from_string(text)
+        right = User(delete = False)
+        self.assertEqual(user, right)
+
+    def test_from_string_write(self):
+        text = '<USER WRITE="NO" />'
+        user = User.from_string(text)
+        right = User(write = False)
+        self.assertEqual(user, right)
+
+    def test_from_string_full(self):
+        text = '''
+<USER name="name" password="pass" READ="NO" EXECUTE="YES" BROWSE="NO"
+      DELETE="YES" WRITE="NO" />'''
+        user = User.from_string(text)
+        right = User('name', 'pass', False, True, False, True, False)
+        self.assertEqual(user, right)
+
+    def test_from_lxml(self):
+        text = '<USER />'
+        user = User.from_lxml_element(etree.XML(text))
+        right = User()
+        self.assertEqual(user, right)
+
+    def test_from_lxml_name(self):
+        text = '<USER name="name" />'
+        user = User.from_lxml_element(etree.XML(text))
+        right = User(name = 'name')
+        self.assertEqual(user, right)
+
+    def test_from_lxml_password(self):
+        text = '<USER password="pass" />'
+        user = User.from_lxml_element(etree.XML(text))
+        right = User(password = 'pass')
+        self.assertEqual(user, right)
+
+    def test_from_lxml_read(self):
+        text = '<USER READ="NO" />'
+        user = User.from_lxml_element(etree.XML(text))
+        right = User(read = False)
+        self.assertEqual(user, right)
+
+    def test_from_lxml_execute(self):
+        text = '<USER EXECUTE="NO" />'
+        user = User.from_lxml_element(etree.XML(text))
+        right = User(execute = False)
+        self.assertEqual(user, right)
+
+    def test_from_lxml_browse(self):
+        text = '<USER BROWSE="NO" />'
+        user = User.from_lxml_element(etree.XML(text))
+        right = User(browse = False)
+        self.assertEqual(user, right)
+
+    def test_from_lxml_delete(self):
+        text = '<USER DELETE="NO" />'
+        user = User.from_lxml_element(etree.XML(text))
+        right = User(delete = False)
+        self.assertEqual(user, right)
+
+    def test_from_lxml_write(self):
+        text = '<USER WRITE="NO" />'
+        user = User.from_lxml_element(etree.XML(text))
+        right = User(write = False)
+        self.assertEqual(user, right)
+
+    def test_from_lxml_full(self):
+        text = '''
+<USER name="name" password="pass" READ="NO" EXECUTE="YES" BROWSE="NO"
+      DELETE="YES" WRITE="NO" />'''
+        user = User.from_lxml_element(etree.XML(text))
+        right = User('name', 'pass', False, True, False, True, False)
+        self.assertEqual(user, right)
+
+    def test_to_string(self):
+        user = User()
+        copy = User.from_string(str(user))
+        self.assertEqual(user, copy)
+
+    def test_to_string_name(self):
+        user = User(name = 'name')
+        copy = User.from_string(str(user))
+        self.assertEqual(user, copy)
+
+    def test_to_string_password(self):
+        user = User(password = 'pass')
+        copy = User.from_string(str(user))
+        self.assertEqual(user, copy)
+
+    def test_to_string_read(self):
+        user = User(read = True)
+        copy = User.from_string(str(user))
+        self.assertEqual(user, copy)
+
+    def test_to_string_execute(self):
+        user = User(execute = True)
+        copy = User.from_string(str(user))
+        self.assertEqual(user, copy)
+
+    def test_to_string_browse(self):
+        user = User(browse = True)
+        copy = User.from_string(str(user))
+        self.assertEqual(user, copy)
+
+    def test_to_string_delete(self):
+        user = User(delete = True)
+        copy = User.from_string(str(user))
+        self.assertEqual(user, copy)
+
+    def test_to_string_write(self):
+        user = User(write = True)
+        copy = User.from_string(str(user))
+        self.assertEqual(user, copy)
+
+    def test_to_string_full(self):
+        user = User('name', 'pass', True, False, True, False, True)
+        copy = User.from_string(str(user))
+        self.assertEqual(user, copy)
+
+    def test_to_lxml(self):
+        user = User()
+        copy = User.from_lxml_element(user.to_lxml_element())
+        self.assertEqual(user, copy)
+
+    def test_to_lxml_name(self):
+        user = User(name = 'name')
+        copy = User.from_lxml_element(user.to_lxml_element())
+        self.assertEqual(user, copy)
+
+    def test_to_lxml_password(self):
+        user = User(password = 'pass')
+        copy = User.from_lxml_element(user.to_lxml_element())
+        self.assertEqual(user, copy)
+
+    def test_to_lxml_read(self):
+        user = User(read = True)
+        copy = User.from_lxml_element(user.to_lxml_element())
+        self.assertEqual(user, copy)
+
+    def test_to_lxml_execute(self):
+        user = User(execute = True)
+        copy = User.from_lxml_element(user.to_lxml_element())
+        self.assertEqual(user, copy)
+
+    def test_to_lxml_browse(self):
+        user = User(browse = True)
+        copy = User.from_lxml_element(user.to_lxml_element())
+        self.assertEqual(user, copy)
+
+    def test_to_lxml_delete(self):
+        user = User(delete = True)
+        copy = User.from_lxml_element(user.to_lxml_element())
+        self.assertEqual(user, copy)
+
+    def test_to_lxml_write(self):
+        user = User(write = True)
+        copy = User.from_lxml_element(user.to_lxml_element())
+        self.assertEqual(user, copy)
+
+    def test_to_lxml_full(self):
+        user = User('name', 'pass', True, False, True, False, True)
+        copy = User.from_lxml_element(user.to_lxml_element())
+        self.assertEqual(user, copy)
+
+    def test_bad_root_tag(self):
+        text = '<ERROR />'
+        self.assertRaises(AttributeError, User.from_string, text)
+        self.assertRaises(AttributeError, User.from_lxml_element,
+                          etree.XML(text))
+
+class ReturnTest(unittest.TestCase):
+    def test_creation(self):
+        ret = Return()
+        ret = Return('ALLOW')
+
+    def test_value(self):
+        ret = Return('ALLOW')
+        self.assertEqual('ALLOW', ret.get_value())
+        ret.set_value('DENY')
+        self.assertEqual('DENY', ret.get_value())
+        ret.set_value(None)
+        self.assertEqual(None, ret.get_value())
+        ret = Return(value = 'ALLOW')
+        self.assertEqual('ALLOW', ret.get_value())
+
+    def test_equality(self):
+        self.assertEqual(Return('ALLOW'), Return('ALLOW'))
+        self.assertNotEqual(Return('ALLOW'), Return('DENY'))
+        self.assertNotEqual(Return(), 'another type')
+
+    def test_from_string(self):
+        text = '<RETURN />'
+        ret = Return.from_string(text)
+        right = Return()
+        self.assertEqual(ret, right)
+
+    def test_from_string_value(self):
+        text = '<RETURN value="ALLOW" />'
+        ret = Return.from_string(text)
+        right = Return(value = 'ALLOW')
+        self.assertEqual(ret, right)
+
+    def test_from_lxml(self):
+        text = '<RETURN />'
+        ret = Return.from_lxml_element(etree.XML(text))
+        right = Return()
+        self.assertEqual(ret, right)
+
+    def test_from_lxml_value(self):
+        text = '<RETURN value="ALLOW" />'
+        ret = Return.from_lxml_element(etree.XML(text))
+        right = Return(value = 'ALLOW')
+        self.assertEqual(ret, right)
+
+    def test_to_string(self):
+        ret = Return()
+        copy = Return.from_string(str(ret))
+        self.assertEqual(ret, copy)
+
+    def test_to_string_value(self):
+        ret = Return(value = 'ALLOW')
+        copy = Return.from_string(str(ret))
+        self.assertEqual(ret, copy)
+
+    def test_to_lxml(self):
+        ret = Return()
+        copy = Return.from_lxml_element(ret.to_lxml_element())
+        self.assertEqual(ret, copy)
+
+    def test_to_lxml_value(self):
+        ret = Return(value = 'ALLOW')
+        copy = Return.from_lxml_element(ret.to_lxml_element())
+        self.assertEqual(ret, copy)
+
+    def test_bad_root_tag(self):
+        text = '<ERROR />'
+        self.assertRaises(AttributeError, Return.from_string, text)
+        self.assertRaises(AttributeError, Return.from_lxml_element,
+                          etree.XML(text))
+
+class SecurityListTest(unittest.TestCase):
+    def test_creation(self):
+        slist = SecurityList()
+        slist = SecurityList([Permission(), Return()])
+
+    def test_elements(self):
+        element_0 = Condition()
+        element_1 = Return()
+        slist = SecurityList()
+        self.assertEqual(0, len(slist.get_elements()))
+        slist.add_element(element_0)
+        self.assertEqual(1, len(slist.get_elements()))
+        self.assertEqual(element_0, slist.get_element(0))
+        slist.add_element(element_1)
+        self.assertEqual(2, len(slist.get_elements()))
+        self.assertEqual(element_0, slist.get_element(0))
+        self.assertEqual(element_1, slist.get_element(1))
+        slist.remove_element(0)
+        self.assertEqual(1, len(slist.get_elements()))
+        self.assertEqual(element_1, slist.get_element(0))
+        slist.add_element(element_0, 0)
+        self.assertEqual(2, len(slist.get_elements()))
+        self.assertEqual(element_0, slist.get_element(0))
+        self.assertEqual(element_1, slist.get_element(1))
+        self.assertRaises(IndexError, slist.get_element, 2)
+        slist = SecurityList(elements = [element_0, element_1])
+        self.assertEqual(2, len(slist.get_elements()))
+        self.assertEqual(element_0, slist.get_element(0))
+        self.assertEqual(element_1, slist.get_element(1))
+
+    def test_equality(self):
+        self.assertEqual(SecurityList([Condition()]),
+                         SecurityList([Condition()]))
+        self.assertNotEqual(SecurityList([Condition()]),
+                            SecurityList([]))
+        self.assertNotEqual(SecurityList(), 'another type')
+
+    def test_from_string(self):
+        text = '<SECURITY />'
+        slist = SecurityList.from_string(text)
+        right = SecurityList()
+        self.assertEqual(slist, right)
+
+    def test_from_string_elements(self):
+        text = '<SECURITY><CONDITION /><RETURN /></SECURITY>'
+        slist = SecurityList.from_string(text)
+        right = SecurityList([Condition(), Return()])
+        self.assertEqual(slist, right)
+
+    def test_from_lxml(self):
+        text = '<SECURITY />'
+        slist = SecurityList.from_lxml_element(etree.XML(text))
+        right = SecurityList()
+        self.assertEqual(slist, right)
+
+    def test_from_lxml_elements(self):
+        text = '<SECURITY><CONDITION /><RETURN /></SECURITY>'
+        slist = SecurityList.from_lxml_element(etree.XML(text))
+        right = SecurityList([Condition(), Return()])
+        self.assertEqual(slist, right)
+
+    def test_to_string(self):
+        slist = SecurityList()
+        copy = SecurityList.from_string(str(slist))
+        self.assertEqual(slist, copy)
+
+    def test_to_string_elements(self):
+        slist = SecurityList([Condition(), Return()])
+        copy = SecurityList.from_string(str(slist))
+        self.assertEqual(slist, copy)
+
+    def test_to_lxml(self):
+        slist = SecurityList()
+        copy = SecurityList.from_lxml_element(slist.to_lxml_element())
+        self.assertEqual(slist, copy)
+
+    def test_to_string_elements(self):
+        slist = SecurityList([Condition(), Return()])
+        copy = SecurityList.from_lxml_element(slist.to_lxml_element())
+        self.assertEqual(slist, copy)
+
+    def test_bad_root_tag(self):
+        text = '<ERROR />'
+        self.assertRaises(AttributeError, SecurityList.from_string, text)
+        self.assertRaises(AttributeError, SecurityList.from_lxml_element,
+                          etree.XML(text))
+
+class BadMarkupTest(unittest.TestCase):
+    def condition_test(self):
+        text = '''
+<CONDITION custom="unknown">
+  <PERMISSION />
+  <UNKNOWN>
+    <CUSTOM />
+  </UNKNOWN>
+</CONDITION>'''
+        condition = Condition.from_string(text)
+        tree = condition.to_lxml_element()
+        self.assertEqual('unknown', tree.get('custom'))
+        unknown = tree.findall('UNKNOWN')
+        self.assertEqual(1, len(unknown))
+        unknown = unknown[0]
+        custom = list(unknown)
+        self.assertEqual(1, len(custom))
+        custom = custom[0]
+        self.assertEqual('CUSTOM', custom.tag)
+
+    def permission_test(self):
+        text = '''
+<PERMISSION custom="unknown">
+  <UNKNOWN>
+    <CUSTOM />
+  </UNKNOWN>
+</CONDITION>'''
+        permission = Permission.from_string(text)
+        tree = permission.to_lxml_element()
+        self.assertEqual('unknown', tree.get('custom'))
+        unknown = tree.findall('UNKNOWN')
+        self.assertEqual(1, len(unknown))
+        unknown = unknown[0]
+        custom = list(unknown)
+        self.assertEqual(1, len(custom))
+        custom = custom[0]
+        self.assertEqual('CUSTOM', custom.tag)
+
+    def user_test(self):
+        text = '''
+<USER custom="unknown">
+  <UNKNOWN>
+    <CUSTOM />
+  </UNKNOWN>
+</USER>'''
+        user = User.from_string(text)
+        tree = user.to_lxml_element()
+        self.assertEqual('unknown', tree.get('custom'))
+        unknown = tree.findall('UNKNOWN')
+        self.assertEqual(1, len(unknown))
+        unknown = unknown[0]
+        custom = list(unknown)
+        self.assertEqual(1, len(custom))
+        custom = custom[0]
+        self.assertEqual('CUSTOM', custom.tag)
+
+    def return_test(self):
+        text = '''
+<RETURN custom="unknown">
+  <UNKNOWN>
+    <CUSTOM />
+  </UNKNOWN>
+</RETURN>'''
+        ret = Return.from_string(text)
+        tree = ret.to_lxml_element()
+        self.assertEqual('unknown', tree.get('custom'))
+        unknown = tree.findall('UNKNOWN')
+        self.assertEqual(1, len(unknown))
+        unknown = unknown[0]
+        custom = list(unknown)
+        self.assertEqual(1, len(custom))
+        custom = custom[0]
+        self.assertEqual('CUSTOM', custom.tag)
+
+    def security_list_test(self):
+        text = '''
+<SECURITY custom="unknown">
+  <CONDITION />
+  <RETURN />
+  <UNKNOWN>
+    <CUSTOM />
+  </UNKNOWN>
+</SECURITY>'''
+        slist = SecurityList.from_string(text)
+        tree = slist.to_lxml_element()
+        self.assertEqual('unknown', tree.get('custom'))
+        unknown = tree.findall('UNKNOWN')
+        self.assertEqual(1, len(unknown))
+        unknown = unknown[0]
+        custom = list(unknown)
+        self.assertEqual(1, len(custom))
+        custom = custom[0]
+        self.assertEqual('CUSTOM', custom.tag)
+
+if __name__ == '__main__':
+    unittest.main()
diff --git a/myserver/src/GUI/MyServer/pycontrollib/test/vhost_test.py b/myserver/src/GUI/MyServer/pycontrollib/test/vhost_test.py
new file mode 100644
index 0000000..7338ac6
--- /dev/null
+++ b/myserver/src/GUI/MyServer/pycontrollib/test/vhost_test.py
@@ -0,0 +1,623 @@
+# -*- coding: utf-8 -*-
+'''
+MyServer
+Copyright (C) 2009 Free Software Foundation, Inc.
+This program 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 3 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program.  If not, see <http://www.gnu.org/licenses/>.
+'''
+
+import unittest
+from vhost import VHost, VHosts
+from log import Log
+from lxml import etree
+
+class VHostTest(unittest.TestCase):
+    def test_creation(self):
+        vhost = VHost()
+        vhost = VHost('test vhost')
+        vhost = VHost('test vhost', 80)
+        vhost = VHost('test vhost', 80, 'HTTP')
+        vhost = VHost('test vhost', 80, 'HTTP', '/www')
+        vhost = VHost('test vhost', 80, 'HTTP', '/www', '/system')
+        vhost = VHost('test vhost', 80, 'HTTP', '/www', '/system',
+                      [Log('ACCESSLOG'), Log('WARNINGLOG')])
+        vhost = VHost('test vhost', 80, 'HTTP', '/www', '/system',
+                      [Log('ACCESSLOG'), Log('WARNINGLOG')],
+                      ['127.0.0.0/8', '192.168.0.0/16'])
+        vhost = VHost('test vhost', 80, 'HTTP', '/www', '/system',
+                      [Log('ACCESSLOG'), Log('WARNINGLOG')],
+                      ['127.0.0.0/8', '192.168.0.0/16'],
+                      {'host.domain': None})
+        vhost = VHost('test vhost', 80, 'HTTP', '/www', '/system',
+                      [Log('ACCESSLOG'), Log('WARNINGLOG')],
+                      ['127.0.0.0/8', '192.168.0.0/16'],
+                      {'host.domain': None}, 'private_key')
+        vhost = VHost('test vhost', 80, 'HTTP', '/www', '/system',
+                      [Log('ACCESSLOG'), Log('WARNINGLOG')],
+                      ['127.0.0.0/8', '192.168.0.0/16'],
+                      {'host.domain': None}, 'private_key', 'certificate')
+
+    def test_name(self):
+        vhost = VHost('test vhost')
+        self.assertEqual('test vhost', vhost.get_name())
+        vhost.set_name('vhost')
+        self.assertEqual('vhost', vhost.get_name())
+        vhost.set_name(None)
+        self.assertEqual(None, vhost.get_name())
+        vhost = VHost(name = 'test vhost')
+        self.assertEqual('test vhost', vhost.get_name())
+
+    def test_port(self):
+        vhost = VHost('test vhost', 80)
+        self.assertEqual(80, vhost.get_port())
+        vhost.set_port(8080)
+        self.assertEqual(8080, vhost.get_port())
+        vhost.set_port(None)
+        self.assertEqual(None, vhost.get_port())
+        vhost = VHost(port = 80)
+        self.assertEqual(80, vhost.get_port())
+
+    def test_protocol(self):
+        vhost = VHost('test vhost', 80, 'HTTP')
+        self.assertEqual('HTTP', vhost.get_protocol())
+        vhost.set_protocol('NEW PROTOCOL')
+        self.assertEqual('NEW PROTOCOL', vhost.get_protocol())
+        vhost.set_protocol(None)
+        self.assertEqual(None, vhost.get_protocol())
+        vhost = VHost(protocol = 'HTTP')
+        self.assertEqual('HTTP', vhost.get_protocol())
+
+    def test_doc_root(self):
+        vhost = VHost('test vhost', 80, 'HTTP', '/www')
+        self.assertEqual('/www', vhost.get_doc_root())
+        vhost.set_doc_root('/var/www')
+        self.assertEqual('/var/www', vhost.get_doc_root())
+        vhost.set_doc_root(None)
+        self.assertEqual(None, vhost.get_doc_root())
+        vhost = VHost(doc_root = '/www')
+        self.assertEqual('/www', vhost.get_doc_root())
+
+    def test_sys_root(self):
+        vhost = VHost('test vhost', 80, 'HTTP', '/www', '/system')
+        self.assertEqual('/system', vhost.get_sys_root())
+        vhost.set_sys_root('/var/system')
+        self.assertEqual('/var/system', vhost.get_sys_root())
+        vhost.set_sys_root(None)
+        self.assertEqual(None, vhost.get_sys_root())
+        vhost = VHost(sys_root = '/system')
+        self.assertEqual('/system', vhost.get_sys_root())
+
+    def test_logs(self):
+        a_log = Log('ACCESSLOG')
+        w_log = Log('WARNINGLOG')
+        vhost = VHost('test vhost', 80, 'HTTP', '/www', '/system', [a_log, w_log])
+        self.assertEqual([a_log, w_log], vhost.get_logs())
+        vhost.add_log(a_log)
+        self.assertEqual([a_log, w_log, a_log], vhost.get_logs())
+        vhost.remove_log(0)
+        self.assertEqual([w_log, a_log], vhost.get_logs())
+        vhost.add_log(w_log, 0)
+        self.assertEqual([w_log, w_log, a_log], vhost.get_logs())
+        vhost = VHost(logs = [a_log, w_log])
+        self.assertEqual([a_log, w_log], vhost.get_logs())
+
+    def test_ip(self):
+        vhost = VHost('test vhost', 80, 'HTTP', '/www', '/system',
+                      [Log('ACCESSLOG')])
+        self.assertEqual(set(), vhost.get_ip())
+        vhost.add_ip('10.0.0.0/8')
+        vhost.add_ip('192.168.0.0/16')
+        self.assertEqual(set(['10.0.0.0/8', '192.168.0.0/16']), vhost.get_ip())
+        vhost.remove_ip('10.0.0.0/8')
+        self.assertEqual(set(['192.168.0.0/16']), vhost.get_ip())
+        vhost = VHost('test vhost', 80, 'HTTP', '/www', '/system',
+                      [Log('ACCESSLOG'), Log('WARNINGLOG')],
+                      ['127.0.0.0/8', '192.168.0.0/16'])
+        self.assertEqual(set(['127.0.0.0/8', '192.168.0.0/16']), vhost.get_ip())
+        vhost = VHost('test vhost', 80, 'HTTP', '/www', '/system',
+                      [Log('ACCESSLOG'), Log('WARNINGLOG')],
+                      ip = ['127.0.0.0/8', '192.168.0.0/16'])
+        self.assertEqual(set(['127.0.0.0/8', '192.168.0.0/16']), vhost.get_ip())
+
+    def test_host(self):
+        vhost = VHost('test vhost', 80, 'HTTP', '/www', '/system',
+                      [Log('ACCESSLOG')])
+        self.assertEqual({}, vhost.get_host())
+        vhost.add_host('foo.bar.com', False)
+        vhost.add_host('test.me.org')
+        self.assertEqual({'foo.bar.com': False, 'test.me.org': None},
+                         vhost.get_host())
+        vhost.remove_host('foo.bar.com')
+        self.assertEqual({'test.me.org': None}, vhost.get_host())
+        vhost = VHost('test vhost', 80, 'HTTP', '/www', '/system',
+                      [Log('ACCESSLOG'), Log('WARNINGLOG')],
+                      ['127.0.0.0/8', '192.168.0.0/16'],
+                      {'test.me.org': None})
+        self.assertEqual({'test.me.org': None}, vhost.get_host())
+        vhost = VHost('test vhost', 80, 'HTTP', '/www', '/system',
+                      [Log('ACCESSLOG'), Log('WARNINGLOG')],
+                      host = {'test.me.org': None})
+        self.assertEqual({'test.me.org': None}, vhost.get_host())
+
+    def test_private_key(self):
+        vhost = VHost()
+        self.assertEqual(None, vhost.get_private_key())
+        vhost.set_private_key('path')
+        self.assertEqual('path', vhost.get_private_key())
+        vhost.set_private_key(None)
+        self.assertEqual(None, vhost.get_private_key())
+        vhost = VHost('test vhost', 80, 'HTTP', '/www', '/system',
+                      [Log('ACCESSLOG'), Log('WARNINGLOG')],
+                      ['127.0.0.0/8', '192.168.0.0/16'],
+                      {'host.domain': None}, 'path')
+        self.assertEqual('path', vhost.get_private_key())
+        vhost = VHost(private_key = 'path')
+        self.assertEqual('path', vhost.get_private_key())
+
+    def test_certificate(self):
+        vhost = VHost()
+        self.assertEqual(None, vhost.get_certificate())
+        vhost.set_certificate('path')
+        self.assertEqual('path', vhost.get_certificate())
+        vhost.set_certificate(None)
+        self.assertEqual(None, vhost.get_certificate())
+        vhost = VHost('test vhost', 80, 'HTTP', '/www', '/system',
+                      [Log('ACCESSLOG'), Log('WARNINGLOG')],
+                      ['127.0.0.0/8', '192.168.0.0/16'],
+                      {'host.domain': None}, 'key', 'path')
+        self.assertEqual('path', vhost.get_certificate())
+        vhost = VHost(certificate = 'path')
+        self.assertEqual('path', vhost.get_certificate())
+
+    def test_equality(self):
+        vhost_0 = VHost('test vhost', 80, 'HTTP', '/www', '/system',
+                        [Log('ACCESSLOG'), Log('WARNINGLOG')],
+                        ['127.0.0.0/8', '192.168.0.0/16'],
+                        {'host.domain': None}, 'private_key', 'certificate')
+        vhost_1 = VHost('test vhost', 80, 'HTTP', '/www', '/system',
+                        [Log('ACCESSLOG'), Log('WARNINGLOG')],
+                        ['127.0.0.0/8', '192.168.0.0/16'],
+                        {'host.domain': None}, 'private_key', 'certificate')
+        self.assertEqual(vhost_0, vhost_1)
+        vhost_1 = VHost.from_string(str(vhost_0))
+        vhost_1.set_name('different')
+        self.assertNotEqual(vhost_0, vhost_1)
+        vhost_1 = VHost.from_string(str(vhost_0))
+        vhost_1.set_port(81)
+        self.assertNotEqual(vhost_0, vhost_1)
+        vhost_1 = VHost.from_string(str(vhost_0))
+        vhost_1.set_protocol('HTTPS')
+        self.assertNotEqual(vhost_0, vhost_1)
+        vhost_1 = VHost.from_string(str(vhost_0))
+        vhost_1.set_doc_root('/var/www')
+        self.assertNotEqual(vhost_0, vhost_1)
+        vhost_1 = VHost.from_string(str(vhost_0))
+        vhost_1.set_sys_root('/var/system')
+        self.assertNotEqual(vhost_0, vhost_1)
+        vhost_1 = VHost.from_string(str(vhost_0))
+        vhost_1.add_log(Log('NEWLOG'))
+        self.assertNotEqual(vhost_0, vhost_1)
+        vhost_1 = VHost.from_string(str(vhost_0))
+        vhost_1.add_ip('10.0.0.0/8')
+        self.assertNotEqual(vhost_0, vhost_1)
+        vhost_1 = VHost.from_string(str(vhost_0))
+        vhost_1.add_host('newhost', None)
+        self.assertNotEqual(vhost_0, vhost_1)
+        vhost_1 = VHost.from_string(str(vhost_0))
+        vhost_1.set_private_key('new_key')
+        self.assertNotEqual(vhost_0, vhost_1)
+        vhost_1 = VHost.from_string(str(vhost_0))
+        vhost_1.set_certificate('new certificate')
+        self.assertNotEqual(vhost_0, vhost_1)
+        self.assertNotEqual(vhost_0, [])
+
+    def test_from_string(self):
+        text = '<VHOST />'
+        vhost = VHost.from_string(text)
+        right = VHost()
+        self.assertEqual(vhost, right)
+
+    def test_from_string_name(self):
+        text = '<VHOST><NAME>test vhost</NAME></VHOST>'
+        vhost = VHost.from_string(text)
+        right = VHost('test vhost')
+        self.assertEqual(vhost, right)
+
+    def test_from_string_port(self):
+        text = '<VHOST><PORT>80</PORT></VHOST>'
+        vhost = VHost.from_string(text)
+        right = VHost(port = 80)
+        self.assertEqual(vhost, right)
+
+    def test_from_string_protocol(self):
+        text = '<VHOST><PROTOCOL>HTTP</PROTOCOL></VHOST>'
+        vhost = VHost.from_string(text)
+        right = VHost(protocol = 'HTTP')
+        self.assertEqual(vhost, right)
+
+    def test_from_string_doc_root(self):
+        text = '<VHOST><DOCROOT>/www</DOCROOT></VHOST>'
+        vhost = VHost.from_string(text)
+        right = VHost(doc_root = '/www')
+        self.assertEqual(vhost, right)
+
+    def test_from_string_sys_root(self):
+        text = '<VHOST><SYSROOT>/system</SYSROOT></VHOST>'
+        vhost = VHost.from_string(text)
+        right = VHost(sys_root = '/system')
+        self.assertEqual(vhost, right)
+
+    def test_from_string_logs(self):
+        text = '<VHOST><ACCESSLOG /><SOMELOG /></VHOST>'
+        vhost = VHost.from_string(text)
+        right = VHost(logs = [Log('ACCESSLOG'), Log('SOMELOG')])
+        self.assertEqual(vhost, right)
+
+    def test_from_string_ip(self):
+        text = '<VHOST><IP>127.0.0.0/8</IP></VHOST>'
+        vhost = VHost.from_string(text)
+        right = VHost(ip = ['127.0.0.0/8'])
+        self.assertEqual(vhost, right)
+
+    def test_from_string_host(self):
+        text = '<VHOST><HOST useRegex="YES">.*</HOST><HOST>a.org</HOST></VHOST>'
+        vhost = VHost.from_string(text)
+        right = VHost(host = {'.*': True, 'a.org': None})
+        self.assertEqual(vhost, right)
+
+    def test_from_string_private_key(self):
+        text = '<VHOST><SSL_PRIVATEKEY>private_key</SSL_PRIVATEKEY></VHOST>'
+        vhost = VHost.from_string(text)
+        right = VHost(private_key = 'private_key')
+        self.assertEqual(vhost, right)
+
+    def test_from_string_certificate(self):
+        text = '<VHOST><SSL_CERTIFICATE>certificate</SSL_CERTIFICATE></VHOST>'
+        vhost = VHost.from_string(text)
+        right = VHost(certificate = 'certificate')
+        self.assertEqual(vhost, right)
+
+    def test_from_string_full(self):
+        text = '''<VHOST>
+  <NAME>test vhost</NAME>
+  <PORT>80</PORT>
+  <PROTOCOL>HTTP</PROTOCOL>
+  <DOCROOT>/www</DOCROOT>
+  <SYSROOT>/system</SYSROOT>
+  <ACCESSLOG />
+  <WARNINGLOG />
+  <IP>127.0.0.0/8</IP>
+  <IP>192.168.0.0/16</IP>
+  <HOST useRegex="YES">host.domain</HOST>
+  <HOST>test.domain</HOST>
+  <SSL_PRIVATEKEY>private_key</SSL_PRIVATEKEY>
+  <SSL_CERTIFICATE>certificate</SSL_CERTIFICATE>
+</VHOST>'''
+        vhost = VHost.from_string(text)
+        right = VHost('test vhost', 80, 'HTTP', '/www', '/system',
+                      [Log('ACCESSLOG'), Log('WARNINGLOG')],
+                      ['127.0.0.0/8', '192.168.0.0/16'],
+                      {'host.domain': True, 'test.domain': None},
+                      'private_key', 'certificate')
+        self.assertEqual(vhost, right)
+
+    def test_from_lxml(self):
+        text = '<VHOST />'
+        vhost = VHost.from_lxml_element(etree.XML(text))
+        right = VHost()
+        self.assertEqual(vhost, right)
+
+    def test_from_lxml_name(self):
+        text = '<VHOST><NAME>test vhost</NAME></VHOST>'
+        vhost = VHost.from_lxml_element(etree.XML(text))
+        right = VHost('test vhost')
+        self.assertEqual(vhost, right)
+
+    def test_from_lxml_port(self):
+        text = '<VHOST><PORT>80</PORT></VHOST>'
+        vhost = VHost.from_lxml_element(etree.XML(text))
+        right = VHost(port = 80)
+        self.assertEqual(vhost, right)
+
+    def test_from_lxml_protocol(self):
+        text = '<VHOST><PROTOCOL>HTTP</PROTOCOL></VHOST>'
+        vhost = VHost.from_lxml_element(etree.XML(text))
+        right = VHost(protocol = 'HTTP')
+        self.assertEqual(vhost, right)
+
+    def test_from_lxml_doc_root(self):
+        text = '<VHOST><DOCROOT>/www</DOCROOT></VHOST>'
+        vhost = VHost.from_lxml_element(etree.XML(text))
+        right = VHost(doc_root = '/www')
+        self.assertEqual(vhost, right)
+
+    def test_from_lxml_sys_folder(self):
+        text = '<VHOST><SYSROOT>/system</SYSROOT></VHOST>'
+        vhost = VHost.from_lxml_element(etree.XML(text))
+        right = VHost(sys_root = '/system')
+        self.assertEqual(vhost, right)
+
+    def test_from_lxml_logs(self):
+        text = '<VHOST><ACCESSLOG /><SOMELOG /></VHOST>'
+        vhost = VHost.from_lxml_element(etree.XML(text))
+        right = VHost(logs = [Log('ACCESSLOG'), Log('SOMELOG')])
+        self.assertEqual(vhost, right)
+
+    def test_from_lxml_ip(self):
+        text = '<VHOST><IP>127.0.0.0/8</IP></VHOST>'
+        vhost = VHost.from_lxml_element(etree.XML(text))
+        right = VHost(ip = ['127.0.0.0/8'])
+        self.assertEqual(vhost, right)
+
+    def test_from_lxml_host(self):
+        text = '<VHOST><HOST useRegex="YES">.*</HOST><HOST>a.org</HOST></VHOST>'
+        vhost = VHost.from_lxml_element(etree.XML(text))
+        right = VHost(host = {'.*': True, 'a.org': None})
+        self.assertEqual(vhost, right)
+
+    def test_from_lxml_private_key(self):
+        text = '<VHOST><SSL_PRIVATEKEY>private_key</SSL_PRIVATEKEY></VHOST>'
+        vhost = VHost.from_lxml_element(etree.XML(text))
+        right = VHost(private_key = 'private_key')
+        self.assertEqual(vhost, right)
+
+    def test_from_lxml_certificate(self):
+        text = '<VHOST><SSL_CERTIFICATE>certificate</SSL_CERTIFICATE></VHOST>'
+        vhost = VHost.from_lxml_element(etree.XML(text))
+        right = VHost(certificate = 'certificate')
+        self.assertEqual(vhost, right)
+
+    def test_from_lxml_full(self):
+        text = '''<VHOST>
+  <NAME>test vhost</NAME>
+  <PORT>80</PORT>
+  <PROTOCOL>HTTP</PROTOCOL>
+  <DOCROOT>/www</DOCROOT>
+  <SYSROOT>/system</SYSROOT>
+  <ACCESSLOG />
+  <WARNINGLOG />
+  <IP>127.0.0.0/8</IP>
+  <IP>192.168.0.0/16</IP>
+  <HOST useRegex="YES">host.domain</HOST>
+  <HOST>test.domain</HOST>
+  <SSL_PRIVATEKEY>private_key</SSL_PRIVATEKEY>
+  <SSL_CERTIFICATE>certificate</SSL_CERTIFICATE>
+</VHOST>'''
+        vhost = VHost.from_lxml_element(etree.XML(text))
+        right = VHost('test vhost', 80, 'HTTP', '/www', '/system',
+                      [Log('ACCESSLOG'), Log('WARNINGLOG')],
+                      ['127.0.0.0/8', '192.168.0.0/16'],
+                      {'host.domain': True, 'test.domain': None},
+                      'private_key', 'certificate')
+        self.assertEqual(vhost, right)
+
+    def test_bad_root_tag(self):
+        text = '<ERROR />'
+        self.assertRaises(AttributeError, VHost.from_string, text)
+        self.assertRaises(AttributeError, VHost.from_lxml_element,
+                          etree.XML(text))
+
+    def test_to_string(self):
+        vhost = VHost()
+        copy = VHost.from_string(str(vhost))
+        self.assertEqual(vhost, copy)
+
+    def test_to_string_name(self):
+        vhost = VHost('test vhost')
+        copy = VHost.from_string(str(vhost))
+        self.assertEqual(vhost, copy)
+
+    def test_to_string_port(self):
+        vhost = VHost(port = 80)
+        copy = VHost.from_string(str(vhost))
+        self.assertEqual(vhost, copy)
+
+    def test_to_string_protocol(self):
+        vhost = VHost(protocol = 'HTTP')
+        copy = VHost.from_string(str(vhost))
+        self.assertEqual(vhost, copy)
+
+    def test_to_string_doc_root(self):
+        vhost = VHost(doc_root = '/www')
+        copy = VHost.from_string(str(vhost))
+        self.assertEqual(vhost, copy)
+
+    def test_to_string_sys_root(self):
+        vhost = VHost(sys_root = '/system')
+        copy = VHost.from_string(str(vhost))
+        self.assertEqual(vhost, copy)
+
+    def test_to_string_logs(self):
+        vhost = VHost(logs = [Log('ACCESSLOG'), Log('SOMELOG')])
+        copy = VHost.from_string(str(vhost))
+        self.assertEqual(vhost, copy)
+
+    def test_to_string_ip(self):
+        vhost = VHost(ip = ['127.0.0.0/8'])
+        copy = VHost.from_string(str(vhost))
+        self.assertEqual(vhost, copy)
+
+    def test_to_string_host(self):
+        vhost = VHost(host = {'.*': True, 'a.org': None})
+        copy = VHost.from_string(str(vhost))
+        self.assertEqual(vhost, copy)
+
+    def test_to_string_private_key(self):
+        vhost = VHost(private_key = 'private_key')
+        copy = VHost.from_string(str(vhost))
+        self.assertEqual(vhost, copy)
+
+    def test_to_string_certificate(self):
+        vhost = VHost(certificate = 'certificate')
+        copy = VHost.from_string(str(vhost))
+        self.assertEqual(vhost, copy)
+
+    def test_to_string_full(self):
+        vhost = VHost('test vhost', 80, 'HTTP', '/www', '/system',
+                      [Log('ACCESSLOG'), Log('WARNINGLOG')],
+                      ['127.0.0.0/8', '192.168.0.0/16'],
+                      {'host.domain': True, 'test.domain': None},
+                      'private_key', 'certificate')
+        copy = VHost.from_string(str(vhost))
+        self.assertEqual(vhost, copy)
+
+    def test_to_lxml(self):
+        vhost = VHost()
+        copy = VHost.from_lxml_element(vhost.to_lxml_element())
+        self.assertEqual(vhost, copy)
+
+    def test_to_lxml_name(self):
+        vhost = VHost('test vhost')
+        copy = VHost.from_lxml_element(vhost.to_lxml_element())
+        self.assertEqual(vhost, copy)
+
+    def test_to_lxml_port(self):
+        vhost = VHost(port = 80)
+        copy = VHost.from_lxml_element(vhost.to_lxml_element())
+        self.assertEqual(vhost, copy)
+
+    def test_to_lxml_protocol(self):
+        vhost = VHost(protocol = 'HTTP')
+        copy = VHost.from_lxml_element(vhost.to_lxml_element())
+        self.assertEqual(vhost, copy)
+
+    def test_to_lxml_doc_root(self):
+        vhost = VHost(doc_root = '/www')
+        copy = VHost.from_lxml_element(vhost.to_lxml_element())
+        self.assertEqual(vhost, copy)
+
+    def test_to_lxml_sys_root(self):
+        vhost = VHost(sys_root = '/system')
+        copy = VHost.from_lxml_element(vhost.to_lxml_element())
+        self.assertEqual(vhost, copy)
+
+    def test_to_lxml_logs(self):
+        vhost = VHost(logs = [Log('ACCESSLOG'), Log('SOMELOG')])
+        copy = VHost.from_lxml_element(vhost.to_lxml_element())
+        self.assertEqual(vhost, copy)
+
+    def test_to_lxml_ip(self):
+        vhost = VHost(ip = ['127.0.0.0/8'])
+        copy = VHost.from_lxml_element(vhost.to_lxml_element())
+        self.assertEqual(vhost, copy)
+
+    def test_to_lxml_host(self):
+        vhost = VHost(host = {'.*': True, 'a.org': None})
+        copy = VHost.from_lxml_element(vhost.to_lxml_element())
+        self.assertEqual(vhost, copy)
+        
+    def test_to_lxml_private_key(self):
+        vhost = VHost(private_key = 'private_key')
+        copy = VHost.from_lxml_element(vhost.to_lxml_element())
+        self.assertEqual(vhost, copy)
+
+    def test_to_lxml_certificate(self):
+        vhost = VHost(certificate = 'certificate')
+        copy = VHost.from_lxml_element(vhost.to_lxml_element())
+        self.assertEqual(vhost, copy)
+
+    def test_to_lxml_full(self):
+        vhost = VHost('test vhost', 80, 'HTTP', '/www', '/system',
+                      [Log('ACCESSLOG'), Log('WARNINGLOG')],
+                      ['127.0.0.0/8', '192.168.0.0/16'],
+                      {'host.domain': True, 'test.domain': None},
+                      'private_key', 'certificate')
+        copy = VHost.from_lxml_element(vhost.to_lxml_element())
+        self.assertEqual(vhost, copy)
+
+class VHostsTest(unittest.TestCase):
+    def setUp(self):
+        self.vhost_0 = VHost('vhost 0', 80, 'HTTP', '/www', '/system',
+                             [Log('ACCESSLOG'), Log('WARNINGLOG')],
+                             ['127.0.0.0/8', '192.168.0.0/16'],
+                             {'host.domain': True, 'test.domain': None})
+        self.vhost_1 = VHost('vhost 1', 443, 'HTTPS', '/www', '/system',
+                             [Log('ACCESSLOG'), Log('WARNINGLOG')])
+        self.text = '<VHOSTS>{0}{1}</VHOSTS>'.format(str(self.vhost_0),
+                                                     str(self.vhost_1))
+
+    def test_creation(self):
+        vhosts = VHosts([self.vhost_0, self.vhost_1])
+        self.assertEqual(vhosts.VHosts[0], self.vhost_0)
+        self.assertEqual(vhosts.VHosts[1], self.vhost_1)
+
+    def test_from_string(self):
+        vhosts = VHosts.from_string(self.text)
+        self.assertEqual(vhosts.VHosts[0], self.vhost_0)
+        self.assertEqual(vhosts.VHosts[1], self.vhost_1)
+
+    def test_from_string(self):
+        vhosts = VHosts.from_lxml_element(etree.XML(self.text))
+        self.assertEqual(vhosts.VHosts[0], self.vhost_0)
+        self.assertEqual(vhosts.VHosts[1], self.vhost_1)
+
+    def test_to_string(self):
+        vhosts = VHosts.from_string(self.text)
+        copy = VHosts.from_string(str(vhosts))
+        self.assertEqual(vhosts, copy)
+
+    def test_to_lxml(self):
+        vhosts = VHosts.from_string(self.text)
+        copy = VHosts.from_lxml_element(vhosts.to_lxml_element())
+        self.assertEqual(vhosts, copy)
+
+    def test_equality(self):
+        self.assertEqual(VHosts.from_string(self.text),
+                         VHosts.from_string(self.text))
+        self.assertNotEqual(VHosts.from_string(self.text),
+                            VHosts.from_string(
+                '<VHOSTS>{0}</VHOSTS>'.format(str(self.vhost_0))))
+        self.assertNotEqual(VHosts.from_string(self.text), [])
+
+class BadMarkupTest(unittest.TestCase):
+    def test_vhost(self):
+        text = '''
+<VHOST custom="unknown">
+  <PORT>123</PORT>
+  <UNKNOWN>
+    <CUSTOM />
+  </UNKNOWN>
+</VHOST>'''
+        vhost = VHost.from_string(text)
+        tree = vhost.to_lxml_element()
+        self.assertEqual('unknown', tree.get('custom'))
+        unknown = tree.findall('UNKNOWN')
+        self.assertEqual(1, len(unknown))
+        unknown = unknown[0]
+        custom = list(unknown)
+        self.assertEqual(1, len(custom))
+        custom = custom[0]
+        self.assertEqual('CUSTOM', custom.tag)
+
+    def test_vhosts(self):
+        text = '''
+<VHOSTS custom="unknown">
+  <VHOST />
+  <UNKNOWN>
+    <CUSTOM />
+  </UNKNOWN>
+</VHOSTS>'''
+        vhosts = VHosts.from_string(text)
+        tree = vhosts.to_lxml_element()
+        self.assertEqual('unknown', tree.get('custom'))
+        self.assertEqual(1, len(tree.findall('VHOST')))
+        unknown = tree.findall('UNKNOWN')
+        self.assertEqual(1, len(unknown))
+        unknown = unknown[0]
+        custom = list(unknown)
+        self.assertEqual(1, len(custom))
+        custom = custom[0]
+        self.assertEqual('CUSTOM', custom.tag)
+
+if __name__ == '__main__':
+    unittest.main()
diff --git a/myserver/src/GUI/MyServer/pycontrollib/vhost.py b/myserver/src/GUI/MyServer/pycontrollib/vhost.py
new file mode 100644
index 0000000..7564d67
--- /dev/null
+++ b/myserver/src/GUI/MyServer/pycontrollib/vhost.py
@@ -0,0 +1,306 @@
+# -*- coding: utf-8 -*-
+'''
+MyServer
+Copyright (C) 2009 Free Software Foundation, Inc.
+This program 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 3 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program.  If not, see <http://www.gnu.org/licenses/>.
+'''
+
+from lxml import etree
+from log import Log
+
+class VHost():
+    def __init__(self, name = None, port = None, protocol = None,
+                 doc_root = None, sys_root = None, logs = [],
+                 ip = [], host = {}, private_key = None, certificate = None):
+        '''Create new instance of VHost. logs and ip are expected to be a
+        collection and host is expected to be a dict {name: useRegex} where None
+        means not set.'''
+        self.set_name(name)
+        self.set_port(port)
+        self.set_protocol(protocol)
+        self.set_doc_root(doc_root)
+        self.set_sys_root(sys_root)
+        self.logs = []
+        for log in logs:
+            self.add_log(log)
+        self.ip = set()
+        for ip_address in ip:
+            self.add_ip(ip_address)
+        self.host = {}
+        for single_host in host.iteritems():
+            self.add_host(single_host[0], single_host[1])
+        self.set_private_key(private_key)
+        self.set_certificate(certificate)
+        self.custom = []
+        self.custom_attrib = {}
+
+    def __eq__(self, other):
+        return isinstance(other, VHost) and self.name == other.name and \
+            self.port == other.port and self.protocol == other.protocol and \
+            self.doc_root == other.doc_root and \
+            self.sys_root == other.sys_root and \
+            self.logs == other.logs and self.ip == other.ip and \
+            self.host == other.host and \
+            self.private_key == other.private_key and \
+            self.certificate == other.certificate
+
+    def get_name(self):
+        '''Get VHost name.'''
+        return self.name
+
+    def set_name(self, name):
+        '''Set VHost name.'''
+        self.name = name
+
+    def get_doc_root(self):
+        '''Get VHost doc root.'''
+        return self.doc_root
+
+    def set_doc_root(self, doc_root):
+        '''Set VHost doc root.'''
+        self.doc_root = doc_root
+
+    def get_sys_root(self):
+        '''Get VHost sys root.'''
+        return self.sys_root
+
+    def set_sys_root(self, sys_root):
+        '''Set VHost sys root.'''
+        self.sys_root = sys_root
+
+    def get_protocol(self):
+        '''Get VHost protocol.'''
+        return self.protocol
+
+    def set_protocol(self, protocol):
+        '''Set VHost protocol.'''
+        self.protocol = protocol
+
+    def get_port(self):
+        '''Get VHost port.'''
+        return self.port
+
+    def set_port(self, port):
+        '''Set VHost port.'''
+        if port is None:
+            self.port = None
+        else:
+            self.port = int(port)
+
+    def get_logs(self):
+        '''Get list of logs.'''
+        return self.logs
+
+    def get_log(self, index):
+        '''Get index-th log.'''
+        return self.logs[index]
+
+    def remove_log(self, index):
+        '''Remove index-th log.'''
+        self.logs.pop(index)
+
+    def add_log(self, log, index = None):
+        '''Add log to VHost's logs, if index is None append it, otherwise insert
+        at index position.'''
+        if index is None:
+            self.logs.append(log)
+        else:
+            self.logs.insert(index, log)
+
+    def get_ip(self):
+        '''Get VHost ip set.'''
+        return self.ip
+
+    def add_ip(self, ip):
+        '''Add ip to VHost ip set.'''
+        self.ip.add(ip)
+
+    def remove_ip(self, ip):
+        '''Remove ip from VHost ip set.'''
+        self.ip.remove(ip)
+
+    def get_host(self):
+        '''Get VHost host dict.'''
+        return self.host
+
+    def add_host(self, host, use_regex = None):
+        '''Add host to VHost host dict.'''
+        self.host[host] = use_regex
+
+    def remove_host(self, host):
+        '''Remove host from VHost host dict.'''
+        self.host.pop(host)
+
+    def get_private_key(self):
+        '''Get vhost private ssl key.'''
+        return self.private_key
+
+    def set_private_key(self, private_key):
+        '''Set vhost private ssl key.'''
+        self.private_key = private_key
+
+    def get_certificate(self):
+        '''Get vhost ssl certificate.'''
+        return self.certificate
+
+    def set_certificate(self, certificate):
+        '''Set vhost ssl certificate.'''
+        self.certificate = certificate
+
+    def __str__(self):
+        return etree.tostring(self.to_lxml_element(), pretty_print = True)
+
+    def to_lxml_element(self):
+        '''Convert to instance of lxml.etree.Element.'''
+        def make_element(tag, text):
+            element = etree.Element(tag)
+            element.text = text
+            return element
+        root = etree.Element('VHOST')
+        if self.name is not None:
+            root.append(make_element('NAME', self.name))
+        if self.port is not None:
+            root.append(make_element('PORT', str(self.port)))
+        if self.protocol is not None:
+            root.append(make_element('PROTOCOL', self.protocol))
+        if self.doc_root is not None:
+            root.append(make_element('DOCROOT', self.doc_root))
+        if self.sys_root is not None:
+            root.append(make_element('SYSROOT', self.sys_root))
+        if self.private_key is not None:
+            root.append(make_element('SSL_PRIVATEKEY', self.private_key))
+        if self.certificate is not None:
+            root.append(make_element('SSL_CERTIFICATE', self.certificate))
+        for ip_address in self.ip:
+            root.append(make_element('IP', ip_address))
+        for host, use_regex in self.host.iteritems():
+            element = make_element('HOST', host)
+            if use_regex is not None:
+                element.set('useRegex', 'YES' if use_regex else 'NO')
+            root.append(element)
+        for log in self.logs:
+            root.append(log.to_lxml_element())
+
+        for element in self.custom:
+            root.append(element)
+        for key, value in self.custom_attrib.iteritems():
+            root.set(key, value)
+
+        return root
+
+    @staticmethod
+    def from_lxml_element(root):
+        '''Factory to produce VHost from lxml.etree.Element object.'''
+        if root.tag != 'VHOST':
+            raise AttributeError('Expected VHOST tag.')
+        custom_attrib = root.attrib
+        name = None
+        port = None
+        protocol = None
+        doc_root = None
+        sys_root = None
+        private_key = None
+        certificate = None
+        ip = []
+        host = {}
+        logs = []
+        custom = []
+        for child in list(root):
+            if child.tag == 'NAME':
+                name = child.text
+            elif child.tag == 'PORT':
+                port = child.text
+            elif child.tag == 'PROTOCOL':
+                protocol = child.text
+            elif child.tag == 'DOCROOT':
+                doc_root = child.text
+            elif child.tag == 'SYSROOT':
+                sys_root = child.text
+            elif child.tag == 'IP':
+                ip.append(child.text)
+            elif child.tag == 'HOST':
+                use_regex = child.get('useRegex', None)
+                if use_regex is not None:
+                    use_regex = use_regex.upper() == 'YES'
+                host[child.text] = use_regex
+            elif child.tag == 'SSL_PRIVATEKEY':
+                private_key = child.text
+            elif child.tag == 'SSL_CERTIFICATE':
+                certificate = child.text
+            else:
+                try:
+                    logs.append(Log.from_lxml_element(child))
+                except AttributeError:
+                    custom.append(child)
+        vhost = VHost(name, port, protocol, doc_root, sys_root, logs, ip, host,
+                      private_key, certificate)
+        vhost.custom = custom
+        vhost.custom_attrib = custom_attrib
+        return vhost
+
+    @staticmethod
+    def from_string(text):
+        '''Factory to produce VHost by parsing a string.'''
+        return VHost.from_lxml_element(etree.XML(
+                text, parser = etree.XMLParser(remove_comments = True)))
+
+class VHosts():
+    def __init__(self, VHosts):
+        '''Create a new instance of VHosts. VHosts attribute is expected to be a
+        list.'''
+        self.VHosts = VHosts
+        self.custom = []
+        self.custom_attrib = {}
+
+    def __eq__(self, other):
+        return isinstance(other, VHosts) and self.VHosts == other.VHosts
+
+    def to_lxml_element(self):
+        '''Convert to lxml.etree.Element.'''
+        root = etree.Element('VHOSTS')
+        for vhost in self.VHosts:
+            root.append(vhost.to_lxml_element())
+
+        for element in self.custom:
+            root.append(element)
+        for key, value in self.custom_attrib.iteritems():
+            root.set(key, value)
+
+        return root
+
+    def __str__(self):
+        return etree.tostring(self.to_lxml_element(), pretty_print = True)
+
+    @staticmethod
+    def from_lxml_element(root):
+        '''Factory to produce VHosts from lxml.etree.Element object.'''
+        if root.tag != 'VHOSTS':
+            raise AttributeError('Expected VHOSTS tag.')
+        vhosts = []
+        custom = []
+        for element in list(root):
+            try:
+                vhosts.append(VHost.from_lxml_element(element))
+            except AttributeError:
+                custom.append(element)
+        vhosts = VHosts(vhosts)
+        vhosts.custom = custom
+        vhosts.custom_attrib = root.attrib
+        return vhosts
+
+    @staticmethod
+    def from_string(text):
+        '''Factory to produce VHosts from parsing a string.'''
+        return VHosts.from_lxml_element(etree.XML(
+                text, parser = etree.XMLParser(remove_comments = True)))
diff --git a/myserver/src/GUI/MyServer/sample.py b/myserver/src/GUI/MyServer/sample.py
new file mode 100644
index 0000000..bb68163
--- /dev/null
+++ b/myserver/src/GUI/MyServer/sample.py
@@ -0,0 +1,40 @@
+'''
+MyServer
+Copyright (C) 2008 The MyServer Team
+This program 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 3 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program.  If not, see <http://www.gnu.org/licenses/>.
+'''
+
+from pycontrol.pycontrol import PyMyServerControl
+from pycontrol.pycontrol import error_codes
+
+from sys import argv, exit
+
+if __name__ == "__main__":
+    if len(argv) < 5:
+        print "Not enough arguments\nUsage python test.py hostname port username password"
+        sys.exit(1)
+
+    control = PyMyServerControl(argv[1], int(argv[2]), argv[3], argv[4])
+
+    control.send_header("SHOWCONNECTIONS", 0)
+
+    control.read_header()
+
+    print "Reply code: " + error_codes.get(control.response_code)
+
+    while control.available_data() > 0:
+        print control.read()
+
+
+    control.close()
diff --git a/myserver/src/GUI/MyServerControl b/myserver/src/GUI/MyServerControl
new file mode 100755
index 0000000..54dcc16
--- /dev/null
+++ b/myserver/src/GUI/MyServerControl
@@ -0,0 +1,464 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+'''
+MyServer
+Copyright (C) 2009 Free Software Foundation, Inc.
+This program 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 3 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program.  If not, see <http://www.gnu.org/licenses/>.
+'''
+
+from __future__ import print_function
+import gtk
+import gtk.glade
+import gobject
+import os
+import sys
+from MyServer.pycontrollib.config import MyServerConfig
+from MyServer.pycontrollib.mimetypes import MIMETypes
+from MyServer.pycontrollib.controller import Controller
+from MyServer.pycontrollib.vhost import VHosts
+from MyServer.GUI import GUIConfig
+from MyServer.GUI.AboutWindow import About
+from MyServer.GUI.ConnectionWindow import Connection
+from MyServer.GUI.DefinitionWidgets import DefinitionTable, DefinitionTreeView
+from MyServer.GUI.MIMEWidgets import MimeTable, MimeTreeView
+from MyServer.GUI.VHostWidgets import VHostTable, VHostTreeView
+from MyServer.GUI.BrowserWidgets import BrowserTable
+from MyServer.GUI.SecurityWidgets import SecurityTable
+
+class PyGTKControl():
+    '''GNU MyServer Control main window.'''
+
+    def __init__(self):
+        self.gladefile = os.path.join(os.path.dirname(sys.argv[0]), 'PyGTKControl.glade')
+        self.widgets = gtk.glade.XML(self.gladefile, 'window')
+        self.widgets.signal_autoconnect(self)
+        self.construct_options()
+        self.construct_mime()
+        self.construct_vhosts()
+        self.construct_browser()
+        self.chooser = None # Active file chooser
+        # path of currently edited files
+        self.config_path = self.mime_path = self.vhost_path = None
+        # remembered unhandled parts of configs
+        self.config_custom = []
+        self.mime_custom = []
+        self.vhost_custom = []
+        self.mime_custom_attrib = {}
+        self.vhost_custom_attrib = {}
+        self.controller = None
+
+    def on_window_destroy(self, widget):
+        '''Exits program.'''
+        gtk.main_quit()
+
+    def on_quit_menu_item_activate(self, widget):
+        '''Exits program.'''
+        gtk.main_quit()
+
+    def on_about_menu_item_activate(self, widget):
+        '''Shows about window.'''
+        About()
+
+    def on_connect_menu_item_activate(self, widget):
+        '''Show connection dialog.'''
+        dialog = Connection()
+        def connect(widget):
+            self.controller = Controller(
+                dialog.get_host(), dialog.get_port(),
+                dialog.get_username(), dialog.get_password())
+            self.controller.connect()
+            dialog.destroy()
+        dialog.widgets.get_widget('ok_button').connect('clicked', connect)
+        dialog.widgets.get_widget('connectiondialog').show()
+
+    def on_disconnect_menu_item_activate(self, widget):
+        '''Disconnect from server.'''
+        if self.controller is not None:
+            self.controller.disconnect()
+        self.controller = None
+
+    def on_get_config_menu_item_activate(self, widget):
+        '''Get server config from remote server.'''
+        if self.controller is not None:
+            self.set_up_config(self.controller.get_server_configuration())
+
+    def on_get_mime_menu_item_activate(self, widget):
+        '''Get MIME config from remote server.'''
+        if self.controller is not None:
+            self.set_up_mime(self.controller.get_MIME_type_configuration())
+
+    def on_get_vhost_menu_item_activate(self, widget):
+        '''Get VHost config from remote server.'''
+        if self.controller is not None:
+            self.set_up_vhost(self.controller.get_vhost_configuration())
+
+    def on_put_config_menu_item_activate(self, widget):
+        '''Put server config on remote server.'''
+        if self.controller is not None:
+            self.controller.put_server_configuration(self.get_current_config())
+
+    def on_put_mime_menu_item_activate(self, widget):
+        '''Put MIME config on remote server.'''
+        if self.controller is not None:
+            self.controller.put_MIME_type_configuration(self.get_current_mime())
+
+    def on_put_vhost_menu_item_activate(self, widget):
+        '''Put VHost config on remote server.'''
+        if self.controller is not None:
+            self.controller.put_vhost_configuration(self.get_vhost_config())
+
+    def on_new_config_menu_item_activate(self, widget = None):
+        '''Clears server configuration.'''
+        if widget is not None:
+            self.config_path = None
+        self.config_custom = []
+        table, tree = self.tabs['unknown']
+        tree.get_model().clear()
+        for tab in self.tabs:
+            table, tree = self.tabs[tab]
+            table.clear()
+            tree.make_clear()
+
+    def on_new_mime_menu_item_activate(self, widget = None):
+        '''Clears MIME configuration.'''
+        if widget is not None:
+            self.mime_path = None
+        self.mime_custom = []
+        self.mime_custom_attrib = {}
+        table, tree = self.mime_tab[0]
+        table.clear()
+        tree.get_model().clear()
+
+    def on_new_vhost_menu_item_activate(self, widget = None):
+        '''Clears VHost configuration.'''
+        if widget is not None:
+            self.vhost_path = None
+        self.vhost_custom = []
+        self.vhost_custom_attrib = {}
+        table, tree = self.vhost_tab
+        table.clear()
+        tree.get_model().clear()
+
+    def generic_open(self, dialog, path, config_type, set_up_method):
+        '''Open configuration file.'''
+        if self.chooser is not None:
+            self.chooser.destroy()
+        self.chooser = gtk.FileChooserDialog(
+            dialog,
+            buttons = (gtk.STOCK_CANCEL, gtk.RESPONSE_CANCEL,
+                       gtk.STOCK_OPEN, gtk.RESPONSE_OK))
+        def handle_response(widget, response):
+            if response == gtk.RESPONSE_OK:
+                setattr(self, path, self.chooser.get_filename())
+                with open(getattr(self, path)) as f:
+                    conf = config_type.from_string(f.read())
+                set_up_method(conf)
+            self.chooser.destroy()
+        self.chooser.connect('response', handle_response)
+        self.chooser.show()
+
+    def on_open_config_menu_item_activate(self, widget):
+        '''Open local server configuration file.'''
+        self.generic_open(
+            'Open server configuration file.', 'config_path',
+            MyServerConfig, self.set_up_config)
+
+    def on_open_mime_menu_item_activate(self, widget):
+        '''Open local MIME configuration file.'''
+        self.generic_open(
+            'Open MIME configuration file.', 'mime_path',
+            MIMETypes, self.set_up_mime)
+
+    def on_open_vhost_menu_item_activate(self, widget):
+        '''Open local VHost configuration file.'''
+        self.generic_open(
+            'Open VHost configuration file.', 'vhost_path',
+            VHosts, self.set_up_vhost)
+
+    def generic_save_as(self, dialog, widget, path, save_method):
+        '''Save configuration as file.'''
+        if self.chooser is not None:
+            self.chooser.destroy()
+        self.chooser = gtk.FileChooserDialog(
+            dialog,
+            action = gtk.FILE_CHOOSER_ACTION_SAVE,
+            buttons = (gtk.STOCK_CANCEL, gtk.RESPONSE_CANCEL,
+                       gtk.STOCK_SAVE_AS, gtk.RESPONSE_OK))
+        def handle_response(widget, response):
+            if response == gtk.RESPONSE_OK:
+                setattr(self, path, self.chooser.get_filename())
+                save_method(widget)
+            self.chooser.destroy()
+        self.chooser.connect('response', handle_response)
+        self.chooser.show()
+
+    def on_save_as_config_menu_item_activate(self, widget):
+        '''Save server configuration as local file.'''
+        self.generic_save_as(
+            'Save server configuration file.',
+            widget, 'config_path',
+            self.on_save_config_menu_item_activate)
+
+    def on_save_as_mime_menu_item_activate(self, widget):
+        '''Save MIME configuration as local file.'''
+        self.generic_save_as(
+            'Save MIME configuration file.',
+            widget, 'mime_path',
+            self.on_save_mime_menu_item_activate)
+
+    def on_save_as_vhost_menu_item_activate(self, widget):
+        '''Save VHost configuration as local file.'''
+        self.generic_save_as(
+            'Save VHost configuration file.',
+            widget, 'vhost_path',
+            self.on_save_vhost_menu_item_activate)
+
+    def generic_save(self, widget, path, save_as_method, config_method):
+        '''Save configuration file.'''
+        if getattr(self, path) is None:
+            save_as_method(widget)
+        else:
+            config = config_method()
+            with open(getattr(self, path), 'w') as f:
+                f.write(str(config))
+
+    def on_save_config_menu_item_activate(self, widget):
+        '''Save server configuration to file.'''
+        self.generic_save(
+            widget, 'config_path',
+            self.on_save_as_config_menu_item_activate,
+            self.get_current_config)
+
+    def on_save_mime_menu_item_activate(self, widget):
+        '''Save MIME configuration to file.'''
+        self.generic_save(
+            widget, 'mime_path',
+            self.on_save_as_mime_menu_item_activate,
+            self.get_current_mime)
+
+    def on_save_vhost_menu_item_activate(self, widget):
+        '''Save VHost configuration to file.'''
+        self.generic_save(
+            widget, 'vhost_path',
+            self.on_save_as_vhost_menu_item_activate,
+            self.get_current_vhost)
+
+    def get_current_config(self):
+        '''Returns current server configuration as MyServerConfig instance.'''
+        definitions = []
+        for tab in self.tabs:
+            table, tree = self.tabs[tab]
+            definitions += table.make_def(tree)
+        config = MyServerConfig(definitions)
+        config.definitions.custom = self.config_custom
+        return config
+
+    def get_current_mime(self):
+        '''Returns current MIME configuration as MIMETypes instance.'''
+        table, tree = self.mime_tab[0]
+        mimes = table.make_def(tree)
+        config = MIMETypes(mimes)
+        config.custom = self.mime_custom
+        config.custom_attrib = self.mime_custom_attrib
+        return config
+
+    def get_current_vhost(self):
+        '''Returns current VHost configuration as VHosts instance.'''
+        table, tree = self.vhost_tab
+        vhosts = table.make_def(tree)
+        config = VHosts(vhosts)
+        config.custom = self.vhost_custom
+        config.custom_attrib = self.vhost_custom_attrib
+        return config
+
+    def on_add_unknown_definition_menu_item_activate(self, widget):
+        '''Adds a new definition to unknown tab.'''
+        table, tree = self.tabs['unknown']
+        tree.get_model().append(None, ('', '', False, True, '', False, {}, ))
+
+    def on_add_mime_type_menu_item_activate(self, widget):
+        '''Adds a new MIME type.'''
+        table, tree = self.mime_tab[0]
+        mime_lists = {}
+        for mime_list in GUIConfig.mime_lists:
+            mime_lists[mime_list] = []
+        tree.get_model().append(('', {}, mime_lists, [], [], {}, ))
+
+    def on_remove_mime_type_menu_item_activate(self, widget):
+        '''Removes selected MIME type.'''
+        table, tree = self.mime_tab[0]
+        table.remove_current(tree)
+
+    def on_add_vhost_menu_item_activate(self, widget):
+        '''Adds a new VHost.'''
+        table, tree = self.vhost_tab
+        vhost_lists = {}
+        for vhost_list in GUIConfig.vhost_lists:
+            vhost_lists[vhost_list[0]] = []
+        tree.get_model().append(('', {}, vhost_lists, [], [], {}, ))
+
+    def on_remove_vhost_menu_item_activate(self, widget):
+        '''Removes selected VHost.'''
+        table, tree = self.vhost_tab
+        table.remove_current(tree)
+
+    def on_add_definition_to_mime_menu_item_activate(self, widget):
+        '''Adds a definition to currently selected MIME type.'''
+        table, tree = self.mime_tab[1]
+        tree.get_model().append(None, ('', '', False, True, '', False, {}, ))
+
+    def on_add_log_to_vhost_menu_item_activate(self, widget):
+        '''Adds a log to currently selected VHost.'''
+        table, tree = self.vhost_tab
+        table.add_log()
+
+    def on_remove_log_from_vhost_menu_item_activate(self, widget):
+        '''Removes selected log from currently selected VHost.'''
+        table, tree = self.vhost_tab
+        table.remove_log()
+
+    def set_up_config(self, config):
+        '''Reads server configuration from given config instance.'''
+        self.on_new_config_menu_item_activate()
+        self.config_custom = config.definitions.custom
+        tabs = {}
+        for tab in self.tabs:
+            tabs[tab] = []
+        for definition in config.get_definitions():
+            name = definition.get_name()
+            tab_name = self.options[name] if name in self.options else 'unknown'
+            tabs[tab_name].append(definition)
+
+        for tab in tabs:
+            tree = self.tabs[tab][1]
+            tree.set_up(tabs[tab], tab != 'unknown')
+
+    def set_up_mime(self, config):
+        '''Reads MIME configuration from given config instance.'''
+        self.on_new_mime_menu_item_activate()
+        self.mime_custom = config.custom
+        self.mime_custom_attrib = config.custom_attrib
+        tree = self.mime_tab[0][1]
+        tree.set_up(config.MIME_types)
+
+    def set_up_vhost(self, config):
+        '''Reads VHost configuration from given config instance.'''
+        self.on_new_vhost_menu_item_activate()
+        self.vhost_custom = config.custom
+        self.vhost_custom_attrib = config.custom_attrib
+        tree = self.vhost_tab[1]
+        tree.set_up(config.VHosts)
+
+    def construct_options(self):
+        '''Reads known options from file and prepares GUI.'''
+
+        # segregate options by tab
+        segregated_options = {} # tab name => option names
+        self.options = {} # option name => tab name
+        for option in GUIConfig.options:
+            tab = 'other'
+            for prefix in GUIConfig.tabs:
+                if option.startswith(prefix):
+                    tab = prefix
+                    break
+            if not segregated_options.has_key(tab):
+                segregated_options[tab] = []
+            segregated_options[tab].append(option)
+            self.options[option] = tab
+
+        self.tabs = {} # tab name => (table, tree, )
+        for tab in GUIConfig.tabs + ['other', 'unknown']:
+            options = segregated_options.get(tab, [])
+            panels = gtk.HPaned()
+
+            tree = DefinitionTreeView()
+            tree_model = tree.get_model()
+            panels.pack1(tree.scroll, True, False)
+            table = DefinitionTable(tree)
+            panels.pack2(table, False, False)
+
+            self.tabs[tab] = (table, tree, )
+
+            for option in options:
+                tooltip_text, var = GUIConfig.options[option]
+                # all but first three columns will be set to defaults later by
+                # on_new_menu_item_activate
+                tree_model.append(None, (option, tooltip_text, True, False, '',
+                                         False, {}, ))
+
+            self.widgets.get_widget('notebook').append_page(
+                panels, gtk.Label(tab))
+
+        self.on_new_config_menu_item_activate()
+        self.widgets.get_widget('notebook').show_all()
+
+    def construct_mime(self):
+        '''Reads mime options from file and prepares GUI.'''
+        vpanels = gtk.VPaned()
+
+        panels = gtk.HPaned()
+        def_tree = DefinitionTreeView()
+        panels.pack1(def_tree.scroll, True, False)
+        def_table = DefinitionTable(def_tree)
+        panels.pack2(def_table, False, False)
+
+        vpanels.pack2(panels)
+
+        panels = gtk.HPaned()
+        tree = MimeTreeView()
+        panels.pack1(tree.scroll, True, False)
+        table = MimeTable(tree, def_tree, def_table)
+        panels.pack2(table, False, False)
+
+        vpanels.pack1(panels)
+
+        self.mime_tab = ((table, tree, ), (def_table, def_tree), )
+        self.widgets.get_widget('notebook').append_page(
+            vpanels, gtk.Label('MIME Type'))
+
+        self.widgets.get_widget('notebook').show_all()
+
+    def construct_vhosts(self):
+        '''Reads vhost options from file and prepares GUI.'''
+        panels = gtk.HPaned()
+        tree = VHostTreeView()
+        panels.pack1(tree.scroll, True, False)
+        table = VHostTable(tree)
+        panels.pack2(table.scroll, True, False)
+
+        self.vhost_tab = (table, tree, )
+        self.widgets.get_widget('notebook').append_page(
+            panels, gtk.Label('VHosts'))
+
+        self.widgets.get_widget('notebook').show_all()
+
+    def construct_browser(self):
+        '''Constructs file browser.'''
+        panels = gtk.HPaned()
+        self.security_table = SecurityTable()
+        panels.pack2(self.security_table, True, False)
+        self.browser_table = BrowserTable(self.security_table.read_from_file)
+        panels.pack1(self.browser_table, True, False)
+        
+        self.widgets.get_widget('notebook').append_page(
+            panels, gtk.Label('File browser'))
+
+        self.widgets.get_widget('notebook').show_all()
+
+    def on_save_security_menu_item_activate(self, widget):
+        self.security_table.write_to_file(
+            self.browser_table.browser_tree.browser)
+
+PyGTKControl()
+gtk.main()
diff --git a/myserver/src/GUI/PyGTKControl.glade b/myserver/src/GUI/PyGTKControl.glade
new file mode 100644
index 0000000..fb843a0
--- /dev/null
+++ b/myserver/src/GUI/PyGTKControl.glade
@@ -0,0 +1,1436 @@
+<?xml version="1.0"?>
+<glade-interface>
+  <!-- interface-requires gtk+ 2.16 -->
+  <!-- interface-naming-policy toplevel-contextual -->
+  <widget class="GtkWindow" id="window">
+    <property name="visible">True</property>
+    <signal name="destroy" handler="on_window_destroy"/>
+    <child>
+      <widget class="GtkVBox" id="vbox1">
+        <property name="visible">True</property>
+        <property name="orientation">vertical</property>
+        <child>
+          <widget class="GtkMenuBar" id="menubar">
+            <property name="visible">True</property>
+            <child>
+              <widget class="GtkMenuItem" id="file_menu_item">
+                <property name="visible">True</property>
+                <property name="label" translatable="yes">_File</property>
+                <property name="use_underline">True</property>
+                <child>
+                  <widget class="GtkMenu" id="file_menu">
+                    <property name="visible">True</property>
+                    <child>
+                      <widget class="GtkImageMenuItem" id="new_menu_item">
+                        <property name="label">New</property>
+                        <property name="visible">True</property>
+                        <property name="use_stock">False</property>
+                        <child>
+                          <widget class="GtkMenu" id="new_menu">
+                            <property name="visible">True</property>
+                            <child>
+                              <widget class="GtkMenuItem" id="new_config_menu_item">
+                                <property name="visible">True</property>
+                                <property name="label" translatable="yes">New server configuration</property>
+                                <property name="use_underline">True</property>
+                                <signal name="activate" handler="on_new_config_menu_item_activate"/>
+                              </widget>
+                            </child>
+                            <child>
+                              <widget class="GtkMenuItem" id="new_mime_menu_item">
+                                <property name="visible">True</property>
+                                <property name="label" translatable="yes">New MIME configuration</property>
+                                <property name="use_underline">True</property>
+                                <signal name="activate" handler="on_new_mime_menu_item_activate"/>
+                              </widget>
+                            </child>
+                            <child>
+                              <widget class="GtkMenuItem" id="new_vhost_menu_item">
+                                <property name="visible">True</property>
+                                <property name="label" translatable="yes">New VHost configuration</property>
+                                <property name="use_underline">True</property>
+                                <signal name="activate" handler="on_new_vhost_menu_item_activate"/>
+                              </widget>
+                            </child>
+                          </widget>
+                        </child>
+                        <child internal-child="image">
+                          <widget class="GtkImage" id="new_image">
+                            <property name="visible">True</property>
+                            <property name="stock">gtk-new</property>
+                            <property name="icon-size">1</property>
+                          </widget>
+                        </child>
+                      </widget>
+                    </child>
+                    <child>
+                      <widget class="GtkImageMenuItem" id="open_menu_item">
+                        <property name="label">Open</property>
+                        <property name="visible">True</property>
+                        <property name="use_stock">False</property>
+                        <child>
+                          <widget class="GtkMenu" id="open_menu">
+                            <property name="visible">True</property>
+                            <child>
+                              <widget class="GtkMenuItem" id="open_config_menu_item">
+                                <property name="visible">True</property>
+                                <property name="label" translatable="yes">Open server configuration</property>
+                                <property name="use_underline">True</property>
+                                <signal name="activate" handler="on_open_config_menu_item_activate"/>
+                              </widget>
+                            </child>
+                            <child>
+                              <widget class="GtkMenuItem" id="open_mime_menu_item">
+                                <property name="visible">True</property>
+                                <property name="label" translatable="yes">Open MIME configuration</property>
+                                <property name="use_underline">True</property>
+                                <signal name="activate" handler="on_open_mime_menu_item_activate"/>
+                              </widget>
+                            </child>
+                            <child>
+                              <widget class="GtkMenuItem" id="open_vhost_menu_item">
+                                <property name="visible">True</property>
+                                <property name="label" translatable="yes">Open VHost configuration</property>
+                                <property name="use_underline">True</property>
+                                <signal name="activate" handler="on_open_vhost_menu_item_activate"/>
+                              </widget>
+                            </child>
+                          </widget>
+                        </child>
+                        <child internal-child="image">
+                          <widget class="GtkImage" id="open_image">
+                            <property name="visible">True</property>
+                            <property name="stock">gtk-open</property>
+                            <property name="icon-size">1</property>
+                          </widget>
+                        </child>
+                      </widget>
+                    </child>
+                    <child>
+                      <widget class="GtkImageMenuItem" id="save_menu_item">
+                        <property name="label">Save</property>
+                        <property name="visible">True</property>
+                        <property name="use_stock">False</property>
+                        <child>
+                          <widget class="GtkMenu" id="save_menu">
+                            <property name="visible">True</property>
+                            <child>
+                              <widget class="GtkMenuItem" id="save_config_menu_item">
+                                <property name="visible">True</property>
+                                <property name="label" translatable="yes">Save server configuration</property>
+                                <property name="use_underline">True</property>
+                                <signal name="activate" handler="on_save_config_menu_item_activate"/>
+                              </widget>
+                            </child>
+                            <child>
+                              <widget class="GtkMenuItem" id="save_mime_menu_item">
+                                <property name="visible">True</property>
+                                <property name="label" translatable="yes">Save MIME configuration</property>
+                                <property name="use_underline">True</property>
+                                <signal name="activate" handler="on_save_mime_menu_item_activate"/>
+                              </widget>
+                            </child>
+                            <child>
+                              <widget class="GtkMenuItem" id="save_vhost_menu_item">
+                                <property name="visible">True</property>
+                                <property name="label" translatable="yes">Save VHost configuration</property>
+                                <property name="use_underline">True</property>
+                                <signal name="activate" handler="on_save_vhost_menu_item_activate"/>
+                              </widget>
+                            </child>
+                          </widget>
+                        </child>
+                        <child internal-child="image">
+                          <widget class="GtkImage" id="save_image">
+                            <property name="visible">True</property>
+                            <property name="stock">gtk-save</property>
+                            <property name="icon-size">1</property>
+                          </widget>
+                        </child>
+                      </widget>
+                    </child>
+                    <child>
+                      <widget class="GtkImageMenuItem" id="save_as_menu_item">
+                        <property name="label">Save as</property>
+                        <property name="visible">True</property>
+                        <property name="use_stock">False</property>
+                        <child>
+                          <widget class="GtkMenu" id="save_as_menu">
+                            <property name="visible">True</property>
+                            <child>
+                              <widget class="GtkMenuItem" id="save_as_config_menu_item">
+                                <property name="visible">True</property>
+                                <property name="label" translatable="yes">Save server configuration</property>
+                                <property name="use_underline">True</property>
+                                <signal name="activate" handler="on_save_as_config_menu_item_activate"/>
+                              </widget>
+                            </child>
+                            <child>
+                              <widget class="GtkMenuItem" id="save_as_mime_menu_item">
+                                <property name="visible">True</property>
+                                <property name="label" translatable="yes">Save MIME configuration</property>
+                                <property name="use_underline">True</property>
+                                <signal name="activate" handler="on_save_as_mime_menu_item_activate"/>
+                              </widget>
+                            </child>
+                            <child>
+                              <widget class="GtkMenuItem" id="save_as_vhost_menu_item">
+                                <property name="visible">True</property>
+                                <property name="label" translatable="yes">Save VHost configuration</property>
+                                <property name="use_underline">True</property>
+                                <signal name="activate" handler="on_save_as_vhost_menu_item_activate"/>
+                              </widget>
+                            </child>
+                          </widget>
+                        </child>
+                        <child internal-child="image">
+                          <widget class="GtkImage" id="save_as_image">
+                            <property name="visible">True</property>
+                            <property name="stock">gtk-save-as</property>
+                            <property name="icon-size">1</property>
+                          </widget>
+                        </child>
+                      </widget>
+                    </child>
+                    <child>
+                      <widget class="GtkSeparatorMenuItem" id="separator1">
+                        <property name="visible">True</property>
+                      </widget>
+                    </child>
+                    <child>
+                      <widget class="GtkImageMenuItem" id="quit_menu_item">
+                        <property name="label">gtk-quit</property>
+                        <property name="visible">True</property>
+                        <property name="use_underline">True</property>
+                        <property name="use_stock">True</property>
+                        <signal name="activate" handler="on_quit_menu_item_activate"/>
+                      </widget>
+                    </child>
+                  </widget>
+                </child>
+              </widget>
+            </child>
+            <child>
+              <widget class="GtkMenuItem" id="remote_menu_item">
+                <property name="visible">True</property>
+                <property name="label" translatable="yes">_Remote</property>
+                <property name="use_underline">True</property>
+                <child>
+                  <widget class="GtkMenu" id="remote_menu">
+                    <property name="visible">True</property>
+                    <child>
+                      <widget class="GtkImageMenuItem" id="connect_menu_item">
+                        <property name="label">gtk-connect</property>
+                        <property name="visible">True</property>
+                        <property name="use_underline">True</property>
+                        <property name="use_stock">True</property>
+                        <signal name="activate" handler="on_connect_menu_item_activate"/>
+                      </widget>
+                    </child>
+                    <child>
+                      <widget class="GtkImageMenuItem" id="disconnect_menu_item">
+                        <property name="label">gtk-disconnect</property>
+                        <property name="visible">True</property>
+                        <property name="use_underline">True</property>
+                        <property name="use_stock">True</property>
+                        <signal name="activate" handler="on_disconnect_menu_item_activate"/>
+                      </widget>
+                    </child>
+                    <child>
+                      <widget class="GtkSeparatorMenuItem" id="separator2">
+                        <property name="visible">True</property>
+                      </widget>
+                    </child>
+                    <child>
+                      <widget class="GtkImageMenuItem" id="get_menu_item">
+                        <property name="label">Get</property>
+                        <property name="visible">True</property>
+                        <property name="use_stock">False</property>
+                        <child>
+                          <widget class="GtkMenu" id="get_menu">
+                            <property name="visible">True</property>
+                            <child>
+                              <widget class="GtkMenuItem" id="get_config_menu_item">
+                                <property name="visible">True</property>
+                                <property name="label" translatable="yes">Get server configuration</property>
+                                <property name="use_underline">True</property>
+                                <signal name="activate" handler="on_get_config_menu_item_activate"/>
+                              </widget>
+                            </child>
+                            <child>
+                              <widget class="GtkMenuItem" id="get_mime_menu_item">
+                                <property name="visible">True</property>
+                                <property name="label" translatable="yes">Get MIME configuration</property>
+                                <property name="use_underline">True</property>
+                                <signal name="activate" handler="on_get_mime_menu_item_activate"/>
+                              </widget>
+                            </child>
+                            <child>
+                              <widget class="GtkMenuItem" id="get_vhost_menu_item">
+                                <property name="visible">True</property>
+                                <property name="label" translatable="yes">Get VHost configuration</property>
+                                <property name="use_underline">True</property>
+                                <signal name="activate" handler="on_get_vhost_menu_item_activate"/>
+                              </widget>
+                            </child>
+                          </widget>
+                        </child>
+                        <child internal-child="image">
+                          <widget class="GtkImage" id="get_image">
+                            <property name="visible">True</property>
+                            <property name="stock">gtk-go-down</property>
+                            <property name="icon-size">1</property>
+                          </widget>
+                        </child>
+                      </widget>
+                    </child>
+                    <child>
+                      <widget class="GtkImageMenuItem" id="put_menu_item">
+                        <property name="label">Put</property>
+                        <property name="visible">True</property>
+                        <property name="use_stock">False</property>
+                        <child>
+                          <widget class="GtkMenu" id="put_menu">
+                            <property name="visible">True</property>
+                            <child>
+                              <widget class="GtkMenuItem" id="put_config_menu_item">
+                                <property name="visible">True</property>
+                                <property name="label" translatable="yes">Put server configuration</property>
+                                <property name="use_underline">True</property>
+                                <signal name="activate" handler="on_put_config_menu_item_activate"/>
+                              </widget>
+                            </child>
+                            <child>
+                              <widget class="GtkMenuItem" id="put_mime_menu_item">
+                                <property name="visible">True</property>
+                                <property name="label" translatable="yes">Put MIME configuration</property>
+                                <property name="use_underline">True</property>
+                                <signal name="activate" handler="on_put_mime_menu_item_activate"/>
+                              </widget>
+                            </child>
+                            <child>
+                              <widget class="GtkMenuItem" id="put_vhost_menu_item">
+                                <property name="visible">True</property>
+                                <property name="label" translatable="yes">Put VHost configuration</property>
+                                <property name="use_underline">True</property>
+                                <signal name="activate" handler="on_put_vhost_menu_item_activate"/>
+                              </widget>
+                            </child>
+                          </widget>
+                        </child>
+                        <child internal-child="image">
+                          <widget class="GtkImage" id="put_image">
+                            <property name="visible">True</property>
+                            <property name="stock">gtk-redo</property>
+                            <property name="icon-size">1</property>
+                          </widget>
+                        </child>
+                      </widget>
+                    </child>
+                  </widget>
+                </child>
+              </widget>
+            </child>
+            <child>
+              <widget class="GtkMenuItem" id="definitions_menu_item">
+                <property name="visible">True</property>
+                <property name="label" translatable="yes">_Definitions</property>
+                <property name="use_underline">True</property>
+                <child>
+                  <widget class="GtkMenu" id="definitions_menu">
+                    <property name="visible">True</property>
+                    <child>
+                      <widget class="GtkImageMenuItem" id="add_unknown_definition_menu_item">
+                        <property name="label">Add unknown definition</property>
+                        <property name="visible">True</property>
+                        <property name="use_stock">False</property>
+                        <signal name="activate" handler="on_add_unknown_definition_menu_item_activate"/>
+                        <child internal-child="image">
+                          <widget class="GtkImage" id="add_unknown_definition_image">
+                            <property name="visible">True</property>
+                            <property name="stock">gtk-add</property>
+                            <property name="icon-size">1</property>
+                          </widget>
+                        </child>
+                      </widget>
+                    </child>
+                  </widget>
+                </child>
+              </widget>
+            </child>
+            <child>
+              <widget class="GtkMenuItem" id="mime_types_menu_item">
+                <property name="visible">True</property>
+                <property name="label" translatable="yes">_MIME Types</property>
+                <property name="use_underline">True</property>
+                <child>
+                  <widget class="GtkMenu" id="mime_types_menu">
+                    <property name="visible">True</property>
+                    <child>
+                      <widget class="GtkImageMenuItem" id="add_mime_type_menu_item">
+                        <property name="label">Add MIME type</property>
+                        <property name="visible">True</property>
+                        <property name="use_stock">False</property>
+                        <signal name="activate" handler="on_add_mime_type_menu_item_activate"/>
+                        <child internal-child="image">
+                          <widget class="GtkImage" id="add_mime_type_image">
+                            <property name="visible">True</property>
+                            <property name="stock">gtk-add</property>
+                            <property name="icon-size">1</property>
+                          </widget>
+                        </child>
+                      </widget>
+                    </child>
+                    <child>
+                      <widget class="GtkImageMenuItem" id="remove_mime_type_menu_item">
+                        <property name="label">Remove MIME type</property>
+                        <property name="visible">True</property>
+                        <property name="use_stock">False</property>
+                        <signal name="activate" handler="on_remove_mime_type_menu_item_activate"/>
+                        <child internal-child="image">
+                          <widget class="GtkImage" id="remove_mime_type_image">
+                            <property name="visible">True</property>
+                            <property name="stock">gtk-remove</property>
+                            <property name="icon-size">1</property>
+                          </widget>
+                        </child>
+                      </widget>
+                    </child>
+                    <child>
+                      <widget class="GtkImageMenuItem" id="add_definition_to_mime_menu_item">
+                        <property name="label">Add definition to MIME type</property>
+                        <property name="visible">True</property>
+                        <property name="use_stock">False</property>
+                        <signal name="activate" handler="on_add_definition_to_mime_menu_item_activate"/>
+                        <child internal-child="image">
+                          <widget class="GtkImage" id="add_definition_to_mime_image">
+                            <property name="visible">True</property>
+                            <property name="stock">gtk-add</property>
+                            <property name="icon-size">1</property>
+                          </widget>
+                        </child>
+                      </widget>
+                    </child>
+                  </widget>
+                </child>
+              </widget>
+            </child>
+            <child>
+              <widget class="GtkMenuItem" id="vhost_menu_item">
+                <property name="visible">True</property>
+                <property name="label" translatable="yes">_VHosts</property>
+                <property name="use_underline">True</property>
+                <child>
+                  <widget class="GtkMenu" id="vhost_menu">
+                    <property name="visible">True</property>
+                    <child>
+                      <widget class="GtkImageMenuItem" id="add_vhost_menu_item">
+                        <property name="label">Add VHost</property>
+                        <property name="visible">True</property>
+                        <property name="use_stock">False</property>
+                        <signal name="activate" handler="on_add_vhost_menu_item_activate"/>
+                        <child internal-child="image">
+                          <widget class="GtkImage" id="add_vhost_image">
+                            <property name="visible">True</property>
+                            <property name="stock">gtk-add</property>
+                            <property name="icon-size">1</property>
+                          </widget>
+                        </child>
+                      </widget>
+                    </child>
+                    <child>
+                      <widget class="GtkImageMenuItem" id="remove_vhost_menu_item">
+                        <property name="label">Remove VHost</property>
+                        <property name="visible">True</property>
+                        <property name="use_stock">False</property>
+                        <signal name="activate" handler="on_remove_vhost_menu_item_activate"/>
+                        <child internal-child="image">
+                          <widget class="GtkImage" id="remove_vhost_image">
+                            <property name="visible">True</property>
+                            <property name="stock">gtk-remove</property>
+                            <property name="icon-size">1</property>
+                          </widget>
+                        </child>
+                      </widget>
+                    </child>
+                    <child>
+                      <widget class="GtkImageMenuItem" id="add_log_to_vhost_menu_item">
+                        <property name="label">Add log to VHost</property>
+                        <property name="visible">True</property>
+                        <property name="use_stock">False</property>
+                        <signal name="activate" handler="on_add_log_to_vhost_menu_item_activate"/>
+                        <child internal-child="image">
+                          <widget class="GtkImage" id="add_log_to_vhost_image">
+                            <property name="visible">True</property>
+                            <property name="stock">gtk-add</property>
+                            <property name="icon-size">1</property>
+                          </widget>
+                        </child>
+                      </widget>
+                    </child>
+                    <child>
+                      <widget class="GtkImageMenuItem" id="remove_log_from_vhost_menu_item">
+                        <property name="label">Remove log from VHost</property>
+                        <property name="visible">True</property>
+                        <property name="use_stock">False</property>
+                        <signal name="activate" handler="on_remove_log_from_vhost_menu_item_activate"/>
+                        <child internal-child="image">
+                          <widget class="GtkImage" id="remove_log_from_vhost_image">
+                            <property name="visible">True</property>
+                            <property name="stock">gtk-remove</property>
+                            <property name="icon-size">1</property>
+                          </widget>
+                        </child>
+                      </widget>
+                    </child>
+                  </widget>
+                </child>
+              </widget>
+            </child>
+            <child>
+              <widget class="GtkMenuItem" id="security_menu_item">
+                <property name="visible">True</property>
+                <property name="label" translatable="yes">_Security</property>
+                <property name="use_underline">True</property>
+                <child>
+                  <widget class="GtkMenu" id="security_menu">
+                    <property name="visible">True</property>
+                    <child>
+                      <widget class="GtkImageMenuItem" id="save_security_menu_item">
+                        <property name="label">Save security</property>
+                        <property name="visible">True</property>
+                        <property name="use_stock">False</property>
+                        <signal name="activate" handler="on_save_security_menu_item_activate"/>
+                        <child internal-child="image">
+                          <widget class="GtkImage" id="save_security_image">
+                            <property name="visible">True</property>
+                            <property name="stock">gtk-save</property>
+                            <property name="icon-size">1</property>
+                          </widget>
+                        </child>
+                      </widget>
+                    </child>
+                  </widget>
+                </child>
+              </widget>
+            </child>
+            <child>
+              <widget class="GtkMenuItem" id="help_menu_item">
+                <property name="visible">True</property>
+                <property name="label" translatable="yes">_Help</property>
+                <property name="use_underline">True</property>
+                <child>
+                  <widget class="GtkMenu" id="help_menu">
+                    <property name="visible">True</property>
+                    <child>
+                      <widget class="GtkImageMenuItem" id="about_menu_item">
+                        <property name="label">gtk-about</property>
+                        <property name="visible">True</property>
+                        <property name="use_underline">True</property>
+                        <property name="use_stock">True</property>
+                        <signal name="activate" handler="on_about_menu_item_activate"/>
+                      </widget>
+                    </child>
+                  </widget>
+                </child>
+              </widget>
+            </child>
+          </widget>
+          <packing>
+            <property name="expand">False</property>
+            <property name="position">0</property>
+          </packing>
+        </child>
+        <child>
+          <widget class="GtkNotebook" id="notebook">
+            <property name="visible">True</property>
+            <property name="can_focus">True</property>
+          </widget>
+          <packing>
+            <property name="position">1</property>
+          </packing>
+        </child>
+        <child>
+          <widget class="GtkStatusbar" id="statusbar">
+            <property name="visible">True</property>
+            <property name="spacing">2</property>
+          </widget>
+          <packing>
+            <property name="expand">False</property>
+            <property name="position">2</property>
+          </packing>
+        </child>
+      </widget>
+    </child>
+  </widget>
+  <widget class="GtkAboutDialog" id="aboutdialog">
+    <property name="visible">True</property>
+    <property name="border_width">5</property>
+    <property name="type_hint">normal</property>
+    <property name="has_separator">False</property>
+    <property name="program_name">GNU MyServer Control</property>
+    <property name="version">v0.0</property>
+    <property name="copyright" translatable="yes">Copyright (C) 2009 Free Software Foundation, Inc.
+This program 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 3 of the License, or
+(at your option) any later version.</property>
+    <property name="website">http://www.gnu.org/software/myserver/</property>
+    <property name="license">                    GNU GENERAL PUBLIC LICENSE
+                       Version 3, 29 June 2007
+
+ Copyright (C) 2007 Free Software Foundation, Inc. &lt;http://fsf.org/&gt;
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+                            Preamble
+
+  The GNU General Public License is a free, copyleft license for
+software and other kinds of works.
+
+  The licenses for most software and other practical works are designed
+to take away your freedom to share and change the works.  By contrast,
+the GNU General Public License is intended to guarantee your freedom to
+share and change all versions of a program--to make sure it remains free
+software for all its users.  We, the Free Software Foundation, use the
+GNU General Public License for most of our software; it applies also to
+any other work released this way by its authors.  You can apply it to
+your programs, too.
+
+  When we speak of free software, we are referring to freedom, not
+price.  Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+them if you wish), that you receive source code or can get it if you
+want it, that you can change the software or use pieces of it in new
+free programs, and that you know you can do these things.
+
+  To protect your rights, we need to prevent others from denying you
+these rights or asking you to surrender the rights.  Therefore, you have
+certain responsibilities if you distribute copies of the software, or if
+you modify it: responsibilities to respect the freedom of others.
+
+  For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must pass on to the recipients the same
+freedoms that you received.  You must make sure that they, too, receive
+or can get the source code.  And you must show them these terms so they
+know their rights.
+
+  Developers that use the GNU GPL protect your rights with two steps:
+(1) assert copyright on the software, and (2) offer you this License
+giving you legal permission to copy, distribute and/or modify it.
+
+  For the developers' and authors' protection, the GPL clearly explains
+that there is no warranty for this free software.  For both users' and
+authors' sake, the GPL requires that modified versions be marked as
+changed, so that their problems will not be attributed erroneously to
+authors of previous versions.
+
+  Some devices are designed to deny users access to install or run
+modified versions of the software inside them, although the manufacturer
+can do so.  This is fundamentally incompatible with the aim of
+protecting users' freedom to change the software.  The systematic
+pattern of such abuse occurs in the area of products for individuals to
+use, which is precisely where it is most unacceptable.  Therefore, we
+have designed this version of the GPL to prohibit the practice for those
+products.  If such problems arise substantially in other domains, we
+stand ready to extend this provision to those domains in future versions
+of the GPL, as needed to protect the freedom of users.
+
+  Finally, every program is threatened constantly by software patents.
+States should not allow patents to restrict development and use of
+software on general-purpose computers, but in those that do, we wish to
+avoid the special danger that patents applied to a free program could
+make it effectively proprietary.  To prevent this, the GPL assures that
+patents cannot be used to render the program non-free.
+
+  The precise terms and conditions for copying, distribution and
+modification follow.
+
+                       TERMS AND CONDITIONS
+
+  0. Definitions.
+
+  "This License" refers to version 3 of the GNU General Public License.
+
+  "Copyright" also means copyright-like laws that apply to other kinds of
+works, such as semiconductor masks.
+
+  "The Program" refers to any copyrightable work licensed under this
+License.  Each licensee is addressed as "you".  "Licensees" and
+"recipients" may be individuals or organizations.
+
+  To "modify" a work means to copy from or adapt all or part of the work
+in a fashion requiring copyright permission, other than the making of an
+exact copy.  The resulting work is called a "modified version" of the
+earlier work or a work "based on" the earlier work.
+
+  A "covered work" means either the unmodified Program or a work based
+on the Program.
+
+  To "propagate" a work means to do anything with it that, without
+permission, would make you directly or secondarily liable for
+infringement under applicable copyright law, except executing it on a
+computer or modifying a private copy.  Propagation includes copying,
+distribution (with or without modification), making available to the
+public, and in some countries other activities as well.
+
+  To "convey" a work means any kind of propagation that enables other
+parties to make or receive copies.  Mere interaction with a user through
+a computer network, with no transfer of a copy, is not conveying.
+
+  An interactive user interface displays "Appropriate Legal Notices"
+to the extent that it includes a convenient and prominently visible
+feature that (1) displays an appropriate copyright notice, and (2)
+tells the user that there is no warranty for the work (except to the
+extent that warranties are provided), that licensees may convey the
+work under this License, and how to view a copy of this License.  If
+the interface presents a list of user commands or options, such as a
+menu, a prominent item in the list meets this criterion.
+
+  1. Source Code.
+
+  The "source code" for a work means the preferred form of the work
+for making modifications to it.  "Object code" means any non-source
+form of a work.
+
+  A "Standard Interface" means an interface that either is an official
+standard defined by a recognized standards body, or, in the case of
+interfaces specified for a particular programming language, one that
+is widely used among developers working in that language.
+
+  The "System Libraries" of an executable work include anything, other
+than the work as a whole, that (a) is included in the normal form of
+packaging a Major Component, but which is not part of that Major
+Component, and (b) serves only to enable use of the work with that
+Major Component, or to implement a Standard Interface for which an
+implementation is available to the public in source code form.  A
+"Major Component", in this context, means a major essential component
+(kernel, window system, and so on) of the specific operating system
+(if any) on which the executable work runs, or a compiler used to
+produce the work, or an object code interpreter used to run it.
+
+  The "Corresponding Source" for a work in object code form means all
+the source code needed to generate, install, and (for an executable
+work) run the object code and to modify the work, including scripts to
+control those activities.  However, it does not include the work's
+System Libraries, or general-purpose tools or generally available free
+programs which are used unmodified in performing those activities but
+which are not part of the work.  For example, Corresponding Source
+includes interface definition files associated with source files for
+the work, and the source code for shared libraries and dynamically
+linked subprograms that the work is specifically designed to require,
+such as by intimate data communication or control flow between those
+subprograms and other parts of the work.
+
+  The Corresponding Source need not include anything that users
+can regenerate automatically from other parts of the Corresponding
+Source.
+
+  The Corresponding Source for a work in source code form is that
+same work.
+
+  2. Basic Permissions.
+
+  All rights granted under this License are granted for the term of
+copyright on the Program, and are irrevocable provided the stated
+conditions are met.  This License explicitly affirms your unlimited
+permission to run the unmodified Program.  The output from running a
+covered work is covered by this License only if the output, given its
+content, constitutes a covered work.  This License acknowledges your
+rights of fair use or other equivalent, as provided by copyright law.
+
+  You may make, run and propagate covered works that you do not
+convey, without conditions so long as your license otherwise remains
+in force.  You may convey covered works to others for the sole purpose
+of having them make modifications exclusively for you, or provide you
+with facilities for running those works, provided that you comply with
+the terms of this License in conveying all material for which you do
+not control copyright.  Those thus making or running the covered works
+for you must do so exclusively on your behalf, under your direction
+and control, on terms that prohibit them from making any copies of
+your copyrighted material outside their relationship with you.
+
+  Conveying under any other circumstances is permitted solely under
+the conditions stated below.  Sublicensing is not allowed; section 10
+makes it unnecessary.
+
+  3. Protecting Users' Legal Rights From Anti-Circumvention Law.
+
+  No covered work shall be deemed part of an effective technological
+measure under any applicable law fulfilling obligations under article
+11 of the WIPO copyright treaty adopted on 20 December 1996, or
+similar laws prohibiting or restricting circumvention of such
+measures.
+
+  When you convey a covered work, you waive any legal power to forbid
+circumvention of technological measures to the extent such circumvention
+is effected by exercising rights under this License with respect to
+the covered work, and you disclaim any intention to limit operation or
+modification of the work as a means of enforcing, against the work's
+users, your or third parties' legal rights to forbid circumvention of
+technological measures.
+
+  4. Conveying Verbatim Copies.
+
+  You may convey verbatim copies of the Program's source code as you
+receive it, in any medium, provided that you conspicuously and
+appropriately publish on each copy an appropriate copyright notice;
+keep intact all notices stating that this License and any
+non-permissive terms added in accord with section 7 apply to the code;
+keep intact all notices of the absence of any warranty; and give all
+recipients a copy of this License along with the Program.
+
+  You may charge any price or no price for each copy that you convey,
+and you may offer support or warranty protection for a fee.
+
+  5. Conveying Modified Source Versions.
+
+  You may convey a work based on the Program, or the modifications to
+produce it from the Program, in the form of source code under the
+terms of section 4, provided that you also meet all of these conditions:
+
+    a) The work must carry prominent notices stating that you modified
+    it, and giving a relevant date.
+
+    b) The work must carry prominent notices stating that it is
+    released under this License and any conditions added under section
+    7.  This requirement modifies the requirement in section 4 to
+    "keep intact all notices".
+
+    c) You must license the entire work, as a whole, under this
+    License to anyone who comes into possession of a copy.  This
+    License will therefore apply, along with any applicable section 7
+    additional terms, to the whole of the work, and all its parts,
+    regardless of how they are packaged.  This License gives no
+    permission to license the work in any other way, but it does not
+    invalidate such permission if you have separately received it.
+
+    d) If the work has interactive user interfaces, each must display
+    Appropriate Legal Notices; however, if the Program has interactive
+    interfaces that do not display Appropriate Legal Notices, your
+    work need not make them do so.
+
+  A compilation of a covered work with other separate and independent
+works, which are not by their nature extensions of the covered work,
+and which are not combined with it such as to form a larger program,
+in or on a volume of a storage or distribution medium, is called an
+"aggregate" if the compilation and its resulting copyright are not
+used to limit the access or legal rights of the compilation's users
+beyond what the individual works permit.  Inclusion of a covered work
+in an aggregate does not cause this License to apply to the other
+parts of the aggregate.
+
+  6. Conveying Non-Source Forms.
+
+  You may convey a covered work in object code form under the terms
+of sections 4 and 5, provided that you also convey the
+machine-readable Corresponding Source under the terms of this License,
+in one of these ways:
+
+    a) Convey the object code in, or embodied in, a physical product
+    (including a physical distribution medium), accompanied by the
+    Corresponding Source fixed on a durable physical medium
+    customarily used for software interchange.
+
+    b) Convey the object code in, or embodied in, a physical product
+    (including a physical distribution medium), accompanied by a
+    written offer, valid for at least three years and valid for as
+    long as you offer spare parts or customer support for that product
+    model, to give anyone who possesses the object code either (1) a
+    copy of the Corresponding Source for all the software in the
+    product that is covered by this License, on a durable physical
+    medium customarily used for software interchange, for a price no
+    more than your reasonable cost of physically performing this
+    conveying of source, or (2) access to copy the
+    Corresponding Source from a network server at no charge.
+
+    c) Convey individual copies of the object code with a copy of the
+    written offer to provide the Corresponding Source.  This
+    alternative is allowed only occasionally and noncommercially, and
+    only if you received the object code with such an offer, in accord
+    with subsection 6b.
+
+    d) Convey the object code by offering access from a designated
+    place (gratis or for a charge), and offer equivalent access to the
+    Corresponding Source in the same way through the same place at no
+    further charge.  You need not require recipients to copy the
+    Corresponding Source along with the object code.  If the place to
+    copy the object code is a network server, the Corresponding Source
+    may be on a different server (operated by you or a third party)
+    that supports equivalent copying facilities, provided you maintain
+    clear directions next to the object code saying where to find the
+    Corresponding Source.  Regardless of what server hosts the
+    Corresponding Source, you remain obligated to ensure that it is
+    available for as long as needed to satisfy these requirements.
+
+    e) Convey the object code using peer-to-peer transmission, provided
+    you inform other peers where the object code and Corresponding
+    Source of the work are being offered to the general public at no
+    charge under subsection 6d.
+
+  A separable portion of the object code, whose source code is excluded
+from the Corresponding Source as a System Library, need not be
+included in conveying the object code work.
+
+  A "User Product" is either (1) a "consumer product", which means any
+tangible personal property which is normally used for personal, family,
+or household purposes, or (2) anything designed or sold for incorporation
+into a dwelling.  In determining whether a product is a consumer product,
+doubtful cases shall be resolved in favor of coverage.  For a particular
+product received by a particular user, "normally used" refers to a
+typical or common use of that class of product, regardless of the status
+of the particular user or of the way in which the particular user
+actually uses, or expects or is expected to use, the product.  A product
+is a consumer product regardless of whether the product has substantial
+commercial, industrial or non-consumer uses, unless such uses represent
+the only significant mode of use of the product.
+
+  "Installation Information" for a User Product means any methods,
+procedures, authorization keys, or other information required to install
+and execute modified versions of a covered work in that User Product from
+a modified version of its Corresponding Source.  The information must
+suffice to ensure that the continued functioning of the modified object
+code is in no case prevented or interfered with solely because
+modification has been made.
+
+  If you convey an object code work under this section in, or with, or
+specifically for use in, a User Product, and the conveying occurs as
+part of a transaction in which the right of possession and use of the
+User Product is transferred to the recipient in perpetuity or for a
+fixed term (regardless of how the transaction is characterized), the
+Corresponding Source conveyed under this section must be accompanied
+by the Installation Information.  But this requirement does not apply
+if neither you nor any third party retains the ability to install
+modified object code on the User Product (for example, the work has
+been installed in ROM).
+
+  The requirement to provide Installation Information does not include a
+requirement to continue to provide support service, warranty, or updates
+for a work that has been modified or installed by the recipient, or for
+the User Product in which it has been modified or installed.  Access to a
+network may be denied when the modification itself materially and
+adversely affects the operation of the network or violates the rules and
+protocols for communication across the network.
+
+  Corresponding Source conveyed, and Installation Information provided,
+in accord with this section must be in a format that is publicly
+documented (and with an implementation available to the public in
+source code form), and must require no special password or key for
+unpacking, reading or copying.
+
+  7. Additional Terms.
+
+  "Additional permissions" are terms that supplement the terms of this
+License by making exceptions from one or more of its conditions.
+Additional permissions that are applicable to the entire Program shall
+be treated as though they were included in this License, to the extent
+that they are valid under applicable law.  If additional permissions
+apply only to part of the Program, that part may be used separately
+under those permissions, but the entire Program remains governed by
+this License without regard to the additional permissions.
+
+  When you convey a copy of a covered work, you may at your option
+remove any additional permissions from that copy, or from any part of
+it.  (Additional permissions may be written to require their own
+removal in certain cases when you modify the work.)  You may place
+additional permissions on material, added by you to a covered work,
+for which you have or can give appropriate copyright permission.
+
+  Notwithstanding any other provision of this License, for material you
+add to a covered work, you may (if authorized by the copyright holders of
+that material) supplement the terms of this License with terms:
+
+    a) Disclaiming warranty or limiting liability differently from the
+    terms of sections 15 and 16 of this License; or
+
+    b) Requiring preservation of specified reasonable legal notices or
+    author attributions in that material or in the Appropriate Legal
+    Notices displayed by works containing it; or
+
+    c) Prohibiting misrepresentation of the origin of that material, or
+    requiring that modified versions of such material be marked in
+    reasonable ways as different from the original version; or
+
+    d) Limiting the use for publicity purposes of names of licensors or
+    authors of the material; or
+
+    e) Declining to grant rights under trademark law for use of some
+    trade names, trademarks, or service marks; or
+
+    f) Requiring indemnification of licensors and authors of that
+    material by anyone who conveys the material (or modified versions of
+    it) with contractual assumptions of liability to the recipient, for
+    any liability that these contractual assumptions directly impose on
+    those licensors and authors.
+
+  All other non-permissive additional terms are considered "further
+restrictions" within the meaning of section 10.  If the Program as you
+received it, or any part of it, contains a notice stating that it is
+governed by this License along with a term that is a further
+restriction, you may remove that term.  If a license document contains
+a further restriction but permits relicensing or conveying under this
+License, you may add to a covered work material governed by the terms
+of that license document, provided that the further restriction does
+not survive such relicensing or conveying.
+
+  If you add terms to a covered work in accord with this section, you
+must place, in the relevant source files, a statement of the
+additional terms that apply to those files, or a notice indicating
+where to find the applicable terms.
+
+  Additional terms, permissive or non-permissive, may be stated in the
+form of a separately written license, or stated as exceptions;
+the above requirements apply either way.
+
+  8. Termination.
+
+  You may not propagate or modify a covered work except as expressly
+provided under this License.  Any attempt otherwise to propagate or
+modify it is void, and will automatically terminate your rights under
+this License (including any patent licenses granted under the third
+paragraph of section 11).
+
+  However, if you cease all violation of this License, then your
+license from a particular copyright holder is reinstated (a)
+provisionally, unless and until the copyright holder explicitly and
+finally terminates your license, and (b) permanently, if the copyright
+holder fails to notify you of the violation by some reasonable means
+prior to 60 days after the cessation.
+
+  Moreover, your license from a particular copyright holder is
+reinstated permanently if the copyright holder notifies you of the
+violation by some reasonable means, this is the first time you have
+received notice of violation of this License (for any work) from that
+copyright holder, and you cure the violation prior to 30 days after
+your receipt of the notice.
+
+  Termination of your rights under this section does not terminate the
+licenses of parties who have received copies or rights from you under
+this License.  If your rights have been terminated and not permanently
+reinstated, you do not qualify to receive new licenses for the same
+material under section 10.
+
+  9. Acceptance Not Required for Having Copies.
+
+  You are not required to accept this License in order to receive or
+run a copy of the Program.  Ancillary propagation of a covered work
+occurring solely as a consequence of using peer-to-peer transmission
+to receive a copy likewise does not require acceptance.  However,
+nothing other than this License grants you permission to propagate or
+modify any covered work.  These actions infringe copyright if you do
+not accept this License.  Therefore, by modifying or propagating a
+covered work, you indicate your acceptance of this License to do so.
+
+  10. Automatic Licensing of Downstream Recipients.
+
+  Each time you convey a covered work, the recipient automatically
+receives a license from the original licensors, to run, modify and
+propagate that work, subject to this License.  You are not responsible
+for enforcing compliance by third parties with this License.
+
+  An "entity transaction" is a transaction transferring control of an
+organization, or substantially all assets of one, or subdividing an
+organization, or merging organizations.  If propagation of a covered
+work results from an entity transaction, each party to that
+transaction who receives a copy of the work also receives whatever
+licenses to the work the party's predecessor in interest had or could
+give under the previous paragraph, plus a right to possession of the
+Corresponding Source of the work from the predecessor in interest, if
+the predecessor has it or can get it with reasonable efforts.
+
+  You may not impose any further restrictions on the exercise of the
+rights granted or affirmed under this License.  For example, you may
+not impose a license fee, royalty, or other charge for exercise of
+rights granted under this License, and you may not initiate litigation
+(including a cross-claim or counterclaim in a lawsuit) alleging that
+any patent claim is infringed by making, using, selling, offering for
+sale, or importing the Program or any portion of it.
+
+  11. Patents.
+
+  A "contributor" is a copyright holder who authorizes use under this
+License of the Program or a work on which the Program is based.  The
+work thus licensed is called the contributor's "contributor version".
+
+  A contributor's "essential patent claims" are all patent claims
+owned or controlled by the contributor, whether already acquired or
+hereafter acquired, that would be infringed by some manner, permitted
+by this License, of making, using, or selling its contributor version,
+but do not include claims that would be infringed only as a
+consequence of further modification of the contributor version.  For
+purposes of this definition, "control" includes the right to grant
+patent sublicenses in a manner consistent with the requirements of
+this License.
+
+  Each contributor grants you a non-exclusive, worldwide, royalty-free
+patent license under the contributor's essential patent claims, to
+make, use, sell, offer for sale, import and otherwise run, modify and
+propagate the contents of its contributor version.
+
+  In the following three paragraphs, a "patent license" is any express
+agreement or commitment, however denominated, not to enforce a patent
+(such as an express permission to practice a patent or covenant not to
+sue for patent infringement).  To "grant" such a patent license to a
+party means to make such an agreement or commitment not to enforce a
+patent against the party.
+
+  If you convey a covered work, knowingly relying on a patent license,
+and the Corresponding Source of the work is not available for anyone
+to copy, free of charge and under the terms of this License, through a
+publicly available network server or other readily accessible means,
+then you must either (1) cause the Corresponding Source to be so
+available, or (2) arrange to deprive yourself of the benefit of the
+patent license for this particular work, or (3) arrange, in a manner
+consistent with the requirements of this License, to extend the patent
+license to downstream recipients.  "Knowingly relying" means you have
+actual knowledge that, but for the patent license, your conveying the
+covered work in a country, or your recipient's use of the covered work
+in a country, would infringe one or more identifiable patents in that
+country that you have reason to believe are valid.
+
+  If, pursuant to or in connection with a single transaction or
+arrangement, you convey, or propagate by procuring conveyance of, a
+covered work, and grant a patent license to some of the parties
+receiving the covered work authorizing them to use, propagate, modify
+or convey a specific copy of the covered work, then the patent license
+you grant is automatically extended to all recipients of the covered
+work and works based on it.
+
+  A patent license is "discriminatory" if it does not include within
+the scope of its coverage, prohibits the exercise of, or is
+conditioned on the non-exercise of one or more of the rights that are
+specifically granted under this License.  You may not convey a covered
+work if you are a party to an arrangement with a third party that is
+in the business of distributing software, under which you make payment
+to the third party based on the extent of your activity of conveying
+the work, and under which the third party grants, to any of the
+parties who would receive the covered work from you, a discriminatory
+patent license (a) in connection with copies of the covered work
+conveyed by you (or copies made from those copies), or (b) primarily
+for and in connection with specific products or compilations that
+contain the covered work, unless you entered into that arrangement,
+or that patent license was granted, prior to 28 March 2007.
+
+  Nothing in this License shall be construed as excluding or limiting
+any implied license or other defenses to infringement that may
+otherwise be available to you under applicable patent law.
+
+  12. No Surrender of Others' Freedom.
+
+  If conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License.  If you cannot convey a
+covered work so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you may
+not convey it at all.  For example, if you agree to terms that obligate you
+to collect a royalty for further conveying from those to whom you convey
+the Program, the only way you could satisfy both those terms and this
+License would be to refrain entirely from conveying the Program.
+
+  13. Use with the GNU Affero General Public License.
+
+  Notwithstanding any other provision of this License, you have
+permission to link or combine any covered work with a work licensed
+under version 3 of the GNU Affero General Public License into a single
+combined work, and to convey the resulting work.  The terms of this
+License will continue to apply to the part which is the covered work,
+but the special requirements of the GNU Affero General Public License,
+section 13, concerning interaction through a network will apply to the
+combination as such.
+
+  14. Revised Versions of this License.
+
+  The Free Software Foundation may publish revised and/or new versions of
+the GNU General Public License from time to time.  Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+  Each version is given a distinguishing version number.  If the
+Program specifies that a certain numbered version of the GNU General
+Public License "or any later version" applies to it, you have the
+option of following the terms and conditions either of that numbered
+version or of any later version published by the Free Software
+Foundation.  If the Program does not specify a version number of the
+GNU General Public License, you may choose any version ever published
+by the Free Software Foundation.
+
+  If the Program specifies that a proxy can decide which future
+versions of the GNU General Public License can be used, that proxy's
+public statement of acceptance of a version permanently authorizes you
+to choose that version for the Program.
+
+  Later license versions may give you additional or different
+permissions.  However, no additional obligations are imposed on any
+author or copyright holder as a result of your choosing to follow a
+later version.
+
+  15. Disclaimer of Warranty.
+
+  THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
+APPLICABLE LAW.  EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
+HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
+OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
+THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE.  THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
+IS WITH YOU.  SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
+ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+  16. Limitation of Liability.
+
+  IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
+THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
+GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
+USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
+DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
+PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
+EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGES.
+
+  17. Interpretation of Sections 15 and 16.
+
+  If the disclaimer of warranty and limitation of liability provided
+above cannot be given local legal effect according to their terms,
+reviewing courts shall apply local law that most closely approximates
+an absolute waiver of all civil liability in connection with the
+Program, unless a warranty or assumption of liability accompanies a
+copy of the Program in return for a fee.
+
+                     END OF TERMS AND CONDITIONS
+
+            How to Apply These Terms to Your New Programs
+
+  If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+  To do so, attach the following notices to the program.  It is safest
+to attach them to the start of each source file to most effectively
+state the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+    &lt;one line to give the program's name and a brief idea of what it does.&gt;
+    Copyright (C) &lt;year&gt;  &lt;name of author&gt;
+
+    This program 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 3 of the License, or
+    (at your option) any later version.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU General Public License for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with this program.  If not, see &lt;http://www.gnu.org/licenses/&gt;.
+
+Also add information on how to contact you by electronic and paper mail.
+
+  If the program does terminal interaction, make it output a short
+notice like this when it starts in an interactive mode:
+
+    &lt;program&gt;  Copyright (C) &lt;year&gt;  &lt;name of author&gt;
+    This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+    This is free software, and you are welcome to redistribute it
+    under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License.  Of course, your program's commands
+might be different; for a GUI interface, you would use an "about box".
+
+  You should also get your employer (if you work as a programmer) or school,
+if any, to sign a "copyright disclaimer" for the program, if necessary.
+For more information on this, and how to apply and follow the GNU GPL, see
+&lt;http://www.gnu.org/licenses/&gt;.
+
+  The GNU General Public License does not permit incorporating your program
+into proprietary programs.  If your program is a subroutine library, you
+may consider it more useful to permit linking proprietary applications with
+the library.  If this is what you want to do, use the GNU Lesser General
+Public License instead of this License.  But first, please read
+&lt;http://www.gnu.org/philosophy/why-not-lgpl.html&gt;.
+</property>
+    <signal name="response" handler="on_aboutdialog_response"/>
+    <child internal-child="vbox">
+      <widget class="GtkVBox" id="dialog-vbox">
+        <property name="visible">True</property>
+        <property name="orientation">vertical</property>
+        <property name="spacing">2</property>
+        <child>
+          <placeholder/>
+        </child>
+        <child internal-child="action_area">
+          <widget class="GtkHButtonBox" id="dialog-action_area">
+            <property name="visible">True</property>
+            <property name="layout_style">end</property>
+          </widget>
+          <packing>
+            <property name="expand">False</property>
+            <property name="pack_type">end</property>
+            <property name="position">0</property>
+          </packing>
+        </child>
+      </widget>
+    </child>
+  </widget>
+  <widget class="GtkDialog" id="connectiondialog">
+    <property name="border_width">5</property>
+    <property name="type_hint">normal</property>
+    <property name="has_separator">False</property>
+    <child internal-child="vbox">
+      <widget class="GtkVBox" id="dialog-vbox">
+        <property name="visible">True</property>
+        <property name="orientation">vertical</property>
+        <property name="spacing">2</property>
+        <child>
+          <widget class="GtkTable" id="table">
+            <property name="visible">True</property>
+            <property name="n_rows">4</property>
+            <property name="n_columns">2</property>
+            <child>
+              <widget class="GtkLabel" id="host_label">
+                <property name="visible">True</property>
+                <property name="label" translatable="yes">host</property>
+              </widget>
+              <packing>
+                <property name="y_options">GTK_FILL</property>
+              </packing>
+            </child>
+            <child>
+              <widget class="GtkLabel" id="port_label">
+                <property name="visible">True</property>
+                <property name="label" translatable="yes">port</property>
+              </widget>
+              <packing>
+                <property name="top_attach">1</property>
+                <property name="bottom_attach">2</property>
+                <property name="y_options">GTK_FILL</property>
+              </packing>
+            </child>
+            <child>
+              <widget class="GtkLabel" id="username_label">
+                <property name="visible">True</property>
+                <property name="label" translatable="yes">username</property>
+              </widget>
+              <packing>
+                <property name="top_attach">2</property>
+                <property name="bottom_attach">3</property>
+                <property name="y_options">GTK_FILL</property>
+              </packing>
+            </child>
+            <child>
+              <widget class="GtkLabel" id="password_label">
+                <property name="visible">True</property>
+                <property name="label" translatable="yes">password</property>
+              </widget>
+              <packing>
+                <property name="top_attach">3</property>
+                <property name="bottom_attach">4</property>
+                <property name="y_options">GTK_FILL</property>
+              </packing>
+            </child>
+            <child>
+              <widget class="GtkEntry" id="host_entry">
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="invisible_char">&#x25CF;</property>
+              </widget>
+              <packing>
+                <property name="left_attach">1</property>
+                <property name="right_attach">2</property>
+                <property name="y_options">GTK_FILL</property>
+              </packing>
+            </child>
+            <child>
+              <widget class="GtkEntry" id="port_entry">
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="invisible_char">&#x25CF;</property>
+              </widget>
+              <packing>
+                <property name="left_attach">1</property>
+                <property name="right_attach">2</property>
+                <property name="top_attach">1</property>
+                <property name="bottom_attach">2</property>
+                <property name="y_options">GTK_FILL</property>
+              </packing>
+            </child>
+            <child>
+              <widget class="GtkEntry" id="username_entry">
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="invisible_char">&#x25CF;</property>
+              </widget>
+              <packing>
+                <property name="left_attach">1</property>
+                <property name="right_attach">2</property>
+                <property name="top_attach">2</property>
+                <property name="bottom_attach">3</property>
+                <property name="y_options">GTK_FILL</property>
+              </packing>
+            </child>
+            <child>
+              <widget class="GtkEntry" id="password_entry">
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="invisible_char">&#x25CF;</property>
+              </widget>
+              <packing>
+                <property name="left_attach">1</property>
+                <property name="right_attach">2</property>
+                <property name="top_attach">3</property>
+                <property name="bottom_attach">4</property>
+                <property name="y_options">GTK_FILL</property>
+              </packing>
+            </child>
+          </widget>
+          <packing>
+            <property name="position">1</property>
+          </packing>
+        </child>
+        <child internal-child="action_area">
+          <widget class="GtkHButtonBox" id="dialog-action_area">
+            <property name="visible">True</property>
+            <property name="layout_style">end</property>
+            <child>
+              <widget class="GtkButton" id="cancel_button">
+                <property name="label">gtk-cancel</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">True</property>
+                <property name="use_stock">True</property>
+                <signal name="clicked" handler="on_cancel_button_clicked"/>
+              </widget>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">0</property>
+              </packing>
+            </child>
+            <child>
+              <widget class="GtkButton" id="ok_button">
+                <property name="label">gtk-ok</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">True</property>
+                <property name="use_stock">True</property>
+                <signal name="clicked" handler="on_ok_button_clicked"/>
+              </widget>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">1</property>
+              </packing>
+            </child>
+          </widget>
+          <packing>
+            <property name="expand">False</property>
+            <property name="pack_type">end</property>
+            <property name="position">0</property>
+          </packing>
+        </child>
+      </widget>
+    </child>
+  </widget>
+</glade-interface>
diff --git a/myserver/src/GUI/setup.py b/myserver/src/GUI/setup.py
new file mode 100644
index 0000000..f327e72
--- /dev/null
+++ b/myserver/src/GUI/setup.py
@@ -0,0 +1,22 @@
+# -*- coding: utf-8 -*-
+'''
+MyServer
+Copyright (C) 2009 Free Software Foundation, Inc.
+This program 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 3 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program.  If not, see <http://www.gnu.org/licenses/>.
+'''
+
+from distutils.core import setup
+setup(name = 'MyServer', version = '0.0',
+      py_modules = ['MyServer.__init__'],
+      packages = ['MyServer/pycontrol', 'MyServer/pycontrollib', 'MyServer.GUI'])
diff --git a/myserver/src/Makefile.am b/myserver/src/Makefile.am
index d130cd5..11ef17e 100644
--- a/myserver/src/Makefile.am
+++ b/myserver/src/Makefile.am
@@ -1,6 +1,6 @@
 # Makefile for MyServer (./src)
 SUBDIRS = base conf connection connections_scheduler filter http_handler \
-	log plugin protocol server
+	log plugin protocol server GUI
 AM_CPPFLAGS = $(all_includes)
 bin_PROGRAMS = myserver
 myserver_SOURCES = myserver.cpp

-----------------------------------------------------------------------

Summary of changes:
 myserver/configure.ac                              |   10 ++++++++++
 myserver/src/GUI/Makefile.am                       |    6 ++++++
 .../src/GUI}/MyServer/GUI/AboutWindow.py           |    0
 .../src/GUI}/MyServer/GUI/BrowserWidgets.py        |    0
 .../src/GUI}/MyServer/GUI/ConnectionWindow.py      |    0
 .../src/GUI}/MyServer/GUI/DefinitionWidgets.py     |    0
 .../src/GUI}/MyServer/GUI/GUIConfig.py             |    0
 .../src/GUI}/MyServer/GUI/MIMEWidgets.py           |    0
 .../src/GUI}/MyServer/GUI/SecurityWidgets.py       |    0
 .../src/GUI}/MyServer/GUI/VHostWidgets.py          |    0
 .../src/GUI/MyServer/GUI}/__init__.py              |    0
 .../src/GUI}/MyServer/README                       |    0
 .../src/GUI/MyServer}/__init__.py                  |    0
 .../src/GUI/MyServer/pycontrol}/__init__.py        |    0
 .../src/GUI}/MyServer/pycontrol/pycontrol.py       |    0
 .../src/GUI}/MyServer/pycontrollib/__init__.py     |    0
 .../src/GUI}/MyServer/pycontrollib/browser.py      |    0
 .../src/GUI}/MyServer/pycontrollib/config.py       |    0
 .../src/GUI}/MyServer/pycontrollib/controller.py   |    0
 .../src/GUI}/MyServer/pycontrollib/definition.py   |    0
 .../src/GUI}/MyServer/pycontrollib/log.py          |    0
 .../src/GUI}/MyServer/pycontrollib/mimetypes.py    |    0
 .../src/GUI}/MyServer/pycontrollib/security.py     |    0
 .../src/GUI}/MyServer/pycontrollib/test/Makefile   |    0
 .../GUI}/MyServer/pycontrollib/test/config_test.py |    0
 .../MyServer/pycontrollib/test/definition_test.py  |    0
 .../GUI}/MyServer/pycontrollib/test/log_test.py    |    0
 .../MyServer/pycontrollib/test/mimetypes_test.py   |    0
 .../MyServer/pycontrollib/test/security_test.py    |    0
 .../GUI}/MyServer/pycontrollib/test/vhost_test.py  |    0
 .../src/GUI}/MyServer/pycontrollib/vhost.py        |    0
 .../src/GUI}/MyServer/sample.py                    |    0
 .../src/GUI/MyServerControl                        |    5 ++++-
 .../src/GUI}/PyGTKControl.glade                    |    2 +-
 .../src/GUI}/setup.py                              |    0
 myserver/src/Makefile.am                           |    2 +-
 36 files changed, 22 insertions(+), 3 deletions(-)
 create mode 100644 myserver/src/GUI/Makefile.am
 copy {misc/py_control_client => myserver/src/GUI}/MyServer/GUI/AboutWindow.py (100%)
 copy {misc/py_control_client => myserver/src/GUI}/MyServer/GUI/BrowserWidgets.py (100%)
 copy {misc/py_control_client => myserver/src/GUI}/MyServer/GUI/ConnectionWindow.py (100%)
 copy {misc/py_control_client => myserver/src/GUI}/MyServer/GUI/DefinitionWidgets.py (100%)
 copy {misc/py_control_client => myserver/src/GUI}/MyServer/GUI/GUIConfig.py (100%)
 copy {misc/py_control_client => myserver/src/GUI}/MyServer/GUI/MIMEWidgets.py (100%)
 copy {misc/py_control_client => myserver/src/GUI}/MyServer/GUI/SecurityWidgets.py (100%)
 copy {misc/py_control_client => myserver/src/GUI}/MyServer/GUI/VHostWidgets.py (100%)
 copy {misc/myserver-get/myserverGetLib => myserver/src/GUI/MyServer/GUI}/__init__.py (100%)
 copy {misc/py_control_client => myserver/src/GUI}/MyServer/README (100%)
 copy {misc/myserver-get/myserverGetLib => myserver/src/GUI/MyServer}/__init__.py (100%)
 copy {misc/myserver-get/myserverGetLib => myserver/src/GUI/MyServer/pycontrol}/__init__.py (100%)
 copy {misc/py_control_client => myserver/src/GUI}/MyServer/pycontrol/pycontrol.py (100%)
 copy {misc/py_control_client => myserver/src/GUI}/MyServer/pycontrollib/__init__.py (100%)
 copy {misc/py_control_client => myserver/src/GUI}/MyServer/pycontrollib/browser.py (100%)
 copy {misc/py_control_client => myserver/src/GUI}/MyServer/pycontrollib/config.py (100%)
 copy {misc/py_control_client => myserver/src/GUI}/MyServer/pycontrollib/controller.py (100%)
 copy {misc/py_control_client => myserver/src/GUI}/MyServer/pycontrollib/definition.py (100%)
 copy {misc/py_control_client => myserver/src/GUI}/MyServer/pycontrollib/log.py (100%)
 copy {misc/py_control_client => myserver/src/GUI}/MyServer/pycontrollib/mimetypes.py (100%)
 copy {misc/py_control_client => myserver/src/GUI}/MyServer/pycontrollib/security.py (100%)
 copy {misc/py_control_client => myserver/src/GUI}/MyServer/pycontrollib/test/Makefile (100%)
 copy {misc/py_control_client => myserver/src/GUI}/MyServer/pycontrollib/test/config_test.py (100%)
 copy {misc/py_control_client => myserver/src/GUI}/MyServer/pycontrollib/test/definition_test.py (100%)
 copy {misc/py_control_client => myserver/src/GUI}/MyServer/pycontrollib/test/log_test.py (100%)
 copy {misc/py_control_client => myserver/src/GUI}/MyServer/pycontrollib/test/mimetypes_test.py (100%)
 copy {misc/py_control_client => myserver/src/GUI}/MyServer/pycontrollib/test/security_test.py (100%)
 copy {misc/py_control_client => myserver/src/GUI}/MyServer/pycontrollib/test/vhost_test.py (100%)
 copy {misc/py_control_client => myserver/src/GUI}/MyServer/pycontrollib/vhost.py (100%)
 copy {misc/py_control_client => myserver/src/GUI}/MyServer/sample.py (100%)
 copy misc/PyGTK_Control/MyServerControl.py => myserver/src/GUI/MyServerControl (99%)
 mode change 100644 => 100755
 copy {misc/PyGTK_Control => myserver/src/GUI}/PyGTKControl.glade (99%)
 copy {misc/py_control_client => myserver/src/GUI}/setup.py (100%)


hooks/post-receive
-- 
GNU MyServer



From MAILER-DAEMON Sun Aug 30 15:54:21 2009
Received: from mailman by lists.gnu.org with archive (Exim 4.43)
	id 1MhqTl-000482-Fd
	for mharc-myserver-commit@gnu.org; Sun, 30 Aug 2009 15:54:21 -0400
Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43)
	id 1MhqTj-00047c-Oh
	for myserver-commit@gnu.org; Sun, 30 Aug 2009 15:54:19 -0400
Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43)
	id 1MhqTj-00047R-Cs
	for myserver-commit@gnu.org; Sun, 30 Aug 2009 15:54:19 -0400
Received: from [199.232.76.173] (port=56801 helo=monty-python.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43) id 1MhqTj-00047K-6d
	for myserver-commit@gnu.org; Sun, 30 Aug 2009 15:54:19 -0400
Received: from savannah.gnu.org ([199.232.41.3]:33447 helo=sv.gnu.org)
	by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32)
	(Exim 4.60) (envelope-from <maarons@gnu.org>) id 1MhqTe-00022e-RZ
	for myserver-commit@gnu.org; Sun, 30 Aug 2009 15:54:18 -0400
Received: from download.savannah.gnu.org ([199.232.41.75]
	helo=cvs.savannah.gnu.org) by sv.gnu.org with esmtp (Exim 4.69)
	(envelope-from <maarons@gnu.org>) id 1MhqTe-0000Tq-Am
	for myserver-commit@gnu.org; Sun, 30 Aug 2009 19:54:14 +0000
Received: from maarons by cvs.savannah.gnu.org with local (Exim 4.69)
	(envelope-from <maarons@savannah.gnu.org>) id 1MhqTd-0000TO-Vm
	for myserver-commit@gnu.org; Sun, 30 Aug 2009 19:54:14 +0000
To: myserver-commit@gnu.org
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: 1357e42c30c239a6f1e3fc1b93e5c2eaf8e3f016
X-Git-Newrev: dcef300aaa5c994c08554001464a1630ca117081
Message-Id: <E1MhqTd-0000TO-Vm@cvs.savannah.gnu.org>
From: Marek Aaron Sapota <maarons@gnu.org>
Date: Sun, 30 Aug 2009 19:54:14 +0000
X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2)
Subject: [myserver-commit] [SCM] GNU MyServer branch, master,
	updated. dcef300aaa5c994c08554001464a1630ca117081
X-BeenThere: myserver-commit@gnu.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: myserver-commit.gnu.org
List-Unsubscribe: <http://lists.gnu.org/mailman/listinfo/myserver-commit>,
	<mailto:myserver-commit-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/pipermail/myserver-commit>
List-Post: <mailto:myserver-commit@gnu.org>
List-Help: <mailto:myserver-commit-request@gnu.org?subject=help>
List-Subscribe: <http://lists.gnu.org/mailman/listinfo/myserver-commit>,
	<mailto:myserver-commit-request@gnu.org?subject=subscribe>
X-List-Received-Date: Sun, 30 Aug 2009 19:54:20 -0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU MyServer".

The branch, master has been updated
       via  dcef300aaa5c994c08554001464a1630ca117081 (commit)
      from  1357e42c30c239a6f1e3fc1b93e5c2eaf8e3f016 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------


commit dcef300aaa5c994c08554001464a1630ca117081
Author: Marek Aaron Sapota <maarons@gnu.org>
Date:   Sun Aug 30 21:53:43 2009 +0200

    GUI was moved to src.

diff --git a/misc/PyGTK_Control/MyServerControl.py b/misc/PyGTK_Control/MyServerControl.py
deleted file mode 100644
index faf314b..0000000
--- a/misc/PyGTK_Control/MyServerControl.py
+++ /dev/null
@@ -1,461 +0,0 @@
-# -*- coding: utf-8 -*-
-'''
-MyServer
-Copyright (C) 2009 Free Software Foundation, Inc.
-This program 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 3 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program.  If not, see <http://www.gnu.org/licenses/>.
-'''
-
-from __future__ import print_function
-import gtk
-import gtk.glade
-import gobject
-from MyServer.pycontrollib.config import MyServerConfig
-from MyServer.pycontrollib.mimetypes import MIMETypes
-from MyServer.pycontrollib.controller import Controller
-from MyServer.pycontrollib.vhost import VHosts
-from MyServer.GUI import GUIConfig
-from MyServer.GUI.AboutWindow import About
-from MyServer.GUI.ConnectionWindow import Connection
-from MyServer.GUI.DefinitionWidgets import DefinitionTable, DefinitionTreeView
-from MyServer.GUI.MIMEWidgets import MimeTable, MimeTreeView
-from MyServer.GUI.VHostWidgets import VHostTable, VHostTreeView
-from MyServer.GUI.BrowserWidgets import BrowserTable
-from MyServer.GUI.SecurityWidgets import SecurityTable
-
-class PyGTKControl():
-    '''GNU MyServer Control main window.'''
-
-    def __init__(self):
-        self.gladefile = 'PyGTKControl.glade'
-        self.widgets = gtk.glade.XML(self.gladefile, 'window')
-        self.widgets.signal_autoconnect(self)
-        self.construct_options()
-        self.construct_mime()
-        self.construct_vhosts()
-        self.construct_browser()
-        self.chooser = None # Active file chooser
-        # path of currently edited files
-        self.config_path = self.mime_path = self.vhost_path = None
-        # remembered unhandled parts of configs
-        self.config_custom = []
-        self.mime_custom = []
-        self.vhost_custom = []
-        self.mime_custom_attrib = {}
-        self.vhost_custom_attrib = {}
-        self.controller = None
-
-    def on_window_destroy(self, widget):
-        '''Exits program.'''
-        gtk.main_quit()
-
-    def on_quit_menu_item_activate(self, widget):
-        '''Exits program.'''
-        gtk.main_quit()
-
-    def on_about_menu_item_activate(self, widget):
-        '''Shows about window.'''
-        About()
-
-    def on_connect_menu_item_activate(self, widget):
-        '''Show connection dialog.'''
-        dialog = Connection()
-        def connect(widget):
-            self.controller = Controller(
-                dialog.get_host(), dialog.get_port(),
-                dialog.get_username(), dialog.get_password())
-            self.controller.connect()
-            dialog.destroy()
-        dialog.widgets.get_widget('ok_button').connect('clicked', connect)
-        dialog.widgets.get_widget('connectiondialog').show()
-
-    def on_disconnect_menu_item_activate(self, widget):
-        '''Disconnect from server.'''
-        if self.controller is not None:
-            self.controller.disconnect()
-        self.controller = None
-
-    def on_get_config_menu_item_activate(self, widget):
-        '''Get server config from remote server.'''
-        if self.controller is not None:
-            self.set_up_config(self.controller.get_server_configuration())
-
-    def on_get_mime_menu_item_activate(self, widget):
-        '''Get MIME config from remote server.'''
-        if self.controller is not None:
-            self.set_up_mime(self.controller.get_MIME_type_configuration())
-
-    def on_get_vhost_menu_item_activate(self, widget):
-        '''Get VHost config from remote server.'''
-        if self.controller is not None:
-            self.set_up_vhost(self.controller.get_vhost_configuration())
-
-    def on_put_config_menu_item_activate(self, widget):
-        '''Put server config on remote server.'''
-        if self.controller is not None:
-            self.controller.put_server_configuration(self.get_current_config())
-
-    def on_put_mime_menu_item_activate(self, widget):
-        '''Put MIME config on remote server.'''
-        if self.controller is not None:
-            self.controller.put_MIME_type_configuration(self.get_current_mime())
-
-    def on_put_vhost_menu_item_activate(self, widget):
-        '''Put VHost config on remote server.'''
-        if self.controller is not None:
-            self.controller.put_vhost_configuration(self.get_vhost_config())
-
-    def on_new_config_menu_item_activate(self, widget = None):
-        '''Clears server configuration.'''
-        if widget is not None:
-            self.config_path = None
-        self.config_custom = []
-        table, tree = self.tabs['unknown']
-        tree.get_model().clear()
-        for tab in self.tabs:
-            table, tree = self.tabs[tab]
-            table.clear()
-            tree.make_clear()
-
-    def on_new_mime_menu_item_activate(self, widget = None):
-        '''Clears MIME configuration.'''
-        if widget is not None:
-            self.mime_path = None
-        self.mime_custom = []
-        self.mime_custom_attrib = {}
-        table, tree = self.mime_tab[0]
-        table.clear()
-        tree.get_model().clear()
-
-    def on_new_vhost_menu_item_activate(self, widget = None):
-        '''Clears VHost configuration.'''
-        if widget is not None:
-            self.vhost_path = None
-        self.vhost_custom = []
-        self.vhost_custom_attrib = {}
-        table, tree = self.vhost_tab
-        table.clear()
-        tree.get_model().clear()
-
-    def generic_open(self, dialog, path, config_type, set_up_method):
-        '''Open configuration file.'''
-        if self.chooser is not None:
-            self.chooser.destroy()
-        self.chooser = gtk.FileChooserDialog(
-            dialog,
-            buttons = (gtk.STOCK_CANCEL, gtk.RESPONSE_CANCEL,
-                       gtk.STOCK_OPEN, gtk.RESPONSE_OK))
-        def handle_response(widget, response):
-            if response == gtk.RESPONSE_OK:
-                setattr(self, path, self.chooser.get_filename())
-                with open(getattr(self, path)) as f:
-                    conf = config_type.from_string(f.read())
-                set_up_method(conf)
-            self.chooser.destroy()
-        self.chooser.connect('response', handle_response)
-        self.chooser.show()
-
-    def on_open_config_menu_item_activate(self, widget):
-        '''Open local server configuration file.'''
-        self.generic_open(
-            'Open server configuration file.', 'config_path',
-            MyServerConfig, self.set_up_config)
-
-    def on_open_mime_menu_item_activate(self, widget):
-        '''Open local MIME configuration file.'''
-        self.generic_open(
-            'Open MIME configuration file.', 'mime_path',
-            MIMETypes, self.set_up_mime)
-
-    def on_open_vhost_menu_item_activate(self, widget):
-        '''Open local VHost configuration file.'''
-        self.generic_open(
-            'Open VHost configuration file.', 'vhost_path',
-            VHosts, self.set_up_vhost)
-
-    def generic_save_as(self, dialog, widget, path, save_method):
-        '''Save configuration as file.'''
-        if self.chooser is not None:
-            self.chooser.destroy()
-        self.chooser = gtk.FileChooserDialog(
-            dialog,
-            action = gtk.FILE_CHOOSER_ACTION_SAVE,
-            buttons = (gtk.STOCK_CANCEL, gtk.RESPONSE_CANCEL,
-                       gtk.STOCK_SAVE_AS, gtk.RESPONSE_OK))
-        def handle_response(widget, response):
-            if response == gtk.RESPONSE_OK:
-                setattr(self, path, self.chooser.get_filename())
-                save_method(widget)
-            self.chooser.destroy()
-        self.chooser.connect('response', handle_response)
-        self.chooser.show()
-
-    def on_save_as_config_menu_item_activate(self, widget):
-        '''Save server configuration as local file.'''
-        self.generic_save_as(
-            'Save server configuration file.',
-            widget, 'config_path',
-            self.on_save_config_menu_item_activate)
-
-    def on_save_as_mime_menu_item_activate(self, widget):
-        '''Save MIME configuration as local file.'''
-        self.generic_save_as(
-            'Save MIME configuration file.',
-            widget, 'mime_path',
-            self.on_save_mime_menu_item_activate)
-
-    def on_save_as_vhost_menu_item_activate(self, widget):
-        '''Save VHost configuration as local file.'''
-        self.generic_save_as(
-            'Save VHost configuration file.',
-            widget, 'vhost_path',
-            self.on_save_vhost_menu_item_activate)
-
-    def generic_save(self, widget, path, save_as_method, config_method):
-        '''Save configuration file.'''
-        if getattr(self, path) is None:
-            save_as_method(widget)
-        else:
-            config = config_method()
-            with open(getattr(self, path), 'w') as f:
-                f.write(str(config))
-
-    def on_save_config_menu_item_activate(self, widget):
-        '''Save server configuration to file.'''
-        self.generic_save(
-            widget, 'config_path',
-            self.on_save_as_config_menu_item_activate,
-            self.get_current_config)
-
-    def on_save_mime_menu_item_activate(self, widget):
-        '''Save MIME configuration to file.'''
-        self.generic_save(
-            widget, 'mime_path',
-            self.on_save_as_mime_menu_item_activate,
-            self.get_current_mime)
-
-    def on_save_vhost_menu_item_activate(self, widget):
-        '''Save VHost configuration to file.'''
-        self.generic_save(
-            widget, 'vhost_path',
-            self.on_save_as_vhost_menu_item_activate,
-            self.get_current_vhost)
-
-    def get_current_config(self):
-        '''Returns current server configuration as MyServerConfig instance.'''
-        definitions = []
-        for tab in self.tabs:
-            table, tree = self.tabs[tab]
-            definitions += table.make_def(tree)
-        config = MyServerConfig(definitions)
-        config.definitions.custom = self.config_custom
-        return config
-
-    def get_current_mime(self):
-        '''Returns current MIME configuration as MIMETypes instance.'''
-        table, tree = self.mime_tab[0]
-        mimes = table.make_def(tree)
-        config = MIMETypes(mimes)
-        config.custom = self.mime_custom
-        config.custom_attrib = self.mime_custom_attrib
-        return config
-
-    def get_current_vhost(self):
-        '''Returns current VHost configuration as VHosts instance.'''
-        table, tree = self.vhost_tab
-        vhosts = table.make_def(tree)
-        config = VHosts(vhosts)
-        config.custom = self.vhost_custom
-        config.custom_attrib = self.vhost_custom_attrib
-        return config
-
-    def on_add_unknown_definition_menu_item_activate(self, widget):
-        '''Adds a new definition to unknown tab.'''
-        table, tree = self.tabs['unknown']
-        tree.get_model().append(None, ('', '', False, True, '', False, {}, ))
-
-    def on_add_mime_type_menu_item_activate(self, widget):
-        '''Adds a new MIME type.'''
-        table, tree = self.mime_tab[0]
-        mime_lists = {}
-        for mime_list in GUIConfig.mime_lists:
-            mime_lists[mime_list] = []
-        tree.get_model().append(('', {}, mime_lists, [], [], {}, ))
-
-    def on_remove_mime_type_menu_item_activate(self, widget):
-        '''Removes selected MIME type.'''
-        table, tree = self.mime_tab[0]
-        table.remove_current(tree)
-
-    def on_add_vhost_menu_item_activate(self, widget):
-        '''Adds a new VHost.'''
-        table, tree = self.vhost_tab
-        vhost_lists = {}
-        for vhost_list in GUIConfig.vhost_lists:
-            vhost_lists[vhost_list[0]] = []
-        tree.get_model().append(('', {}, vhost_lists, [], [], {}, ))
-
-    def on_remove_vhost_menu_item_activate(self, widget):
-        '''Removes selected VHost.'''
-        table, tree = self.vhost_tab
-        table.remove_current(tree)
-
-    def on_add_definition_to_mime_menu_item_activate(self, widget):
-        '''Adds a definition to currently selected MIME type.'''
-        table, tree = self.mime_tab[1]
-        tree.get_model().append(None, ('', '', False, True, '', False, {}, ))
-
-    def on_add_log_to_vhost_menu_item_activate(self, widget):
-        '''Adds a log to currently selected VHost.'''
-        table, tree = self.vhost_tab
-        table.add_log()
-
-    def on_remove_log_from_vhost_menu_item_activate(self, widget):
-        '''Removes selected log from currently selected VHost.'''
-        table, tree = self.vhost_tab
-        table.remove_log()
-
-    def set_up_config(self, config):
-        '''Reads server configuration from given config instance.'''
-        self.on_new_config_menu_item_activate()
-        self.config_custom = config.definitions.custom
-        tabs = {}
-        for tab in self.tabs:
-            tabs[tab] = []
-        for definition in config.get_definitions():
-            name = definition.get_name()
-            tab_name = self.options[name] if name in self.options else 'unknown'
-            tabs[tab_name].append(definition)
-
-        for tab in tabs:
-            tree = self.tabs[tab][1]
-            tree.set_up(tabs[tab], tab != 'unknown')
-
-    def set_up_mime(self, config):
-        '''Reads MIME configuration from given config instance.'''
-        self.on_new_mime_menu_item_activate()
-        self.mime_custom = config.custom
-        self.mime_custom_attrib = config.custom_attrib
-        tree = self.mime_tab[0][1]
-        tree.set_up(config.MIME_types)
-
-    def set_up_vhost(self, config):
-        '''Reads VHost configuration from given config instance.'''
-        self.on_new_vhost_menu_item_activate()
-        self.vhost_custom = config.custom
-        self.vhost_custom_attrib = config.custom_attrib
-        tree = self.vhost_tab[1]
-        tree.set_up(config.VHosts)
-
-    def construct_options(self):
-        '''Reads known options from file and prepares GUI.'''
-
-        # segregate options by tab
-        segregated_options = {} # tab name => option names
-        self.options = {} # option name => tab name
-        for option in GUIConfig.options:
-            tab = 'other'
-            for prefix in GUIConfig.tabs:
-                if option.startswith(prefix):
-                    tab = prefix
-                    break
-            if not segregated_options.has_key(tab):
-                segregated_options[tab] = []
-            segregated_options[tab].append(option)
-            self.options[option] = tab
-
-        self.tabs = {} # tab name => (table, tree, )
-        for tab in GUIConfig.tabs + ['other', 'unknown']:
-            options = segregated_options.get(tab, [])
-            panels = gtk.HPaned()
-
-            tree = DefinitionTreeView()
-            tree_model = tree.get_model()
-            panels.pack1(tree.scroll, True, False)
-            table = DefinitionTable(tree)
-            panels.pack2(table, False, False)
-
-            self.tabs[tab] = (table, tree, )
-
-            for option in options:
-                tooltip_text, var = GUIConfig.options[option]
-                # all but first three columns will be set to defaults later by
-                # on_new_menu_item_activate
-                tree_model.append(None, (option, tooltip_text, True, False, '',
-                                         False, {}, ))
-
-            self.widgets.get_widget('notebook').append_page(
-                panels, gtk.Label(tab))
-
-        self.on_new_config_menu_item_activate()
-        self.widgets.get_widget('notebook').show_all()
-
-    def construct_mime(self):
-        '''Reads mime options from file and prepares GUI.'''
-        vpanels = gtk.VPaned()
-
-        panels = gtk.HPaned()
-        def_tree = DefinitionTreeView()
-        panels.pack1(def_tree.scroll, True, False)
-        def_table = DefinitionTable(def_tree)
-        panels.pack2(def_table, False, False)
-
-        vpanels.pack2(panels)
-
-        panels = gtk.HPaned()
-        tree = MimeTreeView()
-        panels.pack1(tree.scroll, True, False)
-        table = MimeTable(tree, def_tree, def_table)
-        panels.pack2(table, False, False)
-
-        vpanels.pack1(panels)
-
-        self.mime_tab = ((table, tree, ), (def_table, def_tree), )
-        self.widgets.get_widget('notebook').append_page(
-            vpanels, gtk.Label('MIME Type'))
-
-        self.widgets.get_widget('notebook').show_all()
-
-    def construct_vhosts(self):
-        '''Reads vhost options from file and prepares GUI.'''
-        panels = gtk.HPaned()
-        tree = VHostTreeView()
-        panels.pack1(tree.scroll, True, False)
-        table = VHostTable(tree)
-        panels.pack2(table.scroll, True, False)
-
-        self.vhost_tab = (table, tree, )
-        self.widgets.get_widget('notebook').append_page(
-            panels, gtk.Label('VHosts'))
-
-        self.widgets.get_widget('notebook').show_all()
-
-    def construct_browser(self):
-        '''Constructs file browser.'''
-        panels = gtk.HPaned()
-        self.security_table = SecurityTable()
-        panels.pack2(self.security_table, True, False)
-        self.browser_table = BrowserTable(self.security_table.read_from_file)
-        panels.pack1(self.browser_table, True, False)
-        
-        self.widgets.get_widget('notebook').append_page(
-            panels, gtk.Label('File browser'))
-
-        self.widgets.get_widget('notebook').show_all()
-
-    def on_save_security_menu_item_activate(self, widget):
-        self.security_table.write_to_file(
-            self.browser_table.browser_tree.browser)
-
-PyGTKControl()
-gtk.main()
diff --git a/misc/PyGTK_Control/PyGTKControl.glade b/misc/PyGTK_Control/PyGTKControl.glade
deleted file mode 100644
index 88af294..0000000
--- a/misc/PyGTK_Control/PyGTKControl.glade
+++ /dev/null
@@ -1,1436 +0,0 @@
-<?xml version="1.0"?>
-<glade-interface>
-  <!-- interface-requires gtk+ 2.16 -->
-  <!-- interface-naming-policy toplevel-contextual -->
-  <widget class="GtkWindow" id="window">
-    <property name="visible">True</property>
-    <signal name="destroy" handler="on_window_destroy"/>
-    <child>
-      <widget class="GtkVBox" id="vbox1">
-        <property name="visible">True</property>
-        <property name="orientation">vertical</property>
-        <child>
-          <widget class="GtkMenuBar" id="menubar">
-            <property name="visible">True</property>
-            <child>
-              <widget class="GtkMenuItem" id="file_menu_item">
-                <property name="visible">True</property>
-                <property name="label" translatable="yes">_File</property>
-                <property name="use_underline">True</property>
-                <child>
-                  <widget class="GtkMenu" id="file_menu">
-                    <property name="visible">True</property>
-                    <child>
-                      <widget class="GtkImageMenuItem" id="new_menu_item">
-                        <property name="label">New</property>
-                        <property name="visible">True</property>
-                        <property name="use_stock">False</property>
-                        <child>
-                          <widget class="GtkMenu" id="new_menu">
-                            <property name="visible">True</property>
-                            <child>
-                              <widget class="GtkMenuItem" id="new_config_menu_item">
-                                <property name="visible">True</property>
-                                <property name="label" translatable="yes">New server configuration</property>
-                                <property name="use_underline">True</property>
-                                <signal name="activate" handler="on_new_config_menu_item_activate"/>
-                              </widget>
-                            </child>
-                            <child>
-                              <widget class="GtkMenuItem" id="new_mime_menu_item">
-                                <property name="visible">True</property>
-                                <property name="label" translatable="yes">New MIME configuration</property>
-                                <property name="use_underline">True</property>
-                                <signal name="activate" handler="on_new_mime_menu_item_activate"/>
-                              </widget>
-                            </child>
-                            <child>
-                              <widget class="GtkMenuItem" id="new_vhost_menu_item">
-                                <property name="visible">True</property>
-                                <property name="label" translatable="yes">New VHost configuration</property>
-                                <property name="use_underline">True</property>
-                                <signal name="activate" handler="on_new_vhost_menu_item_activate"/>
-                              </widget>
-                            </child>
-                          </widget>
-                        </child>
-                        <child internal-child="image">
-                          <widget class="GtkImage" id="new_image">
-                            <property name="visible">True</property>
-                            <property name="stock">gtk-new</property>
-                            <property name="icon-size">1</property>
-                          </widget>
-                        </child>
-                      </widget>
-                    </child>
-                    <child>
-                      <widget class="GtkImageMenuItem" id="open_menu_item">
-                        <property name="label">Open</property>
-                        <property name="visible">True</property>
-                        <property name="use_stock">False</property>
-                        <child>
-                          <widget class="GtkMenu" id="open_menu">
-                            <property name="visible">True</property>
-                            <child>
-                              <widget class="GtkMenuItem" id="open_config_menu_item">
-                                <property name="visible">True</property>
-                                <property name="label" translatable="yes">Open server configuration</property>
-                                <property name="use_underline">True</property>
-                                <signal name="activate" handler="on_open_config_menu_item_activate"/>
-                              </widget>
-                            </child>
-                            <child>
-                              <widget class="GtkMenuItem" id="open_mime_menu_item">
-                                <property name="visible">True</property>
-                                <property name="label" translatable="yes">Open MIME configuration</property>
-                                <property name="use_underline">True</property>
-                                <signal name="activate" handler="on_open_mime_menu_item_activate"/>
-                              </widget>
-                            </child>
-                            <child>
-                              <widget class="GtkMenuItem" id="open_vhost_menu_item">
-                                <property name="visible">True</property>
-                                <property name="label" translatable="yes">Open VHost configuration</property>
-                                <property name="use_underline">True</property>
-                                <signal name="activate" handler="on_open_vhost_menu_item_activate"/>
-                              </widget>
-                            </child>
-                          </widget>
-                        </child>
-                        <child internal-child="image">
-                          <widget class="GtkImage" id="open_image">
-                            <property name="visible">True</property>
-                            <property name="stock">gtk-open</property>
-                            <property name="icon-size">1</property>
-                          </widget>
-                        </child>
-                      </widget>
-                    </child>
-                    <child>
-                      <widget class="GtkImageMenuItem" id="save_menu_item">
-                        <property name="label">Save</property>
-                        <property name="visible">True</property>
-                        <property name="use_stock">False</property>
-                        <child>
-                          <widget class="GtkMenu" id="save_menu">
-                            <property name="visible">True</property>
-                            <child>
-                              <widget class="GtkMenuItem" id="save_config_menu_item">
-                                <property name="visible">True</property>
-                                <property name="label" translatable="yes">Save server configuration</property>
-                                <property name="use_underline">True</property>
-                                <signal name="activate" handler="on_save_config_menu_item_activate"/>
-                              </widget>
-                            </child>
-                            <child>
-                              <widget class="GtkMenuItem" id="save_mime_menu_item">
-                                <property name="visible">True</property>
-                                <property name="label" translatable="yes">Save MIME configuration</property>
-                                <property name="use_underline">True</property>
-                                <signal name="activate" handler="on_save_mime_menu_item_activate"/>
-                              </widget>
-                            </child>
-                            <child>
-                              <widget class="GtkMenuItem" id="save_vhost_menu_item">
-                                <property name="visible">True</property>
-                                <property name="label" translatable="yes">Save VHost configuration</property>
-                                <property name="use_underline">True</property>
-                                <signal name="activate" handler="on_save_vhost_menu_item_activate"/>
-                              </widget>
-                            </child>
-                          </widget>
-                        </child>
-                        <child internal-child="image">
-                          <widget class="GtkImage" id="save_image">
-                            <property name="visible">True</property>
-                            <property name="stock">gtk-save</property>
-                            <property name="icon-size">1</property>
-                          </widget>
-                        </child>
-                      </widget>
-                    </child>
-                    <child>
-                      <widget class="GtkImageMenuItem" id="save_as_menu_item">
-                        <property name="label">Save as</property>
-                        <property name="visible">True</property>
-                        <property name="use_stock">False</property>
-                        <child>
-                          <widget class="GtkMenu" id="save_as_menu">
-                            <property name="visible">True</property>
-                            <child>
-                              <widget class="GtkMenuItem" id="save_as_config_menu_item">
-                                <property name="visible">True</property>
-                                <property name="label" translatable="yes">Save server configuration</property>
-                                <property name="use_underline">True</property>
-                                <signal name="activate" handler="on_save_as_config_menu_item_activate"/>
-                              </widget>
-                            </child>
-                            <child>
-                              <widget class="GtkMenuItem" id="save_as_mime_menu_item">
-                                <property name="visible">True</property>
-                                <property name="label" translatable="yes">Save MIME configuration</property>
-                                <property name="use_underline">True</property>
-                                <signal name="activate" handler="on_save_as_mime_menu_item_activate"/>
-                              </widget>
-                            </child>
-                            <child>
-                              <widget class="GtkMenuItem" id="save_as_vhost_menu_item">
-                                <property name="visible">True</property>
-                                <property name="label" translatable="yes">Save VHost configuration</property>
-                                <property name="use_underline">True</property>
-                                <signal name="activate" handler="on_save_as_vhost_menu_item_activate"/>
-                              </widget>
-                            </child>
-                          </widget>
-                        </child>
-                        <child internal-child="image">
-                          <widget class="GtkImage" id="save_as_image">
-                            <property name="visible">True</property>
-                            <property name="stock">gtk-save-as</property>
-                            <property name="icon-size">1</property>
-                          </widget>
-                        </child>
-                      </widget>
-                    </child>
-                    <child>
-                      <widget class="GtkSeparatorMenuItem" id="separator1">
-                        <property name="visible">True</property>
-                      </widget>
-                    </child>
-                    <child>
-                      <widget class="GtkImageMenuItem" id="quit_menu_item">
-                        <property name="label">gtk-quit</property>
-                        <property name="visible">True</property>
-                        <property name="use_underline">True</property>
-                        <property name="use_stock">True</property>
-                        <signal name="activate" handler="on_quit_menu_item_activate"/>
-                      </widget>
-                    </child>
-                  </widget>
-                </child>
-              </widget>
-            </child>
-            <child>
-              <widget class="GtkMenuItem" id="remote_menu_item">
-                <property name="visible">True</property>
-                <property name="label" translatable="yes">_Remote</property>
-                <property name="use_underline">True</property>
-                <child>
-                  <widget class="GtkMenu" id="remote_menu">
-                    <property name="visible">True</property>
-                    <child>
-                      <widget class="GtkImageMenuItem" id="connect_menu_item">
-                        <property name="label">gtk-connect</property>
-                        <property name="visible">True</property>
-                        <property name="use_underline">True</property>
-                        <property name="use_stock">True</property>
-                        <signal name="activate" handler="on_connect_menu_item_activate"/>
-                      </widget>
-                    </child>
-                    <child>
-                      <widget class="GtkImageMenuItem" id="disconnect_menu_item">
-                        <property name="label">gtk-disconnect</property>
-                        <property name="visible">True</property>
-                        <property name="use_underline">True</property>
-                        <property name="use_stock">True</property>
-                        <signal name="activate" handler="on_disconnect_menu_item_activate"/>
-                      </widget>
-                    </child>
-                    <child>
-                      <widget class="GtkSeparatorMenuItem" id="separator2">
-                        <property name="visible">True</property>
-                      </widget>
-                    </child>
-                    <child>
-                      <widget class="GtkImageMenuItem" id="get_menu_item">
-                        <property name="label">Get</property>
-                        <property name="visible">True</property>
-                        <property name="use_stock">False</property>
-                        <child>
-                          <widget class="GtkMenu" id="get_menu">
-                            <property name="visible">True</property>
-                            <child>
-                              <widget class="GtkMenuItem" id="get_config_menu_item">
-                                <property name="visible">True</property>
-                                <property name="label" translatable="yes">Get server configuration</property>
-                                <property name="use_underline">True</property>
-                                <signal name="activate" handler="on_get_config_menu_item_activate"/>
-                              </widget>
-                            </child>
-                            <child>
-                              <widget class="GtkMenuItem" id="get_mime_menu_item">
-                                <property name="visible">True</property>
-                                <property name="label" translatable="yes">Get MIME configuration</property>
-                                <property name="use_underline">True</property>
-                                <signal name="activate" handler="on_get_mime_menu_item_activate"/>
-                              </widget>
-                            </child>
-                            <child>
-                              <widget class="GtkMenuItem" id="get_vhost_menu_item">
-                                <property name="visible">True</property>
-                                <property name="label" translatable="yes">Get VHost configuration</property>
-                                <property name="use_underline">True</property>
-                                <signal name="activate" handler="on_get_vhost_menu_item_activate"/>
-                              </widget>
-                            </child>
-                          </widget>
-                        </child>
-                        <child internal-child="image">
-                          <widget class="GtkImage" id="get_image">
-                            <property name="visible">True</property>
-                            <property name="stock">gtk-go-down</property>
-                            <property name="icon-size">1</property>
-                          </widget>
-                        </child>
-                      </widget>
-                    </child>
-                    <child>
-                      <widget class="GtkImageMenuItem" id="put_menu_item">
-                        <property name="label">Put</property>
-                        <property name="visible">True</property>
-                        <property name="use_stock">False</property>
-                        <child>
-                          <widget class="GtkMenu" id="put_menu">
-                            <property name="visible">True</property>
-                            <child>
-                              <widget class="GtkMenuItem" id="put_config_menu_item">
-                                <property name="visible">True</property>
-                                <property name="label" translatable="yes">Put server configuration</property>
-                                <property name="use_underline">True</property>
-                                <signal name="activate" handler="on_put_config_menu_item_activate"/>
-                              </widget>
-                            </child>
-                            <child>
-                              <widget class="GtkMenuItem" id="put_mime_menu_item">
-                                <property name="visible">True</property>
-                                <property name="label" translatable="yes">Put MIME configuration</property>
-                                <property name="use_underline">True</property>
-                                <signal name="activate" handler="on_put_mime_menu_item_activate"/>
-                              </widget>
-                            </child>
-                            <child>
-                              <widget class="GtkMenuItem" id="put_vhost_menu_item">
-                                <property name="visible">True</property>
-                                <property name="label" translatable="yes">Put VHost configuration</property>
-                                <property name="use_underline">True</property>
-                                <signal name="activate" handler="on_put_vhost_menu_item_activate"/>
-                              </widget>
-                            </child>
-                          </widget>
-                        </child>
-                        <child internal-child="image">
-                          <widget class="GtkImage" id="put_image">
-                            <property name="visible">True</property>
-                            <property name="stock">gtk-redo</property>
-                            <property name="icon-size">1</property>
-                          </widget>
-                        </child>
-                      </widget>
-                    </child>
-                  </widget>
-                </child>
-              </widget>
-            </child>
-            <child>
-              <widget class="GtkMenuItem" id="definitions_menu_item">
-                <property name="visible">True</property>
-                <property name="label" translatable="yes">_Definitions</property>
-                <property name="use_underline">True</property>
-                <child>
-                  <widget class="GtkMenu" id="definitions_menu">
-                    <property name="visible">True</property>
-                    <child>
-                      <widget class="GtkImageMenuItem" id="add_unknown_definition_menu_item">
-                        <property name="label">Add unknown definition</property>
-                        <property name="visible">True</property>
-                        <property name="use_stock">False</property>
-                        <signal name="activate" handler="on_add_unknown_definition_menu_item_activate"/>
-                        <child internal-child="image">
-                          <widget class="GtkImage" id="add_unknown_definition_image">
-                            <property name="visible">True</property>
-                            <property name="stock">gtk-add</property>
-                            <property name="icon-size">1</property>
-                          </widget>
-                        </child>
-                      </widget>
-                    </child>
-                  </widget>
-                </child>
-              </widget>
-            </child>
-            <child>
-              <widget class="GtkMenuItem" id="mime_types_menu_item">
-                <property name="visible">True</property>
-                <property name="label" translatable="yes">_MIME Types</property>
-                <property name="use_underline">True</property>
-                <child>
-                  <widget class="GtkMenu" id="mime_types_menu">
-                    <property name="visible">True</property>
-                    <child>
-                      <widget class="GtkImageMenuItem" id="add_mime_type_menu_item">
-                        <property name="label">Add MIME type</property>
-                        <property name="visible">True</property>
-                        <property name="use_stock">False</property>
-                        <signal name="activate" handler="on_add_mime_type_menu_item_activate"/>
-                        <child internal-child="image">
-                          <widget class="GtkImage" id="add_mime_type_image">
-                            <property name="visible">True</property>
-                            <property name="stock">gtk-add</property>
-                            <property name="icon-size">1</property>
-                          </widget>
-                        </child>
-                      </widget>
-                    </child>
-                    <child>
-                      <widget class="GtkImageMenuItem" id="remove_mime_type_menu_item">
-                        <property name="label">Remove MIME type</property>
-                        <property name="visible">True</property>
-                        <property name="use_stock">False</property>
-                        <signal name="activate" handler="on_remove_mime_type_menu_item_activate"/>
-                        <child internal-child="image">
-                          <widget class="GtkImage" id="remove_mime_type_image">
-                            <property name="visible">True</property>
-                            <property name="stock">gtk-remove</property>
-                            <property name="icon-size">1</property>
-                          </widget>
-                        </child>
-                      </widget>
-                    </child>
-                    <child>
-                      <widget class="GtkImageMenuItem" id="add_definition_to_mime_menu_item">
-                        <property name="label">Add definition to MIME type</property>
-                        <property name="visible">True</property>
-                        <property name="use_stock">False</property>
-                        <signal name="activate" handler="on_add_definition_to_mime_menu_item_activate"/>
-                        <child internal-child="image">
-                          <widget class="GtkImage" id="add_definition_to_mime_image">
-                            <property name="visible">True</property>
-                            <property name="stock">gtk-add</property>
-                            <property name="icon-size">1</property>
-                          </widget>
-                        </child>
-                      </widget>
-                    </child>
-                  </widget>
-                </child>
-              </widget>
-            </child>
-            <child>
-              <widget class="GtkMenuItem" id="vhost_menu_item">
-                <property name="visible">True</property>
-                <property name="label" translatable="yes">_VHosts</property>
-                <property name="use_underline">True</property>
-                <child>
-                  <widget class="GtkMenu" id="vhost_menu">
-                    <property name="visible">True</property>
-                    <child>
-                      <widget class="GtkImageMenuItem" id="add_vhost_menu_item">
-                        <property name="label">Add VHost</property>
-                        <property name="visible">True</property>
-                        <property name="use_stock">False</property>
-                        <signal name="activate" handler="on_add_vhost_menu_item_activate"/>
-                        <child internal-child="image">
-                          <widget class="GtkImage" id="add_vhost_image">
-                            <property name="visible">True</property>
-                            <property name="stock">gtk-add</property>
-                            <property name="icon-size">1</property>
-                          </widget>
-                        </child>
-                      </widget>
-                    </child>
-                    <child>
-                      <widget class="GtkImageMenuItem" id="remove_vhost_menu_item">
-                        <property name="label">Remove VHost</property>
-                        <property name="visible">True</property>
-                        <property name="use_stock">False</property>
-                        <signal name="activate" handler="on_remove_vhost_menu_item_activate"/>
-                        <child internal-child="image">
-                          <widget class="GtkImage" id="remove_vhost_image">
-                            <property name="visible">True</property>
-                            <property name="stock">gtk-remove</property>
-                            <property name="icon-size">1</property>
-                          </widget>
-                        </child>
-                      </widget>
-                    </child>
-                    <child>
-                      <widget class="GtkImageMenuItem" id="add_log_to_vhost_menu_item">
-                        <property name="label">Add log to VHost</property>
-                        <property name="visible">True</property>
-                        <property name="use_stock">False</property>
-                        <signal name="activate" handler="on_add_log_to_vhost_menu_item_activate"/>
-                        <child internal-child="image">
-                          <widget class="GtkImage" id="add_log_to_vhost_image">
-                            <property name="visible">True</property>
-                            <property name="stock">gtk-add</property>
-                            <property name="icon-size">1</property>
-                          </widget>
-                        </child>
-                      </widget>
-                    </child>
-                    <child>
-                      <widget class="GtkImageMenuItem" id="remove_log_from_vhost_menu_item">
-                        <property name="label">Remove log from VHost</property>
-                        <property name="visible">True</property>
-                        <property name="use_stock">False</property>
-                        <signal name="activate" handler="on_remove_log_from_vhost_menu_item_activate"/>
-                        <child internal-child="image">
-                          <widget class="GtkImage" id="remove_log_from_vhost_image">
-                            <property name="visible">True</property>
-                            <property name="stock">gtk-remove</property>
-                            <property name="icon-size">1</property>
-                          </widget>
-                        </child>
-                      </widget>
-                    </child>
-                  </widget>
-                </child>
-              </widget>
-            </child>
-            <child>
-              <widget class="GtkMenuItem" id="security_menu_item">
-                <property name="visible">True</property>
-                <property name="label" translatable="yes">_Security</property>
-                <property name="use_underline">True</property>
-                <child>
-                  <widget class="GtkMenu" id="security_menu">
-                    <property name="visible">True</property>
-                    <child>
-                      <widget class="GtkImageMenuItem" id="save_security_menu_item">
-                        <property name="label">Save security</property>
-                        <property name="visible">True</property>
-                        <property name="use_stock">False</property>
-                        <signal name="activate" handler="on_save_security_menu_item_activate"/>
-                        <child internal-child="image">
-                          <widget class="GtkImage" id="save_security_image">
-                            <property name="visible">True</property>
-                            <property name="stock">gtk-save</property>
-                            <property name="icon-size">1</property>
-                          </widget>
-                        </child>
-                      </widget>
-                    </child>
-                  </widget>
-                </child>
-              </widget>
-            </child>
-            <child>
-              <widget class="GtkMenuItem" id="help_menu_item">
-                <property name="visible">True</property>
-                <property name="label" translatable="yes">_Help</property>
-                <property name="use_underline">True</property>
-                <child>
-                  <widget class="GtkMenu" id="help_menu">
-                    <property name="visible">True</property>
-                    <child>
-                      <widget class="GtkImageMenuItem" id="about_menu_item">
-                        <property name="label">gtk-about</property>
-                        <property name="visible">True</property>
-                        <property name="use_underline">True</property>
-                        <property name="use_stock">True</property>
-                        <signal name="activate" handler="on_about_menu_item_activate"/>
-                      </widget>
-                    </child>
-                  </widget>
-                </child>
-              </widget>
-            </child>
-          </widget>
-          <packing>
-            <property name="expand">False</property>
-            <property name="position">0</property>
-          </packing>
-        </child>
-        <child>
-          <widget class="GtkNotebook" id="notebook">
-            <property name="visible">True</property>
-            <property name="can_focus">True</property>
-          </widget>
-          <packing>
-            <property name="position">1</property>
-          </packing>
-        </child>
-        <child>
-          <widget class="GtkStatusbar" id="statusbar">
-            <property name="visible">True</property>
-            <property name="spacing">2</property>
-          </widget>
-          <packing>
-            <property name="expand">False</property>
-            <property name="position">2</property>
-          </packing>
-        </child>
-      </widget>
-    </child>
-  </widget>
-  <widget class="GtkAboutDialog" id="aboutdialog">
-    <property name="visible">True</property>
-    <property name="border_width">5</property>
-    <property name="type_hint">normal</property>
-    <property name="has_separator">False</property>
-    <property name="program_name">GNU MyServer Control</property>
-    <property name="version">v0.9</property>
-    <property name="copyright" translatable="yes">Copyright (C) 2009 Free Software Foundation, Inc.
-This program 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 3 of the License, or
-(at your option) any later version.</property>
-    <property name="website">http://www.gnu.org/software/myserver/</property>
-    <property name="license">                    GNU GENERAL PUBLIC LICENSE
-                       Version 3, 29 June 2007
-
- Copyright (C) 2007 Free Software Foundation, Inc. &lt;http://fsf.org/&gt;
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.
-
-                            Preamble
-
-  The GNU General Public License is a free, copyleft license for
-software and other kinds of works.
-
-  The licenses for most software and other practical works are designed
-to take away your freedom to share and change the works.  By contrast,
-the GNU General Public License is intended to guarantee your freedom to
-share and change all versions of a program--to make sure it remains free
-software for all its users.  We, the Free Software Foundation, use the
-GNU General Public License for most of our software; it applies also to
-any other work released this way by its authors.  You can apply it to
-your programs, too.
-
-  When we speak of free software, we are referring to freedom, not
-price.  Our General Public Licenses are designed to make sure that you
-have the freedom to distribute copies of free software (and charge for
-them if you wish), that you receive source code or can get it if you
-want it, that you can change the software or use pieces of it in new
-free programs, and that you know you can do these things.
-
-  To protect your rights, we need to prevent others from denying you
-these rights or asking you to surrender the rights.  Therefore, you have
-certain responsibilities if you distribute copies of the software, or if
-you modify it: responsibilities to respect the freedom of others.
-
-  For example, if you distribute copies of such a program, whether
-gratis or for a fee, you must pass on to the recipients the same
-freedoms that you received.  You must make sure that they, too, receive
-or can get the source code.  And you must show them these terms so they
-know their rights.
-
-  Developers that use the GNU GPL protect your rights with two steps:
-(1) assert copyright on the software, and (2) offer you this License
-giving you legal permission to copy, distribute and/or modify it.
-
-  For the developers' and authors' protection, the GPL clearly explains
-that there is no warranty for this free software.  For both users' and
-authors' sake, the GPL requires that modified versions be marked as
-changed, so that their problems will not be attributed erroneously to
-authors of previous versions.
-
-  Some devices are designed to deny users access to install or run
-modified versions of the software inside them, although the manufacturer
-can do so.  This is fundamentally incompatible with the aim of
-protecting users' freedom to change the software.  The systematic
-pattern of such abuse occurs in the area of products for individuals to
-use, which is precisely where it is most unacceptable.  Therefore, we
-have designed this version of the GPL to prohibit the practice for those
-products.  If such problems arise substantially in other domains, we
-stand ready to extend this provision to those domains in future versions
-of the GPL, as needed to protect the freedom of users.
-
-  Finally, every program is threatened constantly by software patents.
-States should not allow patents to restrict development and use of
-software on general-purpose computers, but in those that do, we wish to
-avoid the special danger that patents applied to a free program could
-make it effectively proprietary.  To prevent this, the GPL assures that
-patents cannot be used to render the program non-free.
-
-  The precise terms and conditions for copying, distribution and
-modification follow.
-
-                       TERMS AND CONDITIONS
-
-  0. Definitions.
-
-  "This License" refers to version 3 of the GNU General Public License.
-
-  "Copyright" also means copyright-like laws that apply to other kinds of
-works, such as semiconductor masks.
-
-  "The Program" refers to any copyrightable work licensed under this
-License.  Each licensee is addressed as "you".  "Licensees" and
-"recipients" may be individuals or organizations.
-
-  To "modify" a work means to copy from or adapt all or part of the work
-in a fashion requiring copyright permission, other than the making of an
-exact copy.  The resulting work is called a "modified version" of the
-earlier work or a work "based on" the earlier work.
-
-  A "covered work" means either the unmodified Program or a work based
-on the Program.
-
-  To "propagate" a work means to do anything with it that, without
-permission, would make you directly or secondarily liable for
-infringement under applicable copyright law, except executing it on a
-computer or modifying a private copy.  Propagation includes copying,
-distribution (with or without modification), making available to the
-public, and in some countries other activities as well.
-
-  To "convey" a work means any kind of propagation that enables other
-parties to make or receive copies.  Mere interaction with a user through
-a computer network, with no transfer of a copy, is not conveying.
-
-  An interactive user interface displays "Appropriate Legal Notices"
-to the extent that it includes a convenient and prominently visible
-feature that (1) displays an appropriate copyright notice, and (2)
-tells the user that there is no warranty for the work (except to the
-extent that warranties are provided), that licensees may convey the
-work under this License, and how to view a copy of this License.  If
-the interface presents a list of user commands or options, such as a
-menu, a prominent item in the list meets this criterion.
-
-  1. Source Code.
-
-  The "source code" for a work means the preferred form of the work
-for making modifications to it.  "Object code" means any non-source
-form of a work.
-
-  A "Standard Interface" means an interface that either is an official
-standard defined by a recognized standards body, or, in the case of
-interfaces specified for a particular programming language, one that
-is widely used among developers working in that language.
-
-  The "System Libraries" of an executable work include anything, other
-than the work as a whole, that (a) is included in the normal form of
-packaging a Major Component, but which is not part of that Major
-Component, and (b) serves only to enable use of the work with that
-Major Component, or to implement a Standard Interface for which an
-implementation is available to the public in source code form.  A
-"Major Component", in this context, means a major essential component
-(kernel, window system, and so on) of the specific operating system
-(if any) on which the executable work runs, or a compiler used to
-produce the work, or an object code interpreter used to run it.
-
-  The "Corresponding Source" for a work in object code form means all
-the source code needed to generate, install, and (for an executable
-work) run the object code and to modify the work, including scripts to
-control those activities.  However, it does not include the work's
-System Libraries, or general-purpose tools or generally available free
-programs which are used unmodified in performing those activities but
-which are not part of the work.  For example, Corresponding Source
-includes interface definition files associated with source files for
-the work, and the source code for shared libraries and dynamically
-linked subprograms that the work is specifically designed to require,
-such as by intimate data communication or control flow between those
-subprograms and other parts of the work.
-
-  The Corresponding Source need not include anything that users
-can regenerate automatically from other parts of the Corresponding
-Source.
-
-  The Corresponding Source for a work in source code form is that
-same work.
-
-  2. Basic Permissions.
-
-  All rights granted under this License are granted for the term of
-copyright on the Program, and are irrevocable provided the stated
-conditions are met.  This License explicitly affirms your unlimited
-permission to run the unmodified Program.  The output from running a
-covered work is covered by this License only if the output, given its
-content, constitutes a covered work.  This License acknowledges your
-rights of fair use or other equivalent, as provided by copyright law.
-
-  You may make, run and propagate covered works that you do not
-convey, without conditions so long as your license otherwise remains
-in force.  You may convey covered works to others for the sole purpose
-of having them make modifications exclusively for you, or provide you
-with facilities for running those works, provided that you comply with
-the terms of this License in conveying all material for which you do
-not control copyright.  Those thus making or running the covered works
-for you must do so exclusively on your behalf, under your direction
-and control, on terms that prohibit them from making any copies of
-your copyrighted material outside their relationship with you.
-
-  Conveying under any other circumstances is permitted solely under
-the conditions stated below.  Sublicensing is not allowed; section 10
-makes it unnecessary.
-
-  3. Protecting Users' Legal Rights From Anti-Circumvention Law.
-
-  No covered work shall be deemed part of an effective technological
-measure under any applicable law fulfilling obligations under article
-11 of the WIPO copyright treaty adopted on 20 December 1996, or
-similar laws prohibiting or restricting circumvention of such
-measures.
-
-  When you convey a covered work, you waive any legal power to forbid
-circumvention of technological measures to the extent such circumvention
-is effected by exercising rights under this License with respect to
-the covered work, and you disclaim any intention to limit operation or
-modification of the work as a means of enforcing, against the work's
-users, your or third parties' legal rights to forbid circumvention of
-technological measures.
-
-  4. Conveying Verbatim Copies.
-
-  You may convey verbatim copies of the Program's source code as you
-receive it, in any medium, provided that you conspicuously and
-appropriately publish on each copy an appropriate copyright notice;
-keep intact all notices stating that this License and any
-non-permissive terms added in accord with section 7 apply to the code;
-keep intact all notices of the absence of any warranty; and give all
-recipients a copy of this License along with the Program.
-
-  You may charge any price or no price for each copy that you convey,
-and you may offer support or warranty protection for a fee.
-
-  5. Conveying Modified Source Versions.
-
-  You may convey a work based on the Program, or the modifications to
-produce it from the Program, in the form of source code under the
-terms of section 4, provided that you also meet all of these conditions:
-
-    a) The work must carry prominent notices stating that you modified
-    it, and giving a relevant date.
-
-    b) The work must carry prominent notices stating that it is
-    released under this License and any conditions added under section
-    7.  This requirement modifies the requirement in section 4 to
-    "keep intact all notices".
-
-    c) You must license the entire work, as a whole, under this
-    License to anyone who comes into possession of a copy.  This
-    License will therefore apply, along with any applicable section 7
-    additional terms, to the whole of the work, and all its parts,
-    regardless of how they are packaged.  This License gives no
-    permission to license the work in any other way, but it does not
-    invalidate such permission if you have separately received it.
-
-    d) If the work has interactive user interfaces, each must display
-    Appropriate Legal Notices; however, if the Program has interactive
-    interfaces that do not display Appropriate Legal Notices, your
-    work need not make them do so.
-
-  A compilation of a covered work with other separate and independent
-works, which are not by their nature extensions of the covered work,
-and which are not combined with it such as to form a larger program,
-in or on a volume of a storage or distribution medium, is called an
-"aggregate" if the compilation and its resulting copyright are not
-used to limit the access or legal rights of the compilation's users
-beyond what the individual works permit.  Inclusion of a covered work
-in an aggregate does not cause this License to apply to the other
-parts of the aggregate.
-
-  6. Conveying Non-Source Forms.
-
-  You may convey a covered work in object code form under the terms
-of sections 4 and 5, provided that you also convey the
-machine-readable Corresponding Source under the terms of this License,
-in one of these ways:
-
-    a) Convey the object code in, or embodied in, a physical product
-    (including a physical distribution medium), accompanied by the
-    Corresponding Source fixed on a durable physical medium
-    customarily used for software interchange.
-
-    b) Convey the object code in, or embodied in, a physical product
-    (including a physical distribution medium), accompanied by a
-    written offer, valid for at least three years and valid for as
-    long as you offer spare parts or customer support for that product
-    model, to give anyone who possesses the object code either (1) a
-    copy of the Corresponding Source for all the software in the
-    product that is covered by this License, on a durable physical
-    medium customarily used for software interchange, for a price no
-    more than your reasonable cost of physically performing this
-    conveying of source, or (2) access to copy the
-    Corresponding Source from a network server at no charge.
-
-    c) Convey individual copies of the object code with a copy of the
-    written offer to provide the Corresponding Source.  This
-    alternative is allowed only occasionally and noncommercially, and
-    only if you received the object code with such an offer, in accord
-    with subsection 6b.
-
-    d) Convey the object code by offering access from a designated
-    place (gratis or for a charge), and offer equivalent access to the
-    Corresponding Source in the same way through the same place at no
-    further charge.  You need not require recipients to copy the
-    Corresponding Source along with the object code.  If the place to
-    copy the object code is a network server, the Corresponding Source
-    may be on a different server (operated by you or a third party)
-    that supports equivalent copying facilities, provided you maintain
-    clear directions next to the object code saying where to find the
-    Corresponding Source.  Regardless of what server hosts the
-    Corresponding Source, you remain obligated to ensure that it is
-    available for as long as needed to satisfy these requirements.
-
-    e) Convey the object code using peer-to-peer transmission, provided
-    you inform other peers where the object code and Corresponding
-    Source of the work are being offered to the general public at no
-    charge under subsection 6d.
-
-  A separable portion of the object code, whose source code is excluded
-from the Corresponding Source as a System Library, need not be
-included in conveying the object code work.
-
-  A "User Product" is either (1) a "consumer product", which means any
-tangible personal property which is normally used for personal, family,
-or household purposes, or (2) anything designed or sold for incorporation
-into a dwelling.  In determining whether a product is a consumer product,
-doubtful cases shall be resolved in favor of coverage.  For a particular
-product received by a particular user, "normally used" refers to a
-typical or common use of that class of product, regardless of the status
-of the particular user or of the way in which the particular user
-actually uses, or expects or is expected to use, the product.  A product
-is a consumer product regardless of whether the product has substantial
-commercial, industrial or non-consumer uses, unless such uses represent
-the only significant mode of use of the product.
-
-  "Installation Information" for a User Product means any methods,
-procedures, authorization keys, or other information required to install
-and execute modified versions of a covered work in that User Product from
-a modified version of its Corresponding Source.  The information must
-suffice to ensure that the continued functioning of the modified object
-code is in no case prevented or interfered with solely because
-modification has been made.
-
-  If you convey an object code work under this section in, or with, or
-specifically for use in, a User Product, and the conveying occurs as
-part of a transaction in which the right of possession and use of the
-User Product is transferred to the recipient in perpetuity or for a
-fixed term (regardless of how the transaction is characterized), the
-Corresponding Source conveyed under this section must be accompanied
-by the Installation Information.  But this requirement does not apply
-if neither you nor any third party retains the ability to install
-modified object code on the User Product (for example, the work has
-been installed in ROM).
-
-  The requirement to provide Installation Information does not include a
-requirement to continue to provide support service, warranty, or updates
-for a work that has been modified or installed by the recipient, or for
-the User Product in which it has been modified or installed.  Access to a
-network may be denied when the modification itself materially and
-adversely affects the operation of the network or violates the rules and
-protocols for communication across the network.
-
-  Corresponding Source conveyed, and Installation Information provided,
-in accord with this section must be in a format that is publicly
-documented (and with an implementation available to the public in
-source code form), and must require no special password or key for
-unpacking, reading or copying.
-
-  7. Additional Terms.
-
-  "Additional permissions" are terms that supplement the terms of this
-License by making exceptions from one or more of its conditions.
-Additional permissions that are applicable to the entire Program shall
-be treated as though they were included in this License, to the extent
-that they are valid under applicable law.  If additional permissions
-apply only to part of the Program, that part may be used separately
-under those permissions, but the entire Program remains governed by
-this License without regard to the additional permissions.
-
-  When you convey a copy of a covered work, you may at your option
-remove any additional permissions from that copy, or from any part of
-it.  (Additional permissions may be written to require their own
-removal in certain cases when you modify the work.)  You may place
-additional permissions on material, added by you to a covered work,
-for which you have or can give appropriate copyright permission.
-
-  Notwithstanding any other provision of this License, for material you
-add to a covered work, you may (if authorized by the copyright holders of
-that material) supplement the terms of this License with terms:
-
-    a) Disclaiming warranty or limiting liability differently from the
-    terms of sections 15 and 16 of this License; or
-
-    b) Requiring preservation of specified reasonable legal notices or
-    author attributions in that material or in the Appropriate Legal
-    Notices displayed by works containing it; or
-
-    c) Prohibiting misrepresentation of the origin of that material, or
-    requiring that modified versions of such material be marked in
-    reasonable ways as different from the original version; or
-
-    d) Limiting the use for publicity purposes of names of licensors or
-    authors of the material; or
-
-    e) Declining to grant rights under trademark law for use of some
-    trade names, trademarks, or service marks; or
-
-    f) Requiring indemnification of licensors and authors of that
-    material by anyone who conveys the material (or modified versions of
-    it) with contractual assumptions of liability to the recipient, for
-    any liability that these contractual assumptions directly impose on
-    those licensors and authors.
-
-  All other non-permissive additional terms are considered "further
-restrictions" within the meaning of section 10.  If the Program as you
-received it, or any part of it, contains a notice stating that it is
-governed by this License along with a term that is a further
-restriction, you may remove that term.  If a license document contains
-a further restriction but permits relicensing or conveying under this
-License, you may add to a covered work material governed by the terms
-of that license document, provided that the further restriction does
-not survive such relicensing or conveying.
-
-  If you add terms to a covered work in accord with this section, you
-must place, in the relevant source files, a statement of the
-additional terms that apply to those files, or a notice indicating
-where to find the applicable terms.
-
-  Additional terms, permissive or non-permissive, may be stated in the
-form of a separately written license, or stated as exceptions;
-the above requirements apply either way.
-
-  8. Termination.
-
-  You may not propagate or modify a covered work except as expressly
-provided under this License.  Any attempt otherwise to propagate or
-modify it is void, and will automatically terminate your rights under
-this License (including any patent licenses granted under the third
-paragraph of section 11).
-
-  However, if you cease all violation of this License, then your
-license from a particular copyright holder is reinstated (a)
-provisionally, unless and until the copyright holder explicitly and
-finally terminates your license, and (b) permanently, if the copyright
-holder fails to notify you of the violation by some reasonable means
-prior to 60 days after the cessation.
-
-  Moreover, your license from a particular copyright holder is
-reinstated permanently if the copyright holder notifies you of the
-violation by some reasonable means, this is the first time you have
-received notice of violation of this License (for any work) from that
-copyright holder, and you cure the violation prior to 30 days after
-your receipt of the notice.
-
-  Termination of your rights under this section does not terminate the
-licenses of parties who have received copies or rights from you under
-this License.  If your rights have been terminated and not permanently
-reinstated, you do not qualify to receive new licenses for the same
-material under section 10.
-
-  9. Acceptance Not Required for Having Copies.
-
-  You are not required to accept this License in order to receive or
-run a copy of the Program.  Ancillary propagation of a covered work
-occurring solely as a consequence of using peer-to-peer transmission
-to receive a copy likewise does not require acceptance.  However,
-nothing other than this License grants you permission to propagate or
-modify any covered work.  These actions infringe copyright if you do
-not accept this License.  Therefore, by modifying or propagating a
-covered work, you indicate your acceptance of this License to do so.
-
-  10. Automatic Licensing of Downstream Recipients.
-
-  Each time you convey a covered work, the recipient automatically
-receives a license from the original licensors, to run, modify and
-propagate that work, subject to this License.  You are not responsible
-for enforcing compliance by third parties with this License.
-
-  An "entity transaction" is a transaction transferring control of an
-organization, or substantially all assets of one, or subdividing an
-organization, or merging organizations.  If propagation of a covered
-work results from an entity transaction, each party to that
-transaction who receives a copy of the work also receives whatever
-licenses to the work the party's predecessor in interest had or could
-give under the previous paragraph, plus a right to possession of the
-Corresponding Source of the work from the predecessor in interest, if
-the predecessor has it or can get it with reasonable efforts.
-
-  You may not impose any further restrictions on the exercise of the
-rights granted or affirmed under this License.  For example, you may
-not impose a license fee, royalty, or other charge for exercise of
-rights granted under this License, and you may not initiate litigation
-(including a cross-claim or counterclaim in a lawsuit) alleging that
-any patent claim is infringed by making, using, selling, offering for
-sale, or importing the Program or any portion of it.
-
-  11. Patents.
-
-  A "contributor" is a copyright holder who authorizes use under this
-License of the Program or a work on which the Program is based.  The
-work thus licensed is called the contributor's "contributor version".
-
-  A contributor's "essential patent claims" are all patent claims
-owned or controlled by the contributor, whether already acquired or
-hereafter acquired, that would be infringed by some manner, permitted
-by this License, of making, using, or selling its contributor version,
-but do not include claims that would be infringed only as a
-consequence of further modification of the contributor version.  For
-purposes of this definition, "control" includes the right to grant
-patent sublicenses in a manner consistent with the requirements of
-this License.
-
-  Each contributor grants you a non-exclusive, worldwide, royalty-free
-patent license under the contributor's essential patent claims, to
-make, use, sell, offer for sale, import and otherwise run, modify and
-propagate the contents of its contributor version.
-
-  In the following three paragraphs, a "patent license" is any express
-agreement or commitment, however denominated, not to enforce a patent
-(such as an express permission to practice a patent or covenant not to
-sue for patent infringement).  To "grant" such a patent license to a
-party means to make such an agreement or commitment not to enforce a
-patent against the party.
-
-  If you convey a covered work, knowingly relying on a patent license,
-and the Corresponding Source of the work is not available for anyone
-to copy, free of charge and under the terms of this License, through a
-publicly available network server or other readily accessible means,
-then you must either (1) cause the Corresponding Source to be so
-available, or (2) arrange to deprive yourself of the benefit of the
-patent license for this particular work, or (3) arrange, in a manner
-consistent with the requirements of this License, to extend the patent
-license to downstream recipients.  "Knowingly relying" means you have
-actual knowledge that, but for the patent license, your conveying the
-covered work in a country, or your recipient's use of the covered work
-in a country, would infringe one or more identifiable patents in that
-country that you have reason to believe are valid.
-
-  If, pursuant to or in connection with a single transaction or
-arrangement, you convey, or propagate by procuring conveyance of, a
-covered work, and grant a patent license to some of the parties
-receiving the covered work authorizing them to use, propagate, modify
-or convey a specific copy of the covered work, then the patent license
-you grant is automatically extended to all recipients of the covered
-work and works based on it.
-
-  A patent license is "discriminatory" if it does not include within
-the scope of its coverage, prohibits the exercise of, or is
-conditioned on the non-exercise of one or more of the rights that are
-specifically granted under this License.  You may not convey a covered
-work if you are a party to an arrangement with a third party that is
-in the business of distributing software, under which you make payment
-to the third party based on the extent of your activity of conveying
-the work, and under which the third party grants, to any of the
-parties who would receive the covered work from you, a discriminatory
-patent license (a) in connection with copies of the covered work
-conveyed by you (or copies made from those copies), or (b) primarily
-for and in connection with specific products or compilations that
-contain the covered work, unless you entered into that arrangement,
-or that patent license was granted, prior to 28 March 2007.
-
-  Nothing in this License shall be construed as excluding or limiting
-any implied license or other defenses to infringement that may
-otherwise be available to you under applicable patent law.
-
-  12. No Surrender of Others' Freedom.
-
-  If conditions are imposed on you (whether by court order, agreement or
-otherwise) that contradict the conditions of this License, they do not
-excuse you from the conditions of this License.  If you cannot convey a
-covered work so as to satisfy simultaneously your obligations under this
-License and any other pertinent obligations, then as a consequence you may
-not convey it at all.  For example, if you agree to terms that obligate you
-to collect a royalty for further conveying from those to whom you convey
-the Program, the only way you could satisfy both those terms and this
-License would be to refrain entirely from conveying the Program.
-
-  13. Use with the GNU Affero General Public License.
-
-  Notwithstanding any other provision of this License, you have
-permission to link or combine any covered work with a work licensed
-under version 3 of the GNU Affero General Public License into a single
-combined work, and to convey the resulting work.  The terms of this
-License will continue to apply to the part which is the covered work,
-but the special requirements of the GNU Affero General Public License,
-section 13, concerning interaction through a network will apply to the
-combination as such.
-
-  14. Revised Versions of this License.
-
-  The Free Software Foundation may publish revised and/or new versions of
-the GNU General Public License from time to time.  Such new versions will
-be similar in spirit to the present version, but may differ in detail to
-address new problems or concerns.
-
-  Each version is given a distinguishing version number.  If the
-Program specifies that a certain numbered version of the GNU General
-Public License "or any later version" applies to it, you have the
-option of following the terms and conditions either of that numbered
-version or of any later version published by the Free Software
-Foundation.  If the Program does not specify a version number of the
-GNU General Public License, you may choose any version ever published
-by the Free Software Foundation.
-
-  If the Program specifies that a proxy can decide which future
-versions of the GNU General Public License can be used, that proxy's
-public statement of acceptance of a version permanently authorizes you
-to choose that version for the Program.
-
-  Later license versions may give you additional or different
-permissions.  However, no additional obligations are imposed on any
-author or copyright holder as a result of your choosing to follow a
-later version.
-
-  15. Disclaimer of Warranty.
-
-  THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
-APPLICABLE LAW.  EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
-HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
-OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
-THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-PURPOSE.  THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
-IS WITH YOU.  SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
-ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
-
-  16. Limitation of Liability.
-
-  IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
-WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
-THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
-GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
-USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
-DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
-PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
-EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
-SUCH DAMAGES.
-
-  17. Interpretation of Sections 15 and 16.
-
-  If the disclaimer of warranty and limitation of liability provided
-above cannot be given local legal effect according to their terms,
-reviewing courts shall apply local law that most closely approximates
-an absolute waiver of all civil liability in connection with the
-Program, unless a warranty or assumption of liability accompanies a
-copy of the Program in return for a fee.
-
-                     END OF TERMS AND CONDITIONS
-
-            How to Apply These Terms to Your New Programs
-
-  If you develop a new program, and you want it to be of the greatest
-possible use to the public, the best way to achieve this is to make it
-free software which everyone can redistribute and change under these terms.
-
-  To do so, attach the following notices to the program.  It is safest
-to attach them to the start of each source file to most effectively
-state the exclusion of warranty; and each file should have at least
-the "copyright" line and a pointer to where the full notice is found.
-
-    &lt;one line to give the program's name and a brief idea of what it does.&gt;
-    Copyright (C) &lt;year&gt;  &lt;name of author&gt;
-
-    This program 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 3 of the License, or
-    (at your option) any later version.
-
-    This program is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-    GNU General Public License for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with this program.  If not, see &lt;http://www.gnu.org/licenses/&gt;.
-
-Also add information on how to contact you by electronic and paper mail.
-
-  If the program does terminal interaction, make it output a short
-notice like this when it starts in an interactive mode:
-
-    &lt;program&gt;  Copyright (C) &lt;year&gt;  &lt;name of author&gt;
-    This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
-    This is free software, and you are welcome to redistribute it
-    under certain conditions; type `show c' for details.
-
-The hypothetical commands `show w' and `show c' should show the appropriate
-parts of the General Public License.  Of course, your program's commands
-might be different; for a GUI interface, you would use an "about box".
-
-  You should also get your employer (if you work as a programmer) or school,
-if any, to sign a "copyright disclaimer" for the program, if necessary.
-For more information on this, and how to apply and follow the GNU GPL, see
-&lt;http://www.gnu.org/licenses/&gt;.
-
-  The GNU General Public License does not permit incorporating your program
-into proprietary programs.  If your program is a subroutine library, you
-may consider it more useful to permit linking proprietary applications with
-the library.  If this is what you want to do, use the GNU Lesser General
-Public License instead of this License.  But first, please read
-&lt;http://www.gnu.org/philosophy/why-not-lgpl.html&gt;.
-</property>
-    <signal name="response" handler="on_aboutdialog_response"/>
-    <child internal-child="vbox">
-      <widget class="GtkVBox" id="dialog-vbox">
-        <property name="visible">True</property>
-        <property name="orientation">vertical</property>
-        <property name="spacing">2</property>
-        <child>
-          <placeholder/>
-        </child>
-        <child internal-child="action_area">
-          <widget class="GtkHButtonBox" id="dialog-action_area">
-            <property name="visible">True</property>
-            <property name="layout_style">end</property>
-          </widget>
-          <packing>
-            <property name="expand">False</property>
-            <property name="pack_type">end</property>
-            <property name="position">0</property>
-          </packing>
-        </child>
-      </widget>
-    </child>
-  </widget>
-  <widget class="GtkDialog" id="connectiondialog">
-    <property name="border_width">5</property>
-    <property name="type_hint">normal</property>
-    <property name="has_separator">False</property>
-    <child internal-child="vbox">
-      <widget class="GtkVBox" id="dialog-vbox">
-        <property name="visible">True</property>
-        <property name="orientation">vertical</property>
-        <property name="spacing">2</property>
-        <child>
-          <widget class="GtkTable" id="table">
-            <property name="visible">True</property>
-            <property name="n_rows">4</property>
-            <property name="n_columns">2</property>
-            <child>
-              <widget class="GtkLabel" id="host_label">
-                <property name="visible">True</property>
-                <property name="label" translatable="yes">host</property>
-              </widget>
-              <packing>
-                <property name="y_options">GTK_FILL</property>
-              </packing>
-            </child>
-            <child>
-              <widget class="GtkLabel" id="port_label">
-                <property name="visible">True</property>
-                <property name="label" translatable="yes">port</property>
-              </widget>
-              <packing>
-                <property name="top_attach">1</property>
-                <property name="bottom_attach">2</property>
-                <property name="y_options">GTK_FILL</property>
-              </packing>
-            </child>
-            <child>
-              <widget class="GtkLabel" id="username_label">
-                <property name="visible">True</property>
-                <property name="label" translatable="yes">username</property>
-              </widget>
-              <packing>
-                <property name="top_attach">2</property>
-                <property name="bottom_attach">3</property>
-                <property name="y_options">GTK_FILL</property>
-              </packing>
-            </child>
-            <child>
-              <widget class="GtkLabel" id="password_label">
-                <property name="visible">True</property>
-                <property name="label" translatable="yes">password</property>
-              </widget>
-              <packing>
-                <property name="top_attach">3</property>
-                <property name="bottom_attach">4</property>
-                <property name="y_options">GTK_FILL</property>
-              </packing>
-            </child>
-            <child>
-              <widget class="GtkEntry" id="host_entry">
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="invisible_char">&#x25CF;</property>
-              </widget>
-              <packing>
-                <property name="left_attach">1</property>
-                <property name="right_attach">2</property>
-                <property name="y_options">GTK_FILL</property>
-              </packing>
-            </child>
-            <child>
-              <widget class="GtkEntry" id="port_entry">
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="invisible_char">&#x25CF;</property>
-              </widget>
-              <packing>
-                <property name="left_attach">1</property>
-                <property name="right_attach">2</property>
-                <property name="top_attach">1</property>
-                <property name="bottom_attach">2</property>
-                <property name="y_options">GTK_FILL</property>
-              </packing>
-            </child>
-            <child>
-              <widget class="GtkEntry" id="username_entry">
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="invisible_char">&#x25CF;</property>
-              </widget>
-              <packing>
-                <property name="left_attach">1</property>
-                <property name="right_attach">2</property>
-                <property name="top_attach">2</property>
-                <property name="bottom_attach">3</property>
-                <property name="y_options">GTK_FILL</property>
-              </packing>
-            </child>
-            <child>
-              <widget class="GtkEntry" id="password_entry">
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="invisible_char">&#x25CF;</property>
-              </widget>
-              <packing>
-                <property name="left_attach">1</property>
-                <property name="right_attach">2</property>
-                <property name="top_attach">3</property>
-                <property name="bottom_attach">4</property>
-                <property name="y_options">GTK_FILL</property>
-              </packing>
-            </child>
-          </widget>
-          <packing>
-            <property name="position">1</property>
-          </packing>
-        </child>
-        <child internal-child="action_area">
-          <widget class="GtkHButtonBox" id="dialog-action_area">
-            <property name="visible">True</property>
-            <property name="layout_style">end</property>
-            <child>
-              <widget class="GtkButton" id="cancel_button">
-                <property name="label">gtk-cancel</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="receives_default">True</property>
-                <property name="use_stock">True</property>
-                <signal name="clicked" handler="on_cancel_button_clicked"/>
-              </widget>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">0</property>
-              </packing>
-            </child>
-            <child>
-              <widget class="GtkButton" id="ok_button">
-                <property name="label">gtk-ok</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="receives_default">True</property>
-                <property name="use_stock">True</property>
-                <signal name="clicked" handler="on_ok_button_clicked"/>
-              </widget>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">1</property>
-              </packing>
-            </child>
-          </widget>
-          <packing>
-            <property name="expand">False</property>
-            <property name="pack_type">end</property>
-            <property name="position">0</property>
-          </packing>
-        </child>
-      </widget>
-    </child>
-  </widget>
-</glade-interface>
diff --git a/misc/py_control_client/INSTALL b/misc/py_control_client/INSTALL
deleted file mode 100644
index 84a158d..0000000
--- a/misc/py_control_client/INSTALL
+++ /dev/null
@@ -1,11 +0,0 @@
-To install MyServer python control libraries run:
-
-$ python setup.py install
-
-or
-
-$ python setup.py install --prefix=/custom/path
-
-To generate tar.gz package with this libraries run:
-
-$ python setup.py sdist
diff --git a/misc/py_control_client/MyServer/GUI/AboutWindow.py b/misc/py_control_client/MyServer/GUI/AboutWindow.py
deleted file mode 100644
index 252081f..0000000
--- a/misc/py_control_client/MyServer/GUI/AboutWindow.py
+++ /dev/null
@@ -1,31 +0,0 @@
-# -*- coding: utf-8 -*-
-'''
-MyServer
-Copyright (C) 2009 Free Software Foundation, Inc.
-This program 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 3 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program.  If not, see <http://www.gnu.org/licenses/>.
-'''
-
-import gtk
-import gtk.glade
-
-class About():
-    '''GNU MyServer Control about window.'''
-
-    def __init__(self):
-        self.gladefile = 'PyGTKControl.glade'
-        self.widgets = gtk.glade.XML(self.gladefile, 'aboutdialog')
-        self.widgets.signal_autoconnect(self)
-
-    def on_aboutdialog_response(self, widget, response):
-        widget.destroy()
diff --git a/misc/py_control_client/MyServer/GUI/BrowserWidgets.py b/misc/py_control_client/MyServer/GUI/BrowserWidgets.py
deleted file mode 100644
index 219ef16..0000000
--- a/misc/py_control_client/MyServer/GUI/BrowserWidgets.py
+++ /dev/null
@@ -1,80 +0,0 @@
-# -*- coding: utf-8 -*-
-'''
-MyServer
-Copyright (C) 2009 Free Software Foundation, Inc.
-This program 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 3 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program.  If not, see <http://www.gnu.org/licenses/>.
-'''
-
-import gtk
-from gtk import gdk
-import gobject
-from MyServer.pycontrollib.browser import LocalFileBrowser
-
-class BrowserTreeView(gtk.TreeView):
-    def __init__(self, callback):
-        gtk.TreeView.__init__(self, gtk.ListStore(
-                gdk.Pixbuf,
-                gobject.TYPE_STRING))
-        self.callback = callback
-        self.model = self.get_model()
-        renderer = gtk.CellRendererPixbuf()
-        column = gtk.TreeViewColumn()
-        column.pack_start(renderer)
-        column.add_attribute(renderer, 'pixbuf', 0)
-        self.append_column(column)
-        renderer = gtk.CellRendererText()
-        column = gtk.TreeViewColumn('File')
-        column.pack_start(renderer)
-        column.add_attribute(renderer, 'text', 1)
-        self.append_column(column)
-
-        self.browser = LocalFileBrowser()
-        self.browser.show_hidden(False)
-        icon_theme = gtk.icon_theme_get_default()
-        self.dir_icon = icon_theme.load_icon('gtk-directory', 16, 0)
-        self.update()
-        self.connect('row-activated', self.change_dir)
-        callback(self.browser)
-
-        self.scroll = gtk.ScrolledWindow()
-        self.scroll.set_policy(gtk.POLICY_AUTOMATIC, gtk.POLICY_AUTOMATIC)
-        self.scroll.set_shadow_type(gtk.SHADOW_OUT)
-        self.scroll.set_border_width(5)
-        self.scroll.add(self)
-
-    def update(self):
-        '''Show contents of current directory.'''
-        self.model.clear()
-        for d in self.browser.list_dir():
-            self.model.append((self.dir_icon, d, ))
-
-    def change_dir(self, widget, path, view_column):
-        self.browser.change_dir(self.model[path][1])
-        self.update()
-        self.callback(self.browser)
-
-class BrowserTable(gtk.Table):
-    def __init__(self, callback):
-        gtk.Table.__init__(self, 2, 1)
-
-        self.browser_tree = BrowserTreeView(callback)
-
-        def set_show_hidden(button):
-            self.browser_tree.browser.show_hidden(button.get_active())
-            self.browser_tree.update()
-        hide_check = gtk.CheckButton('Show hidden directories.')
-        hide_check.connect('toggled', set_show_hidden)
-
-        self.attach(hide_check, 0, 1, 0, 1, yoptions = gtk.FILL)
-        self.attach(self.browser_tree.scroll, 0, 1, 1, 2)
diff --git a/misc/py_control_client/MyServer/GUI/ConnectionWindow.py b/misc/py_control_client/MyServer/GUI/ConnectionWindow.py
deleted file mode 100644
index 16d4ddf..0000000
--- a/misc/py_control_client/MyServer/GUI/ConnectionWindow.py
+++ /dev/null
@@ -1,45 +0,0 @@
-# -*- coding: utf-8 -*-
-'''
-MyServer
-Copyright (C) 2009 Free Software Foundation, Inc.
-This program 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 3 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program.  If not, see <http://www.gnu.org/licenses/>.
-'''
-
-import gtk
-import gtk.glade
-
-class Connection():
-    def __init__(self):
-        self.gladefile = 'PyGTKControl.glade'
-        self.widgets = gtk.glade.XML(self.gladefile, 'connectiondialog')
-        self.widgets.signal_autoconnect(self)
-
-    def destroy(self):
-        '''Destroys this widget.'''
-        self.widgets.get_widget('connectiondialog').destroy()
-
-    def on_cancel_button_clicked(self, widget):
-        self.destroy()
-
-    def get_host(self):
-        return self.widgets.get_widget('host_entry').get_text()
-
-    def get_port(self):
-        return self.widgets.get_widget('port_entry').get_text()
-
-    def get_username(self):
-        return self.widgets.get_widget('username_entry').get_text()
-
-    def get_password(self):
-        return self.widgets.get_widget('password_entry').get_text()
diff --git a/misc/py_control_client/MyServer/GUI/DefinitionWidgets.py b/misc/py_control_client/MyServer/GUI/DefinitionWidgets.py
deleted file mode 100644
index 079dbee..0000000
--- a/misc/py_control_client/MyServer/GUI/DefinitionWidgets.py
+++ /dev/null
@@ -1,304 +0,0 @@
-# -*- coding: utf-8 -*-
-'''
-MyServer
-Copyright (C) 2009 Free Software Foundation, Inc.
-This program 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 3 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program.  If not, see <http://www.gnu.org/licenses/>.
-'''
-
-import gtk
-import gobject
-from MyServer.pycontrollib.definition import DefinitionElement, DefinitionTree
-
-class DefinitionTable(gtk.Table):
-    def __init__(self, tree):
-        gtk.Table.__init__(self, 7, 3)
-
-        tree.connect('cursor-changed', self.cursor_changed)
-        self.last_selected = None
-
-        enabled_label = gtk.Label('enabled:')
-        self.enabled_field = enabled_checkbutton = gtk.CheckButton()
-        enabled_checkbutton.set_tooltip_text('If not active, definition won\'t be included in saved configuration.')
-        self.attach(enabled_label, 0, 1, 0, 1, gtk.FILL, gtk.FILL)
-        self.attach(enabled_checkbutton, 1, 3, 0, 1, yoptions = gtk.FILL)
-
-        value_label = gtk.Label('value:')
-        self.value_field = value_entry = gtk.Entry()
-        self.value_check_field = value_checkbutton = gtk.CheckButton()
-        value_checkbutton.set_tooltip_text('If not active value won\'t be saved in configuration.')
-        value_checkbutton.set_active(True)
-
-        self.attach(value_label, 0, 1, 1, 2, gtk.FILL, gtk.FILL)
-        self.attach(value_entry, 1, 2, 1, 2, yoptions = gtk.FILL)
-        self.attach(value_checkbutton, 2, 3, 1, 2, gtk.FILL, gtk.FILL)
-
-        add_definition_button = gtk.Button('add sub-definition')
-        def add_sub_definition(button):
-            model, selected = tree.get_selection().get_selected()
-            if selected is not None:
-                model.append(selected, ('', '', False, True, '', False, {}, ))
-                self.value_check_field.set_active(False) # auto disable value
-        add_definition_button.connect('clicked', add_sub_definition)
-        self.attach(add_definition_button, 0, 3, 2, 3, yoptions = gtk.FILL)
-
-        remove_definition_button = gtk.Button('remove this definition')
-        def remove_definition(button):
-            model, selected = tree.get_selection().get_selected()
-            if selected is not None and not model[selected][2]:
-                model.remove(selected)
-                self.clear()
-        remove_definition_button.connect('clicked', remove_definition)
-        self.attach(remove_definition_button, 0, 3, 3, 4, yoptions = gtk.FILL)
-
-        add_attribute_button = gtk.Button('add attribute')
-        remove_attribute_button = gtk.Button('remove attribute')
-        button_table = gtk.Table(1, 2)
-        add_attribute_button.connect(
-            'clicked',
-            lambda button: attributes_model.append(('', '', )))
-        def remove_attribute(button):
-            model, selected = attributes_list.get_selection().get_selected()
-            if selected is not None:
-                model.remove(selected)
-        remove_attribute_button.connect('clicked', remove_attribute)
-        button_table.attach(add_attribute_button, 0, 1, 0, 1)
-        button_table.attach(remove_attribute_button, 1, 2, 0, 1)
-        self.attach(button_table, 0, 3, 4, 5, yoptions = gtk.FILL)
-
-        attributes_label = gtk.Label('attributes:')
-        attributes_list = gtk.TreeView(gtk.ListStore(gobject.TYPE_STRING,
-                                                     gobject.TYPE_STRING))
-        attributes_scroll = gtk.ScrolledWindow()
-        attributes_scroll.set_policy(gtk.POLICY_AUTOMATIC, gtk.POLICY_AUTOMATIC)
-        attributes_scroll.set_shadow_type(gtk.SHADOW_OUT)
-        attributes_scroll.set_border_width(5)
-        attributes_scroll.add(attributes_list)
-        self.attributes_field = attributes_model = attributes_list.get_model()
-
-        def edited_handler(cell, path, text, data):
-            model, col = data
-            model[path][col] = text
-        variable_column = gtk.TreeViewColumn('variable')
-        variable_renderer = gtk.CellRendererText()
-        variable_renderer.set_property('editable', True)
-        variable_renderer.connect('edited', edited_handler,
-                                  (attributes_model, 0, ))
-        variable_column.pack_start(variable_renderer)
-        variable_column.add_attribute(variable_renderer, 'text', 0)
-
-        value_column = gtk.TreeViewColumn('value')
-        value_renderer = gtk.CellRendererText()
-        value_renderer.set_property('editable', True)
-        value_renderer.connect('edited', edited_handler,
-                                  (attributes_model, 1, ))
-        value_column.pack_start(value_renderer)
-        value_column.add_attribute(value_renderer, 'text', 1)
-
-        attributes_list.append_column(variable_column)
-        attributes_list.append_column(value_column)
-        self.attach(attributes_label, 0, 3, 5, 6, yoptions = gtk.FILL)
-        self.attach(attributes_scroll, 0, 3, 6, 7)
-
-    def clear(self):
-        '''Clear input widgets.'''
-        self.enabled_field.set_active(False)
-        self.value_field.set_text('')
-        self.value_check_field.set_active(False)
-        self.attributes_field.clear()
-        self.last_selected = None
-
-    def save_changed(self, tree):
-        '''Save data from input widgets to tree.'''
-        if self.last_selected is not None:
-            attributes = {}
-            i = self.attributes_field.iter_children(None)
-            while i is not None: # iterate over attributes
-                attributes[self.attributes_field.get_value(i, 0)] = \
-                    self.attributes_field.get_value(i, 1)
-                i = self.attributes_field.iter_next(i)
-            row = tree.get_model()[self.last_selected]
-            row[3] = self.enabled_field.get_active()
-            row[4] = self.value_field.get_text()
-            row[5] = self.value_check_field.get_active()
-            row[6] = attributes
-
-    def cursor_changed(self, tree):
-        '''Save data, and display data of current selected row.'''
-        self.save_changed(tree)
-
-        self.clear()
-
-        self.last_selected = current = self.get_selected(tree)
-        row = tree.get_model()[current]
-        self.enabled_field.set_active(row[3])
-        self.value_field.set_text(row[4])
-        self.value_check_field.set_active(row[5])
-        for attribute in row[6]:
-            self.attributes_field.append((attribute, row[6][attribute], ))
-
-    def get_selected(self, tree):
-        '''Get iterator of currently selected row.'''
-        model, selected = tree.get_selection().get_selected()
-        return selected
-
-    def make_def(self, tree):
-        '''Export all data as list of definitions.'''
-        self.save_changed(tree)
-        model = tree.get_model()
-        definitions = []
-        i = model.iter_children(None)
-        while i is not None: # iterate over options
-            definition = tree.make_def(i)
-            if definition is not None:
-                definitions.append(definition)
-            i = model.iter_next(i)
-        return definitions
-
-class DefinitionTreeView(gtk.TreeView):
-    def __init__(self):
-        gtk.TreeView.__init__(self, gtk.TreeStore(
-                gobject.TYPE_STRING, # option name
-                gobject.TYPE_STRING, # option tooltip
-                gobject.TYPE_BOOLEAN, # True if option is known
-                gobject.TYPE_BOOLEAN, # enabled
-                gobject.TYPE_STRING, # value
-                gobject.TYPE_BOOLEAN, # value_check
-                gobject.TYPE_PYOBJECT)) # attributes dict
-        model = self.get_model()
-        def name_edited_handler(cell, path, text, data):
-            model = data
-            row = model[path]
-            if not row[2]: # don't edit names of known options
-                row[0] = text
-        name_renderer = gtk.CellRendererText()
-        name_renderer.set_property('editable', True)
-        name_renderer.connect('edited', name_edited_handler, model)
-        name_column = gtk.TreeViewColumn('name')
-        name_column.pack_start(name_renderer)
-        name_column.add_attribute(name_renderer, 'text', 0)
-        self.append_column(name_column)
-        value_renderer = gtk.CellRendererText()
-        value_column = gtk.TreeViewColumn('value')
-        value_column.pack_start(value_renderer)
-        value_column.add_attribute(value_renderer, 'text', 4)
-        self.append_column(value_column)
-
-        self.scroll = gtk.ScrolledWindow()
-        self.scroll.set_policy(gtk.POLICY_AUTOMATIC, gtk.POLICY_AUTOMATIC)
-        self.scroll.set_shadow_type(gtk.SHADOW_OUT)
-        self.scroll.set_border_width(5)
-        self.scroll.add(self)
-
-        def show_tooltip(widget, x, y, keyboard_tip, tooltip):
-            if not widget.get_tooltip_context(x, y, keyboard_tip):
-                return False
-            else:
-                model, path, it = widget.get_tooltip_context(x, y, keyboard_tip)
-                tooltip.set_text(model[it][1])
-                widget.set_tooltip_row(tooltip, path)
-                return True
-        self.props.has_tooltip = True
-        self.connect("query-tooltip", show_tooltip)
-
-    def make_def(self, current):
-        '''Return row pointed by current exported as definition.'''
-        model = self.get_model()
-        row = model[current]
-        name = row[0]
-        enabled = row[3]
-        value = row[4]
-        value_check = row[5]
-        attributes = row[6]
-        if value_check:
-            attributes['value'] = value
-        if not enabled:
-            return None
-        i = model.iter_children(current)
-        if i is None:
-            return DefinitionElement(name, attributes)
-        else:
-            definitions = []
-            while i is not None: # iterate over children
-                definition = self.make_def(i)
-                if definition is not None:
-                    definitions.append(definition)
-                i = model.iter_next(i)
-            return DefinitionTree(name, definitions, attributes)
-
-    def make_clear(self):
-        '''Remove all sub-definitions, reset values of level-1 definitions.'''
-        model = self.get_model()
-        self.get_selection().unselect_all()
-        i = model.iter_children(None)
-        while i is not None: # iterate over options
-            row = model[i]
-            row[3] = False
-            row[4] = ''
-            row[5] = False
-            row[6] = {}
-            child = model.iter_children(i)
-            if child is not None: # remove node children
-                while model.remove(child):
-                    pass
-            i = model.iter_next(i)
-
-    def set_up(self, definitions, search):
-        '''Sets up model reading from given definition list. If search is True
-        will substitute alreaty present model data, if it is false will append
-        all the definitions.'''
-
-        def get_value_and_attributes(definition):
-            '''Get column values from definition instance.'''
-            name = definition.get_name()
-            enabled = True
-            try:
-                value = definition.get_attribute('value')
-                value_check = True
-            except KeyError:
-                value = ''
-                value_check = False
-            attributes = definition.get_attributes()
-            attributes.pop('value', None)
-            return (name, enabled, value, value_check, attributes, )
-
-        def add_children(parent, definition):
-            '''Insert sub-definitions of given definition as children of given
-            parent tree iterator.'''
-            if isinstance(definition, DefinitionTree):
-                for d in definition.get_definitions():
-                    name, enabled, value, value_check, attributes = \
-                        get_value_and_attributes(d)
-                    i = self.get_model().append(
-                        parent,
-                        (name, '', False, enabled, value, value_check,
-                         attributes, ))
-                    add_children(i, d)
-
-        model = self.get_model()
-        for definition in definitions:
-            name, enabled, value, value_check, attributes = \
-                get_value_and_attributes(definition)
-            if search:
-                i = model.iter_children(None) # find this option
-                while model[i][0] != name:
-                    i = model.iter_next(i)
-            else:
-                i = model.append(None,
-                                 (name, '', False, False, '', False, {}, ))
-            row = model[i]
-            row[3] = enabled
-            row[4] = value
-            row[5] = value_check
-            row[6] = attributes
-            add_children(i, definition)
diff --git a/misc/py_control_client/MyServer/GUI/GUIConfig.py b/misc/py_control_client/MyServer/GUI/GUIConfig.py
deleted file mode 100644
index fc14f6e..0000000
--- a/misc/py_control_client/MyServer/GUI/GUIConfig.py
+++ /dev/null
@@ -1,91 +0,0 @@
-# -*- coding: utf-8 -*-
-'''
-MyServer
-Copyright (C) 2009 Free Software Foundation, Inc.
-This program 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 3 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program.  If not, see <http://www.gnu.org/licenses/>.
-'''
-
-from gobject import TYPE_STRING, TYPE_BOOLEAN
-
-options = {}
-
-# Control
-options['control.enabled'] = ('Set this to yes if you want to enable control protocol.', 'bool', )
-options['control.admin'] = ('Set here the name for the control admin.', 'string', )
-options['control.password'] = ('Define here a good, strong password for the admin.', 'string', )
-
-# FTP
-options['ftp.allow_anonymous'] = ('Allow anonymous login.', 'bool', )
-options['ftp.anonymous_need_pass'] = ('If anonymous allowed, tells if needs pass.', 'bool', )
-options['ftp.allow_asynchronous_cmds'] = ('Allow asynchronous cmds like Abor, Quit, Stat.', 'bool', )
-options['ftp.allow_pipelining'] = ('Allow clients to send more than one command to server in one request.', 'bool', )
-options['ftp.allow_store'] = ('Allow clients to change server files.', 'bool', )
-
-# HTTP
-options['http.use_error_file'] = ('Set this to yes to use personalized error pages from system directory.', 'bool', )
-options['http.dir.css'] = ('Define the folder browsing style.', 'string', )
-options['http.use_home_directory'] = ('Enable home directory per user', 'bool', )
-options['http.home_directory'] = ('Define name for home directory browsing.', 'string', )
-options['http.default_file'] = ('Default filename to send in a directory if the file isn\'t in the path then the directory content is sent.', 'list', )
-
-# Server
-options['server.language'] = ('Choose the language to use for the server.', 'string', )
-options['server.verbosity'] = ('Verbosity on log file.', 'integer', )
-options['server.static_threads'] = ('Number of serving threads always active.', 'integer', )
-options['server.max_threads'] = ('Maximum number of serving threads that the scheduler can create.', 'integer', )
-options['server.buffer_size'] = ('Dimension of every buffer in bytes.', 'integer', )
-options['server.max_connections'] = ('Define the max number of connections to allow to server. 0 means allow infinite connections.', 'integer', )
-options['server.max_accepted_connections'] = ('Define max number of connections to accept.', 'integer', )
-options['server.max_log_size'] = ('Max size of the log file in bytes.', 'integer', )
-options['server.admin'] = ('Administrator e-mail.', 'string', )
-options['server.max_files_cache'] = ('Max cache size for static files.', 'integer', )
-options['server.max_file_cache'] = ('Max cache size for single static file.', 'integer', )
-options['server.min_file_cache'] = ('Min cache size for single static file.', 'integer', )
-options['server.max_servers'] = ('Maximum number of external servers that can be executed.', 'integer', )
-
-# Log color
-options['log_color.info_fg'] = ('Info log foreground colour.', 'string', )
-options['log_color.info_bg'] = ('Info log background colour.', 'string', )
-options['log_color.warning_fg'] = ('Warning log foreground colour.', 'string', )
-options['log_color.warning_bg'] = ('Warning log background colour.', 'string', )
-options['log_color.error_fg'] = ('Error log foreground colour.', 'string', )
-options['log_color.error_bg'] = ('Error log background colour.', 'string', )
-
-# Other
-options['connection.timeout'] = ('Timeout for every client\'s connected to server. If the client doesn\'t request anything for n seconds the connection with the client is closed. Set this to 0 if you don\'t want to use keep-alive-connections', 'integer', )
-options['gzip.threshold'] = ('Define the gzip compression threshold value.', 'integer', )
-options['symlinks.follow'] = ('Define if links should be followed.', 'bool', )
-
-# don't put 'other' or 'unknown' here
-tabs = ['server', 'control', 'ftp', 'http', 'log_color']
-
-# MIME types
-mime_name = 'mime'
-mime_attributes = ['handler', 'self_executed', 'param', 'path']
-mime_lists = ['extensions', 'filters']
-
-# VHosts
-vhost_name = 'name'
-vhost_attributes = ['port', 'protocol', 'doc_root', 'sys_root', 'private_key', 'certificate']
-vhost_lists = [
-    ('ip', (
-            ('ip', TYPE_STRING, '', ),
-            ),
-     ),
-     ('host', (
-            ('host name', TYPE_STRING, '', ),
-            ('use regexp', TYPE_BOOLEAN, False, ),
-            ),
-      ),
-    ]
diff --git a/misc/py_control_client/MyServer/GUI/MIMEWidgets.py b/misc/py_control_client/MyServer/GUI/MIMEWidgets.py
deleted file mode 100644
index 2f3ed7e..0000000
--- a/misc/py_control_client/MyServer/GUI/MIMEWidgets.py
+++ /dev/null
@@ -1,204 +0,0 @@
-# -*- coding: utf-8 -*-
-'''
-MyServer
-Copyright (C) 2009 Free Software Foundation, Inc.
-This program 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 3 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program.  If not, see <http://www.gnu.org/licenses/>.
-'''
-
-import gtk
-import gobject
-import GUIConfig
-from MyServer.pycontrollib.mimetypes import MIMEType
-
-class MimeTreeView(gtk.TreeView):
-    def __init__(self):
-        gtk.TreeView.__init__(self, gtk.ListStore(
-                gobject.TYPE_STRING, # mime name
-                gobject.TYPE_PYOBJECT, # mime single attributes
-                gobject.TYPE_PYOBJECT, # mime attribute lists
-                gobject.TYPE_PYOBJECT, # mime definitions
-                gobject.TYPE_PYOBJECT, # mime custom
-                gobject.TYPE_PYOBJECT)) # mime custom attrib
-        model = self.get_model()
-        def mime_edited_handler(cell, path, text, data):
-            model = data
-            model[path][0] = text
-        mime_renderer = gtk.CellRendererText()
-        mime_renderer.set_property('editable', True)
-        mime_renderer.connect('edited', mime_edited_handler, model)
-        mime_column = gtk.TreeViewColumn('MIME Type')
-        mime_column.pack_start(mime_renderer)
-        mime_column.add_attribute(mime_renderer, 'text', 0)
-        self.append_column(mime_column)
-
-        self.scroll = gtk.ScrolledWindow()
-        self.scroll.set_policy(gtk.POLICY_AUTOMATIC, gtk.POLICY_AUTOMATIC)
-        self.scroll.set_shadow_type(gtk.SHADOW_OUT)
-        self.scroll.set_border_width(5)
-        self.scroll.add(self)
-
-    def set_up(self, MIME_types):
-        '''Fill model with data provided as list of MIME types.'''
-        model = self.get_model()
-        for mime in MIME_types:
-            attributes = {}
-            for attribute in GUIConfig.mime_attributes:
-                a = getattr(mime, 'get_' + attribute)()
-                if a is not None:
-                    attributes[attribute] = (a, True, )
-            mime_lists = {}
-            for mime_list in GUIConfig.mime_lists:
-                mime_lists[mime_list] = getattr(mime, 'get_' + mime_list)()
-            model.append((getattr(mime, 'get_' + GUIConfig.mime_name)(),
-                          attributes,
-                          mime_lists,
-                          mime.get_definitions(),
-                          mime.custom,
-                          mime.custom_attrib, ))
-
-class MimeTable(gtk.Table):
-    def __init__(self, tree, def_tree, def_table):
-        gtk.Table.__init__(self, len(GUIConfig.mime_attributes) +
-                           3 * len(GUIConfig.mime_lists), 3)
-
-        tree.connect('cursor-changed', self.cursor_changed)
-        self.last_selected = None
-        self.def_tree = def_tree
-        self.def_table = def_table
-
-        self.attributes = {}
-        i = 0
-        for attribute in GUIConfig.mime_attributes:
-            label = gtk.Label(attribute)
-            entry = gtk.Entry()
-            check = gtk.CheckButton()
-            self.attributes[attribute] = (entry, check, )
-            self.attach(label, 0, 1, i, i + 1, yoptions = gtk.FILL)
-            self.attach(entry, 1, 2, i, i + 1, yoptions = gtk.FILL)
-            self.attach(check, 2, 3, i, i + 1, gtk.FILL, gtk.FILL)
-            i += 1
-        self.mime_lists = {}
-        for mime_list in GUIConfig.mime_lists:
-            tree = gtk.TreeView(gtk.ListStore(gobject.TYPE_STRING))
-            tree_model = tree.get_model()
-            def tree_edited_handler(cell, path, text, data):
-                model = data
-                model[path][0] = text
-            tree_renderer = gtk.CellRendererText()
-            tree_renderer.set_property('editable', True)
-            tree_renderer.connect('edited', tree_edited_handler, tree_model)
-            tree_column = gtk.TreeViewColumn(mime_list)
-            tree_column.pack_start(tree_renderer)
-            tree_column.add_attribute(tree_renderer, 'text', 0)
-            tree.append_column(tree_column)
-            tree_scroll = gtk.ScrolledWindow()
-            tree_scroll.set_policy(gtk.POLICY_AUTOMATIC, gtk.POLICY_AUTOMATIC)
-            tree_scroll.set_shadow_type(gtk.SHADOW_OUT)
-            tree_scroll.set_border_width(5)
-            tree_scroll.add(tree)
-
-            def add_to_tree(button, model):
-                model.append(('', ))
-            add_button = gtk.Button('Add')
-            add_button.connect('clicked', add_to_tree, tree_model)
-            def remove_from_tree(button, tree):
-                model, selected = tree.get_selection().get_selected()
-                if selected is not None:
-                    model.remove(selected)
-            remove_button = gtk.Button('Remove')
-            remove_button.connect('clicked', remove_from_tree, tree)
-
-            self.mime_lists[mime_list] = tree_model
-            self.attach(tree_scroll, 1, 2, i, i + 3)
-            self.attach(add_button, 0, 1, i, i + 1, yoptions = gtk.FILL)
-            self.attach(remove_button, 0, 1, i + 1, i + 2, yoptions = gtk.FILL)
-            self.attach(gtk.Label(), 0, 1, i + 2, i + 3)
-            i += 3
-
-    def remove_current(self, tree):
-        '''Remove currently selected MIME type.'''
-        if self.last_selected is not None:
-            model = tree.get_model()
-            model.remove(self.last_selected)
-            self.clear()
-
-    def clear(self):
-        '''Clear input widgets (including connected definition widgets).'''
-        for entry, check in self.attributes.itervalues():
-            entry.set_text('')
-            check.set_active(False)
-        for model in self.mime_lists.itervalues():
-            model.clear()
-        self.def_table.clear()
-        self.def_tree.get_model().clear()
-        self.last_selected = None
-
-    def save_changed(self, tree):
-        '''Save data from input widgets to model.'''
-        if self.last_selected is not None:
-            attributes = {}
-            for attribute in self.attributes:
-                entry, check = self.attributes[attribute]
-                attributes[attribute] = (entry.get_text(), check.get_active(), )
-            mime_lists = {}
-            for mime_list in GUIConfig.mime_lists:
-                container = mime_lists[mime_list] = []
-                model = self.mime_lists[mime_list]
-                i = model.iter_children(None)
-                while i is not None: # iterate over list elements
-                    container.append(model.get_value(i, 0))
-                    i = model.iter_next(i)
-            row = tree.get_model()[self.last_selected]
-            row[1] = attributes
-            row[2] = mime_lists
-            row[3] = self.def_table.make_def(self.def_tree)
-
-    def cursor_changed(self, tree):
-        self.save_changed(tree)
-
-        self.clear()
-
-        self.last_selected = current = tree.get_selection().get_selected()[1]
-        row = tree.get_model()[current]
-        for attribute in row[1]:
-            entry, check = self.attributes[attribute]
-            entry.set_text(row[1][attribute][0])
-            check.set_active(row[1][attribute][1])
-        for mime_list in row[2]:
-            model = self.mime_lists[mime_list]
-            for element in row[2][mime_list]:
-                model.append((element, ))
-        self.def_tree.set_up(row[3], False)
-
-    def make_def(self, tree):
-        '''Export all data as list of MIME types.'''
-        self.save_changed(tree)
-        model = tree.get_model()
-        mimes = []
-        i = model.iter_children(None)
-        while i is not None: # iterate over MIME types
-            row = model[i]
-            mime = MIMEType(row[0], definitions = row[3])
-            mime.custom = row[4]
-            mime.custom_attrib = row[5]
-            for attribute in row[1]:
-                text, enabled = row[1][attribute]
-                if enabled:
-                    getattr(mime, 'set_' + attribute)(text)
-            for mime_list in row[2]:
-                for entry in row[2][mime_list]:
-                    getattr(mime, 'add_' + mime_list[:-1])(entry)
-            mimes.append(mime)
-            i = model.iter_next(i)
-        return mimes
diff --git a/misc/py_control_client/MyServer/GUI/SecurityWidgets.py b/misc/py_control_client/MyServer/GUI/SecurityWidgets.py
deleted file mode 100644
index 9957fbe..0000000
--- a/misc/py_control_client/MyServer/GUI/SecurityWidgets.py
+++ /dev/null
@@ -1,732 +0,0 @@
-# -*- coding: utf-8 -*-
-'''
-MyServer
-Copyright (C) 2009 Free Software Foundation, Inc.
-This program 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 3 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program.  If not, see <http://www.gnu.org/licenses/>.
-'''
-
-import gtk
-import gobject
-from MyServer.pycontrollib.security import SecurityList, User, Return, \
-    Condition, Permission, SecurityElement
-from MyServer.pycontrollib.definition import DefinitionElement, DefinitionTree
-
-class SecurityTree(gtk.TreeView):
-    def __init__(self, security_table):
-        gtk.TreeView.__init__(self, gtk.TreeStore(
-                gobject.TYPE_STRING, # tag
-                gobject.TYPE_PYOBJECT)) # object
-        renderer = gtk.CellRendererText()
-        column = gtk.TreeViewColumn('tag')
-        column.pack_start(renderer)
-        column.add_attribute(renderer, 'text', 0)
-        self.append_column(column)
-
-        self.security_table = security_table
-
-        self.last_selected = None
-        self.connect('cursor-changed', self.cursor_changed)
-        
-        self.enable_model_drag_source(gtk.gdk.BUTTON1_MASK,
-                                      [('text/plain', 0, 0)],
-                                      gtk.gdk.ACTION_MOVE)
-        self.enable_model_drag_dest([('text/plain', gtk.TARGET_SAME_WIDGET, 0)],
-                                    gtk.gdk.ACTION_MOVE)
-        def get_data(tree, context, selection, target_id, etime):
-            model, selected = tree.get_selection().get_selected()
-            data = model.get_value(selected, 1)
-            selection.set(selection.target, 8, str(data))
-        self.connect('drag_data_get', get_data)
-        def data_received(tree, context, x, y, selection, info, etime):
-            model = tree.get_model()
-            try:
-                data = SecurityElement.from_string(selection.data)
-            except:
-                return # will fall if someone moves SECURITY
-            drop_info = tree.get_dest_row_at_pos(x, y)
-            if drop_info:
-                path, position = drop_info
-                it = model.get_iter(path)
-                if position in [gtk.TREE_VIEW_DROP_BEFORE,
-                                gtk.TREE_VIEW_DROP_AFTER]:
-                    parent_tag = model.get_value(model.iter_parent(it), 0)
-                else:
-                    parent_tag = model.get_value(it, 0)
-                # limit places where rows can be dropped
-                if not ((data.tag == 'DEFINE element' and
-                         parent_tag == 'DEFINE tree') or
-                        parent_tag in ['SECURITY', 'CONDITION']):
-                    return
-                if position == gtk.TREE_VIEW_DROP_BEFORE:
-                    model.insert_before(None, it, (data.tag, data, ))
-                elif position == gtk.TREE_VIEW_DROP_AFTER:
-                    model.insert_after(None, it, (data.tag, data, ))
-                else:
-                    model.append(it, (data.tag, data, ))
-            else:
-                return # drop on widget but not on any row
-            if context.action == gtk.gdk.ACTION_MOVE:
-                context.finish(True, True, etime)
-        self.connect('drag_data_received', data_received)
-
-        self.scroll = gtk.ScrolledWindow()
-        self.scroll.set_policy(gtk.POLICY_AUTOMATIC, gtk.POLICY_AUTOMATIC)
-        self.scroll.set_shadow_type(gtk.SHADOW_OUT)
-        self.scroll.set_border_width(5)
-        self.scroll.add(self)
-
-    def clear(self):
-        self.get_model().clear()
-        self.last_selected = None
-        self.get_model().append(None, ('SECURITY', SecurityList(), ))
-        self.security_table.empty_table.security_check.set_active(False)
-        self.security_table.switch_table('SECURITY')
-
-    def set_up(self, security_list):
-        def add_from_definition_tree(parent, model, definition):
-            for element in definition.get_definitions():
-                x = model.append(parent, (element.tag, element, ))
-                if element.tag == 'DEFINE tree':
-                    add_from_definition_tree(x, model, element)
-        def add_from_condition(parent, model, condition):
-            for element in condition.get_sub_elements():
-                x = model.append(parent, (element.tag, element, ))
-                if element.tag == 'CONDITION':
-                    add_from_condition(x, model, element)
-        self.security_table.empty_table.security_check.set_active(True)
-        self.security_table.switch_table('SECURITY')
-        model = self.get_model()
-        self.last_selected = None
-        model.clear()
-        parent = model.append(None, ('SECURITY', security_list))
-        for element in security_list.get_elements():
-            x = model.append(parent, (element.tag, element, ))
-            if element.tag == 'CONDITION':
-                add_from_condition(x, model, element)
-            elif element.tag == 'DEFINE tree':
-                add_from_definition_tree(x, model, element)
-
-    def save(self):
-        if self.last_selected is None:
-            return
-        model = self.get_model()
-        row = model[self.last_selected]
-        tag = row[0]
-        data = row[1]
-        if tag == 'USER':
-            table = self.security_table.user_table
-            if table.name_check.get_active():
-                data.set_name(table.name_entry.get_text())
-            else:
-                data.set_name(None)
-            if table.password_check.get_active():
-                data.set_password(table.password_entry.get_text())
-            else:
-                data.set_password(None)
-            combo = table.read_combo
-            value = combo.get_model()[combo.get_active()][0]
-            data.set_read(value == 'Yes' if value != 'empty' else None)
-            combo = table.execute_combo
-            value = combo.get_model()[combo.get_active()][0]
-            data.set_execute(value == 'Yes' if value != 'empty' else None)
-            combo = table.browse_combo
-            value = combo.get_model()[combo.get_active()][0]
-            data.set_browse(value == 'Yes'if value != 'empty' else None)
-            combo = table.delete_combo
-            value = combo.get_model()[combo.get_active()][0]
-            data.set_delete(value == 'Yes' if value != 'empty' else None)
-            combo = table.write_combo
-            value = combo.get_model()[combo.get_active()][0]
-            data.set_write(value == 'Yes' if value != 'empty' else None)
-        elif tag == 'CONDITION':
-            table = self.security_table.condition_table
-            if table.name_check.get_active():
-                data.set_name(table.name_entry.get_text())
-            else:
-                data.set_name(None)
-            if table.value_check.get_active():
-                data.set_value(table.value_entry.get_text())
-            else:
-                data.set_value(None)
-            combo = table.regex_combo
-            value = combo.get_model()[combo.get_active()][0]
-            data.set_regex(value == 'Yes' if value != 'empty' else None)
-            combo = table.reverse_combo
-            value = combo.get_model()[combo.get_active()][0]
-            data.set_reverse(value == 'Yes' if value != 'empty' else None)
-        elif tag == 'PERMISSION':
-            table = self.security_table.permission_table
-            combo = table.read_combo
-            value = combo.get_model()[combo.get_active()][0]
-            data.set_read(value == 'Yes' if value != 'empty' else None)
-            combo = table.execute_combo
-            value = combo.get_model()[combo.get_active()][0]
-            data.set_execute(value == 'Yes' if value != 'empty' else None)
-            combo = table.browse_combo
-            value = combo.get_model()[combo.get_active()][0]
-            data.set_browse(value == 'Yes'if value != 'empty' else None)
-            combo = table.delete_combo
-            value = combo.get_model()[combo.get_active()][0]
-            data.set_delete(value == 'Yes' if value != 'empty' else None)
-            combo = table.write_combo
-            value = combo.get_model()[combo.get_active()][0]
-            data.set_write(value == 'Yes' if value != 'empty' else None)
-        elif tag == 'RETURN':
-            table = self.security_table.return_table
-            combo = table.value_combo
-            value = combo.get_model()[combo.get_active()][0]
-            data.set_value(value if value != 'empty' else None)
-        elif tag == 'DEFINE element' or tag == 'DEFINE tree':
-            table = self.security_table.definition_table
-            if table.name_check.get_active():
-                data.set_name(table.name_entry.get_text())
-            else:
-                data.set_name(None)
-            variables = []
-            for variable in data.get_attributes():
-                variables.append(variable)
-            for variable in variables:
-                data.remove_attribute(variable)
-            model = table.attribute_tree.get_model()
-            i = model.iter_children(None)
-            while i is not None: # iterate over attributes
-                data.set_attribute(
-                    model.get_value(i, 0),
-                    model.get_value(i, 1))
-                i = model.iter_next(i)
-            if tag == 'DEFINE element':
-                if table.value_check.get_active():
-                    data.set_attribute('value', table.value_entry.get_text())
-
-    def update_gui(self, tag, data):
-        if tag == 'USER':
-            table = self.security_table.user_table
-            if data.get_name() is None:
-                table.name_check.set_active(False)
-                table.name_entry.set_text('')
-            else:
-                table.name_check.set_active(True)
-                table.name_entry.set_text(data.get_name())
-            if data.get_password() is None:
-                table.password_check.set_active(False)
-                table.password_entry.set_text('')
-            else:
-                table.password_check.set_active(True)
-                table.password_entry.set_text(data.get_password())
-            combo = table.read_combo
-            value =  2 if data.get_read() is None else int(not data.get_read())
-            combo.set_active(value)
-            combo = table.execute_combo
-            value =  2 if data.get_execute() is None else int(not data.get_execute())
-            combo.set_active(value)
-            combo = table.browse_combo
-            value =  2 if data.get_browse() is None else int(not data.get_browse())
-            combo.set_active(value)
-            combo = table.delete_combo
-            value =  2 if data.get_delete() is None else int(not data.get_delete())
-            combo.set_active(value)
-            combo = table.write_combo
-            value =  2 if data.get_write() is None else int(not data.get_write())
-            combo.set_active(value)
-        elif tag == 'CONDITION':
-            table = self.security_table.condition_table
-            if data.get_name() is None:
-                table.name_check.set_active(False)
-                table.name_entry.set_text('')
-            else:
-                table.name_check.set_active(True)
-                table.name_entry.set_text(data.get_name())
-            if data.get_value() is None:
-                table.value_check.set_active(False)
-                table.value_entry.set_text('')
-            else:
-                table.value_check.set_active(True)
-                table.value_entry.set_text(data.get_value())
-            combo = table.regex_combo
-            value =  2 if data.get_regex() is None else int(not data.get_regex())
-            combo.set_active(value)
-            combo = table.reverse_combo
-            value =  2 if data.get_reverse() is None else int(not data.get_reverse())
-            combo.set_active(value)
-        elif tag == 'PERMISSION':
-            table = self.security_table.permission_table
-            combo = table.read_combo
-            value =  2 if data.get_read() is None else int(not data.get_read())
-            combo.set_active(value)
-            combo = table.execute_combo
-            value =  2 if data.get_execute() is None else int(not data.get_execute())
-            combo.set_active(value)
-            combo = table.browse_combo
-            value =  2 if data.get_browse() is None else int(not data.get_browse())
-            combo.set_active(value)
-            combo = table.delete_combo
-            value =  2 if data.get_delete() is None else int(not data.get_delete())
-            combo.set_active(value)
-            combo = table.write_combo
-            value =  2 if data.get_write() is None else int(not data.get_write())
-            combo.set_active(value)
-        elif tag == 'RETURN':
-            table = self.security_table.return_table
-            combo = table.value_combo
-            value =  2 if data.get_value() is None else int(data.get_value() == 'DENY')
-            combo.set_active(value)
-        elif tag == 'DEFINE element' or tag == 'DEFINE tree':
-            table = self.security_table.definition_table
-            model = table.attribute_tree.get_model()
-            model.clear()
-            for variable, value in data.get_attributes().iteritems():
-                if variable != 'value':
-                    model.append((variable, value, ))
-            if data.get_name() is None:
-                table.name_check.set_active(False)
-                table.name_entry.set_text('')
-            else:
-                table.name_check.set_active(True)
-                table.name_entry.set_text(data.get_name())
-            if tag == 'DEFINE element':
-                try:
-                    table.value_check.set_active(True)
-                    table.value_entry.set_text(data.get_attribute('value'))
-                except KeyError:
-                    table.value_check.set_active(False)
-                    table.value_entry.set_text('')
-
-    def cursor_changed(self, tree):
-        self.save()
-
-        model, selected = tree.get_selection().get_selected()
-        self.last_selected = selected
-        row = model[selected]
-        self.security_table.switch_table(row[0])
-
-        self.update_gui(row[0], row[1])
-
-    def add_sub_element(self, tag):
-        model, selected = self.get_selection().get_selected()
-        if selected is None:
-            return
-        if tag == 'USER':
-            add = User()
-        elif tag == 'RETURN':
-            add = Return()
-        elif tag == 'CONDITION':
-            add = Condition()
-        elif tag == 'PERMISSION':
-            add = Permission()
-        elif tag == 'DEFINE element':
-            add = DefinitionElement()
-        elif tag == 'DEFINE tree':
-            add = DefinitionTree()
-        model.append(selected, (tag, add, ))
-
-    def remove_element(self):
-        model, selected = self.get_selection().get_selected()
-        model.remove(selected)
-        self.last_selected = None
-        self.security_table.switch_table('SECURITY')
-
-    def export(self):
-        def add_definition_tree(parent, i, model):
-            while len(parent.get_definitions()): # remove all children
-                parent.remove_definition(0)
-            i = model.iter_children(i)
-            while i is not None:
-                tag = model.get_value(i, 0)
-                data = model.get_value(i, 1)
-                parent.add_definition(data)
-                if tag == 'DEFINE tree':
-                    add_definition_tree(data, i, model)
-                i = model.iter_next(i)
-        def add_condition(parent, i, model):
-            while len(parent.get_sub_elements()): # remove all children
-                parent.remove_sub_element(0)
-            i = model.iter_children(i)
-            while i is not None:
-                tag = model.get_value(i, 0)
-                data = model.get_value(i, 1)
-                parent.add_sub_element(data)
-                if tag == 'DEFINE tree':
-                    add_definition_tree(data, i, model)
-                elif tag == 'CONDITION':
-                    add_condition(data, i, model)
-                i = model.iter_next(i)
-        self.save()
-        model = self.get_model()
-        i = model.iter_children(None)
-        security = model.get_value(i, 1)
-        while len(security.get_elements()): # remove all children
-            security.remove_element(0)
-        i = model.iter_children(i)
-        while i is not None:
-            tag = model.get_value(i, 0)
-            data = model.get_value(i, 1)
-            security.add_element(data)
-            if tag == 'DEFINE tree':
-                add_definition_tree(data, i, model)
-            elif tag == 'CONDITION':
-                add_condition(data, i, model)
-            i = model.iter_next(i)
-        return security
-
-class UserTable(gtk.Table):
-    def __init__(self, security_tree):
-        gtk.Table.__init__(self, 8, 3)
-
-        def remove_element(button, tree):
-            tree.remove_element()
-        button = gtk.Button('Remove this element')
-        button.connect('clicked', remove_element, security_tree)
-        self.attach(button, 0, 2, 0, 1, yoptions = gtk.FILL)
-
-        self.attach(gtk.Label('name'), 0, 1, 1, 2, gtk.FILL, gtk.FILL)
-        self.name_entry = gtk.Entry()
-        self.attach(self.name_entry, 1, 2, 1, 2, yoptions = gtk.FILL)
-        self.name_check = gtk.CheckButton()
-        self.attach(self.name_check, 2, 3, 1, 2, gtk.FILL, gtk.FILL)
-
-        self.attach(gtk.Label('password'), 0, 1, 2, 3, gtk.FILL, gtk.FILL)
-        self.password_entry = gtk.Entry()
-        self.attach(self.password_entry, 1, 2, 2, 3, yoptions = gtk.FILL)
-        self.password_check = gtk.CheckButton()
-        self.attach(self.password_check, 2, 3, 2, 3, gtk.FILL, gtk.FILL)
-
-        def add_options(combo):
-            combo.append_text('Yes')
-            combo.append_text('No')
-            combo.append_text('empty')
-
-        self.attach(gtk.Label('READ'), 0, 1, 3, 4, gtk.FILL, gtk.FILL)
-        self.read_combo = gtk.combo_box_new_text()
-        add_options(self.read_combo)
-        self.attach(self.read_combo, 1, 2, 3, 4, yoptions = gtk.FILL)
-
-        self.attach(gtk.Label('EXECUTE'), 0, 1, 4, 5, gtk.FILL, gtk.FILL)
-        self.execute_combo = gtk.combo_box_new_text()
-        add_options(self.execute_combo)
-        self.attach(self.execute_combo, 1, 2, 4, 5, yoptions = gtk.FILL)
-
-        self.attach(gtk.Label('BROWSE'), 0, 1, 5, 6, gtk.FILL, gtk.FILL)
-        self.browse_combo = gtk.combo_box_new_text()
-        add_options(self.browse_combo)
-        self.attach(self.browse_combo, 1, 2, 5, 6, yoptions = gtk.FILL)
-
-        self.attach(gtk.Label('DELETE'), 0, 1, 6, 7, gtk.FILL, gtk.FILL)
-        self.delete_combo = gtk.combo_box_new_text()
-        add_options(self.delete_combo)
-        self.attach(self.delete_combo, 1, 2, 6, 7, yoptions = gtk.FILL)
-
-        self.attach(gtk.Label('WRITE'), 0, 1, 7, 8, gtk.FILL, gtk.FILL)
-        self.write_combo = gtk.combo_box_new_text()
-        add_options(self.write_combo)
-        self.attach(self.write_combo, 1, 2, 7, 8, yoptions = gtk.FILL)
-
-class ConditionTable(gtk.Table):
-    def __init__(self, security_tree):
-        gtk.Table.__init__(self, 6, 3)
-
-        def remove_element(button, tree):
-            tree.remove_element()
-        button = gtk.Button('Remove this element')
-        button.connect('clicked', remove_element, security_tree)
-        self.attach(button, 0, 2, 0, 1, yoptions = gtk.FILL)
-
-        self.attach(gtk.Label('name'), 0, 1, 1, 2, gtk.FILL, gtk.FILL)
-        self.name_entry = gtk.Entry()
-        self.attach(self.name_entry, 1, 2, 1, 2, yoptions = gtk.FILL)
-        self.name_check = gtk.CheckButton()
-        self.attach(self.name_check, 2, 3, 1, 2, gtk.FILL, gtk.FILL)
-
-        self.attach(gtk.Label('value'), 0, 1, 2, 3, gtk.FILL, gtk.FILL)
-        self.value_entry = gtk.Entry()
-        self.attach(self.value_entry, 1, 2, 2, 3, yoptions = gtk.FILL)
-        self.value_check = gtk.CheckButton()
-        self.attach(self.value_check, 2, 3, 2, 3, gtk.FILL, gtk.FILL)
-
-        def add_options(combo):
-            combo.append_text('Yes')
-            combo.append_text('No')
-            combo.append_text('empty')
-
-        self.attach(gtk.Label('regex'), 0, 1, 3, 4, gtk.FILL, gtk.FILL)
-        self.regex_combo = gtk.combo_box_new_text()
-        add_options(self.regex_combo)
-        self.attach(self.regex_combo, 1, 2, 3, 4, yoptions = gtk.FILL)
-
-        self.attach(gtk.Label('reverse'), 0, 1, 4, 5, gtk.FILL, gtk.FILL)
-        self.reverse_combo = gtk.combo_box_new_text()
-        add_options(self.reverse_combo)
-        self.attach(self.reverse_combo, 1, 2, 4, 5, yoptions = gtk.FILL)
-
-        def add_sub_element(button, combo, tree):
-            tag = combo.get_model()[combo.get_active()][0]
-            tree.add_sub_element(tag)
-        self.add_sub_element_button = gtk.Button('Add sub-element')
-        self.attach(self.add_sub_element_button, 0, 1, 5, 6, gtk.FILL, gtk.FILL)
-        self.add_sub_element_combo = gtk.combo_box_new_text()
-        self.add_sub_element_combo.append_text('USER')
-        self.add_sub_element_combo.append_text('CONDITION')
-        self.add_sub_element_combo.append_text('PERMISSION')
-        self.add_sub_element_combo.append_text('RETURN')
-        self.add_sub_element_combo.append_text('DEFINE element')
-        self.add_sub_element_combo.append_text('DEFINE tree')
-        self.add_sub_element_combo.set_active(0)
-        self.attach(self.add_sub_element_combo, 1, 2, 5, 6, gtk.FILL, gtk.FILL)
-        self.add_sub_element_button.connect('clicked', add_sub_element,
-                                            self.add_sub_element_combo,
-                                            security_tree)
-
-class PermissionTable(gtk.Table):
-    def __init__(self, security_tree):
-        gtk.Table.__init__(self, 6, 2)
-
-        def remove_element(button, tree):
-            tree.remove_element()
-        button = gtk.Button('Remove this element')
-        button.connect('clicked', remove_element, security_tree)
-        self.attach(button, 0, 2, 0, 1, yoptions = gtk.FILL)
-
-        def add_options(combo):
-            combo.append_text('Yes')
-            combo.append_text('No')
-            combo.append_text('empty')
-
-        self.attach(gtk.Label('READ'), 0, 1, 1, 2, gtk.FILL, gtk.FILL)
-        self.read_combo = gtk.combo_box_new_text()
-        add_options(self.read_combo)
-        self.attach(self.read_combo, 1, 2, 1, 2, yoptions = gtk.FILL)
-
-        self.attach(gtk.Label('EXECUTE'), 0, 1, 2, 3, gtk.FILL, gtk.FILL)
-        self.execute_combo = gtk.combo_box_new_text()
-        add_options(self.execute_combo)
-        self.attach(self.execute_combo, 1, 2, 2, 3, yoptions = gtk.FILL)
-
-        self.attach(gtk.Label('BROWSE'), 0, 1, 3, 4, gtk.FILL, gtk.FILL)
-        self.browse_combo = gtk.combo_box_new_text()
-        add_options(self.browse_combo)
-        self.attach(self.browse_combo, 1, 2, 3, 4, yoptions = gtk.FILL)
-
-        self.attach(gtk.Label('DELETE'), 0, 1, 4, 5, gtk.FILL, gtk.FILL)
-        self.delete_combo = gtk.combo_box_new_text()
-        add_options(self.delete_combo)
-        self.attach(self.delete_combo, 1, 2, 4, 5, yoptions = gtk.FILL)
-
-        self.attach(gtk.Label('WRITE'), 0, 1, 5, 6, gtk.FILL, gtk.FILL)
-        self.write_combo = gtk.combo_box_new_text()
-        add_options(self.write_combo)
-        self.attach(self.write_combo, 1, 2, 5, 6, yoptions = gtk.FILL)
-
-class ReturnTable(gtk.Table):
-    def __init__(self, security_tree):
-        gtk.Table.__init__(self, 2, 2)
-
-        def remove_element(button, tree):
-            tree.remove_element()
-        button = gtk.Button('Remove this element')
-        button.connect('clicked', remove_element, security_tree)
-        self.attach(button, 0, 2, 0, 1, yoptions = gtk.FILL)
-
-        self.attach(gtk.Label('value'), 0, 1, 1, 2, gtk.FILL, gtk.FILL)
-        self.value_combo = gtk.combo_box_new_text()
-        self.value_combo.append_text('ALLOW')
-        self.value_combo.append_text('DENY')
-        self.value_combo.append_text('empty')
-        self.attach(self.value_combo, 1, 2, 1, 2, yoptions = gtk.FILL)
-
-class DefinitionTable(gtk.Table):
-    def __init__(self, security_tree):
-        gtk.Table.__init__(self, 7, 3)
-
-        def remove_element(button, tree):
-            tree.remove_element()
-        button = gtk.Button('Remove this element')
-        button.connect('clicked', remove_element, security_tree)
-        self.attach(button, 0, 2, 0, 1, yoptions = gtk.FILL)
-
-        def add_sub_element(button, combo, tree):
-            tag = combo.get_model()[combo.get_active()][0]
-            tree.add_sub_element(tag)
-        self.add_sub_element_button = gtk.Button('Add sub-element')
-        self.attach(self.add_sub_element_button, 0, 1, 1, 2, gtk.FILL, gtk.FILL)
-        self.add_sub_element_combo = gtk.combo_box_new_text()
-        self.add_sub_element_combo.append_text('DEFINE element')
-        self.add_sub_element_combo.append_text('DEFINE tree')
-        self.add_sub_element_combo.set_active(0)
-        self.attach(self.add_sub_element_combo, 1, 2, 1, 2, gtk.FILL, gtk.FILL)
-        self.add_sub_element_button.connect('clicked', add_sub_element,
-                                            self.add_sub_element_combo,
-                                            security_tree)
-
-        self.attach(gtk.Label('name'), 0, 1, 2, 3, gtk.FILL, gtk.FILL)
-        self.name_entry = gtk.Entry()
-        self.attach(self.name_entry, 1, 2, 2, 3, yoptions = gtk.FILL)
-        self.name_check = gtk.CheckButton()
-        self.attach(self.name_check, 2, 3, 2, 3, gtk.FILL, gtk.FILL)
-
-        self.value_label = gtk.Label('value')
-        self.attach(self.value_label, 0, 1, 3, 4, gtk.FILL, gtk.FILL)
-        self.value_entry = gtk.Entry()
-        self.attach(self.value_entry, 1, 2, 3, 4, yoptions = gtk.FILL)
-        self.value_check = gtk.CheckButton()
-        self.attach(self.value_check, 2, 3, 3, 4, gtk.FILL, gtk.FILL)
-
-        self.attribute_tree = gtk.TreeView(gtk.ListStore(
-                gobject.TYPE_STRING, # variable
-                gobject.TYPE_STRING)) # value
-        model = self.attribute_tree.get_model()
-        def edited_handler(cell, path, text, data):
-            model, col = data
-            model[path][col] = text
-        renderer = gtk.CellRendererText()
-        renderer.set_property('editable', True)
-        renderer.connect('edited', edited_handler, (model, 0, ))
-        column = gtk.TreeViewColumn('variable')
-        column.pack_start(renderer)
-        column.add_attribute(renderer, 'text', 0)
-        self.attribute_tree.append_column(column)
-        renderer = gtk.CellRendererText()
-        renderer.set_property('editable', True)
-        renderer.connect('edited', edited_handler, (model, 1, ))
-        column = gtk.TreeViewColumn('value')
-        column.pack_start(renderer)
-        column.add_attribute(renderer, 'text', 1)
-        self.attribute_tree.append_column(column)
-        scroll = gtk.ScrolledWindow()
-        scroll.set_policy(gtk.POLICY_AUTOMATIC, gtk.POLICY_AUTOMATIC)
-        scroll.set_shadow_type(gtk.SHADOW_OUT)
-        scroll.set_border_width(5)
-        scroll.add(self.attribute_tree)
-        self.attach(scroll, 0, 2, 6, 7)
-
-        def add_attribute(button, model):
-            model.append(('', '', ))
-        add_button = gtk.Button('add')
-        add_button.connect('clicked', add_attribute, model)
-        self.attach(add_button, 0, 2, 4, 5, gtk.FILL, gtk.FILL)
-
-        def remove_attribute(button, tree):
-            model, selected = tree.get_selection().get_selected()
-            if selected is not None:
-                model.remove(selected)
-        remove_button = gtk.Button('remove')
-        remove_button.connect('clicked', remove_attribute, self.attribute_tree)
-        self.attach(remove_button, 0, 2, 5, 6, gtk.FILL, gtk.FILL)
-
-    def set_tree(self, tree):
-        if tree:
-            self.add_sub_element_button.show()
-            self.add_sub_element_combo.show()
-            self.value_label.hide()
-            self.value_entry.hide()
-            self.value_check.hide()
-        else:
-            self.add_sub_element_button.hide()
-            self.add_sub_element_combo.hide()
-            self.value_label.show()
-            self.value_entry.show()
-            self.value_check.show()
-
-class EmptyTable(gtk.Table):
-    def __init__(self, security_tree):
-        gtk.Table.__init__(self, 2, 2)
-
-        self.attach(gtk.Label('Use security file'), 0, 1, 0, 1, gtk.FILL, gtk.FILL)
-        self.security_check = gtk.CheckButton()
-        self.attach(self.security_check, 1, 2, 0, 1, yoptions = gtk.FILL)
-
-        def add_sub_element(button, combo, tree):
-            tag = combo.get_model()[combo.get_active()][0]
-            tree.add_sub_element(tag)
-        self.add_sub_element_button = gtk.Button('Add sub-element')
-        self.attach(self.add_sub_element_button, 0, 1, 1, 2, gtk.FILL, gtk.FILL)
-        self.add_sub_element_combo = gtk.combo_box_new_text()
-        self.add_sub_element_combo.append_text('USER')
-        self.add_sub_element_combo.append_text('CONDITION')
-        self.add_sub_element_combo.append_text('PERMISSION')
-        self.add_sub_element_combo.append_text('RETURN')
-        self.add_sub_element_combo.append_text('DEFINE element')
-        self.add_sub_element_combo.append_text('DEFINE tree')
-        self.add_sub_element_combo.set_active(0)
-        self.attach(self.add_sub_element_combo, 1, 2, 1, 2, gtk.FILL, gtk.FILL)
-        self.add_sub_element_button.connect('clicked', add_sub_element,
-                                            self.add_sub_element_combo,
-                                            security_tree)
-
-class SecurityTable(gtk.Table):
-    def __init__(self):
-        gtk.Table.__init__(self, 1, 2)
-
-        self.security_tree = SecurityTree(self)
-
-        self.empty_table = EmptyTable(self.security_tree)
-        self.user_table = UserTable(self.security_tree)
-        self.condition_table = ConditionTable(self.security_tree)
-        self.permission_table = PermissionTable(self.security_tree)
-        self.return_table = ReturnTable(self.security_tree)
-        self.definition_table = DefinitionTable(self.security_tree)
-        self.table_notebook = gtk.Notebook()
-        self.table_notebook.append_page(self.empty_table)
-        self.table_notebook.append_page(self.user_table)
-        self.table_notebook.append_page(self.condition_table)
-        self.table_notebook.append_page(self.permission_table)
-        self.table_notebook.append_page(self.return_table)
-        self.table_notebook.append_page(self.definition_table)
-        self.table_notebook.set_show_tabs(False)
-
-        self.attach(self.security_tree.scroll, 0, 1, 0, 1)
-        self.attach(self.table_notebook, 1, 2, 0, 1, gtk.FILL)
-
-    def read_from_file(self, browser):
-        self.switch_table('SECURITY')
-        self.security_tree.clear()
-        try:
-            security = SecurityList.from_string(
-                browser.get_file('security.xml'))
-            self.security_tree.set_up(security)
-        except:
-            self.security_tree.clear()
-
-    def write_to_file(self, browser):
-        if self.empty_table.security_check.get_active():
-            security = self.security_tree.export()
-            browser.put_file('security.xml', str(security))
-        else:
-            try:
-                browser.remove_file('security.xml')
-            except OSError: # file does not exist
-                pass
-
-    def switch_table(self, tag):
-        if tag == 'SECURITY':
-            self.current_table = self.empty_table
-            self.table_notebook.set_current_page(0)
-        elif tag == 'USER':
-            self.current_table = self.user_table
-            self.table_notebook.set_current_page(1)
-        elif tag == 'CONDITION':
-            self.current_table = self.condition_table
-            self.table_notebook.set_current_page(2)
-        elif tag == 'PERMISSION':
-            self.current_table = self.permission_table
-            self.table_notebook.set_current_page(3)
-        elif tag == 'RETURN':
-            self.current_table = self.return_table
-            self.table_notebook.set_current_page(4)
-        elif tag == 'DEFINE element':
-            self.current_table = self.definition_table
-            self.definition_table.set_tree(False)
-            self.table_notebook.set_current_page(5)
-        elif tag == 'DEFINE tree':
-            self.current_table = self.definition_table
-            self.definition_table.set_tree(True)
-            self.table_notebook.set_current_page(5)
diff --git a/misc/py_control_client/MyServer/GUI/VHostWidgets.py b/misc/py_control_client/MyServer/GUI/VHostWidgets.py
deleted file mode 100644
index 165b1df..0000000
--- a/misc/py_control_client/MyServer/GUI/VHostWidgets.py
+++ /dev/null
@@ -1,515 +0,0 @@
-# -*- coding: utf-8 -*-
-'''
-MyServer
-Copyright (C) 2009 Free Software Foundation, Inc.
-This program 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 3 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program.  If not, see <http://www.gnu.org/licenses/>.
-'''
-
-import gtk
-import gobject
-import GUIConfig
-from MyServer.pycontrollib.log import Log, Stream
-from MyServer.pycontrollib.vhost import VHost
-
-class FilterTreeView(gtk.TreeView):
-    def __init__(self):
-        gtk.TreeView.__init__(self, gtk.ListStore(
-                gobject.TYPE_STRING))
-        model = self.get_model()
-        def edited_handler(cell, path, text, model):
-            model[path][0] = text
-        renderer = gtk.CellRendererText()
-        renderer.set_property('editable', True)
-        renderer.connect('edited', edited_handler, model)
-        column = gtk.TreeViewColumn('Filter')
-        column.pack_start(renderer)
-        column.add_attribute(renderer, 'text', 0)
-        self.append_column(column)
-        self.scroll = gtk.ScrolledWindow()
-        self.scroll.set_policy(gtk.POLICY_AUTOMATIC, gtk.POLICY_AUTOMATIC)
-        self.scroll.set_shadow_type(gtk.SHADOW_OUT)
-        self.scroll.set_border_width(5)
-        self.scroll.add(self)
-
-class StreamTreeView(gtk.TreeView):
-    def __init__(self, filter_tree, cycle, cycle_gzip):
-        gtk.TreeView.__init__(self, gtk.ListStore(
-                gobject.TYPE_STRING, # stream location
-                gobject.TYPE_PYOBJECT, # list of filters
-                gobject.TYPE_PYOBJECT, # (cycle, cycle active, )
-                gobject.TYPE_BOOLEAN, # cycle_gzip
-                gobject.TYPE_PYOBJECT, # stream custom
-                gobject.TYPE_PYOBJECT)) # stream custom attrib
-        self.cycle = cycle
-        self.cycle_gzip = cycle_gzip
-        self.filter_model = filter_tree.get_model()
-        model = self.get_model()
-        def edited_handler(cell, path, text, model):
-            model[path][0] = text
-        renderer = gtk.CellRendererText()
-        renderer.set_property('editable', True)
-        renderer.connect('edited', edited_handler, model)
-        column = gtk.TreeViewColumn('Stream')
-        column.pack_start(renderer)
-        column.add_attribute(renderer, 'text', 0)
-        self.append_column(column)
-
-        self.scroll = gtk.ScrolledWindow()
-        self.scroll.set_policy(gtk.POLICY_AUTOMATIC, gtk.POLICY_AUTOMATIC)
-        self.scroll.set_shadow_type(gtk.SHADOW_OUT)
-        self.scroll.set_border_width(5)
-        self.scroll.add(self)
-
-        self.last_selected = None
-        self.connect('cursor-changed', self.cursor_changed)
-
-    def clear(self):
-        self.filter_model.clear()
-        self.last_selected = None
-        entry, check = self.cycle
-        entry.set_value(0)
-        check.set_active(False)
-        self.cycle_gzip.set_active(False)
-
-    def save_changed(self):
-        model = self.filter_model
-        if self.last_selected is not None:
-            filters = []
-            i = model.iter_children(None)
-            while i is not None: # iterate over filters
-                filters.append(model[i][0])
-                i = model.iter_next(i)
-            row = self.get_model()[self.last_selected]
-            row[1] = filters
-            entry, check = self.cycle
-            row[2] = (entry.get_value(), check.get_active(), )
-            row[3] = self.cycle_gzip.get_active()
-
-    def cursor_changed(self, tree):
-        self.save_changed()
-
-        self.clear()
-        model = self.filter_model
-
-        self.last_selected = current = \
-            tree.get_selection().get_selected()[1]
-        row = tree.get_model()[current]
-        for element in row[1]: # add all filters
-            model.append((element, ))
-        entry, check = self.cycle
-        entry.set_value(row[2][0])
-        check.set_active(row[2][1])
-        self.cycle_gzip.set_active(row[3])
-
-class LogTreeView(gtk.TreeView):
-    def __init__(self, stream_tree, log_type):
-        gtk.TreeView.__init__(self, gtk.ListStore(
-                gobject.TYPE_STRING, # log name
-                gobject.TYPE_PYOBJECT, # list of streams
-                gobject.TYPE_PYOBJECT, # (log_type, log_type enabled, )
-                gobject.TYPE_PYOBJECT, # log custom
-                gobject.TYPE_PYOBJECT)) # log custom attrib
-        self.stream_tree = stream_tree
-        self.log_type = log_type
-        model = self.get_model()
-        def edited_handler(cell, path, text, model):
-            model[path][0] = text
-        renderer = gtk.CellRendererText()
-        renderer.set_property('editable', True)
-        renderer.connect('edited', edited_handler, model)
-        column = gtk.TreeViewColumn('Log')
-        column.pack_start(renderer)
-        column.add_attribute(renderer, 'text', 0)
-        self.append_column(column)
-        self.scroll = gtk.ScrolledWindow()
-        self.scroll.set_policy(gtk.POLICY_AUTOMATIC, gtk.POLICY_AUTOMATIC)
-        self.scroll.set_shadow_type(gtk.SHADOW_OUT)
-        self.scroll.set_border_width(5)
-        self.scroll.add(self)
-
-        self.last_selected = None
-        self.connect('cursor-changed', self.cursor_changed)
-
-    def clear(self):
-        self.stream_tree.clear()
-        self.last_selected = None
-        self.stream_tree.get_model().clear()
-        entry, check = self.log_type
-        entry.set_text('')
-        check.set_active(False)
-
-    def save_changed(self):
-        self.stream_tree.save_changed()
-        model = self.stream_tree.get_model()
-        if self.last_selected is not None:
-            streams = []
-            i = model.iter_children(None)
-            while i is not None: # iterate over streams
-                row = model[i]
-                streams.append((row[0], row[1], row[2], row[3], row[4], row[5], ))
-                i = model.iter_next(i)
-            row = self.get_model()[self.last_selected]
-            row[1] = streams
-            entry, check = self.log_type
-            row[2] = (entry.get_text(), check.get_active(), )
-
-    def cursor_changed(self, tree):
-        self.save_changed()
-
-        self.clear()
-        model = self.stream_tree.get_model()
-
-        self.last_selected = current = \
-            tree.get_selection().get_selected()[1]
-        row = tree.get_model()[current]
-        for stream in row[1]:
-            model.append(stream)
-        entry, check = self.log_type
-        entry.set_text(row[2][0])
-        check.set_active(row[2][1])
-
-    def get_logs(self):
-        self.save_changed()
-        model = self.get_model()
-        logs = []
-        i = model.iter_children(None)
-        while i is not None: # iterate over logs
-            row = model[i]
-            logs.append((row[0], row[1], row[2], row[3], row[4], ))
-            i = model.iter_next(i)
-        return logs
-
-    def set_logs(self, logs):
-        self.clear()
-        self.last_selected = None
-        model = self.get_model()
-        model.clear()
-        for log in logs:
-            model.append((log[0], log[1], log[2], log[3], log[4], ))
-
-class VHostTreeView(gtk.TreeView):
-    def __init__(self):
-        gtk.TreeView.__init__(self, gtk.ListStore(
-                gobject.TYPE_STRING, # vhost name
-                gobject.TYPE_PYOBJECT, # vhost single attributes
-                gobject.TYPE_PYOBJECT, # vhost attribute lists
-                gobject.TYPE_PYOBJECT, # vhost logs
-                gobject.TYPE_PYOBJECT, # vhost custom
-                gobject.TYPE_PYOBJECT)) # vhost custom attrib
-        model = self.get_model()
-        def vhost_edited_handler(cell, path, text, data):
-            model = data
-            model[path][0] = text
-        vhost_renderer = gtk.CellRendererText()
-        vhost_renderer.set_property('editable', True)
-        vhost_renderer.connect('edited', vhost_edited_handler, model)
-        vhost_column = gtk.TreeViewColumn('VHost')
-        vhost_column.pack_start(vhost_renderer)
-        vhost_column.add_attribute(vhost_renderer, 'text', 0)
-        self.append_column(vhost_column)
-
-        self.scroll = gtk.ScrolledWindow()
-        self.scroll.set_policy(gtk.POLICY_AUTOMATIC, gtk.POLICY_AUTOMATIC)
-        self.scroll.set_shadow_type(gtk.SHADOW_OUT)
-        self.scroll.set_border_width(5)
-        self.scroll.add(self)
-
-    def set_up(self, vhosts):
-        '''Fill model with data provided as list of Vhosts.'''
-        model = self.get_model()
-        for vhost in vhosts:
-            attributes = {}
-            for attribute in GUIConfig.vhost_attributes:
-                a = getattr(vhost, 'get_' + attribute)()
-                if a is not None:
-                    attributes[attribute] = (str(a), True, )
-            vhost_lists = {}
-            for vhost_list in GUIConfig.vhost_lists:
-                vhost_list = vhost_list[0]
-                l = getattr(vhost, 'get_' + vhost_list)()
-                m = []
-                for element in l:
-                    if isinstance(l, dict):
-                        m.append((element, l[element], ))
-                    else:
-                        m.append((element, ))
-                vhost_lists[vhost_list] = m
-            logs = []
-            for log in vhost.get_logs():
-                streams = []
-                for stream in log.get_streams():
-                    filters = stream.get_filters()
-                    cycle = stream.get_cycle()
-                    cycle_active = cycle is not None
-                    if cycle is None:
-                        cycle = ''
-                    cycle_gzip = stream.get_cycle_gzip()
-                    streams.append((stream.get_location(), filters,
-                                    (cycle, cycle_active, ), cycle_gzip,
-                                    stream.custom, stream.custom_attrib, ))
-                log_type = log.get_type()
-                log_type_enabled = log_type is not None
-                if log_type is None:
-                    log_type = ''
-                logs.append((log.get_log_type(), streams,
-                             (log_type, log_type_enabled, ), log.custom,
-                             log.custom_attrib, ))
-            model.append((getattr(vhost, 'get_' + GUIConfig.vhost_name)(),
-                          attributes,
-                          vhost_lists,
-                          logs,
-                          vhost.custom,
-                          vhost.custom_attrib, ))
-
-class VHostTable(gtk.Table):
-    def __init__(self, tree):
-        gtk.Table.__init__(self, len(GUIConfig.vhost_attributes) +
-                           3 * len(GUIConfig.vhost_lists) + 6, 3)
-
-        tree.connect('cursor-changed', self.cursor_changed)
-        self.last_selected = None
-
-        self.attributes = {}
-        i = 0
-        for attribute in GUIConfig.vhost_attributes: # Add single attributes
-            label = gtk.Label(attribute)
-            entry = gtk.Entry()
-            check = gtk.CheckButton()
-            self.attributes[attribute] = (entry, check, )
-            self.attach(label, 0, 1, i, i + 1, yoptions = gtk.FILL)
-            self.attach(entry, 1, 2, i, i + 1, yoptions = gtk.FILL)
-            self.attach(check, 2, 3, i, i + 1, gtk.FILL, gtk.FILL)
-            i += 1
-
-        self.vhost_lists = {}
-        for vhost_list in GUIConfig.vhost_lists: # Add attribute lists
-            name = vhost_list[0]
-            column_names = []
-            columns = []
-            defaults = []
-            for element in vhost_list[1]:
-                column_names.append(element[0])
-                columns.append(element[1])
-                defaults.append(element[2])
-            tree = gtk.TreeView(gtk.ListStore(*(columns)))
-            tree_model = tree.get_model()
-            def tree_edited_handler(cell, path, text, data):
-                model, col_index = data
-                model[path][col_index] = text
-            col_index = 0
-            for column in column_names:
-                tree_renderer = gtk.CellRendererText()
-                tree_renderer.set_property('editable', True)
-                tree_renderer.connect('edited', tree_edited_handler,
-                                      (tree_model, col_index, ))
-                tree_column = gtk.TreeViewColumn(column)
-                tree_column.pack_start(tree_renderer)
-                tree_column.add_attribute(tree_renderer, 'text', col_index)
-                tree.append_column(tree_column)
-                col_index += 1
-            tree_scroll = gtk.ScrolledWindow()
-            tree_scroll.set_policy(gtk.POLICY_AUTOMATIC, gtk.POLICY_AUTOMATIC)
-            tree_scroll.set_shadow_type(gtk.SHADOW_OUT)
-            tree_scroll.set_border_width(5)
-            tree_scroll.add(tree)
-
-            def add_to_tree(button, data):
-                model, defaults = data
-                model.append(defaults)
-            add_button = gtk.Button('Add')
-            add_button.connect('clicked', add_to_tree, (tree_model, defaults, ))
-            def remove_from_tree(button, tree):
-                model, selected = tree.get_selection().get_selected()
-                if selected is not None:
-                    model.remove(selected)
-            remove_button = gtk.Button('Remove')
-            remove_button.connect('clicked', remove_from_tree, tree)
-
-            self.vhost_lists[name] = tree_model
-            self.attach(tree_scroll, 1, 2, i, i + 3)
-            self.attach(add_button, 0, 1, i, i + 1, yoptions = gtk.FILL)
-            self.attach(remove_button, 0, 1, i + 1, i + 2, yoptions = gtk.FILL)
-            self.attach(gtk.Label(), 0, 1, i + 2, i + 3)
-            i += 3
-
-        # Add logs
-        log_type_label = gtk.Label('log type')
-        log_type_entry = gtk.Entry()
-        log_type_check = gtk.CheckButton()
-        self.attach(log_type_label, 0, 1, i + 3, i + 4, yoptions = gtk.FILL)
-        self.attach(log_type_entry, 1, 2, i + 3, i + 4, yoptions = gtk.FILL)
-        self.attach(log_type_check, 2, 3, i + 3, i + 4, gtk.FILL, gtk.FILL)
-
-        cycle_label = gtk.Label('cycle')
-        cycle_entry = gtk.SpinButton(gtk.Adjustment(upper = 2 ** 32,
-                                                    step_incr = 1))
-        cycle_check = gtk.CheckButton()
-        cycle_gzip_label = gtk.Label('cycle gzip')
-        cycle_gzip_check = gtk.CheckButton()
-        self.attach(cycle_label, 0, 1, i + 4, i + 5, yoptions = gtk.FILL)
-        self.attach(cycle_entry, 1, 2, i + 4, i + 5, yoptions = gtk.FILL)
-        self.attach(cycle_check, 2, 3, i + 4, i + 5, gtk.FILL, gtk.FILL)
-        self.attach(cycle_gzip_label, 0, 1, i + 5, i + 6, yoptions = gtk.FILL)
-        self.attach(cycle_gzip_check, 2, 3, i + 5, i + 6, gtk.FILL, gtk.FILL)
-
-        filter_tree = FilterTreeView()
-        stream_tree = StreamTreeView(filter_tree,
-                                     (cycle_entry, cycle_check, ),
-                                     cycle_gzip_check)
-        self.log_tree = LogTreeView(stream_tree, (log_type_entry,
-                                                  log_type_check, ))
-        self.log_model = self.log_tree.get_model()
-
-        def add_stream(button, model):
-            model.append(('', [], (0, False, ), False, [], {}, ))
-        add_stream_button = gtk.Button('Add stream')
-        add_stream_button.connect(
-            'clicked', add_stream, stream_tree.get_model())
-        def add_filter(button, model):
-            model.append(('', ))
-        add_filter_button = gtk.Button('Add filter')
-        add_filter_button.connect(
-            'clicked', add_filter, filter_tree.get_model())
-
-        def remove_selected(button, tree):
-            model, selected = tree.get_selection().get_selected()
-            if selected is not None:
-                model.remove(selected)
-                tree.last_selected = None
-        remove_stream_button = gtk.Button('Remove stream')
-        remove_stream_button.connect('clicked', remove_selected, stream_tree)
-        remove_filter_button = gtk.Button('Remove filter')
-        remove_filter_button.connect('clicked', remove_selected, filter_tree)
-
-        button_grid = gtk.Table(2, 2)
-        button_grid.attach(add_stream_button, 0, 1, 0, 1)
-        button_grid.attach(add_filter_button, 1, 2, 0, 1)
-        button_grid.attach(remove_stream_button, 0, 1, 1, 2)
-        button_grid.attach(remove_filter_button, 1, 2, 1, 2)
-
-        self.attach(self.log_tree.scroll, 0, 1, i, i + 3)
-        self.attach(button_grid, 1, 2, i, i + 1, yoptions = gtk.FILL)
-        self.attach(stream_tree.scroll, 1, 2, i + 1, i + 2)
-        self.attach(filter_tree.scroll, 1, 2, i + 2, i + 3)
-
-        self.scroll = gtk.ScrolledWindow()
-        self.scroll.set_policy(gtk.POLICY_AUTOMATIC, gtk.POLICY_AUTOMATIC)
-        self.scroll.add_with_viewport(self)
-
-    def add_log(self):
-        '''Add a log to currently selected VHost.'''
-        self.log_model.append(('', [], ('', False, ), [], {}, ))
-
-    def remove_log(self):
-        '''Remove currently selected log.'''
-        if self.log_tree.last_selected is not None:
-            self.log_model.remove(self.log_tree.last_selected)
-            self.log_tree.clear()
-
-    def remove_current(self, tree):
-        '''Remove currently selected VHost.'''
-        if self.last_selected is not None:
-            model = tree.get_model()
-            model.remove(self.last_selected)
-            self.clear()
-
-    def clear(self):
-        '''Clear input widgets.'''
-        for entry, check in self.attributes.itervalues():
-            entry.set_text('')
-            check.set_active(False)
-        for model in self.vhost_lists.itervalues():
-            model.clear()
-        self.log_tree.clear()
-        self.log_tree.get_model().clear()
-        self.last_selected = None
-
-    def save_changed(self, tree):
-        '''Save data from input widgets to model.'''
-        if self.last_selected is not None:
-            attributes = {}
-            for attribute in self.attributes:
-                entry, check = self.attributes[attribute]
-                attributes[attribute] = (entry.get_text(), check.get_active(), )
-            vhost_lists = {}
-            for vhost_list in GUIConfig.vhost_lists:
-                container = vhost_lists[vhost_list[0]] = []
-                model = self.vhost_lists[vhost_list[0]]
-                i = model.iter_children(None)
-                while i is not None: # iterate over list elements
-                    row = []
-                    for counter in xrange(len(vhost_list[1])):
-                        row.append(model[i][counter])
-                    container.append(tuple(row))
-                    i = model.iter_next(i)
-            row = tree.get_model()[self.last_selected]
-            row[1] = attributes
-            row[2] = vhost_lists
-            row[3] = self.log_tree.get_logs()
-
-    def cursor_changed(self, tree):
-        self.save_changed(tree)
-
-        self.clear()
-
-        self.last_selected = current = tree.get_selection().get_selected()[1]
-        row = tree.get_model()[current]
-        for attribute in row[1]:
-            entry, check = self.attributes[attribute]
-            entry.set_text(row[1][attribute][0])
-            check.set_active(row[1][attribute][1])
-        for vhost_list in row[2]:
-            model = self.vhost_lists[vhost_list]
-            for element in row[2][vhost_list]:
-                model.append(element)
-        self.log_tree.set_logs(row[3])
-
-    def make_def(self, tree):
-        '''Export all data as list of VHosts.'''
-        self.save_changed(tree)
-        model = tree.get_model()
-        vhosts = []
-        i = model.iter_children(None)
-        while i is not None: # iterate over VHosts
-            row = model[i]
-            logs = []
-            for log in row[3]:
-                streams = []
-                for stream in log[1]:
-                    cycle, enabled = stream[2]
-                    if not enabled:
-                        cycle = None
-                    cycle_gzip = stream[3]
-                    streams.append(Stream(stream[0], cycle, cycle_gzip, stream[1]))
-                    streams[-1].custom = stream[4]
-                    streams[-1].custom_attrib = stream[5]
-                log_type, enabled = log[2]
-                if not enabled:
-                    log_type = None
-                logs.append(Log(log[0], streams, log_type))
-                logs[-1].custom = log[3]
-                logs[-1].custom_attrib = log[4]
-            vhost = VHost(row[0], logs = logs)
-            for attribute in row[1]:
-                text, enabled = row[1][attribute]
-                if enabled:
-                    getattr(vhost, 'set_' + attribute)(text)
-            for vhost_list in row[2]:
-                for entry in row[2][vhost_list]:
-                    getattr(vhost, 'add_' + vhost_list)(*entry)
-            vhost.custom = row[4]
-            vhost.custom_attrib = row[5]
-            vhosts.append(vhost)
-            i = model.iter_next(i)
-        return vhosts
diff --git a/misc/py_control_client/MyServer/GUI/__init__.py b/misc/py_control_client/MyServer/GUI/__init__.py
deleted file mode 100644
index 8fa2136..0000000
--- a/misc/py_control_client/MyServer/GUI/__init__.py
+++ /dev/null
@@ -1,2 +0,0 @@
-#
-
diff --git a/misc/py_control_client/MyServer/README b/misc/py_control_client/MyServer/README
deleted file mode 100644
index 6ea5727..0000000
--- a/misc/py_control_client/MyServer/README
+++ /dev/null
@@ -1,2 +0,0 @@
-The py_control_client library implements the client side of the
-CONTROL protocol present in MyServer in the python language.
diff --git a/misc/py_control_client/MyServer/__init__.py b/misc/py_control_client/MyServer/__init__.py
deleted file mode 100644
index 8fa2136..0000000
--- a/misc/py_control_client/MyServer/__init__.py
+++ /dev/null
@@ -1,2 +0,0 @@
-#
-
diff --git a/misc/py_control_client/MyServer/pycontrol/__init__.py b/misc/py_control_client/MyServer/pycontrol/__init__.py
deleted file mode 100644
index 8fa2136..0000000
--- a/misc/py_control_client/MyServer/pycontrol/__init__.py
+++ /dev/null
@@ -1,2 +0,0 @@
-#
-
diff --git a/misc/py_control_client/MyServer/pycontrol/pycontrol.py b/misc/py_control_client/MyServer/pycontrol/pycontrol.py
deleted file mode 100644
index f5224c3..0000000
--- a/misc/py_control_client/MyServer/pycontrol/pycontrol.py
+++ /dev/null
@@ -1,115 +0,0 @@
-'''
-MyServer
-Copyright (C) 2008, 2009 The MyServer Team
-This program 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 3 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program.  If not, see <http://www.gnu.org/licenses/>.
-'''
-import socket
-import ssl
-import time
-
-error_codes = {'100': 'CONTROL_OK',
-               '200': 'CONTROL_ERROR',
-               '201': 'CONTROL_INTERNAL',
-               '202': 'CONTROL_AUTH',     
-               '203': 'CONTROL_MALFORMED',
-               '204': 'CONTROL_CMD_NOT_FOUND',
-               '205': 'CONTROL_BAD_LEN',
-               '206': 'CONTROL_SERVER_BUSY',
-               '207': 'CONTROL_BAD_VERSION',
-               '208': 'CONTROL_FILE_NOT_FOUND'}
-
-class PyMyServerControl(object):
-    def __init__(self, host, port, login, password):
-        '''Initialize a connection to server:port using login:password as
-        credentials.'''
-
-        self.connectionType = "Keep-Alive"
-
-        self.s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
-        self.s.connect((host, port))
-
-        self.host = host
-        self.port = port
-        self.login = login
-        self.password = password
-        self.sock = ssl.wrap_socket(self.s)
-
-    def send_header(self, command, length, args = ""):
-        '''Build the CONTROL header and send it.'''
-        self.buffer = ""
-        self.response_values = {}
-        self.response_code = None
-        req_header = "/" + command + " CONTROL/1.0 " +args + "\r\n"
-        req_header = req_header + "/AUTH " + self.login +":" + self.password + "\r\n"
-        req_header = req_header + "/LEN " + str (length) + "\r\n"
-        req_header = req_header + "/CONNECTION " + self.connectionType + "\r\n"
-        req_header = req_header + "\r\n"
-
-        self.sock.write(req_header)
-
-    def send(self, data):
-        '''Send additional data after the header.'''
-        self.sock.write(data)
-
-
-    def __readline(self):
-        '''Read a line from the socket.'''
-        while True:
-            self.buffer = self.buffer + self.sock.read(1024)
-            ind = self.buffer.find("\r\n")
-
-            if ind != 1:
-                ret = self.buffer[0:ind]
-                self.buffer = self.buffer[ind+2:len(self.buffer)]
-                return ret
-
-    def available_data(self):
-        '''Returns the number of bytes to be read.'''
-        return int(self.response_values['LEN']) - self.__bytes_read
-
-    def read(self):
-        '''Read data that follows the the response header.'''
-        if len(self.buffer) > 0:
-            self.__bytes_read = self.__bytes_read + len(self.buffer)
-            return self.buffer
-
-        data = self.sock.read(int(self.response_values['LEN']) - self.__bytes_read)
-        self.__bytes_read = self.__bytes_read + len(data)
-
-        return data
-
-    def read_header(self):
-        '''Read the response header.'''
-        self.response_code = self.__readline()[1:4]
-        self.__bytes_read = 0
-
-        while True:
-            line = self.__readline()
-            if len(line) == 0:
-                break
-            ind = line.find(" ")
-
-            if ind == -1:
-                return
-
-            header_name = line[1:ind]
-            value = line[ind+1:len(line)]
-
-            self.response_values[header_name] = value
-
-
-    def close(self):
-        '''Close the socket.'''
-        del self.sock
-        self.s.close()
diff --git a/misc/py_control_client/MyServer/pycontrollib/__init__.py b/misc/py_control_client/MyServer/pycontrollib/__init__.py
deleted file mode 100644
index 792d600..0000000
--- a/misc/py_control_client/MyServer/pycontrollib/__init__.py
+++ /dev/null
@@ -1 +0,0 @@
-#
diff --git a/misc/py_control_client/MyServer/pycontrollib/browser.py b/misc/py_control_client/MyServer/pycontrollib/browser.py
deleted file mode 100644
index 82c0456..0000000
--- a/misc/py_control_client/MyServer/pycontrollib/browser.py
+++ /dev/null
@@ -1,86 +0,0 @@
-# -*- coding: utf-8 -*-
-'''
-MyServer
-Copyright (C) 2009 Free Software Foundation, Inc.
-This program 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 3 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program.  If not, see <http://www.gnu.org/licenses/>.
-'''
-
-import os
-
-class FileBrowser():
-    'Abstract file browser class.'
-    def list_dir(self):
-        raise NotImplementedError()
-
-    def list_files(self):
-        raise NotImplementedError()
-    
-    def get_file(self, path):
-        raise NotImplementedError()
-    
-    def put_file(self, path, text):
-        raise NotImplementedError()
-
-    def remove_file(self, path):
-        raise NotImplementedError()
-    
-    def get_path(self):
-        raise NotImplementedError()
-
-    def change_dir(self, path):
-        raise NotImplementedError()
-
-    def show_hidden(self, show):
-        raise NotImplementedError()
-
-class LocalFileBrowser(FileBrowser):
-    'Local file browser class.'
-    def __init__(self, path = os.path.expanduser('~')):
-        self.path = path
-        self.show = False
-
-    def list_dir(self):
-        return ['..'] + sorted(
-            [path for path in os.listdir(self.path) if \
-                 not os.path.isfile(os.path.join(self.path, path)) \
-                and (self.show or not path.startswith('.'))])
-
-    def list_files(self):
-        return ['..'] + sorted(
-            [path for path in os.listdir(self.path) if \
-                 os.path.isfile(os.path.join(self.path, path)) \
-                and (self.show or not path.startswith('.'))])
-
-    def get_file(self, path):
-        with open(os.path.join(self.path, path)) as f:
-            return f.read()
-
-    def put_file(self, path, text):
-        with open(os.path.join(self.path, path), 'w') as f:
-            f.write(text)
-
-    def remove_file(self, path):
-        os.remove(os.path.join(self.path, path))
-
-    def get_path(self):
-        return self.path
-
-    def change_dir(self, path):
-        if path == '..':
-            self.path = os.path.split(self.path)[0]
-        else:
-            self.path = os.path.join(self.path, path)
-
-    def show_hidden(self, show):
-        self.show = show
diff --git a/misc/py_control_client/MyServer/pycontrollib/config.py b/misc/py_control_client/MyServer/pycontrollib/config.py
deleted file mode 100644
index cdb5643..0000000
--- a/misc/py_control_client/MyServer/pycontrollib/config.py
+++ /dev/null
@@ -1,70 +0,0 @@
-# -*- coding: utf-8 -*-
-'''
-MyServer
-Copyright (C) 2009 Free Software Foundation, Inc.
-This program 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 3 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program.  If not, see <http://www.gnu.org/licenses/>.
-'''
-
-from lxml import etree
-from definition import Definition, DefinitionList
-
-class MyServerConfig():
-    def __init__(self, definitions = []):
-        self.definitions = DefinitionList(definitions)
-
-    def __eq__(self, other):
-        return isinstance(other, MyServerConfig) and \
-            self.definitions == other.definitions
-
-    def get_definitions(self):
-        '''Get current definitions.'''
-        return self.definitions.get_definitions()
-    
-    def add_definition(self, definition, index = None):
-        '''Append definition, if index is not None insert it at index-th
-        position.'''
-        self.definitions.add_definition(definition, index)
-
-    def get_definition(self, index):
-        '''Get index-th definition.'''
-        return self.definitions.get_definition(index)
-
-    def remove_definition(self, index):
-        '''Remove index-th definition.'''
-        self.definitions.remove_definition(index)
-
-    @staticmethod
-    def from_string(text):
-        '''Factory to produce MyServerConfig by parsing a string.'''
-        return MyServerConfig.from_lxml_element(etree.XML(
-                text, parser = etree.XMLParser(remove_comments = True)))
-
-    @staticmethod
-    def from_lxml_element(root):
-        '''Factory to produce MyServerConfig from lxml.etree.Element object.'''
-        if root.tag != 'MYSERVER':
-            raise AttributeError('Expected MYSERVER tag.')
-        return MyServerConfig(map(Definition.from_lxml_element, list(root)))
-
-    def __str__(self):
-        return etree.tostring(self.to_lxml_element(), pretty_print = True)
-
-    def to_lxml_element(self):
-        '''Convert MyServerConfig to lxml.etree.Element object.'''
-        root = etree.Element('MYSERVER')
-        for definition in self.definitions.get_definitions():
-            root.append(definition.to_lxml_element())
-        for element in self.definitions.custom:
-            root.append(element)
-        return root
diff --git a/misc/py_control_client/MyServer/pycontrollib/controller.py b/misc/py_control_client/MyServer/pycontrollib/controller.py
deleted file mode 100644
index 64cb7c6..0000000
--- a/misc/py_control_client/MyServer/pycontrollib/controller.py
+++ /dev/null
@@ -1,145 +0,0 @@
-# -*- coding: utf-8 -*-
-'''
-MyServer
-Copyright (C) 2009 Free Software Foundation, Inc.
-This program 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 3 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program.  If not, see <http://www.gnu.org/licenses/>.
-'''
-
-from MyServer.pycontrol.pycontrol import PyMyServerControl, error_codes
-from mimetypes import MIMETypes
-from vhost import VHosts
-from config import MyServerConfig
-
-class ServerError(Exception):
-    '''Raised when MyServer return code doesn't mean success.'''
-    pass
-
-class BasicController():
-    def __init__(self, host, port, username, password):
-        self.connection = None
-        self.host = host
-        self.port = int(port)
-        self.username = username
-        self.password = password
-
-    def __check_return_code(self):
-        return_code = self.connection.response_code
-        if error_codes.get(return_code, '') != 'CONTROL_OK':
-            raise ServerError('MyServer returned {0}: {1}'.format(
-                    return_code, error_codes.get(return_code, '')))
-
-    def connect(self):
-        '''Connect to server.'''
-        self.disconnect()
-        self.connection = PyMyServerControl(self.host, self.port,
-                                            self.username, self.password)
-
-    def disconnect(self):
-        '''Disconnect from server.'''
-        if self.connection is not None:
-            self.connection.close()
-            self.connection = None
-
-    def reboot(self):
-        '''Reboot server.'''
-        if self.connection:
-            self.connection.send_header('REBOOT', 0)
-            self.connection.read_header()
-            self.__check_return_code()
-
-    def version(self):
-        '''Get version string.'''
-        if self.connection:
-            self.connection.send_header('VERSION', 0)
-            self.connection.read_header()
-            self.__check_return_code()
-            return self.connection.read()
-
-    def enable_reboot(self):
-        '''Enable server auto-reboot.'''
-        if self.connection:
-            self.connection.send_header('ENABLEREBOOT', 0)
-            self.connection.read_header()
-            self.__check_return_code()
-
-    def disable_reboot(self):
-        '''Disable server auto-reboot.'''
-        if self.connection:
-            self.connection.send_header('DISABLEREBOOT', 0)
-            self.connection.read_header()
-            self.__check_return_code()
-
-    def show_connections(self):
-        '''List active server connections.'''
-        if self.connection:
-            self.connection.send_header('SHOWCONNECTIONS', 0)
-            self.connection.read_header()
-            self.__check_return_code()
-            return self.connection.read()
-
-    def kill_connection(self, num):
-        '''Kill connection to server.'''
-        if self.connection:
-            self.connection.send_header('KILLCONNECTION', 0, str(num))
-            self.connection.read_header()
-            self.__check_return_code()
-
-    def show_language_files(self):
-        '''List available language files.'''
-        if self.connection:
-            self.connection.send_header('SHOWLANGUAGEFILES', 0)
-            self.connection.read_header()
-            self.__check_return_code()
-            return self.connection.read()
-
-    def get_file(self, path):
-        '''Get file from server.'''
-        if self.connection:
-            self.connection.send_header('GETFILE', 0, path)
-            self.connection.read_header()
-            self.__check_return_code()
-            return self.connection.read()
-
-    def put_file(self, text, path):
-        '''Put file to server.'''
-        if self.connection:
-            self.connection.send_header('PUTFILE', len(text), path)
-            self.connection.send(text)
-            self.connection.read_header()
-            self.__check_return_code()
-
-class Controller(BasicController):
-    def get_MIME_type_configuration(self):
-        '''Get MIME types settings.'''
-        return MIMETypes.from_string(self.get_file('mimetypes.xml'))
-
-    def get_vhost_configuration(self):
-        '''Get VHosts settings.'''
-        return VHosts.from_string(self.get_file('virtualhosts.xml'))
-
-    def get_server_configuration(self):
-        '''Get server settings.'''
-        return MyServerConfig.from_string(self.get_file('myserver.xml'))
-
-    def put_MIME_type_configuration(self, config):
-        '''Put MIME types settings.'''
-        self.put_file(str(config), 'mimetypes.xml')
-
-    def put_vhost_configuration(self, config):
-        '''Put VHost settings.'''
-        self.put_file(str(config), 'virtualhosts.xml')
-
-    def put_server_configuration(self, config):
-        '''Put server settings.'''
-        self.put_file(str(config), 'myserver.xml')
diff --git a/misc/py_control_client/MyServer/pycontrollib/definition.py b/misc/py_control_client/MyServer/pycontrollib/definition.py
deleted file mode 100644
index 9ac2f55..0000000
--- a/misc/py_control_client/MyServer/pycontrollib/definition.py
+++ /dev/null
@@ -1,252 +0,0 @@
-# -*- coding: utf-8 -*-
-'''
-MyServer
-Copyright (C) 2009 Free Software Foundation, Inc.
-This program 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 3 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program.  If not, see <http://www.gnu.org/licenses/>.
-'''
-
-from lxml import etree
-
-class Definition():
-    '''Common interface for DefinitionElement and DefinitionTree. Objects of
-    this type should not exist alone.'''
-
-    def __init__(self, name = None, attributes = {}):
-        '''Creates new definition with given name and attributes.'''
-        self.set_name(name)
-        self.attributes = {}
-        for key, value in attributes.iteritems():
-            self.set_attribute(key, value)
-
-    def __eq__(self, other):
-        return isinstance(other, Definition) and \
-            self.name == other.name and \
-            self.attributes == other.attributes
-
-    def get_name(self):
-        '''Definition name, None means no name.'''
-        return self.name
-
-    def set_name(self, name):
-        '''Set definition name, None means no name.'''
-        self.name = name
-
-    def get_attributes(self):
-        '''Get dict of all attributes.'''
-        return self.attributes
-
-    def get_attribute(self, key):
-        '''Get value of attribute key.'''
-        return self.attributes[key]
-
-    def set_attribute(self, key, value):
-        '''Set attribute key to given value.'''
-        if key == 'value':
-            raise KeyError('value is not an allowed key')
-        self.attributes[key] = value
-
-    def remove_attribute(self, key):
-        '''Remove attribute key.'''
-        self.attributes.pop(key)
-
-    @staticmethod
-    def from_lxml_element(root):
-        '''Factory to produce definition element or tree from lxml.etree.Element
-        object.'''
-        if root.tag != 'DEFINE': # don't touch unknown things
-            return root
-        if len(list(root)):
-            return DefinitionTree.from_lxml_element(root)
-        else:
-            return DefinitionElement.from_lxml_element(root)
-
-    @staticmethod
-    def from_string(text):
-        '''Factory to produce definition element or tree by parsing a string.'''
-        return Definition.from_lxml_element(etree.XML(text))
-
-class DefinitionElement(Definition):
-    '''Single definition element.'''
-
-    def __init__(self, name = None, attributes = {}):
-        '''Creates new definition element with given name and attributes.'''
-        Definition.__init__(self, name)
-        self.tag = 'DEFINE element'
-        for key, value in attributes.iteritems():
-            self.set_attribute(key, value)
-
-    def __eq__(self, other):
-        return isinstance(other, DefinitionElement) and \
-            Definition.__eq__(self, other)
-
-    def set_attribute(self, key, value):
-        '''Set attribute key to given value.'''
-        if key == 'value':
-            self.attributes['value'] = value
-        else:
-            Definition.set_attribute(self, key, value)
-
-    def to_lxml_element(self):
-        '''Convert definition element to lxml.etree.Element object.'''
-        root = etree.Element('DEFINE')
-        for key, value in self.attributes.iteritems():
-            root.set(key, value)
-        if self.name is not None:
-            root.set('name', self.name)
-        return root
-
-    def __str__(self):
-        return etree.tostring(self.to_lxml_element(), pretty_print = True)
-
-    @staticmethod
-    def from_lxml_element(root):
-        '''Factory to produce definition element from lxml.etree.Element
-        object.'''
-        if root.tag != 'DEFINE':
-            raise AttributeError('Expected DEFINE tag.')
-        attributes = root.attrib
-        name = attributes.pop('name', None)
-        return DefinitionElement(name, attributes)
-
-    @staticmethod
-    def from_string(text):
-        '''Factory to produce definition element by parsing a string.'''
-        return DefinitionElement.from_lxml_element(etree.XML(text))
-
-    def search_by_name(self, name):
-        return None if name != self.name else self
-
-class DefinitionTree(Definition):
-    '''Definition element containing other definitions.'''
-
-    def __init__(self, name = None, definitions = [], attributes = {}):
-        '''Creates new definition tree with given name, sub-definitions and
-        attributes. values is expected to be iterable.'''
-        Definition.__init__(self, name, attributes)
-        self.tag = 'DEFINE tree'
-        self.definitions = []
-        self.custom = [] # list of children not being definitions
-        for definition in definitions:
-            self.add_definition(definition)
-
-    def __eq__(self, other):
-        return isinstance(other, DefinitionTree) and \
-            Definition.__eq__(self, other) and \
-            self.definitions == other.definitions
-
-    def get_definitions(self):
-        '''Get all sub-definitions.'''
-        return self.definitions
-
-    def get_definition(self, index):
-        '''Get sub-definition with given index.'''
-        return self.definitions[index]
-
-    def add_definition(self, value, index = None):
-        '''Add value to sub-definitions, either at given position, or at the
-        end.'''
-        if not isinstance(value, Definition):
-            self.custom.append(value)
-        else:
-            if index is None:
-                self.definitions.append(value)
-            else:
-                self.definitions.insert(index, value)
-
-    def remove_definition(self, index):
-        '''Remove sub-definition with given index.'''
-        self.definitions.pop(index)
-
-    @staticmethod
-    def from_lxml_element(root):
-        '''Factory to produce definition tree from lxml.etree.Element object.'''
-        if root.tag != 'DEFINE':
-            raise AttributeError('Expected DEFINE tag.')
-        attributes = root.attrib
-        name = attributes.pop('name', None)
-        definitions = map(Definition.from_lxml_element, list(root))
-        return DefinitionTree(name, definitions, attributes)
-
-    @staticmethod
-    def from_string(text):
-        '''Factory to produce definition tree by parsing a string.'''
-        return DefinitionTree.from_lxml_element(etree.XML(text))
-
-    def to_lxml_element(self):
-        '''Convert definition tree to lxml.etree.Element object.'''
-        root = etree.Element('DEFINE')
-        for key, value in self.attributes.iteritems():
-            root.set(key, value)
-        if self.name is not None:
-            root.set('name', self.name)
-        for definition in self.definitions:
-            root.append(definition.to_lxml_element())
-        for element in self.custom:
-            root.append(element)
-        return root
-
-    def __str__(self):
-        return etree.tostring(self.to_lxml_element(), pretty_print = True)
-
-    def search_by_name(self, name):
-        for definition in reversed(self.definitions):
-            ret = definition.search_by_name(name)
-            if ret != None:
-                return ret
-        return None if name != self.name else self
-
-class DefinitionList():
-    def __init__(self, definitions = []):
-        '''Construct new DefinitionList object with given definitions.'''
-        self.definitions = []
-        self.custom = []
-        for definition in definitions:
-            self.add_definition(definition)
-
-    def add_definition(self, definition, index = None):
-        '''Append definition to current list of definitions, if index is not
-        None insert at index-th position.'''
-        if not isinstance(definition, Definition):
-            self.custom.append(definition)
-        else:
-            if index is None:
-                self.definitions.append(definition)
-            else:
-                self.definitions.insert(index, definition)
-
-    def get_definitions(self):
-        '''Get current list of definitions.'''
-        return self.definitions
-
-    def get_definition(self, index):
-        '''Get index-th definition.'''
-        return self.definitions[index]
-
-    def remove_definition(self, index):
-        '''Remove index-th definition.'''
-        self.definitions.pop(index)
-
-    def __eq__(self, other):
-        return isinstance(other, DefinitionList) and \
-            self.definitions == other.definitions
-
-    def __str__(self):
-        return '\n'.join(map(str, self.definitions))
-
-    def search_by_name(self, name):
-        for definition in reversed(self.definitions):
-            ret = definition.search_by_name(name)
-            if ret != None:
-                return ret
-        return None
diff --git a/misc/py_control_client/MyServer/pycontrollib/log.py b/misc/py_control_client/MyServer/pycontrollib/log.py
deleted file mode 100644
index 8752f1b..0000000
--- a/misc/py_control_client/MyServer/pycontrollib/log.py
+++ /dev/null
@@ -1,242 +0,0 @@
-# -*- coding: utf-8 -*-
-'''
-MyServer
-Copyright (C) 2009 Free Software Foundation, Inc.
-This program 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 3 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program.  If not, see <http://www.gnu.org/licenses/>.
-'''
-
-from lxml import etree
-
-class Stream():
-    def __init__(self, location = None, cycle = None, cycle_gzip = None, filters = []):
-        '''Create new Stream instance. filter is expected to be iterable.'''
-        self.set_location(location)
-        self.set_cycle(cycle)
-        self.set_cycle_gzip(cycle_gzip)
-        self.filters = []
-        for filter in filters:
-            self.add_filter(filter)
-        self.custom = []
-        self.custom_attrib = {}
-
-    def __eq__(self, other):
-        return isinstance(other, Stream) and \
-            self.location == other.location and \
-            self.cycle == other.cycle and \
-            self.cycle_gzip == other.cycle_gzip and \
-            self.filters == other.filters
-
-    def get_location(self):
-        '''Get stream location.'''
-        return self.location
-
-    def set_location(self, location):
-        '''Set stream location.'''
-        self.location = location
-
-    def get_cycle(self):
-        '''Get stream cycle value.'''
-        return self.cycle
-
-    def set_cycle(self, cycle):
-        '''Set cycle value, None means not set.'''
-        if cycle is not None:
-            self.cycle = int(cycle)
-        else:
-            self.cycle = cycle
-
-    def get_cycle_gzip(self):
-        '''Get stream cycle_gzip value.'''
-        return self.cycle_gzip
-
-    def set_cycle_gzip(self, cycle_gzip):
-        '''Set stream cycle_gzip value, None means not set'''
-        self.cycle_gzip = cycle_gzip
-
-    def get_filters(self):
-        '''Get list of stream filters.'''
-        return self.filters
-
-    def get_filter(self, index):
-        '''Get index-th filter.'''
-        return self.filters[index]
-
-    def add_filter(self, filter, index = None):
-        '''Append a new filter, or insert it at index position.'''
-        if index is None:
-            self.filters.append(filter)
-        else:
-            self.filters.insert(index, filter)
-
-    def remove_filter(self, index):
-        '''Remove index-th filter.'''
-        self.filters.pop(index)
-
-    @staticmethod
-    def from_string(text):
-        '''Factory to produce stream by parsing a string.'''
-        return Stream.from_lxml_element(etree.XML(
-                text, parser = etree.XMLParser(remove_comments = True)))
-
-    @staticmethod
-    def from_lxml_element(root):
-        '''Factory to produce stream from lxml.etree.Element object.'''
-        if root.tag != 'STREAM':
-            raise AttributeError('Expected STREAM tag.')
-        known_attrib = set(['location', 'cycle', 'cycle_gzip'])
-        custom_attrib = {}
-        for key, value in root.attrib.iteritems():
-            if key not in known_attrib:
-                custom_attrib[key] = value
-        location = root.get('location')
-        cycle = root.get('cycle', None)
-        cycle_gzip = root.get('cycle_gzip', None)
-        if cycle_gzip is not None:
-            cycle_gzip = cycle_gzip.upper() == 'YES'
-        filters = []
-        custom = []
-        for child in list(root):
-            if child.tag == 'FILTER':
-                filters.append(child.text)
-            else:
-                custom.append(child)
-        stream = Stream(location, cycle, cycle_gzip, filters)
-        stream.custom = custom
-        stream.custom_attrib = custom_attrib
-        return stream
-
-    def __str__(self):
-        return etree.tostring(self.to_lxml_element(), pretty_print = True)
-
-    def to_lxml_element(self):
-        '''Convert to lxml.etree.Element.'''
-        root = etree.Element('STREAM')
-        if self.location is not None:
-            root.set('location', self.location)
-        if self.cycle is not None:
-            root.set('cycle', str(self.cycle))
-        if self.cycle_gzip is not None:
-            root.set('cycle_gzip', 'YES' if self.cycle_gzip else 'NO')
-        for filter in self.filters:
-            element = etree.Element('FILTER')
-            element.text = filter
-            root.append(element)
-
-        for element in self.custom:
-            root.append(element)
-        for key, value in self.custom_attrib.iteritems():
-            root.set(key, value)
-
-        return root
-
-class Log():
-    def __init__(self, log_type, streams = [], type = None):
-        '''Create new Log instance. stream is expected to be iterable.'''
-        self.set_log_type(log_type)
-        self.set_type(type)
-        self.streams = []
-        for stream in streams:
-            self.add_stream(stream)
-        self.custom = []
-        self.custom_attrib = {}
-
-    def __eq__(self, other):
-        return isinstance(other, Log) and \
-            self.log_type == other.log_type and \
-            self.streams == other.streams and \
-            self.type == other.type
-
-    def get_type(self):
-        '''Get log's type attribute.'''
-        return self.type
-
-    def set_type(self, type):
-        '''Set log's type attribute, None means not set'''
-        self.type = type
-
-    def get_log_type(self):
-        '''Get log's type.'''
-        return self.log_type
-
-    def set_log_type(self, log_type):
-        '''Set log's type.'''
-        if log_type is None:
-            raise AttributeError('log_type is required and can\'t be None')
-        self.log_type = log_type
-
-    def get_streams(self):
-        '''Get streams associated with this log.'''
-        return self.streams
-
-    def add_stream(self, stream, index = None):
-        '''Append stream to current streams or if index is not None insert
-        stream ad index-th position.'''
-        if index is None:
-            self.streams.append(stream)
-        else:
-            self.streams.insert(index, stream)
-
-    def remove_stream(self, index):
-        '''Remove stream from index-th position.'''
-        self.streams.pop(index)
-
-    def get_stream(self, index):
-        '''Get index-th stream.'''
-        return self.streams[index]
-
-    @staticmethod
-    def from_string(text):
-        '''Factory to produce log by parsing a string.'''
-        return Log.from_lxml_element(etree.XML(
-                text, parser = etree.XMLParser(remove_comments = True)))
-
-    @staticmethod
-    def from_lxml_element(root):
-        '''Factory to produce log from lxml.etree.Element object.'''
-        log_type = root.tag
-        custom_attrib = {}
-        known_attrib = set(['type'])
-        for key, value in root.attrib.iteritems():
-            if key not in known_attrib:
-                custom_attrib[key] = value
-        type = root.get('type', None)
-        streams = []
-        custom = []
-        for element in list(root):
-            try:
-                streams.append(Stream.from_lxml_element(element))
-            except AttributeError:
-                custom.append(element)
-        log = Log(log_type, streams, type)
-        log.custom = custom
-        log.custom_attrib = custom_attrib
-        return log
-
-    def __str__(self):
-        return etree.tostring(self.to_lxml_element(), pretty_print = True)
-
-    def to_lxml_element(self):
-        '''Convert to lxml.etree.Element.'''
-        root = etree.Element(self.log_type)
-        if self.type is not None:
-            root.set('type', self.type)
-        for stream in self.streams:
-            root.append(stream.to_lxml_element())
-
-        for element in self.custom:
-            root.append(element)
-        for key, value in self.custom_attrib.iteritems():
-            root.set(key, value)
-
-        return root
diff --git a/misc/py_control_client/MyServer/pycontrollib/mimetypes.py b/misc/py_control_client/MyServer/pycontrollib/mimetypes.py
deleted file mode 100644
index df978c2..0000000
--- a/misc/py_control_client/MyServer/pycontrollib/mimetypes.py
+++ /dev/null
@@ -1,270 +0,0 @@
-# -*- coding: utf-8 -*-
-'''
-MyServer
-Copyright (C) 2009 Free Software Foundation, Inc.
-This program 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 3 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program.  If not, see <http://www.gnu.org/licenses/>.
-'''
-
-from definition import Definition, DefinitionList
-from lxml import etree
-
-class MIMEType():
-    def __init__(self, mime, handler = None, param = None, extensions = [],
-                 path = None, filters = [], self_executed = None,
-                 definitions = []):
-        '''Creates new MIMEType with specified attributes. extension, filter and
-        definitions are expected to be iterable.'''
-        self.set_mime(mime)
-        self.set_handler(handler)
-        self.set_param(param)
-        self.extensions = set()
-        for extension in extensions:
-            self.add_extension(extension)
-        self.set_path(path)
-        self.filters = []
-        for filter in filters:
-            self.add_filter(filter)
-        self.set_self_executed(self_executed)
-        self.definitions = DefinitionList(definitions)
-        self.custom = []
-        self.custom_attrib = {}
-
-    def get_mime(self):
-        '''Get associated mime type.'''
-        return self.mime
-
-    def set_mime(self, mime):
-        '''Set associated mime type.'''
-        if mime is None:
-            raise AttributeError('mime is required and can\'t be None')
-        self.mime = mime
-
-    def get_handler(self):
-        '''Get associated handler.'''
-        return self.handler
-
-    def set_handler(self, handler):
-        '''Set associated handler.'''
-        self.handler = handler
-
-    def get_param(self):
-        '''Get associated param.'''
-        return self.param
-
-    def set_param(self, param):
-        '''Set associated param. None means no param.'''
-        self.param = param
-
-    def get_extensions(self):
-        '''Get associated extensions.'''
-        return self.extensions
-
-    def remove_extension(self, extension):
-        '''Remove extension from associated extensions.'''
-        self.extensions.remove(extension)
-
-    def add_extension(self, extension):
-        '''Add extension to associated extensions.'''
-        self.extensions.add(extension)
-
-    def get_path(self):
-        '''Get associated path.'''
-        return self.path
-
-    def set_path(self, path):
-        '''Set associated path. None means no path.'''
-        self.path = path
-
-    def get_filters(self):
-        '''Get associated filters.'''
-        return self.filters
-
-    def get_filter(self, index):
-        '''Get filter with given index.'''
-        return self.filters[index]
-
-    def remove_filter(self, index):
-        '''Remove filter with given index.'''
-        self.filters.pop(index)
-
-    def add_filter(self, filter, index = None):
-        '''Append filter after all other filters, or insert it at index.'''
-        if index is None:
-            self.filters.append(filter)
-        else:
-            self.filters.insert(index, filter)
-
-    def get_self_executed(self):
-        '''Get self_executed setting.'''
-        return self.self_executed
-
-    def set_self_executed(self, self_executed):
-        '''Set self_executed setting.'''
-        self.self_executed = self_executed
-
-    def get_definitions(self):
-        '''Get all definitions.'''
-        return self.definitions.get_definitions()
-
-    def get_definition(self, index):
-        '''Get definition with given index.'''
-        return self.definitions.get_definition(index)
-
-    def add_definition(self, definition, index = None):
-        '''Append definition after all other definitions, or insert it at
-        index.'''
-        self.definitions.add_definition(definition, index)
-
-    def remove_definition(self, index):
-        '''Remove definition with given index.'''
-        self.definitions.remove_definition(index)
-
-    def __eq__(self, other):
-        return isinstance(other, MIMEType) and \
-            self.mime == other.mime and \
-            self.handler == other.handler and \
-            self.param == other.param and \
-            self.extensions == other.extensions and \
-            self.path == other.path and \
-            self.filters == other.filters and \
-            self.self_executed == other.self_executed and \
-            self.definitions == other.definitions
-
-    def to_lxml_element(self):
-        '''Convert to lxml.etree.Element.'''
-        def make_element(tag, attribute, value):
-            element = etree.Element(tag)
-            element.set(attribute, value)
-            return element
-        def make_extension_element(extension):
-            return make_element('EXTENSION', 'value', extension)
-        def make_filter_element(filter):
-            return make_element('FILTER', 'value', filter)
-        root = etree.Element('MIME')
-        root.set('mime', self.mime)
-        if self.handler is not None:
-            root.set('handler', self.handler)
-        if self.param is not None:
-            root.set('param', self.param)
-        if self.self_executed is not None:
-            root.set('self', self.self_executed)
-        if self.path is not None:
-            root.append(make_element('PATH', 'regex', self.path))
-        for element in map(make_extension_element, self.extensions):
-            root.append(element)
-        for element in map(make_filter_element, self.filters):
-            root.append(element)
-        for definition in self.definitions.get_definitions():
-            root.append(definition.to_lxml_element())
-
-        for element in self.custom:
-            root.append(element)
-        for key, value in self.custom_attrib.iteritems():
-            root.set(key, value)
-
-        return root
-
-    def __str__(self):
-        return etree.tostring(self.to_lxml_element(), pretty_print = True)
-
-    @staticmethod
-    def from_lxml_element(root):
-        '''Factory to produce MIMEType from lxml.etree.Element object.'''
-        if root.tag != 'MIME':
-            raise AttributeError('Expected MIME tag.')
-        mime = root.get('mime', None)
-        handler = root.get('handler', None)
-        param = root.get('param', None)
-        self_executed = root.get('self', None)
-        known_attrib = set(['mime', 'handler', 'param', 'self'])
-        custom_attrib = {}
-        for key, value in root.attrib.iteritems():
-            if key not in known_attrib:
-                custom_attrib[key] = value
-        path = None
-        extension = set()
-        filters = []
-        definitions = []
-        custom = []
-        for child in list(root):
-            if child.tag == 'PATH':
-                path = child.get('regex')
-            elif child.tag == 'FILTER':
-                filters.append(child.get('value'))
-            elif child.tag == 'EXTENSION':
-                extension.add(child.get('value'))
-            elif child.tag == 'DEFINE':
-                definitions.append(Definition.from_lxml_element(child))
-            else:
-                custom.append(child)
-        mime = MIMEType(mime, handler, param, extension, path, filters,
-                        self_executed, definitions)
-        mime.custom = custom
-        mime.custom_attrib = custom_attrib
-        return mime
-
-    @staticmethod
-    def from_string(text):
-        '''Factory to produce MIMEType by parsing a string.'''
-        return MIMEType.from_lxml_element(etree.XML(
-                text, parser = etree.XMLParser(remove_comments = True)))
-
-class MIMETypes():
-    def __init__(self, MIME_types = []):
-        self.MIME_types = MIME_types
-        self.custom = []
-        self.custom_attrib = {}
-
-    def __eq__(self, other):
-        return isinstance(other, MIMETypes) and \
-            self.MIME_types == other.MIME_types
-
-    def to_lxml_element(self):
-        '''Convert to lxml.etree.Element.'''
-        root = etree.Element('MIMES')
-        for mime in self.MIME_types:
-            root.append(mime.to_lxml_element())
-
-        for element in self.custom:
-            root.append(element)
-        for key, value in self.custom_attrib.iteritems():
-            root.set(key, value)
-
-        return root
-
-    def __str__(self):
-        return etree.tostring(self.to_lxml_element(), pretty_print = True)
-
-    @staticmethod
-    def from_lxml_element(root):
-        '''Factory to produce MIMETypes from lxml.etree.Element object.'''
-        if root.tag != 'MIMES':
-            raise AttributeError('Expected MIMES tag.')
-        types = []
-        custom = []
-        for element in list(root):
-            try:
-                types.append(MIMEType.from_lxml_element(element))
-            except AttributeError:
-                custom.append(element)
-        mimes = MIMETypes(types)
-        mimes.custom = custom
-        mimes.custom_attrib = root.attrib
-        return mimes
-
-    @staticmethod
-    def from_string(text):
-        '''Factory to produce MIMETypes from parsing a string.'''
-        return MIMETypes.from_lxml_element(etree.XML(
-                text, parser = etree.XMLParser(remove_comments = True)))
diff --git a/misc/py_control_client/MyServer/pycontrollib/security.py b/misc/py_control_client/MyServer/pycontrollib/security.py
deleted file mode 100644
index 74e0dc1..0000000
--- a/misc/py_control_client/MyServer/pycontrollib/security.py
+++ /dev/null
@@ -1,474 +0,0 @@
-# -*- coding: utf-8 -*-
-'''
-MyServer
-Copyright (C) 2009 Free Software Foundation, Inc.
-This program 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 3 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program.  If not, see <http://www.gnu.org/licenses/>.
-'''
-
-from lxml import etree
-from definition import Definition
-
-class SecurityElement():
-    @staticmethod
-    def from_lxml_element(root):
-        if root.tag == 'USER':
-            return User.from_lxml_element(root)
-        if root.tag == 'CONDITION':
-            return Condition.from_lxml_element(root)
-        elif root.tag == 'PERMISSION':
-            return Permission.from_lxml_element(root)
-        elif root.tag == 'RETURN':
-            return Return.from_lxml_element(root)
-        elif root.tag == 'DEFINE':
-            return Definition.from_lxml_element(root)
-        else:
-            raise AttributeError(
-                '{0} is not allowed in security files'.format(root.tag))
-
-    @staticmethod
-    def from_string(text):
-        '''Factory to produce security element by parsing a string.'''
-        return SecurityElement.from_lxml_element(etree.XML(text))
-
-    def __str__(self):
-        return etree.tostring(self.to_lxml_element(), pretty_print = True)
-
-class Condition(SecurityElement):
-    def __init__(self, name = None, value = None, reverse = None, regex = None,
-                 sub_elements = []):
-        self.tag = 'CONDITION'
-        self.set_name(name)
-        self.set_value(value)
-        self.set_reverse(reverse)
-        self.set_regex(regex)
-        self.custom_attrib = {}
-        self.custom = []
-        self.sub_elements = []
-        for element in sub_elements:
-            self.add_sub_element(element)
-
-    def __eq__(self, other):
-        return isinstance(other, Condition) and self.name == other.name and \
-            self.value == other.value and self.reverse == other.reverse and \
-            self.regex == other.regex and \
-            self.sub_elements == other.sub_elements
-
-    def set_name(self, name):
-        self.name = name
-
-    def get_name(self):
-        return self.name
-
-    def set_value(self, value):
-        self.value = value
-
-    def get_value(self):
-        return self.value
-
-    def set_reverse(self, reverse):
-        self.reverse = reverse
-
-    def get_reverse(self):
-        return self.reverse
-
-    def set_regex(self, regex):
-        self.regex = regex
-
-    def get_regex(self):
-        return self.regex
-
-    def add_sub_element(self, element, index = None):
-        if isinstance(element, Definition) or \
-                isinstance(element, SecurityElement):
-            if index is None:
-                self.sub_elements.append(element)
-            else:
-                self.sub_elements.insert(index, element)
-        else:
-            self.custom.append(element)
-
-    def get_sub_elements(self):
-        return self.sub_elements
-
-    def get_sub_element(self, index):
-        return self.sub_elements[index]
-
-    def remove_sub_element(self, index):
-        self.sub_elements.pop(index)
-
-    def to_lxml_element(self):
-        root = etree.Element('CONDITION')
-        if self.name is not None:
-            root.set('name', self.name)
-        if self.value is not None:
-            root.set('value', self.value)
-        if self.reverse is not None:
-            root.set('not', 'yes' if self.reverse else 'no')
-        if self.regex is not None:
-            root.set('regex', 'yes' if self.regex else 'no')
-        for key, value in self.custom_attrib.iteritems():
-            root.set(key, value)
-        for element in self.sub_elements:
-            root.append(element.to_lxml_element())
-        for element in self.custom:
-            root.append(element)
-        return root
-
-    @staticmethod
-    def from_lxml_element(root):
-        if root.tag != 'CONDITION':
-            raise AttributeError('Expected CONDITION tag.')
-        custom_attrib = root.attrib
-        name = custom_attrib.pop('name', None)
-        value = custom_attrib.pop('value', None)
-        reverse = custom_attrib.pop('not', None)
-        if reverse is not None:
-            reverse = reverse.upper() == 'YES'
-        regex = custom_attrib.pop('regex', None)
-        if regex is not None:
-            regex = regex.upper() == 'YES'
-        custom = []
-        sub_elements = []
-        for child in list(root):
-            try:
-                sub_elements.append(SecurityElement.from_lxml_element(child))
-            except:
-                custom.append(child)
-        condition = Condition(name, value, reverse, regex, sub_elements)
-        condition.custom = custom
-        condition.custom_attrib = custom_attrib
-        return condition
-
-    @staticmethod
-    def from_string(text):
-        '''Factory to produce condition element by parsing a string.'''
-        return Condition.from_lxml_element(etree.XML(text))
-
-class Permission(SecurityElement):
-    def __init__(self, read = None, execute = None, browse = None,
-                 delete = None, write = None):
-        self.tag = 'PERMISSION'
-        self.set_read(read)
-        self.set_execute(execute)
-        self.set_browse(browse)
-        self.set_delete(delete)
-        self.set_write(write)
-        self.custom_attrib = {}
-        self.custom = []
-
-    def __eq__(self, other):
-        return isinstance(other, Permission) and self.read == other.read and \
-            self.execute == other.execute and self.browse == other.browse and \
-            self.delete == other.delete and self.write == other.write
-
-    def set_read(self, read):
-        self.read = read
-
-    def get_read(self):
-        return self.read
-
-    def set_execute(self, execute):
-        self.execute = execute
-
-    def get_execute(self):
-        return self.execute
-
-    def set_browse(self, browse):
-        self.browse = browse
-
-    def get_browse(self):
-        return self.browse
-
-    def set_delete(self, delete):
-        self.delete = delete
-
-    def get_delete(self):
-        return self.delete
-
-    def set_write(self, write):
-        self.write = write
-
-    def get_write(self):
-        return self.write
-
-    def to_lxml_element(self):
-        root = etree.Element('PERMISSION')
-        if self.read is not None:
-            root.set('READ', 'YES' if self.read else 'NO')
-        if self.execute is not None:
-            root.set('EXECUTE', 'YES' if self.execute else 'NO')
-        if self.browse is not None:
-            root.set('BROWSE', 'YES' if self.browse else 'NO')
-        if self.delete is not None:
-            root.set('DELETE', 'YES' if self.delete else 'NO')
-        if self.write is not None:
-            root.set('WRITE', 'YES' if self.write else 'NO')
-        for key, value in self.custom_attrib.iteritems():
-            root.set(key, value)
-        for element in self.custom:
-            root.append(element)
-        return root
-
-    @staticmethod
-    def from_lxml_element(root):
-        if root.tag != 'PERMISSION':
-            raise AttributeError('Expected PERMISSION tag.')
-        custom_attrib = root.attrib
-        read = custom_attrib.pop('READ', None)
-        if read is not None:
-            read = read.upper() == 'YES'
-        execute = custom_attrib.pop('EXECUTE', None)
-        if execute is not None:
-            execute = execute.upper() == 'YES'
-        browse = custom_attrib.pop('BROWSE', None)
-        if browse is not None:
-            browse = browse.upper() == 'YES'
-        delete = custom_attrib.pop('DELETE', None)
-        if delete is not None:
-            delete = delete.upper() == 'YES'
-        write = custom_attrib.pop('WRITE', None)
-        if write is not None:
-            write = write.upper() == 'YES'
-        custom = list(root)
-        permission = Permission(read, execute, browse, delete, write)
-        permission.custom_attrib = custom_attrib
-        permission.custom = custom
-        return permission
-
-    @staticmethod
-    def from_string(text):
-        '''Factory to produce permission element by parsing a string.'''
-        return Permission.from_lxml_element(etree.XML(text))
-
-class User(SecurityElement):
-    def __init__(self, name = None, password = None, read = None,
-                 execute = None, browse = None, delete = None, write = None):
-        self.tag = 'USER'
-        self.set_name(name)
-        self.set_password(password)
-        self.set_read(read)
-        self.set_execute(execute)
-        self.set_browse(browse)
-        self.set_delete(delete)
-        self.set_write(write)
-        self.custom_attrib = {}
-        self.custom = []
-
-    def __eq__(self, other):
-        return isinstance(other, User) and self.name == other.name and \
-            self.password == other.password and self.read == other.read and \
-            self.execute == other.execute and self.browse == other.browse and \
-            self.delete == other.delete and self.write == other.write
-
-    def set_name(self, name):
-        self.name = name
-
-    def get_name(self):
-        return self.name
-
-    def set_password(self, password):
-        self.password = password
-
-    def get_password(self):
-        return self.password
-
-    def set_read(self, read):
-        self.read = read
-
-    def get_read(self):
-        return self.read
-
-    def set_execute(self, execute):
-        self.execute = execute
-
-    def get_execute(self):
-        return self.execute
-
-    def set_browse(self, browse):
-        self.browse = browse
-
-    def get_browse(self):
-        return self.browse
-
-    def set_delete(self, delete):
-        self.delete = delete
-
-    def get_delete(self):
-        return self.delete
-
-    def set_write(self, write):
-        self.write = write
-
-    def get_write(self):
-        return self.write
-
-    def to_lxml_element(self):
-        root = etree.Element('USER')
-        if self.name is not None:
-            root.set('name', self.name)
-        if self.password is not None:
-            root.set('password', self.password)
-        if self.read is not None:
-            root.set('READ', 'YES' if self.read else 'NO')
-        if self.execute is not None:
-            root.set('EXECUTE', 'YES' if self.execute else 'NO')
-        if self.browse is not None:
-            root.set('BROWSE', 'YES' if self.browse else 'NO')
-        if self.delete is not None:
-            root.set('DELETE', 'YES' if self.delete else 'NO')
-        if self.write is not None:
-            root.set('WRITE', 'YES' if self.write else 'NO')
-        for key, value in self.custom_attrib.iteritems():
-            root.set(key, value)
-        for element in self.custom:
-            root.append(element)
-        return root
-
-    @staticmethod
-    def from_lxml_element(root):
-        if root.tag != 'USER':
-            raise AttributeError('Expected USER tag.')
-        custom_attrib = root.attrib
-        name = custom_attrib.pop('name', None)
-        password = custom_attrib.pop('password', None)
-        read = custom_attrib.pop('READ', None)
-        if read is not None:
-            read = read.upper() == 'YES'
-        execute = custom_attrib.pop('EXECUTE', None)
-        if execute is not None:
-            execute = execute.upper() == 'YES'
-        browse = custom_attrib.pop('BROWSE', None)
-        if browse is not None:
-            browse = browse.upper() == 'YES'
-        delete = custom_attrib.pop('DELETE', None)
-        if delete is not None:
-            delete = delete.upper() == 'YES'
-        write = custom_attrib.pop('WRITE', None)
-        if write is not None:
-            write = write.upper() == 'YES'
-        custom = list(root)
-        user = User(name, password, read, execute, browse,
-                    delete, write)
-        user.custom_attrib = custom_attrib
-        user.custom = custom
-        return user
-
-    @staticmethod
-    def from_string(text):
-        '''Factory to produce user element by parsing a string.'''
-        return User.from_lxml_element(etree.XML(text))
-
-class Return(SecurityElement):
-    def __init__(self, value = None):
-        self.tag = 'RETURN'
-        self.set_value(value)
-        self.custom_attrib = {}
-        self.custom = []
-
-    def __eq__(self, other):
-        return isinstance(other, Return) and self.value == other.value
-
-    def set_value(self, value):
-        self.value = value
-
-    def get_value(self):
-        return self.value
-
-    def to_lxml_element(self):
-        root = etree.Element('RETURN')
-        if self.value is not None:
-            root.set('value', self.value)
-        for key, value in self.custom_attrib.iteritems():
-            root.set(key, value)
-        for element in self.custom:
-            root.append(element)
-        return root
-
-    @staticmethod
-    def from_lxml_element(root):
-        if root.tag != 'RETURN':
-            raise AttributeError('Expected RETURN tag.')
-        custom_attrib = root.attrib
-        value = custom_attrib.pop('value', None)
-        custom = list(root)
-        ret = Return(value)
-        ret.custom_attrib = custom_attrib
-        ret.custom = custom
-        return ret
-
-    @staticmethod
-    def from_string(text):
-        '''Factory to produce return element by parsing a string.'''
-        return Return.from_lxml_element(etree.XML(text))
-
-class SecurityList():
-    def __init__(self, elements = []):
-        self.elements = []
-        for element in elements:
-            self.add_element(element)
-        self.custom = []
-        self.custom_attrib = {}
-
-    def __eq__(self, other):
-        return isinstance(other, SecurityList) and \
-            self.elements == other.elements
-
-    def get_elements(self):
-        return self.elements
-
-    def get_element(self, index):
-        return self.elements[index]
-
-    def add_element(self, element, index = None):
-        if index is None:
-            self.elements.append(element)
-        else:
-            self.elements.insert(index, element)
-
-    def remove_element(self, index):
-        self.elements.pop(index)
-
-    @staticmethod
-    def from_lxml_element(root):
-        if root.tag != 'SECURITY':
-            raise AttributeError('Expected SECURITY tag.')
-        elements = []
-        custom = []
-        for element in list(root):
-            try:
-                elements.append(SecurityElement.from_lxml_element(element))
-            except:
-                custom.append(element)
-        security_list = SecurityList(elements)
-        security_list.custom = custom
-        security_list.custom_attrib = root.attrib
-        return security_list
-
-    @staticmethod
-    def from_string(text):
-        '''Factory to produce security list by parsing a string.'''
-        return SecurityList.from_lxml_element(etree.XML(text))
-
-    def to_lxml_element(self):
-        root = etree.Element('SECURITY')
-        for element in self.elements:
-            root.append(element.to_lxml_element())
-        for key, value in self.custom_attrib.iteritems():
-            root.set(key, value)
-        for element in self.custom:
-            root.append(element)
-        return root
-
-    def __str__(self):
-        return etree.tostring(self.to_lxml_element(), pretty_print = True)
diff --git a/misc/py_control_client/MyServer/pycontrollib/test/Makefile b/misc/py_control_client/MyServer/pycontrollib/test/Makefile
deleted file mode 100644
index 7c7179e..0000000
--- a/misc/py_control_client/MyServer/pycontrollib/test/Makefile
+++ /dev/null
@@ -1,45 +0,0 @@
-# MyServer
-# Copyright (C) 2009 Free Software Foundation, Inc.
-# This program 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 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program.  If not, see <http://www.gnu.org/licenses/>.
-
-PYTHON=/usr/bin/python
-PYTHONPATH:=$(shell dirname `pwd`):${PYTHONPATH}
-
-.PHONY: test log_test definition_test mimetypes_test vhost_test config_test \
-	security_test
-
-test: log_test definition_test mimetypes_test vhost_test config_test \
-	security_test
-
-log_test:
-	-PYTHONPATH=${PYTHONPATH} ${PYTHON} log_test.py
-
-definition_test:
-	-PYTHONPATH=${PYTHONPATH} ${PYTHON} definition_test.py
-
-mimetypes_test:
-	-PYTHONPATH=${PYTHONPATH} ${PYTHON} mimetypes_test.py
-
-vhost_test:
-	-PYTHONPATH=${PYTHONPATH} ${PYTHON} vhost_test.py
-
-config_test:
-	-PYTHONPATH=${PYTHONPATH} ${PYTHON} config_test.py
-
-security_test:
-	-PYTHONPATH=${PYTHONPATH} ${PYTHON} security_test.py
-
-.PHONY: clean
-clean:
-	rm *.py[co]
diff --git a/misc/py_control_client/MyServer/pycontrollib/test/config_test.py b/misc/py_control_client/MyServer/pycontrollib/test/config_test.py
deleted file mode 100644
index 1f40262..0000000
--- a/misc/py_control_client/MyServer/pycontrollib/test/config_test.py
+++ /dev/null
@@ -1,134 +0,0 @@
-# -*- coding: utf-8 -*-
-'''
-MyServer
-Copyright (C) 2009 Free Software Foundation, Inc.
-This program 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 3 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program.  If not, see <http://www.gnu.org/licenses/>.
-'''
-
-import unittest
-from lxml import etree
-from config import MyServerConfig
-from definition import DefinitionElement, DefinitionTree
-
-class MyServerConfigTest(unittest.TestCase):
-    def setUp(self):
-        self.definitions = []
-        self.definitions.append(DefinitionElement('a'))
-        self.definitions.append(DefinitionElement('b'))
-        self.definitions.append(DefinitionElement('c'))
-
-    def test_creation(self):
-        config = MyServerConfig()
-        config = MyServerConfig(self.definitions)
-
-    def test_definitions(self):
-        config = MyServerConfig()
-        self.assertEqual([], config.get_definitions())
-        counter = 0
-        for definition in self.definitions:
-            config.add_definition(definition)
-            counter += 1
-            self.assertEqual(self.definitions[:counter],
-                             config.get_definitions())
-        for counter in xrange(len(self.definitions)):
-            self.assertEqual(self.definitions[counter],
-                             config.get_definition(counter))
-        config.add_definition(DefinitionElement('test'), 1)
-        self.assertEqual(DefinitionElement('test'), config.get_definition(1))
-        config.remove_definition(1)
-        self.assertEqual(self.definitions, config.get_definitions())
-        for counter in xrange(len(self.definitions)):
-            config.remove_definition(0)
-            self.assertEqual(self.definitions[counter + 1:],
-                             config.get_definitions())
-
-    def test_equality(self):
-        self.assertEqual(MyServerConfig(self.definitions),
-                         MyServerConfig(self.definitions))
-        self.assertNotEqual(MyServerConfig(), MyServerConfig(self.definitions))
-        self.assertNotEqual(MyServerConfig(), 'other type')
-
-    def test_from_string(self):
-        text = '<MYSERVER />'
-        config = MyServerConfig.from_string(text)
-        right = MyServerConfig()
-        self.assertEqual(config, right)
-
-    def test_from_string_definitions(self):
-        text = '''<MYSERVER>
-  <DEFINE name="a" />
-  <DEFINE>
-    <DEFINE name="b" />
-    <DEFINE name="c" />
-  </DEFINE>
-</MYSERVER>'''
-        config = MyServerConfig.from_string(text)
-        right = MyServerConfig([DefinitionElement('a'), DefinitionTree(
-                    definitions = [DefinitionElement('b'),
-                                   DefinitionElement('c')])])
-        self.assertEqual(config, right)
-
-    def test_from_lxml(self):
-        text = '<MYSERVER />'
-        config = MyServerConfig.from_lxml_element(etree.XML(text))
-        right = MyServerConfig()
-        self.assertEqual(config, right)
-
-    def test_from_lxml_definitions(self):
-        text = '''<MYSERVER>
-  <DEFINE name="a" />
-  <DEFINE>
-    <DEFINE name="b" />
-    <DEFINE name="c" />
-  </DEFINE>
-</MYSERVER>'''
-        config = MyServerConfig.from_lxml_element(etree.XML(text))
-        right = MyServerConfig([DefinitionElement('a'), DefinitionTree(
-                    definitions = [DefinitionElement('b'),
-                                   DefinitionElement('c')])])
-        self.assertEqual(config, right)
-
-    def test_to_string(self):
-        config = MyServerConfig()
-        copy = MyServerConfig.from_string(str(config))
-        self.assertEqual(config, copy)
-
-    def test_to_string_definitions(self):
-        config = MyServerConfig([DefinitionElement('a'), DefinitionTree(
-                    definitions = [DefinitionElement('b'),
-                                   DefinitionElement('c')])])
-        copy = MyServerConfig.from_string(str(config))
-        self.assertEqual(config, copy)
-
-    def test_to_string(self):
-        config = MyServerConfig()
-        copy = MyServerConfig.from_lxml_element(config.to_lxml_element())
-        self.assertEqual(config, copy)
-
-    def test_to_string_definitions(self):
-        config = MyServerConfig([DefinitionElement('a'), DefinitionTree(
-                    definitions = [DefinitionElement('b'),
-                                   DefinitionElement('c')])])
-        copy = MyServerConfig.from_lxml_element(config.to_lxml_element())
-        self.assertEqual(config, copy)
-
-    def test_bad_root_tag(self):
-        text = '<ERROR />'
-        self.assertRaises(AttributeError, MyServerConfig.from_string, text)
-        self.assertRaises(AttributeError, MyServerConfig.from_lxml_element,
-                          etree.XML(text))
-
-
-if __name__ == '__main__':
-    unittest.main()
diff --git a/misc/py_control_client/MyServer/pycontrollib/test/definition_test.py b/misc/py_control_client/MyServer/pycontrollib/test/definition_test.py
deleted file mode 100644
index 669a2a8..0000000
--- a/misc/py_control_client/MyServer/pycontrollib/test/definition_test.py
+++ /dev/null
@@ -1,481 +0,0 @@
-# -*- coding: utf-8 -*-
-'''
-MyServer
-Copyright (C) 2009 Free Software Foundation, Inc.
-This program 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 3 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program.  If not, see <http://www.gnu.org/licenses/>.
-'''
-
-from definition import Definition, DefinitionElement, DefinitionTree, DefinitionList
-from lxml import etree
-import unittest
-
-class DefinitionTest(unittest.TestCase):
-    def test_creation(self):
-        definition = Definition()
-        definition = Definition('no attributes')
-        definition = Definition('with attributes', {'a': 'b', 'c': 'd'})
-
-    def test_name(self):
-        definition = Definition('name1')
-        self.assertEqual('name1', definition.get_name())
-        definition.set_name('name2')
-        self.assertEqual('name2', definition.get_name())
-        definition.set_name(None)
-        self.assertEqual(None, definition.get_name())
-        definition = Definition(name = 'name1')
-        self.assertEqual('name1', definition.get_name())
-
-    def test_attributes(self):
-        definition = Definition('with attributes', {'a': 'b', 'c': 'd'})
-        self.assertEqual('b', definition.get_attribute('a'))
-        self.assertEqual('d', definition.get_attribute('c'))
-        self.assertEqual({'a': 'b', 'c': 'd'}, definition.get_attributes())
-        self.assertRaises(KeyError, definition.get_attribute, 'e')
-        definition.set_attribute('e', 'f')
-        self.assertEqual('f', definition.get_attribute('e'))
-        definition.set_attribute('e', 'g')
-        self.assertEqual('g', definition.get_attribute('e'))
-        definition.remove_attribute('e')
-        self.assertRaises(KeyError, definition.get_attribute, 'e')
-        self.assertRaises(KeyError, definition.remove_attribute, 'e')
-        definition = Definition(attributes = {'a': 'b'})
-        self.assertEqual('b', definition.get_attribute('a'))
-        self.assertRaises(KeyError, definition.get_attribute, 'e')
-
-    def test_value(self):
-        self.assertRaises(KeyError, Definition, 'name', {'value': 'x'})
-        definition = Definition('name')
-        self.assertRaises(KeyError, definition.set_attribute, 'value', 'x')
-
-    def test_from_string(self):
-        text = '<DEFINE name="http.error.file.404" value="404.html" />'
-        definition = Definition.from_string(text)
-        self.assertTrue(isinstance(definition, DefinitionElement))
-        text = '<DEFINE name="x"><DEFINE value="y" /><DEFINE value="z" /></DEFINE>'
-        definition = Definition.from_string(text)
-        self.assertTrue(isinstance(definition, DefinitionTree))
-
-    def test_from_lxml(self):
-        text = '<DEFINE name="http.error.file.404" value="404.html" />'
-        definition = Definition.from_lxml_element(etree.XML(text))
-        self.assertTrue(isinstance(definition, DefinitionElement))
-        text = '<DEFINE name="x"><DEFINE value="y" /><DEFINE value="z" /></DEFINE>'
-        definition = Definition.from_lxml_element(etree.XML(text))
-        self.assertTrue(isinstance(definition, DefinitionTree))
-
-    def test_bad_root_tag(self):
-        text = '<ERROR name="http.error.file.404" value="404.html" />'
-        self.assertEqual('ERROR', Definition.from_string(text).tag)
-        self.assertEqual('ERROR', Definition.from_lxml_element(
-                etree.XML(text)).tag)
-
-    def test_equality(self):
-        self.assertNotEqual(Definition(), 'different type')
-
-class DefinitionElementTest(unittest.TestCase):
-    def test_creation(self):
-        definition = DefinitionElement()
-        self.assertTrue(isinstance(definition, Definition))
-        definition = DefinitionElement('name')
-        self.assertTrue(isinstance(definition, Definition))
-        definition = DefinitionElement('name', {'value': 'value'})
-        self.assertTrue(isinstance(definition, Definition))
-
-    def test_value(self):
-        definition = DefinitionElement('name', {'value': 'x'})
-        self.assertEqual('x', definition.get_attribute('value'))
-        definition.set_attribute('value', 'y')
-        self.assertEqual('y', definition.get_attribute('value'))
-        definition.set_attribute('value', None)
-        self.assertEqual(None, definition.get_attribute('value'))
-        definition.remove_attribute('value')
-        self.assertRaises(KeyError, definition.get_attribute, 'value')
-        definition = DefinitionElement()
-        self.assertRaises(KeyError, definition.get_attribute, 'value')
-
-    def test_from_string(self):
-        text = '<DEFINE />'
-        definition = DefinitionElement.from_string(text)
-        right = DefinitionElement()
-        self.assertEqual(definition, right)
-
-    def test_from_string_name(self):
-        text = '<DEFINE name="test" />'
-        definition = DefinitionElement.from_string(text)
-        right = DefinitionElement(name = "test")
-        self.assertEqual(definition, right)
-
-    def test_from_string_attributes(self):
-        text = '<DEFINE a="b" b="c" value="x" />'
-        definition = DefinitionElement.from_string(text)
-        right = DefinitionElement(attributes = {'a': 'b', 'b': 'c', 'value': 'x'})
-        self.assertEqual(definition, right)
-
-    def test_from_string_full(self):
-        text = '<DEFINE name="test" value="x" a="b" />'
-        definition = DefinitionElement.from_string(text)
-        right = DefinitionElement('test', {'value': 'x', 'a': 'b'})
-        self.assertEqual(definition, right)
-
-    def test_from_lxml(self):
-        text = '<DEFINE />'
-        definition = DefinitionElement.from_lxml_element(etree.XML(text))
-        right = DefinitionElement()
-        self.assertEqual(definition, right)
-
-    def test_from_xml_name(self):
-        text = '<DEFINE name="test" />'
-        definition = DefinitionElement.from_lxml_element(etree.XML(text))
-        right = DefinitionElement(name = "test")
-        self.assertEqual(definition, right)
-
-    def test_from_lxml_attributes(self):
-        text = '<DEFINE a="b" b="c" value="x" />'
-        definition = DefinitionElement.from_lxml_element(etree.XML(text))
-        right = DefinitionElement(attributes = {'a': 'b', 'b': 'c', 'value': 'x'})
-        self.assertEqual(definition, right)
-
-    def test_from_lxml_full(self):
-        text = '<DEFINE name="test" value="x" a="b" />'
-        definition = DefinitionElement.from_lxml_element(etree.XML(text))
-        right = DefinitionElement('test', {'value': 'x', 'a': 'b'})
-        self.assertEqual(definition, right)
-
-    def test_equality(self):
-        self.assertEqual(DefinitionElement('name', {'some': 'attributes'}),
-                         DefinitionElement('name', {'some': 'attributes'}))
-        self.assertNotEqual(DefinitionElement('name1'),
-                            DefinitionElement('name2'))
-        self.assertNotEqual(DefinitionElement('name', {'attribute': '1'}),
-                            DefinitionElement('name', {'attribute': '2'}))
-        self.assertNotEqual(DefinitionElement(), 'different type')
-
-    def test_to_string(self):
-        definition = DefinitionElement()
-        copy = DefinitionElement.from_string(str(definition))
-        self.assertEqual(definition, copy)
-
-    def test_to_string_name(self):
-        definition = DefinitionElement(name = 'test')
-        copy = DefinitionElement.from_string(str(definition))
-        self.assertEqual(definition, copy)
-
-    def test_to_string_attributes(self):
-        definition = DefinitionElement(attributes = {'a': 'b', 'b': 'c', 'value': 'x'})
-        copy = DefinitionElement.from_string(str(definition))
-        self.assertEqual(definition, copy)
-
-    def test_to_string_full(self):
-        definition = DefinitionElement('test', {'value': 'x', 'a': 'b'})
-        copy = DefinitionElement.from_string(str(definition))
-        self.assertEqual(definition, copy)
-
-    def test_to_lxml(self):
-        definition = DefinitionElement()
-        copy = DefinitionElement.from_lxml_element(definition.to_lxml_element())
-        self.assertEqual(definition, copy)
-
-    def test_to_lxml_name(self):
-        definition = DefinitionElement(name = 'test')
-        copy = DefinitionElement.from_lxml_element(definition.to_lxml_element())
-        self.assertEqual(definition, copy)
-
-    def test_to_lxml_attributes(self):
-        definition = DefinitionElement(attributes = {'a': 'b', 'b': 'c', 'value': 'x'})
-        copy = DefinitionElement.from_lxml_element(definition.to_lxml_element())
-        self.assertEqual(definition, copy)
-
-    def test_to_lxml_full(self):
-        definition = DefinitionElement('test', {'value': 'x', 'a': 'b'})
-        copy = DefinitionElement.from_lxml_element(definition.to_lxml_element())
-        self.assertEqual(definition, copy)
-
-    def test_bad_root_tag(self):
-        text = '<ERROR name="http.error.file.404" value="404.html" />'
-        self.assertRaises(AttributeError, DefinitionElement.from_string, text)
-        self.assertRaises(AttributeError, DefinitionElement.from_lxml_element,
-                          etree.XML(text))
-
-    def test_search_by_name(self):
-        definition = DefinitionElement('a')
-        self.assertEqual(None, definition.search_by_name('b'))
-        self.assertEqual(definition, definition.search_by_name('a'))
-
-class DefinitionTreeTest(unittest.TestCase):
-    def setUp(self):
-        self.element_0 = DefinitionElement('test', {'value': 'x'})
-        self.element_1 = DefinitionElement(attributes = {'a': 'b', 'b': 'c'})
-
-    def test_creation(self):
-        definition = DefinitionTree()
-        self.assertTrue(isinstance(definition, Definition))
-        definition = DefinitionTree('name')
-        self.assertTrue(isinstance(definition, Definition))
-        definition = DefinitionTree('name', [self.element_0])
-        self.assertTrue(isinstance(definition, Definition))
-        definition = DefinitionTree('name', [self.element_1], {'key': 'value'})
-        self.assertTrue(isinstance(definition, Definition))
-
-    def test_value(self):
-        self.assertRaises(KeyError, DefinitionTree, 'name', [], {'value': 'x'})
-        definition = Definition('name')
-        self.assertRaises(KeyError, definition.set_attribute, 'value', 'x')
-
-    def test_definitions(self):
-        definition = DefinitionTree()
-        self.assertEqual(0, len(definition.get_definitions()))
-        definition.add_definition(self.element_0)
-        self.assertEqual(1, len(definition.get_definitions()))
-        self.assertEqual(self.element_0, definition.get_definition(0))
-        definition.add_definition(self.element_1)
-        self.assertEqual(2, len(definition.get_definitions()))
-        self.assertEqual(self.element_0, definition.get_definition(0))
-        self.assertEqual(self.element_1, definition.get_definition(1))
-        definition.remove_definition(0)
-        self.assertEqual(1, len(definition.get_definitions()))
-        self.assertEqual(self.element_1, definition.get_definition(0))
-        definition.add_definition(self.element_0, 0)
-        self.assertEqual(2, len(definition.get_definitions()))
-        self.assertEqual(self.element_0, definition.get_definition(0))
-        self.assertEqual(self.element_1, definition.get_definition(1))
-        self.assertRaises(IndexError, definition.get_definition, 2)
-        definition = DefinitionTree(definitions = [self.element_0, self.element_1])
-        self.assertEqual(2, len(definition.get_definitions()))
-        self.assertEqual(self.element_0, definition.get_definition(0))
-        self.assertEqual(self.element_1, definition.get_definition(1))
-
-    def test_from_string(self):
-        text = '<DEFINE />'
-        definition = DefinitionTree.from_string(text)
-        right = DefinitionTree()
-        self.assertEqual(definition, right)
-
-    def test_from_string_name(self):
-        text = '<DEFINE name="test" />'
-        definition = DefinitionTree.from_string(text)
-        right = DefinitionTree(name = "test")
-        self.assertEqual(definition, right)
-
-    def test_from_string_definitions(self):
-        text = '<DEFINE>{0}{1}</DEFINE>'.format(self.element_0, self.element_1)
-        definition = DefinitionTree.from_string(text)
-        right = DefinitionTree(definitions = [self.element_0, self.element_1])
-        self.assertEqual(definition, right)
-
-    def test_from_string_attributes(self):
-        text = '<DEFINE a="b" b="c" />'
-        definition = DefinitionTree.from_string(text)
-        right = DefinitionTree(attributes = {'a': 'b', 'b': 'c'})
-        self.assertEqual(definition, right)
-
-    def test_from_string_full(self):
-        text = '<DEFINE name="test" a="b">{0}{1}</DEFINE>'.format(
-            self.element_0, self.element_1)
-        definition = DefinitionTree.from_string(text)
-        right = DefinitionTree('test', [self.element_0, self.element_1], {'a': 'b'})
-        self.assertEqual(definition, right)
-
-    def test_from_lxml(self):
-        text = '<DEFINE />'
-        definition = DefinitionTree.from_lxml_element(etree.XML(text))
-        right = DefinitionTree()
-        self.assertEqual(definition, right)
-
-    def test_from_lxml_name(self):
-        text = '<DEFINE name="test" />'
-        definition = DefinitionTree.from_lxml_element(etree.XML(text))
-        right = DefinitionTree(name = "test")
-        self.assertEqual(definition, right)
-
-    def test_from_lxml_definitions(self):
-        text = '<DEFINE>{0}{1}</DEFINE>'.format(self.element_0, self.element_1)
-        definition = DefinitionTree.from_lxml_element(etree.XML(text))
-        right = DefinitionTree(definitions = [self.element_0, self.element_1])
-        self.assertEqual(definition, right)
-
-    def test_from_lxml_attributes(self):
-        text = '<DEFINE a="b" b="c" />'
-        definition = DefinitionTree.from_lxml_element(etree.XML(text))
-        right = DefinitionTree(attributes = {'a': 'b', 'b': 'c'})
-        self.assertEqual(definition, right)
-
-    def test_from_lxml_full(self):
-        text = '<DEFINE name="test" a="b">{0}{1}</DEFINE>'.format(
-            self.element_0, self.element_1)
-        definition = DefinitionTree.from_lxml_element(etree.XML(text))
-        right = DefinitionTree('test', [self.element_0, self.element_1], {'a': 'b'})
-        self.assertEqual(definition, right)
-
-    def test_equality(self):
-        definition_0 = DefinitionTree('test', [self.element_0], {'a': 'b'})
-        definition_1 = DefinitionTree('test', [self.element_0], {'a': 'b'})
-        self.assertEqual(definition_0, definition_1)
-        self.assertNotEqual(definition_0, DefinitionTree('', [self.element_0], {'a': 'b'}))
-        self.assertNotEqual(definition_0, DefinitionTree('name', [], {'a': 'b'}))
-        self.assertNotEqual(definition_0, DefinitionTree('name', [self.element_0], {'b': 'b'}))
-        self.assertNotEqual(DefinitionTree(), 'different type')
-
-    def test_to_string(self):
-        definition = DefinitionTree()
-        copy = DefinitionTree.from_string(str(definition))
-        self.assertEqual(definition, copy)
-
-    def test_to_string_name(self):
-        definition = DefinitionTree(name = "test")
-        copy = DefinitionTree.from_string(str(definition))
-        self.assertEqual(definition, copy)
-
-    def test_top_string_definitions(self):
-        definition = DefinitionTree(definitions = [self.element_0, self.element_1])
-        copy = DefinitionTree.from_string(str(definition))
-        self.assertEqual(definition, copy)
-
-    def test_top_string_attributes(self):
-        definition = DefinitionTree(attributes = {'a': 'b', 'b': 'c'})
-        copy = DefinitionTree.from_string(str(definition))
-        self.assertEqual(definition, copy)
-
-    def test_to_string_full(self):
-        definition = DefinitionTree('test', [self.element_0, self.element_1], {'a': 'b'})
-        copy = DefinitionTree.from_string(str(definition))
-        self.assertEqual(definition, copy)
-
-    def test_to_lxml(self):
-        definition = DefinitionTree()
-        copy = DefinitionTree.from_lxml_element(definition.to_lxml_element())
-        self.assertEqual(definition, copy)
-
-    def test_to_lxml_name(self):
-        definition = DefinitionTree(name = "test")
-        copy = DefinitionTree.from_lxml_element(definition.to_lxml_element())
-        self.assertEqual(definition, copy)
-
-    def test_top_lxml_definitions(self):
-        definition = DefinitionTree(definitions = [self.element_0, self.element_1])
-        copy = DefinitionTree.from_lxml_element(definition.to_lxml_element())
-        self.assertEqual(definition, copy)
-
-    def test_top_lxml_attributes(self):
-        definition = DefinitionTree(attributes = {'a': 'b', 'b': 'c'})
-        copy = DefinitionTree.from_lxml_element(definition.to_lxml_element())
-        self.assertEqual(definition, copy)
-
-    def test_to_lxml_full(self):
-        definition = DefinitionTree('test', [self.element_0, self.element_1], {'a': 'b'})
-        copy = DefinitionTree.from_lxml_element(definition.to_lxml_element())
-        self.assertEqual(definition, copy)
-
-    def test_bad_root_tag(self):
-        text = '<ERROR name="test" key="value">{0}{1}</ERROR>'.format(
-            self.element_0, self.element_1)
-        self.assertRaises(AttributeError, DefinitionTree.from_string, text)
-        self.assertRaises(AttributeError, DefinitionTree.from_lxml_element,
-                          etree.XML(text))
-
-    def test_search_by_name(self):
-        element_0 = DefinitionElement('a')
-        element_1 = DefinitionElement('b')
-        element_2 = DefinitionElement('a')
-        tree = DefinitionTree('x', definitions = [element_0, element_1, element_2])
-        self.assertEqual(element_1, tree.search_by_name('b'))
-        self.assertEqual(element_2, tree.search_by_name('a'))
-        self.assertEqual(None, tree.search_by_name('c'))
-        self.assertEqual(tree, tree.search_by_name('x'))
-        tree = DefinitionTree('b', definitions = [element_0, element_1, element_2])
-        self.assertEqual(element_1, tree.search_by_name('b'))
-
-class DefinitionListTest(unittest.TestCase):
-    def setUp(self):
-        self.definitions = []
-        self.definitions.append(DefinitionElement('a'))
-        self.definitions.append(DefinitionElement('b'))
-        self.definitions.append(DefinitionElement('c'))
-
-    def test_creation(self):
-        def_list = DefinitionList()
-        def_list = DefinitionList(self.definitions)
-
-    def test_definitions(self):
-        def_list = DefinitionList()
-        self.assertEqual([], def_list.get_definitions())
-        counter = 0
-        for definition in self.definitions:
-            def_list.add_definition(definition)
-            counter += 1
-            self.assertEqual(self.definitions[:counter],
-                             def_list.get_definitions())
-        for counter in xrange(len(self.definitions)):
-            self.assertEqual(self.definitions[counter],
-                             def_list.get_definition(counter))
-        def_list.add_definition(DefinitionElement('test'), 1)
-        self.assertEqual(DefinitionElement('test'), def_list.get_definition(1))
-        def_list.remove_definition(1)
-        self.assertEqual(self.definitions, def_list.get_definitions())
-        for counter in xrange(len(self.definitions)):
-            def_list.remove_definition(0)
-            self.assertEqual(self.definitions[counter + 1:],
-                             def_list.get_definitions())
-
-    def test_equality(self):
-        self.assertEqual(DefinitionList(self.definitions),
-                         DefinitionList(self.definitions))
-        self.assertNotEqual(DefinitionList(), DefinitionList(self.definitions))
-        self.assertNotEqual(DefinitionList(), 'other type')
-
-    def test_search_by_name(self):
-        def_list = DefinitionList()
-        self.assertEqual(None, def_list.search_by_name('x'))
-        element_0 = DefinitionElement('x')
-        def_list.add_definition(element_0)
-        self.assertEqual(element_0, def_list.search_by_name('x'))
-        element_1 = DefinitionElement('x')
-        def_list.add_definition(element_1)
-        self.assertEqual(element_1, def_list.search_by_name('x'))
-        element_2 = DefinitionElement('x')
-        tree_1 = DefinitionTree('t', definitions = [element_2])
-        self.assertEqual(element_2, def_list.search_by_name('x'))
-        def_list.add_definition(element_1)
-        self.assertEqual(element_1, def_list.search_by_name('x'))
-
-    def test_to_string(self):
-        def_list = DefinitionList(self.definitions)
-        text = '<wrap>{0}</wrap>'.format(def_list)
-        copy = DefinitionList()
-        for lxml_definition in list(etree.XML(text)):
-            copy.add_definition(Definition.from_lxml_element(lxml_definition))
-        self.assertEqual(def_list, copy)
-
-class BadMarkupTest(unittest.TestCase):
-    def test_definition_tree(self):
-        text = '''
-<DEFINE>
-  <DEFINE value="x" />
-  <DEFINE vlaue="y" />
-  <UNKNOWN>
-    <CUSTOM />
-  </UNKNOWN>
-</DEFINE>'''
-        definition = Definition.from_string(text)
-        def_tree = definition.to_lxml_element()
-        self.assertEqual(2, len(def_tree.findall('DEFINE')))
-        unknown = def_tree.findall('UNKNOWN')
-        self.assertEqual(1, len(unknown))
-        unknown = unknown[0]
-        custom = list(unknown)
-        self.assertEqual(1, len(custom))
-        custom = custom[0]
-        self.assertEqual('CUSTOM', custom.tag)
-
-if __name__ == '__main__':
-    unittest.main()
diff --git a/misc/py_control_client/MyServer/pycontrollib/test/log_test.py b/misc/py_control_client/MyServer/pycontrollib/test/log_test.py
deleted file mode 100644
index 823eacb..0000000
--- a/misc/py_control_client/MyServer/pycontrollib/test/log_test.py
+++ /dev/null
@@ -1,425 +0,0 @@
-# -*- coding: utf-8 -*-
-'''
-MyServer
-Copyright (C) 2009 Free Software Foundation, Inc.
-This program 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 3 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program.  If not, see <http://www.gnu.org/licenses/>.
-'''
-
-import unittest
-from log import Stream, Log
-from lxml import etree
-
-class StreamTest(unittest.TestCase):
-    def test_creation(self):
-        log = Stream()
-        log = Stream('/logs/MyServer.log')
-        log = Stream('/logs/MyServer.log', 1048576)
-        log = Stream('/logs/MyServer.log', 1048576, False)
-        log = Stream('/logs/MyServer.log', 1048576, False, ['gzip', 'bzip2'])
-
-    def test_location(self):
-        log = Stream()
-        self.assertEqual(None, log.get_location())
-        log.set_location('/logs/new.log')
-        self.assertEqual('/logs/new.log', log.get_location())
-        log.set_location(None)
-        self.assertEqual(None, log.get_location())
-        log = Stream('/logs/MyServer.log')
-        self.assertEqual('/logs/MyServer.log', log.get_location())
-        log = Stream(location = '/logs/MyServer.log')
-        self.assertEqual('/logs/MyServer.log', log.get_location())
-
-    def test_cycle(self):
-        log = Stream()
-        self.assertEqual(None, log.get_cycle())
-        log.set_cycle(123)
-        self.assertEqual(123, log.get_cycle())
-        log.set_cycle(None)
-        self.assertEqual(None, log.get_cycle())
-        log = Stream('path', 123)
-        self.assertEqual(123, log.get_cycle())
-        log = Stream(cycle = 123)
-        self.assertEqual(123, log.get_cycle())
-
-    def test_cycle_gzip(self):
-        log = Stream()
-        self.assertEqual(None, log.get_cycle_gzip())
-        log.set_cycle_gzip(True)
-        self.assertEqual(True, log.get_cycle_gzip())
-        log.set_cycle_gzip(None)
-        self.assertEqual(None, log.get_cycle_gzip())
-        log = Stream('path', 123, False)
-        self.assertEqual(False, log.get_cycle_gzip())
-        log = Stream(cycle_gzip = False)
-        self.assertEqual(False, log.get_cycle_gzip())
-
-    def test_filters(self):
-        log = Stream()
-        self.assertEqual([], log.get_filters())
-        log.add_filter('gzip')
-        self.assertEqual(['gzip'], log.get_filters())
-        log.add_filter('bzip2')
-        self.assertEqual(['gzip', 'bzip2'], log.get_filters())
-        log.add_filter('bzip2', 0)
-        self.assertEqual(['bzip2', 'gzip', 'bzip2'], log.get_filters())
-        self.assertEqual('gzip', log.get_filter(1))
-        log.remove_filter(1)
-        self.assertEqual(['bzip2', 'bzip2'], log.get_filters())
-        log = Stream('path', 123, False, ['gzip'])
-        self.assertEqual(['gzip'], log.get_filters())
-        log = Stream(filters = ['gzip'])
-        self.assertEqual(['gzip'], log.get_filters())
-
-    def test_from_string(self):
-        text = '<STREAM />'
-        log = Stream.from_string(text)
-        right = Stream()
-        self.assertEqual(log, right)
-
-    def test_from_string_location(self):
-        text = '<STREAM location="path" />'
-        log = Stream.from_string(text)
-        right = Stream(location = 'path')
-        self.assertEqual(log, right)
-
-    def test_from_string_cycle(self):
-        text = '<STREAM cycle="123" />'
-        log = Stream.from_string(text)
-        right = Stream(cycle = 123)
-        self.assertEqual(log, right)
-
-    def test_from_string_cycle_gzip(self):
-        text = '<STREAM cycle_gzip="NO" />'
-        log = Stream.from_string(text)
-        right = Stream(cycle_gzip = False)
-        self.assertEqual(log, right)
-
-    def test_from_string_filters(self):
-        text = '<STREAM><FILTER>gzip</FILTER><FILTER>bzip2</FILTER></STREAM>'
-        log = Stream.from_string(text)
-        right = Stream(filters = ['gzip', 'bzip2'])
-        self.assertEqual(log, right)
-
-    def test_from_string_full(self):
-        text = '''<STREAM location="path" cycle="123" cycle_gzip="NO">
-  <FILTER>gzip</FILTER>
-  <FILTER>bzip2</FILTER>
-</STREAM>'''
-        log = Stream.from_string(text)
-        right = Stream('path', 123, False, ['gzip', 'bzip2'])
-        self.assertEqual(log, right)
-
-    def test_from_lxml(self):
-        text = '<STREAM />'
-        log = Stream.from_lxml_element(etree.XML(text))
-        right = Stream()
-        self.assertEqual(log, right)
-
-    def test_from_lxml_location(self):
-        text = '<STREAM location="path" />'
-        log = Stream.from_lxml_element(etree.XML(text))
-        right = Stream(location = 'path')
-        self.assertEqual(log, right)
-
-    def test_from_lxml_cycle(self):
-        text = '<STREAM cycle="123" />'
-        log = Stream.from_lxml_element(etree.XML(text))
-        right = Stream(cycle = 123)
-        self.assertEqual(log, right)
-
-    def test_from_lxml_cycle_gzip(self):
-        text = '<STREAM cycle_gzip="NO" />'
-        log = Stream.from_lxml_element(etree.XML(text))
-        right = Stream(cycle_gzip = False)
-        self.assertEqual(log, right)
-
-    def test_from_lxml_filters(self):
-        text = '<STREAM><FILTER>gzip</FILTER><FILTER>bzip2</FILTER></STREAM>'
-        log = Stream.from_lxml_element(etree.XML(text))
-        right = Stream(filters = ['gzip', 'bzip2'])
-        self.assertEqual(log, right)
-
-    def test_from_lxml_full(self):
-        text = '''<STREAM location="path" cycle="123" cycle_gzip="NO">
-  <FILTER>gzip</FILTER>
-  <FILTER>bzip2</FILTER>
-</STREAM>'''
-        log = Stream.from_lxml_element(etree.XML(text))
-        right = Stream('path', 123, False, ['gzip', 'bzip2'])
-        self.assertEqual(log, right)
-
-    def test_bad_root_tag(self):
-        text = '<ERROR location="path" />'
-        self.assertRaises(AttributeError, Stream.from_string, text)
-        self.assertRaises(AttributeError, Stream.from_lxml_element,
-                          etree.XML(text))
-    
-    def test_equality(self):
-        self.assertEqual(Stream('path', 123, False, ['gzip', 'bzip2']),
-                         Stream('path', 123, False, ['gzip', 'bzip2']))
-        self.assertNotEqual(Stream('path1', 123, False, ['gzip', 'bzip2']),
-                            Stream('path2', 123, False, ['gzip', 'bzip2']))
-        self.assertNotEqual(Stream('path', 1234, False, ['gzip', 'bzip2']),
-                            Stream('path', 123, False, ['gzip', 'bzip2']))
-        self.assertNotEqual(Stream('path', 123, True, ['gzip', 'bzip2']),
-                            Stream('path', 123, False, ['gzip', 'bzip2']))
-        self.assertNotEqual(Stream('path', 123, False, ['bzip2']),
-                            Stream('path', 123, False, ['gzip', 'bzip2']))
-        self.assertNotEqual([], Stream('path'))
-
-    def test_to_string(self):
-        log = Stream()
-        copy = Stream.from_string(str(log))
-        self.assertEqual(log, copy)
-
-    def test_to_string_location(self):
-        log = Stream(location = 'path')
-        copy = Stream.from_string(str(log))
-        self.assertEqual(log, copy)
-
-    def test_to_string_cycle(self):
-        log = Stream(cycle = 123)
-        copy = Stream.from_string(str(log))
-        self.assertEqual(log, copy)
-
-    def test_to_string_cycle_gzip(self):
-        log = Stream(cycle_gzip = False)
-        copy = Stream.from_string(str(log))
-        self.assertEqual(log, copy)
-
-    def test_to_string_filters(self):
-        log = Stream(filters = ['gzip', 'bzip2'])
-        copy = Stream.from_string(str(log))
-        self.assertEqual(log, copy)
-
-    def test_to_string_full(self):
-        log = Stream('path', 123, False, ['gzip', 'bzip2'])
-        copy = Stream.from_string(str(log))
-        self.assertEqual(log, copy)
-
-    def test_to_lxml(self):
-        log = Stream()
-        copy = Stream.from_lxml_element(log.to_lxml_element())
-        self.assertEqual(log, copy)
-
-    def test_to_lxml_location(self):
-        log = Stream(location = 'path')
-        copy = Stream.from_lxml_element(log.to_lxml_element())
-        self.assertEqual(log, copy)
-
-    def test_to_lxml_cycle(self):
-        log = Stream(cycle = 123)
-        copy = Stream.from_lxml_element(log.to_lxml_element())
-        self.assertEqual(log, copy)
-
-    def test_to_lxml_cycle_gzip(self):
-        log = Stream(cycle_gzip = False)
-        copy = Stream.from_lxml_element(log.to_lxml_element())
-        self.assertEqual(log, copy)
-
-    def test_to_lxml_filters(self):
-        log = Stream(filters = ['gzip', 'bzip2'])
-        copy = Stream.from_lxml_element(log.to_lxml_element())
-        self.assertEqual(log, copy)
-
-    def test_to_lxml_full(self):
-        log = Stream('path', 123, False, ['gzip', 'bzip2'])
-        copy = Stream.from_lxml_element(log.to_lxml_element())
-        self.assertEqual(log, copy)
-
-class LogTest(unittest.TestCase):
-    def setUp(self):
-        self.stream_0 = Stream(location = 'file://logs/MyServerHTTP.log')
-        self.stream_1 = Stream(location = 'console://stdout', filters = ['gzip'])
-
-    def test_creation(self):
-        log = Log('ACCESSLOG')
-        log = Log('WARNINGLOG')
-        log = Log('ACCESSLOG', [self.stream_0])
-        log = Log('ACCESSLOG', [self.stream_0], 'combined')
-
-    def test_log_type(self):
-        log = Log('ACCESSLOG')
-        self.assertEqual('ACCESSLOG', log.get_log_type())
-        log.set_log_type('WARNINGLOG')
-        self.assertEqual('WARNINGLOG', log.get_log_type())
-        self.assertRaises(AttributeError, log.set_log_type, None)
-        self.assertRaises(AttributeError, Log, None)
-
-    def test_type(self):
-        log = Log('ACCESSLOG')
-        self.assertEqual(None, log.get_type())
-        log.set_type('combined')
-        self.assertEqual('combined', log.get_type())
-        log.set_type(None)
-        self.assertEqual(None, log.get_type())
-        log = Log('ACCESSLOG', [], 'combined')
-        self.assertEqual('combined', log.get_type())
-
-    def test_stream(self):
-        log = Log('ACCESSLOG')
-        self.assertEqual([], log.get_streams())
-        log.add_stream(self.stream_0)
-        self.assertEqual([self.stream_0], log.get_streams())
-        log.add_stream(self.stream_1)
-        self.assertEqual([self.stream_0, self.stream_1], log.get_streams())
-        log.add_stream(self.stream_1, 0)
-        self.assertEqual([self.stream_1, self.stream_0, self.stream_1],
-                         log.get_streams())
-        self.assertEqual(self.stream_0, log.get_stream(1))
-        log.remove_stream(1)
-        self.assertEqual([self.stream_1, self.stream_1], log.get_streams())
-        log = Log('ACCESSLOG', [self.stream_0])
-        self.assertEqual([self.stream_0], log.get_streams())
-
-    def test_from_string(self):
-        text = '<ACCESSLOG />'
-        log = Log.from_string(text)
-        right = Log('ACCESSLOG')
-        self.assertEqual(log, right)
-
-    def test_from_string_type(self):
-        text = '<ACCESSLOG type="combined" />'
-        log = Log.from_string(text)
-        right = Log('ACCESSLOG', type = "combined")
-        self.assertEqual(log, right)
-
-    def test_from_string_streams(self):
-        text = '<ACCESSLOG>{0}{1}</ACCESSLOG>'.format(self.stream_0, self.stream_1)
-        log = Log.from_string(text)
-        right = Log('ACCESSLOG', streams = [self.stream_0, self.stream_1])
-        self.assertEqual(log, right)
-
-    def test_from_string_full(self):
-        text = '<ACCESSLOG type="combined">{0}{1}</ACCESSLOG>'.format(self.stream_0, self.stream_1)
-        log = Log.from_string(text)
-        right = Log('ACCESSLOG', [self.stream_0, self.stream_1], 'combined')
-        self.assertEqual(log, right)
-
-    def test_from_lxml(self):
-        text = '<ACCESSLOG />'
-        log = Log.from_lxml_element(etree.XML(text))
-        right = Log('ACCESSLOG')
-        self.assertEqual(log, right)
-
-    def test_from_lxml_type(self):
-        text = '<ACCESSLOG type="combined" />'
-        log = Log.from_lxml_element(etree.XML(text))
-        right = Log('ACCESSLOG', type = "combined")
-        self.assertEqual(log, right)
-
-    def test_from_lxml_streams(self):
-        text = '<ACCESSLOG>{0}{1}</ACCESSLOG>'.format(self.stream_0, self.stream_1)
-        log = Log.from_lxml_element(etree.XML(text))
-        right = Log('ACCESSLOG', streams = [self.stream_0, self.stream_1])
-        self.assertEqual(log, right)
-
-    def test_from_lxml_full(self):
-        text = '<ACCESSLOG type="combined">{0}{1}</ACCESSLOG>'.format(self.stream_0, self.stream_1)
-        log = Log.from_lxml_element(etree.XML(text))
-        right = Log('ACCESSLOG', [self.stream_0, self.stream_1], 'combined')
-        self.assertEqual(log, right)
-
-    def test_equality(self):
-        self.assertEqual(Log('ACCESSLOG', [self.stream_0, self.stream_1], 'combined'),
-                         Log('ACCESSLOG', [self.stream_0, self.stream_1], 'combined'))
-        self.assertNotEqual(Log('ACCESSLOG', [self.stream_0], 'combined'),
-                            Log('WARNINGLOG', [self.stream_0], 'combined'))
-        self.assertNotEqual(Log('ACCESSLOG', [self.stream_0], 'combined'),
-                            Log('ACCESSLOG', [self.stream_1], 'combined'))
-        self.assertNotEqual(Log('ACCESSLOG', [self.stream_0], 'combined'),
-                            Log('WARNINGLOG', [self.stream_0], None))
-        self.assertNotEqual([], Log('ACCESSLOG'))
-
-    def test_to_string(self):
-        log = Log('ACCESSLOG')
-        copy = Log.from_string(str(log))
-        self.assertEqual(log, copy)
-
-    def test_to_string_type(self):
-        log = Log('ACCESSLOG', type = "combined")
-        copy = Log.from_string(str(log))
-        self.assertEqual(log, copy)
-
-    def test_to_string_streams(self):
-        log = Log('ACCESSLOG', streams = [self.stream_0, self.stream_1])
-        copy = Log.from_string(str(log))
-        self.assertEqual(log, copy)
-
-    def test_to_string_full(self):
-        log = Log('ACCESSLOG', [self.stream_0, self.stream_1], 'combined')
-        copy = Log.from_string(str(log))
-        self.assertEqual(log, copy)
-        
-    def test_to_lxml(self):
-        log = Log('ACCESSLOG')
-        copy = Log.from_lxml_element(log.to_lxml_element())
-        self.assertEqual(log, copy)
-
-    def test_to_lxml_type(self):
-        log = Log('ACCESSLOG', type = "combined")
-        copy = Log.from_lxml_element(log.to_lxml_element())
-        self.assertEqual(log, copy)
-
-    def test_to_lxml_streams(self):
-        log = Log('ACCESSLOG', streams = [self.stream_0, self.stream_1])
-        copy = Log.from_lxml_element(log.to_lxml_element())
-        self.assertEqual(log, copy)
-
-    def test_to_lxml_full(self):
-        log = Log('ACCESSLOG', [self.stream_0, self.stream_1], 'combined')
-        copy = Log.from_lxml_element(log.to_lxml_element())
-        self.assertEqual(log, copy)
-
-class BadMarkupTest(unittest.TestCase):
-    def test_stream(self):
-        text = '''
-<STREAM custom="unknown">
-  abc
-  <UNKNOWN>
-    <CUSTOM />
-  </UNKNOWN>
-</STREAM>'''
-        stream = Stream.from_string(text)
-        tree = stream.to_lxml_element()
-        self.assertEqual('unknown', tree.get('custom'))
-        unknown = tree.findall('UNKNOWN')
-        self.assertEqual(1, len(unknown))
-        unknown = unknown[0]
-        custom = list(unknown)
-        self.assertEqual(1, len(custom))
-        custom = custom[0]
-        self.assertEqual('CUSTOM', custom.tag)
-
-    def test_log(self):
-        text = '''
-<SOMELOG custom="unknown">
-  <STREAM>abc</STREAM>
-  <UNKNOWN>
-    <CUSTOM />
-  </UNKNOWN>
-</SOMELOG>'''
-        log = Log.from_string(text)
-        tree = log.to_lxml_element()
-        self.assertEqual('unknown', tree.get('custom'))
-        unknown = tree.findall('UNKNOWN')
-        self.assertEqual(1, len(unknown))
-        unknown = unknown[0]
-        custom = list(unknown)
-        self.assertEqual(1, len(custom))
-        custom = custom[0]
-        self.assertEqual('CUSTOM', custom.tag)
-
-if __name__ == '__main__':
-    unittest.main()
diff --git a/misc/py_control_client/MyServer/pycontrollib/test/mimetypes_test.py b/misc/py_control_client/MyServer/pycontrollib/test/mimetypes_test.py
deleted file mode 100644
index 4183577..0000000
--- a/misc/py_control_client/MyServer/pycontrollib/test/mimetypes_test.py
+++ /dev/null
@@ -1,484 +0,0 @@
-# -*- coding: utf-8 -*-
-'''
-MyServer
-Copyright (C) 2009 Free Software Foundation, Inc.
-This program 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 3 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program.  If not, see <http://www.gnu.org/licenses/>.
-'''
-
-import unittest
-from lxml import etree
-from mimetypes import MIMEType, MIMETypes
-from definition import DefinitionElement, DefinitionTree
-
-class MIMETypeTest(unittest.TestCase):
-    def setUp(self):
-        self.definitions = []
-        self.definitions.append(DefinitionElement('http.use_error_file',
-                                                  {'value': 'YES'}))
-        self.definitions.append(DefinitionElement('http.error.file.404',
-                                                  {'value': '404.html'}))
-        self.definitions.append(
-            DefinitionTree(
-                'http.default_file',
-                [DefinitionElement(attributes = {'value': 'index.html'}),
-                 DefinitionElement(attributes = {'value': 'index.htm'})]))
-
-    def test_creation(self):
-        MIMEType('text/plain')
-        MIMEType('text/plain', 'CGI')
-        MIMEType('text/plain', 'CGI', '/usr/bin/python')
-        MIMEType('text/plain', 'CGI', '/usr/bin/python', set(['py']))
-        MIMEType('text/plain', 'CGI', '/usr/bin/python', set(['py']),
-                 '^/cgi-bin/.*$')
-        MIMEType('text/plain', 'CGI', '/usr/bin/python', set(['py']),
-                 '^/cgi-bin/.*$', ['gzip'])
-        MIMEType('text/plain', 'CGI', '/usr/bin/python', set(['py']),
-                 '^/cgi-bin/.*$', ['gzip'], 'NO')
-        MIMEType('text/plain', 'CGI', '/usr/bin/python', set(['py']),
-                 '^/cgi-bin/.*$', ['gzip'], 'NO', self.definitions)
-
-    def test_mime(self):
-        mime = MIMEType('text/plain', 'SEND')
-        self.assertEqual('text/plain', mime.get_mime())
-        mime.set_mime('application/xhtml+xml')
-        self.assertEqual('application/xhtml+xml', mime.get_mime())
-        self.assertRaises(AttributeError, mime.set_mime, None)
-        self.assertRaises(AttributeError, MIMEType, None, 'SEND')
-        
-    def test_handler(self):
-        mime = MIMEType('text/plain',)
-        self.assertEqual(None, mime.get_handler())
-        mime.set_handler('SEND')
-        self.assertEqual('SEND', mime.get_handler())
-        mime.set_handler(None)
-        self.assertEqual(None, mime.get_handler())
-        mime = MIMEType('text/plain', 'SEND')
-        self.assertEqual('SEND', mime.get_handler())
-        mime = MIMEType('text/plain', handler = 'SEND')
-        self.assertEqual('SEND', mime.get_handler())
-
-    def test_param(self):
-        mime = MIMEType('text/plain', 'SEND')
-        self.assertEqual(None, mime.get_param())
-        mime.set_param('/usr/bin/python')
-        self.assertEqual('/usr/bin/python', mime.get_param())
-        mime.set_param(None)
-        self.assertEqual(None, mime.get_param())
-        mime = MIMEType('text/plain', 'SEND', param = '/usr/bin/python')
-        self.assertEqual('/usr/bin/python', mime.get_param())
-    
-    def test_extension(self):
-        mime = MIMEType('text/plain', 'SEND')
-        self.assertEqual(set(), mime.get_extensions())
-        mime.add_extension('py')
-        mime.add_extension('html')
-        self.assertEqual(set(['py', 'html']), mime.get_extensions())
-        mime.remove_extension('py')
-        self.assertEqual(set(['html']), mime.get_extensions())
-        mime = MIMEType('text/plain', 'SEND', extensions = set(['py', 'html']))
-        self.assertEqual(set(['py', 'html']), mime.get_extensions())
-
-    def test_path(self):
-        mime = MIMEType('text/plain', 'SEND')
-        self.assertEqual(None, mime.get_path())
-        mime.set_path('^/www/.*$')
-        self.assertEqual('^/www/.*$', mime.get_path())
-        mime.set_path(None)
-        self.assertEqual(None, mime.get_path())
-        mime = MIMEType('text/plain', 'SEND', path = '^/www/.*$')
-        self.assertEqual('^/www/.*$', mime.get_path())
-
-    def test_filters(self):
-        mime = MIMEType('text/plain', 'SEND')
-        self.assertEqual([], mime.get_filters())
-        mime.add_filter('gzip')
-        mime.add_filter('bzip2')
-        self.assertEqual(['gzip', 'bzip2'], mime.get_filters())
-        mime.add_filter('bzip2', 0)
-        self.assertEqual(['bzip2', 'gzip', 'bzip2'], mime.get_filters())
-        mime.remove_filter(2)
-        self.assertEqual(['bzip2', 'gzip'], mime.get_filters())
-        self.assertEqual('gzip', mime.get_filter(1))
-        mime = MIMEType('text/plain', 'SEND', filters = ['gzip', 'bzip2'])
-        self.assertEqual(['gzip', 'bzip2'], mime.get_filters())
-
-    def test_self_executed(self):
-        mime = MIMEType('text/plain', 'SEND')
-        self.assertEqual(None, mime.get_self_executed())
-        mime.set_self_executed('YES')
-        self.assertEqual('YES', mime.get_self_executed())
-        mime.set_self_executed(None)
-        self.assertEqual(None, mime.get_self_executed())
-        mime = MIMEType('text/plain', 'SEND', self_executed = 'YES')
-        self.assertEqual('YES', mime.get_self_executed())
-        
-    def test_definitions(self):
-        mime = MIMEType('text/plain', 'SEND')
-        self.assertEqual([], mime.get_definitions())
-        for definition in self.definitions:
-            mime.add_definition(definition)
-        self.assertEqual(self.definitions, mime.get_definitions())
-        for i in xrange(len(self.definitions)):
-            self.assertEqual(self.definitions[i], mime.get_definition(i))
-        mime.remove_definition(0)
-        self.assertEqual(self.definitions[1:], mime.get_definitions())
-        mime = MIMEType('text/plain', 'SEND', definitions = self.definitions)
-        self.assertEqual(self.definitions, mime.get_definitions())
-        
-    def test_equality(self):
-        self.assertEqual(MIMEType('text/plain', 'CGI', '/usr/bin/python',
-                                  set(['py']), '^/.*$', ['gzip'], 'NO',
-                                  self.definitions),
-                         MIMEType('text/plain', 'CGI', '/usr/bin/python',
-                                  set(['py']), '^/.*$', ['gzip'], 'NO',
-                                  self.definitions))
-        self.assertNotEqual(MIMEType('text/plain', 'CGI', '/usr/bin/python',
-                                  set(['py']), '^/.*$', ['gzip'], 'NO',
-                                  self.definitions),
-                            MIMEType('other', 'CGI', '/usr/bin/python',
-                                  set(['py']), '^/.*$', ['gzip'], 'NO',
-                                     self.definitions))
-        self.assertNotEqual(MIMEType('text/plain', 'CGI', '/usr/bin/python',
-                                     set(['py']), '^/.*$', ['gzip'], 'NO',
-                                     self.definitions),
-                            MIMEType('text/plain', 'SEND', '/usr/bin/python',
-                                     set(['py']), '^/.*$', ['gzip'], 'NO',
-                                     self.definitions))
-        self.assertNotEqual(MIMEType('text/plain', 'CGI', '/usr/bin/python',
-                                     set(['py']), '^/.*$', ['gzip'], 'NO',
-                                     self.definitions),
-                            MIMEType('text/plain', 'CGI', '/usr/bin/python26',
-                                     set(['py']), '^/.*$', ['gzip'], 'NO',
-                                     self.definitions))
-        self.assertNotEqual(MIMEType('text/plain', 'CGI', '/usr/bin/python',
-                                     set(['py']), '^/.*$', ['gzip'], 'NO',
-                                     self.definitions),
-                            MIMEType('text/plain', 'CGI', '/usr/bin/python',
-                                     set(['pyc']), '^/.*$', ['gzip'], 'NO',
-                                     self.definitions))
-        self.assertNotEqual(MIMEType('text/plain', 'CGI', '/usr/bin/python',
-                                     set(['py']), '^/.*$', ['gzip'], 'NO',
-                                     self.definitions),
-                            MIMEType('text/plain', 'CGI', '/usr/bin/python',
-                                     set(['py']), '^/other/.*$', ['gzip'], 'NO',
-                                     self.definitions))
-        self.assertNotEqual(MIMEType('text/plain', 'CGI', '/usr/bin/python',
-                                     set(['py']), '^/.*$', ['gzip'], 'NO',
-                                     self.definitions),
-                            MIMEType('text/plain', 'CGI', '/usr/bin/python',
-                                     set(['py']), '^/.*$', ['bzip2'], 'NO',
-                                     self.definitions))
-        self.assertNotEqual(MIMEType('text/plain', 'CGI', '/usr/bin/python',
-                                     set(['py']), '^/.*$', ['gzip'], 'NO',
-                                     self.definitions),
-                            MIMEType('text/plain', 'CGI', '/usr/bin/python',
-                                     set(['py']), '^/.*$', ['gzip'], 'YES',
-                                     self.definitions))
-        self.assertNotEqual(MIMEType('text/plain', 'CGI', '/usr/bin/python',
-                                     set(['py']), '^/.*$', ['gzip'], 'NO',
-                                     self.definitions),
-                            MIMEType('text/plain', 'CGI', '/usr/bin/python',
-                                     set(['py']), '^/.*$', ['gzip'], 'NO',
-                                     []))
-        self.assertNotEqual(MIMEType('text/plain', 'SEND'), 'other type')
-
-    def test_from_string(self):
-        text = '<MIME mime="text/plain" handler="SEND" />'
-        mime = MIMEType.from_string(text)
-        right = MIMEType('text/plain', 'SEND')
-        self.assertEqual(mime, right)
-
-    def test_from_string_param(self):
-        text = '<MIME mime="text/plain" handler="SEND" param="/usr/bin/python" />'
-        mime = MIMEType.from_string(text)
-        right = MIMEType('text/plain', 'SEND', '/usr/bin/python')
-        self.assertEqual(mime, right)
-
-    def test_from_string_extension(self):
-        text = '<MIME mime="text/plain" handler="SEND"><EXTENSION value="py" /></MIME>'
-        mime = MIMEType.from_string(text)
-        right = MIMEType('text/plain', 'SEND', extensions = ['py'])
-        self.assertEqual(mime, right)
-
-    def test_from_string_path(self):
-        text = '<MIME mime="text/plain" handler="SEND"><PATH regex="^/.*$" /></MIME>'
-        mime = MIMEType.from_string(text)
-        right = MIMEType('text/plain', 'SEND', path = '^/.*$')
-        self.assertEqual(mime, right)
-
-    def test_from_string_filter(self):
-        text = '''<MIME mime="text/plain" handler="SEND">
-  <FILTER value="gzip" />
-  <FILTER value="bzip2" />
-</MIME>'''
-        mime = MIMEType.from_string(text)
-        right = MIMEType('text/plain', 'SEND', filters = ['gzip', 'bzip2'])
-        self.assertEqual(mime, right)
-
-    def test_from_string_self_executed(self):
-        text = '<MIME mime="text/plain" handler="SEND" self="YES" />'
-        mime = MIMEType.from_string(text)
-        right = MIMEType('text/plain', 'SEND', self_executed = 'YES')
-        self.assertEqual(mime, right)
-
-    def test_from_string_definitions(self):
-        text = '<MIME mime="text/plain" handler="SEND">{0}</MIME>'.format(
-            '\n'.join(map(str, self.definitions)))
-        mime = MIMEType.from_string(text)
-        right = MIMEType('text/plain', 'SEND', definitions = self.definitions)
-        self.assertEqual(mime, right)
-        
-    def test_from_string_full(self):
-        text = '''<MIME mime="text/plain" handler="SEND" self="YES" param="python">
-  <EXTENSION value="py" />
-  <FILTER value="gzip" />
-  <FILTER value="bzip2" />
-  <PATH regex="^/.*$" />
-  {0}
-</MIME>'''.format('\n'.join(map(str, self.definitions)))
-        mime = MIMEType.from_string(text)
-        right = MIMEType('text/plain', 'SEND', 'python', ['py'], '^/.*$',
-                         ['gzip', 'bzip2'], 'YES', self.definitions)
-        self.assertEqual(mime, right)
-
-    def test_from_lxml(self):
-        text = '<MIME mime="text/plain" handler="SEND" />'
-        mime = MIMEType.from_lxml_element(etree.XML(text))
-        right = MIMEType('text/plain', 'SEND')
-        self.assertEqual(mime, right)
-
-    def test_from_lxml_param(self):
-        text = '<MIME mime="text/plain" handler="SEND" param="/usr/bin/python" />'
-        mime = MIMEType.from_lxml_element(etree.XML(text))
-        right = MIMEType('text/plain', 'SEND', '/usr/bin/python')
-        self.assertEqual(mime, right)
-
-    def test_from_lxml_extension(self):
-        text = '<MIME mime="text/plain" handler="SEND"><EXTENSION value="py" /></MIME>'
-        mime = MIMEType.from_lxml_element(etree.XML(text))
-        right = MIMEType('text/plain', 'SEND', extensions = ['py'])
-        self.assertEqual(mime, right)
-
-    def test_from_lxml_path(self):
-        text = '<MIME mime="text/plain" handler="SEND"><PATH regex="^/.*$" /></MIME>'
-        mime = MIMEType.from_lxml_element(etree.XML(text))
-        right = MIMEType('text/plain', 'SEND', path = '^/.*$')
-        self.assertEqual(mime, right)
-
-    def test_from_lxml_filter(self):
-        text = '''<MIME mime="text/plain" handler="SEND">
-  <FILTER value="gzip" />
-  <FILTER value="bzip2" />
-</MIME>'''
-        mime = MIMEType.from_lxml_element(etree.XML(text))
-        right = MIMEType('text/plain', 'SEND', filters = ['gzip', 'bzip2'])
-        self.assertEqual(mime, right)
-
-    def test_from_lxml_self_executed(self):
-        text = '<MIME mime="text/plain" handler="SEND" self="YES" />'
-        mime = MIMEType.from_lxml_element(etree.XML(text))
-        right = MIMEType('text/plain', 'SEND', self_executed = 'YES')
-        self.assertEqual(mime, right)
-
-    def test_from_lxml_definitions(self):
-        text = '<MIME mime="text/plain" handler="SEND">{0}</MIME>'.format(
-            '\n'.join(map(str, self.definitions)))
-        mime = MIMEType.from_lxml_element(etree.XML(text))
-        right = MIMEType('text/plain', 'SEND', definitions = self.definitions)
-        self.assertEqual(mime, right)
-
-    def test_from_lxml_full(self):
-        text = '''<MIME mime="text/plain" handler="SEND" self="YES" param="python">
-  <EXTENSION value="py" />
-  <FILTER value="gzip" />
-  <FILTER value="bzip2" />
-  <PATH regex="^/.*$" />
-  {0}
-</MIME>'''.format('\n'.join(map(str, self.definitions)))
-        mime = MIMEType.from_lxml_element(etree.XML(text))
-        right = MIMEType('text/plain', 'SEND', 'python', ['py'], '^/.*$',
-                         ['gzip', 'bzip2'], 'YES', self.definitions)
-        self.assertEqual(mime, right)
-
-    def test_bad_root_tag(self):
-        text = '<ERROR mime="application/xhtml+xml" handler="CGI" />'
-        self.assertRaises(AttributeError, MIMEType.from_string, text)
-        self.assertRaises(AttributeError, MIMEType.from_lxml_element,
-                          etree.XML(text))
-        
-    def test_to_string(self):
-        mime = MIMEType('text/plain', 'SEND')
-        copy = MIMEType.from_string(str(mime))
-        self.assertEqual(mime, copy)
-
-    def test_to_string_param(self):
-        mime = MIMEType('text/plain', 'SEND', '/usr/bin/python')
-        copy = MIMEType.from_string(str(mime))
-        self.assertEqual(mime, copy)
-
-    def test_to_string_extension(self):
-        mime = MIMEType('text/plain', 'SEND', extensions = ['py'])
-        copy = MIMEType.from_string(str(mime))
-        self.assertEqual(mime, copy)
-
-    def test_to_string_path(self):
-        mime = MIMEType('text/plain', 'SEND', path = '^/.*$')
-        copy = MIMEType.from_string(str(mime))
-        self.assertEqual(mime, copy)
-
-    def test_to_string_filter(self):
-        mime = MIMEType('text/plain', 'SEND', filters = ['gzip', 'bzip2'])
-        copy = MIMEType.from_string(str(mime))
-        self.assertEqual(mime, copy)
-
-    def test_to_string_self_executed(self):
-        mime = MIMEType('text/plain', 'SEND', self_executed = 'YES')
-        copy = MIMEType.from_string(str(mime))
-        self.assertEqual(mime, copy)
-
-    def test_to_string_definitions(self):
-        mime = MIMEType('text/plain', 'SEND', definitions = self.definitions)
-        copy = MIMEType.from_string(str(mime))
-        self.assertEqual(mime, copy)
-        
-    def test_to_string_full(self):
-        mime = MIMEType('text/plain', 'SEND', 'python', ['py'], '^/.*$',
-                        ['gzip', 'bzip2'], 'YES', self.definitions)
-        copy = MIMEType.from_string(str(mime))
-        self.assertEqual(mime, copy)
-
-    def test_to_lxml(self):
-        mime = MIMEType('text/plain', 'SEND')
-        copy = MIMEType.from_lxml_element(mime.to_lxml_element())
-        self.assertEqual(mime, copy)
-
-    def test_to_lxml_param(self):
-        mime = MIMEType('text/plain', 'SEND', '/usr/bin/python')
-        copy = MIMEType.from_lxml_element(mime.to_lxml_element())
-        self.assertEqual(mime, copy)
-
-    def test_to_lxml_extension(self):
-        mime = MIMEType('text/plain', 'SEND', extensions = ['py'])
-        copy = MIMEType.from_lxml_element(mime.to_lxml_element())
-        self.assertEqual(mime, copy)
-
-    def test_to_lxml_path(self):
-        mime = MIMEType('text/plain', 'SEND', path = '^/.*$')
-        copy = MIMEType.from_lxml_element(mime.to_lxml_element())
-        self.assertEqual(mime, copy)
-
-    def test_to_lxml_filter(self):
-        mime = MIMEType('text/plain', 'SEND', filters = ['gzip', 'bzip2'])
-        copy = MIMEType.from_lxml_element(mime.to_lxml_element())
-        self.assertEqual(mime, copy)
-
-    def test_to_lxml_self_executed(self):
-        mime = MIMEType('text/plain', 'SEND', self_executed = 'YES')
-        copy = MIMEType.from_lxml_element(mime.to_lxml_element())
-        self.assertEqual(mime, copy)
-
-    def test_to_lxml_definitions(self):
-        mime = MIMEType('text/plain', 'SEND', definitions = self.definitions)
-        copy = MIMEType.from_lxml_element(mime.to_lxml_element())
-        self.assertEqual(mime, copy)
-        
-    def test_to_lxml_full(self):
-        mime = MIMEType('text/plain', 'SEND', 'python', ['py'], '^/.*$',
-                        ['gzip', 'bzip2'], 'YES', self.definitions)
-        copy = MIMEType.from_lxml_element(mime.to_lxml_element())
-        self.assertEqual(mime, copy)
-
-class MIMETypesTest(unittest.TestCase):
-    def setUp(self):
-        self.mime_0 = MIMEType('text/html', 'FASTCGI', '', self_executed = 'YES',
-                               extensions = ['fcgi'])
-        self.mime_1 = MIMEType('text/plain', 'SEND', '',
-                               extensions = ['asc', 'c', 'cc', 'f', 'f90', 'h', 'hh'])
-        self.text = '<MIMES>{0}{1}</MIMES>'.format(self.mime_0, self.mime_1)
-    
-    def test_creation(self):
-        mimes = MIMETypes([self.mime_0, self.mime_1])
-        self.assertEqual(mimes.MIME_types[0], self.mime_0)
-        self.assertEqual(mimes.MIME_types[1], self.mime_1)
-
-    def test_from_string(self):
-        mimes = MIMETypes.from_string(self.text)
-        self.assertEqual(mimes.MIME_types[0], self.mime_0)
-        self.assertEqual(mimes.MIME_types[1], self.mime_1)
-
-    def test_from_lxml(self):
-        mimes = MIMETypes.from_lxml_element(etree.XML(self.text))
-        self.assertEqual(mimes.MIME_types[0], self.mime_0)
-        self.assertEqual(mimes.MIME_types[1], self.mime_1)
-        
-    def test_to_string(self):
-        mimes = MIMETypes.from_string(self.text)
-        copy = MIMETypes.from_string(str(mimes))
-        self.assertEqual(mimes, copy)
-        
-    def test_to_lxml(self):
-        mimes = MIMETypes.from_string(self.text)
-        copy = MIMETypes.from_lxml_element(mimes.to_lxml_element())
-        self.assertEqual(mimes, copy)
-
-    def test_equality(self):
-        self.assertEqual(MIMETypes.from_string(self.text),
-                         MIMETypes.from_string(self.text))
-        self.assertNotEqual(MIMETypes.from_string(self.text),
-                            MIMETypes.from_string(
-                '<MIMES>{0}</MIMES>'.format(self.mime_0)))
-        self.assertNotEqual(MIMETypes.from_string(self.text), [])
-
-    def test_bad_root_tag(self):
-        text = '<ERROR>{0}{1}</ERROR>'.format(
-            self.mime_0, self.mime_1)
-        self.assertRaises(AttributeError, MIMETypes.from_string, text)
-        self.assertRaises(AttributeError, MIMETypes.from_lxml_element,
-                          etree.XML(text))
-
-class BadMarkupTest(unittest.TestCase):
-    def test_mime_types(self):
-        text = '''
-<MIMES custom="unknown">
-  <MIME mime="text/plain" />
-  <MIME mime="text/html" />
-  <UNKNOWN>
-    <CUSTOM />
-  </UNKNOWN>
-</MIMES>'''
-        mimes = MIMETypes.from_string(text)
-        tree = mimes.to_lxml_element()
-        self.assertEqual('unknown', tree.get('custom'))
-        self.assertEqual(2, len(tree.findall('MIME')))
-        unknown = tree.findall('UNKNOWN')
-        self.assertEqual(1, len(unknown))
-        unknown = unknown[0]
-        custom = list(unknown)
-        self.assertEqual(1, len(custom))
-        custom = custom[0]
-        self.assertEqual('CUSTOM', custom.tag)
-
-    def test_mime_type(self):
-        text = '''
-<MIME mime="text/plain" custom="unknown">
-  <CUSTOM />
-</MIME>'''
-        mime = MIMEType.from_string(text)
-        tree = mime.to_lxml_element()
-        self.assertEqual('unknown', tree.get('custom'))
-        custom = tree.findall('CUSTOM')
-        self.assertEqual(1, len(custom))
-        
-if __name__ == '__main__':
-    unittest.main()
diff --git a/misc/py_control_client/MyServer/pycontrollib/test/security_test.py b/misc/py_control_client/MyServer/pycontrollib/test/security_test.py
deleted file mode 100644
index a9e4ba3..0000000
--- a/misc/py_control_client/MyServer/pycontrollib/test/security_test.py
+++ /dev/null
@@ -1,1122 +0,0 @@
-# -*- coding: utf-8 -*-
-'''
-MyServer
-Copyright (C) 2009 Free Software Foundation, Inc.
-This program 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 3 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program.  If not, see <http://www.gnu.org/licenses/>.
-'''
-
-from security import SecurityElement, User, Condition, Permission, Return, SecurityList
-from definition import Definition
-from lxml import etree
-import unittest
-
-class SecurityElementTest(unittest.TestCase):
-    def test_creation(self):
-        element = SecurityElement()
-
-    def test_from_string(self):
-        text = '<USER />'
-        element = SecurityElement.from_string(text)
-        self.assertTrue(isinstance(element, User))
-        text = '<CONDITION />'
-        element = SecurityElement.from_string(text)
-        self.assertTrue(isinstance(element, Condition))
-        text = '<PERMISSION />'
-        element = SecurityElement.from_string(text)
-        self.assertTrue(isinstance(element, Permission))
-        text = '<RETURN />'
-        element = SecurityElement.from_string(text)
-        self.assertTrue(isinstance(element, Return))
-        text = '<DEFINE />'
-        element = SecurityElement.from_string(text)
-        self.assertTrue(isinstance(element, Definition))
-
-class ConditionTest(unittest.TestCase):
-    def test_creation(self):
-        condition = Condition()
-        condition = Condition('name')
-        condition = Condition('name', 'value')
-        condition = Condition('name', 'value', False)
-        condition = Condition('name', 'value', False, False)
-        condition = Condition('name', 'value', False, False, [])
-
-    def test_name(self):
-        condition = Condition('name1')
-        self.assertEqual('name1', condition.get_name())
-        condition.set_name('name2')
-        self.assertEqual('name2', condition.get_name())
-        condition.set_name(None)
-        self.assertEqual(None, condition.get_name())
-        condition = Condition(name = 'name1')
-        self.assertEqual('name1', condition.get_name())
-
-    def test_value(self):
-        condition = Condition('name1', 'value1')
-        self.assertEqual('value1', condition.get_value())
-        condition.set_value('value2')
-        self.assertEqual('value2', condition.get_value())
-        condition.set_value(None)
-        self.assertEqual(None, condition.get_value())
-        condition = Condition(value = 'value1')
-        self.assertEqual('value1', condition.get_value())
-
-    def test_reverse(self):
-        condition = Condition('name1', 'value1', False)
-        self.assertFalse(condition.get_reverse())
-        condition.set_reverse(True)
-        self.assertTrue(condition.get_reverse())
-        condition.set_reverse(None)
-        self.assertEqual(None, condition.get_reverse())
-        condition = Condition(reverse = True)
-        self.assertTrue(condition.get_reverse())
-
-    def test_regex(self):
-        condition = Condition('name1', 'value1', False, False)
-        self.assertFalse(condition.get_regex())
-        condition.set_regex(True)
-        self.assertTrue(condition.get_regex())
-        condition.set_regex(None)
-        self.assertEqual(None, condition.get_regex())
-        condition = Condition(regex = True)
-        self.assertTrue(condition.get_regex())
-
-    def test_sub_elements(self):
-        element_0 = Condition()
-        element_1 = Return()
-        condition = Condition()
-        self.assertEqual(0, len(condition.get_sub_elements()))
-        condition.add_sub_element(element_0)
-        self.assertEqual(1, len(condition.get_sub_elements()))
-        self.assertEqual(element_0, condition.get_sub_element(0))
-        condition.add_sub_element(element_1)
-        self.assertEqual(2, len(condition.get_sub_elements()))
-        self.assertEqual(element_0, condition.get_sub_element(0))
-        self.assertEqual(element_1, condition.get_sub_element(1))
-        condition.remove_sub_element(0)
-        self.assertEqual(1, len(condition.get_sub_elements()))
-        self.assertEqual(element_1, condition.get_sub_element(0))
-        condition.add_sub_element(element_0, 0)
-        self.assertEqual(2, len(condition.get_sub_elements()))
-        self.assertEqual(element_0, condition.get_sub_element(0))
-        self.assertEqual(element_1, condition.get_sub_element(1))
-        self.assertRaises(IndexError, condition.get_sub_element, 2)
-        condition = Condition(sub_elements = [element_0, element_1])
-        self.assertEqual(2, len(condition.get_sub_elements()))
-        self.assertEqual(element_0, condition.get_sub_element(0))
-        self.assertEqual(element_1, condition.get_sub_element(1))
-
-    def test_equality(self):
-        self.assertEqual(
-            Condition('name1', 'value1', False, False, []),
-            Condition('name1', 'value1', False, False, []))
-        self.assertNotEqual(
-            Condition('name1', 'value1', False, False, []),
-            Condition('name2', 'value1', False, False, []))
-        self.assertNotEqual(
-            Condition('name1', 'value1', False, False, []),
-            Condition('name1', 'value2', False, False, []))
-        self.assertNotEqual(
-            Condition('name1', 'value1', False, False, []),
-            Condition('name1', 'value1', True, False, []))
-        self.assertNotEqual(
-            Condition('name1', 'value1', False, False, []),
-            Condition('name1', 'value1', False, True, []))
-        self.assertNotEqual(
-            Condition('name1', 'value1', False, False, []),
-            Condition('name1', 'value1', False, False, [Condition()]))
-        self.assertNotEqual(Condition(), 'another type')
-
-    def test_from_string(self):
-        text = '<CONDITION />'
-        condition = Condition.from_string(text)
-        right = Condition()
-        self.assertEqual(condition, right)
-
-    def test_from_string_name(self):
-        text = '<CONDITION name="test" />'
-        condition = Condition.from_string(text)
-        right = Condition(name = 'test')
-        self.assertEqual(condition, right)
-
-    def test_from_string_value(self):
-        text = '<CONDITION value="test" />'
-        condition = Condition.from_string(text)
-        right = Condition(value = 'test')
-        self.assertEqual(condition, right)
-
-    def test_from_string_reverse(self):
-        text = '<CONDITION not="yes" />'
-        condition = Condition.from_string(text)
-        right = Condition(reverse = True)
-        self.assertEqual(condition, right)
-
-    def test_from_string_regex(self):
-        text = '<CONDITION regex="yes" />'
-        condition = Condition.from_string(text)
-        right = Condition(regex = True)
-        self.assertEqual(condition, right)
-
-    def test_from_string_sub_elements(self):
-        text = '<CONDITION><PERMISSION /><RETURN /></CONDITION>'
-        condition = Condition.from_string(text)
-        right = Condition(sub_elements = [Permission(), Return()])
-        self.assertEqual(condition, right)
-
-    def test_from_string_full(self):
-        text = '''
-<CONDITION name="name" value="value" not="yes" regex="yes">
-  <PERMISSION />
-  <RETURN />
-</CONDITION>'''
-        condition = Condition.from_string(text)
-        right = Condition('name', 'value', True, True,
-                          [Permission(), Return()])
-        self.assertEqual(condition, right)
-
-    def test_from_lxml(self):
-        text = '<CONDITION />'
-        condition = Condition.from_lxml_element(etree.XML(text))
-        right = Condition()
-        self.assertEqual(condition, right)
-
-    def test_from_lxml_name(self):
-        text = '<CONDITION name="test" />'
-        condition = Condition.from_lxml_element(etree.XML(text))
-        right = Condition(name = 'test')
-        self.assertEqual(condition, right)
-
-    def test_from_lxml_value(self):
-        text = '<CONDITION value="test" />'
-        condition = Condition.from_lxml_element(etree.XML(text))
-        right = Condition(value = 'test')
-        self.assertEqual(condition, right)
-
-    def test_from_lxml_reverse(self):
-        text = '<CONDITION not="yes" />'
-        condition = Condition.from_lxml_element(etree.XML(text))
-        right = Condition(reverse = True)
-        self.assertEqual(condition, right)
-
-    def test_from_lxml_regex(self):
-        text = '<CONDITION regex="yes" />'
-        condition = Condition.from_lxml_element(etree.XML(text))
-        right = Condition(regex = True)
-        self.assertEqual(condition, right)
-
-    def test_from_lxml_sub_elements(self):
-        text = '<CONDITION><PERMISSION /><RETURN /></CONDITION>'
-        condition = Condition.from_lxml_element(etree.XML(text))
-        right = Condition(sub_elements = [Permission(), Return()])
-        self.assertEqual(condition, right)
-
-    def test_from_lxml_full(self):
-        text = '''
-<CONDITION name="name" value="value" not="yes" regex="yes">
-  <PERMISSION />
-  <RETURN />
-</CONDITION>'''
-        condition = Condition.from_lxml_element(etree.XML(text))
-        right = Condition('name', 'value', True, True,
-                          [Permission(), Return()])
-        self.assertEqual(condition, right)
-
-    def test_to_string(self):
-        condition = Condition()
-        copy = Condition.from_string(str(condition))
-        self.assertEqual(condition, copy)
-
-    def test_to_string_name(self):
-        condition = Condition(name = 'name')
-        copy = Condition.from_string(str(condition))
-        self.assertEqual(condition, copy)
-
-    def test_to_string_value(self):
-        condition = Condition(value = 'value')
-        copy = Condition.from_string(str(condition))
-        self.assertEqual(condition, copy)
-
-    def test_to_string_reverse(self):
-        condition = Condition(reverse = True)
-        copy = Condition.from_string(str(condition))
-        self.assertEqual(condition, copy)
-
-    def test_to_string_regex(self):
-        condition = Condition(regex = True)
-        copy = Condition.from_string(str(condition))
-        self.assertEqual(condition, copy)
-
-    def test_to_string_sub_elements(self):
-        condition = Condition(sub_elements = [Permission(), Return()])
-        copy = Condition.from_string(str(condition))
-        self.assertEqual(condition, copy)
-
-    def test_to_string_full(self):
-        condition = Condition('name', 'value', True, True,
-                              [Permission(), Return()])
-        copy = Condition.from_string(str(condition))
-        self.assertEqual(condition, copy)
-
-    def test_to_lxml(self):
-        condition = Condition()
-        copy = Condition.from_lxml_element(condition.to_lxml_element())
-        self.assertEqual(condition, copy)
-
-    def test_to_lxml_name(self):
-        condition = Condition(name = 'name')
-        copy = Condition.from_lxml_element(condition.to_lxml_element())
-        self.assertEqual(condition, copy)
-
-    def test_to_lxml_value(self):
-        condition = Condition(value = 'value')
-        copy = Condition.from_lxml_element(condition.to_lxml_element())
-        self.assertEqual(condition, copy)
-
-    def test_to_lxml_reverse(self):
-        condition = Condition(reverse = True)
-        copy = Condition.from_lxml_element(condition.to_lxml_element())
-        self.assertEqual(condition, copy)
-
-    def test_to_lxml_regex(self):
-        condition = Condition(regex = True)
-        copy = Condition.from_lxml_element(condition.to_lxml_element())
-        self.assertEqual(condition, copy)
-
-    def test_to_lxml_sub_elements(self):
-        condition = Condition(sub_elements = [Permission(), Return()])
-        copy = Condition.from_lxml_element(condition.to_lxml_element())
-        self.assertEqual(condition, copy)
-
-    def test_to_lxml_full(self):
-        condition = Condition('name', 'value', True, True,
-                              [Permission(), Return()])
-        copy = Condition.from_lxml_element(condition.to_lxml_element())
-        self.assertEqual(condition, copy)
-
-    def test_bad_root_tag(self):
-        text = '<ERROR />'
-        self.assertRaises(AttributeError, Condition.from_string, text)
-        self.assertRaises(AttributeError, Condition.from_lxml_element,
-                          etree.XML(text))
-
-class PermissionTest(unittest.TestCase):
-    def test_creation(self):
-        permission = Permission()
-        permission = Permission(True)
-        permission = Permission(True, True)
-        permission = Permission(True, True, True)
-        permission = Permission(True, True, True, True)
-        permission = Permission(True, True, True, True, True)
-
-    def test_read(self):
-        permission = Permission(True)
-        self.assertTrue(permission.get_read())
-        permission.set_read(False)
-        self.assertFalse(permission.get_read())
-        permission.set_read(None)
-        self.assertEqual(None, permission.get_read())
-        permission = Permission(read = True)
-        self.assertTrue(permission.get_read())
-
-    def test_execute(self):
-        permission = Permission(True, True)
-        self.assertTrue(permission.get_execute())
-        permission.set_execute(False)
-        self.assertFalse(permission.get_execute())
-        permission.set_execute(None)
-        self.assertEqual(None, permission.get_execute())
-        permission = Permission(execute = True)
-        self.assertTrue(permission.get_execute())
-
-    def test_browse(self):
-        permission = Permission(True, True, False)
-        self.assertFalse(permission.get_browse())
-        permission.set_browse(True)
-        self.assertTrue(permission.get_browse())
-        permission.set_browse(None)
-        self.assertEqual(None, permission.get_browse())
-        permission = Permission(browse = True)
-        self.assertTrue(permission.get_browse())
-
-    def test_delete(self):
-        permission = Permission(True, True, False, False)
-        self.assertFalse(permission.get_delete())
-        permission.set_delete(True)
-        self.assertTrue(permission.get_delete())
-        permission.set_delete(None)
-        self.assertEqual(None, permission.get_delete())
-        permission = Permission(delete = True)
-        self.assertTrue(permission.get_delete())
-
-    def test_write(self):
-        permission = Permission(True, True, False, False, False)
-        self.assertFalse(permission.get_write())
-        permission.set_write(True)
-        self.assertTrue(permission.get_write())
-        permission.set_write(None)
-        self.assertEqual(None, permission.get_write())
-        permission = Permission(write = True)
-        self.assertTrue(permission.get_write())
-
-    def test_equality(self):
-        self.assertEqual(
-            Permission(False, False, False, False, False),
-            Permission(False, False, False, False, False))
-        self.assertNotEqual(
-            Permission(False, False, False, False, False),
-            Permission(True, False, False, False, False))
-        self.assertNotEqual(
-            Permission(False, False, False, False, False),
-            Permission(False, True, False, False, False))
-        self.assertNotEqual(
-            Permission(False, False, False, False, False),
-            Permission(False, False, True, False, False))
-        self.assertNotEqual(
-            Permission(False, False, False, False, False),
-            Permission(False, False, False, True, False))
-        self.assertNotEqual(
-            Permission(False, False, False, False, False),
-            Permission(False, False, False, False, True))
-        self.assertNotEqual(Permission(), 'another type')
-
-    def test_from_string(self):
-        text = '<PERMISSION />'
-        permission = Permission.from_string(text)
-        right = Permission()
-        self.assertEqual(permission, right)
-
-    def test_from_string_read(self):
-        text = '<PERMISSION READ="NO" />'
-        permission = Permission.from_string(text)
-        right = Permission(read = False)
-        self.assertEqual(permission, right)
-
-    def test_from_string_execute(self):
-        text = '<PERMISSION EXECUTE="NO" />'
-        permission = Permission.from_string(text)
-        right = Permission(execute = False)
-        self.assertEqual(permission, right)
-
-    def test_from_string_browse(self):
-        text = '<PERMISSION BROWSE="NO" />'
-        permission = Permission.from_string(text)
-        right = Permission(browse = False)
-        self.assertEqual(permission, right)
-
-    def test_from_string_delete(self):
-        text = '<PERMISSION DELETE="NO" />'
-        permission = Permission.from_string(text)
-        right = Permission(delete = False)
-        self.assertEqual(permission, right)
-
-    def test_from_string_write(self):
-        text = '<PERMISSION WRITE="NO" />'
-        permission = Permission.from_string(text)
-        right = Permission(write = False)
-        self.assertEqual(permission, right)
-
-    def test_from_string_full(self):
-        text = '''
-<PERMISSION READ="NO" EXECUTE="YES" BROWSE="NO" DELETE="YES" WRITE="NO" />'''
-        permission = Permission.from_string(text)
-        right = Permission(False, True, False, True, False)
-        self.assertEqual(permission, right)
-
-    def test_from_lxml(self):
-        text = '<PERMISSION />'
-        permission = Permission.from_lxml_element(etree.XML(text))
-        right = Permission()
-        self.assertEqual(permission, right)
-
-    def test_from_lxml_read(self):
-        text = '<PERMISSION READ="NO" />'
-        permission = Permission.from_lxml_element(etree.XML(text))
-        right = Permission(read = False)
-        self.assertEqual(permission, right)
-
-    def test_from_lxml_execute(self):
-        text = '<PERMISSION EXECUTE="NO" />'
-        permission = Permission.from_lxml_element(etree.XML(text))
-        right = Permission(execute = False)
-        self.assertEqual(permission, right)
-
-    def test_from_lxml_browse(self):
-        text = '<PERMISSION BROWSE="NO" />'
-        permission = Permission.from_lxml_element(etree.XML(text))
-        right = Permission(browse = False)
-        self.assertEqual(permission, right)
-
-    def test_from_lxml_delete(self):
-        text = '<PERMISSION DELETE="NO" />'
-        permission = Permission.from_lxml_element(etree.XML(text))
-        right = Permission(delete = False)
-        self.assertEqual(permission, right)
-
-    def test_from_lxml_write(self):
-        text = '<PERMISSION WRITE="NO" />'
-        permission = Permission.from_lxml_element(etree.XML(text))
-        right = Permission(write = False)
-        self.assertEqual(permission, right)
-
-    def test_from_lxml_full(self):
-        text = '''
-<PERMISSION READ="NO" EXECUTE="YES" BROWSE="NO" DELETE="YES" WRITE="NO" />'''
-        permission = Permission.from_lxml_element(etree.XML(text))
-        right = Permission(False, True, False, True, False)
-        self.assertEqual(permission, right)
-
-    def test_to_string(self):
-        permission = Permission()
-        copy = Permission.from_string(str(permission))
-        self.assertEqual(permission, copy)
-
-    def test_to_string_read(self):
-        permission = Permission(read = True)
-        copy = Permission.from_string(str(permission))
-        self.assertEqual(permission, copy)
-
-    def test_to_string_execute(self):
-        permission = Permission(execute = True)
-        copy = Permission.from_string(str(permission))
-        self.assertEqual(permission, copy)
-
-    def test_to_string_browse(self):
-        permission = Permission(browse = True)
-        copy = Permission.from_string(str(permission))
-        self.assertEqual(permission, copy)
-
-    def test_to_string_delete(self):
-        permission = Permission(delete = True)
-        copy = Permission.from_string(str(permission))
-        self.assertEqual(permission, copy)
-
-    def test_to_string_write(self):
-        permission = Permission(write = True)
-        copy = Permission.from_string(str(permission))
-        self.assertEqual(permission, copy)
-
-    def test_to_string_full(self):
-        permission = Permission(True, False, True, False, True)
-        copy = Permission.from_string(str(permission))
-        self.assertEqual(permission, copy)
-
-    def test_to_lxml(self):
-        permission = Permission()
-        copy = Permission.from_lxml_element(permission.to_lxml_element())
-        self.assertEqual(permission, copy)
-
-    def test_to_lxml_read(self):
-        permission = Permission(read = True)
-        copy = Permission.from_lxml_element(permission.to_lxml_element())
-        self.assertEqual(permission, copy)
-
-    def test_to_lxml_execute(self):
-        permission = Permission(execute = True)
-        copy = Permission.from_lxml_element(permission.to_lxml_element())
-        self.assertEqual(permission, copy)
-
-    def test_to_lxml_browse(self):
-        permission = Permission(browse = True)
-        copy = Permission.from_lxml_element(permission.to_lxml_element())
-        self.assertEqual(permission, copy)
-
-    def test_to_lxml_delete(self):
-        permission = Permission(delete = True)
-        copy = Permission.from_lxml_element(permission.to_lxml_element())
-        self.assertEqual(permission, copy)
-
-    def test_to_lxml_write(self):
-        permission = Permission(write = True)
-        copy = Permission.from_lxml_element(permission.to_lxml_element())
-        self.assertEqual(permission, copy)
-
-    def test_to_lxml_full(self):
-        permission = Permission(True, False, True, False, True)
-        copy = Permission.from_lxml_element(permission.to_lxml_element())
-        self.assertEqual(permission, copy)
-
-    def test_bad_root_tag(self):
-        text = '<ERROR />'
-        self.assertRaises(AttributeError, Permission.from_string, text)
-        self.assertRaises(AttributeError, Permission.from_lxml_element,
-                          etree.XML(text))
-
-class UserTest(unittest.TestCase):
-    def test_creation(self):
-        user = User()
-        user = User('name')
-        user = User('name', 'password')
-        user = User('name', 'password', True)
-        user = User('name', 'password', True, True)
-        user = User('name', 'password', True, True, True)
-        user = User('name', 'password', True, True, True, True)
-        user = User('name', 'password', True, True, True, True, True)
-
-    def test_name(self):
-        user = User('name')
-        self.assertEqual('name', user.get_name())
-        user.set_name('other')
-        self.assertEqual('other', user.get_name())
-        user.set_name(None)
-        self.assertEqual(None, user.get_name())
-        user = User(name = 'name')
-        self.assertEqual('name', user.get_name())
-
-    def test_password(self):
-        user = User('name', 'password')
-        self.assertEqual('password', user.get_password())
-        user.set_password('other')
-        self.assertEqual('other', user.get_password())
-        user.set_password(None)
-        self.assertEqual(None, user.get_password())
-        user = User(password = 'password')
-        self.assertEqual('password', user.get_password())
-
-    def test_read(self):
-        user = User('name', 'password', True)
-        self.assertTrue(user.get_read())
-        user.set_read(False)
-        self.assertFalse(user.get_read())
-        user.set_read(None)
-        self.assertEqual(None, user.get_read())
-        user = User(read = True)
-        self.assertTrue(user.get_read())
-
-    def test_execute(self):
-        user = User('name', 'password', True, True)
-        self.assertTrue(user.get_execute())
-        user.set_execute(False)
-        self.assertFalse(user.get_execute())
-        user.set_execute(None)
-        self.assertEqual(None, user.get_execute())
-        user = User(execute = True)
-        self.assertTrue(user.get_execute())
-
-    def test_browse(self):
-        user = User('name', 'password', True, True, False)
-        self.assertFalse(user.get_browse())
-        user.set_browse(True)
-        self.assertTrue(user.get_browse())
-        user.set_browse(None)
-        self.assertEqual(None, user.get_browse())
-        user = User(browse = True)
-        self.assertTrue(user.get_browse())
-
-    def test_delete(self):
-        user = User('name', 'password', True, True, False, False)
-        self.assertFalse(user.get_delete())
-        user.set_delete(True)
-        self.assertTrue(user.get_delete())
-        user.set_delete(None)
-        self.assertEqual(None, user.get_delete())
-        user = User(delete = True)
-        self.assertTrue(user.get_delete())
-
-    def test_write(self):
-        user = User('name', 'password', True, True, False, False, False)
-        self.assertFalse(user.get_write())
-        user.set_write(True)
-        self.assertTrue(user.get_write())
-        user.set_write(None)
-        self.assertEqual(None, user.get_write())
-        user = User(write = True)
-        self.assertTrue(user.get_write())
-
-    def test_equality(self):
-        self.assertEqual(
-            User('name', 'password', False, False, False, False, False),
-            User('name', 'password', False, False, False, False, False))
-        self.assertNotEqual(
-            User('name', 'password', False, False, False, False, False),
-            User('other', 'password', False, False, False, False, False))
-        self.assertNotEqual(
-            User('name', 'password', False, False, False, False, False),
-            User('name', 'other', False, False, False, False, False))
-        self.assertNotEqual(
-            User('name', 'password', False, False, False, False, False),
-            User('name', 'password', True, False, False, False, False))
-        self.assertNotEqual(
-            User('name', 'password', False, False, False, False, False),
-            User('name', 'password', False, True, False, False, False))
-        self.assertNotEqual(
-            User('name', 'password', False, False, False, False, False),
-            User('name', 'password', False, False, True, False, False))
-        self.assertNotEqual(
-            User('name', 'password', False, False, False, False, False),
-            User('name', 'password', False, False, False, True, False))
-        self.assertNotEqual(
-            User('name', 'password', False, False, False, False, False),
-            User('name', 'password', False, False, False, False, True))
-        self.assertNotEqual(User(), 'another type')
-
-    def test_from_string(self):
-        text = '<USER />'
-        user = User.from_string(text)
-        right = User()
-        self.assertEqual(user, right)
-
-    def test_from_string_name(self):
-        text = '<USER name="name" />'
-        user = User.from_string(text)
-        right = User(name = 'name')
-        self.assertEqual(user, right)
-
-    def test_from_string_password(self):
-        text = '<USER password="pass" />'
-        user = User.from_string(text)
-        right = User(password = 'pass')
-        self.assertEqual(user, right)
-
-    def test_from_string_read(self):
-        text = '<USER READ="NO" />'
-        user = User.from_string(text)
-        right = User(read = False)
-        self.assertEqual(user, right)
-
-    def test_from_string_execute(self):
-        text = '<USER EXECUTE="NO" />'
-        user = User.from_string(text)
-        right = User(execute = False)
-        self.assertEqual(user, right)
-
-    def test_from_string_browse(self):
-        text = '<USER BROWSE="NO" />'
-        user = User.from_string(text)
-        right = User(browse = False)
-        self.assertEqual(user, right)
-
-    def test_from_string_delete(self):
-        text = '<USER DELETE="NO" />'
-        user = User.from_string(text)
-        right = User(delete = False)
-        self.assertEqual(user, right)
-
-    def test_from_string_write(self):
-        text = '<USER WRITE="NO" />'
-        user = User.from_string(text)
-        right = User(write = False)
-        self.assertEqual(user, right)
-
-    def test_from_string_full(self):
-        text = '''
-<USER name="name" password="pass" READ="NO" EXECUTE="YES" BROWSE="NO"
-      DELETE="YES" WRITE="NO" />'''
-        user = User.from_string(text)
-        right = User('name', 'pass', False, True, False, True, False)
-        self.assertEqual(user, right)
-
-    def test_from_lxml(self):
-        text = '<USER />'
-        user = User.from_lxml_element(etree.XML(text))
-        right = User()
-        self.assertEqual(user, right)
-
-    def test_from_lxml_name(self):
-        text = '<USER name="name" />'
-        user = User.from_lxml_element(etree.XML(text))
-        right = User(name = 'name')
-        self.assertEqual(user, right)
-
-    def test_from_lxml_password(self):
-        text = '<USER password="pass" />'
-        user = User.from_lxml_element(etree.XML(text))
-        right = User(password = 'pass')
-        self.assertEqual(user, right)
-
-    def test_from_lxml_read(self):
-        text = '<USER READ="NO" />'
-        user = User.from_lxml_element(etree.XML(text))
-        right = User(read = False)
-        self.assertEqual(user, right)
-
-    def test_from_lxml_execute(self):
-        text = '<USER EXECUTE="NO" />'
-        user = User.from_lxml_element(etree.XML(text))
-        right = User(execute = False)
-        self.assertEqual(user, right)
-
-    def test_from_lxml_browse(self):
-        text = '<USER BROWSE="NO" />'
-        user = User.from_lxml_element(etree.XML(text))
-        right = User(browse = False)
-        self.assertEqual(user, right)
-
-    def test_from_lxml_delete(self):
-        text = '<USER DELETE="NO" />'
-        user = User.from_lxml_element(etree.XML(text))
-        right = User(delete = False)
-        self.assertEqual(user, right)
-
-    def test_from_lxml_write(self):
-        text = '<USER WRITE="NO" />'
-        user = User.from_lxml_element(etree.XML(text))
-        right = User(write = False)
-        self.assertEqual(user, right)
-
-    def test_from_lxml_full(self):
-        text = '''
-<USER name="name" password="pass" READ="NO" EXECUTE="YES" BROWSE="NO"
-      DELETE="YES" WRITE="NO" />'''
-        user = User.from_lxml_element(etree.XML(text))
-        right = User('name', 'pass', False, True, False, True, False)
-        self.assertEqual(user, right)
-
-    def test_to_string(self):
-        user = User()
-        copy = User.from_string(str(user))
-        self.assertEqual(user, copy)
-
-    def test_to_string_name(self):
-        user = User(name = 'name')
-        copy = User.from_string(str(user))
-        self.assertEqual(user, copy)
-
-    def test_to_string_password(self):
-        user = User(password = 'pass')
-        copy = User.from_string(str(user))
-        self.assertEqual(user, copy)
-
-    def test_to_string_read(self):
-        user = User(read = True)
-        copy = User.from_string(str(user))
-        self.assertEqual(user, copy)
-
-    def test_to_string_execute(self):
-        user = User(execute = True)
-        copy = User.from_string(str(user))
-        self.assertEqual(user, copy)
-
-    def test_to_string_browse(self):
-        user = User(browse = True)
-        copy = User.from_string(str(user))
-        self.assertEqual(user, copy)
-
-    def test_to_string_delete(self):
-        user = User(delete = True)
-        copy = User.from_string(str(user))
-        self.assertEqual(user, copy)
-
-    def test_to_string_write(self):
-        user = User(write = True)
-        copy = User.from_string(str(user))
-        self.assertEqual(user, copy)
-
-    def test_to_string_full(self):
-        user = User('name', 'pass', True, False, True, False, True)
-        copy = User.from_string(str(user))
-        self.assertEqual(user, copy)
-
-    def test_to_lxml(self):
-        user = User()
-        copy = User.from_lxml_element(user.to_lxml_element())
-        self.assertEqual(user, copy)
-
-    def test_to_lxml_name(self):
-        user = User(name = 'name')
-        copy = User.from_lxml_element(user.to_lxml_element())
-        self.assertEqual(user, copy)
-
-    def test_to_lxml_password(self):
-        user = User(password = 'pass')
-        copy = User.from_lxml_element(user.to_lxml_element())
-        self.assertEqual(user, copy)
-
-    def test_to_lxml_read(self):
-        user = User(read = True)
-        copy = User.from_lxml_element(user.to_lxml_element())
-        self.assertEqual(user, copy)
-
-    def test_to_lxml_execute(self):
-        user = User(execute = True)
-        copy = User.from_lxml_element(user.to_lxml_element())
-        self.assertEqual(user, copy)
-
-    def test_to_lxml_browse(self):
-        user = User(browse = True)
-        copy = User.from_lxml_element(user.to_lxml_element())
-        self.assertEqual(user, copy)
-
-    def test_to_lxml_delete(self):
-        user = User(delete = True)
-        copy = User.from_lxml_element(user.to_lxml_element())
-        self.assertEqual(user, copy)
-
-    def test_to_lxml_write(self):
-        user = User(write = True)
-        copy = User.from_lxml_element(user.to_lxml_element())
-        self.assertEqual(user, copy)
-
-    def test_to_lxml_full(self):
-        user = User('name', 'pass', True, False, True, False, True)
-        copy = User.from_lxml_element(user.to_lxml_element())
-        self.assertEqual(user, copy)
-
-    def test_bad_root_tag(self):
-        text = '<ERROR />'
-        self.assertRaises(AttributeError, User.from_string, text)
-        self.assertRaises(AttributeError, User.from_lxml_element,
-                          etree.XML(text))
-
-class ReturnTest(unittest.TestCase):
-    def test_creation(self):
-        ret = Return()
-        ret = Return('ALLOW')
-
-    def test_value(self):
-        ret = Return('ALLOW')
-        self.assertEqual('ALLOW', ret.get_value())
-        ret.set_value('DENY')
-        self.assertEqual('DENY', ret.get_value())
-        ret.set_value(None)
-        self.assertEqual(None, ret.get_value())
-        ret = Return(value = 'ALLOW')
-        self.assertEqual('ALLOW', ret.get_value())
-
-    def test_equality(self):
-        self.assertEqual(Return('ALLOW'), Return('ALLOW'))
-        self.assertNotEqual(Return('ALLOW'), Return('DENY'))
-        self.assertNotEqual(Return(), 'another type')
-
-    def test_from_string(self):
-        text = '<RETURN />'
-        ret = Return.from_string(text)
-        right = Return()
-        self.assertEqual(ret, right)
-
-    def test_from_string_value(self):
-        text = '<RETURN value="ALLOW" />'
-        ret = Return.from_string(text)
-        right = Return(value = 'ALLOW')
-        self.assertEqual(ret, right)
-
-    def test_from_lxml(self):
-        text = '<RETURN />'
-        ret = Return.from_lxml_element(etree.XML(text))
-        right = Return()
-        self.assertEqual(ret, right)
-
-    def test_from_lxml_value(self):
-        text = '<RETURN value="ALLOW" />'
-        ret = Return.from_lxml_element(etree.XML(text))
-        right = Return(value = 'ALLOW')
-        self.assertEqual(ret, right)
-
-    def test_to_string(self):
-        ret = Return()
-        copy = Return.from_string(str(ret))
-        self.assertEqual(ret, copy)
-
-    def test_to_string_value(self):
-        ret = Return(value = 'ALLOW')
-        copy = Return.from_string(str(ret))
-        self.assertEqual(ret, copy)
-
-    def test_to_lxml(self):
-        ret = Return()
-        copy = Return.from_lxml_element(ret.to_lxml_element())
-        self.assertEqual(ret, copy)
-
-    def test_to_lxml_value(self):
-        ret = Return(value = 'ALLOW')
-        copy = Return.from_lxml_element(ret.to_lxml_element())
-        self.assertEqual(ret, copy)
-
-    def test_bad_root_tag(self):
-        text = '<ERROR />'
-        self.assertRaises(AttributeError, Return.from_string, text)
-        self.assertRaises(AttributeError, Return.from_lxml_element,
-                          etree.XML(text))
-
-class SecurityListTest(unittest.TestCase):
-    def test_creation(self):
-        slist = SecurityList()
-        slist = SecurityList([Permission(), Return()])
-
-    def test_elements(self):
-        element_0 = Condition()
-        element_1 = Return()
-        slist = SecurityList()
-        self.assertEqual(0, len(slist.get_elements()))
-        slist.add_element(element_0)
-        self.assertEqual(1, len(slist.get_elements()))
-        self.assertEqual(element_0, slist.get_element(0))
-        slist.add_element(element_1)
-        self.assertEqual(2, len(slist.get_elements()))
-        self.assertEqual(element_0, slist.get_element(0))
-        self.assertEqual(element_1, slist.get_element(1))
-        slist.remove_element(0)
-        self.assertEqual(1, len(slist.get_elements()))
-        self.assertEqual(element_1, slist.get_element(0))
-        slist.add_element(element_0, 0)
-        self.assertEqual(2, len(slist.get_elements()))
-        self.assertEqual(element_0, slist.get_element(0))
-        self.assertEqual(element_1, slist.get_element(1))
-        self.assertRaises(IndexError, slist.get_element, 2)
-        slist = SecurityList(elements = [element_0, element_1])
-        self.assertEqual(2, len(slist.get_elements()))
-        self.assertEqual(element_0, slist.get_element(0))
-        self.assertEqual(element_1, slist.get_element(1))
-
-    def test_equality(self):
-        self.assertEqual(SecurityList([Condition()]),
-                         SecurityList([Condition()]))
-        self.assertNotEqual(SecurityList([Condition()]),
-                            SecurityList([]))
-        self.assertNotEqual(SecurityList(), 'another type')
-
-    def test_from_string(self):
-        text = '<SECURITY />'
-        slist = SecurityList.from_string(text)
-        right = SecurityList()
-        self.assertEqual(slist, right)
-
-    def test_from_string_elements(self):
-        text = '<SECURITY><CONDITION /><RETURN /></SECURITY>'
-        slist = SecurityList.from_string(text)
-        right = SecurityList([Condition(), Return()])
-        self.assertEqual(slist, right)
-
-    def test_from_lxml(self):
-        text = '<SECURITY />'
-        slist = SecurityList.from_lxml_element(etree.XML(text))
-        right = SecurityList()
-        self.assertEqual(slist, right)
-
-    def test_from_lxml_elements(self):
-        text = '<SECURITY><CONDITION /><RETURN /></SECURITY>'
-        slist = SecurityList.from_lxml_element(etree.XML(text))
-        right = SecurityList([Condition(), Return()])
-        self.assertEqual(slist, right)
-
-    def test_to_string(self):
-        slist = SecurityList()
-        copy = SecurityList.from_string(str(slist))
-        self.assertEqual(slist, copy)
-
-    def test_to_string_elements(self):
-        slist = SecurityList([Condition(), Return()])
-        copy = SecurityList.from_string(str(slist))
-        self.assertEqual(slist, copy)
-
-    def test_to_lxml(self):
-        slist = SecurityList()
-        copy = SecurityList.from_lxml_element(slist.to_lxml_element())
-        self.assertEqual(slist, copy)
-
-    def test_to_string_elements(self):
-        slist = SecurityList([Condition(), Return()])
-        copy = SecurityList.from_lxml_element(slist.to_lxml_element())
-        self.assertEqual(slist, copy)
-
-    def test_bad_root_tag(self):
-        text = '<ERROR />'
-        self.assertRaises(AttributeError, SecurityList.from_string, text)
-        self.assertRaises(AttributeError, SecurityList.from_lxml_element,
-                          etree.XML(text))
-
-class BadMarkupTest(unittest.TestCase):
-    def condition_test(self):
-        text = '''
-<CONDITION custom="unknown">
-  <PERMISSION />
-  <UNKNOWN>
-    <CUSTOM />
-  </UNKNOWN>
-</CONDITION>'''
-        condition = Condition.from_string(text)
-        tree = condition.to_lxml_element()
-        self.assertEqual('unknown', tree.get('custom'))
-        unknown = tree.findall('UNKNOWN')
-        self.assertEqual(1, len(unknown))
-        unknown = unknown[0]
-        custom = list(unknown)
-        self.assertEqual(1, len(custom))
-        custom = custom[0]
-        self.assertEqual('CUSTOM', custom.tag)
-
-    def permission_test(self):
-        text = '''
-<PERMISSION custom="unknown">
-  <UNKNOWN>
-    <CUSTOM />
-  </UNKNOWN>
-</CONDITION>'''
-        permission = Permission.from_string(text)
-        tree = permission.to_lxml_element()
-        self.assertEqual('unknown', tree.get('custom'))
-        unknown = tree.findall('UNKNOWN')
-        self.assertEqual(1, len(unknown))
-        unknown = unknown[0]
-        custom = list(unknown)
-        self.assertEqual(1, len(custom))
-        custom = custom[0]
-        self.assertEqual('CUSTOM', custom.tag)
-
-    def user_test(self):
-        text = '''
-<USER custom="unknown">
-  <UNKNOWN>
-    <CUSTOM />
-  </UNKNOWN>
-</USER>'''
-        user = User.from_string(text)
-        tree = user.to_lxml_element()
-        self.assertEqual('unknown', tree.get('custom'))
-        unknown = tree.findall('UNKNOWN')
-        self.assertEqual(1, len(unknown))
-        unknown = unknown[0]
-        custom = list(unknown)
-        self.assertEqual(1, len(custom))
-        custom = custom[0]
-        self.assertEqual('CUSTOM', custom.tag)
-
-    def return_test(self):
-        text = '''
-<RETURN custom="unknown">
-  <UNKNOWN>
-    <CUSTOM />
-  </UNKNOWN>
-</RETURN>'''
-        ret = Return.from_string(text)
-        tree = ret.to_lxml_element()
-        self.assertEqual('unknown', tree.get('custom'))
-        unknown = tree.findall('UNKNOWN')
-        self.assertEqual(1, len(unknown))
-        unknown = unknown[0]
-        custom = list(unknown)
-        self.assertEqual(1, len(custom))
-        custom = custom[0]
-        self.assertEqual('CUSTOM', custom.tag)
-
-    def security_list_test(self):
-        text = '''
-<SECURITY custom="unknown">
-  <CONDITION />
-  <RETURN />
-  <UNKNOWN>
-    <CUSTOM />
-  </UNKNOWN>
-</SECURITY>'''
-        slist = SecurityList.from_string(text)
-        tree = slist.to_lxml_element()
-        self.assertEqual('unknown', tree.get('custom'))
-        unknown = tree.findall('UNKNOWN')
-        self.assertEqual(1, len(unknown))
-        unknown = unknown[0]
-        custom = list(unknown)
-        self.assertEqual(1, len(custom))
-        custom = custom[0]
-        self.assertEqual('CUSTOM', custom.tag)
-
-if __name__ == '__main__':
-    unittest.main()
diff --git a/misc/py_control_client/MyServer/pycontrollib/test/vhost_test.py b/misc/py_control_client/MyServer/pycontrollib/test/vhost_test.py
deleted file mode 100644
index 7338ac6..0000000
--- a/misc/py_control_client/MyServer/pycontrollib/test/vhost_test.py
+++ /dev/null
@@ -1,623 +0,0 @@
-# -*- coding: utf-8 -*-
-'''
-MyServer
-Copyright (C) 2009 Free Software Foundation, Inc.
-This program 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 3 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program.  If not, see <http://www.gnu.org/licenses/>.
-'''
-
-import unittest
-from vhost import VHost, VHosts
-from log import Log
-from lxml import etree
-
-class VHostTest(unittest.TestCase):
-    def test_creation(self):
-        vhost = VHost()
-        vhost = VHost('test vhost')
-        vhost = VHost('test vhost', 80)
-        vhost = VHost('test vhost', 80, 'HTTP')
-        vhost = VHost('test vhost', 80, 'HTTP', '/www')
-        vhost = VHost('test vhost', 80, 'HTTP', '/www', '/system')
-        vhost = VHost('test vhost', 80, 'HTTP', '/www', '/system',
-                      [Log('ACCESSLOG'), Log('WARNINGLOG')])
-        vhost = VHost('test vhost', 80, 'HTTP', '/www', '/system',
-                      [Log('ACCESSLOG'), Log('WARNINGLOG')],
-                      ['127.0.0.0/8', '192.168.0.0/16'])
-        vhost = VHost('test vhost', 80, 'HTTP', '/www', '/system',
-                      [Log('ACCESSLOG'), Log('WARNINGLOG')],
-                      ['127.0.0.0/8', '192.168.0.0/16'],
-                      {'host.domain': None})
-        vhost = VHost('test vhost', 80, 'HTTP', '/www', '/system',
-                      [Log('ACCESSLOG'), Log('WARNINGLOG')],
-                      ['127.0.0.0/8', '192.168.0.0/16'],
-                      {'host.domain': None}, 'private_key')
-        vhost = VHost('test vhost', 80, 'HTTP', '/www', '/system',
-                      [Log('ACCESSLOG'), Log('WARNINGLOG')],
-                      ['127.0.0.0/8', '192.168.0.0/16'],
-                      {'host.domain': None}, 'private_key', 'certificate')
-
-    def test_name(self):
-        vhost = VHost('test vhost')
-        self.assertEqual('test vhost', vhost.get_name())
-        vhost.set_name('vhost')
-        self.assertEqual('vhost', vhost.get_name())
-        vhost.set_name(None)
-        self.assertEqual(None, vhost.get_name())
-        vhost = VHost(name = 'test vhost')
-        self.assertEqual('test vhost', vhost.get_name())
-
-    def test_port(self):
-        vhost = VHost('test vhost', 80)
-        self.assertEqual(80, vhost.get_port())
-        vhost.set_port(8080)
-        self.assertEqual(8080, vhost.get_port())
-        vhost.set_port(None)
-        self.assertEqual(None, vhost.get_port())
-        vhost = VHost(port = 80)
-        self.assertEqual(80, vhost.get_port())
-
-    def test_protocol(self):
-        vhost = VHost('test vhost', 80, 'HTTP')
-        self.assertEqual('HTTP', vhost.get_protocol())
-        vhost.set_protocol('NEW PROTOCOL')
-        self.assertEqual('NEW PROTOCOL', vhost.get_protocol())
-        vhost.set_protocol(None)
-        self.assertEqual(None, vhost.get_protocol())
-        vhost = VHost(protocol = 'HTTP')
-        self.assertEqual('HTTP', vhost.get_protocol())
-
-    def test_doc_root(self):
-        vhost = VHost('test vhost', 80, 'HTTP', '/www')
-        self.assertEqual('/www', vhost.get_doc_root())
-        vhost.set_doc_root('/var/www')
-        self.assertEqual('/var/www', vhost.get_doc_root())
-        vhost.set_doc_root(None)
-        self.assertEqual(None, vhost.get_doc_root())
-        vhost = VHost(doc_root = '/www')
-        self.assertEqual('/www', vhost.get_doc_root())
-
-    def test_sys_root(self):
-        vhost = VHost('test vhost', 80, 'HTTP', '/www', '/system')
-        self.assertEqual('/system', vhost.get_sys_root())
-        vhost.set_sys_root('/var/system')
-        self.assertEqual('/var/system', vhost.get_sys_root())
-        vhost.set_sys_root(None)
-        self.assertEqual(None, vhost.get_sys_root())
-        vhost = VHost(sys_root = '/system')
-        self.assertEqual('/system', vhost.get_sys_root())
-
-    def test_logs(self):
-        a_log = Log('ACCESSLOG')
-        w_log = Log('WARNINGLOG')
-        vhost = VHost('test vhost', 80, 'HTTP', '/www', '/system', [a_log, w_log])
-        self.assertEqual([a_log, w_log], vhost.get_logs())
-        vhost.add_log(a_log)
-        self.assertEqual([a_log, w_log, a_log], vhost.get_logs())
-        vhost.remove_log(0)
-        self.assertEqual([w_log, a_log], vhost.get_logs())
-        vhost.add_log(w_log, 0)
-        self.assertEqual([w_log, w_log, a_log], vhost.get_logs())
-        vhost = VHost(logs = [a_log, w_log])
-        self.assertEqual([a_log, w_log], vhost.get_logs())
-
-    def test_ip(self):
-        vhost = VHost('test vhost', 80, 'HTTP', '/www', '/system',
-                      [Log('ACCESSLOG')])
-        self.assertEqual(set(), vhost.get_ip())
-        vhost.add_ip('10.0.0.0/8')
-        vhost.add_ip('192.168.0.0/16')
-        self.assertEqual(set(['10.0.0.0/8', '192.168.0.0/16']), vhost.get_ip())
-        vhost.remove_ip('10.0.0.0/8')
-        self.assertEqual(set(['192.168.0.0/16']), vhost.get_ip())
-        vhost = VHost('test vhost', 80, 'HTTP', '/www', '/system',
-                      [Log('ACCESSLOG'), Log('WARNINGLOG')],
-                      ['127.0.0.0/8', '192.168.0.0/16'])
-        self.assertEqual(set(['127.0.0.0/8', '192.168.0.0/16']), vhost.get_ip())
-        vhost = VHost('test vhost', 80, 'HTTP', '/www', '/system',
-                      [Log('ACCESSLOG'), Log('WARNINGLOG')],
-                      ip = ['127.0.0.0/8', '192.168.0.0/16'])
-        self.assertEqual(set(['127.0.0.0/8', '192.168.0.0/16']), vhost.get_ip())
-
-    def test_host(self):
-        vhost = VHost('test vhost', 80, 'HTTP', '/www', '/system',
-                      [Log('ACCESSLOG')])
-        self.assertEqual({}, vhost.get_host())
-        vhost.add_host('foo.bar.com', False)
-        vhost.add_host('test.me.org')
-        self.assertEqual({'foo.bar.com': False, 'test.me.org': None},
-                         vhost.get_host())
-        vhost.remove_host('foo.bar.com')
-        self.assertEqual({'test.me.org': None}, vhost.get_host())
-        vhost = VHost('test vhost', 80, 'HTTP', '/www', '/system',
-                      [Log('ACCESSLOG'), Log('WARNINGLOG')],
-                      ['127.0.0.0/8', '192.168.0.0/16'],
-                      {'test.me.org': None})
-        self.assertEqual({'test.me.org': None}, vhost.get_host())
-        vhost = VHost('test vhost', 80, 'HTTP', '/www', '/system',
-                      [Log('ACCESSLOG'), Log('WARNINGLOG')],
-                      host = {'test.me.org': None})
-        self.assertEqual({'test.me.org': None}, vhost.get_host())
-
-    def test_private_key(self):
-        vhost = VHost()
-        self.assertEqual(None, vhost.get_private_key())
-        vhost.set_private_key('path')
-        self.assertEqual('path', vhost.get_private_key())
-        vhost.set_private_key(None)
-        self.assertEqual(None, vhost.get_private_key())
-        vhost = VHost('test vhost', 80, 'HTTP', '/www', '/system',
-                      [Log('ACCESSLOG'), Log('WARNINGLOG')],
-                      ['127.0.0.0/8', '192.168.0.0/16'],
-                      {'host.domain': None}, 'path')
-        self.assertEqual('path', vhost.get_private_key())
-        vhost = VHost(private_key = 'path')
-        self.assertEqual('path', vhost.get_private_key())
-
-    def test_certificate(self):
-        vhost = VHost()
-        self.assertEqual(None, vhost.get_certificate())
-        vhost.set_certificate('path')
-        self.assertEqual('path', vhost.get_certificate())
-        vhost.set_certificate(None)
-        self.assertEqual(None, vhost.get_certificate())
-        vhost = VHost('test vhost', 80, 'HTTP', '/www', '/system',
-                      [Log('ACCESSLOG'), Log('WARNINGLOG')],
-                      ['127.0.0.0/8', '192.168.0.0/16'],
-                      {'host.domain': None}, 'key', 'path')
-        self.assertEqual('path', vhost.get_certificate())
-        vhost = VHost(certificate = 'path')
-        self.assertEqual('path', vhost.get_certificate())
-
-    def test_equality(self):
-        vhost_0 = VHost('test vhost', 80, 'HTTP', '/www', '/system',
-                        [Log('ACCESSLOG'), Log('WARNINGLOG')],
-                        ['127.0.0.0/8', '192.168.0.0/16'],
-                        {'host.domain': None}, 'private_key', 'certificate')
-        vhost_1 = VHost('test vhost', 80, 'HTTP', '/www', '/system',
-                        [Log('ACCESSLOG'), Log('WARNINGLOG')],
-                        ['127.0.0.0/8', '192.168.0.0/16'],
-                        {'host.domain': None}, 'private_key', 'certificate')
-        self.assertEqual(vhost_0, vhost_1)
-        vhost_1 = VHost.from_string(str(vhost_0))
-        vhost_1.set_name('different')
-        self.assertNotEqual(vhost_0, vhost_1)
-        vhost_1 = VHost.from_string(str(vhost_0))
-        vhost_1.set_port(81)
-        self.assertNotEqual(vhost_0, vhost_1)
-        vhost_1 = VHost.from_string(str(vhost_0))
-        vhost_1.set_protocol('HTTPS')
-        self.assertNotEqual(vhost_0, vhost_1)
-        vhost_1 = VHost.from_string(str(vhost_0))
-        vhost_1.set_doc_root('/var/www')
-        self.assertNotEqual(vhost_0, vhost_1)
-        vhost_1 = VHost.from_string(str(vhost_0))
-        vhost_1.set_sys_root('/var/system')
-        self.assertNotEqual(vhost_0, vhost_1)
-        vhost_1 = VHost.from_string(str(vhost_0))
-        vhost_1.add_log(Log('NEWLOG'))
-        self.assertNotEqual(vhost_0, vhost_1)
-        vhost_1 = VHost.from_string(str(vhost_0))
-        vhost_1.add_ip('10.0.0.0/8')
-        self.assertNotEqual(vhost_0, vhost_1)
-        vhost_1 = VHost.from_string(str(vhost_0))
-        vhost_1.add_host('newhost', None)
-        self.assertNotEqual(vhost_0, vhost_1)
-        vhost_1 = VHost.from_string(str(vhost_0))
-        vhost_1.set_private_key('new_key')
-        self.assertNotEqual(vhost_0, vhost_1)
-        vhost_1 = VHost.from_string(str(vhost_0))
-        vhost_1.set_certificate('new certificate')
-        self.assertNotEqual(vhost_0, vhost_1)
-        self.assertNotEqual(vhost_0, [])
-
-    def test_from_string(self):
-        text = '<VHOST />'
-        vhost = VHost.from_string(text)
-        right = VHost()
-        self.assertEqual(vhost, right)
-
-    def test_from_string_name(self):
-        text = '<VHOST><NAME>test vhost</NAME></VHOST>'
-        vhost = VHost.from_string(text)
-        right = VHost('test vhost')
-        self.assertEqual(vhost, right)
-
-    def test_from_string_port(self):
-        text = '<VHOST><PORT>80</PORT></VHOST>'
-        vhost = VHost.from_string(text)
-        right = VHost(port = 80)
-        self.assertEqual(vhost, right)
-
-    def test_from_string_protocol(self):
-        text = '<VHOST><PROTOCOL>HTTP</PROTOCOL></VHOST>'
-        vhost = VHost.from_string(text)
-        right = VHost(protocol = 'HTTP')
-        self.assertEqual(vhost, right)
-
-    def test_from_string_doc_root(self):
-        text = '<VHOST><DOCROOT>/www</DOCROOT></VHOST>'
-        vhost = VHost.from_string(text)
-        right = VHost(doc_root = '/www')
-        self.assertEqual(vhost, right)
-
-    def test_from_string_sys_root(self):
-        text = '<VHOST><SYSROOT>/system</SYSROOT></VHOST>'
-        vhost = VHost.from_string(text)
-        right = VHost(sys_root = '/system')
-        self.assertEqual(vhost, right)
-
-    def test_from_string_logs(self):
-        text = '<VHOST><ACCESSLOG /><SOMELOG /></VHOST>'
-        vhost = VHost.from_string(text)
-        right = VHost(logs = [Log('ACCESSLOG'), Log('SOMELOG')])
-        self.assertEqual(vhost, right)
-
-    def test_from_string_ip(self):
-        text = '<VHOST><IP>127.0.0.0/8</IP></VHOST>'
-        vhost = VHost.from_string(text)
-        right = VHost(ip = ['127.0.0.0/8'])
-        self.assertEqual(vhost, right)
-
-    def test_from_string_host(self):
-        text = '<VHOST><HOST useRegex="YES">.*</HOST><HOST>a.org</HOST></VHOST>'
-        vhost = VHost.from_string(text)
-        right = VHost(host = {'.*': True, 'a.org': None})
-        self.assertEqual(vhost, right)
-
-    def test_from_string_private_key(self):
-        text = '<VHOST><SSL_PRIVATEKEY>private_key</SSL_PRIVATEKEY></VHOST>'
-        vhost = VHost.from_string(text)
-        right = VHost(private_key = 'private_key')
-        self.assertEqual(vhost, right)
-
-    def test_from_string_certificate(self):
-        text = '<VHOST><SSL_CERTIFICATE>certificate</SSL_CERTIFICATE></VHOST>'
-        vhost = VHost.from_string(text)
-        right = VHost(certificate = 'certificate')
-        self.assertEqual(vhost, right)
-
-    def test_from_string_full(self):
-        text = '''<VHOST>
-  <NAME>test vhost</NAME>
-  <PORT>80</PORT>
-  <PROTOCOL>HTTP</PROTOCOL>
-  <DOCROOT>/www</DOCROOT>
-  <SYSROOT>/system</SYSROOT>
-  <ACCESSLOG />
-  <WARNINGLOG />
-  <IP>127.0.0.0/8</IP>
-  <IP>192.168.0.0/16</IP>
-  <HOST useRegex="YES">host.domain</HOST>
-  <HOST>test.domain</HOST>
-  <SSL_PRIVATEKEY>private_key</SSL_PRIVATEKEY>
-  <SSL_CERTIFICATE>certificate</SSL_CERTIFICATE>
-</VHOST>'''
-        vhost = VHost.from_string(text)
-        right = VHost('test vhost', 80, 'HTTP', '/www', '/system',
-                      [Log('ACCESSLOG'), Log('WARNINGLOG')],
-                      ['127.0.0.0/8', '192.168.0.0/16'],
-                      {'host.domain': True, 'test.domain': None},
-                      'private_key', 'certificate')
-        self.assertEqual(vhost, right)
-
-    def test_from_lxml(self):
-        text = '<VHOST />'
-        vhost = VHost.from_lxml_element(etree.XML(text))
-        right = VHost()
-        self.assertEqual(vhost, right)
-
-    def test_from_lxml_name(self):
-        text = '<VHOST><NAME>test vhost</NAME></VHOST>'
-        vhost = VHost.from_lxml_element(etree.XML(text))
-        right = VHost('test vhost')
-        self.assertEqual(vhost, right)
-
-    def test_from_lxml_port(self):
-        text = '<VHOST><PORT>80</PORT></VHOST>'
-        vhost = VHost.from_lxml_element(etree.XML(text))
-        right = VHost(port = 80)
-        self.assertEqual(vhost, right)
-
-    def test_from_lxml_protocol(self):
-        text = '<VHOST><PROTOCOL>HTTP</PROTOCOL></VHOST>'
-        vhost = VHost.from_lxml_element(etree.XML(text))
-        right = VHost(protocol = 'HTTP')
-        self.assertEqual(vhost, right)
-
-    def test_from_lxml_doc_root(self):
-        text = '<VHOST><DOCROOT>/www</DOCROOT></VHOST>'
-        vhost = VHost.from_lxml_element(etree.XML(text))
-        right = VHost(doc_root = '/www')
-        self.assertEqual(vhost, right)
-
-    def test_from_lxml_sys_folder(self):
-        text = '<VHOST><SYSROOT>/system</SYSROOT></VHOST>'
-        vhost = VHost.from_lxml_element(etree.XML(text))
-        right = VHost(sys_root = '/system')
-        self.assertEqual(vhost, right)
-
-    def test_from_lxml_logs(self):
-        text = '<VHOST><ACCESSLOG /><SOMELOG /></VHOST>'
-        vhost = VHost.from_lxml_element(etree.XML(text))
-        right = VHost(logs = [Log('ACCESSLOG'), Log('SOMELOG')])
-        self.assertEqual(vhost, right)
-
-    def test_from_lxml_ip(self):
-        text = '<VHOST><IP>127.0.0.0/8</IP></VHOST>'
-        vhost = VHost.from_lxml_element(etree.XML(text))
-        right = VHost(ip = ['127.0.0.0/8'])
-        self.assertEqual(vhost, right)
-
-    def test_from_lxml_host(self):
-        text = '<VHOST><HOST useRegex="YES">.*</HOST><HOST>a.org</HOST></VHOST>'
-        vhost = VHost.from_lxml_element(etree.XML(text))
-        right = VHost(host = {'.*': True, 'a.org': None})
-        self.assertEqual(vhost, right)
-
-    def test_from_lxml_private_key(self):
-        text = '<VHOST><SSL_PRIVATEKEY>private_key</SSL_PRIVATEKEY></VHOST>'
-        vhost = VHost.from_lxml_element(etree.XML(text))
-        right = VHost(private_key = 'private_key')
-        self.assertEqual(vhost, right)
-
-    def test_from_lxml_certificate(self):
-        text = '<VHOST><SSL_CERTIFICATE>certificate</SSL_CERTIFICATE></VHOST>'
-        vhost = VHost.from_lxml_element(etree.XML(text))
-        right = VHost(certificate = 'certificate')
-        self.assertEqual(vhost, right)
-
-    def test_from_lxml_full(self):
-        text = '''<VHOST>
-  <NAME>test vhost</NAME>
-  <PORT>80</PORT>
-  <PROTOCOL>HTTP</PROTOCOL>
-  <DOCROOT>/www</DOCROOT>
-  <SYSROOT>/system</SYSROOT>
-  <ACCESSLOG />
-  <WARNINGLOG />
-  <IP>127.0.0.0/8</IP>
-  <IP>192.168.0.0/16</IP>
-  <HOST useRegex="YES">host.domain</HOST>
-  <HOST>test.domain</HOST>
-  <SSL_PRIVATEKEY>private_key</SSL_PRIVATEKEY>
-  <SSL_CERTIFICATE>certificate</SSL_CERTIFICATE>
-</VHOST>'''
-        vhost = VHost.from_lxml_element(etree.XML(text))
-        right = VHost('test vhost', 80, 'HTTP', '/www', '/system',
-                      [Log('ACCESSLOG'), Log('WARNINGLOG')],
-                      ['127.0.0.0/8', '192.168.0.0/16'],
-                      {'host.domain': True, 'test.domain': None},
-                      'private_key', 'certificate')
-        self.assertEqual(vhost, right)
-
-    def test_bad_root_tag(self):
-        text = '<ERROR />'
-        self.assertRaises(AttributeError, VHost.from_string, text)
-        self.assertRaises(AttributeError, VHost.from_lxml_element,
-                          etree.XML(text))
-
-    def test_to_string(self):
-        vhost = VHost()
-        copy = VHost.from_string(str(vhost))
-        self.assertEqual(vhost, copy)
-
-    def test_to_string_name(self):
-        vhost = VHost('test vhost')
-        copy = VHost.from_string(str(vhost))
-        self.assertEqual(vhost, copy)
-
-    def test_to_string_port(self):
-        vhost = VHost(port = 80)
-        copy = VHost.from_string(str(vhost))
-        self.assertEqual(vhost, copy)
-
-    def test_to_string_protocol(self):
-        vhost = VHost(protocol = 'HTTP')
-        copy = VHost.from_string(str(vhost))
-        self.assertEqual(vhost, copy)
-
-    def test_to_string_doc_root(self):
-        vhost = VHost(doc_root = '/www')
-        copy = VHost.from_string(str(vhost))
-        self.assertEqual(vhost, copy)
-
-    def test_to_string_sys_root(self):
-        vhost = VHost(sys_root = '/system')
-        copy = VHost.from_string(str(vhost))
-        self.assertEqual(vhost, copy)
-
-    def test_to_string_logs(self):
-        vhost = VHost(logs = [Log('ACCESSLOG'), Log('SOMELOG')])
-        copy = VHost.from_string(str(vhost))
-        self.assertEqual(vhost, copy)
-
-    def test_to_string_ip(self):
-        vhost = VHost(ip = ['127.0.0.0/8'])
-        copy = VHost.from_string(str(vhost))
-        self.assertEqual(vhost, copy)
-
-    def test_to_string_host(self):
-        vhost = VHost(host = {'.*': True, 'a.org': None})
-        copy = VHost.from_string(str(vhost))
-        self.assertEqual(vhost, copy)
-
-    def test_to_string_private_key(self):
-        vhost = VHost(private_key = 'private_key')
-        copy = VHost.from_string(str(vhost))
-        self.assertEqual(vhost, copy)
-
-    def test_to_string_certificate(self):
-        vhost = VHost(certificate = 'certificate')
-        copy = VHost.from_string(str(vhost))
-        self.assertEqual(vhost, copy)
-
-    def test_to_string_full(self):
-        vhost = VHost('test vhost', 80, 'HTTP', '/www', '/system',
-                      [Log('ACCESSLOG'), Log('WARNINGLOG')],
-                      ['127.0.0.0/8', '192.168.0.0/16'],
-                      {'host.domain': True, 'test.domain': None},
-                      'private_key', 'certificate')
-        copy = VHost.from_string(str(vhost))
-        self.assertEqual(vhost, copy)
-
-    def test_to_lxml(self):
-        vhost = VHost()
-        copy = VHost.from_lxml_element(vhost.to_lxml_element())
-        self.assertEqual(vhost, copy)
-
-    def test_to_lxml_name(self):
-        vhost = VHost('test vhost')
-        copy = VHost.from_lxml_element(vhost.to_lxml_element())
-        self.assertEqual(vhost, copy)
-
-    def test_to_lxml_port(self):
-        vhost = VHost(port = 80)
-        copy = VHost.from_lxml_element(vhost.to_lxml_element())
-        self.assertEqual(vhost, copy)
-
-    def test_to_lxml_protocol(self):
-        vhost = VHost(protocol = 'HTTP')
-        copy = VHost.from_lxml_element(vhost.to_lxml_element())
-        self.assertEqual(vhost, copy)
-
-    def test_to_lxml_doc_root(self):
-        vhost = VHost(doc_root = '/www')
-        copy = VHost.from_lxml_element(vhost.to_lxml_element())
-        self.assertEqual(vhost, copy)
-
-    def test_to_lxml_sys_root(self):
-        vhost = VHost(sys_root = '/system')
-        copy = VHost.from_lxml_element(vhost.to_lxml_element())
-        self.assertEqual(vhost, copy)
-
-    def test_to_lxml_logs(self):
-        vhost = VHost(logs = [Log('ACCESSLOG'), Log('SOMELOG')])
-        copy = VHost.from_lxml_element(vhost.to_lxml_element())
-        self.assertEqual(vhost, copy)
-
-    def test_to_lxml_ip(self):
-        vhost = VHost(ip = ['127.0.0.0/8'])
-        copy = VHost.from_lxml_element(vhost.to_lxml_element())
-        self.assertEqual(vhost, copy)
-
-    def test_to_lxml_host(self):
-        vhost = VHost(host = {'.*': True, 'a.org': None})
-        copy = VHost.from_lxml_element(vhost.to_lxml_element())
-        self.assertEqual(vhost, copy)
-        
-    def test_to_lxml_private_key(self):
-        vhost = VHost(private_key = 'private_key')
-        copy = VHost.from_lxml_element(vhost.to_lxml_element())
-        self.assertEqual(vhost, copy)
-
-    def test_to_lxml_certificate(self):
-        vhost = VHost(certificate = 'certificate')
-        copy = VHost.from_lxml_element(vhost.to_lxml_element())
-        self.assertEqual(vhost, copy)
-
-    def test_to_lxml_full(self):
-        vhost = VHost('test vhost', 80, 'HTTP', '/www', '/system',
-                      [Log('ACCESSLOG'), Log('WARNINGLOG')],
-                      ['127.0.0.0/8', '192.168.0.0/16'],
-                      {'host.domain': True, 'test.domain': None},
-                      'private_key', 'certificate')
-        copy = VHost.from_lxml_element(vhost.to_lxml_element())
-        self.assertEqual(vhost, copy)
-
-class VHostsTest(unittest.TestCase):
-    def setUp(self):
-        self.vhost_0 = VHost('vhost 0', 80, 'HTTP', '/www', '/system',
-                             [Log('ACCESSLOG'), Log('WARNINGLOG')],
-                             ['127.0.0.0/8', '192.168.0.0/16'],
-                             {'host.domain': True, 'test.domain': None})
-        self.vhost_1 = VHost('vhost 1', 443, 'HTTPS', '/www', '/system',
-                             [Log('ACCESSLOG'), Log('WARNINGLOG')])
-        self.text = '<VHOSTS>{0}{1}</VHOSTS>'.format(str(self.vhost_0),
-                                                     str(self.vhost_1))
-
-    def test_creation(self):
-        vhosts = VHosts([self.vhost_0, self.vhost_1])
-        self.assertEqual(vhosts.VHosts[0], self.vhost_0)
-        self.assertEqual(vhosts.VHosts[1], self.vhost_1)
-
-    def test_from_string(self):
-        vhosts = VHosts.from_string(self.text)
-        self.assertEqual(vhosts.VHosts[0], self.vhost_0)
-        self.assertEqual(vhosts.VHosts[1], self.vhost_1)
-
-    def test_from_string(self):
-        vhosts = VHosts.from_lxml_element(etree.XML(self.text))
-        self.assertEqual(vhosts.VHosts[0], self.vhost_0)
-        self.assertEqual(vhosts.VHosts[1], self.vhost_1)
-
-    def test_to_string(self):
-        vhosts = VHosts.from_string(self.text)
-        copy = VHosts.from_string(str(vhosts))
-        self.assertEqual(vhosts, copy)
-
-    def test_to_lxml(self):
-        vhosts = VHosts.from_string(self.text)
-        copy = VHosts.from_lxml_element(vhosts.to_lxml_element())
-        self.assertEqual(vhosts, copy)
-
-    def test_equality(self):
-        self.assertEqual(VHosts.from_string(self.text),
-                         VHosts.from_string(self.text))
-        self.assertNotEqual(VHosts.from_string(self.text),
-                            VHosts.from_string(
-                '<VHOSTS>{0}</VHOSTS>'.format(str(self.vhost_0))))
-        self.assertNotEqual(VHosts.from_string(self.text), [])
-
-class BadMarkupTest(unittest.TestCase):
-    def test_vhost(self):
-        text = '''
-<VHOST custom="unknown">
-  <PORT>123</PORT>
-  <UNKNOWN>
-    <CUSTOM />
-  </UNKNOWN>
-</VHOST>'''
-        vhost = VHost.from_string(text)
-        tree = vhost.to_lxml_element()
-        self.assertEqual('unknown', tree.get('custom'))
-        unknown = tree.findall('UNKNOWN')
-        self.assertEqual(1, len(unknown))
-        unknown = unknown[0]
-        custom = list(unknown)
-        self.assertEqual(1, len(custom))
-        custom = custom[0]
-        self.assertEqual('CUSTOM', custom.tag)
-
-    def test_vhosts(self):
-        text = '''
-<VHOSTS custom="unknown">
-  <VHOST />
-  <UNKNOWN>
-    <CUSTOM />
-  </UNKNOWN>
-</VHOSTS>'''
-        vhosts = VHosts.from_string(text)
-        tree = vhosts.to_lxml_element()
-        self.assertEqual('unknown', tree.get('custom'))
-        self.assertEqual(1, len(tree.findall('VHOST')))
-        unknown = tree.findall('UNKNOWN')
-        self.assertEqual(1, len(unknown))
-        unknown = unknown[0]
-        custom = list(unknown)
-        self.assertEqual(1, len(custom))
-        custom = custom[0]
-        self.assertEqual('CUSTOM', custom.tag)
-
-if __name__ == '__main__':
-    unittest.main()
diff --git a/misc/py_control_client/MyServer/pycontrollib/vhost.py b/misc/py_control_client/MyServer/pycontrollib/vhost.py
deleted file mode 100644
index 7564d67..0000000
--- a/misc/py_control_client/MyServer/pycontrollib/vhost.py
+++ /dev/null
@@ -1,306 +0,0 @@
-# -*- coding: utf-8 -*-
-'''
-MyServer
-Copyright (C) 2009 Free Software Foundation, Inc.
-This program 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 3 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program.  If not, see <http://www.gnu.org/licenses/>.
-'''
-
-from lxml import etree
-from log import Log
-
-class VHost():
-    def __init__(self, name = None, port = None, protocol = None,
-                 doc_root = None, sys_root = None, logs = [],
-                 ip = [], host = {}, private_key = None, certificate = None):
-        '''Create new instance of VHost. logs and ip are expected to be a
-        collection and host is expected to be a dict {name: useRegex} where None
-        means not set.'''
-        self.set_name(name)
-        self.set_port(port)
-        self.set_protocol(protocol)
-        self.set_doc_root(doc_root)
-        self.set_sys_root(sys_root)
-        self.logs = []
-        for log in logs:
-            self.add_log(log)
-        self.ip = set()
-        for ip_address in ip:
-            self.add_ip(ip_address)
-        self.host = {}
-        for single_host in host.iteritems():
-            self.add_host(single_host[0], single_host[1])
-        self.set_private_key(private_key)
-        self.set_certificate(certificate)
-        self.custom = []
-        self.custom_attrib = {}
-
-    def __eq__(self, other):
-        return isinstance(other, VHost) and self.name == other.name and \
-            self.port == other.port and self.protocol == other.protocol and \
-            self.doc_root == other.doc_root and \
-            self.sys_root == other.sys_root and \
-            self.logs == other.logs and self.ip == other.ip and \
-            self.host == other.host and \
-            self.private_key == other.private_key and \
-            self.certificate == other.certificate
-
-    def get_name(self):
-        '''Get VHost name.'''
-        return self.name
-
-    def set_name(self, name):
-        '''Set VHost name.'''
-        self.name = name
-
-    def get_doc_root(self):
-        '''Get VHost doc root.'''
-        return self.doc_root
-
-    def set_doc_root(self, doc_root):
-        '''Set VHost doc root.'''
-        self.doc_root = doc_root
-
-    def get_sys_root(self):
-        '''Get VHost sys root.'''
-        return self.sys_root
-
-    def set_sys_root(self, sys_root):
-        '''Set VHost sys root.'''
-        self.sys_root = sys_root
-
-    def get_protocol(self):
-        '''Get VHost protocol.'''
-        return self.protocol
-
-    def set_protocol(self, protocol):
-        '''Set VHost protocol.'''
-        self.protocol = protocol
-
-    def get_port(self):
-        '''Get VHost port.'''
-        return self.port
-
-    def set_port(self, port):
-        '''Set VHost port.'''
-        if port is None:
-            self.port = None
-        else:
-            self.port = int(port)
-
-    def get_logs(self):
-        '''Get list of logs.'''
-        return self.logs
-
-    def get_log(self, index):
-        '''Get index-th log.'''
-        return self.logs[index]
-
-    def remove_log(self, index):
-        '''Remove index-th log.'''
-        self.logs.pop(index)
-
-    def add_log(self, log, index = None):
-        '''Add log to VHost's logs, if index is None append it, otherwise insert
-        at index position.'''
-        if index is None:
-            self.logs.append(log)
-        else:
-            self.logs.insert(index, log)
-
-    def get_ip(self):
-        '''Get VHost ip set.'''
-        return self.ip
-
-    def add_ip(self, ip):
-        '''Add ip to VHost ip set.'''
-        self.ip.add(ip)
-
-    def remove_ip(self, ip):
-        '''Remove ip from VHost ip set.'''
-        self.ip.remove(ip)
-
-    def get_host(self):
-        '''Get VHost host dict.'''
-        return self.host
-
-    def add_host(self, host, use_regex = None):
-        '''Add host to VHost host dict.'''
-        self.host[host] = use_regex
-
-    def remove_host(self, host):
-        '''Remove host from VHost host dict.'''
-        self.host.pop(host)
-
-    def get_private_key(self):
-        '''Get vhost private ssl key.'''
-        return self.private_key
-
-    def set_private_key(self, private_key):
-        '''Set vhost private ssl key.'''
-        self.private_key = private_key
-
-    def get_certificate(self):
-        '''Get vhost ssl certificate.'''
-        return self.certificate
-
-    def set_certificate(self, certificate):
-        '''Set vhost ssl certificate.'''
-        self.certificate = certificate
-
-    def __str__(self):
-        return etree.tostring(self.to_lxml_element(), pretty_print = True)
-
-    def to_lxml_element(self):
-        '''Convert to instance of lxml.etree.Element.'''
-        def make_element(tag, text):
-            element = etree.Element(tag)
-            element.text = text
-            return element
-        root = etree.Element('VHOST')
-        if self.name is not None:
-            root.append(make_element('NAME', self.name))
-        if self.port is not None:
-            root.append(make_element('PORT', str(self.port)))
-        if self.protocol is not None:
-            root.append(make_element('PROTOCOL', self.protocol))
-        if self.doc_root is not None:
-            root.append(make_element('DOCROOT', self.doc_root))
-        if self.sys_root is not None:
-            root.append(make_element('SYSROOT', self.sys_root))
-        if self.private_key is not None:
-            root.append(make_element('SSL_PRIVATEKEY', self.private_key))
-        if self.certificate is not None:
-            root.append(make_element('SSL_CERTIFICATE', self.certificate))
-        for ip_address in self.ip:
-            root.append(make_element('IP', ip_address))
-        for host, use_regex in self.host.iteritems():
-            element = make_element('HOST', host)
-            if use_regex is not None:
-                element.set('useRegex', 'YES' if use_regex else 'NO')
-            root.append(element)
-        for log in self.logs:
-            root.append(log.to_lxml_element())
-
-        for element in self.custom:
-            root.append(element)
-        for key, value in self.custom_attrib.iteritems():
-            root.set(key, value)
-
-        return root
-
-    @staticmethod
-    def from_lxml_element(root):
-        '''Factory to produce VHost from lxml.etree.Element object.'''
-        if root.tag != 'VHOST':
-            raise AttributeError('Expected VHOST tag.')
-        custom_attrib = root.attrib
-        name = None
-        port = None
-        protocol = None
-        doc_root = None
-        sys_root = None
-        private_key = None
-        certificate = None
-        ip = []
-        host = {}
-        logs = []
-        custom = []
-        for child in list(root):
-            if child.tag == 'NAME':
-                name = child.text
-            elif child.tag == 'PORT':
-                port = child.text
-            elif child.tag == 'PROTOCOL':
-                protocol = child.text
-            elif child.tag == 'DOCROOT':
-                doc_root = child.text
-            elif child.tag == 'SYSROOT':
-                sys_root = child.text
-            elif child.tag == 'IP':
-                ip.append(child.text)
-            elif child.tag == 'HOST':
-                use_regex = child.get('useRegex', None)
-                if use_regex is not None:
-                    use_regex = use_regex.upper() == 'YES'
-                host[child.text] = use_regex
-            elif child.tag == 'SSL_PRIVATEKEY':
-                private_key = child.text
-            elif child.tag == 'SSL_CERTIFICATE':
-                certificate = child.text
-            else:
-                try:
-                    logs.append(Log.from_lxml_element(child))
-                except AttributeError:
-                    custom.append(child)
-        vhost = VHost(name, port, protocol, doc_root, sys_root, logs, ip, host,
-                      private_key, certificate)
-        vhost.custom = custom
-        vhost.custom_attrib = custom_attrib
-        return vhost
-
-    @staticmethod
-    def from_string(text):
-        '''Factory to produce VHost by parsing a string.'''
-        return VHost.from_lxml_element(etree.XML(
-                text, parser = etree.XMLParser(remove_comments = True)))
-
-class VHosts():
-    def __init__(self, VHosts):
-        '''Create a new instance of VHosts. VHosts attribute is expected to be a
-        list.'''
-        self.VHosts = VHosts
-        self.custom = []
-        self.custom_attrib = {}
-
-    def __eq__(self, other):
-        return isinstance(other, VHosts) and self.VHosts == other.VHosts
-
-    def to_lxml_element(self):
-        '''Convert to lxml.etree.Element.'''
-        root = etree.Element('VHOSTS')
-        for vhost in self.VHosts:
-            root.append(vhost.to_lxml_element())
-
-        for element in self.custom:
-            root.append(element)
-        for key, value in self.custom_attrib.iteritems():
-            root.set(key, value)
-
-        return root
-
-    def __str__(self):
-        return etree.tostring(self.to_lxml_element(), pretty_print = True)
-
-    @staticmethod
-    def from_lxml_element(root):
-        '''Factory to produce VHosts from lxml.etree.Element object.'''
-        if root.tag != 'VHOSTS':
-            raise AttributeError('Expected VHOSTS tag.')
-        vhosts = []
-        custom = []
-        for element in list(root):
-            try:
-                vhosts.append(VHost.from_lxml_element(element))
-            except AttributeError:
-                custom.append(element)
-        vhosts = VHosts(vhosts)
-        vhosts.custom = custom
-        vhosts.custom_attrib = root.attrib
-        return vhosts
-
-    @staticmethod
-    def from_string(text):
-        '''Factory to produce VHosts from parsing a string.'''
-        return VHosts.from_lxml_element(etree.XML(
-                text, parser = etree.XMLParser(remove_comments = True)))
diff --git a/misc/py_control_client/MyServer/sample.py b/misc/py_control_client/MyServer/sample.py
deleted file mode 100644
index bb68163..0000000
--- a/misc/py_control_client/MyServer/sample.py
+++ /dev/null
@@ -1,40 +0,0 @@
-'''
-MyServer
-Copyright (C) 2008 The MyServer Team
-This program 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 3 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program.  If not, see <http://www.gnu.org/licenses/>.
-'''
-
-from pycontrol.pycontrol import PyMyServerControl
-from pycontrol.pycontrol import error_codes
-
-from sys import argv, exit
-
-if __name__ == "__main__":
-    if len(argv) < 5:
-        print "Not enough arguments\nUsage python test.py hostname port username password"
-        sys.exit(1)
-
-    control = PyMyServerControl(argv[1], int(argv[2]), argv[3], argv[4])
-
-    control.send_header("SHOWCONNECTIONS", 0)
-
-    control.read_header()
-
-    print "Reply code: " + error_codes.get(control.response_code)
-
-    while control.available_data() > 0:
-        print control.read()
-
-
-    control.close()
diff --git a/misc/py_control_client/setup.py b/misc/py_control_client/setup.py
deleted file mode 100644
index f327e72..0000000
--- a/misc/py_control_client/setup.py
+++ /dev/null
@@ -1,22 +0,0 @@
-# -*- coding: utf-8 -*-
-'''
-MyServer
-Copyright (C) 2009 Free Software Foundation, Inc.
-This program 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 3 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program.  If not, see <http://www.gnu.org/licenses/>.
-'''
-
-from distutils.core import setup
-setup(name = 'MyServer', version = '0.0',
-      py_modules = ['MyServer.__init__'],
-      packages = ['MyServer/pycontrol', 'MyServer/pycontrollib', 'MyServer.GUI'])

-----------------------------------------------------------------------

Summary of changes:
 misc/PyGTK_Control/MyServerControl.py              |  461 -------
 misc/PyGTK_Control/PyGTKControl.glade              | 1436 --------------------
 misc/py_control_client/INSTALL                     |   11 -
 misc/py_control_client/MyServer/GUI/AboutWindow.py |   31 -
 .../MyServer/GUI/BrowserWidgets.py                 |   80 --
 .../MyServer/GUI/ConnectionWindow.py               |   45 -
 .../MyServer/GUI/DefinitionWidgets.py              |  304 -----
 misc/py_control_client/MyServer/GUI/GUIConfig.py   |   91 --
 misc/py_control_client/MyServer/GUI/MIMEWidgets.py |  204 ---
 .../MyServer/GUI/SecurityWidgets.py                |  732 ----------
 .../py_control_client/MyServer/GUI/VHostWidgets.py |  515 -------
 misc/py_control_client/MyServer/GUI/__init__.py    |    2 -
 misc/py_control_client/MyServer/README             |    2 -
 misc/py_control_client/MyServer/__init__.py        |    2 -
 .../MyServer/pycontrol/__init__.py                 |    2 -
 .../MyServer/pycontrol/pycontrol.py                |  115 --
 .../MyServer/pycontrollib/__init__.py              |    1 -
 .../MyServer/pycontrollib/browser.py               |   86 --
 .../MyServer/pycontrollib/config.py                |   70 -
 .../MyServer/pycontrollib/controller.py            |  145 --
 .../MyServer/pycontrollib/definition.py            |  252 ----
 .../py_control_client/MyServer/pycontrollib/log.py |  242 ----
 .../MyServer/pycontrollib/mimetypes.py             |  270 ----
 .../MyServer/pycontrollib/security.py              |  474 -------
 .../MyServer/pycontrollib/test/Makefile            |   45 -
 .../MyServer/pycontrollib/test/config_test.py      |  134 --
 .../MyServer/pycontrollib/test/definition_test.py  |  481 -------
 .../MyServer/pycontrollib/test/log_test.py         |  425 ------
 .../MyServer/pycontrollib/test/mimetypes_test.py   |  484 -------
 .../MyServer/pycontrollib/test/security_test.py    | 1122 ---------------
 .../MyServer/pycontrollib/test/vhost_test.py       |  623 ---------
 .../MyServer/pycontrollib/vhost.py                 |  306 -----
 misc/py_control_client/MyServer/sample.py          |   40 -
 misc/py_control_client/setup.py                    |   22 -
 34 files changed, 0 insertions(+), 9255 deletions(-)
 delete mode 100644 misc/PyGTK_Control/MyServerControl.py
 delete mode 100644 misc/PyGTK_Control/PyGTKControl.glade
 delete mode 100644 misc/py_control_client/INSTALL
 delete mode 100644 misc/py_control_client/MyServer/GUI/AboutWindow.py
 delete mode 100644 misc/py_control_client/MyServer/GUI/BrowserWidgets.py
 delete mode 100644 misc/py_control_client/MyServer/GUI/ConnectionWindow.py
 delete mode 100644 misc/py_control_client/MyServer/GUI/DefinitionWidgets.py
 delete mode 100644 misc/py_control_client/MyServer/GUI/GUIConfig.py
 delete mode 100644 misc/py_control_client/MyServer/GUI/MIMEWidgets.py
 delete mode 100644 misc/py_control_client/MyServer/GUI/SecurityWidgets.py
 delete mode 100644 misc/py_control_client/MyServer/GUI/VHostWidgets.py
 delete mode 100644 misc/py_control_client/MyServer/GUI/__init__.py
 delete mode 100644 misc/py_control_client/MyServer/README
 delete mode 100644 misc/py_control_client/MyServer/__init__.py
 delete mode 100644 misc/py_control_client/MyServer/pycontrol/__init__.py
 delete mode 100644 misc/py_control_client/MyServer/pycontrol/pycontrol.py
 delete mode 100644 misc/py_control_client/MyServer/pycontrollib/__init__.py
 delete mode 100644 misc/py_control_client/MyServer/pycontrollib/browser.py
 delete mode 100644 misc/py_control_client/MyServer/pycontrollib/config.py
 delete mode 100644 misc/py_control_client/MyServer/pycontrollib/controller.py
 delete mode 100644 misc/py_control_client/MyServer/pycontrollib/definition.py
 delete mode 100644 misc/py_control_client/MyServer/pycontrollib/log.py
 delete mode 100644 misc/py_control_client/MyServer/pycontrollib/mimetypes.py
 delete mode 100644 misc/py_control_client/MyServer/pycontrollib/security.py
 delete mode 100644 misc/py_control_client/MyServer/pycontrollib/test/Makefile
 delete mode 100644 misc/py_control_client/MyServer/pycontrollib/test/config_test.py
 delete mode 100644 misc/py_control_client/MyServer/pycontrollib/test/definition_test.py
 delete mode 100644 misc/py_control_client/MyServer/pycontrollib/test/log_test.py
 delete mode 100644 misc/py_control_client/MyServer/pycontrollib/test/mimetypes_test.py
 delete mode 100644 misc/py_control_client/MyServer/pycontrollib/test/security_test.py
 delete mode 100644 misc/py_control_client/MyServer/pycontrollib/test/vhost_test.py
 delete mode 100644 misc/py_control_client/MyServer/pycontrollib/vhost.py
 delete mode 100644 misc/py_control_client/MyServer/sample.py
 delete mode 100644 misc/py_control_client/setup.py


hooks/post-receive
-- 
GNU MyServer



