From 9778b72f5641d98f98a1851fc93148f9da258a74 Mon Sep 17 00:00:00 2001 From: Dimitri van Heesch Date: Thu, 31 Jan 2019 20:49:01 +0100 Subject: Fixed type in javascript license text and moved it to one location --- src/ftvhelp.cpp | 16 +--------------- src/ftvhelp.h | 16 ++++++++++++++++ src/index.cpp | 16 +--------------- 3 files changed, 18 insertions(+), 30 deletions(-) diff --git a/src/ftvhelp.cpp b/src/ftvhelp.cpp index 31a839e..5899bea 100644 --- a/src/ftvhelp.cpp +++ b/src/ftvhelp.cpp @@ -635,21 +635,7 @@ static void generateJSNavTree(const QList &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.\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 << JAVASCRIPT_LICENSE_TEXT; t << "var NAVTREE =" << endl; t << "[" << endl; t << " [ "; diff --git a/src/ftvhelp.h b/src/ftvhelp.h index bacf9a5..eac0367 100644 --- a/src/ftvhelp.h +++ b/src/ftvhelp.h @@ -72,6 +72,22 @@ class FTVHelp : public IndexIntf bool m_topLevelIndex; }; +#define JAVASCRIPT_LICENSE_TEXT \ + "/*\n@ @licstart The following is the entire license notice for the\n" \ + "JavaScript code in this file.\n\nCopyright (C) 1997-2019 by Dimitri van Heesch\n\n" \ + "This program is free software; you can redistribute it and/or modify\n" \ + "it under the terms of version 2 of the GNU General Public License as published by\n" \ + "the Free Software Foundation\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" #endif /* FTVHELP_H */ diff --git a/src/index.cpp b/src/index.cpp index fbef2cb..e743fac 100644 --- a/src/index.cpp +++ b/src/index.cpp @@ -5275,21 +5275,7 @@ static void writeMenuData() if (f.open(IO_WriteOnly)) { 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\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 << JAVASCRIPT_LICENSE_TEXT; t << "var menudata={"; bool hasChildren = renderQuickLinksAsJs(t,root,TRUE); if (hasChildren) t << "]"; -- cgit v0.12