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

Diff for /pegasus/src/Pegasus/Common/XmlWriter.cpp between version 1.147 and 1.150

version 1.147, 2007/01/11 16:21:54 version 1.150, 2007/03/27 17:31:32
Line 92 
Line 92 
 struct SpecialChar struct SpecialChar
 { {
     const char* str;     const char* str;
     size_t size;      Uint32 size;
 }; };
  
 // Defines encodings of special characters. Just use a 7-bit ASCII character // Defines encodings of special characters. Just use a 7-bit ASCII character
Line 420 
Line 420 
         _xmlWritter_appendSpecialChar(os, *str++);         _xmlWritter_appendSpecialChar(os, *str++);
 } }
  
   // On windows sprintf outputs 3 digit precision exponent prepending
   // zeros. Make it 2 digit precision if first digit is zero in the exponent.
   #ifdef PEGASUS_OS_TYPE_WINDOWS
   inline void _xmlWriter_normalizeRealValueString(char *str)
   {
       // skip initial sign value...
       if (*str == '-' || *str == '+')
       {
           ++str;
       }
       while (*str && *str != '+' && *str != '-')
       {
           ++str;
       }
       if (*str && * ++str == '0')
       {
           *str = *(str+1);
           *(str+1) = *(str+2);
           *(str+2) = 0;
       }
   }
   #endif
   
 void XmlWriter::append(Buffer& out, const Char16& x) void XmlWriter::append(Buffer& out, const Char16& x)
 { {
     _xmlWritter_appendChar(out, x);     _xmlWritter_appendChar(out, x);
Line 465 
Line 488 
     // given in the CIM/XML spec, and the precision required by the CIM 2.2 spec     // given in the CIM/XML spec, and the precision required by the CIM 2.2 spec
     // (4 byte IEEE floating point)     // (4 byte IEEE floating point)
     sprintf(buffer, "%.7e", x);     sprintf(buffer, "%.7e", x);
   #ifdef PEGASUS_OS_TYPE_WINDOWS
       _xmlWriter_normalizeRealValueString(buffer);
   #endif
     append(out, buffer);     append(out, buffer);
 } }
  
Line 475 
Line 501 
     // with the format given in the CIM/XML spec, and the precision required     // with the format given in the CIM/XML spec, and the precision required
     // by the CIM 2.2 spec (8 byte IEEE floating point)     // by the CIM 2.2 spec (8 byte IEEE floating point)
     sprintf(buffer, "%.16e", x);     sprintf(buffer, "%.16e", x);
   #ifdef PEGASUS_OS_TYPE_WINDOWS
       _xmlWriter_normalizeRealValueString(buffer);
   #endif
     append(out, buffer);     append(out, buffer);
 } }
  
Line 1377 
Line 1406 
 { {
     Buffer tmp;     Buffer tmp;
     appendValueElement(tmp, value);     appendValueElement(tmp, value);
     tmp.append('\0');  
     os << tmp.getData() << PEGASUS_STD(endl);     os << tmp.getData() << PEGASUS_STD(endl);
 } }
  
Line 1472 
Line 1500 
 { {
     Buffer tmp;     Buffer tmp;
     appendValueReferenceElement(tmp, reference, true);     appendValueReferenceElement(tmp, reference, true);
     tmp.append('\0');  
     indentedPrint(os, tmp.getData());     indentedPrint(os, tmp.getData());
 } }
  
Line 1522 
Line 1549 
 { {
     Buffer tmp;     Buffer tmp;
     appendClassElement(tmp, cimclass);     appendClassElement(tmp, cimclass);
     tmp.append('\0');  
     indentedPrint(os, tmp.getData(), 4);     indentedPrint(os, tmp.getData(), 4);
 } }
  
Line 1551 
Line 1577 
 { {
     Buffer tmp;     Buffer tmp;
     appendInstanceElement(tmp, instance);     appendInstanceElement(tmp, instance);
     tmp.append('\0');  
     os << tmp.getData() << PEGASUS_STD(endl);     os << tmp.getData() << PEGASUS_STD(endl);
 } }
  
Line 1622 
Line 1647 
 { {
     Buffer tmp;     Buffer tmp;
     appendPropertyElement(tmp, property);     appendPropertyElement(tmp, property);
     tmp.append('\0');  
     os << tmp.getData() << PEGASUS_STD(endl);     os << tmp.getData() << PEGASUS_STD(endl);
 } }
  
Line 1654 
Line 1678 
 { {
     Buffer tmp;     Buffer tmp;
     appendMethodElement(tmp, method);     appendMethodElement(tmp, method);
     tmp.append('\0');  
     os << tmp.getData() << PEGASUS_STD(endl);     os << tmp.getData() << PEGASUS_STD(endl);
 } }
  
Line 1700 
Line 1723 
 { {
     Buffer tmp;     Buffer tmp;
     appendParameterElement(tmp, parameter);     appendParameterElement(tmp, parameter);
     tmp.append('\0');  
     os << tmp.getData() << PEGASUS_STD(endl);     os << tmp.getData() << PEGASUS_STD(endl);
 } }
  
Line 1728 
Line 1750 
 { {
     Buffer tmp;     Buffer tmp;
     appendParamValueElement(tmp, paramValue);     appendParamValueElement(tmp, paramValue);
     tmp.append('\0');  
     os << tmp.getData() << PEGASUS_STD(endl);     os << tmp.getData() << PEGASUS_STD(endl);
 } }
  
Line 1759 
Line 1780 
 { {
     Buffer tmp;     Buffer tmp;
     appendQualifierElement(tmp, qualifier);     appendQualifierElement(tmp, qualifier);
     tmp.append('\0');  
     os << tmp.getData() << PEGASUS_STD(endl);     os << tmp.getData() << PEGASUS_STD(endl);
 } }
  
Line 1791 
Line 1811 
 { {
     Buffer tmp;     Buffer tmp;
     appendQualifierDeclElement(tmp, qualifierDecl);     appendQualifierDeclElement(tmp, qualifierDecl);
     tmp.append('\0');  
     os << tmp.getData() << PEGASUS_STD(endl);     os << tmp.getData() << PEGASUS_STD(endl);
 } }
  
Line 2714 
Line 2733 
         httpMethod,         httpMethod,
         httpAcceptLanguages,         httpAcceptLanguages,
         httpContentLanguages,         httpContentLanguages,
         (Uint32)out.size());          out.size());
     tmp << out;     tmp << out;
  
     return tmp;     return tmp;
Line 2787 
Line 2806 
         tmp,         tmp,
         httpMethod,         httpMethod,
         cimException.getContentLanguages(),         cimException.getContentLanguages(),
         (Uint32)out.size());          out.size());
     tmp << out;     tmp << out;
  
     return tmp;     return tmp;
Line 2831 
Line 2850 
         httpMethod,         httpMethod,
         httpAcceptLanguages,         httpAcceptLanguages,
         httpContentLanguages,         httpContentLanguages,
         (Uint32)out.size());          out.size());
     tmp << out;     tmp << out;
  
     return tmp;     return tmp;
Line 2919 
Line 2938 
     appendMethodResponseHeader(tmp,     appendMethodResponseHeader(tmp,
         httpMethod,         httpMethod,
         cimException.getContentLanguages(),         cimException.getContentLanguages(),
         (Uint32)out.size());          out.size());
     tmp << out;     tmp << out;
  
     return tmp;     return tmp;
Line 3212 
Line 3231 
         authenticationHeader,         authenticationHeader,
         httpAcceptLanguages,         httpAcceptLanguages,
         httpContentLanguages,         httpContentLanguages,
         (Uint32)out.size());          out.size());
     tmp << out;     tmp << out;
  
     return tmp;     return tmp;
Line 3245 
Line 3264 
     appendEMethodResponseHeader(tmp,     appendEMethodResponseHeader(tmp,
         httpMethod,         httpMethod,
         httpContentLanguages,         httpContentLanguages,
         (Uint32)out.size());          out.size());
     tmp << out;     tmp << out;
  
     return tmp;     return tmp;
Line 3278 
Line 3297 
         tmp,         tmp,
         httpMethod,         httpMethod,
         cimException.getContentLanguages(),         cimException.getContentLanguages(),
         (Uint32)out.size());          out.size());
     tmp << out;     tmp << out;
  
     return tmp;     return tmp;


Legend:
Removed from v.1.147  
changed lines
  Added in v.1.150

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2