X-Git-Url: http://git.tdb.fi/?p=libs%2Fcore.git;a=blobdiff_plain;f=source%2Fcore%2Fapplication.cpp;h=ebd928b7b7ce049cd2d33ebcedba2ab8f8d4f190;hp=6bfa6289f1174b604293c09464bd9746d783e46e;hb=b2333b53a0434eb6a131000c0b9bf06e4f603bd6;hpb=c7afef88380ebebc8c2b04e48664d73281ec8848 diff --git a/source/core/application.cpp b/source/core/application.cpp index 6bfa628..ebd928b 100644 --- a/source/core/application.cpp +++ b/source/core/application.cpp @@ -1,10 +1,5 @@ -#ifdef WIN32 -#include -#endif #include -#include -#include -#include +#include #include "application.h" #include "getopt.h" @@ -20,27 +15,19 @@ Application::Application(): exit_code(0) { } -/** -Constructs an instance of the registered application class and runs it. If the -application throws a usage_error, a help message is printed. The GetOpt class -will throw such exceptions automatically in error conditions. - -This function can only be called once. The global main() function provided by -the library normally does it automatically at program startup. -*/ int Application::run(int argc, char **argv, void *data) { static bool called = false; if(called) { - cerr<<"Trying to call Application::run_app twice!\n"; + IO::cerr.write("Trying to call Application::run_app twice!\n"); return 125; } called = true; if(!starter_) { - cerr<<"Trying to run with no RegisteredApplication class!\n"; + IO::cerr.write("Trying to run with no RegisteredApplication class!\n"); return 126; } @@ -54,8 +41,7 @@ int Application::run(int argc, char **argv, void *data) } catch(const usage_error &e) { - cerr<sighandler(s);