ptypes

ptypes Commit Details


Date:2013-05-28 19:00:00 (11 years 7 months ago)
Author:Natalie Adams
Branch:default
Commit:f52628c1d1c6
Parents: e403f5f8dfb5
Message:Removing vector and updating parameter parser

Changes:
Minclude/ptypes.h (1 diff)
Mwin32/ppparser.cxx (3 diffs)

File differences

include/ptypes.h
1818
1919
2020
21
2221
2322
2423
#endif
#include <string.h>
#include <vector>
PTYPES_BEGIN
win32/ppparser.cxx
88
99
1010
11
12
11
1312
14
13
14
15
1516
1617
1718
1819
1920
2021
21
22
23
2224
25
26
27
28
29
30
31
32
33
34
35
36
2337
2438
2539
......
4054
4155
4256
57
58
4359
4460
4561
......
6480
6581
6682
83
6784
68
85
86
6987
7088
7189
this->checkreq = true;
// Assumptions:
// *) options will not start with -
// *) parameters will not be repeated\
// *) Parameters are in order
// *) parameters will not be repeated
int z = 0;
for(int i = 1; i < argc - 1; i++)
tpodlist<int> parasused;
bool docontinue = false;
for(int i = 1; i < argc; i++)
{
if (argv[i][0] == '-')
{
if (z != parameters.get_count())
{
for (int zz = z; zz < parameters.get_count(); zz++)
for (int zz = 0; zz < parameters.get_count(); zz++)
{
docontinue = false;
for (int pu = 0; pu < parasused.get_count(); pu++)
{
if (parasused[pu] == zz)
{
docontinue = true;
break;
}
}
if (docontinue)
continue;
if (argv[i] == ("-" + parameters[zz]->longparameter) || argv[i] == ("-" + parameters[zz]->shortparameter))
{
if (parameters[zz]->numberofparameters == 0)
}
}
z++;
parasused.add(zz);
break;
}
}
for(int zz = z; zz < parameters.get_count(); zz++)
{
if (parameters[zz]->required)
{
this->checkreq = false;
this->missingparas.add(const_cast <char *>((const char *)parameters[zz]->shortparameter));
this->missingparas.add(const_cast <char *>((const char *)parameters[zz]->shortparameter));
}
}
}
this->paras = const_cast <tobjlist<Parameter> *>(&parameters);

Archive Download the corresponding diff file

Branches

Tags

Page rendered in 0.64235s using 14 queries.