Commit 8626ab32 authored by Dimitri van Heesch's avatar Dimitri van Heesch

Release-1.3.3-20030808

parent 3c3a5b28
DOXYGEN Version 1.3.3 DOXYGEN Version 1.3.3-20030808
Please read the installation section of the manual Please read the installation section of the manual
(http://www.doxygen.org/install.html) for instructions. (http://www.doxygen.org/install.html) for instructions.
-------- --------
Dimitri van Heesch (25 July 2003) Dimitri van Heesch (08 August 2003)
...@@ -28,11 +28,10 @@ distclean: clean ...@@ -28,11 +28,10 @@ distclean: clean
-rm -f objects/*.o -rm -f objects/*.o
-rm -f src/Makefile.doxygen src/Makefile.libdoxygen -rm -f src/Makefile.doxygen src/Makefile.libdoxygen
-rm -f src/Makefile.doxytag src/Makefile.libdoxycfg -rm -f src/Makefile.doxytag src/Makefile.libdoxycfg
-rm -f src/Makefile.doxysearch qtools/Makefile.qtools
-rm -f libpng/Makefile.libpng -rm -f libpng/Makefile.libpng
-rm -f Makefile qtools/Makefile src/Makefile examples/Makefile doc/Makefile -rm -f Makefile qtools/Makefile src/Makefile examples/Makefile doc/Makefile
-rm -f .makeconfig .tmakeconfig -rm -f .makeconfig .tmakeconfig
-rm -f src/doxygen.pro src/libdoxygen.pro src/doxytag.pro src/doxysearch.pro qtools/qtools.pro src/libdoxycfg.pro libpng/libpng.pro -rm -f src/doxygen.pro src/libdoxygen.pro src/doxytag.pro qtools/qtools.pro src/libdoxycfg.pro libpng/libpng.pro
-rm -f src/version.cpp -rm -f src/version.cpp
-rm -r addon/doxywizard/Makefile -rm -r addon/doxywizard/Makefile
-rm -f addon/doxywizard/Makefile.doxywizard -rm -f addon/doxywizard/Makefile.doxywizard
...@@ -46,7 +45,6 @@ install: doxywizard_install ...@@ -46,7 +45,6 @@ install: doxywizard_install
$(INSTTOOL) -d $(INSTALL)/bin $(INSTTOOL) -d $(INSTALL)/bin
$(INSTTOOL) -m 755 bin/doxygen $(INSTALL)/bin $(INSTTOOL) -m 755 bin/doxygen $(INSTALL)/bin
$(INSTTOOL) -m 755 bin/doxytag $(INSTALL)/bin $(INSTTOOL) -m 755 bin/doxytag $(INSTALL)/bin
$(INSTTOOL) -m 755 bin/doxysearch $(INSTALL)/bin
install_docs: install install_docs: install
$(INSTTOOL) -d $(DOCDIR) $(INSTTOOL) -d $(DOCDIR)
......
...@@ -14,10 +14,9 @@ distclean: clean ...@@ -14,10 +14,9 @@ distclean: clean
-del src\Makefile.libdoxygen \ -del src\Makefile.libdoxygen \
src\Makefile.doxygen \ src\Makefile.doxygen \
src\Makefile.doxytag \ src\Makefile.doxytag \
src\Makefile.doxysearch \
src\Makefile.libdoxycfg src\Makefile.libdoxycfg
-del Makefile src\Makefile examples\Makefile doc\Makefile -del Makefile src\Makefile examples\Makefile doc\Makefile
-del src\libdoxygen.pro src\doxygen.pro src\doxytag.pro src\doxysearch.pro src\libdoxycfg.pro -del src\libdoxygen.pro src\doxygen.pro src\doxytag.pro src\libdoxycfg.pro
-del src\version.cpp -del src\version.cpp
docs: docs:
......
...@@ -26,10 +26,9 @@ distclean: clean ...@@ -26,10 +26,9 @@ distclean: clean
-del src\Makefile.libdoxygen \ -del src\Makefile.libdoxygen \
src\Makefile.doxygen \ src\Makefile.doxygen \
src\Makefile.doxytag \ src\Makefile.doxytag \
src\Makefile.doxysearch \
src\Makefile.libdoxycfg src\Makefile.libdoxycfg
-del Makefile src\Makefile examples\Makefile doc\Makefile -del Makefile src\Makefile examples\Makefile doc\Makefile
-del src\libdoxygen.pro src\doxygen.pro src\doxytag.pro src\doxysearch.pro src\libdoxycfg.pro -del src\libdoxygen.pro src\doxygen.pro src\doxytag.pro src\libdoxycfg.pro
-del src\version.cpp -del src\version.cpp
docs: FORCE docs: FORCE
......
DOXYGEN Version 1.3.3 DOXYGEN Version 1.3.3_20030808
Please read INSTALL for compilation instructions. Please read INSTALL for compilation instructions.
...@@ -17,4 +17,4 @@ to subscribe to the lists or to visit the archives. ...@@ -17,4 +17,4 @@ to subscribe to the lists or to visit the archives.
Enjoy, Enjoy,
Dimitri van Heesch (dimitri@stack.nl) (25 July 2003) Dimitri van Heesch (dimitri@stack.nl) (08 August 2003)
1.3.3 1.3.3-20030808
...@@ -460,7 +460,7 @@ EOF ...@@ -460,7 +460,7 @@ EOF
echo " Created $DST from $SRC..." echo " Created $DST from $SRC..."
done done
f_inprofiles="qtools/qtools.pro.in src/libdoxygen.pro.in src/libdoxycfg.pro.in src/doxygen.pro.in src/doxytag.pro.in src/doxysearch.pro.in addon/doxywizard/doxywizard.pro.in addon/doxmlparser/src/doxmlparser.pro.in addon/doxmlparser/test/xmlparse.pro.in addon/doxmlparser/examples/metrics/metrics.pro.in libpng/libpng.pro.in" f_inprofiles="qtools/qtools.pro.in src/libdoxygen.pro.in src/libdoxycfg.pro.in src/doxygen.pro.in src/doxytag.pro.in addon/doxywizard/doxywizard.pro.in addon/doxmlparser/src/doxmlparser.pro.in addon/doxmlparser/test/xmlparse.pro.in addon/doxmlparser/examples/metrics/metrics.pro.in libpng/libpng.pro.in"
for i in $f_inprofiles ; do for i in $f_inprofiles ; do
SRC=$i SRC=$i
......
...@@ -136,7 +136,7 @@ Unfortunately this only works if both compressed HTML files are in the same ...@@ -136,7 +136,7 @@ Unfortunately this only works if both compressed HTML files are in the same
directory. directory.
As a result you must rename the generated \c index.chm files for all projects As a result you must rename the generated \c index.chm files for all projects
into something unique and put all \c .chm files in one directory. into something unique and put all <code>.chm</code> files in one directory.
Suppose you have a project \e a referring to a project \e b using tag file Suppose you have a project \e a referring to a project \e b using tag file
\c b.tag, then you could rename the \c index.chm for project \e a into \c b.tag, then you could rename the \c index.chm for project \e a into
......
This diff is collapsed.
...@@ -29,7 +29,7 @@ information. ...@@ -29,7 +29,7 @@ information.
The executable \c doxysearch is only needed if you want to use the search The executable \c doxysearch is only needed if you want to use the search
engine. See section \ref doxysearch_usage for more detailed usage information. engine. See section \ref doxysearch_usage for more detailed usage information.
Optionally, the executable \c doxywizard is a GUI front-end for editing Optionally, the executable \c doxywizard is a graphical front-end for editing
the configuration files that are used by doxygen. the configuration files that are used by doxygen.
The following figure shows the relation between the tools and the flow The following figure shows the relation between the tools and the flow
......
Summary: A documentation system for C/C++. Summary: A documentation system for C/C++.
Name: doxygen Name: doxygen
Version: 1.3.3 Version: 1.3.3_20030808
Release: 1 Release: 1
Epoch: 1 Epoch: 1
Source0: ftp://ftp.stack.nl/pub/users/dimitri/%{name}-%{version}.src.tar.gz Source0: ftp://ftp.stack.nl/pub/users/dimitri/%{name}-%{version}.src.tar.gz
...@@ -56,7 +56,6 @@ rm -rf ${RPM_BUILD_ROOT} ...@@ -56,7 +56,6 @@ rm -rf ${RPM_BUILD_ROOT}
%defattr(-,root,root) %defattr(-,root,root)
%doc LANGUAGE.HOWTO README examples html %doc LANGUAGE.HOWTO README examples html
%{_bindir}/doxygen %{_bindir}/doxygen
%{_bindir}/doxysearch
%{_bindir}/doxytag %{_bindir}/doxytag
%files doxywizard %files doxywizard
......
...@@ -14,12 +14,11 @@ ...@@ -14,12 +14,11 @@
# input used in their production; they are not affected by this license. # input used in their production; they are not affected by this license.
# #
all: Makefile.libdoxygen Makefile.libdoxycfg Makefile.doxygen Makefile.doxytag Makefile.doxysearch Makefile all: Makefile.libdoxygen Makefile.libdoxycfg Makefile.doxygen Makefile.doxytag Makefile
$(MAKE) -f Makefile.libdoxycfg PERL=$(PERL) $@ $(MAKE) -f Makefile.libdoxycfg PERL=$(PERL) $@
$(MAKE) -f Makefile.libdoxygen PERL=$(PERL) $@ $(MAKE) -f Makefile.libdoxygen PERL=$(PERL) $@
$(MAKE) -f Makefile.doxygen PERL=$(PERL) $@ $(MAKE) -f Makefile.doxygen PERL=$(PERL) $@
$(MAKE) -f Makefile.doxytag PERL=$(PERL) $@ $(MAKE) -f Makefile.doxytag PERL=$(PERL) $@
$(MAKE) -f Makefile.doxysearch PERL=$(PERL) $@
Makefile.libdoxygen: libdoxygen.pro libdoxygen.t Makefile.libdoxygen: libdoxygen.pro libdoxygen.t
$(ENV) $(PERL) $(TMAKE) libdoxygen.pro >Makefile.libdoxygen $(ENV) $(PERL) $(TMAKE) libdoxygen.pro >Makefile.libdoxygen
...@@ -33,22 +32,17 @@ Makefile.doxygen: doxygen.pro ...@@ -33,22 +32,17 @@ Makefile.doxygen: doxygen.pro
Makefile.doxytag: doxytag.pro doxytag.t Makefile.doxytag: doxytag.pro doxytag.t
$(ENV) $(PERL) $(TMAKE) doxytag.pro >Makefile.doxytag $(ENV) $(PERL) $(TMAKE) doxytag.pro >Makefile.doxytag
Makefile.doxysearch: doxysearch.pro
$(ENV) $(PERL) $(TMAKE) doxysearch.pro >Makefile.doxysearch
tmake: tmake:
$(ENV) $(PERL) $(TMAKE) libdoxygen.pro >Makefile.libdoxygen $(ENV) $(PERL) $(TMAKE) libdoxygen.pro >Makefile.libdoxygen
$(ENV) $(PERL) $(TMAKE) libdoxycfg.pro >Makefile.libdoxycfg $(ENV) $(PERL) $(TMAKE) libdoxycfg.pro >Makefile.libdoxycfg
$(ENV) $(PERL) $(TMAKE) doxygen.pro >Makefile.doxygen $(ENV) $(PERL) $(TMAKE) doxygen.pro >Makefile.doxygen
$(ENV) $(PERL) $(TMAKE) doxytag.pro >Makefile.doxytag $(ENV) $(PERL) $(TMAKE) doxytag.pro >Makefile.doxytag
$(ENV) $(PERL) $(TMAKE) doxysearch.pro >Makefile.doxysearch
clean: Makefile.libdoxygen Makefile.doxygen Makefile.doxytag Makefile.doxysearch clean: Makefile.libdoxygen Makefile.doxygen Makefile.doxytag
$(MAKE) -f Makefile.libdoxygen clean $(MAKE) -f Makefile.libdoxygen clean
$(MAKE) -f Makefile.libdoxycfg clean $(MAKE) -f Makefile.libdoxycfg clean
$(MAKE) -f Makefile.doxygen clean $(MAKE) -f Makefile.doxygen clean
$(MAKE) -f Makefile.doxytag clean $(MAKE) -f Makefile.doxytag clean
$(MAKE) -f Makefile.doxysearch clean
distclean: clean distclean: clean
-$(RM) scanner.cpp code.cpp config.cpp pre.cpp ce_lex.cpp \ -$(RM) scanner.cpp code.cpp config.cpp pre.cpp ce_lex.cpp \
......
...@@ -791,7 +791,7 @@ void ClassDef::writeDetailedDescription(OutputList &ol, const QCString &pageType ...@@ -791,7 +791,7 @@ void ClassDef::writeDetailedDescription(OutputList &ol, const QCString &pageType
// repeat brief description // repeat brief description
if (!briefDescription().isEmpty() && Config_getBool("REPEAT_BRIEF")) if (!briefDescription().isEmpty() && Config_getBool("REPEAT_BRIEF"))
{ {
ol.parseDoc(briefFile(),briefLine(),name(),0,briefDescription(),FALSE); ol.parseDoc(briefFile(),briefLine(),this,0,briefDescription(),FALSE,FALSE);
} }
if (!briefDescription().isEmpty() && Config_getBool("REPEAT_BRIEF") && if (!briefDescription().isEmpty() && Config_getBool("REPEAT_BRIEF") &&
!documentation().isEmpty()) !documentation().isEmpty())
...@@ -811,7 +811,7 @@ void ClassDef::writeDetailedDescription(OutputList &ol, const QCString &pageType ...@@ -811,7 +811,7 @@ void ClassDef::writeDetailedDescription(OutputList &ol, const QCString &pageType
ol.disableAllBut(OutputGenerator::RTF); ol.disableAllBut(OutputGenerator::RTF);
ol.newParagraph(); ol.newParagraph();
ol.popGeneratorState(); ol.popGeneratorState();
ol.parseDoc(docFile(),docLine(),name(),0,documentation()+"\n",FALSE); ol.parseDoc(docFile(),docLine(),this,0,documentation()+"\n",TRUE,FALSE);
} }
// write examples // write examples
if (exampleFlag) if (exampleFlag)
...@@ -860,7 +860,7 @@ void ClassDef::writeDocumentation(OutputList &ol) ...@@ -860,7 +860,7 @@ void ClassDef::writeDocumentation(OutputList &ol)
{ {
if (!Config_getBool("DETAILS_AT_TOP")) if (!Config_getBool("DETAILS_AT_TOP"))
{ {
ol.parseDoc(briefFile(),briefLine(),name(),0,briefDescription(),FALSE); ol.parseDoc(briefFile(),briefLine(),this,0,briefDescription(),TRUE,FALSE);
ol.writeString(" \n"); ol.writeString(" \n");
ol.pushGeneratorState(); ol.pushGeneratorState();
ol.disableAllBut(OutputGenerator::Html); ol.disableAllBut(OutputGenerator::Html);
......
...@@ -117,8 +117,8 @@ void ClassSDict::writeDeclaration(OutputList &ol,const ClassDef::CompoundType *f ...@@ -117,8 +117,8 @@ void ClassSDict::writeDeclaration(OutputList &ol,const ClassDef::CompoundType *f
if (!cd->briefDescription().isEmpty()) if (!cd->briefDescription().isEmpty())
{ {
ol.startMemberDescription(); ol.startMemberDescription();
ol.parseDoc(cd->briefFile(),cd->briefLine(),cd->name(),0, ol.parseDoc(cd->briefFile(),cd->briefLine(),cd,0,
cd->briefDescription(),FALSE); cd->briefDescription(),FALSE,FALSE);
if ((!cd->briefDescription().isEmpty() && Config_getBool("REPEAT_BRIEF")) || if ((!cd->briefDescription().isEmpty() && Config_getBool("REPEAT_BRIEF")) ||
!cd->documentation().isEmpty()) !cd->documentation().isEmpty())
{ {
......
...@@ -323,6 +323,7 @@ ...@@ -323,6 +323,7 @@
<xsd:element name="acute" type="docCharType" /> <xsd:element name="acute" type="docCharType" />
<xsd:element name="grave" type="docCharType" /> <xsd:element name="grave" type="docCharType" />
<xsd:element name="circ" type="docCharType" /> <xsd:element name="circ" type="docCharType" />
<xsd:element name="slash" type="docCharType" />
<xsd:element name="tilde" type="docCharType" /> <xsd:element name="tilde" type="docCharType" />
<xsd:element name="cedil" type="docCharType" /> <xsd:element name="cedil" type="docCharType" />
<xsd:element name="ring" type="docCharType" /> <xsd:element name="ring" type="docCharType" />
......
...@@ -323,6 +323,7 @@ ...@@ -323,6 +323,7 @@
" <xsd:element name=\"acute\" type=\"docCharType\" />\n" " <xsd:element name=\"acute\" type=\"docCharType\" />\n"
" <xsd:element name=\"grave\" type=\"docCharType\" />\n" " <xsd:element name=\"grave\" type=\"docCharType\" />\n"
" <xsd:element name=\"circ\" type=\"docCharType\" />\n" " <xsd:element name=\"circ\" type=\"docCharType\" />\n"
" <xsd:element name=\"slash\" type=\"docCharType\" />\n"
" <xsd:element name=\"tilde\" type=\"docCharType\" />\n" " <xsd:element name=\"tilde\" type=\"docCharType\" />\n"
" <xsd:element name=\"cedil\" type=\"docCharType\" />\n" " <xsd:element name=\"cedil\" type=\"docCharType\" />\n"
" <xsd:element name=\"ring\" type=\"docCharType\" />\n" " <xsd:element name=\"ring\" type=\"docCharType\" />\n"
......
...@@ -25,7 +25,8 @@ class ConfigOption ...@@ -25,7 +25,8 @@ class ConfigOption
O_Enum, //<! A fixed set of items O_Enum, //<! A fixed set of items
O_String, //<! A single item O_String, //<! A single item
O_Int, //<! An integer value O_Int, //<! An integer value
O_Bool //<! A boolean value O_Bool, //<! A boolean value
O_Obsolete //<! An obsolete option
}; };
enum enum
{ {
...@@ -309,6 +310,18 @@ class ConfigBool : public ConfigOption ...@@ -309,6 +310,18 @@ class ConfigBool : public ConfigOption
QCString m_valueString; QCString m_valueString;
}; };
/*! \brief Section marker for obsolete options
*
*/
class ConfigObsolete : public ConfigOption
{
public:
ConfigObsolete(OptionType t) : ConfigOption(t) {}
void writeTemplate(QTextStream &,bool,bool) {}
void substEnvVars() {}
};
// some convenience macros // some convenience macros
#define Config_getString(val) Config::instance()->getString(__FILE__,__LINE__,val) #define Config_getString(val) Config::instance()->getString(__FILE__,__LINE__,val)
#define Config_getInt(val) Config::instance()->getInt(__FILE__,__LINE__,val) #define Config_getInt(val) Config::instance()->getInt(__FILE__,__LINE__,val)
...@@ -479,6 +492,13 @@ class Config ...@@ -479,6 +492,13 @@ class Config
m_dict->insert(name,result); m_dict->insert(name,result);
return result; return result;
} }
/*! Adds an option that has become obsolete. */
ConfigOption *addObsolete(const char *name)
{
ConfigObsolete *option = new ConfigObsolete(ConfigOption::O_Obsolete);
m_dict->insert(name,option);
return option;
}
/*! @} */ /*! @} */
/*! Writes a template configuration file to \a f. If \a shortIndex /*! Writes a template configuration file to \a f. If \a shortIndex
......
...@@ -469,6 +469,12 @@ static void readIncludeFile(const char *incName) ...@@ -469,6 +469,12 @@ static void readIncludeFile(const char *incName)
s->resize(0); s->resize(0);
BEGIN(GetString); BEGIN(GetString);
break; break;
case ConfigOption::O_Obsolete:
config_err("Warning: Tag `%s' at line %d of file %s has become obsolete.\n"
"To avoid this warning please update your configuration "
"file using \"doxygen -u\"\n", cmd.data(),yyLineNr,yyFileName.data());
BEGIN(SkipInvalid);
break;
} }
} }
} }
...@@ -502,6 +508,12 @@ static void readIncludeFile(const char *incName) ...@@ -502,6 +508,12 @@ static void readIncludeFile(const char *incName)
yytext,yyLineNr,yyFileName.data()); yytext,yyLineNr,yyFileName.data());
BEGIN(SkipInvalid); BEGIN(SkipInvalid);
break; break;
case ConfigOption::O_Obsolete:
config_err("Warning: Tag `%s' at line %d of file %s has become obsolete.\n"
"To avoid this warning please update your configuration "
"file using \"doxygen -u\"\n", cmd.data(),yyLineNr,yyFileName.data());
BEGIN(SkipInvalid);
break;
} }
} }
} }
...@@ -1077,6 +1089,9 @@ void Config::check() ...@@ -1077,6 +1089,9 @@ void Config::check()
filePatternList.append("*.idl"); filePatternList.append("*.idl");
filePatternList.append("*.odl"); filePatternList.append("*.odl");
filePatternList.append("*.cs"); filePatternList.append("*.cs");
filePatternList.append("*.php");
filePatternList.append("*.php3");
filePatternList.append("*.inc");
} }
// add default pattern if needed // add default pattern if needed
...@@ -1094,102 +1109,102 @@ void Config::check() ...@@ -1094,102 +1109,102 @@ void Config::check()
//} //}
// more checks needed if and only if the search engine is enabled. // more checks needed if and only if the search engine is enabled.
if (Config_getBool("SEARCHENGINE")) // if (Config_getBool("SEARCHENGINE"))
// {
// // check cgi name
// QCString &cgiName = Config_getString("CGI_NAME");
// if (cgiName.isEmpty())
// {
// config_err("Error: tag CGI_NAME: no cgi script name after the CGI_NAME tag.\n");
// exit(1);
// }
// // check cgi URL
// QCString &cgiURL = Config_getString("CGI_URL");
// if (cgiURL.isEmpty())
// {
// config_err("Error: tag CGI_URL: no URL to cgi directory specified.\n");
// exit(1);
// }
// else if (cgiURL.left(7)!="http://" &&
// cgiURL.left(8)!="https://" &&
// cgiURL.left(4)!="cgi:"
// )
// {
// config_err("Error: tag CGI_URL: URL to cgi directory is invalid (must "
// "start with http:// or https://).\n");
// exit(1);
// }
// // check documentation URL
// QCString &docURL = Config_getString("DOC_URL");
// if (docURL.isEmpty())
// {
// docURL = Config_getString("OUTPUT_DIRECTORY").copy().prepend("file://").append("html");
// }
// else if (docURL.left(7)!="http://" &&
// docURL.left(8)!="https://" &&
// docURL.left(7)!="file://"
// )
// {
// config_err("Error: tag DOC_URL: URL to documentation is invalid or "
// "not absolute.\n");
// exit(1);
// }
// // check absolute documentation path
// QCString &docAbsPath = Config_getString("DOC_ABSPATH");
// if (docAbsPath.isEmpty())
// {
// docAbsPath = Config_getString("OUTPUT_DIRECTORY")+"/html";
// }
// else if (docAbsPath[0]!='/' && docAbsPath[1]!=':')
// {
// config_err("Error: tag DOC_ABSPATH: path is not absolute!\n");
// exit(1);
// }
// // check path to doxysearch
// QCString &binAbsPath = Config_getString("BIN_ABSPATH");
// if (binAbsPath.isEmpty())
// {
// config_err("Error: tag BIN_ABSPATH: no absolute path to doxysearch "
// "specified.\n");
// exit(1);
// }
// else if (binAbsPath[0]!='/' && binAbsPath[1]!=':')
// {
// config_err("Error: tag BIN_ABSPATH: path is not absolute!\n");
// exit(1);
// }
//
// }
// check perl path
bool found=FALSE;
QCString &perlPath = Config_getString("PERL_PATH");
if (perlPath.isEmpty())
{ {
// check cgi name QFileInfo fi;
QCString &cgiName = Config_getString("CGI_NAME"); fi.setFile("/usr/bin/perl");
if (cgiName.isEmpty()) if (fi.exists())
{
config_err("Error: tag CGI_NAME: no cgi script name after the CGI_NAME tag.\n");
exit(1);
}
// check cgi URL
QCString &cgiURL = Config_getString("CGI_URL");
if (cgiURL.isEmpty())
{
config_err("Error: tag CGI_URL: no URL to cgi directory specified.\n");
exit(1);
}
else if (cgiURL.left(7)!="http://" &&
cgiURL.left(8)!="https://" &&
cgiURL.left(4)!="cgi:"
)
{
config_err("Error: tag CGI_URL: URL to cgi directory is invalid (must "
"start with http:// or https://).\n");
exit(1);
}
// check documentation URL
QCString &docURL = Config_getString("DOC_URL");
if (docURL.isEmpty())
{
docURL = Config_getString("OUTPUT_DIRECTORY").copy().prepend("file://").append("html");
}
else if (docURL.left(7)!="http://" &&
docURL.left(8)!="https://" &&
docURL.left(7)!="file://"
)
{
config_err("Error: tag DOC_URL: URL to documentation is invalid or "
"not absolute.\n");
exit(1);
}
// check absolute documentation path
QCString &docAbsPath = Config_getString("DOC_ABSPATH");
if (docAbsPath.isEmpty())
{
docAbsPath = Config_getString("OUTPUT_DIRECTORY")+"/html";
}
else if (docAbsPath[0]!='/' && docAbsPath[1]!=':')
{
config_err("Error: tag DOC_ABSPATH: path is not absolute!\n");
exit(1);
}
// check path to doxysearch
QCString &binAbsPath = Config_getString("BIN_ABSPATH");
if (binAbsPath.isEmpty())
{
config_err("Error: tag BIN_ABSPATH: no absolute path to doxysearch "
"specified.\n");
exit(1);
}
else if (binAbsPath[0]!='/' && binAbsPath[1]!=':')
{ {
config_err("Error: tag BIN_ABSPATH: path is not absolute!\n"); perlPath="/usr/bin/perl";
exit(1); found=TRUE;
} }
else
// check perl path
bool found=FALSE;
QCString &perlPath = Config_getString("PERL_PATH");
if (perlPath.isEmpty())
{ {
QFileInfo fi; fi.setFile("/usr/local/bin/perl");
fi.setFile("/usr/bin/perl"); if (fi.exists())
if (fi.exists())
{ {
perlPath="/usr/bin/perl"; perlPath="/usr/local/bin/perl";
found=TRUE; found=TRUE;
}
else
{
fi.setFile("/usr/local/bin/perl");
if (fi.exists())
{
perlPath="/usr/local/bin/perl";
found=TRUE;
}
} }
} }
if (!found) }
if (!found)
{
QFileInfo fi(perlPath);
if (!fi.exists())
{ {
QFileInfo fi(perlPath); config_warn("Warning: tag PERL_PATH: perl interpreter not found at default or"
if (!fi.exists()) "user specified (%s) location\n",
{ perlPath.data());
config_warn("Warning: tag PERL_PATH: perl interpreter not found at default or"
"user specified (%s) location\n",
perlPath.data());
}
} }
} }
...@@ -1742,7 +1757,7 @@ void Config::create() ...@@ -1742,7 +1757,7 @@ void Config::create()
"and *.h) to filter out the source-files in the directories. If left \n" "and *.h) to filter out the source-files in the directories. If left \n"
"blank the following patterns are tested: \n" "blank the following patterns are tested: \n"
"*.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx *.hpp \n" "*.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx *.hpp \n"
"*.h++ *.idl *.odl *.cs\n" "*.h++ *.idl *.odl *.cs *.php *.php3 *.inc\n"
); );
cb = addBool( cb = addBool(
"RECURSIVE", "RECURSIVE",
...@@ -2611,52 +2626,12 @@ void Config::create() ...@@ -2611,52 +2626,12 @@ void Config::create()
"used. If set to NO the values of all tags below this one will be ignored. \n", "used. If set to NO the values of all tags below this one will be ignored. \n",
FALSE FALSE
); );
cs = addString( addObsolete("CGI_NAME");
"CGI_NAME", addObsolete("CGI_URL");
"The CGI_NAME tag should be the name of the CGI script that \n" addObsolete("DOC_URL");
"starts the search engine (doxysearch) with the correct parameters. \n" addObsolete("DOC_ABSPATH");
"A script with this name will be generated by doxygen. \n" addObsolete("BIN_ABSPATH");
); addObsolete("EXT_DOC_PATHS");
cs->setDefaultValue("search.cgi");
cs->addDependency("SEARCHENGINE");
cs = addString(
"CGI_URL",
"The CGI_URL tag should be the absolute URL to the directory where the \n"
"cgi binaries are located. See the documentation of your http daemon for \n"
"details. \n"
);
cs->addDependency("SEARCHENGINE");
cs = addString(
"DOC_URL",
"The DOC_URL tag should be the absolute URL to the directory where the \n"
"documentation is located. If left blank the absolute path to the \n"
"documentation, with file:// prepended to it, will be used. \n"
);
cs->addDependency("SEARCHENGINE");
cs = addString(
"DOC_ABSPATH",
"The DOC_ABSPATH tag should be the absolute path to the directory where the \n"
"documentation is located. If left blank the directory on the local machine \n"
"will be used. \n"
);
cs->setWidgetType(ConfigString::Dir);
cs->addDependency("SEARCHENGINE");
cs = addString(
"BIN_ABSPATH",
"The BIN_ABSPATH tag must point to the directory where the doxysearch binary \n"
"is installed. \n"
);
cs->setDefaultValue("/usr/local/bin/");
cs->setWidgetType(ConfigString::Dir);
cs->addDependency("SEARCHENGINE");
cl = addList(
"EXT_DOC_PATHS",
"The EXT_DOC_PATHS tag can be used to specify one or more paths to \n"
"documentation generated for other projects. This allows doxysearch to search \n"
"the documentation for these projects as well. \n"
);
cl->setWidgetType(ConfigList::Dir);
cl->addDependency("SEARCHENGINE");
// The IMAGE_PATTERNS tag is now officially obsolete. // The IMAGE_PATTERNS tag is now officially obsolete.
} }
......
...@@ -38,6 +38,8 @@ ...@@ -38,6 +38,8 @@
#include "printdocvisitor.h" #include "printdocvisitor.h"
#include "message.h" #include "message.h"
#include "section.h" #include "section.h"
#include "searchindex.h"
#include "language.h"
#define DBG(x) do {} while(0) #define DBG(x) do {} while(0)
//#define DBG(x) printf x //#define DBG(x) printf x
...@@ -66,6 +68,8 @@ static bool g_isExample; ...@@ -66,6 +68,8 @@ static bool g_isExample;
static QCString g_exampleName; static QCString g_exampleName;
static SectionDict *g_sectionDict; static SectionDict *g_sectionDict;
static QCString g_searchUrl;
// include file state // include file state
static QString g_includeFileText; static QString g_includeFileText;
static uint g_includeFileOffset; static uint g_includeFileOffset;
...@@ -691,7 +695,7 @@ static void handleLinkedWord(DocNode *parent,QList<DocNode> &children) ...@@ -691,7 +695,7 @@ static void handleLinkedWord(DocNode *parent,QList<DocNode> &children)
{ {
Definition *compound=0; Definition *compound=0;
MemberDef *member=0; MemberDef *member=0;
QString name = linkToText(g_token->name); QString name = linkToText(g_token->name,TRUE);
if (resolveRef(g_context,g_token->name,g_inSeeBlock,&compound,&member)) if (resolveRef(g_context,g_token->name,g_inSeeBlock,&compound,&member))
{ {
if (member) // member link if (member) // member link
...@@ -1088,6 +1092,11 @@ DocSymbol::SymType DocSymbol::decodeSymbol(const QString &symName,char *letter) ...@@ -1088,6 +1092,11 @@ DocSymbol::SymType DocSymbol::decodeSymbol(const QString &symName,char *letter)
*letter=symName.at(1); *letter=symName.at(1);
return DocSymbol::Ring; return DocSymbol::Ring;
} }
else if (l==8 && symName.right(6)=="slash;")
{
*letter=symName.at(1);
return DocSymbol::Slash;
}
return DocSymbol::Unknown; return DocSymbol::Unknown;
} }
...@@ -1103,7 +1112,7 @@ static int internalValidatingParseDoc(DocNode *parent,QList<DocNode> &children, ...@@ -1103,7 +1112,7 @@ static int internalValidatingParseDoc(DocNode *parent,QList<DocNode> &children,
doctokenizerYYinit(doc,g_fileName); doctokenizerYYinit(doc,g_fileName);
// first parse any number of paragraphs // first parse any number of paragraphs
bool isFirst=FALSE; bool isFirst=TRUE;
DocPara *lastPar=0; DocPara *lastPar=0;
do do
{ {
...@@ -1151,6 +1160,33 @@ static void readTextFileByName(const QString &file,QString &text) ...@@ -1151,6 +1160,33 @@ static void readTextFileByName(const QString &file,QString &text)
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
DocWord::DocWord(DocNode *parent,const QString &word) :
m_parent(parent), m_word(word)
{
//printf("new word %s url=%s\n",word.data(),g_searchUrl.data());
if (!g_searchUrl.isEmpty())
{
Doxygen::searchIndex->addWord(word.lower());
}
}
//---------------------------------------------------------------------------
DocLinkedWord::DocLinkedWord(DocNode *parent,const QString &word,
const QString &ref,const QString &file,
const QString &anchor) :
m_parent(parent), m_word(word), m_ref(ref),
m_file(file), m_anchor(anchor)
{
//printf("new word %s url=%s\n",word.data(),g_searchUrl.data());
if (!g_searchUrl.isEmpty())
{
Doxygen::searchIndex->addWord(word.lower());
}
}
//---------------------------------------------------------------------------
DocAnchor::DocAnchor(DocNode *parent,const QString &id,bool newAnchor) DocAnchor::DocAnchor(DocNode *parent,const QString &id,bool newAnchor)
: m_parent(parent) : m_parent(parent)
{ {
...@@ -1636,7 +1672,6 @@ DocRef::DocRef(DocNode *parent,const QString &target) : ...@@ -1636,7 +1672,6 @@ DocRef::DocRef(DocNode *parent,const QString &target) :
m_parent(parent), m_refToSection(FALSE), m_refToAnchor(FALSE) m_parent(parent), m_refToSection(FALSE), m_refToAnchor(FALSE)
{ {
Definition *compound = 0; Definition *compound = 0;
//PageInfo *pageInfo = 0;
QCString anchor; QCString anchor;
ASSERT(!target.isEmpty()); ASSERT(!target.isEmpty());
SectionInfo *sec = Doxygen::sectionDict[target]; SectionInfo *sec = Doxygen::sectionDict[target];
...@@ -1653,14 +1688,11 @@ DocRef::DocRef(DocNode *parent,const QString &target) : ...@@ -1653,14 +1688,11 @@ DocRef::DocRef(DocNode *parent,const QString &target) :
} }
else if (resolveLink(g_context,target,TRUE,&compound,/*&pageInfo,*/anchor)) else if (resolveLink(g_context,target,TRUE,&compound,/*&pageInfo,*/anchor))
{ {
m_text = linkToText(target); bool isFile = compound ?
(compound->definitionType()==Definition::TypeFile ? TRUE : FALSE) :
FALSE;
m_text = linkToText(target,isFile);
m_anchor = anchor; m_anchor = anchor;
//if (pageInfo) // ref to page
//{
// m_file = pageInfo->getOutputFileBase();
// m_ref = pageInfo->getReference();
//}
//else
if (compound) // ref to compound if (compound) // ref to compound
{ {
if (anchor.isEmpty() && /* compound link */ if (anchor.isEmpty() && /* compound link */
...@@ -1681,6 +1713,7 @@ DocRef::DocRef(DocNode *parent,const QString &target) : ...@@ -1681,6 +1713,7 @@ DocRef::DocRef(DocNode *parent,const QString &target) :
} }
else // oops, bogus target else // oops, bogus target
{ {
m_text = linkToText(target,FALSE);
warn_doc_error(g_fileName,doctokenizerYYlineno,"Warning: unable to resolve reference to `%s' for \\ref command", warn_doc_error(g_fileName,doctokenizerYYlineno,"Warning: unable to resolve reference to `%s' for \\ref command",
target.data()); target.data());
} }
...@@ -2150,7 +2183,7 @@ int DocInternal::parse(int level) ...@@ -2150,7 +2183,7 @@ int DocInternal::parse(int level)
DBG(("DocInternal::parse() start\n")); DBG(("DocInternal::parse() start\n"));
// first parse any number of paragraphs // first parse any number of paragraphs
bool isFirst=FALSE; bool isFirst=TRUE;
DocPara *lastPar=0; DocPara *lastPar=0;
do do
{ {
...@@ -2347,7 +2380,7 @@ int DocHtmlCell::parse() ...@@ -2347,7 +2380,7 @@ int DocHtmlCell::parse()
DBG(("DocHtmlCell::parse() start\n")); DBG(("DocHtmlCell::parse() start\n"));
// parse one or more paragraphs // parse one or more paragraphs
bool isFirst=FALSE; bool isFirst=TRUE;
DocPara *par=0; DocPara *par=0;
do do
{ {
...@@ -2680,7 +2713,7 @@ int DocHtmlDescData::parse() ...@@ -2680,7 +2713,7 @@ int DocHtmlDescData::parse()
g_nodeStack.push(this); g_nodeStack.push(this);
DBG(("DocHtmlDescData::parse() start\n")); DBG(("DocHtmlDescData::parse() start\n"));
bool isFirst=FALSE; bool isFirst=TRUE;
DocPara *par=0; DocPara *par=0;
do do
{ {
...@@ -2778,7 +2811,7 @@ int DocHtmlListItem::parse() ...@@ -2778,7 +2811,7 @@ int DocHtmlListItem::parse()
g_nodeStack.push(this); g_nodeStack.push(this);
// parse one or more paragraphs // parse one or more paragraphs
bool isFirst=FALSE; bool isFirst=TRUE;
DocPara *par=0; DocPara *par=0;
do do
{ {
...@@ -4444,7 +4477,7 @@ int DocSection::parse() ...@@ -4444,7 +4477,7 @@ int DocSection::parse()
} }
// first parse any number of paragraphs // first parse any number of paragraphs
bool isFirst=FALSE; bool isFirst=TRUE;
DocPara *lastPar=0; DocPara *lastPar=0;
do do
{ {
...@@ -4634,7 +4667,7 @@ void DocRoot::parse() ...@@ -4634,7 +4667,7 @@ void DocRoot::parse()
int retval=0; int retval=0;
// first parse any number of paragraphs // first parse any number of paragraphs
bool isFirst=FALSE; bool isFirst=TRUE;
DocPara *lastPar=0; DocPara *lastPar=0;
do do
{ {
...@@ -4703,16 +4736,103 @@ void DocRoot::parse() ...@@ -4703,16 +4736,103 @@ void DocRoot::parse()
//-------------------------------------------------------------------------- //--------------------------------------------------------------------------
DocNode *validatingParseDoc(const char *fileName,int startLine, DocNode *validatingParseDoc(const char *fileName,int startLine,
const char *context,MemberDef *md, Definition *ctx,MemberDef *md,
const char *input,bool isExample, const char *input,bool indexWords,
const char *exampleName) bool isExample, const char *exampleName)
{ {
//printf("validatingParseDoc(%s,%s)\n",ctx?ctx->name().data():"<none>",
// md?md->name().data():"<none>");
//printf("========== validating %s at line %d\n",fileName,startLine); //printf("========== validating %s at line %d\n",fileName,startLine);
//printf("---------------- input --------------------\n%s\n----------- end input -------------------\n",input); //printf("---------------- input --------------------\n%s\n----------- end input -------------------\n",input);
g_token = new TokenInfo; g_token = new TokenInfo;
g_context = context; if (ctx &&
(ctx->definitionType()==Definition::TypeClass ||
ctx->definitionType()==Definition::TypeNamespace
)
)
{
g_context = ctx->name();
}
else
{
g_context = "";
}
if (indexWords && md && Config_getBool("SEARCHENGINE"))
{
g_searchUrl=md->getOutputFileBase()+
Config_getString("HTML_FILE_EXTENSION")+"#"+md->anchor();
Doxygen::searchIndex->setCurrentDoc(
theTranslator->trMember(TRUE,TRUE)+" "+md->qualifiedName(),
g_searchUrl);
}
else if (indexWords && ctx && Config_getBool("SEARCHENGINE"))
{
g_searchUrl=ctx->getOutputFileBase()+
Config_getString("HTML_FILE_EXTENSION");
QCString name = ctx->qualifiedName();
if (Config_getBool("OPTIMIZE_OUTPUT_JAVA"))
{
name = substitute(name,"::",".");
}
switch (ctx->definitionType())
{
case Definition::TypePage:
{
PageDef *pd = (PageDef *)ctx;
if (!pd->title().isEmpty())
{
name = theTranslator->trPage(TRUE,TRUE)+" "+pd->title();
}
else
{
name = theTranslator->trPage(TRUE,TRUE)+" "+pd->name();
}
}
break;
case Definition::TypeClass:
{
ClassDef *cd = (ClassDef *)ctx;
name.prepend(cd->compoundTypeString()+" ");
}
break;
case Definition::TypeNamespace:
{
if (Config_getBool("OPTIMIZE_OUTPUT_JAVA"))
{
name = theTranslator->trPackage(name);
}
else
{
name.prepend(theTranslator->trNamespace(TRUE,TRUE)+" ");
}
}
break;
case Definition::TypeGroup:
{
GroupDef *gd = (GroupDef *)ctx;
if (gd->groupTitle())
{
name = theTranslator->trGroup(TRUE,TRUE)+" "+gd->groupTitle();
}
else
{
name.prepend(theTranslator->trGroup(TRUE,TRUE)+" ");
}
}
break;
default:
break;
}
Doxygen::searchIndex->setCurrentDoc(name,g_searchUrl);
}
else
{
g_searchUrl="";
}
g_fileName = fileName; g_fileName = fileName;
g_memberDef = md; g_memberDef = md;
g_nodeStack.clear(); g_nodeStack.clear();
...@@ -4779,6 +4899,7 @@ DocNode *validatingParseText(const char *input) ...@@ -4779,6 +4899,7 @@ DocNode *validatingParseText(const char *input)
g_hasParamCommand = FALSE; g_hasParamCommand = FALSE;
g_paramsFound.setAutoDelete(FALSE); g_paramsFound.setAutoDelete(FALSE);
g_paramsFound.clear(); g_paramsFound.clear();
g_searchUrl="";
doctokenizerYYlineno=1; doctokenizerYYlineno=1;
doctokenizerYYinit(input,g_fileName); doctokenizerYYinit(input,g_fileName);
...@@ -4808,3 +4929,14 @@ void docFindSections(const char *input, ...@@ -4808,3 +4929,14 @@ void docFindSections(const char *input,
doctokenizerYYFindSections(input,d,mg,fileName); doctokenizerYYFindSections(input,d,mg,fileName);
} }
void initDocParser()
{
if (Config_getBool("SEARCHENGINE"))
{
Doxygen::searchIndex = new SearchIndex;
}
else
{
Doxygen::searchIndex = 0;
}
}
...@@ -36,24 +36,28 @@ class SectionDict; ...@@ -36,24 +36,28 @@ class SectionDict;
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
/*! Initialize the documentation parser */
void initDocParser();
/*! Main entry point for the documentation parser. /*! Main entry point for the documentation parser.
* @param fileName File in which the documentation block is found (or the * @param fileName File in which the documentation block is found (or the
* name of the example file in case isExample is TRUE). * name of the example file in case isExample is TRUE).
* @param startLine Line at which the documentation block is found. * @param startLine Line at which the documentation block is found.
* @param context Class or namespace in which of the item to which this * @param context Class or namespace to which this block belongs.
* block belongs.
* @param md Member definition to which the documentation belongs. * @param md Member definition to which the documentation belongs.
* Can be 0. * Can be 0.
* @param input String representation of the documentation block. * @param input String representation of the documentation block.
* @param indexWords Indicates whether or not words should be put in the
* search index.
* @param isExample TRUE if the documentation belongs to an example. * @param isExample TRUE if the documentation belongs to an example.
* @param exampleName Base name of the example file (0 if isExample is FALSE). * @param exampleName Base name of the example file (0 if isExample is FALSE).
* @returns Root node of the abstract syntax tree. Ownership of the * @returns Root node of the abstract syntax tree. Ownership of the
* pointer is handed over to the caller. * pointer is handed over to the caller.
*/ */
DocNode *validatingParseDoc(const char *fileName,int startLine, DocNode *validatingParseDoc(const char *fileName,int startLine,
const char *context, MemberDef *md, Definition *context, MemberDef *md,
const char *input,bool isExample, const char *input,bool indexWords,
const char *exampleName=0); bool isExample,const char *exampleName=0);
/*! Main entry point for parsing simple text fragments. These /*! Main entry point for parsing simple text fragments. These
* fragments are limited to words, whitespace and symbols. * fragments are limited to words, whitespace and symbols.
...@@ -176,8 +180,7 @@ template<class T> class CompAccept ...@@ -176,8 +180,7 @@ template<class T> class CompAccept
class DocWord : public DocNode class DocWord : public DocNode
{ {
public: public:
DocWord(DocNode *parent,const QString &word) : DocWord(DocNode *parent,const QString &word);
m_parent(parent), m_word(word) {}
QString word() const { return m_word; } QString word() const { return m_word; }
Kind kind() const { return Kind_Word; } Kind kind() const { return Kind_Word; }
DocNode *parent() const { return m_parent; } DocNode *parent() const { return m_parent; }
...@@ -195,9 +198,7 @@ class DocLinkedWord : public DocNode ...@@ -195,9 +198,7 @@ class DocLinkedWord : public DocNode
public: public:
DocLinkedWord(DocNode *parent,const QString &word, DocLinkedWord(DocNode *parent,const QString &word,
const QString &ref,const QString &file, const QString &ref,const QString &file,
const QString &anchor) : const QString &anchor);
m_parent(parent), m_word(word), m_ref(ref),
m_file(file), m_anchor(anchor) {}
QString word() const { return m_word; } QString word() const { return m_word; }
Kind kind() const { return Kind_Word; } Kind kind() const { return Kind_Word; }
DocNode *parent() const { return m_parent; } DocNode *parent() const { return m_parent; }
...@@ -312,7 +313,7 @@ class DocSymbol : public DocNode ...@@ -312,7 +313,7 @@ class DocSymbol : public DocNode
public: public:
enum SymType { Unknown=0, BSlash,At,Less,Greater,Amp,Dollar,Hash,Percent, enum SymType { Unknown=0, BSlash,At,Less,Greater,Amp,Dollar,Hash,Percent,
Copy, Tm, Reg, Apos, Quot, Uml, Acute, Grave, Circ, Tilde, Szlig, Copy, Tm, Reg, Apos, Quot, Uml, Acute, Grave, Circ, Tilde, Szlig,
Cedil, Ring, Nbsp Cedil, Ring, Nbsp, Slash
}; };
DocSymbol(DocNode *parent,SymType s,char letter='\0') : DocSymbol(DocNode *parent,SymType s,char letter='\0') :
m_parent(parent), m_symbol(s), m_letter(letter) {} m_parent(parent), m_symbol(s), m_letter(letter) {}
...@@ -923,6 +924,7 @@ class DocPara : public CompAccept<DocPara>, public DocNode ...@@ -923,6 +924,7 @@ class DocPara : public CompAccept<DocPara>, public DocNode
void markLast(bool v=TRUE) { m_isLast=v; } void markLast(bool v=TRUE) { m_isLast=v; }
bool isFirst() const { return m_isFirst; } bool isFirst() const { return m_isFirst; }
bool isLast() const { return m_isLast; } bool isLast() const { return m_isLast; }
const QList<DocNode> &children() const { return m_children; }
int handleCommand(const QString &cmdName); int handleCommand(const QString &cmdName);
int handleHtmlStartTag(const QString &tagName,const HtmlAttribList &tagHtmlAttribs); int handleHtmlStartTag(const QString &tagName,const HtmlAttribList &tagHtmlAttribs);
......
This diff is collapsed.
...@@ -39,6 +39,7 @@ ...@@ -39,6 +39,7 @@
class PageSList; class PageSList;
class PageSDict; class PageSDict;
class PageDef; class PageDef;
class SearchIndex;
typedef QList<QCString> StringList; typedef QList<QCString> StringList;
typedef QDict<FileDef> FileDict; typedef QDict<FileDef> FileDict;
...@@ -97,6 +98,7 @@ class Doxygen ...@@ -97,6 +98,7 @@ class Doxygen
static bool parseSourcesNeeded; static bool parseSourcesNeeded;
static double sysElapsedTime; static double sysElapsedTime;
static QTime runningTime; static QTime runningTime;
static SearchIndex *searchIndex;
}; };
void initDoxygen(); void initDoxygen();
......
This diff is collapsed.
#
#
#
# Copyright (C) 1997-2003 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.
TEMPLATE = app.t
CONFIG = console warn_on $extraopts
SOURCES = doxysearch.cpp
TARGET = ../bin/doxysearch
OBJECTS_DIR = ../objects
win32-g++:TMAKE_CXXFLAGS += -fno-exceptions -fno-rtti
...@@ -32,8 +32,8 @@ ...@@ -32,8 +32,8 @@
#include <qdir.h> #include <qdir.h>
#include "version.h" #include "version.h"
#include "suffixtree.h" //#include "suffixtree.h"
#include "searchindex.h" //#include "searchindex.h"
#include "logos.h" #include "logos.h"
static QCString convertToXML(const char *s) static QCString convertToXML(const char *s)
...@@ -95,7 +95,7 @@ static QCString docBaseLink; ...@@ -95,7 +95,7 @@ static QCString docBaseLink;
static QCString docAnchor; static QCString docAnchor;
static QCString docRefName; static QCString docRefName;
static bool nameBug; static bool nameBug;
static SearchIndex searchIndex; //static SearchIndex searchIndex;
#define YY_NEVER_INTERACTIVE 1 #define YY_NEVER_INTERACTIVE 1
...@@ -162,14 +162,14 @@ static void addReference() ...@@ -162,14 +162,14 @@ static void addReference()
{ {
//printf("addReference() key: %s ref:%s\n", //printf("addReference() key: %s ref:%s\n",
// docRefName.data(),(docBaseLink+"#"+docAnchor).data()); // docRefName.data(),(docBaseLink+"#"+docAnchor).data());
if (genIndex && !docRefName.isEmpty() && !docBaseLink.isEmpty()) //if (genIndex && !docRefName.isEmpty() && !docBaseLink.isEmpty())
{ //{
if (docAnchor.isEmpty()) // if (docAnchor.isEmpty())
searchIndex.addReference(docRefName,docBaseLink); // searchIndex.addReference(docRefName,docBaseLink);
else // else
searchIndex.addReference(docRefName,docBaseLink+"#"+docAnchor); // searchIndex.addReference(docRefName,docBaseLink+"#"+docAnchor);
searchIndex.addWord(docRefName,docRefName,TRUE); // searchIndex.addWord(docRefName,docRefName,TRUE);
} //}
} }
QCString unhtmlify(const char *str) QCString unhtmlify(const char *str)
...@@ -247,10 +247,10 @@ QCString unhtmlify(const char *str) ...@@ -247,10 +247,10 @@ QCString unhtmlify(const char *str)
//printf("tag: %s#%s ref: %s word: `%s'\n", //printf("tag: %s#%s ref: %s word: `%s'\n",
// docBaseLink.data(),docAnchor.data(), // docBaseLink.data(),docAnchor.data(),
// docRefName.data(),yytext); // docRefName.data(),yytext);
if (genIndex && !docRefName.isEmpty() && yyleng>2) //if (genIndex && !docRefName.isEmpty() && yyleng>2)
searchIndex.addWord(docRefName, // searchIndex.addWord(docRefName,
yytext,FALSE // yytext,FALSE
); // );
} }
<SkipPreformated>"</pre>" { <SkipPreformated>"</pre>" {
BEGIN( Start ); BEGIN( Start );
...@@ -458,8 +458,8 @@ void parseFile(QFileInfo &fi) ...@@ -458,8 +458,8 @@ void parseFile(QFileInfo &fi)
QCString input(fi.size()+1); QCString input(fi.size()+1);
docBaseLink=fi.fileName(); docBaseLink=fi.fileName();
docRefName=fi.fileName().copy(); docRefName=fi.fileName().copy();
searchIndex.addReference(docRefName,docBaseLink); //searchIndex.addReference(docRefName,docBaseLink);
searchIndex.addWord(docRefName,docRefName,TRUE); //searchIndex.addWord(docRefName,docRefName,TRUE);
f.readBlock(input.data(),fi.size()); f.readBlock(input.data(),fi.size());
input.at(fi.size())='\0'; input.at(fi.size())='\0';
parse(input); parse(input);
...@@ -584,46 +584,48 @@ int main(int argc,char **argv) ...@@ -584,46 +584,48 @@ int main(int argc,char **argv)
} }
if (genIndex) if (genIndex)
{ {
//printf("Writing search index\n"); fprintf(stderr,"Error: doxytag cannot be used to generate a search index anymore.\n"
if (!searchIndex.saveIndex(indexName)) "This functionality has been integrated into doxygen.\n");
{ // printf("Writing search index\n");
fprintf(stderr,"Error: Could not write search index\n"); // if (!searchIndex.saveIndex(indexName))
} // {
QFileInfo fi(indexName); // fprintf(stderr,"Error: Could not write search index\n");
if (fi.exists()) // }
{ // QFileInfo fi(indexName);
QCString dir=convertToQCString(fi.dir().absPath()); // if (fi.exists())
fi.setFile(dir+"/search.png"); // {
if (!fi.exists()) writeSearchButton(dir); // QCString dir=convertToQCString(fi.dir().absPath());
fi.setFile(dir+"/doxygen.png"); // fi.setFile(dir+"/search.png");
if (!fi.exists()) writeLogo(dir); // if (!fi.exists()) writeSearchButton(dir);
fi.setFile(dir+"/search.cgi"); // fi.setFile(dir+"/doxygen.png");
if (!fi.exists()) // if (!fi.exists()) writeLogo(dir);
{ // fi.setFile(dir+"/search.cgi");
QFile f; // if (!fi.exists())
f.setName(dir+"/search.cgi"); // {
if (f.open(IO_WriteOnly)) // QFile f;
{ // f.setName(dir+"/search.cgi");
QTextStream t(&f); // if (f.open(IO_WriteOnly))
t << "#!/bin/sh" << endl // {
<< "DOXYSEARCH=" << endl // QTextStream t(&f);
<< "DOXYPATH=" << endl // t << "#!/bin/sh" << endl
<< "if [ -f $DOXYSEARCH ]" << endl // << "DOXYSEARCH=" << endl
<< "then" << endl // << "DOXYPATH=" << endl
<< " $DOXYSEARCH $DOXYPATH" << endl // << "if [ -f $DOXYSEARCH ]" << endl
<< "else" << endl // << "then" << endl
<< " echo \"Content-Type: text/html\"" << endl // << " $DOXYSEARCH $DOXYPATH" << endl
<< " echo \"\"" << endl // << "else" << endl
<< " echo \"<H1>Error: $DOXYSEARCH not found. Check cgi script!\"" << endl // << " echo \"Content-Type: text/html\"" << endl
<< "fi" << endl; // << " echo \"\"" << endl
f.close(); // << " echo \"<H1>Error: $DOXYSEARCH not found. Check cgi script!\"" << endl
} // << "fi" << endl;
else // f.close();
{ // }
fprintf(stderr,"Error: could not open file %s for writing\n",(dir+"/search.cgi").data()); // else
} // {
} // fprintf(stderr,"Error: could not open file %s for writing\n",(dir+"/search.cgi").data());
} // }
// }
// }
} }
if (genTag) if (genTag)
{ {
......
...@@ -16,9 +16,8 @@ ...@@ -16,9 +16,8 @@
TEMPLATE = doxytag.t TEMPLATE = doxytag.t
CONFIG = console warn_on $extraopts CONFIG = console warn_on $extraopts
HEADERS = suffixtree.h searchindex.h logos.h version.h HEADERS = logos.h version.h
SOURCES = doxytag.cpp suffixtree.cpp searchindex.cpp \ SOURCES = doxytag.cpp logos.cpp version.cpp
logos.cpp version.cpp
unix:LIBS += -L../lib -lqtools unix:LIBS += -L../lib -lqtools
win32:INCLUDEPATH += . win32:INCLUDEPATH += .
win32-mingw:LIBS += -L../lib -lqtools win32-mingw:LIBS += -L../lib -lqtools
......
...@@ -135,9 +135,9 @@ struct Grouping ...@@ -135,9 +135,9 @@ struct Grouping
{ {
GROUPING_LOWEST, GROUPING_LOWEST,
GROUPING_AUTO_WEAK = GROUPING_AUTO_WEAK =
GROUPING_LOWEST, //!< membership in group was defined via \@weakgroup \@{ \@} GROUPING_LOWEST, //!< membership in group was defined via \@weakgroup
GROUPING_AUTO_ADD, //!< membership in group was defined via \@add[to]group \@{ \@} GROUPING_AUTO_ADD, //!< membership in group was defined via \@add[to]group
GROUPING_AUTO_DEF, //!< membership in group was defined via \@defgroup \@{ \@} GROUPING_AUTO_DEF, //!< membership in group was defined via \@defgroup
GROUPING_AUTO_HIGHEST = GROUPING_AUTO_DEF, GROUPING_AUTO_HIGHEST = GROUPING_AUTO_DEF,
GROUPING_INGROUP, //!< membership in group was defined by \@ingroup GROUPING_INGROUP, //!< membership in group was defined by \@ingroup
GROUPING_HIGHEST = GROUPING_INGROUP GROUPING_HIGHEST = GROUPING_INGROUP
......
...@@ -30,6 +30,7 @@ ...@@ -30,6 +30,7 @@
#include "message.h" #include "message.h"
#include "code.h" #include "code.h"
#include "docparser.h" #include "docparser.h"
#include "ftvhelp.h"
//#include "xml.h" //#include "xml.h"
class DevNullCodeDocInterface : public BaseCodeDocInterface class DevNullCodeDocInterface : public BaseCodeDocInterface
...@@ -159,7 +160,7 @@ void FileDef::writeDetailedDocumentation(OutputList &ol) ...@@ -159,7 +160,7 @@ void FileDef::writeDetailedDocumentation(OutputList &ol)
ol.endGroupHeader(); ol.endGroupHeader();
if (!briefDescription().isEmpty() && Config_getBool("REPEAT_BRIEF")) if (!briefDescription().isEmpty() && Config_getBool("REPEAT_BRIEF"))
{ {
ol.parseDoc(briefFile(),briefLine(),0,0,briefDescription(),FALSE); ol.parseDoc(briefFile(),briefLine(),this,0,briefDescription(),FALSE,FALSE);
} }
if (!briefDescription().isEmpty() && Config_getBool("REPEAT_BRIEF") && if (!briefDescription().isEmpty() && Config_getBool("REPEAT_BRIEF") &&
!documentation().isEmpty()) !documentation().isEmpty())
...@@ -176,7 +177,7 @@ void FileDef::writeDetailedDocumentation(OutputList &ol) ...@@ -176,7 +177,7 @@ void FileDef::writeDetailedDocumentation(OutputList &ol)
{ {
//if (doc.at(dl-1)!='.' && doc.at(dl-1)!='!' && doc.at(dl-1)!='?') //if (doc.at(dl-1)!='.' && doc.at(dl-1)!='!' && doc.at(dl-1)!='?')
// doc+='.'; // doc+='.';
ol.parseDoc(docFile(),docLine(),0,0,documentation()+"\n",FALSE); ol.parseDoc(docFile(),docLine(),this,0,documentation()+"\n",TRUE,FALSE);
} }
//printf("Writing source ref for file %s\n",name().data()); //printf("Writing source ref for file %s\n",name().data());
if (Config_getBool("SOURCE_BROWSER")) if (Config_getBool("SOURCE_BROWSER"))
...@@ -237,7 +238,7 @@ void FileDef::writeDocumentation(OutputList &ol) ...@@ -237,7 +238,7 @@ void FileDef::writeDocumentation(OutputList &ol)
} }
else if (briefDescription()) else if (briefDescription())
{ {
ol.parseDoc(briefFile(),briefLine(),0,0,briefDescription(),FALSE); ol.parseDoc(briefFile(),briefLine(),this,0,briefDescription(),TRUE,FALSE);
ol.writeString(" \n"); ol.writeString(" \n");
ol.disableAllBut(OutputGenerator::Html); ol.disableAllBut(OutputGenerator::Html);
ol.startTextLink(0,"_details"); ol.startTextLink(0,"_details");
...@@ -779,3 +780,217 @@ void FileDef::addListReferences() ...@@ -779,3 +780,217 @@ void FileDef::addListReferences()
docVarMembers.addListReferences(this); docVarMembers.addListReferences(this);
} }
//-------------------------------------------------------------------
static int findMatchingPart(const QCString &path,const QCString dir)
{
int si1;
int pos1=0,pos2=0;
while ((si1=path.find('/',pos1))!=-1)
{
int si2=dir.find('/',pos2);
//printf(" found slash at pos %d in path %d: %s<->%s\n",si1,si2,
// path.mid(pos1,si1-pos2).data(),dir.mid(pos2).data());
if (si2==-1 && path.mid(pos1,si1-pos2)==dir.mid(pos2)) // match at end
{
return dir.length();
}
if (si1!=si2 || path.mid(pos1,si1-pos2)!=dir.mid(pos2,si2-pos2)) // no match in middle
{
return QMAX(pos1-1,0);
}
pos1=si1+1;
pos2=si2+1;
}
return 0;
}
static Directory *findDirNode(Directory *root,const QCString &name)
{
QListIterator<DirEntry> dli(root->children());
DirEntry *de;
for (dli.toFirst();(de=dli.current());++dli)
{
if (de->kind()==DirEntry::Dir)
{
Directory *dir = (Directory *)de;
QCString dirName=dir->name();
int sp=findMatchingPart(name,dirName);
//printf("findMatchingPart(%s,%s)=%d\n",name.data(),dirName.data(),sp);
if (sp>0) // match found
{
if ((uint)sp==dirName.length()) // whole directory matches
{
// recurse into the directory
return findDirNode(dir,name.mid(dirName.length()+1));
}
else // partial match => we need to split the path into three parts
{
QCString baseName =dirName.left(sp);
QCString oldBranchName=dirName.mid(sp+1);
QCString newBranchName=name.mid(sp+1);
// strip file name from path
int newIndex=newBranchName.findRev('/');
if (newIndex>0) newBranchName=newBranchName.left(newIndex);
//printf("Splitting off part in new branch \n"
// "base=%s old=%s new=%s\n",
// baseName.data(),
// oldBranchName.data(),
// newBranchName.data()
// );
Directory *base = new Directory(root,baseName);
Directory *newBranch = new Directory(base,newBranchName);
dir->reParent(base);
dir->rename(oldBranchName);
base->addChild(dir);
base->addChild(newBranch);
dir->setLast(FALSE);
// remove DirEntry container from list (without deleting it)
root->children().setAutoDelete(FALSE);
root->children().removeRef(dir);
root->children().setAutoDelete(TRUE);
// add new branch to the root
if (!root->children().isEmpty())
{
root->children().last()->setLast(FALSE);
}
root->addChild(base);
return newBranch;
}
}
}
}
int si=name.findRev('/');
if (si==-1) // no subdir
{
return root; // put the file under the root node.
}
else // need to create a subdir
{
QCString baseName = name.left(si);
//printf("new subdir %s\n",baseName.data());
Directory *newBranch = new Directory(root,baseName);
if (!root->children().isEmpty())
{
root->children().last()->setLast(FALSE);
}
root->addChild(newBranch);
return newBranch;
}
}
static void mergeFileDef(Directory *root,FileDef *fd)
{
QCString rootPath = root->name();
QCString filePath = fd->absFilePath();
//printf("merging %s\n",filePath.data());
Directory *dirNode = findDirNode(root,filePath);
if (!dirNode->children().isEmpty())
{
dirNode->children().last()->setLast(FALSE);
}
DirEntry *e=new DirEntry(dirNode,fd);
dirNode->addChild(e);
}
static void generateIndent(QTextStream &t,DirEntry *de,int level)
{
if (de->parent())
{
generateIndent(t,de->parent(),level+1);
}
// from the root up to node n do...
if (level==0) // item before a dir or document
{
if (de->isLast())
{
if (de->kind()==DirEntry::Dir)
{
t << "<img " << FTV_IMGATTRIBS(plastnode) << "/>";
}
else
{
t << "<img " << FTV_IMGATTRIBS(lastnode) << "/>";
}
}
else
{
if (de->kind()==DirEntry::Dir)
{
t << "<img " << FTV_IMGATTRIBS(pnode) << "/>";
}
else
{
t << "<img " << FTV_IMGATTRIBS(node) << "/>";
}
}
}
else // item at another level
{
if (de->isLast())
{
t << "<img " << FTV_IMGATTRIBS(blank) << "/>";
}
else
{
t << "<img " << FTV_IMGATTRIBS(vertline) << "/>";
}
}
}
static void writeDirTreeNode(QTextStream &t,Directory *root,int level)
{
QCString indent;
indent.fill(' ',level*2);
QListIterator<DirEntry> dli(root->children());
DirEntry *de;
for (dli.toFirst();(de=dli.current());++dli)
{
t << indent << "<p>";
generateIndent(t,de,0);
if (de->kind()==DirEntry::Dir)
{
Directory *dir=(Directory *)de;
//printf("%s [dir]: %s (last=%d,dir=%d)\n",indent.data(),dir->name().data(),dir->isLast(),dir->kind()==DirEntry::Dir);
t << "<img " << FTV_IMGATTRIBS(folderclosed) << "/>";
t << dir->name();
t << "</p>\n";
t << indent << "<div>\n";
writeDirTreeNode(t,dir,level+1);
t << indent << "</div>\n";
}
else
{
//printf("%s [file]: %s (last=%d,dir=%d)\n",indent.data(),de->file()->name().data(),de->isLast(),de->kind()==DirEntry::Dir);
t << "<img " << FTV_IMGATTRIBS(doc) << "/>";
t << de->file()->name();
t << "</p>\n";
}
}
}
void generateFileTree(QTextStream &t)
{
FTVHelp::generateTreeViewImages();
Directory *root=new Directory(0,"");
root->setLast(TRUE);
FileNameListIterator fnli(Doxygen::inputNameList);
FileName *fn;
for (fnli.toFirst();(fn=fnli.current());++fnli)
{
FileNameIterator fni(*fn);
FileDef *fd;
for (;(fd=fni.current());++fni)
{
mergeFileDef(root,fd);
}
}
t << "<div class=\"directory\">\n";
writeDirTreeNode(t,root,0);
t << "</div>\n";
delete root;
}
...@@ -241,4 +241,51 @@ class OutputNameDict : public QDict<FileList> ...@@ -241,4 +241,51 @@ class OutputNameDict : public QDict<FileList>
~OutputNameDict() {} ~OutputNameDict() {}
}; };
class Directory;
class DirEntry
{
public:
enum EntryKind { Dir, File };
DirEntry::DirEntry(DirEntry *parent,FileDef *fd)
: m_parent(parent), m_kind(File), m_fd(fd), m_isLast(FALSE) { }
DirEntry::DirEntry(DirEntry *parent)
: m_parent(parent), m_kind(Dir), m_fd(0), m_isLast(FALSE) { }
virtual ~DirEntry() { }
EntryKind kind() const { return m_kind; }
FileDef *file() const { return m_fd; }
bool isLast() const { return m_isLast; }
void setLast(bool b) { m_isLast=b; }
DirEntry *parent() const { return m_parent; }
protected:
DirEntry *m_parent;
private:
EntryKind m_kind;
FileDef *m_fd;
int num;
bool m_isLast;
};
class Directory : public DirEntry
{
public:
Directory(Directory *parent,const QCString &name)
: DirEntry(parent), m_name(name)
{ m_children.setAutoDelete(TRUE); }
virtual ~Directory() {}
void addChild(DirEntry *d) { m_children.append(d); d->setLast(TRUE); }
QList<DirEntry> &children() { return m_children; }
void rename(const QCString &name) { m_name=name; }
void reParent(Directory *parent) { m_parent=parent; }
QCString name() const { return m_name; }
private:
QCString m_name;
QList<DirEntry> m_children;
};
void generateFileTree(QTextStream &t);
#endif #endif
...@@ -291,65 +291,23 @@ unsigned char ftv2vertline_png[] = { ...@@ -291,65 +291,23 @@ unsigned char ftv2vertline_png[] = {
}; };
struct ImageInfo FTVImageInfo image_info[] =
{
const char *alt;
const char *name;
const unsigned char *data;
unsigned int len;
unsigned short width, height;
} image_info[] =
{ {
{ "&nbsp;", "ftv2blank.png",ftv2blank_png,174,16,22 }, { "&nbsp;", "ftv2blank.png",ftv2blank_png,174,16,22 },
#define FTVIMG_blank 0 { "*", "ftv2doc.png",ftv2doc_png,255,24,22 },
{ "+", "ftv2folderclosed.png",ftv2folderclosed_png,259,24,22 },
{ "*", "ftv2doc.png",ftv2doc_png,255,24,22 }, { "-", "ftv2folderopen.png",ftv2folderopen_png,261,24,22 },
#define FTVIMG_doc 1
{ "+", "ftv2folderclosed.png",ftv2folderclosed_png,259,24,22 },
#define FTVIMG_folderclosed 2
{ "-", "ftv2folderopen.png",ftv2folderopen_png,261,24,22 },
#define FTVIMG_folderopen 3
{ "\\", "ftv2lastnode.png",ftv2lastnode_png,233,16,22 }, { "\\", "ftv2lastnode.png",ftv2lastnode_png,233,16,22 },
#define FTVIMG_lastnode 4 { "-", "ftv2link.png",ftv2link_png,358,24,22 },
{ "-", "ftv2link.png",ftv2link_png,358,24,22 },
#define FTVIMG_link 5
{ "\\", "ftv2mlastnode.png",ftv2mlastnode_png,160,16,22 }, { "\\", "ftv2mlastnode.png",ftv2mlastnode_png,160,16,22 },
#define FTVIMG_mlastnode 6 { "o", "ftv2mnode.png",ftv2mnode_png,194,16,22 },
{ "o", "ftv2node.png",ftv2node_png,235,16,22 },
{ "o", "ftv2mnode.png",ftv2mnode_png,194,16,22 },
#define FTVIMG_mnode 7
{ "o", "ftv2node.png",ftv2node_png,235,16,22 },
#define FTVIMG_node 8
{ "\\", "ftv2plastnode.png",ftv2plastnode_png,165,16,22 }, { "\\", "ftv2plastnode.png",ftv2plastnode_png,165,16,22 },
#define FTVIMG_plastnode 9 { "o", "ftv2pnode.png",ftv2pnode_png,200,16,22 },
{ "|", "ftv2vertline.png",ftv2vertline_png,229,16,22 },
{ "o", "ftv2pnode.png",ftv2pnode_png,200,16,22 },
#define FTVIMG_pnode 10
{ "|", "ftv2vertline.png",ftv2vertline_png,229,16,22 },
#define FTVIMG_vertline 11
{ 0,0,0,0,0,0 } { 0,0,0,0,0,0 }
#define FTVIMG_UNUSED 12
}; };
#define _S(nym) #nym
#define FTV_ICON_FILE(nym) "ftv2" _S(nym) ".png"
#define FTVIMG_INDEX(nym) FTVIMG_ ## nym
#define _INFO(nym) ( image_info[FTVIMG_INDEX(nym)] )
#define IMG_PREAMBLE(nym) \
"<img src=\"" FTV_ICON_FILE(nym) "\" " \
"alt=\"" << _INFO(nym).alt << "\" " \
"width=" << _INFO(nym).width << " " \
"height=" << _INFO(nym).height << " "
struct FTVNode struct FTVNode
{ {
FTVNode(bool dir,const char *r,const char *f,const char *a,const char *n) FTVNode(bool dir,const char *r,const char *f,const char *a,const char *n)
...@@ -410,11 +368,7 @@ void FTVHelp::initialize() ...@@ -410,11 +368,7 @@ void FTVHelp::initialize()
*/ */
void FTVHelp::finalize() void FTVHelp::finalize()
{ {
//m_cts.unsetDevice();
//m_cf->close();
//delete m_cf;
generateTreeView(); generateTreeView();
//generateFolderTreeViewData();
} }
/*! Increase the level of the contents hierarchy. /*! Increase the level of the contents hierarchy.
...@@ -496,22 +450,22 @@ void FTVHelp::generateIndent(QTextStream &t, FTVNode *n,int level) ...@@ -496,22 +450,22 @@ void FTVHelp::generateIndent(QTextStream &t, FTVNode *n,int level)
{ {
if (n->isDir) if (n->isDir)
{ {
t << IMG_PREAMBLE(plastnode) << "onclick=\"toggleFolder('folder" << folderId << "', this)\"/>"; t << "<img " << FTV_IMGATTRIBS(plastnode) << "onclick=\"toggleFolder('folder" << folderId << "', this)\"/>";
} }
else else
{ {
t << IMG_PREAMBLE(lastnode) << "/>"; t << "<img " << FTV_IMGATTRIBS(lastnode) << "/>";
} }
} }
else else
{ {
if (n->isDir) if (n->isDir)
{ {
t << IMG_PREAMBLE(pnode) << "onclick=\"toggleFolder('folder" << folderId << "', this)\"/>"; t << "<img " << FTV_IMGATTRIBS(pnode) << "onclick=\"toggleFolder('folder" << folderId << "', this)\"/>";
} }
else else
{ {
t << IMG_PREAMBLE(node) << "/>"; t << "<img " << FTV_IMGATTRIBS(node) << "/>";
} }
} }
} }
...@@ -519,11 +473,11 @@ void FTVHelp::generateIndent(QTextStream &t, FTVNode *n,int level) ...@@ -519,11 +473,11 @@ void FTVHelp::generateIndent(QTextStream &t, FTVNode *n,int level)
{ {
if (n->isLast) if (n->isLast)
{ {
t << IMG_PREAMBLE(blank) << "/>"; t << "<img " << FTV_IMGATTRIBS(blank) << "/>";
} }
else else
{ {
t << IMG_PREAMBLE(vertline) << "/>"; t << "<img " << FTV_IMGATTRIBS(vertline) << "/>";
} }
} }
} }
...@@ -579,7 +533,7 @@ void FTVHelp::generateTree(QTextStream &t, const QList<FTVNode> &nl,int level) ...@@ -579,7 +533,7 @@ void FTVHelp::generateTree(QTextStream &t, const QList<FTVNode> &nl,int level)
generateIndent(t,n,0); generateIndent(t,n,0);
if (n->isDir) if (n->isDir)
{ {
t << IMG_PREAMBLE(folderclosed) << "onclick=\"toggleFolder('folder" << folderId << "', this)\"/>"; t << "<img " << FTV_IMGATTRIBS(folderclosed) << "onclick=\"toggleFolder('folder" << folderId << "', this)\"/>";
generateLink(t,n); generateLink(t,n);
t << "</p>\n"; t << "</p>\n";
t << spaces << "<div id=\"folder" << folderId << "\">\n"; t << spaces << "<div id=\"folder" << folderId << "\">\n";
...@@ -589,13 +543,38 @@ void FTVHelp::generateTree(QTextStream &t, const QList<FTVNode> &nl,int level) ...@@ -589,13 +543,38 @@ void FTVHelp::generateTree(QTextStream &t, const QList<FTVNode> &nl,int level)
} }
else else
{ {
t << IMG_PREAMBLE(doc) << "/>"; t << "<img " << FTV_IMGATTRIBS(doc) << "/>";
generateLink(t,n); generateLink(t,n);
t << "</p>\n"; t << "</p>\n";
} }
} }
} }
void FTVHelp::generateTreeViewImages()
{
static bool done=FALSE;
if (done) return;
done=TRUE;
// Generate tree view images
FTVImageInfo *p = image_info;
while (p->name)
{
QCString fileName=Config_getString("HTML_OUTPUT")+"/"+p->name;
QFile f(fileName);
if (f.open(IO_WriteOnly))
{
f.writeBlock((char *)p->data,p->len);
}
else
{
fprintf(stderr,"Warning: Cannot open file %s for writing\n",fileName.data());
}
f.close();
p++;
}
}
void FTVHelp::generateTreeView() void FTVHelp::generateTreeView()
{ {
// Generate alternative index.html as a frame // Generate alternative index.html as a frame
...@@ -792,21 +771,7 @@ void FTVHelp::generateTreeView() ...@@ -792,21 +771,7 @@ void FTVHelp::generateTreeView()
t << " </body>\n"; t << " </body>\n";
t << "</html>\n"; t << "</html>\n";
} }
generateTreeViewImages();
// Generate tree view images
ImageInfo *p = image_info;
while (p->name)
{
QCString fileName=Config_getString("HTML_OUTPUT")+"/"+p->name;
QFile f(fileName);
if (f.open(IO_WriteOnly))
f.writeBlock((char *)p->data,p->len);
else
{
fprintf(stderr,"Warning: Cannot open file %s for writing\n",fileName.data());
}
f.close();
p++;
}
} }
...@@ -18,10 +18,41 @@ ...@@ -18,10 +18,41 @@
class QFile; class QFile;
struct FTVNode; struct FTVNode;
/*! A class that generated the FTV Help specific file. struct FTVImageInfo
* This file is used in conjunction with additional FTV web browser code {
* that can be obtained from: const char *alt;
* http://www.geocities.com/Paris/LeftBank/2178/ftexample.html const char *name;
const unsigned char *data;
unsigned int len;
unsigned short width, height;
};
extern FTVImageInfo image_info[];
#define FTVIMG_blank 0
#define FTVIMG_doc 1
#define FTVIMG_folderclosed 2
#define FTVIMG_folderopen 3
#define FTVIMG_lastnode 4
#define FTVIMG_link 5
#define FTVIMG_mlastnode 6
#define FTVIMG_mnode 7
#define FTVIMG_node 8
#define FTVIMG_plastnode 9
#define FTVIMG_pnode 10
#define FTVIMG_vertline 11
#define FTV_S(name) #name
#define FTV_ICON_FILE(name) "ftv2" FTV_S(name) ".png"
#define FTVIMG_INDEX(name) FTVIMG_ ## name
#define FTV_INFO(name) ( image_info[FTVIMG_INDEX(name)] )
#define FTV_IMGATTRIBS(name) \
"src=\"" FTV_ICON_FILE(name) "\" " \
"alt=\"" << FTV_INFO(name).alt << "\" " \
"width=" << FTV_INFO(name).width << " " \
"height=" << FTV_INFO(name).height << " "
/*! A class that generates a dynamic tree view side panel.
*/ */
class FTVHelp class FTVHelp
{ {
...@@ -38,6 +69,7 @@ class FTVHelp ...@@ -38,6 +69,7 @@ class FTVHelp
const char *file, const char *file,
const char *anchor, const char *anchor,
const char *name); const char *name);
static void generateTreeViewImages();
private: private:
void generateTreeView(); void generateTreeView();
...@@ -54,5 +86,6 @@ class FTVHelp ...@@ -54,5 +86,6 @@ class FTVHelp
int m_indent; int m_indent;
}; };
#endif /* FTVHELP_H */ #endif /* FTVHELP_H */
...@@ -389,7 +389,7 @@ void GroupDef::writeDetailedDocumentation(OutputList &ol) ...@@ -389,7 +389,7 @@ void GroupDef::writeDetailedDocumentation(OutputList &ol)
// repeat brief description // repeat brief description
if (!briefDescription().isEmpty() && Config_getBool("REPEAT_BRIEF")) if (!briefDescription().isEmpty() && Config_getBool("REPEAT_BRIEF"))
{ {
ol.parseDoc(briefFile(),briefLine(),name(),0,briefDescription(),FALSE); ol.parseDoc(briefFile(),briefLine(),this,0,briefDescription(),FALSE,FALSE);
ol.newParagraph(); ol.newParagraph();
} }
} }
...@@ -397,7 +397,7 @@ void GroupDef::writeDetailedDocumentation(OutputList &ol) ...@@ -397,7 +397,7 @@ void GroupDef::writeDetailedDocumentation(OutputList &ol)
// write documentation // write documentation
if (!documentation().isEmpty()) if (!documentation().isEmpty())
{ {
ol.parseDoc(docFile(),docLine(),name(),0,documentation()+"\n",FALSE); ol.parseDoc(docFile(),docLine(),this,0,documentation()+"\n",TRUE,FALSE);
} }
} }
} }
...@@ -420,7 +420,7 @@ void GroupDef::writeDocumentation(OutputList &ol) ...@@ -420,7 +420,7 @@ void GroupDef::writeDocumentation(OutputList &ol)
} }
else if (!briefDescription().isEmpty()) else if (!briefDescription().isEmpty())
{ {
ol.parseDoc(briefFile(),briefLine(),name(),0,briefDescription(),FALSE); ol.parseDoc(briefFile(),briefLine(),this,0,briefDescription(),TRUE,FALSE);
ol.writeString(" \n"); ol.writeString(" \n");
ol.pushGeneratorState(); ol.pushGeneratorState();
ol.disable(OutputGenerator::Latex); ol.disable(OutputGenerator::Latex);
...@@ -464,7 +464,7 @@ void GroupDef::writeDocumentation(OutputList &ol) ...@@ -464,7 +464,7 @@ void GroupDef::writeDocumentation(OutputList &ol)
if (!fd->briefDescription().isEmpty() && Config_getBool("BRIEF_MEMBER_DESC")) if (!fd->briefDescription().isEmpty() && Config_getBool("BRIEF_MEMBER_DESC"))
{ {
ol.startMemberDescription(); ol.startMemberDescription();
ol.parseDoc(briefFile(),briefLine(),0,0,fd->briefDescription(),FALSE); ol.parseDoc(briefFile(),briefLine(),fd,0,fd->briefDescription(),FALSE,FALSE);
ol.endMemberDescription(); ol.endMemberDescription();
ol.newParagraph(); ol.newParagraph();
} }
...@@ -495,7 +495,7 @@ void GroupDef::writeDocumentation(OutputList &ol) ...@@ -495,7 +495,7 @@ void GroupDef::writeDocumentation(OutputList &ol)
if (!nd->briefDescription().isEmpty() && Config_getBool("BRIEF_MEMBER_DESC")) if (!nd->briefDescription().isEmpty() && Config_getBool("BRIEF_MEMBER_DESC"))
{ {
ol.startMemberDescription(); ol.startMemberDescription();
ol.parseDoc(briefFile(),briefLine(),0,0,nd->briefDescription(),FALSE); ol.parseDoc(briefFile(),briefLine(),nd,0,nd->briefDescription(),FALSE,FALSE);
ol.endMemberDescription(); ol.endMemberDescription();
ol.newParagraph(); ol.newParagraph();
} }
...@@ -525,7 +525,7 @@ void GroupDef::writeDocumentation(OutputList &ol) ...@@ -525,7 +525,7 @@ void GroupDef::writeDocumentation(OutputList &ol)
if (!gd->briefDescription().isEmpty() && Config_getBool("BRIEF_MEMBER_DESC")) if (!gd->briefDescription().isEmpty() && Config_getBool("BRIEF_MEMBER_DESC"))
{ {
ol.startMemberDescription(); ol.startMemberDescription();
ol.parseDoc(briefFile(),briefLine(),0,0,gd->briefDescription(),FALSE); ol.parseDoc(briefFile(),briefLine(),gd,0,gd->briefDescription(),FALSE,FALSE);
ol.endMemberDescription(); ol.endMemberDescription();
ol.newParagraph(); ol.newParagraph();
} }
...@@ -585,7 +585,7 @@ void GroupDef::writeDocumentation(OutputList &ol) ...@@ -585,7 +585,7 @@ void GroupDef::writeDocumentation(OutputList &ol)
ol.endSection(si->label,SectionInfo::Subsection); ol.endSection(si->label,SectionInfo::Subsection);
} }
ol.startTextBlock(); ol.startTextBlock();
ol.parseDoc(pd->docFile(),pd->docLine(),0,0,pd->documentation(),FALSE); ol.parseDoc(pd->docFile(),pd->docLine(),pd,0,pd->documentation(),TRUE,FALSE);
ol.endTextBlock(); ol.endTextBlock();
} }
} }
......
...@@ -100,6 +100,7 @@ void HtmlDocVisitor::visit(DocSymbol *s) ...@@ -100,6 +100,7 @@ void HtmlDocVisitor::visit(DocSymbol *s)
case DocSymbol::Acute: m_t << "&" << s->letter() << "acute;"; break; case DocSymbol::Acute: m_t << "&" << s->letter() << "acute;"; break;
case DocSymbol::Grave: m_t << "&" << s->letter() << "grave;"; break; case DocSymbol::Grave: m_t << "&" << s->letter() << "grave;"; break;
case DocSymbol::Circ: m_t << "&" << s->letter() << "circ;"; break; case DocSymbol::Circ: m_t << "&" << s->letter() << "circ;"; break;
case DocSymbol::Slash: m_t << "&" << s->letter() << "slash;"; break;
case DocSymbol::Tilde: m_t << "&" << s->letter() << "tilde;"; break; case DocSymbol::Tilde: m_t << "&" << s->letter() << "tilde;"; break;
case DocSymbol::Szlig: m_t << "&szlig;"; break; case DocSymbol::Szlig: m_t << "&szlig;"; break;
case DocSymbol::Cedil: m_t << "&" << s->letter() << "cedil;"; break; case DocSymbol::Cedil: m_t << "&" << s->letter() << "cedil;"; break;
...@@ -207,7 +208,7 @@ void HtmlDocVisitor::visit(DocVerbatim *s) ...@@ -207,7 +208,7 @@ void HtmlDocVisitor::visit(DocVerbatim *s)
void HtmlDocVisitor::visit(DocAnchor *anc) void HtmlDocVisitor::visit(DocAnchor *anc)
{ {
if (m_hide) return; if (m_hide) return;
m_t << "<a name=\"" /*<< anc->file() << "#"*/ << anc->anchor() << "\"/></a>"; m_t << "<a class=\"anchor\" name=\"" << anc->anchor() << "\"></a>";
} }
void HtmlDocVisitor::visit(DocInclude *inc) void HtmlDocVisitor::visit(DocInclude *inc)
...@@ -328,6 +329,20 @@ void HtmlDocVisitor::visitPost(DocAutoListItem *) ...@@ -328,6 +329,20 @@ void HtmlDocVisitor::visitPost(DocAutoListItem *)
void HtmlDocVisitor::visitPre(DocPara *) void HtmlDocVisitor::visitPre(DocPara *)
{ {
if (m_hide) return;
// TODO:
// Paragraph should be surrounded by <p>..</p>, but
//
// A list item (li), description data (dd), or table data (td) should
// only have paragraph markers if there are multiple paragraphs (otherwise
// the output looks ugly).
//
// A list or table should be placed outside the paragraph context,
// so the current paragraph should be ended and restarted. To avoid
// empty paragraphs, it has to be checked if the list or table is the
// first or last child within the paragraph.
} }
void HtmlDocVisitor::visitPost(DocPara *p) void HtmlDocVisitor::visitPost(DocPara *p)
...@@ -345,12 +360,10 @@ void HtmlDocVisitor::visitPost(DocPara *p) ...@@ -345,12 +360,10 @@ void HtmlDocVisitor::visitPost(DocPara *p)
void HtmlDocVisitor::visitPre(DocRoot *) void HtmlDocVisitor::visitPre(DocRoot *)
{ {
//m_t << "<hr><h4><font color=\"red\">New parser:</font></h4>\n";
} }
void HtmlDocVisitor::visitPost(DocRoot *) void HtmlDocVisitor::visitPost(DocRoot *)
{ {
//m_t << "<hr><h4><font color=\"red\">Old parser:</font></h4>\n";
} }
void HtmlDocVisitor::visitPre(DocSimpleSect *s) void HtmlDocVisitor::visitPre(DocSimpleSect *s)
...@@ -446,10 +459,10 @@ void HtmlDocVisitor::visitPre(DocSection *s) ...@@ -446,10 +459,10 @@ void HtmlDocVisitor::visitPre(DocSection *s)
{ {
if (m_hide) return; if (m_hide) return;
m_t << "<h" << s->level()+1 << ">"; m_t << "<h" << s->level()+1 << ">";
m_t << "<a name=\"" << s->anchor(); m_t << "<a class=\"anchor\" name=\"" << s->anchor();
m_t << "\"></a>" << endl; m_t << "\">" << endl;
filter(s->title()); filter(s->title());
m_t << "</h" << s->level()+1 << ">\n"; m_t << "</a></h" << s->level()+1 << ">\n";
} }
void HtmlDocVisitor::visitPost(DocSection *) void HtmlDocVisitor::visitPost(DocSection *)
...@@ -488,18 +501,6 @@ void HtmlDocVisitor::visitPost(DocHtmlListItem *) ...@@ -488,18 +501,6 @@ void HtmlDocVisitor::visitPost(DocHtmlListItem *)
m_t << "</li>\n"; m_t << "</li>\n";
} }
//void HtmlDocVisitor::visitPre(DocHtmlPre *p)
//{
// m_t << "<pre" << htmlAttribsToString(p->attribs()) << ">\n";
// m_insidePre=TRUE;
//}
//void HtmlDocVisitor::visitPost(DocHtmlPre *)
//{
// m_insidePre=FALSE;
// m_t << "</pre>\n";
//}
void HtmlDocVisitor::visitPre(DocHtmlDescList *dl) void HtmlDocVisitor::visitPre(DocHtmlDescList *dl)
{ {
if (m_hide) return; if (m_hide) return;
...@@ -747,14 +748,14 @@ void HtmlDocVisitor::visitPost(DocLink *) ...@@ -747,14 +748,14 @@ void HtmlDocVisitor::visitPost(DocLink *)
void HtmlDocVisitor::visitPre(DocRef *ref) void HtmlDocVisitor::visitPre(DocRef *ref)
{ {
if (m_hide) return; if (m_hide) return;
startLink(ref->ref(),ref->file(),ref->anchor()); if (!ref->file().isEmpty()) startLink(ref->ref(),ref->file(),ref->anchor());
if (!ref->hasLinkText()) filter(ref->targetTitle()); if (!ref->hasLinkText()) filter(ref->targetTitle());
} }
void HtmlDocVisitor::visitPost(DocRef *) void HtmlDocVisitor::visitPost(DocRef *ref)
{ {
if (m_hide) return; if (m_hide) return;
endLink(); if (!ref->file().isEmpty()) endLink();
//m_t << " "; //m_t << " ";
} }
......
This diff is collapsed.
...@@ -43,9 +43,8 @@ class HtmlGenerator : public OutputGenerator ...@@ -43,9 +43,8 @@ class HtmlGenerator : public OutputGenerator
void printDoc(DocNode *); void printDoc(DocNode *);
void startFile(const char *name,const char *manName, void startFile(const char *name,const char *manName,const char *title);
const char *title,bool external); void writeFooter();
void writeFooter(int,bool);
void endFile(); void endFile();
void clearBuffer(); void clearBuffer();
...@@ -164,8 +163,9 @@ class HtmlGenerator : public OutputGenerator ...@@ -164,8 +163,9 @@ class HtmlGenerator : public OutputGenerator
void endClassDiagram(ClassDiagram &,const char *,const char *); void endClassDiagram(ClassDiagram &,const char *,const char *);
void startPageRef() {} void startPageRef() {}
void endPageRef(const char *,const char *) {} void endPageRef(const char *,const char *) {}
void startQuickIndexItem(const char *,const char *); //void startQuickIndexItem(const char *,const char *);
void endQuickIndexItem(); //void endQuickIndexItem();
void writeQuickLinks(bool compact,HighlightedItem hli);
void writeNonBreakableSpace(int); void writeNonBreakableSpace(int);
void startDescTable() void startDescTable()
...@@ -209,6 +209,7 @@ class HtmlGenerator : public OutputGenerator ...@@ -209,6 +209,7 @@ class HtmlGenerator : public OutputGenerator
void writeCodeAnchor(const char *anchor) void writeCodeAnchor(const char *anchor)
{ t << "<a name=\"" << anchor << "\"></a>"; } { t << "<a name=\"" << anchor << "\"></a>"; }
static void writeSearchPage();
private: private:
QCString lastTitle; QCString lastTitle;
......
This diff is collapsed.
This diff is collapsed.
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
#include "translator_nl.h" #include "translator_nl.h"
#endif #endif
#ifdef LANG_SE #ifdef LANG_SE
//#include "translator_se.h" #include "translator_se.h"
#endif #endif
#ifdef LANG_CZ #ifdef LANG_CZ
#include "translator_cz.h" #include "translator_cz.h"
...@@ -138,9 +138,7 @@ bool setTranslator(const char *langName) ...@@ -138,9 +138,7 @@ bool setTranslator(const char *langName)
#ifdef LANG_SE #ifdef LANG_SE
else if (L_EQUAL("swedish")) else if (L_EQUAL("swedish"))
{ {
//theTranslator=new TranslatorSwedish; theTranslator=new TranslatorSwedish;
theTranslator=new TranslatorEnglish;
err(obsoleteMsg);
} }
#endif #endif
#ifdef LANG_CZ #ifdef LANG_CZ
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
...@@ -82,3 +82,6 @@ index_xsd.h: index.xsd ...@@ -82,3 +82,6 @@ index_xsd.h: index.xsd
compound_xsd.h: compound.xsd compound_xsd.h: compound.xsd
cat compound.xsd | sed -e "s/\\\\/\\\\\\\\/g" -e "s/\"/\\\\\"/g" -e "s/^/\"/g" -e "s/$$/\\\\n\"/g" >compound_xsd.h cat compound.xsd | sed -e "s/\\\\/\\\\\\\\/g" -e "s/\"/\\\\\"/g" -e "s/^/\"/g" -e "s/$$/\\\\n\"/g" >compound_xsd.h
search_php.h: search.php
cat search.php | sed -e "s/\\\\/\\\\\\\\/g" -e "s/\"/\\\\\"/g" -e "s/^/\"/g" -e "s/$$/\\\\n\"/g" >search_php.h
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment