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

Last change on this file since 4972 was 4972, checked in by bird, 25 years ago

Added support for kernel revisions. (like 14062a)

File size: 6.9 KB
Line 
1/* $Id: options.h,v 1.16 2001-01-19 02:28:53 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_ECS 0x0040
30#define KF_DEBUG 0x1000
31#define KF_HAS_DEBUGTYPE 0x2000
32#define KF_ALLSTRICT 0x3000
33#define KF_HALFSTRICT 0x7000
34
35/* fPE */
36#define FLAGS_PE_NOT 0x00000000UL
37#define FLAGS_PE_PE2LX 0x00000001UL
38#define FLAGS_PE_PE 0x00000002UL
39#define FLAGS_PE_MIXED 0x00000003UL
40
41/* ulInfoLevel */
42#define INFOLEVEL_QUIET 0x00000000UL
43#define INFOLEVEL_ERROR 0x00000001UL
44#define INFOLEVEL_WARNING 0x00000002UL
45#define INFOLEVEL_INFO 0x00000003UL
46#define INFOLEVEL_INFOALL 0x00000004UL
47
48/* default heapsizes */
49#define CB_SWP_INIT ((unsigned long)1024*512) /* 512KB */
50#define CB_SWP_MAX ((unsigned long)1024*1024*16) /* 16MB */
51#define CB_RES_INIT ((unsigned long)1024*256) /* 256KB */
52#define CB_RES_MAX ((unsigned long)1024*1024*10) /* 10MB */
53
54/* NOINC */
55/* default assignments */
56#define DEFAULT_OPTION_ASSIGMENTS \
57 {FALSE, /* fQuiet */ \
58 OUTPUT_COM2, /* usCom */ \
59 FALSE, /* fLogging */ \
60 KF_UNI, /* fKernel */ \
61 ~0UL, /* ulBuild */ \
62 (unsigned short)~0, /* usVerMajor */ \
63 (unsigned short)~0, /* usVerMinor */ \
64 FLAGS_PE_PE, /* fPE */ \
65 INFOLEVEL_QUIET, /* ulInfoLevel */ \
66 FALSE, /* fElf */ \
67 TRUE, /* fUNIXScript */ \
68 TRUE, /* fREXXScript */ \
69 TRUE, /* fJava */ \
70 FALSE, /* fNoLoader */ \
71 TRUE, /* fDllFixes */ \
72 TRUE, /* fExeFixes */ \
73 CB_SWP_INIT, /* cbSwpHeapInit */ \
74 CB_SWP_MAX, /* cbSwpHeapMax */ \
75 CB_RES_INIT, /* cbResHeapInit */ \
76 CB_RES_MAX} /* cbResHeapMax */
77
78#define isAnyLoaderEnabled() (!options.fNoLoader && \
79 (isPELoaderEnabled() || isELFEnabled() || isUNIXScriptEnabled() || isREXXScriptEnabled() || isJAVAEnabled()))
80#define isPELoaderEnabled() (options.fPE != FLAGS_PE_NOT)
81#define isPELoaderDisabled() (options.fPE == FLAGS_PE_NOT)
82#define isPe2LxLoaderEnabled() (options.fPE == FLAGS_PE_PE2LX)
83#define isMixedPeLoaderEnabled() (options.fPE == FLAGS_PE_MIXED)
84
85#define isELFDisabled() (!options.fElf)
86#define isELFEnabled() (options.fElf)
87#define isUNIXScriptDisabled() (!options.fUNIXScript)
88#define isUNIXScriptEnabled() (options.fUNIXScript)
89#define isREXXScriptDisabled() (!options.fREXXScript)
90#define isREXXScriptEnabled() (options.fREXXScript)
91#define isJAVADisabled() (!options.fJava)
92#define isJAVAEnabled() (options.fJava)
93
94#define isSMPKernel() (options.fKernel & KF_SMP)
95#define isUNIKernel() (!(options.fKernel & KF_SMP))
96
97#define isDllFixesEnabled() (options.fDllFixes)
98#define isDllFixesDisabled() (!options.fDllFixes)
99
100#define isExeFixesEnabled() (options.fExeFixes)
101#define isExeFixesDisabled() (!options.fExeFixes)
102
103/* INC */
104
105/*******************************************************************************
106* Structures and Typedefs *
107*******************************************************************************/
108/** Option struct */
109#pragma pack(4)
110struct options
111{
112 /** @cat misc */
113 ULONG fQuiet; /* Quiet initialization. */
114
115 /** @cat logging options */
116 USHORT usCom; /* Output port no. */
117 USHORT fLogging; /* Logging. */
118
119 /** @cat kernel selection */
120 ULONG fKernel; /* Smp or uni kernel. */
121 ULONG ulBuild; /* Kernel build. */
122 USHORT usVerMajor; /* OS/2 major ver - 20 */
123 USHORT usVerMinor; /* OS/2 minor ver - 30,40 */
124
125 /** @cat Options affecting the generated LX executables */
126 ULONG fPE; /* Flags set the type of conversion. */
127 ULONG ulInfoLevel; /* Pe2Lx InfoLevel. */
128
129 /** @cat Options affecting the generated ELF executables */
130 ULONG fElf; /* Elf flags. */
131
132 /** @cat Options affecting the UNIX script executables */
133 ULONG fUNIXScript; /* UNIX script flags. */
134
135 /** @cat Options affecting the REXX script executables */
136 ULONG fREXXScript; /* REXX script flags. */
137
138 /** @cat Options affecting the JAVA executables */
139 ULONG fJava; /* Java flags. */
140
141 /** @cat Options affecting the executables */
142 ULONG fNoLoader; /* No loader stuff. !FIXME! We should import / functions even if this flag is set!!! */
143
144 /** @cat Options affecting the behaviour changes in the OS/2 loader */
145 ULONG fDllFixes; /* Enables the long DLL name and non .DLL extention fixes. */
146 ULONG fExeFixes; /* Enables EXE files to export entry points. */
147
148 /** @cat Options affecting the heap. */
149 ULONG cbSwpHeapInit; /* Initial heapsize. */
150 ULONG cbSwpHeapMax; /* Maximum heapsize. */
151 ULONG cbResHeapInit; /* Initial residentheapsize. */
152 ULONG cbResHeapMax; /* Maxiumem residentheapsize. */
153};
154#pragma pack()
155
156/*******************************************************************************
157* Global Variables *
158*******************************************************************************/
159/* NOINC */
160extern struct options DATA16_GLOBAL options; /* defined in d16globals.c */
161#if defined(__IBMC__) || defined(__IBMCPP__)
162 #pragma map( options , "_options" )
163#endif
164/* INC */
165
166/* NOINC */
167#endif
168/* INC */
169
Note: See TracBrowser for help on using the repository browser.