From 5baf114b7f5c181c83246224ef4c5153ed5aa2c7 Mon Sep 17 00:00:00 2001 From: Rhodri James Date: Tue, 29 Aug 2017 14:05:38 +0100 Subject: [PATCH] examples: Use printf rather than [f]put[w]s (pull request #135) --- expat/examples/elements.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/expat/examples/elements.c b/expat/examples/elements.c index 31d52c33..2f253f7c 100644 --- a/expat/examples/elements.c +++ b/expat/examples/elements.c @@ -50,10 +50,8 @@ #ifdef XML_UNICODE_WCHAR_T # include # 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; } -- 2.40.0