Changes in libcfa/src/bits/debug.hfa [ae66348:73abe95]
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
libcfa/src/bits/debug.hfa
rae66348 r73abe95 10 10 // Created On : Mon Nov 28 12:27:26 2016 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : T ue Feb 4 12:29:21 202013 // Update Count : 912 // Last Modified On : Thu Feb 8 12:35:19 2018 13 // Update Count : 2 14 14 // 15 15 … … 21 21 #define __cfaabi_dbg_ctx __PRETTY_FUNCTION__ 22 22 #define __cfaabi_dbg_ctx2 , __PRETTY_FUNCTION__ 23 #define __cfaabi_dbg_ctx_param const char caller[] 24 #define __cfaabi_dbg_ctx_param2 , const char caller[] 25 #define __cfaabi_dbg_ctx_fwd caller 26 #define __cfaabi_dbg_ctx_fwd2 , caller 23 #define __cfaabi_dbg_ctx_param const char * caller 24 #define __cfaabi_dbg_ctx_param2 , const char * caller 27 25 #else 28 26 #define __cfaabi_dbg_debug_do(...) … … 32 30 #define __cfaabi_dbg_ctx_param 33 31 #define __cfaabi_dbg_ctx_param2 34 #define __cfaabi_dbg_ctx_fwd35 #define __cfaabi_dbg_ctx_fwd236 32 #endif 37 33 … … 42 38 #include <stdio.h> 43 39 44 extern void __cfaabi_bits_write( int fd, const char buffer[], int len );45 extern void __cfaabi_bits_acquire();46 extern void __cfaabi_bits_release();47 extern void __cfaabi_bits_print_safe ( int fd, const char fmt[], ... ) __attribute__(( format(printf, 2, 3) ));48 extern void __cfaabi_bits_print_nolock( int fd, const char fmt[], ... ) __attribute__(( format(printf, 2, 3) ));49 extern void __cfaabi_bits_print_vararg( int fd,const char fmt[], va_list arg );50 extern void __cfaabi_bits_print_buffer( int fd, char buffer[], int buffer_size, const char fmt[], ... ) __attribute__(( format(printf, 4, 5) ));40 extern void __cfaabi_dbg_bits_write( const char *buffer, int len ); 41 extern void __cfaabi_dbg_bits_acquire(); 42 extern void __cfaabi_dbg_bits_release(); 43 extern void __cfaabi_dbg_bits_print_safe ( const char fmt[], ... ) __attribute__(( format(printf, 1, 2) )); 44 extern void __cfaabi_dbg_bits_print_nolock( const char fmt[], ... ) __attribute__(( format(printf, 1, 2) )); 45 extern void __cfaabi_dbg_bits_print_vararg( const char fmt[], va_list arg ); 46 extern void __cfaabi_dbg_bits_print_buffer( char buffer[], int buffer_size, const char fmt[], ... ) __attribute__(( format(printf, 3, 4) )); 51 47 #ifdef __cforall 52 48 } … … 54 50 55 51 #ifdef __CFA_DEBUG_PRINT__ 56 #define __cfaabi_dbg_write( buffer, len ) __cfaabi_ bits_write( STDERR_FILENO,buffer, len )57 #define __cfaabi_dbg_acquire() __cfaabi_ bits_acquire()58 #define __cfaabi_dbg_release() __cfaabi_ bits_release()59 #define __cfaabi_dbg_print_safe(...) __cfaabi_ bits_print_safe (__VA_ARGS__)60 #define __cfaabi_dbg_print_nolock(...) __cfaabi_ bits_print_nolock (__VA_ARGS__)61 #define __cfaabi_dbg_print_buffer(...) __cfaabi_ bits_print_buffer (__VA_ARGS__)62 #define __cfaabi_dbg_print_buffer_decl(...) char __dbg_text[256]; int __dbg_len = snprintf( __dbg_text, 256, __VA_ARGS__ ); __cfaabi_ bits_write( __dbg_text, __dbg_len );63 #define __cfaabi_dbg_print_buffer_local(...) __dbg_len = snprintf( __dbg_text, 256, __VA_ARGS__ ); __cfaabi_dbg_ write( __dbg_text, __dbg_len );52 #define __cfaabi_dbg_write( buffer, len ) __cfaabi_dbg_bits_write( buffer, len ) 53 #define __cfaabi_dbg_acquire() __cfaabi_dbg_bits_acquire() 54 #define __cfaabi_dbg_release() __cfaabi_dbg_bits_release() 55 #define __cfaabi_dbg_print_safe(...) __cfaabi_dbg_bits_print_safe (__VA_ARGS__) 56 #define __cfaabi_dbg_print_nolock(...) __cfaabi_dbg_bits_print_nolock (__VA_ARGS__) 57 #define __cfaabi_dbg_print_buffer(...) __cfaabi_dbg_bits_print_buffer (__VA_ARGS__) 58 #define __cfaabi_dbg_print_buffer_decl(...) char __dbg_text[256]; int __dbg_len = snprintf( __dbg_text, 256, __VA_ARGS__ ); __cfaabi_dbg_bits_write( __dbg_text, __dbg_len ); 59 #define __cfaabi_dbg_print_buffer_local(...) __dbg_len = snprintf( __dbg_text, 256, __VA_ARGS__ ); __cfaabi_dbg_bits_write( __dbg_text, __dbg_len ); 64 60 #else 65 61 #define __cfaabi_dbg_write(...) ((void)0)
Note:
See TracChangeset
for help on using the changeset viewer.