diff options
author | John Ankarström <john@ankarstrom.se> | 2022-08-29 23:39:01 +0200 |
---|---|---|
committer | John Ankarström <john@ankarstrom.se> | 2022-08-29 23:39:01 +0200 |
commit | 530a0eba427d3a817e2dd97cba120f100104d984 (patch) | |
tree | c09754d0ec50478165cd4619502eec8222e8724a /c | |
parent | b9d7ec228b03e2978b0e1d9f21dadd56b2f405e3 (diff) | |
download | EpisodeBrowser-530a0eba427d3a817e2dd97cba120f100104d984.tar.gz |
Change variable name.
ctxt is so verbose.
Diffstat (limited to 'c')
-rw-r--r-- | c/data.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
@@ -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); } |