http://winmerge.org/tracker/[tracker-id]
WinMerge 2.11.1.5
+ Plugins: Show processing instructions in XML plugin (#1979321)
BugFix: ClearCase checkout/commit dialog translation error (#2051069)
Translation updates:
- Russian (#2067785)
//
VS_VERSION_INFO VERSIONINFO
- FILEVERSION 1,1,0,0
- PRODUCTVERSION 1,1,0,0
+ FILEVERSION 1,1,1,0
+ PRODUCTVERSION 1,1,1,0
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x1L
VALUE "Comments", "WinMerge plugin\0"
VALUE "CompanyName", "\0"
VALUE "FileDescription", "DisplayXMLFiles Module\0"
- VALUE "FileVersion", "1, 1, 0, 0\0"
+ VALUE "FileVersion", "1, 1, 1, 0\0"
VALUE "InternalName", "DisplayXMLFiles\0"
VALUE "LegalCopyright", "Copyright 2003-2008\0"
VALUE "LegalTrademarks", "\0"
VALUE "OriginalFilename", "DisplayXMLFiles.DLL\0"
VALUE "PrivateBuild", "\0"
VALUE "ProductName", "DisplayXMLFiles Module\0"
- VALUE "ProductVersion", "1, 1, 0, 0\0"
+ VALUE "ProductVersion", "1, 1, 1, 0\0"
VALUE "SpecialBuild", "\0"
END
END
static void XMLCALL ProcessingInstructionHandler(void *userData, const char *target, const char *data)
{
CXMLData *pData = (CXMLData*)userData;
- // Not yet implemented
+
+ // End the previous element if needed
+ if (pData->bNeedsEnding)
+ {
+ fprintf(pData->pOutput,">\n");
+ pData->bNeedsEnding = false;
+ }
+
+ // Indent
+ for (int i = 0; i < pData->iDepth; i++)
+ {
+ fprintf(pData->pOutput,"\t");
+ }
+
+ // Output processing instruction
+ fprintf(pData->pOutput, "<?%s %s?>\n", target, data);
}
static void XMLCALL CommentHandler(void *userData, const char *data)
{
- int i;
CXMLData *pData = (CXMLData*)userData;
// End the previous element if needed
}
// Indent
- for (i = 0; i < pData->iDepth; i++)
+ for (int i = 0; i < pData->iDepth; i++)
{
fprintf(pData->pOutput,"\t");
}
XML_SetUserData(parser, &oData);
XML_SetElementHandler(parser, StartElementHandler, EndElementHandler);
XML_SetDefaultHandler(parser, DefaultHandler);
- //XML_SetProcessingInstructionHandler(parser, ProcessingInstructionHandler);
+ XML_SetProcessingInstructionHandler(parser, ProcessingInstructionHandler);
XML_SetCommentHandler(parser, CommentHandler);
XML_SetXmlDeclHandler(parser, XmlDeclHandler);
XML_SetUnknownEncodingHandler(parser, WinMerge_Plug_UnknownEncodingHandler, this);
for (int i=0; i<(int)cNames; i++)
{
int n = ocslen(rgszNames[i]);
- for (int j=m_nCount-1; j>=0; j--)
+ int j;
+ for (j=m_nCount-1; j>=0; j--)
{
if ((n == m_pMap[j].nLen) &&
(memcmp(m_pMap[j].bstr, rgszNames[i], m_pMap[j].nLen * sizeof(OLECHAR)) == 0))
}
}
// Lets allow any encoding at all, and provide ISO-8859-1 map
- for (i=0; i<256; ++i)
+ for (int i=0; i<256; ++i)
{
// i->i gives us identity for ASCII, and ISO-8859-1 for remainder
// because Unicode character set is numbered exactly like ISO-8859-1
info->map[i] = (i<127 ? i : 0);
}
// Populate code bytes as given in our map table
- for (i=0; mapinfo->mapdata[i] != -1; i += 2)
+ for (int i=0; mapinfo->mapdata[i] != -1; i += 2)
{
int src = mapinfo->mapdata[i];
int dest = mapinfo->mapdata[i+1];