#include <cstdlib>
#include <cstdio>
#include <iostream>
#include <tidy/tidy.h>
using namespace std;
int main(int argc, char *argv[])
{
int rc = -1;
Bool ok;
TidyDoc tdoc = tidyCreate();
ok = tidyOptSetBool(tdoc,TidyXhtmlOut,yes);
rc = tidyParseFile(tdoc,"file.html");
rc = tidyCleanAndRepair(tdoc);
rc = tidyRunDiagnostics(tdoc);
rc = tidySaveFile(tdoc,"file.htm");
tidyRelease(tdoc);
system("PAUSE");
return EXIT_SUCCESS;
}