Index: /trunk/FACT++/src/dimctrl.cc
===================================================================
--- /trunk/FACT++/src/dimctrl.cc	(revision 10806)
+++ /trunk/FACT++/src/dimctrl.cc	(revision 10806)
@@ -0,0 +1,114 @@
+#include <boost/regex.hpp>
+#include <boost/filesystem.hpp>
+
+#include "Dim.h"
+#include "Shell.h"
+#include "Configuration.h"
+#include "RemoteControl.h"
+
+using namespace std;
+
+template <class T>
+void RunShell(Configuration &conf)
+{
+    // A normal kill will call its destructor! (Very nice feature ;) )
+    static T shell(conf.GetName().c_str(), conf.Get<int>("console")!=1);
+
+    WindowLog &win  = shell.GetStreamIn();
+    WindowLog &wout = shell.GetStreamOut();
+
+    if (conf.Has("log"))
+        if (!wout.OpenLogFile(conf.Get<string>("log")))
+            win << kRed << "ERROR - Couldn't open log-file " << conf.Get<string>("log") << ": " << strerror(errno) << endl;
+
+    shell.Run();
+}
+
+
+// ========================================================================
+void SetupConfiguration(Configuration &conf)
+{
+    const string n = conf.GetName()+".log";
+
+    po::options_description config("Program options");
+    config.add_options()
+        ("dns",       var<string>("localhost"), "Dim nameserver host name (Overwites DIM_DNS_NODE environment variable)")
+        ("log,l",     var<string>(n), "Write log-file")
+        ("console,c", var<int>(),     "Use console (0=shell, 1=simple buffered, X=simple unbuffered)")
+        ;
+
+    conf.AddEnv("dns", "DIM_DNS_NODE");
+
+    conf.AddOptions(config);
+}
+
+/*
+ Extract usage clause(s) [if any] for SYNOPSIS.
+ Translators: "Usage" and "or" here are patterns (regular expressions) which
+ are used to match the usage synopsis in program output.  An example from cp
+ (GNU coreutils) which contains both strings:
+  Usage: cp [OPTION]... [-T] SOURCE DEST
+    or:  cp [OPTION]... SOURCE... DIRECTORY
+    or:  cp [OPTION]... -t DIRECTORY SOURCE...
+ */
+void PrintUsage()
+{
+    cout << "\n"
+        "The console connects to all available Dim Servers and allows to "
+        "easily access all of their commands.\n"
+        "\n"
+        "Usage: test3 [-c type] [OPTIONS]\n"
+        "  or:  test3 [OPTIONS]\n";
+    cout << endl;
+
+}
+
+void PrintHelp()
+{
+    /* Additional help text which is printed after the configuration
+     options goes here */
+}
+
+int main(int argc, const char *argv[])
+{
+    Configuration conf(argv[0]);
+    conf.SetPrintUsage(PrintUsage);
+    SetupConfiguration(conf);
+
+    po::variables_map vm;
+    try
+    {
+        vm = conf.Parse(argc, argv);
+    }
+#if BOOST_VERSION > 104000
+    catch (po::multiple_occurrences &e)
+    {
+        cerr << "Program options invalid due to: " << e.what() << " of '" << e.get_option_name() << "'." << endl;
+        return -1;
+    }
+#endif
+    catch (exception& e)
+    {
+        cerr << "Program options invalid due to: " << e.what() << endl;
+        return -1;
+    }
+
+    if (conf.HasVersion() || conf.HasPrint())
+        return -1;
+
+    if (conf.HasHelp())
+    {
+        PrintHelp();
+        return -1;
+    }
+
+    Dim::Setup(conf.Get<string>("dns"));
+
+    if (conf.Get<int>("console")==0)
+        RunShell<RemoteShell>(conf);
+    else
+        RunShell<RemoteConsole>(conf);
+
+
+    return 0;
+}
Index: unk/FACT++/src/test3.cc
===================================================================
--- /trunk/FACT++/src/test3.cc	(revision 10805)
+++ 	(revision )
@@ -1,114 +1,0 @@
-#include <boost/regex.hpp>
-#include <boost/filesystem.hpp>
-
-#include "Dim.h"
-#include "Shell.h"
-#include "Configuration.h"
-#include "RemoteControl.h"
-
-using namespace std;
-
-template <class T>
-void RunShell(Configuration &conf)
-{
-    // A normal kill will call its destructor! (Very nice feature ;) )
-    static T shell(conf.GetName().c_str(), conf.Get<int>("console")!=1);
-
-    WindowLog &win  = shell.GetStreamIn();
-    WindowLog &wout = shell.GetStreamOut();
-
-    if (conf.Has("log"))
-        if (!wout.OpenLogFile(conf.Get<string>("log")))
-            win << kRed << "ERROR - Couldn't open log-file " << conf.Get<string>("log") << ": " << strerror(errno) << endl;
-
-    shell.Run();
-}
-
-
-// ========================================================================
-void SetupConfiguration(Configuration &conf)
-{
-    const string n = conf.GetName()+".log";
-
-    po::options_description config("Program options");
-    config.add_options()
-        ("dns",       var<string>("localhost"), "Dim nameserver host name (Overwites DIM_DNS_NODE environment variable)")
-        ("log,l",     var<string>(n), "Write log-file")
-        ("console,c", var<int>(),     "Use console (0=shell, 1=simple buffered, X=simple unbuffered)")
-        ;
-
-    conf.AddEnv("dns", "DIM_DNS_NODE");
-
-    conf.AddOptions(config);
-}
-
-/*
- Extract usage clause(s) [if any] for SYNOPSIS.
- Translators: "Usage" and "or" here are patterns (regular expressions) which
- are used to match the usage synopsis in program output.  An example from cp
- (GNU coreutils) which contains both strings:
-  Usage: cp [OPTION]... [-T] SOURCE DEST
-    or:  cp [OPTION]... SOURCE... DIRECTORY
-    or:  cp [OPTION]... -t DIRECTORY SOURCE...
- */
-void PrintUsage()
-{
-    cout << "\n"
-        "The console connects to all available Dim Servers and allows to "
-        "easily access all of their commands.\n"
-        "\n"
-        "Usage: test3 [-c type] [OPTIONS]\n"
-        "  or:  test3 [OPTIONS]\n";
-    cout << endl;
-
-}
-
-void PrintHelp()
-{
-    /* Additional help text which is printed after the configuration
-     options goes here */
-}
-
-int main(int argc, const char *argv[])
-{
-    Configuration conf(argv[0]);
-    conf.SetPrintUsage(PrintUsage);
-    SetupConfiguration(conf);
-
-    po::variables_map vm;
-    try
-    {
-        vm = conf.Parse(argc, argv);
-    }
-#if BOOST_VERSION > 104000
-    catch (po::multiple_occurrences &e)
-    {
-        cerr << "Program options invalid due to: " << e.what() << " of '" << e.get_option_name() << "'." << endl;
-        return -1;
-    }
-#endif
-    catch (exception& e)
-    {
-        cerr << "Program options invalid due to: " << e.what() << endl;
-        return -1;
-    }
-
-    if (conf.HasVersion() || conf.HasPrint())
-        return -1;
-
-    if (conf.HasHelp())
-    {
-        PrintHelp();
-        return -1;
-    }
-
-    Dim::Setup(conf.Get<string>("dns"));
-
-    if (conf.Get<int>("console")==0)
-        RunShell<RemoteShell>(conf);
-    else
-        RunShell<RemoteConsole>(conf);
-
-
-    return 0;
-}
