aboutsummaryrefslogtreecommitdiff
path: root/c
diff options
context:
space:
mode:
authorJohn Ankarström <john@ankarstrom.se>2022-08-29 23:39:01 +0200
committerJohn Ankarström <john@ankarstrom.se>2022-08-29 23:39:01 +0200
commit530a0eba427d3a817e2dd97cba120f100104d984 (patch)
treec09754d0ec50478165cd4619502eec8222e8724a /c
parentb9d7ec228b03e2978b0e1d9f21dadd56b2f405e3 (diff)
downloadEpisodeBrowser-530a0eba427d3a817e2dd97cba120f100104d984.tar.gz
Change variable name.
ctxt is so verbose.
Diffstat (limited to 'c')
-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); }