1 | /* |
1 | /* |
2 | error.c - Part of psiconv, a PSION 5 file formats converter |
2 | error.c - Part of psiconv, a PSION 5 file formats converter |
3 | Copyright (c) 1999, 2000 Frodo Looijaard <frodol@dds.nl> |
3 | Copyright (c) 1999-2005 Frodo Looijaard <frodo@frodo.looijaard.name> |
4 | |
4 | |
5 | This program is free software; you can redistribute it and/or modify |
5 | This program is free software; you can redistribute it and/or modify |
6 | it under the terms of the GNU General Public License as published by |
6 | it under the terms of the GNU General Public License as published by |
7 | the Free Software Foundation; either version 2 of the License, or |
7 | the Free Software Foundation; either version 2 of the License, or |
8 | (at your option) any later version. |
8 | (at your option) any later version. |
… | |
… | |
23 | #include <stdio.h> |
23 | #include <stdio.h> |
24 | #include <stdlib.h> |
24 | #include <stdlib.h> |
25 | #include <string.h> |
25 | #include <string.h> |
26 | |
26 | |
27 | #include "error.h" |
27 | #include "error.h" |
28 | #include "config.h" |
|
|
29 | |
28 | |
30 | #ifdef DMALLOC |
29 | #ifdef DMALLOC |
31 | #include <dmalloc.h> |
30 | #include <dmalloc.h> |
32 | #endif |
31 | #endif |
33 | |
32 | |
… | |
… | |
35 | const char *message) |
34 | const char *message) |
36 | { |
35 | { |
37 | fprintf(stderr,"%s\n",message); |
36 | fprintf(stderr,"%s\n",message); |
38 | } |
37 | } |
39 | |
38 | |
40 | #define MAX_MESSAGE 160 |
39 | #define MAX_MESSAGE 1024 |
41 | |
40 | |
42 | void psiconv_fatal(psiconv_config config, int level, psiconv_u32 off, |
41 | void psiconv_fatal(psiconv_config config, int level, psiconv_u32 off, |
43 | const char *format,...) |
42 | const char *format,...) |
44 | { |
43 | { |
45 | char buffer[MAX_MESSAGE]; |
44 | char buffer[MAX_MESSAGE]; |