mirror of
https://github.com/curl/curl.git
synced 2025-09-18 10:02:45 +03:00
examples/htmltidy: correct wrong printf() use
... and update the includes to match how current htmltidy wants them used. Reported-by: Stathis Kapnidis Fixes #7860 Closes #7861
This commit is contained in:
parent
b1d08d295f
commit
b75045aa12
|
@ -5,7 +5,7 @@
|
||||||
* | (__| |_| | _ <| |___
|
* | (__| |_| | _ <| |___
|
||||||
* \___|\___/|_| \_\_____|
|
* \___|\___/|_| \_\_____|
|
||||||
*
|
*
|
||||||
* Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
|
* Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||||
*
|
*
|
||||||
* This software is licensed as described in the file COPYING, which
|
* This software is licensed as described in the file COPYING, which
|
||||||
* you should have received as part of this distribution. The terms
|
* you should have received as part of this distribution. The terms
|
||||||
|
@ -28,8 +28,8 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <tidy.h>
|
#include <tidy/tidy.h>
|
||||||
#include <tidybuffio.h>
|
#include <tidy/tidybuffio.h>
|
||||||
#include <curl/curl.h>
|
#include <curl/curl.h>
|
||||||
|
|
||||||
/* curl write callback, to fill tidy's input buffer... */
|
/* curl write callback, to fill tidy's input buffer... */
|
||||||
|
@ -53,7 +53,7 @@ void dumpNode(TidyDoc doc, TidyNode tnod, int indent)
|
||||||
printf("%*.*s%s ", indent, indent, "<", name);
|
printf("%*.*s%s ", indent, indent, "<", name);
|
||||||
/* walk the attribute list */
|
/* walk the attribute list */
|
||||||
for(attr = tidyAttrFirst(child); attr; attr = tidyAttrNext(attr) ) {
|
for(attr = tidyAttrFirst(child); attr; attr = tidyAttrNext(attr) ) {
|
||||||
printf(tidyAttrName(attr));
|
printf("%s", tidyAttrName(attr));
|
||||||
tidyAttrValue(attr)?printf("=\"%s\" ",
|
tidyAttrValue(attr)?printf("=\"%s\" ",
|
||||||
tidyAttrValue(attr)):printf(" ");
|
tidyAttrValue(attr)):printf(" ");
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user