/[ascend]/trunk/base/generic/utilities/error.c
ViewVC logotype

Diff of /trunk/base/generic/utilities/error.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 977 by johnpye, Mon Dec 11 14:43:02 2006 UTC revision 978 by johnpye, Wed Dec 20 10:26:04 2006 UTC
# Line 334  va_error_reporter( Line 334  va_error_reporter(
334    DROP-IN replacements for stdio.h / ascPrint.h    DROP-IN replacements for stdio.h / ascPrint.h
335  */  */
336    
337  /**  int vfprintf_error_reporter(FILE *file, const char *fmt, const va_list args){
     This function performs caching of the error text if the flag is set  
 */  
 int  
 fprintf_error_reporter(FILE *file, const char *fmt, ...){  
     va_list args;  
338      char *msg;      char *msg;
339      int len;      int len;
340      int res;      int res;
   
     /* fprintf(stderr,"ENTERED FPRINTF_ERROR_REPORTER\n"); */  
   
     va_start(args,fmt);  
341      if(file==stderr){      if(file==stderr){
342          if(g_error_reporter_cache.iscaching){          if(g_error_reporter_cache.iscaching){
343              msg = g_error_reporter_cache.msg;              msg = g_error_reporter_cache.msg;
# Line 365  fprintf_error_reporter(FILE *file, const Line 356  fprintf_error_reporter(FILE *file, const
356      }else{      }else{
357          res = ASC_VFPRINTF(file,fmt,args);          res = ASC_VFPRINTF(file,fmt,args);
358      }      }
359        return res;
360    }
361        
362    /**
363        This function performs caching of the error text if the flag is set
364    */
365    int
366    fprintf_error_reporter(FILE *file, const char *fmt, ...){
367        va_list args;
368        int res;
369    
370        va_start(args,fmt);
371        res = vfprintf_error_reporter(file,fmt,args);
372      va_end(args);      va_end(args);
373    
374      return res;      return res;

Legend:
Removed from v.977  
changed lines
  Added in v.978

john.pye@anu.edu.au
ViewVC Help
Powered by ViewVC 1.1.22