2 * Main definitions and externals
4 * Copyright 2000 Bertho A. Stultiens (BS)
8 #ifndef __WMC_WMCTYPES_H
9 #define __WMC_WMCTYPES_H
11 #ifndef __WINE_WINDEF_H
15 /* Byteordering defines */
16 #define WMC_BO_NATIVE 0x00
17 #define WMC_BO_LITTLE 0x01
18 #define WMC_BO_BIG 0x02
20 #define WMC_LOBYTE(w) ((WORD)(w) & 0xff)
21 #define WMC_HIBYTE(w) (((WORD)(w) >> 8) & 0xff)
22 #define WMC_LOWORD(d) ((DWORD)(d) & 0xffff)
23 #define WMC_HIWORD(d) (((DWORD)(d) >> 16) & 0xffff)
24 #define BYTESWAP_WORD(w) ((WORD)(((WORD)WMC_LOBYTE(w) << 8) + (WORD)WMC_HIBYTE(w)))
25 #define BYTESWAP_DWORD(d) ((DWORD)(((DWORD)BYTESWAP_WORD(WMC_LOWORD(d)) << 16) + ((DWORD)BYTESWAP_WORD(WMC_HIWORD(d)))))
30 typedef enum tok_enum
{
38 typedef struct token
{
40 const WCHAR
*name
; /* Parsed name of token */
41 int token
; /* Tokenvalue or language code */
43 const WCHAR
*alias
; /* Alias or filename */
44 int fixed
; /* Cleared if token may change */
47 typedef struct lan_cp
{
52 typedef struct cp_xlat
{
58 typedef struct lanmsg
{
59 int lan
; /* Language code of message */
60 int cp
; /* Codepage of message */
61 WCHAR
*msg
; /* Message text */
62 int len
; /* Message length including trailing '\0' */
66 int id
; /* Message ID */
67 unsigned realid
; /* Combined message ID */
68 WCHAR
*sym
; /* Symbolic name */
69 int sev
; /* Severity code */
70 int fac
; /* Facility code */
71 lanmsg_t
**msgs
; /* Array message texts */
72 int nmsgs
; /* Number of message texts in array */
73 int base
; /* Base of number to print */
74 WCHAR
*cast
; /* Typecase to use */
93 typedef struct block
{
94 unsigned idlo
; /* Lowest ID in this set */
95 unsigned idhi
; /* Highest ID in this set */
96 int size
; /* Size of this set */
97 lanmsg_t
**msgs
; /* Array of messages in this set */
98 int nmsg
; /* Number of array entries */
101 typedef struct lan_blk
{
102 struct lan_blk
*next
; /* Linkage for languages */
103 struct lan_blk
*prev
;
104 int lan
; /* The language of this block */
105 block_t
*blks
; /* Array of blocks for this language */
106 int nblk
; /* Nr of blocks in array */