d2::align::_align(): Limit skipping of the alignment process based on
[Ale.git] / ui / input.cc
blob77b7ce9f1016febc6abe2422ca7405b2b426c53c
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
21 #include "input.h"
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[] = {
38 "mc",
39 "threads",
40 "per-cpu",
41 "perturb-upper",
42 "ev",
43 "gs-mo",
44 "black",
45 "md",
46 "ma-cert",
47 NULL
50 const char *input::focus_prefixes[] = {
51 "ci=",
52 "fr=",
53 "ht=",
54 "vt=",
55 "sy=",
56 "ey=",
57 "sx=",
58 "ex=",
59 "sd=",
60 "ed=",
61 "ap=",
62 "sc=",
63 "sr=",
64 "fs=",
65 NULL
69 * Entries in this table are:
71 * name, map_name, map_value, arg_count, multi
73 * The table must be terminated with name of NULL.
76 input::simple_option input::simple_option_table[] = {
78 { "8bpc", "bpc" },
79 { "16bpc", "bpc" },
81 { "plain", "format" },
82 { "raw", "format" },
83 { "auto", "format" },
85 { "align-all", "align" },
86 { "align-green", "align" },
87 { "align-sum", "align" },
89 { "translation", "transformation" },
90 { "euclidean", "transformation" },
91 { "projective", "transformation" },
93 { "identity", "transformation-default" },
94 { "follow", "transformation-default" },
96 { "perturb-output", "perturb" },
97 { "perturb-source", "perturb" },
99 { "fail-optimal", "fail" },
100 { "fail-default", "fail" },
102 { "profile" },
104 { "extend" },
105 { "no-extend", "extend", "0" },
107 { "mc", NULL, NULL, 1 },
109 { "cache", NULL, NULL, 1 },
110 { "resident", NULL, NULL, 1 },
112 { "ev", NULL, NULL, 1 },
113 { "black", NULL, NULL, 1 },
115 { "threads", NULL, NULL, 1 },
116 { "per-cpu", NULL, NULL, 1 },
118 { "oc" },
119 { "no-oc", "oc", "0" },
121 { "gs", NULL, NULL, 1 },
122 { "gs-mo", NULL, NULL, 1 },
124 { "md", NULL, NULL, 1 },
125 { "ma-cert", NULL, NULL, 1 },
127 { "focus", "error" },
129 { "3ddp", NULL, NULL, 10, 1 },
130 { "3dvp", NULL, NULL, 10, 1 },
132 { "3dv", NULL, NULL, 2, 1 },
133 { "3dd", NULL, NULL, 2, 1 },
135 { "view-angle", NULL, NULL, 1 },
137 { "cpf-load", NULL, NULL, 1 },
139 { "ui", NULL, NULL, 1 },
141 { "3d-fmr", NULL, NULL, 1 },
143 { "3d-dmr", NULL, NULL, 1 },
145 { "et", NULL, NULL, 1 },
147 { "st", NULL, NULL, 1 },
149 { "di-lower", NULL, NULL, 1 },
151 { "rc", NULL, NULL, 1 },
153 { "do-try", NULL, NULL, 1 },
154 { "di-upper", NULL, NULL, 1 },
156 { "fc", NULL, NULL, 1 },
158 { "ecm", NULL, NULL, 1 },
159 { "acm", NULL, NULL, 1 },
161 { "def-nn", NULL, NULL, 1 },
163 { "fx", NULL, NULL, 1 },
165 { "tcem", NULL, NULL, 1 },
167 { "oui", NULL, NULL, 1 },
169 { "pa", NULL, NULL, 1 },
171 { "pc", NULL, NULL, 1 },
173 { "cw" },
174 { "no-cw", "cw", "0" },
176 { "wm", NULL, NULL, 3 },
178 { "fl", NULL, NULL, 3 },
180 { "wmx", NULL, NULL, 3 },
182 { "flshow", NULL, NULL, 1 },
184 { "3dpx", NULL, NULL, 6 },
186 { "ex", NULL, NULL, 6, 1 },
187 { "crop", NULL, NULL, 6, 1 },
188 { "fex", NULL, NULL, 6, 1 },
189 { "fcrop", NULL, NULL, 6, 1 },
190 { "exshow" },
192 { "wt", NULL, NULL, 1 },
193 { "3d-chain", NULL, NULL, 1 },
194 { "dchain", NULL, NULL, 1 },
195 { "achain", NULL, NULL, 1 },
196 { "afilter", NULL, NULL, 1 },
197 { "ochain", NULL, NULL, 2 },
199 { "visp", NULL, NULL, 5 },
200 { "cx", NULL, NULL, 1 },
201 { "no-cx", "cx", "0" },
203 { "ip", NULL, NULL, 0 },
205 { "bayer", NULL, NULL, 1 },
207 { "lpsf", NULL, NULL, 1 },
208 { "nlpsf", NULL, NULL, 1 },
209 { "psf-match", NULL, NULL, 6 },
211 { "device", NULL, NULL, 1 },
213 { "usm", NULL, NULL, 1 },
215 { "ipr", NULL, NULL, 1 },
217 { "cpp-err-median", "cpp-err", "median" },
218 { "cpp-err-mean", "cpp-err", "mean" },
220 { "vp-adjust" },
221 { "vp-noadjust", "vp-adjust", "0" },
223 { "vo-adjust" },
224 { "vo-noadjust", "vo-adjust", "0" },
226 { "ip-mean", "ip-statistic", "mean" },
227 { "ip-median", "ip-statistic", "median" },
229 { "ip-wl", "ip-wl", "1", 1 },
230 { "ip-nowl", "ip-wl", "0" },
232 { "ips", NULL, NULL, 1 },
234 { "ipc", NULL, NULL, 2 },
236 { "exp-extend" },
237 { "exp-noextend", "exp-extend", "0" },
239 { "exp-register" },
240 { "exp-noregister", "exp-register", "0" },
241 { "exp-meta-only", "exp-register", "2" },
243 { "drizzle-only" },
245 { "subspace-traverse" },
247 { "3d-filter" },
248 { "3d-nofilter", "3d-filter", "0" },
250 { "occ-norm" },
251 { "occ-nonorm", "occ-norm", "0" },
253 { "inc" },
254 { "no-inc", "inc", "0" },
256 { "exp-mult", NULL, NULL, 3 },
258 { "visp-scale", NULL, NULL, 1 },
260 { "scale", NULL, NULL, 1 },
262 { "metric", NULL, NULL, 1 },
264 { "threshold", NULL, NULL, 1 },
266 { "drizzle-diam", NULL, NULL, 1 },
268 { "perturb-upper", NULL, NULL, 1 },
269 { "perturb-lower", NULL, NULL, 1 },
271 { "stepsize", NULL, NULL, 1 },
273 { "va-upper", NULL, NULL, 1 },
274 { "cpp-upper", NULL, NULL, 1 },
275 { "cpp-lower", NULL, NULL, 1 },
276 { "hf-enhance", NULL, NULL, 1 },
277 { "rot-upper", NULL, NULL, 1 },
279 { "bda-mult", NULL, NULL, 1 },
280 { "bda-rate", NULL, NULL, 1 },
282 { "lod-max", NULL, NULL, 1 },
284 { "model-load", NULL, NULL, 1 },
285 { "model-save", NULL, NULL, 1 },
286 { "trans-load", NULL, NULL, 1 },
287 { "trans-save", NULL, NULL, 1 },
288 { "3d-trans-load", NULL, NULL, 1 },
289 { "3d-trans-save", NULL, NULL, 1 },
292 * End of table.
295 { NULL }