';
makeProjectFile();
makeContentFiles();
// Generate the HTML Help content files
function makeContentFiles()
{
global $LANGUAGE, $MANUAL_TITLE, $HEADER, $MAIN_FILES,
$HTML_PATH, $INDEX_IN_HTML, $FIRST_PAGE;
$toc = fopen("chm/smarty_manual_$LANGUAGE.hhc", "w");
$index = fopen("chm/smarty_manual_$LANGUAGE.hhk", "w");
// Write out file headers
fputs_wrapper($toc, $HEADER);
fputs_wrapper($index, $HEADER);
// Read original index file and drop out newlines
$indexline = oneLiner("$HTML_PATH/$INDEX_IN_HTML");
// Print out the objects, autoparsing won't find
mapAndIndex($MANUAL_TITLE, $FIRST_PAGE, " ", $toc, $index, 21);
// There is a fancy index
if ($FIRST_PAGE != $INDEX_IN_HTML) {
// Find the name of the Table of Contents
preg_match('|CLASS=\"TOC\" *>
(.*)([^<]*)|U', $indexline, $match);
if (empty($match[1])) { // Fallback
$match[1] = "Preface";
}
mapAndIndex($match[1], "preface.html", " ", $toc, $index);
// Now autofind the main pages
$MAIN_REGEXP = join("|", $MAIN_FILES);
preg_match_all("![IVX]+\. ([^<]+).*