1 // Copyright 2006 David Hilvert <dhilvert@auricle.dyndns.org>,
2 // <dhilvert@ugcs.caltech.edu>
4 /* This file is part of the Anti-Lamenessing Engine.
6 The Anti-Lamenessing Engine is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 3 of the License, or
9 (at your option) any later version.
11 The Anti-Lamenessing Engine is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with the Anti-Lamenessing Engine; if not, write to the Free Software
18 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
24 * See input.h for details on these variables.
26 std::stack
<input::environment
*> input::environment::environment_stack
;
27 std::set
<input::environment
*> input::environment::environment_set
;
29 int input::global_options
= 1;
31 input::environment
*input::genv
= NULL
;
34 * List of options that can be used as nonglobals.
37 const char *input::supported_nonglobal_option_table
[] = {
51 const char *input::focus_prefixes
[] = {
70 * Entries in this table are:
72 * name, map_name, map_value, arg_count, multi
74 * The table must be terminated with name of NULL.
77 input::simple_option
input::simple_option_table
[] = {
82 { "plain", "format" },
86 { "align-all", "align" },
87 { "align-green", "align" },
88 { "align-sum", "align" },
90 { "translation", "transformation" },
91 { "euclidean", "transformation" },
92 { "projective", "transformation" },
94 { "identity", "transformation-default" },
95 { "follow", "transformation-default" },
97 { "perturb-output", "perturb" },
98 { "perturb-source", "perturb" },
100 { "fail-optimal", "fail" },
101 { "fail-default", "fail" },
106 { "no-extend", "extend", "0" },
108 { "mc", NULL
, NULL
, 1 },
110 { "cache", NULL
, NULL
, 1 },
111 { "resident", NULL
, NULL
, 1 },
113 { "ev", NULL
, NULL
, 1 },
114 { "black", NULL
, NULL
, 1 },
116 { "threads", NULL
, NULL
, 1 },
117 { "per-cpu", NULL
, NULL
, 1 },
120 { "no-oc", "oc", "0" },
122 { "multi", NULL
, NULL
, 1 },
124 { "gs", NULL
, NULL
, 1 },
125 { "gs-mo", NULL
, NULL
, 1 },
127 { "md", NULL
, NULL
, 1 },
128 { "ma-cert", NULL
, NULL
, 1 },
129 { "mi", NULL
, NULL
, 1 },
131 { "focus", "error" },
133 { "3ddp", NULL
, NULL
, 10, 1 },
134 { "3dvp", NULL
, NULL
, 10, 1 },
136 { "3dv", NULL
, NULL
, 2, 1 },
137 { "3dd", NULL
, NULL
, 2, 1 },
139 { "view-angle", NULL
, NULL
, 1 },
141 { "cpf-load", NULL
, NULL
, 1 },
143 { "ui", NULL
, NULL
, 1 },
145 { "3d-fmr", NULL
, NULL
, 1 },
147 { "3d-dmr", NULL
, NULL
, 1 },
149 { "et", NULL
, NULL
, 1 },
151 { "st", NULL
, NULL
, 1 },
153 { "di-lower", NULL
, NULL
, 1 },
155 { "rc", NULL
, NULL
, 1 },
157 { "do-try", NULL
, NULL
, 1 },
158 { "di-upper", NULL
, NULL
, 1 },
160 { "fc", NULL
, NULL
, 1 },
162 { "ecm", NULL
, NULL
, 1 },
163 { "acm", NULL
, NULL
, 1 },
165 { "def-nn", NULL
, NULL
, 1 },
167 { "fx", NULL
, NULL
, 1 },
169 { "tcem", NULL
, NULL
, 1 },
171 { "oui", NULL
, NULL
, 1 },
173 { "pa", NULL
, NULL
, 1 },
175 { "pc", NULL
, NULL
, 1 },
178 { "no-cw", "cw", "0" },
180 { "wm", NULL
, NULL
, 3 },
182 { "fl", NULL
, NULL
, 3 },
184 { "wmx", NULL
, NULL
, 3 },
186 { "flshow", NULL
, NULL
, 1 },
188 { "3dpx", NULL
, NULL
, 6 },
190 { "ex", NULL
, NULL
, 6, 1 },
191 { "crop", NULL
, NULL
, 6, 1 },
192 { "fex", NULL
, NULL
, 6, 1 },
193 { "fcrop", NULL
, NULL
, 6, 1 },
196 { "wt", NULL
, NULL
, 1 },
197 { "3d-chain", NULL
, NULL
, 1 },
198 { "dchain", NULL
, NULL
, 1 },
199 { "achain", NULL
, NULL
, 1 },
200 { "afilter", NULL
, NULL
, 1 },
201 { "ochain", NULL
, NULL
, 2 },
203 { "visp", NULL
, NULL
, 5 },
204 { "cx", NULL
, NULL
, 1 },
205 { "no-cx", "cx", "0" },
207 { "ip", NULL
, NULL
, 0 },
209 { "bayer", NULL
, NULL
, 1 },
211 { "lpsf", NULL
, NULL
, 1 },
212 { "nlpsf", NULL
, NULL
, 1 },
213 { "psf-match", NULL
, NULL
, 6 },
215 { "device", NULL
, NULL
, 1 },
217 { "usm", NULL
, NULL
, 1 },
219 { "ipr", NULL
, NULL
, 1 },
221 { "cpp-err-median", "cpp-err", "median" },
222 { "cpp-err-mean", "cpp-err", "mean" },
225 { "vp-noadjust", "vp-adjust", "0" },
228 { "vo-noadjust", "vo-adjust", "0" },
230 { "ip-mean", "ip-statistic", "mean" },
231 { "ip-median", "ip-statistic", "median" },
233 { "ip-wl", "ip-wl", "1", 1 },
234 { "ip-nowl", "ip-wl", "0" },
236 { "ips", NULL
, NULL
, 1 },
238 { "ipc", NULL
, NULL
, 2 },
241 { "exp-noextend", "exp-extend", "0" },
244 { "exp-noregister", "exp-register", "0" },
245 { "exp-meta-only", "exp-register", "2" },
249 { "subspace-traverse" },
252 { "3d-nofilter", "3d-filter", "0" },
255 { "occ-nonorm", "occ-norm", "0" },
258 { "no-inc", "inc", "0" },
260 { "exp-mult", NULL
, NULL
, 3 },
262 { "visp-scale", NULL
, NULL
, 1 },
264 { "scale", NULL
, NULL
, 1 },
266 { "metric", NULL
, NULL
, 1 },
268 { "threshold", NULL
, NULL
, 1 },
270 { "drizzle-diam", NULL
, NULL
, 1 },
272 { "perturb-upper", NULL
, NULL
, 1 },
273 { "perturb-lower", NULL
, NULL
, 1 },
275 { "stepsize", NULL
, NULL
, 1 },
277 { "va-upper", NULL
, NULL
, 1 },
278 { "cpp-upper", NULL
, NULL
, 1 },
279 { "cpp-lower", NULL
, NULL
, 1 },
280 { "hf-enhance", NULL
, NULL
, 1 },
281 { "rot-upper", NULL
, NULL
, 1 },
283 { "bda-mult", NULL
, NULL
, 1 },
284 { "bda-rate", NULL
, NULL
, 1 },
286 { "lod-preferred", NULL
, NULL
, 1 },
287 { "min-dimension", NULL
, NULL
, 1 },
289 { "model-load", NULL
, NULL
, 1 },
290 { "model-save", NULL
, NULL
, 1 },
291 { "trans-load", NULL
, NULL
, 1 },
292 { "trans-save", NULL
, NULL
, 1 },
293 { "3d-trans-load", NULL
, NULL
, 1 },
294 { "3d-trans-save", NULL
, NULL
, 1 },