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