… | |
… | |
16 | along with this program; if not, write to the Free Software |
16 | along with this program; if not, write to the Free Software |
17 | Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
17 | Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
18 | */ |
18 | */ |
19 | |
19 | |
20 | #include "config.h" |
20 | #include "config.h" |
|
|
21 | #include "compat.h" |
21 | #include <stdarg.h> |
22 | #include <stdarg.h> |
22 | #include <stdio.h> |
23 | #include <stdio.h> |
23 | #include <stdlib.h> |
24 | #include <stdlib.h> |
24 | |
25 | |
25 | #include "data.h" |
|
|
26 | #include "error.h" |
26 | #include "error.h" |
|
|
27 | |
|
|
28 | #ifdef DMALLOC |
|
|
29 | #include <dmalloc.h> |
|
|
30 | #endif |
27 | |
31 | |
28 | static void psiconv_default_error_handler(int kind, psiconv_u32 off, |
32 | static void psiconv_default_error_handler(int kind, psiconv_u32 off, |
29 | const char *message) |
33 | const char *message) |
30 | { |
34 | { |
31 | fprintf(stderr,"%s\n",message); |
35 | fprintf(stderr,"%s\n",message); |
… | |
… | |
96 | |
100 | |
97 | vsnprintf(buffer+curlen,MAX_MESSAGE-curlen,format,ap); |
101 | vsnprintf(buffer+curlen,MAX_MESSAGE-curlen,format,ap); |
98 | |
102 | |
99 | psiconv_error_handler(PSICONV_VERB_PROGRESS,off,buffer); |
103 | psiconv_error_handler(PSICONV_VERB_PROGRESS,off,buffer); |
100 | } |
104 | } |
|
|
105 | |
101 | va_end(ap); |
106 | va_end(ap); |
102 | } |
107 | } |
103 | |
108 | |
104 | |
109 | |
105 | void psiconv_debug(int level, psiconv_u32 off, const char *format,...) |
110 | void psiconv_debug(int level, psiconv_u32 off, const char *format,...) |