[NLS2TXT] Remove unneeded imports
[reactos.git] / rosapps / applications / devutils / nls2txt / precomp.h
1 /*
2 * PROJECT: ReactOS NLS to TXT Converter
3 * LICENSE: GNU General Public License Version 2.0 or any later version
4 * FILE: devutils/nls2txt/precomp.h
5 * COPYRIGHT: Copyright 2016 Dmitry Chapyshev <dmitry@reactos.org>
6 */
7
8 #ifndef __PRECOMP_H
9 #define __PRECOMP_H
10
11 #include <windows.h>
12 #include <strsafe.h>
13
14 #define MAX_STR_LEN 256
15
16 #define MAXIMUM_LEADBYTES 12
17
18 typedef struct _NLS_FILE_HEADER
19 {
20 USHORT HeaderSize;
21 USHORT CodePage;
22 USHORT MaximumCharacterSize;
23 USHORT DefaultChar;
24 USHORT UniDefaultChar;
25 USHORT TransDefaultChar;
26 USHORT TransUniDefaultChar;
27 UCHAR LeadByte[MAXIMUM_LEADBYTES];
28 } NLS_FILE_HEADER, *PNLS_FILE_HEADER;
29
30 typedef struct _CPTABLEINFO
31 {
32 USHORT CodePage;
33 USHORT MaximumCharacterSize; /* 1 = SBCS, 2 = DBCS */
34 USHORT DefaultChar; /* Default MultiByte Character for the CP->Unicode conversion */
35 USHORT UniDefaultChar; /* Default Unicode Character for the CP->Unicode conversion */
36 USHORT TransDefaultChar; /* Default MultiByte Character for the Unicode->CP conversion */
37 USHORT TransUniDefaultChar; /* Default Unicode Character for the Unicode->CP conversion */
38 USHORT DBCSCodePage;
39 UCHAR LeadByte[MAXIMUM_LEADBYTES];
40 PUSHORT MultiByteTable; /* Table for CP->Unicode conversion */
41 PVOID WideCharTable; /* Table for Unicode->CP conversion */
42 PUSHORT DBCSRanges;
43 PUSHORT DBCSOffsets;
44 } CPTABLEINFO, *PCPTABLEINFO;
45
46 int WINAPI
47 GetUName(IN WORD wCharCode, OUT LPWSTR lpBuf);
48
49 /* nls.c */
50 PUSHORT
51 NLS_ReadFile(const WCHAR *pszFile, PCPTABLEINFO CodePageTable);
52
53 BOOL
54 NLS_IsDBCSCodePage(PCPTABLEINFO CodePageTable);
55
56 BOOL
57 NLS_IsGlyphTablePresent(PCPTABLEINFO CodePageTable);
58
59 BOOL
60 NLS_IsDefaultCharForMB(PCPTABLEINFO CodePageTable, UCHAR Char);
61
62 BOOL
63 NLS_IsDefaultCharForUnicode(PCPTABLEINFO CodePageTable, USHORT Char);
64
65 USHORT
66 NLS_RecordsCountForMBTable(PCPTABLEINFO CodePageTable);
67
68 USHORT
69 NLS_RecordsCountForUnicodeTable(PCPTABLEINFO CodePageTable);
70
71 USHORT
72 NLS_RecordsCountForGlyphTable(PCPTABLEINFO CodePageTable);
73
74 USHORT
75 NLS_RecordsCountForDBCSTable(PCPTABLEINFO CodePageTable, UCHAR LeadByte);
76
77 /* bestfit.c */
78 BOOL
79 BestFit_FromNLS(const WCHAR *pszNLSFile, const WCHAR *pszBestFitFile);
80
81 #endif