
#ifndef ASSERTP_INCLUDED

#define assertp(cond, text) if ( !(cond) ) {                              \
       fprintf( stderr,"assert failed: line(%d) file(%s) problem(%s)\n",  \
         __LINE__,                          \
         __FILE__,                          \
         text );                            \
       abort();                                     \
     }


#define errorp(cond, text) if ( !(cond) ) {       \
        fprintf( stderr,"%s: %s\n",       \
            __FILE__,                 \
            text );                   \
            exit(-1);                         \
     }

#define warning(cond, text, nivell) if ( !(cond) && nivell>LevelW ) {    \
        fprintf( stderr,"warning:  line(%d) file(%s) problem(%s)\n",          \
            __LINE__,                                             \
                        __FILE__,                                             \
            text );                                               \
     }

#endif
