1 | /* |
1 | /* |
2 | common.h - Part of psiconv, a PSION 5 file formats converter |
2 | common.h - Part of psiconv, a PSION 5 file formats converter |
3 | Copyright (c) 1999, 2000 Frodo Looijaard <frodol@dds.nl> |
3 | Copyright (c) 1999, 2000-2004 Frodo Looijaard <frodol@dds.nl> |
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. |
… | |
… | |
22 | |
22 | |
23 | #ifndef PSICONV_COMMON_H |
23 | #ifndef PSICONV_COMMON_H |
24 | #define PSICONV_COMMON_H |
24 | #define PSICONV_COMMON_H |
25 | |
25 | |
26 | #include <psiconv/general.h> |
26 | #include <psiconv/general.h> |
|
|
27 | #include <psiconv/configuration.h> |
27 | #include <psiconv/list.h> |
28 | #include <psiconv/unicode.h> |
28 | |
29 | |
29 | #ifdef __cplusplus |
30 | #ifdef __cplusplus |
30 | extern "C" { |
31 | extern "C" { |
31 | #endif /* __cplusplus */ |
32 | #endif /* __cplusplus */ |
32 | |
33 | |
33 | typedef psiconv_list psiconv_buffer; /* of u8 */ |
|
|
34 | |
|
|
35 | #define psiconv_new_buffer() psiconv_list_new(sizeof(psiconv_u8)) |
|
|
36 | #define psiconv_free_buffer(buf) psiconv_list_free(buf) |
|
|
37 | |
|
|
38 | /* *************** |
34 | /* *************** |
39 | * misc.c * |
35 | * misc.c * |
40 | *************** */ |
36 | *************** */ |
41 | |
37 | |
42 | /* This function returns a copy of a string, that contains no ASCII codes |
38 | /* This function returns a copy of a Unicode string, converted to plain ASCII. |
|
|
39 | Anything codepage dependent (> 128) is sanitized away. |
43 | that are not printable. You should free this string yourself when you are |
40 | You should free this string yourself when you are |
44 | done with it. Returns NULL if there is not enough memory left. */ |
41 | done with it. Returns NULL if there is not enough memory left. */ |
45 | extern char *psiconv_make_printable(const char *s); |
42 | extern char *psiconv_make_printable(const psiconv_config config, |
|
|
43 | const psiconv_string_t s); |
46 | |
44 | |
47 | |
45 | |
48 | /* ************** |
46 | /* ************** |
49 | * checkuid.c * |
47 | * checkuid.c * |
50 | ************** */ |
48 | ************** */ |