| 1 |
(* mcOptions.def handles the options for mc. |
| 2 |
|
| 3 |
Copyright (C) 2015-2025 Free Software Foundation, Inc. |
| 4 |
Contributed by Gaius Mulley <[email protected]>. |
| 5 |
|
| 6 |
This file is part of GNU Modula-2. |
| 7 |
|
| 8 |
GNU Modula-2 is free software; you can redistribute it and/or modify |
| 9 |
it under the terms of the GNU General Public License as published by |
| 10 |
the Free Software Foundation; either version 3, or (at your option) |
| 11 |
any later version. |
| 12 |
|
| 13 |
GNU Modula-2 is distributed in the hope that it will be useful, but |
| 14 |
WITHOUT ANY WARRANTY; without even the implied warranty of |
| 15 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 16 |
General Public License for more details. |
| 17 |
|
| 18 |
You should have received a copy of the GNU General Public License |
| 19 |
along with GNU Modula-2; see the file COPYING3. If not see |
| 20 |
<http://www.gnu.org/licenses/>. *) |
| 21 |
|
| 22 |
DEFINITION MODULE mcOptions ; |
| 23 |
|
| 24 |
|
| 25 |
FROM DynamicStrings IMPORT String ; |
| 26 |
FROM FIO IMPORT File ; |
| 27 |
|
| 28 |
|
| 29 |
(* |
| 30 |
handleOptions - iterates over all options setting appropriate |
| 31 |
values and returns the single source file |
| 32 |
if found at the end of the arguments. |
| 33 |
*) |
| 34 |
|
| 35 |
PROCEDURE handleOptions () : String ; |
| 36 |
|
| 37 |
|
| 38 |
(* |
| 39 |
getQuiet - return the value of quiet. |
| 40 |
*) |
| 41 |
|
| 42 |
PROCEDURE getQuiet () : BOOLEAN ; |
| 43 |
|
| 44 |
|
| 45 |
(* |
| 46 |
getVerbose - return the value of verbose. |
| 47 |
*) |
| 48 |
|
| 49 |
PROCEDURE getVerbose () : BOOLEAN ; |
| 50 |
|
| 51 |
|
| 52 |
(* |
| 53 |
getInternalDebugging - return the value of internalDebugging. |
| 54 |
*) |
| 55 |
|
| 56 |
PROCEDURE getInternalDebugging () : BOOLEAN ; |
| 57 |
|
| 58 |
|
| 59 |
(* |
| 60 |
CppCommandLine - returns the Cpp command line and all arguments. |
| 61 |
*) |
| 62 |
|
| 63 |
PROCEDURE getCppCommandLine () : String ; |
| 64 |
|
| 65 |
|
| 66 |
(* |
| 67 |
getOutputFile - sets the output filename to output. |
| 68 |
*) |
| 69 |
|
| 70 |
PROCEDURE getOutputFile () : String ; |
| 71 |
|
| 72 |
|
| 73 |
(* |
| 74 |
getExtendedOpaque - return the extendedOpaque value. |
| 75 |
*) |
| 76 |
|
| 77 |
PROCEDURE getExtendedOpaque () : BOOLEAN ; |
| 78 |
|
| 79 |
|
| 80 |
(* |
| 81 |
setDebugTopological - sets the flag debugTopological to value. |
| 82 |
*) |
| 83 |
|
| 84 |
PROCEDURE setDebugTopological (value: BOOLEAN) ; |
| 85 |
|
| 86 |
|
| 87 |
(* |
| 88 |
getDebugTopological - returns the flag value of the command |
| 89 |
line option --debug-top. |
| 90 |
*) |
| 91 |
|
| 92 |
PROCEDURE getDebugTopological () : BOOLEAN ; |
| 93 |
|
| 94 |
|
| 95 |
(* |
| 96 |
getHPrefix - saves the H file prefix. |
| 97 |
*) |
| 98 |
|
| 99 |
PROCEDURE getHPrefix () : String ; |
| 100 |
|
| 101 |
|
| 102 |
(* |
| 103 |
getIgnoreFQ - returns the ignorefq flag. |
| 104 |
*) |
| 105 |
|
| 106 |
PROCEDURE getIgnoreFQ () : BOOLEAN ; |
| 107 |
|
| 108 |
|
| 109 |
(* |
| 110 |
getGccConfigSystem - return the value of the gccConfigSystem flag. |
| 111 |
*) |
| 112 |
|
| 113 |
PROCEDURE getGccConfigSystem () : BOOLEAN ; |
| 114 |
|
| 115 |
|
| 116 |
(* |
| 117 |
getScaffoldDynamic - return true if the --scaffold-dynamic option was present. |
| 118 |
*) |
| 119 |
|
| 120 |
PROCEDURE getScaffoldDynamic () : BOOLEAN ; |
| 121 |
|
| 122 |
|
| 123 |
(* |
| 124 |
getScaffoldMain - return true if the --scaffold-main option was present. |
| 125 |
*) |
| 126 |
|
| 127 |
PROCEDURE getScaffoldMain () : BOOLEAN ; |
| 128 |
|
| 129 |
|
| 130 |
(* |
| 131 |
writeGPLheader - writes out the GPL or the GLPL as a comment. |
| 132 |
*) |
| 133 |
|
| 134 |
PROCEDURE writeGPLheader (f: File) ; |
| 135 |
|
| 136 |
|
| 137 |
(* |
| 138 |
setSuppressNoReturn - set suppressNoReturn to value. |
| 139 |
*) |
| 140 |
|
| 141 |
PROCEDURE setSuppressNoReturn (value: BOOLEAN) ; |
| 142 |
|
| 143 |
|
| 144 |
(* |
| 145 |
getSuppressNoReturn - return the suppressNoReturn value. |
| 146 |
*) |
| 147 |
|
| 148 |
PROCEDURE getSuppressNoReturn () : BOOLEAN ; |
| 149 |
|
| 150 |
|
| 151 |
(* |
| 152 |
useBool - should mc use the bool type instead of int. |
| 153 |
*) |
| 154 |
|
| 155 |
PROCEDURE useBool () : BOOLEAN ; |
| 156 |
|
| 157 |
|
| 158 |
(* |
| 159 |
getCRealType - returns the string representing the REAL type |
| 160 |
used by C. By default this is "double". |
| 161 |
*) |
| 162 |
|
| 163 |
PROCEDURE getCRealType () : String ; |
| 164 |
|
| 165 |
|
| 166 |
(* |
| 167 |
getCLongRealType - returns the string representing the REAL type |
| 168 |
used by C. By default this is "long double". |
| 169 |
*) |
| 170 |
|
| 171 |
PROCEDURE getCLongRealType () : String ; |
| 172 |
|
| 173 |
|
| 174 |
(* |
| 175 |
getCShortRealType - returns the string representing the REAL type |
| 176 |
used by C. By default this is "float". |
| 177 |
*) |
| 178 |
|
| 179 |
PROCEDURE getCShortRealType () : String ; |
| 180 |
|
| 181 |
|
| 182 |
END mcOptions. |