1 | /* $Id: options.h,v 1.10 2000-02-25 18:15:06 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) /* 512KB */
|
---|
36 | #define CB_SWP_MAX (1024*1024*16) /* 16MB */
|
---|
37 | #define CB_RES_INIT (1024*256) /* 256KB */
|
---|
38 | #define CB_RES_MAX (1024*1024*10) /* 10MB */
|
---|
39 |
|
---|
40 | /* default assignments */
|
---|
41 | #define DEFAULT_OPTION_ASSIGMENTS \
|
---|
42 | {FALSE, /* fQuiet */ \
|
---|
43 | OUTPUT_COM2, /* usCom */ \
|
---|
44 | FALSE, /* fLogging */ \
|
---|
45 | KF_UNI, /* fKernel */ \
|
---|
46 | ~0UL, /* ulBuild */ \
|
---|
47 | (unsigned short)~0, /* usVerMajor */ \
|
---|
48 | (unsigned short)~0, /* usVerMinor */ \
|
---|
49 | FLAGS_PE_PE2LX, /* fPE */ \
|
---|
50 | INFOLEVEL_QUIET, /* ulInfoLevel */ \
|
---|
51 | FALSE, /* fElf */ \
|
---|
52 | TRUE, /* fScript */ \
|
---|
53 | FALSE, /* fNoLoader */ \
|
---|
54 | CB_SWP_INIT, /* cbSwpHeapInit */ \
|
---|
55 | CB_SWP_MAX, /* cbSwpHeapMax */ \
|
---|
56 | CB_RES_INIT, /* cbResHeapInit */ \
|
---|
57 | CB_RES_MAX} /* cbResHeapMax */
|
---|
58 |
|
---|
59 |
|
---|
60 |
|
---|
61 | /*******************************************************************************
|
---|
62 | * Structures and Typedefs *
|
---|
63 | *******************************************************************************/
|
---|
64 | /** Option struct */
|
---|
65 | #pragma pack(4)
|
---|
66 | struct options
|
---|
67 | {
|
---|
68 | /** @cat misc */
|
---|
69 | ULONG fQuiet; /* Quiet initialization. */
|
---|
70 |
|
---|
71 | /** @cat logging options */
|
---|
72 | USHORT usCom; /* Output port no. */
|
---|
73 | ULONG fLogging; /* Logging. */
|
---|
74 |
|
---|
75 | /** @cat kernel selection */
|
---|
76 | ULONG fKernel; /* Smp or uni kernel. */
|
---|
77 | ULONG ulBuild; /* Kernel build. */
|
---|
78 | USHORT usVerMajor; /* OS/2 major ver - 20 */
|
---|
79 | USHORT usVerMinor; /* OS/2 minor ver - 30,40 */
|
---|
80 |
|
---|
81 | /** @cat Options affecting the generated LX executables */
|
---|
82 | ULONG fPE; /* Flags set the type of conversion. */
|
---|
83 | ULONG ulInfoLevel; /* Pe2Lx InfoLevel. */
|
---|
84 |
|
---|
85 | /** @cat Options affecting the generated ELF executables */
|
---|
86 | ULONG fElf; /* Elf flags. */
|
---|
87 |
|
---|
88 | /** @cat Options affecting the script executables */
|
---|
89 | ULONG fScript; /* Script flags. */
|
---|
90 |
|
---|
91 | /** @cat Options affecting the script executables */
|
---|
92 | ULONG fNoLoader; /* No loader stuff. */
|
---|
93 |
|
---|
94 | /** @cat Options affecting the heap. */
|
---|
95 | ULONG cbSwpHeapInit; /* Initial heapsize. */
|
---|
96 | ULONG cbSwpHeapMax; /* Maximum heapsize. */
|
---|
97 | ULONG cbResHeapInit; /* Initial residentheapsize. */
|
---|
98 | ULONG cbResHeapMax; /* Maxiumem residentheapsize. */
|
---|
99 | };
|
---|
100 | #pragma pack()
|
---|
101 |
|
---|
102 |
|
---|
103 | /*******************************************************************************
|
---|
104 | * Global Variables *
|
---|
105 | *******************************************************************************/
|
---|
106 | extern struct options options; /* defined in d32globals.c */
|
---|
107 | #if defined(__IBMC__) || defined(__IBMCPP__)
|
---|
108 | #pragma map( options , "_options" )
|
---|
109 | #endif
|
---|
110 |
|
---|
111 | #endif
|
---|
112 |
|
---|