-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathOptions.cpp
1219 lines (915 loc) · 25.3 KB
/
Options.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
//
// Programmer: Craig Stuart Sapp <[email protected]>
// Creation Date: Sun Apr 5 13:07:18 PDT 1998
// Last Modified: Mon Jan 18 18:25:23 PST 2021 Some cleanup
// Filename: midifile/src/Options.cpp
// Web Address: http://midifile.sapp.org
// Syntax: C++11
// vim: ts=3 noexpandtab
//
// Description: Interface to command-line options.
//
#include "Options.h"
#include <stdlib.h>
#include <string>
#include <vector>
#include <cctype>
#include <iostream>
#include <algorithm>
namespace smf {
///////////////////////////////////////////////////////////////////////////
//
// Option_register class function definitions.
//
//////////////////////////////
//
// Option_register::Option_register -- Constructor.
//
Option_register::Option_register(void) {
setType(OPTION_TYPE_string);
m_modifiedQ = false;
}
Option_register::Option_register(const std::string& aDefinition, char aType,
const std::string& aDefaultOption) {
m_modifiedQ = false;
setType(aType);
setDefinition(aDefinition);
setDefault(aDefaultOption);
}
Option_register::Option_register(const std::string& aDefinition, char aType,
const std::string& aDefaultOption, const std::string& aModifiedOption) {
setType(aType);
setDefinition(aDefinition);
setDefault(aDefaultOption);
setModified(aModifiedOption);
}
//////////////////////////////
//
// Option_register::~Option_register -- Destructor.
//
Option_register::~Option_register() {
// do nothing
}
//////////////////////////////
//
// Option_register::clearModified -- Clear any changes in the option value.
//
void Option_register::clearModified(void) {
m_modifiedOption.clear();
m_modifiedQ = false;
}
//////////////////////////////
//
// Option_register::getDefinition -- Returns the initial definition.
// string used to define this entry.
//
const std::string& Option_register::getDefinition(void) {
return m_definition;
}
//////////////////////////////
//
// Option_register::getDescription -- Return the textual description
// of the entry.
//
const std::string& Option_register::getDescription(void) {
return m_description;
}
//////////////////////////////
//
// Option_register::getDefault -- Return the default value string.
//
const std::string& Option_register::getDefault(void) {
return m_defaultOption;
}
//////////////////////////////
//
// Option_register::getModified -- Return the modified option string.
//
const std::string& Option_register::getModified(void) {
return m_modifiedOption;
}
//////////////////////////////
//
// Option_register::isModified -- Return true if option has been
// set on the command-line.
//
bool Option_register::isModified(void) {
return m_modifiedQ;
}
//////////////////////////////
//
// Option_register::getType -- Return the data type of the option.
//
char Option_register::getType(void) {
return m_type;
}
//////////////////////////////
//
// Option_register::getOption -- return the modified option
// or the default option if no modified option.
//
const std::string& Option_register::getOption(void) {
if (isModified()) {
return getModified();
} else {
return getDefault();
}
}
//////////////////////////////
//
// Option_register::reset -- deallocate space for all
// strings in object. (but default string is set to "")
//
void Option_register::reset(void) {
m_type = OPTION_TYPE_string;
m_definition.clear();
m_defaultOption.clear();
m_modifiedOption.clear();
}
//////////////////////////////
//
// Option_register::setDefault -- Set the default value.
//
void Option_register::setDefault(const std::string& aString) {
m_defaultOption = aString;
}
//////////////////////////////
//
// Option_register::setDefinition -- Set the option definition.
//
void Option_register::setDefinition(const std::string& aString) {
m_definition = aString;
}
//////////////////////////////
//
// Option_register::setDescription -- Set the textual description.
//
void Option_register::setDescription(const std::string& aString) {
m_description = aString;
}
//////////////////////////////
//
// Option_register::setModified -- Set the modified value.
//
void Option_register::setModified(const std::string& aString) {
m_modifiedOption = aString;
m_modifiedQ = true;
}
//////////////////////////////
//
// Option_register::setType -- Set the option type.
//
void Option_register::setType(char aType) {
m_type = aType;
}
//////////////////////////////
//
// Option_register::print -- Print the state of the option register entry.
// Useful for debugging.
//
std::ostream& Option_register::print(std::ostream& out) {
out << "definition:\t" << m_definition << std::endl;
out << "description:\t" << m_description << std::endl;
out << "defaultOption:\t" << m_defaultOption << std::endl;
out << "modifiedOption:\t" << m_modifiedOption << std::endl;
out << "modifiedQ:\t\t" << m_modifiedQ << std::endl;
out << "type:\t\t" << m_type << std::endl;
return out;
};
///////////////////////////////////////////////////////////////////////////
//
// Options class function definitions.
//
//////////////////////////////
//
// Options::Options -- Constructor.
//
Options::Options(void) {
m_oargc = -1;
m_suppressQ = 0;
m_processedQ = 0;
m_optionsArgument = 0;
m_options_error_check = 1;
m_optionFlag = '-';
m_extraArgv.reserve(100);
m_extraArgv_strings.reserve(100);
}
Options::Options(int argc, char** argv) {
m_oargc = -1;
m_suppressQ = 0;
m_processedQ = 0;
m_optionsArgument = 0;
m_options_error_check = 1;
m_optionFlag = '-';
m_extraArgv.reserve(100);
m_extraArgv_strings.reserve(100);
setOptions(argc, argv);
}
//////////////////////////////
//
// Options::~Options -- Destructor.
//
Options::~Options() {
reset();
}
//////////////////////////////
//
// Options::argc -- returns the argument count as input from main().
//
int Options::argc(void) const {
return m_oargc;
}
//////////////////////////////
//
// Options::argv -- returns the arguments strings as input from main().
//
const std::vector<std::string>& Options::argv(void) const {
return m_oargv;
}
//////////////////////////////
//
// Options::define -- store an option definition in the register. Option
// definitions have this sructure:
// option-name|alias-name1|alias-name2=option-type:option-default
// option-name :: name of the option (one or more character, not including
// spaces or equal signs.
// alias-name :: equivalent name(s) of the option.
// option-type :: single charater indicating the option data type.
// option-default :: default value for option if no given on the command-line.
//
int Options::define(const std::string& aDefinition) {
Option_register* definitionEntry = NULL;
// Error if definition string doesn't contain an equals sign
auto location = aDefinition.find("=");
if (location == std::string::npos) {
std::cout << "Error: no \"=\" in option definition: " << aDefinition << std::endl;
exit(1);
}
std::string aliases = aDefinition.substr(0, location);
std::string rest = aDefinition.substr(location+1);
std::string otype = rest;
std::string ovalue = "";
location = rest.find(":");
if (location != std::string::npos) {
otype = rest.substr(0, location);
ovalue = rest.substr(location+1);
}
// Remove anyspaces in the option type field
otype.erase(remove_if(otype.begin(), otype.end(), ::isspace), otype.end());
// Option types are only a single charater (b, i, d, c or s)
if (otype.size() != 1) {
std::cout << "Error: option type is invalid: " << otype
<< " in option definition: " << aDefinition << std::endl;
exit(1);
}
// Check to make sure that the type is known
if (otype[0] != OPTION_TYPE_string &&
otype[0] != OPTION_TYPE_int &&
otype[0] != OPTION_TYPE_float &&
otype[0] != OPTION_TYPE_double &&
otype[0] != OPTION_TYPE_boolean &&
otype[0] != OPTION_TYPE_char ) {
std::cout << "Error: unknown option type \'" << otype[0]
<< "\' in defintion: " << aDefinition << std::endl;
exit(1);
}
// Set up space for a option entry in the register
definitionEntry = new Option_register(aDefinition, otype[0], ovalue);
int definitionIndex = (int)m_optionRegister.size();
// Store option aliases
std::string optionName;
unsigned int i;
aliases += '|';
for (i=0; i<aliases.size(); i++) {
if (::isspace(aliases[i])) {
continue;
} else if (aliases[i] == '|') {
if (isDefined(optionName)) {
std::cout << "Option \"" << optionName << "\" from definition:" << std::endl;
std::cout << "\t" << aDefinition << std::endl;
std::cout << "is already defined in: " << std::endl;
std::cout << "\t" << getDefinition(optionName) << std::endl;
exit(1);
}
if (optionName.size() > 0) {
m_optionList[optionName] = definitionIndex;
}
optionName.clear();
} else {
optionName += aliases[i];
}
}
// Store definition in register and return its indexed location.
// This location will be used to link option aliases to the main
// command name.
m_optionRegister.push_back(definitionEntry);
return definitionIndex;
}
int Options::define(const std::string& aDefinition,
const std::string& aDescription) {
int index = define(aDefinition);
m_optionRegister[index]->setDescription(aDescription);
return index;
}
//////////////////////////////
//
// Options::isDefined -- Return true if option is present in register.
//
bool Options::isDefined(const std::string& name) {
return m_optionList.find(name) == m_optionList.end() ? false : true;
}
//////////////////////////////
//
// Options::getArg -- returns the specified argument.
// argurment 0 is the command name.
//
const std::string& Options::getArg(int index) {
if (index < 0 || index >= (int)m_argument.size()) {
std::cout << "Error: m_argument " << index << " does not exist." << std::endl;
exit(1);
}
return m_argument[index];
}
// Alias:
const std::string& Options::getArgument(int index) {
return getArg(index);
}
//////////////////////////////
//
// Options::getArgCount -- number of arguments on command line.
// does not count the options or the command name.
//
int Options::getArgCount(void) {
return ((int)m_argument.size()) - 1;
}
// Alias:
int Options::getArgumentCount(void) {
return getArgCount();
}
//////////////////////////////
//
// Options::getArgList -- return a string vector of the arguments
// after the options have been parsed out of it.
//
const std::vector<std::string>& Options::getArgList(void) {
return m_argument;
}
// Alias:
const std::vector<std::string>& Options::getArgumentList(void) {
return getArgList();
}
//////////////////////////////
//
// Options::getBoolean -- returns true if the option was
// used on the command line.
//
bool Options::getBoolean(const std::string& optionName) {
int index = getRegIndex(optionName);
if (index < 0) {
return 0;
}
return m_optionRegister[index]->isModified();
}
//////////////////////////////
//
// Options::getCommand -- returns argv[0] (the first string
// in the original argv list.
//
std::string Options::getCommand(void) {
if (m_argument.size() == 0) {
return "";
} else {
return m_argument[0];
}
}
//////////////////////////////
//
// Options::getCommandLine -- returns a string which contains the
// command-line call to the program. Deal with spaces in arguments...
//
const std::string& Options::getCommandLine(void) {
if (m_commandString.size()) {
return m_commandString;
}
m_commandString = m_oargv[0];
int i;
for (i=1; i<m_oargc; i++) {
m_commandString += " ";
m_commandString += m_oargv[i];
}
return m_commandString;
}
//////////////////////////////
//
// Options::getDefinition -- returns the definition for the specified
// option name. Returns empty string if there is no entry for
// the option name. spaces count in the input option name.
//
std::string Options::getDefinition(const std::string& optionName) {
auto it = m_optionList.find(optionName);
if (it == m_optionList.end()) {
return "";
} else {
return m_optionRegister[it->second]->getDefinition();
}
}
//////////////////////////////
//
// Options::getDouble -- returns the double float associated
// with the given option. Returns 0 if there is no
// number associated with the option.
//
double Options::getDouble(const std::string& optionName) {
return strtod(getString(optionName).c_str(), (char**)NULL);
}
//////////////////////////////
//
// Options::getChar -- Return the first character in the option string;
// If the length is zero, then return '\0'.
//
char Options::getChar(const std::string& optionName) {
return getString(optionName).c_str()[0];
}
//////////////////////////////
//
// Options::getFloat -- Return the floating point number
// associated with the given option.
//
float Options::getFloat(const std::string& optionName) {
return (float)getDouble(optionName);
}
//////////////////////////////
//
// Options::getInt -- Return the integer argument. Can handle
// hexadecimal, decimal, and octal written in standard
// C syntax.
//
int Options::getInt(const std::string& optionName) {
return (int)strtol(getString(optionName).c_str(), (char**)NULL, 0);
}
int Options::getInteger(const std::string& optionName) {
return getInt(optionName);
}
//////////////////////////////
//
// Options::getString -- Return the option argument string.
//
std::string Options::getString(const std::string& optionName) {
int index = getRegIndex(optionName);
if (index < 0) {
return "UNKNOWN OPTION";
} else {
return m_optionRegister[index]->getOption();
}
}
//////////////////////////////
//
// Options::optionsArg -- Return true if --options is present
// on the command line, otherwise returns false.
//
int Options::optionsArg(void) {
return m_optionsArgument;
}
//////////////////////////////
//
// Options::print -- Print a list of the defined options.
//
std::ostream& Options::print(std::ostream& out) {
for (unsigned int i=0; i<m_optionRegister.size(); i++) {
out << m_optionRegister[i]->getDefinition() << "\t"
<< m_optionRegister[i]->getDescription() << std::endl;
}
return out;
}
//////////////////////////////
//
// Options::reset -- Clear all defined options.
//
void Options::reset(void) {
unsigned int i;
for (i=0; i<m_optionRegister.size(); i++) {
delete m_optionRegister[i];
m_optionRegister[i] = NULL;
}
m_optionRegister.clear();
m_argument.clear();
m_commandString.clear();
m_extraArgv.clear();
m_extraArgv_strings.clear();
m_oargc = -1;
m_oargv.clear();
}
//////////////////////////////
//
// Options::getFlag -- Set the character which is usually set to a dash.
//
char Options::getFlag(void) {
return m_optionFlag;
}
//////////////////////////////
//
// Options::setFlag -- Set the character used to indicate an
// option. For unix this is usually '-', in MS-DOS,
// this is usually '/'; But the syntax of the Options
// class is for Unix-style options.
//
void Options::setFlag(char aFlag) {
m_optionFlag = aFlag;
}
//////////////////////////////
//
// Options::setModified --
//
void Options::setModified(const std::string& optionName,
const std::string& aString) {
int index = getRegIndex(optionName);
if (index < 0) {
return;
}
m_optionRegister[getRegIndex(optionName)]->setModified(aString);
}
//////////////////////////////
//
// Options::setOptions -- Store the input list of options.
//
void Options::setOptions(int argc, char** argv) {
m_processedQ = 0;
m_extraArgv.resize(argc);
m_extraArgv_strings.resize(argc);
int oldsize = 0;
int i;
for (i=0; i<argc; i++) {
m_extraArgv_strings[i+oldsize] = argv[i];
m_extraArgv[i] = m_extraArgv_strings[i];
}
m_oargc = (int)m_extraArgv.size();
m_oargv = m_extraArgv;
}
//////////////////////////////
//
// Options::appendOptions -- Add argc and argv data to the current
// list residing inside the Options class variable.
//
void Options::appendOptions(int argc, char** argv) {
m_processedQ = 0;
// data used to be stored directly here:
//gargc = argc;
//gargv = argv;
// but now gets interfaced to: m_extraArgv and m_extraArgv_strings:
int oldsize = (int)m_extraArgv.size();
m_extraArgv.resize(oldsize + argc);
m_extraArgv_strings.resize(oldsize + argc);
int i;
for (i=0; i<argc; i++) {
m_extraArgv_strings[i+oldsize] = argv[i];
m_extraArgv[i+oldsize] = m_extraArgv_strings[i+oldsize];
}
m_oargc = (int)m_extraArgv.size();
m_oargv = m_extraArgv;
}
void Options::appendOptions(const std::vector<std::string>& argv) {
m_processedQ = 0;
int oldsize = (int)m_extraArgv.size();
m_extraArgv.resize(oldsize + argv.size());
m_extraArgv_strings.resize(oldsize + argv.size());
unsigned int i;
for (i=0; i<argv.size(); i++) {
m_extraArgv_strings[i+oldsize] = argv[i];
m_extraArgv[i+oldsize] = m_extraArgv_strings[i+oldsize];
}
m_oargc = (int)m_extraArgv.size();
m_oargv = m_extraArgv;
}
//////////////////////////////
//
// Options::appendOptions -- parse the string like command-line arguments.
// Either double or single quotes can be used to encapsulate
// a command-line token. If double quotes are used to encapsulate,
// then you will not have to back quote single quotes inside the
// token string, but you will have to backslash double quotes:
// "-T \"\"" but "-T ''"
// Likewise for single quotes in reverse with double quotes:
// '-T \'\'' is equal to: '-T ""'
//
void Options::appendOptions(const std::string& strang) {
int doublequote = 0;
int singlequote = 0;
std::vector<std::string> tokens;
std::vector<std::string> tempargv;
std::string tempvalue;
tokens.reserve(100);
tempargv.reserve(100);
tempvalue.reserve(1000);
char ch = '\0';
int length = (int)strang.size();
for (int i=0; i<length; i++) {
if (!singlequote && (strang[i] == '"')) {
if ((i>0) && (strang[i-1] != '\\')) {
doublequote = !doublequote;
if (doublequote == 0) {
// finished a doublequoted section of data, so store
// even if it is the empty string
ch = '\0';
tempvalue += (ch);
tokens.push_back(tempvalue);
tempvalue.clear();
continue;
} else {
// don't store the leading ":
continue;
}
}
} else if (!doublequote && (strang[i] == '\'')) {
if ((i>0) && (strang[i-1] != '\\')) {
singlequote = !singlequote;
if (singlequote == 0) {
// finished a singlequote section of data, so store
// even if it is the empty string
ch = '\0';
tempvalue += ch;
tokens.push_back(tempvalue);
tempvalue.clear();
continue;
} else {
// don't store the leading ":
continue;
}
}
}
if ((!doublequote && !singlequote) && std::isspace(strang[i])) {
if (tempvalue.size() > 0) {
tempvalue += ch;
tokens.push_back(tempvalue);
tempvalue.clear();
}
} else {
ch = strang[i];
tempvalue += ch;
}
}
if (tempvalue.size() > 0) {
tokens.push_back(tempvalue);
tempvalue.clear();
}
// now that the input string has been chopped up into pieces,
// assemble the argv structure
tempargv.reserve(tokens.size());
for (int i=0; i<(int)tempargv.size(); i++) {
tempargv[i] = tokens[i];
}
// now store the argv and argc data in opts:
// now store the parsed command-line simulated tokens
// for actual storage:
appendOptions(tempargv);
}
//////////////////////////////
//
// Options:getType -- Return the type of the option.
//
char Options::getType(const std::string& optionName) {
int index = getRegIndex(optionName);
if (index < 0) {
return -1;
} else {
return m_optionRegister[getRegIndex(optionName)]->getType();
}
}
//////////////////////////////
//
// Options::process -- Same as xverify.
// default values: error_check = 1, suppress = 0;
//
void Options::process(int argc, char** argv, int error_check, int suppress) {
setOptions(argc, argv);
xverify(error_check, suppress);
}
void Options::process(int error_check, int suppress) {
xverify(error_check, suppress);
}
//////////////////////////////
//
// Options::xverify --
// default value: error_check = 1, suppress = 0;
//
void Options::xverify(int error_check, int suppress) {
m_options_error_check = error_check;
int gargp = 1;
int optionend = 0;
if (suppress) {
m_suppressQ = 1;
} else {
m_suppressQ = 0;
}
// if calling xverify again, must remove previous argument list.
if (m_argument.size() != 0) {
m_argument.clear();
}
m_argument.push_back(m_oargv[0]);
int oldgargp;
int position = 0;
int running = 0;
while (gargp < m_oargc && optionend == 0) {
if (optionQ(m_oargv[gargp], gargp)) {
oldgargp = gargp;
gargp = storeOption(gargp, position, running);
if (gargp != oldgargp) {
running = 0;
position = 0;
}
} else {
if (m_oargv[gargp].size() == 2 && m_oargv[gargp][0] == getFlag() &&
m_oargv[gargp][2] == getFlag() ) {
optionend = 1;
gargp++;
break;
} else { // this is an argument
m_argument.push_back(m_oargv[gargp]);
gargp++;
}
}
}
while (gargp < m_oargc) {
m_argument.push_back(m_oargv[gargp]);
gargp++;
}
}
void Options::xverify(int argc, char** argv, int error_check, int suppress) {
setOptions(argc, argv);
xverify(error_check, suppress);
}