1 | /* $Id: options.h,v 1.6 2000-01-24 18:18:59 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 0x00000000UL
|
---|
19 | #define KF_SMP 0x00000001UL
|
---|
20 |
|
---|
21 | /* fPE */
|
---|
22 | #define FLAGS_PE_NOT 0x00000000UL
|
---|
23 | #define FLAGS_PE_PE2LX 0x00000001UL
|
---|
24 | #define FLAGS_PE_PE 0x00000002UL
|
---|
25 | #define FLAGS_PE_MIXED 0x00000003UL
|
---|
26 |
|
---|
27 | /* ulInfoLevel */
|
---|
28 | #define INFOLEVEL_QUIET 0x00000000UL
|
---|
29 | #define INFOLEVEL_ERROR 0x00000001UL
|
---|
30 | #define INFOLEVEL_WARNING 0x00000002UL
|
---|
31 | #define INFOLEVEL_INFO 0x00000003UL
|
---|
32 | #define INFOLEVEL_INFOALL 0x00000004UL
|
---|
33 |
|
---|
34 | /* default heapsizes */
|
---|
35 | #define CB_SWP_INIT (1024*512)
|
---|
36 | #define CB_SWP_MAX (1024*1024*16)
|
---|
37 | #define CB_RES_INIT (1024*256)
|
---|
38 | #define CB_RES_MAX (1024*1024*10)
|
---|
39 |
|
---|
40 |
|
---|
41 | /* Set defaults. */
|
---|
42 | #define SET_OPTIONS_TO_DEFAULT(o) \
|
---|
43 | o.fQuiet = FALSE; \
|
---|
44 | o.usCom = OUTPUT_COM2; \
|
---|
45 | o.fLogging = FALSE; \
|
---|
46 | o.fKernel = KF_UNI; \
|
---|
47 | o.ulBuild = ~0UL; \
|
---|
48 | o.usVerMajor = (unsigned short)~0; \
|
---|
49 | o.usVerMinor = (unsigned short)~0; \
|
---|
50 | o.fPE = FLAGS_PE_PE2LX; \
|
---|
51 | o.ulInfoLevel = INFOLEVEL_QUIET; \
|
---|
52 | o.fElf = FALSE; \
|
---|
53 | o.fScript = FALSE; \
|
---|
54 | o.fNoLoader = FALSE; \
|
---|
55 | o.cbSwpHeapInit = CB_SWP_INIT; \
|
---|
56 | o.cbSwpHeapMax = CB_SWP_MAX; \
|
---|
57 | o.cbResHeapInit = CB_RES_INIT; \
|
---|
58 | o.cbResHeapMax = CB_RES_MAX;
|
---|
59 |
|
---|
60 |
|
---|
61 | /*******************************************************************************
|
---|
62 | * Structures and Typedefs *
|
---|
63 | *******************************************************************************/
|
---|
64 | /** Option struct */
|
---|
65 | struct options
|
---|
66 | {
|
---|
67 | /** @cat misc */
|
---|
68 | BOOL fQuiet; /* Quiet initialization. */
|
---|
69 |
|
---|
70 | /** @cat logging options */
|
---|
71 | USHORT usCom; /* Output port no. */
|
---|
72 | BOOL fLogging; /* Logging. */
|
---|
73 |
|
---|
74 | /** @cat kernel selection */
|
---|
75 | ULONG fKernel; /* Smp or uni kernel. */
|
---|
76 | ULONG ulBuild; /* Kernel build. */
|
---|
77 | USHORT usVerMajor; /* OS/2 major ver - 20 */
|
---|
78 | USHORT usVerMinor; /* OS/2 minor ver - 30,40 */
|
---|
79 |
|
---|
80 | /** @cat Options affecting the generated LX executables */
|
---|
81 | BOOL fPE; /* Flags set the type of conversion. */
|
---|
82 | ULONG ulInfoLevel; /* Pe2Lx InfoLevel. */
|
---|
83 |
|
---|
84 | /** @cat Options affecting the generated ELF executables */
|
---|
85 | BOOL fElf; /* Elf flags. */
|
---|
86 |
|
---|
87 | /** @cat Options affecting the script executables */
|
---|
88 | BOOL fScript; /* Script flags. */
|
---|
89 |
|
---|
90 | /** @cat Options affecting the script executables */
|
---|
91 | BOOL fNoLoader; /* No loader stuff. */
|
---|
92 |
|
---|
93 | /** @cat Options affecting the heap. */
|
---|
94 | ULONG cbSwpHeapInit; /* Initial heapsize. */
|
---|
95 | ULONG cbSwpHeapMax; /* Maximum heapsize. */
|
---|
96 | ULONG cbResHeapInit; /* Initial residentheapsize. */
|
---|
97 | ULONG cbResHeapMax; /* Maxiumem residentheapsize. */
|
---|
98 | };
|
---|
99 |
|
---|
100 |
|
---|
101 | /*******************************************************************************
|
---|
102 | * Global Variables *
|
---|
103 | *******************************************************************************/
|
---|
104 | extern struct options options; /* defined in d32globals.c */
|
---|
105 |
|
---|
106 | #endif
|
---|
107 |
|
---|