+2013-10-12 Keith Marshall <keithmarshall@users.sourceforge.net>
+
+ Correct an XML validation tool format specification error.
+
+ * tests/xmlchec.cpp (error_handler::handleError): Need PRIu64 format
+ for printing loc->getLineNumber() and loc->getColumnNumber(); define
+ __STDC_FORMAT_MACROS as 1, and include inttypes.h, to use it.
+
2013-10-08 Keith Marshall <keithmarshall@users.sourceforge.net>
Integrate XML validation tests into build infrastructure.
* arising from the use of this software.
*
*/
-#include <cstdio>
+#define __STDC_FORMAT_MACROS 1
+#include <inttypes.h> /* for PRIu64 */
+
+#include <cstdio> /* for fprintf() */
#include <string>
#include <memory> /* for std::auto_ptr */
#include <cstddef> /* for std::size_t */
* diagnostic message to emit.
*/
char* msg = XMLString::transcode( condition.getMessage() );
- fprintf( stderr, "%d:%d: %s: %s\n", loc->getLineNumber(),
+ fprintf( stderr, "%" PRIu64 ":%" PRIu64 ": %s: %s\n", loc->getLineNumber(),
loc->getColumnNumber(), warn ? "WARNING" : "ERROR", msg
);
XMLString::release( &msg );