README: 'can may' --> 'may'.
[Ale.git] / ui / input.cc
blob8b208517a8ebed57e8a95869b0f80d83d7248cdd
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 2 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 NULL
42 const char *input::focus_prefixes[] = {
43 "ci=",
44 "fr=",
45 "ht=",
46 "vt=",
47 "sy=",
48 "ey=",
49 "sx=",
50 "ex=",
51 "sd=",
52 "ed=",
53 "ap=",
54 "sc=",
55 "sr=",
56 "fs=",
57 NULL
61 * Entries in this table are:
63 * name, map_name, map_value, arg_count, multi
65 * The table must be terminated with name of NULL.
68 input::simple_option input::simple_option_table[] = {
69 { "q0", "default" },
70 { "q1", "default" },
71 { "q2", "default" },
72 { "qn", "default" },
73 { "qr", "default" },
75 { "8bpc", "bpc" },
76 { "16bpc", "bpc" },
78 { "plain", "format" },
79 { "raw", "format" },
80 { "auto", "format" },
82 { "align-all", "align" },
83 { "align-green", "align" },
84 { "align-sum", "align" },
86 { "translation", "transformation" },
87 { "euclidean", "transformation" },
88 { "projective", "transformation" },
90 { "identity", "transformation-default" },
91 { "follow", "transformation-default" },
93 { "perturb-output", "perturb" },
94 { "perturb-source", "perturb" },
96 { "fail-optimal", "fail" },
97 { "fail-default", "fail" },
99 { "extend" },
100 { "no-extend", "extend", "0" },
102 { "no-mc", "mc", "0" },
103 { "mc", NULL, NULL, 1 },
105 { "oc" },
106 { "no-oc", "oc", "0" },
108 { "gs", NULL, NULL, 1 },
109 { "gs-mo", NULL, NULL, 1 },
111 { "focus", "error" },
113 { "3ddp", NULL, NULL, 10, 1 },
114 { "3dvp", NULL, NULL, 10, 1 },
116 { "3dv", NULL, NULL, 2, 1 },
117 { "3dd", NULL, NULL, 2, 1 },
119 { "view-angle", NULL, NULL, 1 },
121 { "cpf-load", NULL, NULL, 1 },
123 { "ui", NULL, NULL, 1 },
125 { "3d-fmr", NULL, NULL, 1 },
127 { "3d-dmr", NULL, NULL, 1 },
129 { "et", NULL, NULL, 1 },
131 { "st", NULL, NULL, 1 },
133 { "di-lower", NULL, NULL, 1 },
135 { "rc", NULL, NULL, 1 },
137 { "do-try", NULL, NULL, 1 },
138 { "di-upper", NULL, NULL, 1 },
140 { "fc", NULL, NULL, 1 },
142 { "ecm", NULL, NULL, 1 },
143 { "acm", NULL, NULL, 1 },
145 { "def-nn", NULL, NULL, 1 },
147 { "fx", NULL, NULL, 1 },
149 { "tcem", NULL, NULL, 1 },
151 { "oui", NULL, NULL, 1 },
153 { "pa", NULL, NULL, 1 },
155 { "pc", NULL, NULL, 1 },
157 { "cw" },
158 { "no-cw", "cw", "0" },
160 { "wm", NULL, NULL, 3 },
162 { "fl", NULL, NULL, 3 },
164 { "wmx", NULL, NULL, 3 },
166 { "flshow", NULL, NULL, 1 },
168 { "3dpx", NULL, NULL, 6 },
170 { "ex", NULL, NULL, 6, 1 },
171 { "crop", NULL, NULL, 6, 1 },
172 { "fex", NULL, NULL, 6, 1 },
173 { "fcrop", NULL, NULL, 6, 1 },
174 { "exshow" },
176 { "wt", NULL, NULL, 1 },
177 { "3d-chain", NULL, NULL, 1 },
178 { "dchain", NULL, NULL, 1 },
179 { "achain", NULL, NULL, 1 },
180 { "afilter", NULL, NULL, 1 },
181 { "ochain", NULL, NULL, 2 },
183 { "visp", NULL, NULL, 5 },
184 { "cx", NULL, NULL, 1 },
185 { "no-cx", "cx", "0" },
187 { "ip", NULL, NULL, 0 },
189 { "bayer", NULL, NULL, 1 },
191 { "lpsf", NULL, NULL, 1 },
192 { "nlpsf", NULL, NULL, 1 },
193 { "psf-match", NULL, NULL, 6 },
195 { "device", NULL, NULL, 1 },
197 { "usm", NULL, NULL, 1 },
199 { "ipr", NULL, NULL, 1 },
201 { "cpp-err-median", "cpp-err", "median" },
202 { "cpp-err-mean", "cpp-err", "mean" },
204 { "vp-adjust" },
205 { "vp-noadjust", "vp-adjust", "0" },
207 { "vo-adjust" },
208 { "vo-noadjust", "vo-adjust", "0" },
210 { "ip-mean", "ip-statistic", "mean" },
211 { "ip-median", "ip-statistic", "median" },
213 { "ips", NULL, NULL, 1 },
215 { "ipc", NULL, NULL, 2 },
217 { "exp-extend" },
218 { "exp-noextend", "exp-extend", "0" },
220 { "exp-register" },
221 { "exp-noregister", "exp-register", "0" },
222 { "exp-meta-only", "exp-register", "2" },
224 { "drizzle-only" },
226 { "subspace-traverse" },
228 { "3d-filter" },
229 { "3d-nofilter", "3d-filter", "0" },
231 { "occ-norm" },
232 { "occ-nonorm", "occ-norm", "0" },
234 { "inc" },
235 { "no-inc", "inc", "0" },
237 { "exp-mult", NULL, NULL, 1 },
239 { "visp-scale", NULL, NULL, 1 },
241 { "scale", NULL, NULL, 1 },
243 { "metric", NULL, NULL, 1 },
245 { "threshold", NULL, NULL, 1 },
247 { "drizzle-diam", NULL, NULL, 1 },
249 { "perturb-upper", NULL, NULL, 1 },
250 { "perturb-lower", NULL, NULL, 1 },
252 { "stepsize", NULL, NULL, 1 },
254 { "va-upper", NULL, NULL, 1 },
255 { "cpp-upper", NULL, NULL, 1 },
256 { "cpp-lower", NULL, NULL, 1 },
257 { "hf-enhance", NULL, NULL, 1 },
258 { "rot-upper", NULL, NULL, 1 },
260 { "bda-mult", NULL, NULL, 1 },
261 { "bda-rate", NULL, NULL, 1 },
263 { "lod-max", NULL, NULL, 1 },
265 { "cpf-load", NULL, NULL, 1 },
266 { "model-load", NULL, NULL, 1 },
267 { "model-save", NULL, NULL, 1 },
268 { "trans-load", NULL, NULL, 1 },
269 { "trans-save", NULL, NULL, 1 },
270 { "3d-trans-load", NULL, NULL, 1 },
271 { "3d-trans-save", NULL, NULL, 1 },
274 * End of table.
277 { NULL }