• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // ConsoleClose.h
2 
3 #ifndef ZIP7_INC_CONSOLE_CLOSE_H
4 #define ZIP7_INC_CONSOLE_CLOSE_H
5 
6 namespace NConsoleClose {
7 
8 class CCtrlBreakException {};
9 
10 #ifdef UNDER_CE
11 
TestBreakSignal()12 inline bool TestBreakSignal() { return false; }
13 struct CCtrlHandlerSetter {};
14 
15 #else
16 
17 extern unsigned g_BreakCounter;
18 
TestBreakSignal()19 inline bool TestBreakSignal()
20 {
21   return (g_BreakCounter != 0);
22 }
23 
24 class CCtrlHandlerSetter Z7_final
25 {
26   #ifndef _WIN32
27   void (*memo_sig_int)(int);
28   void (*memo_sig_term)(int);
29   #endif
30 public:
31   CCtrlHandlerSetter();
32   ~CCtrlHandlerSetter();
33 };
34 
35 #endif
36 
37 }
38 
39 #endif
40