source: trunk/src/win32k/include/options.h@ 6883

Last change on this file since 6883 was 6883, checked in by bird, 24 years ago

H2INC understand char * better than PSZ.

File size: 9.6 KB
Line 
1/* $Id: options.h,v 1.24 2001-09-30 04:55:56 bird Exp $
2 *
3 * Options.
4 *
5 * Copyright (c) 1998-1999 knut st. osmundsen
6 *
7 * Project Odin Software License can be found in LICENSE.TXT
8 *
9 */
10
11/* NOINC */
12#ifndef _options_h_
13#define _options_h_
14/* INC */
15
16/*******************************************************************************
17* Defined Constants And Macros *
18*******************************************************************************/
19/* fKernel */
20#define KF_UNI 0x0000
21#define KF_SMP 0x0001
22#define KF_W4 0x0002
23#define KF_REV_MASK 0x0FF0
24#define KF_REV_SHIFT 4
25#define KF_REV_0 0x0000
26#define KF_REV_A 0x0010
27#define KF_REV_B 0x0020
28#define KF_REV_C 0x0030
29#define KF_REV_D 0x0040
30#define KF_REV_E 0x0050
31#define KF_REV_F 0x0060
32#define KF_REV_G 0x0070
33#define KF_REV_H 0x0080
34#define KF_REV_I 0x0090
35#define KF_REV_J 0x00a0
36#define KF_REV_K 0x00b0
37#define KF_REV_L 0x00c0
38#define KF_REV_M 0x00d0
39#define KF_REV_N 0x00e0
40#define KF_REV_O 0x00f0
41#define KF_REV_P 0x0100
42#define KF_REV_Q 0x0110
43#define KF_REV_R 0x0120
44#define KF_REV_S 0x0130
45#define KF_REV_T 0x0140
46#define KF_REV_U 0x0150
47#define KF_REV_V 0x0160
48#define KF_REV_W 0x0170
49#define KF_REV_X 0x0180
50#define KF_REV_Y 0x0190
51#define KF_REV_Z 0x01a0
52#define KF_REV_ECS 0x0900
53#define KF_DEBUG 0x1000
54#define KF_HAS_DEBUGTYPE 0x2000
55#define KF_ALLSTRICT 0x3000
56#define KF_HALFSTRICT 0x7000
57
58/* fPE */
59#define FLAGS_PE_NOT 0x00000000UL
60#define FLAGS_PE_PE2LX 0x00000001UL
61#define FLAGS_PE_PE 0x00000002UL
62#define FLAGS_PE_MIXED 0x00000003UL
63
64/* fPEOneObject */
65#define FLAGS_PEOO_DISABLED 0x00000000UL
66#define FLAGS_PEOO_ENABLED 0x00000001UL
67#define FLAGS_PEOO_FORCED 0x00000002UL
68
69/* ulInfoLevel */
70#define INFOLEVEL_QUIET 0x00000000UL
71#define INFOLEVEL_ERROR 0x00000001UL
72#define INFOLEVEL_WARNING 0x00000002UL
73#define INFOLEVEL_INFO 0x00000003UL
74#define INFOLEVEL_INFOALL 0x00000004UL
75
76/* default heapsizes */
77#define CB_SWP_INIT ((unsigned long)1024*512) /* 512KB */
78#define CB_SWP_MAX ((unsigned long)1024*1024*16) /* 16MB */
79#define CB_RES_INIT ((unsigned long)1024*256) /* 256KB */
80#define CB_RES_MAX ((unsigned long)1024*1024*10) /* 10MB */
81
82/* NOINC */
83/* default assignments */
84#define DEFAULT_OPTION_ASSIGMENTS \
85 {FALSE, /* fQuiet */ \
86 OUTPUT_COM2, /* usCom */ \
87 FALSE, /* fLogging */ \
88 KF_UNI, /* fKernel */ \
89 ~0UL, /* ulBuild */ \
90 (unsigned short)~0, /* usVerMajor */ \
91 (unsigned short)~0, /* usVerMinor */ \
92 FLAGS_PE_PE, /* fPE */ \
93 FLAGS_PEOO_FORCED, /* fPEOneObject */ \
94 INFOLEVEL_QUIET, /* ulInfoLevel */ \
95 FALSE, /* fElf */ \
96 TRUE, /* fUNIXScript */ \
97 TRUE, /* fREXXScript */ \
98 TRUE, /* fJava */ \
99 FALSE, /* fNoLoader */ \
100 FALSE, /* fSkipFixups */ \
101 NULL, /* pszCustomDll */ \
102 NULL, /* pszCustomExports */ \
103 TRUE, /* fDllFixes */ \
104 TRUE, /* fExeFixes */ \
105 FALSE, /* fForcePreload */ \
106 FALSE, /* fApiEnh */ \
107 CB_SWP_INIT, /* cbSwpHeapInit */ \
108 CB_SWP_MAX, /* cbSwpHeapMax */ \
109 CB_RES_INIT, /* cbResHeapInit */ \
110 CB_RES_MAX} /* cbResHeapMax */
111
112#define isAnyLoaderEnabled() (!options.fNoLoader && \
113 (isPELoaderEnabled() || isELFEnabled() || isUNIXScriptEnabled() || isREXXScriptEnabled() || isJAVAEnabled()))
114#define isPELoaderEnabled() (options.fPE != FLAGS_PE_NOT)
115#define isPELoaderDisabled() (options.fPE == FLAGS_PE_NOT)
116#define isPe2LxLoaderEnabled() (options.fPE == FLAGS_PE_PE2LX)
117#define isMixedPeLoaderEnabled() (options.fPE == FLAGS_PE_MIXED)
118#define isPEOneObjectEnabled() (options.fPEOneObject == FLAGS_PEOO_ENABLED)
119#define isPEOneObjectDisabled() (options.fPEOneObject == FLAGS_PEOO_DISABLED)
120#define isPEOneObjectForced() (options.fPEOneObject == FLAGS_PEOO_FORCED)
121
122#define isELFDisabled() (!options.fElf)
123#define isELFEnabled() (options.fElf)
124#define isUNIXScriptDisabled() (!options.fUNIXScript)
125#define isUNIXScriptEnabled() (options.fUNIXScript)
126#define isREXXScriptDisabled() (!options.fREXXScript)
127#define isREXXScriptEnabled() (options.fREXXScript)
128#define isJAVADisabled() (!options.fJava)
129#define isJAVAEnabled() (options.fJava)
130
131#define areFixupsEnabled() (!options.fSkipFixups)
132#define areFixupsDisabled() (options.fSkipFixups)
133
134#define hasCustomDll() (options.pszCustomDll != NULL)
135#define hasCustomExports() (options.pszCustomExports != NULL)
136
137#define isSMPKernel() (options.fKernel & KF_SMP)
138#define isUNIKernel() (!(options.fKernel & KF_SMP))
139
140#define isHighMemorySupported() (options.ulBuild >= 14000 || isSMPKernel())
141
142#define isDllFixesEnabled() (options.fDllFixes)
143#define isDllFixesDisabled() (!options.fDllFixes)
144
145#define isExeFixesEnabled() (options.fExeFixes)
146#define isExeFixesDisabled() (!options.fExeFixes)
147
148#define isForcePreloadEnabled() (options.fForcePreload)
149#define isForcePreloadDisabled() (!options.fForcePreload)
150
151#define isApiEnhEnabled() (options.fApiEnh)
152#define isApiEnhDisabled() (!options.fApiEnh)
153
154/* INC */
155
156/*******************************************************************************
157* Structures and Typedefs *
158*******************************************************************************/
159/** Option struct */
160#pragma pack(4)
161struct options
162{
163 /** @cat misc */
164 ULONG fQuiet; /* Quiet initialization. */
165
166 /** @cat logging options */
167 USHORT usCom; /* Output port no. */
168 USHORT fLogging; /* Logging. */
169
170 /** @cat kernel selection */
171 ULONG fKernel; /* Smp or uni kernel. */
172 ULONG ulBuild; /* Kernel build. */
173 USHORT usVerMajor; /* OS/2 major ver - 20 */
174 USHORT usVerMinor; /* OS/2 minor ver - 30,40 */
175
176 /** @cat Options affecting the generated LX executables */
177 ULONG fPE; /* Flags set the type of conversion. */
178 ULONG fPEOneObject; /* All in one object. */
179 ULONG ulInfoLevel; /* Pe2Lx InfoLevel. */
180
181 /** @cat Options affecting the generated ELF executables */
182 ULONG fElf; /* Elf flags. */
183
184 /** @cat Options affecting the UNIX script executables */
185 ULONG fUNIXScript; /* UNIX script flags. */
186
187 /** @cat Options affecting the REXX script executables */
188 ULONG fREXXScript; /* REXX script flags. */
189
190 /** @cat Options affecting the JAVA executables */
191 ULONG fJava; /* Java flags. */
192
193 /** @cat Options affecting the executables */
194 ULONG fNoLoader; /* No loader stuff. !FIXME! We should import / functions even if this flag is set!!! */
195
196 ULONG fSkipFixups;
197 char * pszCustomDll; /* pointer to custom odin dll name */
198 char * pszCustomExports; /* pointer to custom export table */
199
200 /** @cat Options affecting the behaviour changes in the OS/2 loader */
201 ULONG fDllFixes; /* Enables the long DLL name and non .DLL extention fixes. */
202 ULONG fExeFixes; /* Enables EXE files to export entry points. */
203 ULONG fForcePreload; /* Forces the loader to preload executable images. Handy for ICAT Ring-3 debugging. */
204 ULONG fApiEnh; /* Enables the API enhancements */
205
206 /** @cat Options affecting the heap. */
207 ULONG cbSwpHeapInit; /* Initial heapsize. */
208 ULONG cbSwpHeapMax; /* Maximum heapsize. */
209 ULONG cbResHeapInit; /* Initial residentheapsize. */
210 ULONG cbResHeapMax; /* Maxiumem residentheapsize. */
211};
212#pragma pack()
213
214/*******************************************************************************
215* Global Variables *
216*******************************************************************************/
217/* NOINC */
218extern struct options DATA16_GLOBAL options; /* defined in d16globals.c */
219extern char szWin32kIni[160]; /* defined in d16globals.c */
220#ifdef RING0
221#if defined(__IBMC__) || defined(__IBMCPP__)
222 #pragma map( options , "_options" )
223 #pragma map( szWin32kIni, "_szWin32kIni" )
224#endif
225#endif
226/* INC */
227
228/* NOINC */
229#endif
230/* INC */
231
Note: See TracBrowser for help on using the repository browser.