124 QCString citeListFile = outputDir+
"/citelist.doc";
128 err(
"could not open file %s for writing\n",citeListFile.
data());
131 t <<
"<!-- BEGIN CITATIONS -->" <<
endl;
135 for (it.toFirst();(ci=it.current());++it)
137 t <<
"\\citation{" << ci->
label <<
"}" <<
endl;
140 t <<
"<!-- END CITATIONS -->" <<
endl;
141 t <<
"<!-- BEGIN BIBLIOGRAPHY -->" <<
endl;
142 t <<
"<!-- END BIBLIOGRAPHY -->" <<
endl;
146 QCString bib2xhtmlFile = outputDir+
"/bib2xhtml.pl";
150 QCString doxygenBstFile = outputDir+
"/doxygen.bst";
161 thisDir.
mkdir(bibOutputDir);
162 const char *bibdata = citeDataList.
first();
167 if (!bibFile.
isEmpty() && bibFile.
right(4)!=
".bib") bibFile+=
".bib";
178 else if (!fi.exists())
180 err(
"bib file %s not found!\n",bibFile.
data());
182 bibdata = citeDataList.
next();
192 if ((exitCode=
portable_system(
"perl",
"\""+bib2xhtmlFile+
"\" "+bibOutputFiles+
" \""+
193 citeListFile+
"\"")) != 0)
195 err(
"Problems running bibtex. Verify that the command 'perl --version' works from the command line. Exit code: %d\n",
206 err(
"could not open file %s for reading\n",citeListFile.
data());
208 bool insideBib=
FALSE;
215 input.at(fi.size())=
'\0';
218 while ((
s=
input.find(
'\n',p))!=-1)
224 if (line.
find(
"<!-- BEGIN BIBLIOGRAPHY")!=-1) insideBib=
TRUE;
225 else if (line.
find(
"<!-- END BIBLIOGRAPH")!=-1) insideBib=
FALSE;
226 else if (insideBib) doc+=line+
"\n";
229 if (insideBib && (i=line.
find(
"name=\"CITEREF_"))!=-1)
231 int j=line.
find(
"\">[");
232 int k=line.
find(
"]</a>");
260 const char *bibdata = citeDataList.
first();
265 if (!bibFile.
isEmpty() && bibFile.
right(4)!=
".bib") bibFile+=
".bib";
279 err(
"bib file %s not found!\n",bibFile.
data());
281 bibdata = citeDataList.
next();
286 thisDir.
remove(citeListFile);
287 thisDir.
remove(doxygenBstFile);
288 thisDir.
remove(bib2xhtmlFile);
292 for (
unsigned int j = 1; j <= citeDataList.
count(); j++)
296 thisDir.
rmdir(bibOutputDir);
Traverses directory structures and contents in a platform-independent way.
void portable_sysTimerStop()
virtual bool remove(const QString &fileName, bool acceptAbsPath=TRUE)
bool copyResource(const char *name, const char *targetDir) const
static ResourceMgr & instance()
bool copyFile(const QCString &src, const QCString &dest)
QDict< CiteInfo > m_entries
int readBlock(char *data, uint len)
#define Config_getList(val)
The QString class provides an abstraction of Unicode text and the classic C null-terminated char arra...
Simplified and optimized version of QTextStream.
int find(char c, int index=0, bool cs=TRUE) const
void setName(const QString &name)
const QCString bibTmpDir("bibTmpDir/")
virtual bool mkdir(const QString &dirName, bool acceptAbsPath=TRUE) const
QCString right(uint len) const
static QString currentDirPath()
virtual QCString trCiteReferences()=0
const char * data() const
#define Config_getString(val)
#define Config_getBool(val)
void err(const char *fmt,...)
const QCString bibTmpFile("bibTmpFile_")
static void addRelatedPage(EntryNav *rootNav)
QCString mid(uint index, uint len=0xffffffff) const
The QFile class is an I/O device that operates on files.
QCString & setNum(short n)
virtual bool rmdir(const QString &dirName, bool acceptAbsPath=TRUE) const
void line(double t, double *p, double &x, double &y, double &z)
static const QCString fileName
Translator * theTranslator
The QFileInfo class provides system-independent file information.
static bool setCurrent(const QString &path)
QTextStream & endl(QTextStream &s)
int portable_system(const char *command, const char *args, bool commandHasConsole)