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

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

Merged in the Grace branch. New Win32k!

File size: 6.0 KB
Line 
1/* $Id: options.h,v 1.11 2000-09-02 21:08:03 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#ifndef _options_h_
12#define _options_h_
13
14/*******************************************************************************
15* Defined Constants And Macros *
16*******************************************************************************/
17/* fKernel */
18#define KF_UNI 0x0000
19#define KF_SMP 0x0001
20#define KF_W4 0x0002
21#define KF_DEBUG 0x1000
22#define KF_HAS_DEBUGTYPE 0x2000
23#define KF_ALLSTRICT 0x3000
24#define KF_HALFSTRICT 0x7000
25
26/* fPE */
27#define FLAGS_PE_NOT 0x00000000UL
28#define FLAGS_PE_PE2LX 0x00000001UL
29#define FLAGS_PE_PE 0x00000002UL
30#define FLAGS_PE_MIXED 0x00000003UL
31
32/* ulInfoLevel */
33#define INFOLEVEL_QUIET 0x00000000UL
34#define INFOLEVEL_ERROR 0x00000001UL
35#define INFOLEVEL_WARNING 0x00000002UL
36#define INFOLEVEL_INFO 0x00000003UL
37#define INFOLEVEL_INFOALL 0x00000004UL
38
39/* default heapsizes */
40#define CB_SWP_INIT ((unsigned long)1024*512) /* 512KB */
41#define CB_SWP_MAX ((unsigned long)1024*1024*16) /* 16MB */
42#define CB_RES_INIT ((unsigned long)1024*256) /* 256KB */
43#define CB_RES_MAX ((unsigned long)1024*1024*10) /* 10MB */
44
45/* default assignments */
46#define DEFAULT_OPTION_ASSIGMENTS \
47 {FALSE, /* fQuiet */ \
48 OUTPUT_COM2, /* usCom */ \
49 FALSE, /* fLogging */ \
50 KF_UNI, /* fKernel */ \
51 ~0UL, /* ulBuild */ \
52 (unsigned short)~0, /* usVerMajor */ \
53 (unsigned short)~0, /* usVerMinor */ \
54 FLAGS_PE_MIXED, /* fPE */ \
55 INFOLEVEL_QUIET, /* ulInfoLevel */ \
56 FALSE, /* fElf */ \
57 TRUE, /* fUNIXScript */ \
58 TRUE, /* fREXXScript */ \
59 TRUE, /* fJava */ \
60 FALSE, /* fNoLoader */ \
61 CB_SWP_INIT, /* cbSwpHeapInit */ \
62 CB_SWP_MAX, /* cbSwpHeapMax */ \
63 CB_RES_INIT, /* cbResHeapInit */ \
64 CB_RES_MAX} /* cbResHeapMax */
65
66#define isAnyLoaderEnabled() (!options.fNoLoader && \
67 (isPELoaderEnabled() || isELFEnabled() || isUNIXScriptEnabled() || isREXXScriptEnabled() || isJAVAEnabled()))
68#define isPELoaderEnabled() (options.fPE != FLAGS_PE_NOT)
69#define isPELoaderDisabled() (options.fPE == FLAGS_PE_NOT)
70#define isPe2LxLoaderEnabled() (options.fPE == FLAGS_PE_PE2LX)
71#define isMixedPeLoaderEnabled() (options.fPE == FLAGS_PE_MIXED)
72
73#define isELFDisabled() (!options.fElf)
74#define isELFEnabled() (options.fElf)
75#define isUNIXScriptDisabled() (!options.fUNIXScript)
76#define isUNIXScriptEnabled() (options.fUNIXScript)
77#define isREXXScriptDisabled() (!options.fREXXScript)
78#define isREXXScriptEnabled() (options.fREXXScript)
79#define isJAVADisabled() (!options.fJava)
80#define isJAVAEnabled() (options.fJava)
81
82#define isSMPKernel() (options.fKernel & KF_SMP)
83#define isUNIKernel() !(options.fKernel & KF_SMP)
84
85
86/*******************************************************************************
87* Structures and Typedefs *
88*******************************************************************************/
89/** Option struct */
90#pragma pack(4)
91struct options
92{
93 /** @cat misc */
94 ULONG fQuiet; /* Quiet initialization. */
95
96 /** @cat logging options */
97 USHORT usCom; /* Output port no. */
98 ULONG fLogging; /* Logging. */
99
100 /** @cat kernel selection */
101 ULONG fKernel; /* Smp or uni kernel. */
102 ULONG ulBuild; /* Kernel build. */
103 USHORT usVerMajor; /* OS/2 major ver - 20 */
104 USHORT usVerMinor; /* OS/2 minor ver - 30,40 */
105
106 /** @cat Options affecting the generated LX executables */
107 ULONG fPE; /* Flags set the type of conversion. */
108 ULONG ulInfoLevel; /* Pe2Lx InfoLevel. */
109
110 /** @cat Options affecting the generated ELF executables */
111 ULONG fElf; /* Elf flags. */
112
113 /** @cat Options affecting the UNIX script executables */
114 ULONG fUNIXScript; /* UNIX script flags. */
115
116 /** @cat Options affecting the REXX script executables */
117 ULONG fREXXScript; /* REXX script flags. */
118
119 /** @cat Options affecting the JAVA executables */
120 ULONG fJava; /* Java flags. */
121
122 /** @cat Options affecting the executables */
123 ULONG fNoLoader; /* No loader stuff. !FIXME! We should import / functions even if this flag is set!!! */
124
125 /** @cat Options affecting the heap. */
126 ULONG cbSwpHeapInit; /* Initial heapsize. */
127 ULONG cbSwpHeapMax; /* Maximum heapsize. */
128 ULONG cbResHeapInit; /* Initial residentheapsize. */
129 ULONG cbResHeapMax; /* Maxiumem residentheapsize. */
130};
131#pragma pack()
132
133/*******************************************************************************
134* Global Variables *
135*******************************************************************************/
136extern struct options DATA16_GLOBAL options; /* defined in d16globals.c */
137#if defined(__IBMC__) || defined(__IBMCPP__)
138 #pragma map( options , "_options" )
139#endif
140
141#endif
142
Note: See TracBrowser for help on using the repository browser.