Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/libcfa/assert.c

    r9d944b2 r57f408e  
    1717#include "stdlib"                                                                               // abort
    1818
    19 #include "libhdr/libdebug.h"
    20 
    2119extern "C" {
    2220        #include <stdarg.h>                                                             // varargs
     
    2523        extern const char * __progname;                                         // global name of running executable (argv[0])
    2624
    27         #define CFA_ASSERT_FMT "Cforall Assertion error from program \"%s\" in \"%s\" at line %d in file \"%s\""
     25        #define CFA_ASSERT_FMT "*CFA assertion error* from program \"%s\" in \"%s\" at line %d in file \"%s\""
    2826
    2927        // called by macro assert in assert.h
    3028        void __assert_fail( const char *assertion, const char *file, unsigned int line, const char *function ) {
    31                 __lib_debug_print_safe( CFA_ASSERT_FMT ".\n", __progname, function, line, file );
     29                fprintf( stderr, CFA_ASSERT_FMT ".\n", __progname, function, line, file );
    3230                abort();
    3331        }
     
    3533        // called by macro assertf
    3634        void __assert_fail_f( const char *assertion, const char *file, unsigned int line, const char *function, const char *fmt, ... ) {
    37                 __lib_debug_acquire();
    38                 __lib_debug_print_nolock( CFA_ASSERT_FMT ": ", __progname, function, line, file );
    39 
     35                fprintf( stderr, CFA_ASSERT_FMT ": ", __progname, function, line, file );
    4036                va_list args;
    4137                va_start( args, fmt );
    42                 __lib_debug_print_vararg( fmt, args );
     38                vfprintf( stderr, fmt, args );
    4339                va_end( args );
    44 
    45                 __lib_debug_print_nolock( "\n" );
    46                 __lib_debug_release();
     40                fprintf( stderr, "\n" );
    4741                abort();
    4842        }
Note: See TracChangeset for help on using the changeset viewer.