aboutsummaryrefslogtreecommitdiff
path: root/docs/examples/htmltidy.c
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2016-04-03 22:51:52 +0200
committerDaniel Stenberg <daniel@haxx.se>2016-04-03 22:52:34 +0200
commit6ddab23fb1e27e0ea938c8ec448f620295149c9d (patch)
tree3207247960bdd4e151434c33f896bd66110f125a /docs/examples/htmltidy.c
parent3d94a113e90af20b1b894dc931d4422fea405490 (diff)
docs/examples: remove spurious white spaces all over
... to please the new, slightly picker, checksrc.pl
Diffstat (limited to 'docs/examples/htmltidy.c')
-rw-r--r--docs/examples/htmltidy.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/docs/examples/htmltidy.c b/docs/examples/htmltidy.c
index 01b1e68f1..687e3f346 100644
--- a/docs/examples/htmltidy.c
+++ b/docs/examples/htmltidy.c
@@ -37,27 +37,27 @@ uint write_cb(char *in, uint size, uint nmemb, TidyBuffer *out)
{
uint r;
r = size * nmemb;
- tidyBufAppend( out, in, r );
+ tidyBufAppend(out, in, r);
return r;
}
/* Traverse the document tree */
-void dumpNode(TidyDoc doc, TidyNode tnod, int indent )
+void dumpNode(TidyDoc doc, TidyNode tnod, int indent)
{
TidyNode child;
for(child = tidyGetChild(tnod); child; child = tidyGetNext(child) ) {
- ctmbstr name = tidyNodeGetName( child );
+ ctmbstr name = tidyNodeGetName(child);
if(name) {
/* if it has a name, then it's an HTML tag ... */
TidyAttr attr;
- printf( "%*.*s%s ", indent, indent, "<", name);
+ printf("%*.*s%s ", indent, indent, "<", name);
/* walk the attribute list */
for(attr=tidyAttrFirst(child); attr; attr=tidyAttrNext(attr) ) {
printf(tidyAttrName(attr));
tidyAttrValue(attr)?printf("=\"%s\" ",
tidyAttrValue(attr)):printf(" ");
}
- printf( ">\n");
+ printf(">\n");
}
else {
/* if it doesn't have a name, then it's probably text, cdata, etc... */
@@ -67,12 +67,12 @@ void dumpNode(TidyDoc doc, TidyNode tnod, int indent )
printf("%*.*s\n", indent, indent, buf.bp?(char *)buf.bp:"");
tidyBufFree(&buf);
}
- dumpNode( doc, child, indent + 4 ); /* recursive */
+ dumpNode(doc, child, indent + 4); /* recursive */
}
}
-int main(int argc, char **argv )
+int main(int argc, char **argv)
{
CURL *curl;
char curl_errbuf[CURL_ERROR_SIZE];
@@ -91,7 +91,7 @@ int main(int argc, char **argv )
tdoc = tidyCreate();
tidyOptSetBool(tdoc, TidyForceOutput, yes); /* try harder */
tidyOptSetInt(tdoc, TidyWrapLen, 4096);
- tidySetErrorBuffer( tdoc, &tidy_errbuf );
+ tidySetErrorBuffer(tdoc, &tidy_errbuf);
tidyBufInit(&docbuf);
curl_easy_setopt(curl, CURLOPT_WRITEDATA, &docbuf);
@@ -103,7 +103,7 @@ int main(int argc, char **argv )
if(err >= 0) {
err = tidyRunDiagnostics(tdoc); /* load tidy error buffer */
if(err >= 0) {
- dumpNode( tdoc, tidyGetRoot(tdoc), 0 ); /* walk the tree */
+ dumpNode(tdoc, tidyGetRoot(tdoc), 0); /* walk the tree */
fprintf(stderr, "%s\n", tidy_errbuf.bp); /* show errors */
}
}
@@ -121,7 +121,7 @@ int main(int argc, char **argv )
}
else
- printf( "usage: %s <url>\n", argv[0] );
+ printf("usage: %s <url>\n", argv[0]);
return 0;
}