"Fossies" - the Fresh Open Source Software Archive 
Member "shake-1.0/signals.h" (15 Nov 2014, 2423 Bytes) of package /linux/privat/shake-1.0.tar.gz:
As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting (style:
standard) with prefixed line numbers and
code folding option.
Alternatively you can here
view or
download the uninterpreted source code file.
For more information about "signals.h" see the
Fossies "Dox" file reference documentation.
1 /***************************************************************************/
2 /* Copyright (C) 2006-2009 Brice Arnould. */
3 /* */
4 /* This file is part of ShaKe. */
5 /* */
6 /* ShaKe is free software; you can redistribute it and/or modify */
7 /* it under the terms of the GNU General Public License as published by */
8 /* the Free Software Foundation; either version 3 of the License, or */
9 /* (at your option) any later version. */
10 /* */
11 /* This program is distributed in the hope that it will be useful, */
12 /* but WITHOUT ANY WARRANTY; without even the implied warranty of */
13 /* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */
14 /* GNU General Public License for more details. */
15 /* */
16 /* You should have received a copy of the GNU General Public License */
17 /* along with this program. If not, see <http://www.gnu.org/licenses/>. */
18 /***************************************************************************/
19
20 #ifndef SIGNALS_H
21 # define SIGNALS_H
22
23
24 enum mode
25 {
26 /* In this mode, signals are handled with the default handler, appart
27 * that the temporary file will be deleted.
28 * You can enter this mode from any other.
29 */
30 NORMAL = 42,
31 /* In this mode :
32 * signals raised by internal errors, such as SIGSEV, stop the program
33 * and show informations about the error (char *msg)
34 * signals that suspend the activity works as usual
35 * others are suspended
36 * It is intended to be used when current_tempfile is the only copy
37 * of a file.
38 * You can enter in this mode from NORMAL.
39 */
40 CRITICAL,
41 };
42
43 /* Set signals.c/handle_signals() as the default handler, tempfile
44 * as the current temporary file, then call enter_normal_mode
45 */
46 void install_sighandler (const char *tempfile);
47
48 /* Enter CRITICAL mode (see above), msg is the message to display in
49 * case of failure.
50 */
51 void enter_critical_mode (const char *msg);
52
53 /* Enter NORMAL mode (see above).
54 */
55 void enter_normal_mode (void);
56
57 #endif