Changeset 4970:5fd50d4ef2ea in roaraudio for include


Ignore:
Timestamp:
05/16/11 13:50:52 (13 years ago)
Author:
phi
Branch:
default
Phase:
public
Message:

added roar_panic()

File:
1 edited

Legend:

Unmodified
Added
Removed
  • include/libroar/libroar.h

    r4965 r4970  
    203203int roar_reset(int forked); 
    204204 
     205// fatal probelms: 
     206enum roar_fatal_error { 
     207 ROAR_FATAL_ERROR_NONE = 0,          // ??? 
     208 ROAR_FATAL_ERROR_UNKNOWN,           // Unknown error 
     209 ROAR_FATAL_ERROR_MEMORY_CORRUPTION, // some structure has been corrupted 
     210 ROAR_FATAL_ERROR_MEMORY_CORRUPTION_GUARD, // memory was corruppted but no data has been harmed (yet) 
     211 ROAR_FATAL_ERROR_CPU_FAILTURE,      // CPU general CPU failture 
     212 
     213 ROAR_FATAL_ERROR_EOL 
     214}; 
     215 
     216#if __STDC_VERSION__ < 199901L 
     217#if __GNUC__ >= 2 
     218#define __roar_func__ __FUNCTION__ 
     219#else 
     220#define __roar_func__ NULL 
     221#endif 
     222#else 
     223#define __roar_func__ __func__ 
     224#endif 
     225 
     226#define roar_panic(err,info) roar_panic_real((err), (info), __LINE__, __FILE__, ROAR_DBG_PREFIX, __roar_func__) 
     227void roar_panic_real(enum roar_fatal_error error, const char * info, 
     228                     unsigned long int line, const char * file, const char * prefix, const char * func); 
     229 
    205230#endif 
    206231 
Note: See TracChangeset for help on using the changeset viewer.