1 /*
2  * Codepage functions
3  *
4  * Copyright (C) 2010-2021, Joachim Metz <joachim.metz@gmail.com>
5  *
6  * Refer to AUTHORS for acknowledgements.
7  *
8  * This program is free software: you can redistribute it and/or modify
9  * it under the terms of the GNU Lesser General Public License as published by
10  * the Free Software Foundation, either version 3 of the License, or
11  * (at your option) any later version.
12  *
13  * This program is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16  * GNU General Public License for more details.
17  *
18  * You should have received a copy of the GNU Lesser General Public License
19  * along with this program.  If not, see <https://www.gnu.org/licenses/>.
20  */
21 
22 #if !defined( _LIBCLOCALE_CODEPAGE_H )
23 #define _LIBCLOCALE_CODEPAGE_H
24 
25 #include <common.h>
26 #include <types.h>
27 
28 #include "libclocale_extern.h"
29 #include "libclocale_libcerror.h"
30 
31 #if defined( __cplusplus )
32 extern "C" {
33 #endif
34 
35 #if defined( __CYGWIN__ ) && ( __GNUC__ < 10 )
36 int libclocale_codepage;
37 #else
38 LIBCLOCALE_EXTERN_VARIABLE \
39 int libclocale_codepage;
40 #endif
41 
42 LIBCLOCALE_EXTERN \
43 int libclocale_codepage_get(
44      int *codepage,
45      libcerror_error_t **error );
46 
47 LIBCLOCALE_EXTERN \
48 int libclocale_codepage_set(
49      int codepage,
50      libcerror_error_t **error );
51 
52 LIBCLOCALE_EXTERN \
53 int libclocale_codepage_copy_from_string(
54      int *codepage,
55      const char *string,
56      size_t string_length,
57      uint32_t feature_flags,
58      libcerror_error_t **error );
59 
60 #if defined( HAVE_WIDE_CHARACTER_TYPE )
61 
62 LIBCLOCALE_EXTERN \
63 int libclocale_codepage_copy_from_string_wide(
64      int *codepage,
65      const wchar_t *string,
66      size_t string_length,
67      uint32_t feature_flags,
68      libcerror_error_t **error );
69 
70 #endif /* defined( HAVE_WIDE_CHARACTER_TYPE ) */
71 
72 #if defined( __cplusplus )
73 }
74 #endif
75 
76 #endif /* !defined( _LIBCLOCALE_CODEPAGE_H ) */
77 
78