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

Diff for /pegasus/src/Pegasus/Common/XmlReader.cpp between version 1.38 and 1.40

version 1.38, 2002/03/20 17:47:07 version 1.40, 2002/03/20 23:10:29
Line 700 
Line 700 
  
     while (first != last)     while (first != last)
     {     {
         if (x < -922337203685477580LL /* -(1<<63) / 10 */)          if (x < PEGASUS_LLONG_MIN/10)
         {         {
             return false;             return false;
         }         }
Line 728 
Line 728 
 // //
 // stringToUnsignedInteger // stringToUnsignedInteger
 // //
 //      [ "+" ] ( positiveDecimalDigit *decimalDigit | "0" )  //      ( positiveDecimalDigit *decimalDigit | "0" )
 // //
 // ATTN-B: handle conversion from hexadecimal. // ATTN-B: handle conversion from hexadecimal.
 //------------------------------------------------------------------------------ //------------------------------------------------------------------------------
Line 743 
Line 743 
     if (!*p)     if (!*p)
         return false;         return false;
  
     // Skip optional sign:      // If the first digit is a zero, then it must be the last:
   
     if (*p == '-')  
         return false;  
   
     if (*p == '+')  
         p++;  
   
     // If the next thing is a zero, then it must be the last:  
  
     if (*p == '0')     if (*p == '0')
         return p[1] == '\0';         return p[1] == '\0';
Line 777 
Line 769 
  
     while (first != last)     while (first != last)
     {     {
         if (x > 1844674407370955161ULL /* (1<<64 - 1) / 10 */)          if (x > PEGASUS_ULLONG_MAX/10)
         {         {
             return false;             return false;
         }         }
         x = 10 * x;         x = 10 * x;
         Uint64 newDigit = (*first++ - '0');         Uint64 newDigit = (*first++ - '0');
         if (18446744073709551615ULL - x < newDigit)          if (PEGASUS_ULLONG_MAX - x < newDigit)
         {         {
             return false;             return false;
         }         }
Line 811 
Line 803 
 { {
     // ATTN-B: accepting only UTF-8 for now! (affects string and char16):     // ATTN-B: accepting only UTF-8 for now! (affects string and char16):
  
   // The Specification for the Representation of CIM in XML does not indicate
   // that a default value should be used when a VALUE element is empty.
   #if 0
     // If strlen == 0, set to default value for type     // If strlen == 0, set to default value for type
  
     if (strlen(valueString)==0)     if (strlen(valueString)==0)
Line 832 
Line 827 
             case CIMType::REAL64: return CIMValue(Real64(0));             case CIMType::REAL64: return CIMValue(Real64(0));
         }         }
     }     }
   #endif
  
     // Create value per type     // Create value per type
     switch (type)     switch (type)


Legend:
Removed from v.1.38  
changed lines
  Added in v.1.40

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2