Doxygen
Loading...
Searching...
No Matches
htmlhelp.cpp
Go to the documentation of this file.
1/******************************************************************************
2 *
3 * Copyright (C) 1997-2020 by Dimitri van Heesch.
4 *
5 * Permission to use, copy, modify, and distribute this software and its
6 * documentation under the terms of the GNU General Public License is hereby
7 * granted. No representations are made about the suitability of this software
8 * for any purpose. It is provided "as is" without express or implied warranty.
9 * See the GNU General Public License for more details.
10 *
11 * Documents produced by Doxygen are derivative works derived from the
12 * input used in their production; they are not affected by this license.
13 *
14 * The original version of this file is largely based on a contribution from
15 * Harm van der Heijden.
16 */
17
18#include <algorithm>
19
20#include <stdio.h>
21#include <stdlib.h>
22
23#include "htmlhelp.h"
24#include "config.h"
25#include "message.h"
26#include "doxygen.h"
27#include "language.h"
28#include "portable.h"
29#include "groupdef.h"
30#include "memberdef.h"
31#include "filedef.h"
32#include "util.h"
33#include "linkedmap.h"
34#include "regex.h"
35#include "fileinfo.h"
36
37//----------------------------------------------------------------------------
38
39/** Helper class to deal with recoding the UTF8 encoded text back to the native encoding
40 * specified by CHM_INDEX_ENCODING.
41 */
43{
44 public:
48
50 {
51 QCString str = Config_getString(CHM_INDEX_ENCODING);
52 if (str.isEmpty()) str = "CP1250"; // use safe and likely default
53 m_fromUtf8 = portable_iconv_open(str.data(),"UTF-8");
55 {
56 term("unsupported character conversion for CHM_INDEX_ENCODING: '{}'->'UTF-8'\n", str);
57 }
58 }
67
69 {
70 size_t iSize = s.length();
71 size_t oSize = iSize*4;
72 QCString output(oSize, QCString::ExplicitSize);
73 size_t iLeft = iSize;
74 size_t oLeft = oSize;
75 const char *iPtr = s.data();
76 char *oPtr = output.rawData();
77 if (!portable_iconv(m_fromUtf8,&iPtr,&iLeft,&oPtr,&oLeft))
78 {
79 oSize -= oLeft;
80 output.resize(oSize);
81 output.at(oSize)='\0';
82 return output;
83 }
84 else
85 {
86 return s;
87 }
88 }
89 private:
90 void *m_iconv_null = reinterpret_cast<void*>(-1);
92
93};
94
95//----------------------------------------------------------------------------
96
97/** Class representing a field in the HTML help index. */
99{
100 IndexField(const QCString &k,const QCString &n,const QCString &u,const QCString &a,bool l,bool r) :
101 key(k), name(n), url(u), anchor(a), link(l), reversed(r) {}
106 bool link;
108};
109
110/** A helper class for HtmlHelp that manages a two level index in
111 * alphabetical order.
112 */
114{
115 public:
119 void addItem(const QCString &first,const QCString &second,
120 const QCString &url, const QCString &anchor,
121 bool hasLink,bool reversed);
122 void writeFields(std::ostream &t);
123 size_t size() const { return m_map.size(); }
124 private:
127};
128
129/*! Constructs a new HtmlHelp index */
133
134/*! Destroys the HtmlHelp index */
136
137
138/*! Stores an item in the index if it is not already present.
139 * Items are stored in alphabetical order, by sorting on the
140 * concatenation of \a level1 and \a level2 (if present).
141 *
142 * \param level1 the string at level 1 in the index.
143 * \param level2 the string at level 2 in the index (or 0 if not applicable).
144 * \param url the url of the documentation (without .html extension).
145 * \param anchor the anchor of the documentation within the page.
146 * \param hasLink if true, the url (without anchor) can be used in the
147 * level1 item, when writing the header of a list of level2 items.
148 * \param reversed TRUE if level1 is the member name and level2 the compound
149 * name.
150 */
151void HtmlHelpIndex::addItem(const QCString &level1,const QCString &level2,
152 const QCString &url,const QCString &anchor,bool hasLink,
153 bool reversed)
154{
155 static const reg::Ex re(R"(@\d+)");
156 QCString key = substitute(level1,"?","&quest;");
157 if (!level2.isEmpty()) key+= "?" + substitute(level2,"?","&quest;");
158 if (reg::search(key.str(),re)) // skip anonymous stuff
159 {
160 return;
161 }
162 QCString key_anchor = key;
163 if (!anchor.isEmpty())
164 {
165 key_anchor += anchor;
166 }
167 m_map.add(key_anchor,key,url,anchor,hasLink,reversed);
168}
169
170static QCString field2URL(const IndexField *f,bool checkReversed)
171{
172 QCString result = f->url;
174 if (!f->anchor.isEmpty() && (!checkReversed || f->reversed))
175 {
176 result+="#"+f->anchor;
177 }
178 return result;
179}
180
182{
183 /* to prevent
184 * Warning: Keyword string:
185 * ...
186 * is too long. The maximum size is 488 characters.
187 */
188 int maxLen = 400;
189 size_t maxExpandedLen = maxLen+50;
190 QCString result = convertToHtml(s,true);
191 if (result.length()>maxExpandedLen) // we need to truncate the string
192 {
193 // in the unlikely case that the string after conversion grows from maxLen to maxExpandedLen, we try smaller parts
194 // until we end up below the limit
195 while (maxLen>0 && result.length()>maxExpandedLen)
196 {
197 result = convertToHtml(s.left(maxLen));
198 maxLen-=20;
199 }
200 return result+"...";
201 }
202 else
203 {
204 return result;
205 }
206}
207
208/*! Writes the sorted list of index items into a html like list.
209 *
210 * An list of calls with <code>name = level1,level2</code> as follows:
211 * <pre>
212 * a1,b1
213 * a1,b2
214 * a2,b1
215 * a2,b2
216 * a3
217 * a4,b1
218 * </pre>
219 *
220 * Will result in the following list:
221 *
222 * <pre>
223 * a1 -> link to url if hasLink==TRUE
224 * b1 -> link to url#anchor
225 * b2 -> link to url#anchor
226 * a2 -> link to url if hasLink==TRUE
227 * b1 -> link to url#anchor
228 * b2 -> link to url#anchor
229 * a3 -> link to url if hasLink==TRUE
230 * a4 -> link to url if hasLink==TRUE
231 * b1 -> link to url#anchor
232 * </pre>
233 */
234void HtmlHelpIndex::writeFields(std::ostream &t)
235{
236 std::stable_sort(std::begin(m_map),
237 std::end(m_map),
238 [](const auto &e1,const auto &e2) { return qstricmp_sort(e1->name,e2->name)<0; }
239 );
240 QCString prevLevel1;
241 bool level2Started=FALSE;
242 for (auto it = std::begin(m_map); it!=std::end(m_map); ++it)
243 {
244 auto &f = *it;
245 QCString level1,level2;
246 int i = f->name.find('?');
247 if (i!=-1)
248 {
249 level1 = f->name.left(i);
250 level2 = f->name.right(f->name.length()-i-1);
251 }
252 else
253 {
254 level1 = f->name;
255 }
256
257 { // finish old list at level 2
258 if (level2Started) t << " </UL>\n";
259 level2Started=FALSE;
260
261 // <Antony>
262 // Added this code so that an item with only one subitem is written
263 // without any subitem.
264 // For example:
265 // a1, b1 -> will create only a1, not separate subitem for b1
266 // a2, b2
267 // a2, b3
268 QCString nextLevel1;
269 auto it_next = std::next(it);
270 if (it_next!=std::end(m_map))
271 {
272 auto &fnext = *it_next;
273 int j = fnext->name.find('?');
274 if (j<0) j=0;
275 nextLevel1 = fnext->name.left(j);
276 }
277 if (!(level1 == prevLevel1 || level1 == nextLevel1))
278 {
279 level2 = "";
280 }
281 prevLevel1 = level1;
282 // </Antony>
283
284 if (level2.isEmpty())
285 {
286 t << " <LI><OBJECT type=\"text/sitemap\">";
287 t << "<param name=\"Local\" value=\"" << field2URL(f.get(),FALSE);
288 t << "\">";
289 t << "<param name=\"Name\" value=\"" << convertToHtmlAndTruncate(m_recoder.recode(level1)) << "\">"
290 "</OBJECT>\n";
291 }
292 else
293 {
294 if (f->link)
295 {
296 t << " <LI><OBJECT type=\"text/sitemap\">";
297 t << "<param name=\"Local\" value=\"" << field2URL(f.get(),TRUE);
298 t << "\">";
299 t << "<param name=\"Name\" value=\"" << convertToHtmlAndTruncate(m_recoder.recode(level1)) << "\">"
300 "</OBJECT>\n";
301 }
302 else
303 {
304 t << " <LI><OBJECT type=\"text/sitemap\">";
305 t << "<param name=\"See Also\" value=\"" << convertToHtml(m_recoder.recode(level1)) << "\">";
306 t << "<param name=\"Name\" value=\"" << convertToHtmlAndTruncate(m_recoder.recode(level1)) << "\">"
307 "</OBJECT>\n";
308 }
309 }
310 }
311 if (!level2Started && !level2.isEmpty())
312 { // start new list at level 2
313 t << " <UL>\n";
314 level2Started=TRUE;
315 }
316 else if (level2Started && level2.isEmpty())
317 { // end list at level 2
318 t << " </UL>\n";
319 level2Started=FALSE;
320 }
321 if (level2Started)
322 {
323 t << " <LI><OBJECT type=\"text/sitemap\">";
324 t << "<param name=\"Local\" value=\"" << field2URL(f.get(),FALSE);
325 t << "\">";
326 t << "<param name=\"Name\" value=\"" << convertToHtmlAndTruncate(m_recoder.recode(level2)) << "\">"
327 "</OBJECT>\n";
328 }
329 }
330 if (level2Started) t << " </UL>\n";
331}
332
333//----------------------------------------------------------------------------
334//
351
352
353/*! Constructs an html object.
354 * The object has to be \link initialize() initialized\endlink before it can
355 * be used.
356 */
357HtmlHelp::HtmlHelp() : p(std::make_unique<Private>()) {}
358HtmlHelp::~HtmlHelp() = default;
359
360/*! This will create a contents file (index.hhc) and a index file (index.hhk)
361 * and write the header of those files.
362 * It also creates a project file (index.hhp)
363 * \sa finalize()
364 */
366{
367 p->recoder.initialize();
368
369 /* open the contents file */
370 QCString fName = Config_getString(HTML_OUTPUT) + "/" + hhcFileName;
371 p->cts = Portable::openOutputStream(fName);
372 if (!p->cts.is_open())
373 {
374 term("Could not open file {} for writing\n",fName);
375 }
376 /* Write the header of the contents file */
377 p->cts << "<!DOCTYPE HTML PUBLIC \"-//IETF//DTD HTML//EN\">\n"
378 "<HTML><HEAD></HEAD><BODY>\n"
379 "<OBJECT type=\"text/site properties\">\n"
380 "<param name=\"FrameName\" value=\"right\">\n"
381 "</OBJECT>\n"
382 "<UL>\n";
383
384 /* open the index file */
385 fName = Config_getString(HTML_OUTPUT) + "/" + hhkFileName;
386 p->kts = Portable::openOutputStream(fName);
387 if (!p->kts.is_open())
388 {
389 term("Could not open file {} for writing\n",fName);
390 }
391 /* Write the header of the contents file */
392 p->kts << "<!DOCTYPE HTML PUBLIC \"-//IETF//DTD HTML//EN\">\n"
393 "<HTML><HEAD></HEAD><BODY>\n"
394 "<OBJECT type=\"text/site properties\">\n"
395 "<param name=\"FrameName\" value=\"right\">\n"
396 "</OBJECT>\n"
397 "<UL>\n";
398
399}
400
402{
403 /* Write the project file */
404 QCString fName = Config_getString(HTML_OUTPUT) + "/" + hhpFileName;
405 std::ofstream t = Portable::openOutputStream(fName);
406 if (t.is_open())
407 {
408 QCString hhcFile = "\"" + hhcFileName + "\"";
409 QCString hhkFile = "\"" + hhkFileName + "\"";
410 bool hhkPresent = index.size()>0;
411 if (!ctsItemPresent) hhcFile = "";
412 if (!hhkPresent) hhkFile = "";
413
414 QCString indexName="index"+Doxygen::htmlFileExtension;
415 t << "[OPTIONS]\n";
416 if (!Config_getString(CHM_FILE).isEmpty())
417 {
418 t << "Compiled file=" << Config_getString(CHM_FILE) << "\n";
419 }
420 else
421 {
422 t << "Compiled file=index.chm\n";
423 }
424 t << "Compatibility=1.1\n"
425 "Full-text search=Yes\n";
426 if (ctsItemPresent) t << "Contents file=" + hhcFileName + "\n";
427 t << "Default Window=main\n"
428 "Default topic=" << indexName << "\n";
429 if (hhkPresent) t << "Index file=" + hhkFileName + "\n";
430 t << "Language=" << theTranslator->getLanguageString() << "\n";
431 if (Config_getBool(BINARY_TOC)) t << "Binary TOC=YES\n";
432 if (Config_getBool(GENERATE_CHI)) t << "Create CHI file=YES\n";
433 t << "Title=" << recoder.recode(Config_getString(PROJECT_NAME)) << "\n\n";
434
435 t << "[WINDOWS]\n";
436
437 // NOTE: the 0x10387e number is a set of bits specifying the buttons
438 // which should appear in the CHM viewer; that specific value
439 // means "show all buttons including the font-size one";
440 // the font-size one is not normally settable by the HTML Help Workshop
441 // utility but the way to set it is described here:
442 // http://support.microsoft.com/?scid=kb%3Ben-us%3B240062&x=17&y=18
443 // NOTE: the 0x70387e number in addition to the above the Next and Prev button
444 // are shown. They can only be shown in case of a binary toc.
445 // dee http://www.mif2go.com/xhtml/htmlhelp_0016_943addingtabsandtoolbarbuttonstohtmlhelp.htm#Rz108x95873
446 // Value has been taken from htmlhelp.h file of the HTML Help Workshop
447 if (Config_getBool(BINARY_TOC))
448 {
449 t << "main=\"" << recoder.recode(Config_getString(PROJECT_NAME)) << "\"," << hhcFile << ","
450 << hhkFile << ",\"" << indexName << "\",\"" <<
451 indexName << "\",,,,,0x23520,,0x70387e,,,,,,,,0\n\n";
452 }
453 else
454 {
455 t << "main=\"" << recoder.recode(Config_getString(PROJECT_NAME)) << "\"," << hhcFile << ","
456 << hhkFile << ",\"" << indexName << "\",\"" <<
457 indexName << "\",,,,,0x23520,,0x10387e,,,,,,,,0\n\n";
458 }
459
460 t << "[FILES]\n";
461 for (auto &s : indexFiles)
462 {
463 t << s << "\n";
464 }
465 for (auto &s : imageFiles)
466 {
467 t << s << "\n";
468 }
469 for (auto &s : styleFiles)
470 {
471 t << s << "\n";
472 }
473 t.close();
474 }
475 else
476 {
477 err("Could not open file {} for writing\n",fName);
478 }
479}
480
482{
483 p->indexFiles.insert(s.str());
484}
485
486/*! Finalizes the HTML help. This will finish and close the
487 * htmlhelp contents file and the htmlhelp index file.
488 * \sa initialize()
489 */
491{
492 // end the contents file
493 p->cts << "</UL>\n";
494 p->cts << "</BODY>\n";
495 p->cts << "</HTML>\n";
496 p->cts.close();
497
498 p->index.writeFields(p->kts);
499
500 // end the index file
501 p->kts << "</UL>\n";
502 p->kts << "</BODY>\n";
503 p->kts << "</HTML>\n";
504 p->kts.close();
505
506 p->createProjectFile();
507
508 p->recoder.finalize();
509}
510
511/*! Increase the level of the contents hierarchy.
512 * This will start a new unnumbered HTML list in contents file.
513 * \sa decContentsDepth()
514 */
516{
517 for (int i=0; i<p->dc+1; i++) p->cts << " ";
518 p->cts << "<UL>\n";
519 ++p->dc;
520}
521
522/*! Decrease the level of the contents hierarchy.
523 * This will end the unnumber HTML list.
524 * \sa incContentsDepth()
525 */
527{
528 for (int i=0; i<p->dc; i++) p->cts << " ";
529 p->cts << "</UL>\n";
530 --p->dc;
531}
532
533/*! Add an list item to the contents file.
534 * \param isDir boolean indicating if this is a dir or file entry
535 * \param name the name of the item.
536 * \param ref the URL of to the item.
537 * \param file the file in which the item is defined.
538 * \param anchor the anchor of the item.
539 * \param separateIndex not used.
540 * \param addToNavIndex not used.
541 * \param def not used.
542 * \param nameAsHtml name parameter in HTML format
543 */
545 const QCString &name,
546 const QCString &ref,
547 const QCString &file,
548 const QCString &anchor,
549 bool /* separateIndex */,
550 bool /* addToNavIndex */,
551 const Definition * /* def */,
552 const QCString & /* nameAsHtml */)
553{
554 p->ctsItemPresent = true;
555 for (int i=0; i<p->dc; i++) p->cts << " ";
556 p->cts << "<LI><OBJECT type=\"text/sitemap\">";
557 p->cts << "<param name=\"Name\" value=\"" << convertToHtml(p->recoder.recode(name),TRUE) << "\">";
558 if (!file.isEmpty()) // made file optional param - KPW
559 {
560 if (file[0]=='!' || file[0]=='^') // special markers for user defined URLs
561 {
562 p->cts << "<param name=\"";
563 if (file[0]=='^') p->cts << "URL"; else p->cts << "Local";
564 p->cts << "\" value=\"";
565 p->cts << &file[1];
566 p->cts << "\">";
567 }
568 else
569 {
570 QCString currFile = file;
572 QCString currAnc = anchor;
573 p->cts << "<param name=\"Local\" value=\"";
574 if (!ref.isEmpty()) p->cts << externalRef("",ref,true);
575 p->cts << currFile;
576 if (p->prevFile == currFile && p->prevAnc.isEmpty() && currAnc.isEmpty())
577 {
578 currAnc = "top";
579 }
580 if (!currAnc.isEmpty()) p->cts << "#" << currAnc;
581 p->cts << "\">";
582 p->prevFile = currFile;
583 p->prevAnc = currAnc;
584 }
585 }
586 p->cts << "<param name=\"ImageNumber\" value=\"";
587 if (isDir) // added - KPW
588 {
589 p->cts << static_cast<int>(BOOK_CLOSED);
590 }
591 else
592 {
593 p->cts << static_cast<int>(TEXT);
594 }
595 p->cts << "\">";
596 p->cts << "</OBJECT>\n";
597}
598
599
600void HtmlHelp::addIndexItem(const Definition *context,const MemberDef *md,
601 const QCString &sectionAnchor,const QCString &word)
602{
603 if (context && md)
604 {
605 QCString cfname = md->getOutputFileBase();
606 QCString argStr = md->argsString();
607 QCString level1 = context->name();
608 QCString level2 = md->name() + argStr;
609 QCString anchor = !sectionAnchor.isEmpty() ? sectionAnchor : md->anchor();
610 p->index.addItem(level1,level2,cfname,anchor,TRUE,FALSE);
611 p->index.addItem(level2,level1,cfname,anchor,TRUE,TRUE);
612 }
613 else if (context)
614 {
615 QCString level1 = !word.isEmpty() ? word : context->name();
616 p->index.addItem(level1,QCString(),context->getOutputFileBase(),sectionAnchor,TRUE,FALSE);
617 }
618}
619
621{
622 p->styleFiles.insert(fileName.str());
623}
624
625void HtmlHelp::addImageFile(const QCString &fileName)
626{
627 p->imageFiles.insert(fileName.str());
628}
629
The common base class of all entity definitions found in the sources.
Definition definition.h:76
virtual QCString anchor() const =0
virtual QCString getOutputFileBase() const =0
virtual const QCString & name() const =0
static QCString htmlFileExtension
Definition doxygen.h:122
StringSet indexFiles
Definition htmlhelp.cpp:345
StringSet imageFiles
Definition htmlhelp.cpp:346
HtmlHelpRecoder recoder
Definition htmlhelp.cpp:348
void createProjectFile()
Definition htmlhelp.cpp:401
HtmlHelpIndex index
Definition htmlhelp.cpp:349
std::ofstream kts
Definition htmlhelp.cpp:340
std::ofstream cts
Definition htmlhelp.cpp:340
StringSet styleFiles
Definition htmlhelp.cpp:347
void addImageFile(const QCString &)
Definition htmlhelp.cpp:625
void addIndexFile(const QCString &name)
Definition htmlhelp.cpp:481
static const QCString hhkFileName
Definition htmlhelp.h:88
void addContentsItem(bool isDir, const QCString &name, const QCString &ref, const QCString &file, const QCString &anchor, bool separateIndex, bool addToNavIndex, const Definition *def, const QCString &nameAsHtml)
Definition htmlhelp.cpp:544
void addIndexItem(const Definition *context, const MemberDef *md, const QCString &sectionAnchor, const QCString &title)
Definition htmlhelp.cpp:600
static const QCString hhpFileName
Definition htmlhelp.h:89
std::unique_ptr< Private > p
Definition htmlhelp.h:92
void finalize()
Definition htmlhelp.cpp:490
@ BOOK_CLOSED
Definition htmlhelp.h:41
void addStyleSheetFile(const QCString &)
Definition htmlhelp.cpp:620
void incContentsDepth()
Definition htmlhelp.cpp:515
void initialize()
Definition htmlhelp.cpp:365
void decContentsDepth()
Definition htmlhelp.cpp:526
static const QCString hhcFileName
Definition htmlhelp.h:87
A helper class for HtmlHelp that manages a two level index in alphabetical order.
Definition htmlhelp.cpp:114
size_t size() const
Definition htmlhelp.cpp:123
HtmlHelpRecoder & m_recoder
Definition htmlhelp.cpp:126
void addItem(const QCString &first, const QCString &second, const QCString &url, const QCString &anchor, bool hasLink, bool reversed)
Definition htmlhelp.cpp:151
void writeFields(std::ostream &t)
Definition htmlhelp.cpp:234
HtmlHelpIndex(HtmlHelpRecoder &recoder)
Definition htmlhelp.cpp:130
LinkedMap< IndexField > m_map
Definition htmlhelp.cpp:125
Helper class to deal with recoding the UTF8 encoded text back to the native encoding specified by CHM...
Definition htmlhelp.cpp:43
void * m_fromUtf8
Definition htmlhelp.cpp:91
QCString recode(const QCString &s)
Definition htmlhelp.cpp:68
void * m_iconv_null
Definition htmlhelp.cpp:90
void initialize()
Definition htmlhelp.cpp:49
Container class representing a vector of objects with keys.
Definition linkedmap.h:36
A model of a class/file/namespace member symbol.
Definition memberdef.h:48
virtual QCString argsString() const =0
This is an alternative implementation of QCString.
Definition qcstring.h:101
int find(char c, int index=0, bool cs=TRUE) const
Definition qcstring.cpp:43
size_t length() const
Returns the length of the string, not counting the 0-terminator.
Definition qcstring.h:166
char & at(size_t i)
Returns a reference to the character at index i.
Definition qcstring.h:593
char * rawData()
Returns a writable pointer to the data.
Definition qcstring.h:178
bool isEmpty() const
Returns TRUE iff the string is empty.
Definition qcstring.h:163
void resize(size_t newlen)
Definition qcstring.h:180
const std::string & str() const
Definition qcstring.h:552
QCString right(size_t len) const
Definition qcstring.h:234
@ ExplicitSize
Definition qcstring.h:146
const char * data() const
Returns a pointer to the contents of the string in the form of a 0-terminated C string.
Definition qcstring.h:172
QCString left(size_t len) const
Definition qcstring.h:229
Class representing a regular expression.
Definition regex.h:39
#define Config_getBool(name)
Definition config.h:33
#define Config_getString(name)
Definition config.h:32
#define NON_COPYABLE(cls)
Macro to help implementing the rule of 5 for a non-copyable & movable class.
Definition construct.h:37
std::set< std::string > StringSet
Definition containers.h:31
static QCString convertToHtmlAndTruncate(const QCString &s)
Definition htmlhelp.cpp:181
static QCString field2URL(const IndexField *f, bool checkReversed)
Definition htmlhelp.cpp:170
Translator * theTranslator
Definition language.cpp:71
#define err(fmt,...)
Definition message.h:127
#define term(fmt,...)
Definition message.h:137
std::ofstream openOutputStream(const QCString &name, bool append=false)
Definition portable.cpp:649
bool search(std::string_view str, Match &match, const Ex &re, size_t pos)
Search in a given string str starting at position pos for a match against regular expression re.
Definition regex.cpp:748
Portable versions of functions that are platform dependent.
int portable_iconv_close(void *cd)
size_t portable_iconv(void *cd, const char **inbuf, size_t *inbytesleft, char **outbuf, size_t *outbytesleft)
void * portable_iconv_open(const char *tocode, const char *fromcode)
QCString substitute(const QCString &s, const QCString &src, const QCString &dst)
substitute all occurrences of src in s by dst
Definition qcstring.cpp:482
int qstricmp_sort(const char *str1, const char *str2)
Definition qcstring.h:86
#define TRUE
Definition qcstring.h:37
#define FALSE
Definition qcstring.h:34
Class representing a field in the HTML help index.
Definition htmlhelp.cpp:99
bool reversed
Definition htmlhelp.cpp:107
QCString anchor
Definition htmlhelp.cpp:105
QCString url
Definition htmlhelp.cpp:104
IndexField(const QCString &k, const QCString &n, const QCString &u, const QCString &a, bool l, bool r)
Definition htmlhelp.cpp:100
QCString key
Definition htmlhelp.cpp:102
QCString name
Definition htmlhelp.cpp:103
QCString externalRef(const QCString &relPath, const QCString &ref, bool href)
Definition util.cpp:6272
QCString convertToHtml(const QCString &s, bool keepEntities)
Definition util.cpp:4479
void addHtmlExtensionIfMissing(QCString &fName)
Definition util.cpp:5418
A bunch of utility functions.