diff -r e403f5f8dfb5dada32275e069e6f431bc1360f1c -r f52628c1d1c6895317ea5dfa5e0b8f6bdbddaaad include/ptypes.h --- a/include/ptypes.h Fri May 24 21:56:09 2013 -0500 +++ b/include/ptypes.h Tue May 28 19:00:54 2013 -0500 @@ -18,7 +18,6 @@ #endif #include -#include PTYPES_BEGIN diff -r e403f5f8dfb5dada32275e069e6f431bc1360f1c -r f52628c1d1c6895317ea5dfa5e0b8f6bdbddaaad win32/ppparser.cxx --- a/win32/ppparser.cxx Fri May 24 21:56:09 2013 -0500 +++ b/win32/ppparser.cxx Tue May 28 19:00:54 2013 -0500 @@ -8,18 +8,32 @@ 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 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) @@ -40,6 +54,8 @@ } } z++; + parasused.add(zz); + break; } } @@ -64,8 +80,10 @@ for(int zz = z; zz < parameters.get_count(); zz++) { if (parameters[zz]->required) + { this->checkreq = false; - this->missingparas.add(const_cast ((const char *)parameters[zz]->shortparameter)); + this->missingparas.add(const_cast ((const char *)parameters[zz]->shortparameter)); + } } } this->paras = const_cast *>(¶meters);