(file) Return to getoopt.cpp CVS log (file) (dir) Up to [Pegasus] / pegasus / src / Pegasus / getoopt

Diff for /pegasus/src/Pegasus/getoopt/getoopt.cpp between version 1.36 and 1.37

version 1.36, 2012/08/06 11:45:04 version 1.37, 2014/07/17 20:28:57
Line 27 
Line 27 
 // //
 ////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
 // //
 // Author: Bob Blair (bblair@bmc.com)  
 //  
 // Modified By: Carol Ann Krug Graves, Hewlett-Packard Company  
 //                  (carolann_graves@hp.com)  
 //              David Dillard, VERITAS Software Corp.  
 //                  (david.dillard@veritas.com)  
 //  
 //%///////////////////////////////////////////////////////////////////////////// //%/////////////////////////////////////////////////////////////////////////////
  
  
Line 296 
Line 289 
 { {
     unsigned int size = opt.size();     unsigned int size = opt.size();
     if (size == 0)     if (size == 0)
       {
         return false;         return false;
       }
     for (unsigned int i = 0; i < size; i++)     for (unsigned int i = 0; i < size; i++)
     {     {
         char c = static_cast<char>(opt[i]);         char c = static_cast<char>(opt[i]);
Line 443 
Line 438 
 static int catagorize(const char* s) static int catagorize(const char* s)
 { {
     if (s[0] != '-')     if (s[0] != '-')
       {
         return 0;         return 0;
       }
     else     else
       {
         if (s[1] == '-')         if (s[1] == '-')
           {
             return 2;             return 2;
           }
       }
     return 1;     return 1;
 } }
  
Line 650 
Line 651 
 { {
     unsigned int lim = _args.size();     unsigned int lim = _args.size();
     if (n < lim)     if (n < lim)
       {
         return _args[n];         return _args[n];
       }
     else     else
       {
         return _emptyopt;         return _emptyopt;
 } }
   }
  
 // Return first index // Return first index
 unsigned int getoopt::first() const unsigned int getoopt::first() const
Line 818 
Line 823 
     {     {
         flagspec& o = _flagspecs[i];         flagspec& o = _flagspecs[i];
         if (o.islong && s == o.name)         if (o.islong && s == o.name)
           {
             return &_flagspecs[i];             return &_flagspecs[i];
     }     }
       }
     return 0;     return 0;
 } }
  
Line 854 
Line 861 
     {     {
         flagspec& o = _flagspecs[i];         flagspec& o = _flagspecs[i];
         if (!o.islong && c == o.name[0])         if (!o.islong && c == o.name[0])
           {
             return &_flagspecs[i];             return &_flagspecs[i];
     }     }
       }
     return 0;     return 0;
 } }
  


Legend:
Removed from v.1.36  
changed lines
  Added in v.1.37

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2