]> granicus.if.org Git - libexpat/commitdiff
examples: Use printf rather than [f]put[w]s (pull request #135)
authorRhodri James <rhodri@kynesim.co.uk>
Tue, 29 Aug 2017 13:05:38 +0000 (14:05 +0100)
committerSebastian Pipping <sebastian@pipping.org>
Tue, 29 Aug 2017 18:08:52 +0000 (20:08 +0200)
expat/examples/elements.c

index 31d52c33d71c50014369d5c39fd924ccb96eedb1..2f253f7cb97dd8d0e709ed015bf698d86bb66b05 100644 (file)
 #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;
 }