/[ascend]/trunk/base/generic/utilities/ascPanic.h
ViewVC logotype

Contents of /trunk/base/generic/utilities/ascPanic.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 40 - (show annotations) (download) (as text)
Sat Jan 22 14:22:13 2005 UTC (15 years, 9 months ago) by jds
File MIME type: text/x-chdr
File size: 2773 byte(s)
Initial commit of WinVC7 and jam build files.  jam builds Ascend base libs and tcltk98 executable on Windows using msvc, borland, mingw, and watcom (watcom can't yet link executable due to lack of isnan() and copysign() functions).

Also includes minor source updates to compile & run on Windows.
1 /**
2 * Ascend Panic
3 * by Mark Thomas
4 * Created: 1997.05.15
5 * Version: $Revision: 1.1 $
6 * Version control file: $RCSfile: ascPanic.h,v $
7 * Date last modified: $Date: 1997/07/18 11:43:23 $
8 * Last modified by: $Author: mthomas $
9 *
10 * This file is part of the Ascend Language Interpreter.
11 *
12 * Copyright (C) 1997 Carnegie Mellon University
13 *
14 * The Ascend Language Interpreter is free software; you can redistribute
15 * it and/or modify it under the terms of the GNU General Public License as
16 * published by the Free Software Foundation; either version 2 of the
17 * License, or (at your option) any later version.
18 *
19 * The Ascend Language Interpreter is distributed in hope that it will be
20 * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
21 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
22 * General Public License for more details.
23 *
24 * You should have received a copy of the GNU General Public License
25 * along with the program; if not, write to the Free Software Foundation,
26 * Inc., 675 Mass Ave, Cambridge, MA 02139 USA. Check the file named
27 * COPYING.
28 *
29 */
30
31 #ifndef _ASCPANIC_H
32 #define _ASCPANIC_H
33
34 /**
35 * To include this header file, you must include the following:
36 * #include <stdarg.h>
37 * #include "compiler/compiler.h"
38 * #include "compiler/ascpanic.h"
39 */
40
41
42 /**
43 * Asc_Panic( status, function, format, args )
44 * int status;
45 * CONST char *function
46 * CONST char *format
47 * VAR_ARGS args
48 *
49 * This function prints the arguments "args" using the format string
50 * "format" to the ASCERR file handle. The first line of the panic
51 * message will print ``ASCEND PANIC!! in function'' if the argument
52 * "function" is not NULL. If ASCERR has not been initialized to a
53 * valid file pointer, the message will not be printed. Either way,
54 * if an panic output file location has been specified with the
55 * Asc_PanicSetOutfile() function, the panic message is also stored
56 * there. Under Windows, we also pop up a MessageBox containing the
57 * message. Finally, we exit the program with the status "status".
58 *
59 * Side Effects: Exits the program.
60 */
61 extern void Asc_Panic(CONST int status, CONST char *function,
62 CONST char *format, ...);
63
64
65 /**
66 * Asc_PanicSetOutfile(filename)
67 * CONST char *filename;
68 *
69 * Calling this function with a non-NULL "filename" will cause
70 * Asc_Panic() to write panic messages to "filename" in addition to the
71 * ASCERR file handle. Passing in a "filename" of NULL causes panic
72 * messages not to be written to disk---this undoes the effect of
73 * previous calls to Asc_PanicSetOutfile()
74 */
75 extern void Asc_PanicSetOutfile(CONST char *filename);
76
77 #endif /** _ASCPANIC_H */

john.pye@anu.edu.au
ViewVC Help
Powered by ViewVC 1.1.22