Doxygen Source Code Documentation
debugtrace.c File Reference
#include <stdio.h>#include <stdlib.h>#include "mcw_malloc.h"#include "debugtrace.h"Go to the source code of this file.
| Defines | |
| #define | _DEBUGTRACE_MAIN_ | 
| Functions | |
| void | output_message (char *prefix, char *fmt, va_list vararg_ptr) | 
| void | INFO_message (char *fmt,...) | 
| void | ININFO_message (char *fmt,...) | 
| void | WARNING_message (char *fmt,...) | 
| void | ERROR_message (char *fmt,...) | 
| void | ERROR_exit (char *fmt,...) | 
Define Documentation
| 
 | 
| 
 Definition at line 1 of file debugtrace.c. | 
Function Documentation
| 
 | ||||||||||||
| 
 Definition at line 76 of file debugtrace.c. References output_message(). Referenced by CALC_read_opts(), main(), Syntax(), and THD_copy_file(). 
 00077 {
00078    va_list vararg_ptr ;
00079    va_start( vararg_ptr , fmt ) ;
00080    output_message( "** FATAL ERROR: " , fmt , vararg_ptr ) ;
00081    va_end( vararg_ptr ) ;
00082    exit(1) ;
00083 }
 | 
| 
 | ||||||||||||
| 
 Definition at line 65 of file debugtrace.c. References output_message(). Referenced by AFNI_drive_save_jpeg(), AFNI_parse_args(), CALC_read_opts(), ISQ_save_jpeg(), and main(). 
 00066 {
00067    va_list vararg_ptr ;
00068    va_start( vararg_ptr , fmt ) ;
00069    output_message( "** ERROR: " , fmt , vararg_ptr ) ;
00070    va_end( vararg_ptr ) ;
00071    return ;
00072 }
 | 
| 
 | ||||||||||||
| 
 Definition at line 32 of file debugtrace.c. References output_message(). Referenced by AIVVV_niml_quitter(), CALC_read_opts(), GRA_file_pixmap(), identify_software(), ISQ_save_jpeg(), and main(). 
 00033 {
00034    va_list vararg_ptr ;
00035    va_start( vararg_ptr , fmt ) ;
00036    output_message( "++ " , fmt , vararg_ptr ) ;
00037    va_end( vararg_ptr ) ;
00038    return ;
00039 }
 | 
| 
 | ||||||||||||
| 
 Definition at line 43 of file debugtrace.c. References output_message(). Referenced by mri_automask_image(), THD_mask_clust(), and THD_mask_erode(). 
 00044 {
00045    va_list vararg_ptr ;
00046    va_start( vararg_ptr , fmt ) ;
00047    output_message( " + " , fmt , vararg_ptr ) ;
00048    va_end( vararg_ptr ) ;
00049    return ;
00050 }
 | 
| 
 | ||||||||||||||||
| 
 Definition at line 9 of file debugtrace.c. 
 00010 {
00011    char *ifmt , *msg ; int ll ;
00012 
00013    if( fmt == NULL || *fmt == '\0' ) return ;
00014    if( prefix == NULL || *prefix == '\0' ){
00015      ifmt = fmt ;
00016    } else {
00017      ifmt = malloc( strlen(prefix)+strlen(fmt)+4 ) ;
00018      strcpy(ifmt,prefix) ;
00019      strcat(ifmt,fmt) ;
00020    }
00021    ll = strlen(ifmt) ; if( ll < 1024 ) ll = 1024 ;
00022    msg = malloc(sizeof(char)*16*ll) ; msg[0] = '\0' ;
00023    vsprintf(msg,ifmt,vararg_ptr) ; ll = strlen(msg) ;
00024    if( msg[ll-1] != '\n' ){ msg[ll] = '\n' ; msg[ll+1] = '\0' ; }
00025    fputs(msg,stderr) ;
00026    if( ifmt != fmt ) free(ifmt) ;
00027    return ;
00028 }
 | 
| 
 | ||||||||||||
| 
 Definition at line 54 of file debugtrace.c. References output_message(). Referenced by CALC_read_opts(), and main(). 
 00055 {
00056    va_list vararg_ptr ;
00057    va_start( vararg_ptr , fmt ) ;
00058    output_message( "++ WARNING: " , fmt , vararg_ptr ) ;
00059    va_end( vararg_ptr ) ;
00060    return ;
00061 }
 | 
 
                             
                             
                             
                             
                             
                             
                             
                             
                             
                             
                             
                             
 
 
 
 
       
	   
	   
	   
	  