d0b383935eee19818691a4945a5f859196fca9b8
[reactos.git] / rosapps / applications / devutils / txt2nls / precomp.h
1 /*
2 * PROJECT: ReactOS TXT to NLS Converter
3 * LICENSE: GNU General Public License Version 2.0 or any later version
4 * FILE: devutils/txt2nls/precomp.h
5 * COPYRIGHT: Copyright 2016 Dmitry Chapyshev <dmitry@reactos.org>
6 */
7
8 #ifndef __PRECOMP_H
9 #define __PRECOMP_H
10
11 #include <stdio.h>
12 #include <stdlib.h>
13 #include <stdint.h>
14 #include <string.h>
15 #include <ctype.h>
16 #include <memory.h>
17
18 #define MAXIMUM_LEADBYTES 12
19
20 typedef struct
21 {
22 uint16_t HeaderSize;
23 uint16_t CodePage;
24 uint16_t MaximumCharacterSize;
25 uint16_t DefaultChar;
26 uint16_t UniDefaultChar;
27 uint16_t TransDefaultChar;
28 uint16_t TransUniDefaultChar;
29 uint8_t LeadByte[MAXIMUM_LEADBYTES];
30 } NLS_FILE_HEADER;
31
32 /* nls.c */
33 int
34 nls_from_txt(const char *txt_file_path, const char *nls_file_path);
35
36 /* bestfit.c */
37 int
38 txt_get_header(const char *file_path, NLS_FILE_HEADER *header);
39
40 uint16_t*
41 txt_get_mb_table(const char *file_path, uint16_t uni_default_char);
42
43 uint16_t*
44 txt_get_wc_table(const char *file_path, uint16_t default_char, int is_dbcs);
45
46 uint16_t*
47 txt_get_glyph_table(const char *file_path, uint16_t uni_default_char);
48
49 #endif