fail.c revision 1.2 1 1.2 ross /* $NetBSD: fail.c,v 1.2 2001/03/13 06:45:24 ross Exp $ */
2 1.1 ross
3 1.1 ross /*
4 1.1 ross ===============================================================================
5 1.1 ross
6 1.1 ross This C source file is part of TestFloat, Release 2a, a package of programs
7 1.1 ross for testing the correctness of floating-point arithmetic complying to the
8 1.1 ross IEC/IEEE Standard for Floating-Point.
9 1.1 ross
10 1.1 ross Written by John R. Hauser. More information is available through the Web
11 1.1 ross page `http://HTTP.CS.Berkeley.EDU/~jhauser/arithmetic/TestFloat.html'.
12 1.1 ross
13 1.1 ross THIS SOFTWARE IS DISTRIBUTED AS IS, FOR FREE. Although reasonable effort
14 1.1 ross has been made to avoid it, THIS SOFTWARE MAY CONTAIN FAULTS THAT WILL AT
15 1.1 ross TIMES RESULT IN INCORRECT BEHAVIOR. USE OF THIS SOFTWARE IS RESTRICTED TO
16 1.1 ross PERSONS AND ORGANIZATIONS WHO CAN AND WILL TAKE FULL RESPONSIBILITY FOR ANY
17 1.1 ross AND ALL LOSSES, COSTS, OR OTHER PROBLEMS ARISING FROM ITS USE.
18 1.1 ross
19 1.1 ross Derivative works are acceptable, even for commercial purposes, so long as
20 1.1 ross (1) they include prominent notice that the work is derivative, and (2) they
21 1.1 ross include prominent notice akin to these four paragraphs for those parts of
22 1.1 ross this code that are retained.
23 1.1 ross
24 1.1 ross ===============================================================================
25 1.1 ross */
26 1.1 ross
27 1.1 ross #include <stdlib.h>
28 1.1 ross #include <stdarg.h>
29 1.1 ross #include <stdio.h>
30 1.1 ross #include "milieu.h"
31 1.1 ross #include "fail.h"
32 1.1 ross
33 1.2 ross const char *fail_programName = "";
34 1.1 ross
35 1.1 ross void fail( const char *message, ... )
36 1.1 ross {
37 1.1 ross va_list varArgs;
38 1.1 ross
39 1.1 ross fprintf( stderr, "%s: ", fail_programName );
40 1.1 ross va_start( varArgs, message );
41 1.1 ross vfprintf( stderr, message, varArgs );
42 1.1 ross va_end( varArgs );
43 1.1 ross fputs( ".\n", stderr );
44 1.1 ross exit( EXIT_FAILURE );
45 1.1 ross
46 1.1 ross }
47 1.1 ross
48