aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--c/data.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/c/data.cpp b/c/data.cpp
index 8c26138..df5627a 100644
--- a/c/data.cpp
+++ b/c/data.cpp
@@ -18,7 +18,7 @@ static Unique<HINTERNET, InternetCloseHandle> s_hi =
struct ParsedDoc
{
Unique<HINTERNET, InternetCloseHandle> hiUrl;
- Unique<htmlParserCtxtPtr, xmlFreeParserCtxt> ctxt;
+ Unique<htmlParserCtxtPtr, xmlFreeParserCtxt> ctx;
char bufI[1024];
char bufX[1024];
@@ -31,24 +31,24 @@ struct ParsedDoc
if (!hiUrl.Bad(0))
throw InternetError();
- ctxt = htmlCreatePushParserCtxt(nullptr, nullptr, bufX, sizeof(bufX), szUrl, XML_CHAR_ENCODING_UTF8);
- if (!ctxt.Bad(0))
+ ctx = htmlCreatePushParserCtxt(nullptr, nullptr, bufX, sizeof(bufX), szUrl, XML_CHAR_ENCODING_UTF8);
+ if (!ctx.Bad(0))
throw XmlError();
- htmlCtxtUseOptions(ctxt.v, HTML_PARSE_RECOVER|HTML_PARSE_NOERROR|HTML_PARSE_NOWARNING);
+ htmlCtxtUseOptions(ctx.v, HTML_PARSE_RECOVER|HTML_PARSE_NOERROR|HTML_PARSE_NOWARNING);
BOOL r;
DWORD cbRead;
while (r = InternetReadFile(hiUrl.v, bufI, sizeof(bufI), &cbRead), cbRead) {
if (!r)
throw InternetError();
- if (!htmlParseChunk(ctxt.v, bufI, cbRead, 0))
+ if (!htmlParseChunk(ctx.v, bufI, cbRead, 0))
throw XmlError();
}
- htmlParseChunk(ctxt.v, bufI, 0, 1); /* Stop parsing. */
+ htmlParseChunk(ctx.v, bufI, 0, 1); /* Stop parsing. */
}
- operator htmlDocPtr() { return ctxt.v->myDoc; }
+ operator htmlDocPtr() { return ctx.v->myDoc; }
};
static inline void XmlFree(void* p) { xmlFree(p); }