ReactOS  0.4.13-dev-551-gf37fb1f
precomp.h
Go to the documentation of this file.
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 {
29 
30 typedef struct _CPTABLEINFO
31 {
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 */
40  PUSHORT MultiByteTable; /* Table for CP->Unicode conversion */
41  PVOID WideCharTable; /* Table for Unicode->CP conversion */
45 
46 int WINAPI
47 GetUName(IN WORD wCharCode, OUT LPWSTR lpBuf);
48 
49 /* nls.c */
50 PUSHORT
52 
53 BOOL
55 
56 BOOL
58 
59 BOOL
61 
62 BOOL
64 
65 USHORT
67 
68 USHORT
70 
71 USHORT
73 
74 USHORT
76 
77 /* bestfit.c */
78 BOOL
79 BestFit_FromNLS(const WCHAR *pszNLSFile, const WCHAR *pszBestFitFile);
80 
81 #endif
#define IN
Definition: typedefs.h:38
BOOL BestFit_FromNLS(const WCHAR *pszNLSFile, const WCHAR *pszBestFitFile)
Definition: bestfit.c:113
USHORT UniDefaultChar
Definition: precomp.h:35
USHORT CodePage
Definition: precomp.h:21
PUSHORT DBCSOffsets
Definition: precomp.h:43
USHORT UniDefaultChar
Definition: precomp.h:24
PUSHORT MultiByteTable
Definition: precomp.h:40
PUSHORT DBCSRanges
Definition: precomp.h:42
USHORT NLS_RecordsCountForMBTable(PCPTABLEINFO CodePageTable)
Definition: nls.c:134
USHORT HeaderSize
Definition: precomp.h:20
struct _NLS_FILE_HEADER * PNLS_FILE_HEADER
struct _CPTABLEINFO CPTABLEINFO
PUSHORT NLS_ReadFile(const WCHAR *pszFile, PCPTABLEINFO CodePageTable)
Definition: nls.c:58
BOOL NLS_IsGlyphTablePresent(PCPTABLEINFO CodePageTable)
Definition: nls.c:97
struct _NLS_FILE_HEADER NLS_FILE_HEADER
unsigned int BOOL
Definition: ntddk_ex.h:94
USHORT NLS_RecordsCountForGlyphTable(PCPTABLEINFO CodePageTable)
Definition: nls.c:164
PVOID WideCharTable
Definition: precomp.h:41
char Char
Definition: bzip2.c:161
USHORT TransDefaultChar
Definition: precomp.h:36
USHORT TransDefaultChar
Definition: precomp.h:25
struct _CPTABLEINFO * PCPTABLEINFO
UCHAR LeadByte[MAXIMUM_LEADBYTES]
Definition: precomp.h:39
USHORT DBCSCodePage
Definition: precomp.h:38
BOOL NLS_IsDefaultCharForUnicode(PCPTABLEINFO CodePageTable, USHORT Char)
Definition: nls.c:112
__wchar_t WCHAR
Definition: xmlstorage.h:180
USHORT TransUniDefaultChar
Definition: precomp.h:37
BOOL NLS_IsDBCSCodePage(PCPTABLEINFO CodePageTable)
Definition: nls.c:91
USHORT DefaultChar
Definition: precomp.h:23
USHORT MaximumCharacterSize
Definition: precomp.h:33
UCHAR LeadByte[MAXIMUM_LEADBYTES]
Definition: precomp.h:27
#define WINAPI
Definition: msvc.h:8
unsigned short WORD
Definition: ntddk_ex.h:93
USHORT NLS_RecordsCountForDBCSTable(PCPTABLEINFO CodePageTable, UCHAR LeadByte)
Definition: nls.c:186
USHORT CodePage
Definition: precomp.h:32
unsigned char UCHAR
Definition: xmlstorage.h:181
#define MAXIMUM_LEADBYTES
Definition: precomp.h:16
USHORT DefaultChar
Definition: precomp.h:34
BOOL NLS_IsDefaultCharForMB(PCPTABLEINFO CodePageTable, UCHAR Char)
Definition: nls.c:103
unsigned short USHORT
Definition: pedump.c:61
int WINAPI GetUName(IN WORD wCharCode, OUT LPWSTR lpBuf)
Definition: getuname.c:17
USHORT NLS_RecordsCountForUnicodeTable(PCPTABLEINFO CodePageTable)
Definition: nls.c:149
#define OUT
Definition: typedefs.h:39
_Out_ PCPTABLEINFO CodePageTable
Definition: rtlfuncs.h:4097
USHORT MaximumCharacterSize
Definition: precomp.h:22
WCHAR * LPWSTR
Definition: xmlstorage.h:184
USHORT TransUniDefaultChar
Definition: precomp.h:26
unsigned short * PUSHORT
Definition: retypes.h:2