/****************************************************************************** * * Copyright (C) 1997-2020 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby * granted. No representations are made about the suitability of this software * for any purpose. It is provided "as is" without express or implied warranty. * See the GNU General Public License for more details. * * Documents produced by Doxygen are derivative works derived from the * input used in their production; they are not affected by this license. * */ #include "htmldocvisitor.h" #include "docparser.h" #include "language.h" #include "doxygen.h" #include "outputgen.h" #include "dot.h" #include "message.h" #include "config.h" #include "htmlgen.h" #include "parserintf.h" #include "msc.h" #include "dia.h" #include "util.h" #include "vhdldocgen.h" #include "filedef.h" #include "memberdef.h" #include "htmlentity.h" #include "emoji.h" #include "plantuml.h" #include "formula.h" #include "fileinfo.h" #include "indexlist.h" #include "growbuf.h" static const int NUM_HTML_LIST_TYPES = 4; static const char types[][NUM_HTML_LIST_TYPES] = {"1", "a", "i", "A"}; enum contexts_t { NONE, // 0 STARTLI, // 1 STARTDD, // 2 ENDLI, // 3 ENDDD, // 4 STARTTD, // 5 ENDTD, // 6 INTERLI, // 7 INTERDD, // 8 INTERTD // 9 }; static const char *contexts[10] = { "", // 0 "startli", // 1 "startdd", // 2 "endli", // 3 "enddd", // 4 "starttd", // 5 "endtd", // 6 "interli", // 7 "interdd", // 8 "intertd" // 9 }; static const char *hex="0123456789ABCDEF"; static QCString convertIndexWordToAnchor(const QCString &word) { static int cnt = 0; QCString result="a"; QCString cntStr; result += cntStr.setNum(cnt); result += "_"; cnt++; const char *str = word.data(); unsigned char c; if (str) { while ((c = *str++)) { if ((c >= 'a' && c <= 'z') || // ALPHA (c >= 'A' && c <= 'Z') || // ALPHA (c >= '0' && c <= '9') || // DIGIT c == '-' || c == '.' || c == '_' ) { result += c; } else { char enc[4]; enc[0] = ':'; enc[1] = hex[(c & 0xf0) >> 4]; enc[2] = hex[c & 0xf]; enc[3] = 0; result += enc; } } } return result; } static bool mustBeOutsideParagraph(const DocNodeVariant &n) { //printf("mustBeOutsideParagraph(%s)=",docNodeName(n)); if (holds_one_of_alternatives< /*