examples: Use printf rather than [f]put[w]s (pull request #135)

This commit is contained in:
Rhodri James 2017-08-29 14:05:38 +01:00 committed by Sebastian Pipping
parent bc6468d230
commit 5baf114b7f

View file

@ -50,10 +50,8 @@
#ifdef XML_UNICODE_WCHAR_T
# include <wchar.h>
# define XML_FMT_STR "ls"
# define xcputs(s) do { fputws((s), stdout); putchar('\n'); } while (0)
#else
# define XML_FMT_STR "s"
# define xcputs(s) puts(s)
#endif
static void XMLCALL
@ -65,7 +63,7 @@ startElement(void *userData, const XML_Char *name, const XML_Char **atts)
for (i = 0; i < *depthPtr; i++)
putchar('\t');
xcputs(name);
printf("%" XML_FMT_STR "\n", name);
*depthPtr += 1;
}