From 530a0eba427d3a817e2dd97cba120f100104d984 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?John=20Ankarstr=C3=B6m?= Date: Mon, 29 Aug 2022 23:39:01 +0200 Subject: Change variable name. ctxt is so verbose. --- c/data.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'c') 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 s_hi = struct ParsedDoc { Unique hiUrl; - Unique ctxt; + Unique 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); } -- cgit v1.2.3