/[public]/psiconv/trunk/lib/psiconv/error.c
ViewVC logotype

Diff of /psiconv/trunk/lib/psiconv/error.c

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

Revision 183 Revision 184
56 else 56 else
57 psiconv_default_error_handler(PSICONV_VERB_FATAL,off,buffer); 57 psiconv_default_error_handler(PSICONV_VERB_FATAL,off,buffer);
58 va_end(ap); 58 va_end(ap);
59 59
60 exit(1); 60 exit(1);
61}
62
63void psiconv_error(psiconv_config config, int level, psiconv_u32 off,
64 const char *format,...)
65{
66 char buffer[MAX_MESSAGE];
67 va_list ap;
68 size_t curlen;
69
70 va_start(ap,format);
71
72 if (config->verbosity >= PSICONV_VERB_ERROR) {
73 snprintf(buffer,MAX_MESSAGE,"ERROR (offset %08x): ",off);
74 curlen = strlen(buffer);
75
76 vsnprintf(buffer+curlen,MAX_MESSAGE-curlen,format,ap);
77 if (config->error_handler)
78 config->error_handler(PSICONV_VERB_ERROR,off,buffer);
79 else
80 psiconv_default_error_handler(PSICONV_VERB_ERROR,off,buffer);
81 }
82 va_end(ap);
61} 83}
62 84
63void psiconv_warn(psiconv_config config, int level, psiconv_u32 off, 85void psiconv_warn(psiconv_config config, int level, psiconv_u32 off,
64 const char *format,...) 86 const char *format,...)
65{ 87{

Legend:
Removed from v.183  
changed lines
  Added in v.184

frodo@frodo.looijaard.name
ViewVC Help
Powered by ViewVC 1.1.26