Skip to content

Commit

Permalink
Marks JS as freely licensed
Browse files Browse the repository at this point in the history
Marking the resulting JS in this way ensures that visitors to the
resulting HTML documentation do not have to choose between running
non-free JS and experiencing the HTML documentation as it was
intended.

The JS was already freely licensed, so this change just
ensures that the appropriate labelling occurs so that GNU LibreJS [0]
parses the JS correctly as freely licensed.

[0] https://www.gnu.org/software/librejs/

Signed-off-by: zachwick <zach@zachwick.com>
  • Loading branch information
zachwick committed Aug 4, 2017
1 parent 0072ba5 commit 6b5617e
Show file tree
Hide file tree
Showing 18 changed files with 1,129 additions and 481 deletions.
2 changes: 1 addition & 1 deletion INSTALL
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
DOXYGEN

Please read the installation section of the manual
Please read the installation section of the manual
(http://www.doxygen.org/install.html) for instructions.

--------
Expand Down
2 changes: 1 addition & 1 deletion jquery/README
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Doxygen's jquery.js script is composed of minified versions of the following
packages:
- jquery 1.7.1: http://jquery.com/download/
- jquery 1.7.1: http://jquery.com/download/
- jquery.ui 1.8.18: https://code.google.com/p/jquery-ui/downloads/list
modules required:
- jquery.ui.core
Expand Down
53 changes: 34 additions & 19 deletions src/ftvhelp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
* Copyright (C) 1997-2015 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
* 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.
*
Expand Down Expand Up @@ -99,11 +99,11 @@ int FTVNode::numNodesAtLevel(int level,int maxLevel) const

//----------------------------------------------------------------------------

/*! Constructs an ftv help object.
* The object has to be \link initialize() initialized\endlink before it can
/*! Constructs an ftv help object.
* The object has to be \link initialize() initialized\endlink before it can
* be used.
*/
FTVHelp::FTVHelp(bool TLI)
FTVHelp::FTVHelp(bool TLI)
{
/* initial depth */
m_indentNodes = new QList<FTVNode>[MAX_INDENT];
Expand Down Expand Up @@ -134,7 +134,7 @@ void FTVHelp::finalize()
generateTreeView();
}

/*! Increase the level of the contents hierarchy.
/*! Increase the level of the contents hierarchy.
* This will start a new sublist in contents file.
* \sa decContentsDepth()
*/
Expand Down Expand Up @@ -204,7 +204,7 @@ void FTVHelp::addContentsItem(bool isDir,
QList<FTVNode> *pnl = &m_indentNodes[m_indent-1];
newNode->parent = pnl->getLast();
}

}

static QCString node2URL(FTVNode *n,bool overruleFile=FALSE,bool srcLink=FALSE)
Expand Down Expand Up @@ -385,7 +385,7 @@ void FTVHelp::generateTree(FTextStream &t, const QList<FTVNode> &nl,int level,in
if (srcRef)
{
t << "<a href=\"" << srcRef->getSourceFileBase()
<< Doxygen::htmlFileExtension
<< Doxygen::htmlFileExtension
<< "\">";
}
if (n->def && n->def->definitionType()==Definition::TypeGroup)
Expand Down Expand Up @@ -487,7 +487,7 @@ static QCString convertFileId2Var(const QCString &fileId)
return substitute(varId,"-","_");
}

static bool generateJSTree(NavIndexEntryList &navIndex,FTextStream &t,
static bool generateJSTree(NavIndexEntryList &navIndex,FTextStream &t,
const QList<FTVNode> &nl,int level,bool &first)
{
static QCString htmlOutput = Config_getString(HTML_OUTPUT);
Expand Down Expand Up @@ -543,7 +543,7 @@ static bool generateJSTree(NavIndexEntryList &navIndex,FTextStream &t,
{
fileId+="_"+n->anchor;
}
if (dupOfParent(n))
if (dupOfParent(n))
{
fileId+="_dup";
}
Expand All @@ -553,7 +553,7 @@ static bool generateJSTree(NavIndexEntryList &navIndex,FTextStream &t,
FTextStream tt(&f);
tt << "var " << convertFileId2Var(fileId) << " =" << endl;
generateJSTree(navIndex,tt,n->children,1,firstChild);
tt << endl << "];";
tt << endl << "];";
}
t << "\"" << fileId << "\" ]";
}
Expand All @@ -571,7 +571,7 @@ static bool generateJSTree(NavIndexEntryList &navIndex,FTextStream &t,
if (emptySection)
t << "null ]";
else
t << endl << indentStr << " ] ]";
t << endl << indentStr << " ] ]";
}
}
return found;
Expand All @@ -588,6 +588,22 @@ static void generateJSNavTree(const QList<FTVNode> &nodeList)
//tidx << "var NAVTREEINDEX =" << endl;
//tidx << "{" << endl;
FTextStream t(&f);
t << "/*\n@ @licstart The following is the entire license notice for the\n"
"JavaScript code in this file.\n\nCopyright (C) 1997-2017 by Dimitri van Heesch\n\n"
"This program is free software; you can redistribute it and/or modify\n"
"it under the terms of the GNU General Public License as published by\n"
"the Free Software Foundation; either version 2 of the License, or\n"
"(at your option) any later version.\n\n"
"This program is distributed in the hope that it will be useful,\n"
"but WITHOUT ANY WARRANTY; without even the implied warranty of\n"
" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n"
" GNU General Public License for more details.\n\n"
"You should have received a copy of the GNU General Public License along\n"
"with this program; if not, write to the Free Software Foundation, Inc.,\n"
"51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.\n\n"
"@licend The above is the entire license notice\n"
"for the JavaScript code in this file\n"
"*/\n";
t << "var NAVTREE =" << endl;
t << "[" << endl;
t << " [ ";
Expand Down Expand Up @@ -618,9 +634,9 @@ static void generateJSNavTree(const QList<FTVNode> &nodeList)
bool first=TRUE;
generateJSTree(navIndex,t,nodeList,1,first);

if (first)
if (first)
t << "]" << endl;
else
else
t << endl << " ] ]" << endl;
t << "];" << endl << endl;

Expand Down Expand Up @@ -660,7 +676,7 @@ static void generateJSNavTree(const QList<FTVNode> &nodeList)
++li;
if (li.current() && elemCount<maxElemCount-1) tsidx << ","; // not last entry
tsidx << endl;

elemCount++;
if (li.current() && elemCount>=maxElemCount) // switch to new sub-index
{
Expand All @@ -678,8 +694,8 @@ static void generateJSNavTree(const QList<FTVNode> &nodeList)
tsidx << "};" << endl;
t << endl << "];" << endl;
}
t << endl << "var SYNCONMSG = '" << theTranslator->trPanelSynchronisationTooltip(FALSE) << "';";
t << endl << "var SYNCOFFMSG = '" << theTranslator->trPanelSynchronisationTooltip(TRUE) << "';";
t << endl << "var SYNCONMSG = '" << theTranslator->trPanelSynchronisationTooltip(FALSE) << "';";
t << endl << "var SYNCOFFMSG = '" << theTranslator->trPanelSynchronisationTooltip(TRUE) << "';";
}
ResourceMgr::instance().copyResource("navtree.js",htmlOutput);
}
Expand Down Expand Up @@ -731,7 +747,7 @@ void FTVHelp::generateTreeViewInline(FTextStream &t)
if (depth>1)
{
t << "<div class=\"levels\">[";
t << theTranslator->trDetailLevel();
t << theTranslator->trDetailLevel();
t << " ";
int i;
for (i=1;i<=depth;i++)
Expand Down Expand Up @@ -779,4 +795,3 @@ void FTVHelp::generateTreeView()
generateTreeViewImages();
generateTreeViewScripts();
}

Loading

0 comments on commit 6b5617e

Please sign in to comment.