Debian Codegraph @

vhditools/byte_size_string.h

raw symbols SCIP
1 /*
2 * Byte size string functions
3 *
4 * Copyright (C) 2012-2025, 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( _BYTE_SIZE_STRING_H )
23 #define _BYTE_SIZE_STRING_H
24
25 #include <common.h>
26 #include <types.h>
27
28 #include "vhditools_libcerror.h"
29
30 #if defined( __cplusplus )
31 extern "C" {
32 #endif
33
34 enum BYTE_SIZE_STRING_UNITS
35 {
36 BYTE_SIZE_STRING_UNIT_MEGABYTE = 1000,
37 BYTE_SIZE_STRING_UNIT_MEBIBYTE = 1024
38 };
39
40 int byte_size_string_create(
41 system_character_t *byte_size_string,
42 size_t byte_size_string_length,
43 uint64_t size,
44 int units,
45 libcerror_error_t **error );
46
47 int byte_size_string_convert(
48 const system_character_t *byte_size_string,
49 size_t byte_size_string_length,
50 uint64_t *size,
51 libcerror_error_t **error );
52
53 #if defined( __cplusplus )
54 }
55 #endif
56
57 #endif /* !defined( _BYTE_SIZE_STRING_H ) */
58