Debian Codegraph @

libcpath/libcpath_system_string.h

raw symbols SCIP
1 /*
2 * System string functions
3 *
4 * Copyright (C) 2008-2024, Joachim Metz <[email protected]>
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( _LIBCPATH_SYSTEM_STRING_H )
23 #define _LIBCPATH_SYSTEM_STRING_H
24
25 #include <common.h>
26 #include <types.h>
27
28 #include "libcpath_libcerror.h"
29
30 #if defined( __cplusplus )
31 extern "C" {
32 #endif
33
34 int libcpath_system_string_size_to_narrow_string(
35 const system_character_t *system_string,
36 size_t system_string_size,
37 size_t *narrow_string_size,
38 libcerror_error_t **error );
39
40 int libcpath_system_string_copy_to_narrow_string(
41 const system_character_t *system_string,
42 size_t system_string_size,
43 char *narrow_string,
44 size_t narrow_string_size,
45 libcerror_error_t **error );
46
47 int libcpath_system_string_size_from_narrow_string(
48 const char *narrow_string,
49 size_t narrow_string_size,
50 size_t *system_string_size,
51 libcerror_error_t **error );
52
53 int libcpath_system_string_copy_from_narrow_string(
54 system_character_t *system_string,
55 size_t system_string_size,
56 const char *narrow_string,
57 size_t narrow_string_size,
58 libcerror_error_t **error );
59
60 #if defined( HAVE_WIDE_CHARACTER_TYPE )
61
62 int libcpath_system_string_size_to_wide_string(
63 const system_character_t *system_string,
64 size_t system_string_size,
65 size_t *wide_string_size,
66 libcerror_error_t **error );
67
68 int libcpath_system_string_copy_to_wide_string(
69 const system_character_t *system_string,
70 size_t system_string_size,
71 wchar_t *wide_string,
72 size_t wide_string_size,
73 libcerror_error_t **error );
74
75 int libcpath_system_string_size_from_wide_string(
76 const wchar_t *wide_string,
77 size_t wide_string_size,
78 size_t *system_string_size,
79 libcerror_error_t **error );
80
81 int libcpath_system_string_copy_from_wide_string(
82 system_character_t *system_string,
83 size_t system_string_size,
84 const wchar_t *wide_string,
85 size_t wide_string_size,
86 libcerror_error_t **error );
87
88 #endif /* defined( HAVE_WIDE_CHARACTER_TYPE ) */
89
90 #if defined( __cplusplus )
91 }
92 #endif
93
94 #endif /* !defined( _LIBCPATH_SYSTEM_STRING_H ) */
95