1206917Smarius
2206917Smarius/*
3206917Smarius===============================================================================
4206917Smarius
5206917SmariusThis C source file is part of TestFloat, Release 2a, a package of programs
6206917Smariusfor testing the correctness of floating-point arithmetic complying to the
7206917SmariusIEC/IEEE Standard for Floating-Point.
8206917Smarius
9206917SmariusWritten by John R. Hauser.  More information is available through the Web
10206917Smariuspage `http://HTTP.CS.Berkeley.EDU/~jhauser/arithmetic/TestFloat.html'.
11206917Smarius
12206917SmariusTHIS SOFTWARE IS DISTRIBUTED AS IS, FOR FREE.  Although reasonable effort
13206917Smariushas been made to avoid it, THIS SOFTWARE MAY CONTAIN FAULTS THAT WILL AT
14206917SmariusTIMES RESULT IN INCORRECT BEHAVIOR.  USE OF THIS SOFTWARE IS RESTRICTED TO
15206917SmariusPERSONS AND ORGANIZATIONS WHO CAN AND WILL TAKE FULL RESPONSIBILITY FOR ANY
16206917SmariusAND ALL LOSSES, COSTS, OR OTHER PROBLEMS ARISING FROM ITS USE.
17206917Smarius
18206917SmariusDerivative works are acceptable, even for commercial purposes, so long as
19206917Smarius(1) they include prominent notice that the work is derivative, and (2) they
20206917Smariusinclude prominent notice akin to these four paragraphs for those parts of
21206917Smariusthis code that are retained.
22206917Smarius
23206917Smarius===============================================================================
24206917Smarius*/
25206917Smarius
26206917Smarius#include <stdlib.h>
27206917Smarius#include <stdarg.h>
28206917Smarius#include <stdio.h>
29206917Smarius#include "milieu.h"
30206917Smarius#include "fail.h"
31206917Smarius
32206917Smariuschar *fail_programName = "";
33206917Smarius
34206917Smariusvoid fail( const char *message, ... )
35206917Smarius{
36206917Smarius    va_list varArgs;
37206917Smarius
38206917Smarius    fprintf( stderr, "%s: ", fail_programName );
39206917Smarius    va_start( varArgs, message );
40206917Smarius    vfprintf( stderr, message, varArgs );
41206917Smarius    va_end( varArgs );
42206917Smarius    fputs( ".\n", stderr );
43206917Smarius    exit( EXIT_FAILURE );
44206917Smarius
45206917Smarius}
46206917Smarius
47