From aa4f3340e17e227a26659a75a8f60d24c2dd5323 Mon Sep 17 00:00:00 2001 From: Dwayne Boone Date: Thu, 20 Nov 2008 10:22:31 -0330 Subject: Refactored CtrlCHandler usage in slice compilers --- cpp/src/slice2cpp/Gen.cpp | 24 ------------------------ 1 file changed, 24 deletions(-) (limited to 'cpp/src/slice2cpp/Gen.cpp') diff --git a/cpp/src/slice2cpp/Gen.cpp b/cpp/src/slice2cpp/Gen.cpp index 73a3673e655..84283ab72f5 100644 --- a/cpp/src/slice2cpp/Gen.cpp +++ b/cpp/src/slice2cpp/Gen.cpp @@ -13,7 +13,6 @@ #include #include #include -#include #include #include @@ -23,19 +22,6 @@ using namespace Slice; using namespace IceUtil; using namespace IceUtilInternal; -// -// Callback for Crtl-C signal handling -// -static Gen* _gen = 0; - -static void closeCallback() -{ - if(_gen != 0) - { - _gen->closeOutput(); - } -} - static string getDeprecateSymbol(const ContainedPtr& p1, const ContainedPtr& p2) { @@ -64,9 +50,6 @@ Slice::Gen::Gen(const string& name, const string& base, const string& headerExte _stream(stream), _ice(ice) { - _gen = this; - SignalHandler::setCloseCallback(closeCallback); - for(vector::iterator p = _includePaths.begin(); p != _includePaths.end(); ++p) { *p = fullPath(*p); @@ -100,7 +83,6 @@ Slice::Gen::Gen(const string& name, const string& base, const string& headerExte return; } - SignalHandler::addFileForCleanup(fileImplH); implH.open(fileImplH.c_str()); if(!implH) { @@ -108,7 +90,6 @@ Slice::Gen::Gen(const string& name, const string& base, const string& headerExte return; } - SignalHandler::addFileForCleanup(fileImplC); implC.open(fileImplC.c_str()); if(!implC) { @@ -135,7 +116,6 @@ Slice::Gen::Gen(const string& name, const string& base, const string& headerExte fileC = dir + '/' + fileC; } - SignalHandler::addFileForCleanup(fileH); H.open(fileH.c_str()); if(!H) { @@ -143,7 +123,6 @@ Slice::Gen::Gen(const string& name, const string& base, const string& headerExte return; } - SignalHandler::addFileForCleanup(fileC); C.open(fileC.c_str()); if(!C) { @@ -177,9 +156,6 @@ Slice::Gen::~Gen() implH << "\n\n#endif\n"; implC << '\n'; } - - _gen = 0; - SignalHandler::setCloseCallback(0); } bool -- cgit v1.2.3