summaryrefslogtreecommitdiffstats
path: root/kioslave/man
diff options
context:
space:
mode:
Diffstat (limited to 'kioslave/man')
-rw-r--r--kioslave/man/kio_man.cpp386
-rw-r--r--kioslave/man/kio_man.h60
-rw-r--r--kioslave/man/kio_man_test.cpp4
-rw-r--r--kioslave/man/kmanpart.cpp16
-rw-r--r--kioslave/man/kmanpart.h14
-rw-r--r--kioslave/man/man2html.cpp206
-rw-r--r--kioslave/man/man2html.h4
7 files changed, 345 insertions, 345 deletions
diff --git a/kioslave/man/kio_man.cpp b/kioslave/man/kio_man.cpp
index 068287b7e..013a15248 100644
--- a/kioslave/man/kio_man.cpp
+++ b/kioslave/man/kio_man.cpp
@@ -22,14 +22,14 @@
#include <string.h>
#include <dirent.h>
-#include <qdir.h>
-#include <qfile.h>
-#include <qtextstream.h>
-#include <qdatastream.h>
-#include <qcstring.h>
-#include <qptrlist.h>
-#include <qmap.h>
-#include <qregexp.h>
+#include <tqdir.h>
+#include <tqfile.h>
+#include <tqtextstream.h>
+#include <tqdatastream.h>
+#include <tqcstring.h>
+#include <tqptrlist.h>
+#include <tqmap.h>
+#include <tqregexp.h>
#include <kdebug.h>
#include <kinstance.h>
@@ -56,7 +56,7 @@ MANProtocol *MANProtocol::_self = 0;
* Drop trailing ".section[.gz]" from name
*/
static
-void stripExtension( QString *name )
+void stripExtension( TQString *name )
{
int pos = name->length();
@@ -77,11 +77,11 @@ void stripExtension( QString *name )
}
static
-bool parseUrl(const QString& _url, QString &title, QString &section)
+bool parseUrl(const TQString& _url, TQString &title, TQString &section)
{
- section = QString::null;
+ section = TQString::null;
- QString url = _url;
+ TQString url = _url;
if (url.at(0) == '/') {
if (KStandardDirs::exists(url)) {
title = url;
@@ -111,13 +111,13 @@ bool parseUrl(const QString& _url, QString &title, QString &section)
}
-MANProtocol::MANProtocol(const QCString &pool_socket, const QCString &app_socket)
- : QObject(), SlaveBase("man", pool_socket, app_socket)
+MANProtocol::MANProtocol(const TQCString &pool_socket, const TQCString &app_socket)
+ : TQObject(), SlaveBase("man", pool_socket, app_socket)
{
assert(!_self);
_self = this;
- const QString common_dir = KGlobal::dirs()->findResourceDir( "html", "en/common/kde-common.css" );
- const QString strPath=QString( "file:%1/en/common" ).arg( common_dir );
+ const TQString common_dir = KGlobal::dirs()->findResourceDir( "html", "en/common/kde-common.css" );
+ const TQString strPath=TQString( "file:%1/en/common" ).arg( common_dir );
m_htmlPath=strPath.local8Bit(); // ### TODO encode for HTML
m_cssPath=strPath.local8Bit(); // ### TODO encode for CSS
section_names << "1" << "2" << "3" << "3n" << "3p" << "4" << "5" << "6" << "7"
@@ -132,18 +132,18 @@ MANProtocol::~MANProtocol()
_self = 0;
}
-void MANProtocol::parseWhatIs( QMap<QString, QString> &i, QTextStream &t, const QString &mark )
+void MANProtocol::parseWhatIs( TQMap<TQString, TQString> &i, TQTextStream &t, const TQString &mark )
{
- QRegExp re( mark );
- QString l;
+ TQRegExp re( mark );
+ TQString l;
while ( !t.atEnd() )
{
l = t.readLine();
int pos = re.search( l );
if (pos != -1)
{
- QString names = l.left(pos);
- QString descr = l.mid(pos + re.matchedLength());
+ TQString names = l.left(pos);
+ TQString descr = l.mid(pos + re.matchedLength());
while ((pos = names.find(",")) != -1)
{
i[names.left(pos++)] = descr;
@@ -156,20 +156,20 @@ void MANProtocol::parseWhatIs( QMap<QString, QString> &i, QTextStream &t, const
}
}
-bool MANProtocol::addWhatIs(QMap<QString, QString> &i, const QString &name, const QString &mark)
+bool MANProtocol::addWhatIs(TQMap<TQString, TQString> &i, const TQString &name, const TQString &mark)
{
- QFile f(name);
+ TQFile f(name);
if (!f.open(IO_ReadOnly))
return false;
- QTextStream t(&f);
+ TQTextStream t(&f);
parseWhatIs( i, t, mark );
return true;
}
-QMap<QString, QString> MANProtocol::buildIndexMap(const QString &section)
+TQMap<TQString, TQString> MANProtocol::buildIndexMap(const TQString &section)
{
- QMap<QString, QString> i;
- QStringList man_dirs = manDirectories();
+ TQMap<TQString, TQString> i;
+ TQStringList man_dirs = manDirectories();
// Supplementary places for whatis databases
man_dirs += m_mandbpath;
if (man_dirs.find("/var/cache/man")==man_dirs.end())
@@ -177,16 +177,16 @@ QMap<QString, QString> MANProtocol::buildIndexMap(const QString &section)
if (man_dirs.find("/var/catman")==man_dirs.end())
man_dirs << "/var/catman";
- QStringList names;
+ TQStringList names;
names << "whatis.db" << "whatis";
- QString mark = "\\s+\\(" + section + "[a-z]*\\)\\s+-\\s+";
+ TQString mark = "\\s+\\(" + section + "[a-z]*\\)\\s+-\\s+";
- for ( QStringList::ConstIterator it_dir = man_dirs.begin();
+ for ( TQStringList::ConstIterator it_dir = man_dirs.begin();
it_dir != man_dirs.end();
++it_dir )
{
- if ( QFile::exists( *it_dir ) ) {
- QStringList::ConstIterator it_name;
+ if ( TQFile::exists( *it_dir ) ) {
+ TQStringList::ConstIterator it_name;
for ( it_name = names.begin();
it_name != names.end();
it_name++ )
@@ -197,11 +197,11 @@ QMap<QString, QString> MANProtocol::buildIndexMap(const QString &section)
if ( it_name == names.end() ) {
KProcess proc;
proc << "whatis" << "-M" << (*it_dir) << "-w" << "*";
- myStdStream = QString::null;
- connect( &proc, SIGNAL( receivedStdout(KProcess *, char *, int ) ),
- SLOT( slotGetStdOutput( KProcess *, char *, int ) ) );
+ myStdStream = TQString::null;
+ connect( &proc, TQT_SIGNAL( receivedStdout(KProcess *, char *, int ) ),
+ TQT_SLOT( slotGetStdOutput( KProcess *, char *, int ) ) );
proc.start( KProcess::Block, KProcess::Stdout );
- QTextStream t( &myStdStream, IO_ReadOnly );
+ TQTextStream t( &myStdStream, IO_ReadOnly );
parseWhatIs( i, t, mark );
}
}
@@ -209,54 +209,54 @@ QMap<QString, QString> MANProtocol::buildIndexMap(const QString &section)
return i;
}
-QStringList MANProtocol::manDirectories()
+TQStringList MANProtocol::manDirectories()
{
checkManPaths();
//
// Build a list of man directories including translations
//
- QStringList man_dirs;
+ TQStringList man_dirs;
- for ( QStringList::ConstIterator it_dir = m_manpath.begin();
+ for ( TQStringList::ConstIterator it_dir = m_manpath.begin();
it_dir != m_manpath.end();
it_dir++ )
{
// Translated pages in "<mandir>/<lang>" if the directory
// exists
- QStringList languages = KGlobal::locale()->languageList();
+ TQStringList languages = KGlobal::locale()->languageList();
- for (QStringList::ConstIterator it_lang = languages.begin();
+ for (TQStringList::ConstIterator it_lang = languages.begin();
it_lang != languages.end();
it_lang++ )
{
- if ( !(*it_lang).isEmpty() && (*it_lang) != QString("C") ) {
- QString dir = (*it_dir) + '/' + (*it_lang);
+ if ( !(*it_lang).isEmpty() && (*it_lang) != TQString("C") ) {
+ TQString dir = (*it_dir) + '/' + (*it_lang);
struct stat sbuf;
- if ( ::stat( QFile::encodeName( dir ), &sbuf ) == 0
+ if ( ::stat( TQFile::encodeName( dir ), &sbuf ) == 0
&& S_ISDIR( sbuf.st_mode ) )
{
- const QString p = QDir(dir).canonicalPath();
+ const TQString p = TQDir(dir).canonicalPath();
if (!man_dirs.contains(p)) man_dirs += p;
}
}
}
// Untranslated pages in "<mandir>"
- const QString p = QDir(*it_dir).canonicalPath();
+ const TQString p = TQDir(*it_dir).canonicalPath();
if (!man_dirs.contains(p)) man_dirs += p;
}
return man_dirs;
}
-QStringList MANProtocol::findPages(const QString &_section,
- const QString &title,
+TQStringList MANProtocol::findPages(const TQString &_section,
+ const TQString &title,
bool full_path)
{
- QString section = _section;
+ TQString section = _section;
- QStringList list;
+ TQStringList list;
// kdDebug() << "findPages '" << section << "' '" << title << "'\n";
if (title.at(0) == '/') {
@@ -264,12 +264,12 @@ QStringList MANProtocol::findPages(const QString &_section,
return list;
}
- const QString star( "*" );
+ const TQString star( "*" );
//
// Find man sections in this directory
//
- QStringList sect_list;
+ TQStringList sect_list;
if ( section.isEmpty() )
section = star;
@@ -287,41 +287,41 @@ QStringList MANProtocol::findPages(const QString &_section,
sect_list += section;
}
- QStringList man_dirs = manDirectories();
+ TQStringList man_dirs = manDirectories();
//
// Find man pages in the sections listed above
//
- for ( QStringList::ConstIterator it_sect = sect_list.begin();
+ for ( TQStringList::ConstIterator it_sect = sect_list.begin();
it_sect != sect_list.end();
it_sect++ )
{
- QString it_real = (*it_sect).lower();
+ TQString it_real = (*it_sect).lower();
//
// Find pages
//
- for ( QStringList::ConstIterator it_dir = man_dirs.begin();
+ for ( TQStringList::ConstIterator it_dir = man_dirs.begin();
it_dir != man_dirs.end();
it_dir++ )
{
- QString man_dir = (*it_dir);
+ TQString man_dir = (*it_dir);
//
// Sections = all sub directories "man*" and "sman*"
//
- DIR *dp = ::opendir( QFile::encodeName( man_dir ) );
+ DIR *dp = ::opendir( TQFile::encodeName( man_dir ) );
if ( !dp )
continue;
struct dirent *ep;
- const QString man = QString("man");
- const QString sman = QString("sman");
+ const TQString man = TQString("man");
+ const TQString sman = TQString("sman");
while ( (ep = ::readdir( dp )) != 0L ) {
- const QString file = QFile::decodeName( ep->d_name );
- QString sect = QString::null;
+ const TQString file = TQFile::decodeName( ep->d_name );
+ TQString sect = TQString::null;
if ( file.startsWith( man ) )
sect = file.mid(3);
@@ -340,8 +340,8 @@ QStringList MANProtocol::findPages(const QString &_section,
::closedir( dp );
if ( *it_sect != star ) { // in that case we only look around for sections
- const QString dir = man_dir + QString("/man") + (it_real) + '/';
- const QString sdir = man_dir + QString("/sman") + (it_real) + '/';
+ const TQString dir = man_dir + TQString("/man") + (it_real) + '/';
+ const TQString sdir = man_dir + TQString("/sman") + (it_real) + '/';
findManPagesInSection(dir, title, full_path, list);
findManPagesInSection(sdir, title, full_path, list);
@@ -354,12 +354,12 @@ QStringList MANProtocol::findPages(const QString &_section,
return list;
}
-void MANProtocol::findManPagesInSection(const QString &dir, const QString &title, bool full_path, QStringList &list)
+void MANProtocol::findManPagesInSection(const TQString &dir, const TQString &title, bool full_path, TQStringList &list)
{
kdDebug() << "findManPagesInSection " << dir << " " << title << endl;
bool title_given = !title.isEmpty();
- DIR *dp = ::opendir( QFile::encodeName( dir ) );
+ DIR *dp = ::opendir( TQFile::encodeName( dir ) );
if ( !dp )
return;
@@ -369,7 +369,7 @@ void MANProtocol::findManPagesInSection(const QString &dir, const QString &title
while ( (ep = ::readdir( dp )) != 0L ) {
if ( ep->d_name[0] != '.' ) {
- QString name = QFile::decodeName( ep->d_name );
+ TQString name = TQFile::decodeName( ep->d_name );
// check title if we're looking for a specific page
if ( title_given ) {
@@ -378,7 +378,7 @@ void MANProtocol::findManPagesInSection(const QString &dir, const QString &title
}
else {
// beginning matches, do a more thorough check...
- QString tmp_name = name;
+ TQString tmp_name = name;
stripExtension( &tmp_name );
if ( tmp_name != title )
continue;
@@ -404,7 +404,7 @@ void MANProtocol::output(const char *insert)
{
m_outputBuffer.close();
data(m_outputBuffer.buffer());
- m_outputBuffer.setBuffer(QByteArray());
+ m_outputBuffer.setBuffer(TQByteArray());
m_outputBuffer.open(IO_WriteOnly);
}
}
@@ -421,9 +421,9 @@ void output_real(const char *insert)
MANProtocol::self()->output(insert);
}
-static QString text2html(const QString& txt)
+static TQString text2html(const TQString& txt)
{
- QString reply = txt;
+ TQString reply = txt;
reply = reply.replace('&', "&amp;");
reply = reply.replace('<', "&lt;");
@@ -437,7 +437,7 @@ void MANProtocol::get(const KURL& url )
{
kdDebug(7107) << "GET " << url.url() << endl;
- QString title, section;
+ TQString title, section;
if (!parseUrl(url.path(), title, section))
{
@@ -458,7 +458,7 @@ void MANProtocol::get(const KURL& url )
// tell the mimetype
mimeType("text/html");
- const QStringList foundPages=findPages(section, title);
+ const TQStringList foundPages=findPages(section, title);
bool pageFound=true;
if (foundPages.isEmpty())
{
@@ -488,7 +488,7 @@ void MANProtocol::get(const KURL& url )
{
setResourcePath(m_htmlPath,m_cssPath);
m_outputBuffer.open(IO_WriteOnly);
- const QCString filename=QFile::encodeName(foundPages[0]);
+ const TQCString filename=TQFile::encodeName(foundPages[0]);
char *buf = readManPage(filename);
if (!buf)
@@ -505,26 +505,26 @@ void MANProtocol::get(const KURL& url )
m_outputBuffer.close();
data(m_outputBuffer.buffer());
- m_outputBuffer.setBuffer(QByteArray());
+ m_outputBuffer.setBuffer(TQByteArray());
// tell we are done
- data(QByteArray());
+ data(TQByteArray());
}
finished();
}
void MANProtocol::slotGetStdOutput(KProcess* /* p */, char *s, int len)
{
- myStdStream += QString::fromLocal8Bit(s, len);
+ myStdStream += TQString::fromLocal8Bit(s, len);
}
void MANProtocol::slotGetStdOutputUtf8(KProcess* /* p */, char *s, int len)
{
- myStdStream += QString::fromUtf8(s, len);
+ myStdStream += TQString::fromUtf8(s, len);
}
char *MANProtocol::readManPage(const char *_filename)
{
- QCString filename = _filename;
+ TQCString filename = _filename;
char *buf = NULL;
@@ -533,21 +533,21 @@ char *MANProtocol::readManPage(const char *_filename)
* /usr/man/sman7fs/pcfs.7fs -> text/x-csrc : WRONG
* If the path name constains the string sman, assume that it's SGML and
* convert it to roff format (used on Solaris). */
- //QString file_mimetype = KMimeType::findByPath(QString(filename), 0, false)->name();
+ //TQString file_mimetype = KMimeType::findByPath(TQString(filename), 0, false)->name();
if (filename.contains("sman", false)) //file_mimetype == "text/html" || )
{
- myStdStream =QString::null;
+ myStdStream =TQString::null;
KProcess proc;
/* Determine path to sgml2roff, if not already done. */
getProgramPath();
proc << mySgml2RoffPath << filename;
- QApplication::connect(&proc, SIGNAL(receivedStdout (KProcess *, char *, int)),
- this, SLOT(slotGetStdOutput(KProcess *, char *, int)));
+ TQApplication::connect(&proc, TQT_SIGNAL(receivedStdout (KProcess *, char *, int)),
+ this, TQT_SLOT(slotGetStdOutput(KProcess *, char *, int)));
proc.start(KProcess::Block, KProcess::All);
- const QCString cstr=myStdStream.latin1();
+ const TQCString cstr=myStdStream.latin1();
const int len = cstr.size()-1;
buf = new char[len + 4];
qmemmove(buf + 1, cstr.data(), len);
@@ -556,30 +556,30 @@ char *MANProtocol::readManPage(const char *_filename)
}
else
{
- if (QDir::isRelativePath(filename)) {
+ if (TQDir::isRelativePath(filename)) {
kdDebug(7107) << "relative " << filename << endl;
- filename = QDir::cleanDirPath(lastdir + "/" + filename).utf8();
+ filename = TQDir::cleanDirPath(lastdir + "/" + filename).utf8();
if (!KStandardDirs::exists(filename)) { // exists perhaps with suffix
lastdir = filename.left(filename.findRev('/'));
- QDir mandir(lastdir);
+ TQDir mandir(lastdir);
mandir.setNameFilter(filename.mid(filename.findRev('/') + 1) + ".*");
- filename = lastdir + "/" + QFile::encodeName(mandir.entryList().first());
+ filename = lastdir + "/" + TQFile::encodeName(mandir.entryList().first());
}
kdDebug(7107) << "resolved to " << filename << endl;
}
lastdir = filename.left(filename.findRev('/'));
- myStdStream = QString::null;
+ myStdStream = TQString::null;
KProcess proc;
/* TODO: detect availability of 'man --recode' so that this can go
* upstream */
proc << "man" << "--recode" << "UTF-8" << filename;
- QApplication::connect(&proc, SIGNAL(receivedStdout (KProcess *, char *, int)),
- this, SLOT(slotGetStdOutputUtf8(KProcess *, char *, int)));
+ TQApplication::connect(&proc, TQT_SIGNAL(receivedStdout (KProcess *, char *, int)),
+ this, TQT_SLOT(slotGetStdOutputUtf8(KProcess *, char *, int)));
proc.start(KProcess::Block, KProcess::All);
- const QCString cstr=myStdStream.utf8();
+ const TQCString cstr=myStdStream.utf8();
const int len = cstr.size()-1;
buf = new char[len + 4];
qmemmove(buf + 1, cstr.data(), len);
@@ -590,11 +590,11 @@ char *MANProtocol::readManPage(const char *_filename)
}
-void MANProtocol::outputError(const QString& errmsg)
+void MANProtocol::outputError(const TQString& errmsg)
{
- QByteArray array;
- QTextStream os(array, IO_WriteOnly);
- os.setEncoding(QTextStream::UnicodeUTF8);
+ TQByteArray array;
+ TQTextStream os(array, IO_WriteOnly);
+ os.setEncoding(TQTextStream::UnicodeUTF8);
os << "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Strict//EN\">" << endl;
os << "<html><head><meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\">" << endl;
@@ -608,11 +608,11 @@ void MANProtocol::outputError(const QString& errmsg)
data(array);
}
-void MANProtocol::outputMatchingPages(const QStringList &matchingPages)
+void MANProtocol::outputMatchingPages(const TQStringList &matchingPages)
{
- QByteArray array;
- QTextStream os(array, IO_WriteOnly);
- os.setEncoding(QTextStream::UnicodeUTF8);
+ TQByteArray array;
+ TQTextStream os(array, IO_WriteOnly);
+ os.setEncoding(TQTextStream::UnicodeUTF8);
os << "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Strict//EN\">" << endl;
os << "<html>\n<head><meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\">"<<endl;
@@ -624,7 +624,7 @@ void MANProtocol::outputMatchingPages(const QStringList &matchingPages)
os << "</h1>\n<ul>\n";
int acckey=1;
- for (QStringList::ConstIterator it = matchingPages.begin(); it != matchingPages.end(); ++it)
+ for (TQStringList::ConstIterator it = matchingPages.begin(); it != matchingPages.end(); ++it)
{
os<<"<li><a href='man:"<<(*it)<<"' accesskey='"<< acckey <<"'>"<< *it <<"</a><br>\n<br>\n";
acckey++;
@@ -645,7 +645,7 @@ void MANProtocol::stat( const KURL& url)
{
kdDebug(7107) << "ENTERING STAT " << url.url() << endl;
- QString title, section;
+ TQString title, section;
if (!parseUrl(url.path(), title, section))
{
@@ -670,9 +670,9 @@ void MANProtocol::stat( const KURL& url)
atom.m_uds = UDS_URL;
atom.m_long = 0;
- QString newUrl = "man:"+title;
+ TQString newUrl = "man:"+title;
if (!section.isEmpty())
- newUrl += QString("(%1)").arg(section);
+ newUrl += TQString("(%1)").arg(section);
atom.m_str = newUrl;
entry.append(atom);
@@ -718,7 +718,7 @@ void MANProtocol::mimetype(const KURL & /*url*/)
finished();
}
-static QString sectionName(const QString& section)
+static TQString sectionName(const TQString& section)
{
if (section == "1")
return i18n("User Commands");
@@ -747,20 +747,20 @@ static QString sectionName(const QString& section)
else if (section == "n")
return i18n("New");
- return QString::null;
+ return TQString::null;
}
-QStringList MANProtocol::buildSectionList(const QStringList& dirs) const
+TQStringList MANProtocol::buildSectionList(const TQStringList& dirs) const
{
- QStringList l;
+ TQStringList l;
- for (QStringList::ConstIterator it = section_names.begin();
+ for (TQStringList::ConstIterator it = section_names.begin();
it != section_names.end(); ++it)
{
- for (QStringList::ConstIterator dir = dirs.begin();
+ for (TQStringList::ConstIterator dir = dirs.begin();
dir != dirs.end(); ++dir)
{
- QDir d((*dir)+"/man"+(*it));
+ TQDir d((*dir)+"/man"+(*it));
if (d.exists())
{
l << *it;
@@ -773,9 +773,9 @@ QStringList MANProtocol::buildSectionList(const QStringList& dirs) const
void MANProtocol::showMainIndex()
{
- QByteArray array;
- QTextStream os(array, IO_WriteOnly);
- os.setEncoding(QTextStream::UnicodeUTF8);
+ TQByteArray array;
+ TQTextStream os(array, IO_WriteOnly);
+ os.setEncoding(TQTextStream::UnicodeUTF8);
// print header
os << "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Strict//EN\">" << endl;
@@ -787,16 +787,16 @@ void MANProtocol::showMainIndex()
os << "<body><h1>" << i18n("UNIX Manual Index") << "</h1>" << endl;
// ### TODO: why still the environment variable
- const QString sectList = getenv("MANSECT");
- QStringList sections;
+ const TQString sectList = getenv("MANSECT");
+ TQStringList sections;
if (sectList.isEmpty())
sections = buildSectionList(manDirectories());
else
- sections = QStringList::split(':', sectList);
+ sections = TQStringList::split(':', sectList);
os << "<table>" << endl;
- QStringList::ConstIterator it;
+ TQStringList::ConstIterator it;
for (it = sections.begin(); it != sections.end(); ++it)
os << "<tr><td><a href=\"man:(" << *it << ")\" accesskey=\"" <<
(((*it).length()==1)?(*it):(*it).right(1))<<"\">" << i18n("Section ")
@@ -811,10 +811,10 @@ void MANProtocol::showMainIndex()
finished();
}
-void MANProtocol::constructPath(QStringList& constr_path, QStringList constr_catmanpath)
+void MANProtocol::constructPath(TQStringList& constr_path, TQStringList constr_catmanpath)
{
- QMap<QString, QString> manpath_map;
- QMap<QString, QString> mandb_map;
+ TQMap<TQString, TQString> manpath_map;
+ TQMap<TQString, TQString> mandb_map;
// Add paths from /etc/man.conf
//
@@ -823,14 +823,14 @@ void MANProtocol::constructPath(QStringList& constr_path, QStringList constr_cat
// Mappings from $PATH to manpath are given by lines starting with
// "MANPATH_MAP"
- QRegExp manpath_regex( "^MANPATH\\s" );
- QRegExp mandatory_regex( "^MANDATORY_MANPATH\\s" );
- QRegExp manpath_map_regex( "^MANPATH_MAP\\s" );
- QRegExp mandb_map_regex( "^MANDB_MAP\\s" );
- //QRegExp section_regex( "^SECTION\\s" );
- QRegExp space_regex( "\\s+" ); // for parsing manpath map
+ TQRegExp manpath_regex( "^MANPATH\\s" );
+ TQRegExp mandatory_regex( "^MANDATORY_MANPATH\\s" );
+ TQRegExp manpath_map_regex( "^MANPATH_MAP\\s" );
+ TQRegExp mandb_map_regex( "^MANDB_MAP\\s" );
+ //TQRegExp section_regex( "^SECTION\\s" );
+ TQRegExp space_regex( "\\s+" ); // for parsing manpath map
- QFile mc("/etc/man.conf"); // Caldera
+ TQFile mc("/etc/man.conf"); // Caldera
if (!mc.exists())
mc.setName("/etc/manpath.config"); // SuSE, Debian
if (!mc.exists())
@@ -838,32 +838,32 @@ void MANProtocol::constructPath(QStringList& constr_path, QStringList constr_cat
if (mc.open(IO_ReadOnly))
{
- QTextStream is(&mc);
- is.setEncoding(QTextStream::Locale);
+ TQTextStream is(&mc);
+ is.setEncoding(TQTextStream::Locale);
while (!is.eof())
{
- const QString line = is.readLine();
+ const TQString line = is.readLine();
if ( manpath_regex.search(line, 0) == 0 )
{
- const QString path = line.mid(8).stripWhiteSpace();
+ const TQString path = line.mid(8).stripWhiteSpace();
constr_path += path;
}
else if ( mandatory_regex.search(line, 0) == 0 )
{
- const QString path = line.mid(18).stripWhiteSpace();
+ const TQString path = line.mid(18).stripWhiteSpace();
constr_path += path;
}
else if ( manpath_map_regex.search(line, 0) == 0 )
{
// The entry is "MANPATH_MAP <path> <manpath>"
- const QStringList mapping =
- QStringList::split(space_regex, line);
+ const TQStringList mapping =
+ TQStringList::split(space_regex, line);
if ( mapping.count() == 3 )
{
- const QString dir = QDir::cleanDirPath( mapping[1] );
- const QString mandir = QDir::cleanDirPath( mapping[2] );
+ const TQString dir = TQDir::cleanDirPath( mapping[1] );
+ const TQString mandir = TQDir::cleanDirPath( mapping[2] );
manpath_map[ dir ] = mandir;
}
@@ -871,13 +871,13 @@ void MANProtocol::constructPath(QStringList& constr_path, QStringList constr_cat
else if ( mandb_map_regex.search(line, 0) == 0 )
{
// The entry is "MANDB_MAP <manpath> <catmanpath>"
- const QStringList mapping =
- QStringList::split(space_regex, line);
+ const TQStringList mapping =
+ TQStringList::split(space_regex, line);
if ( mapping.count() == 3 )
{
- const QString mandir = QDir::cleanDirPath( mapping[1] );
- const QString catmandir = QDir::cleanDirPath( mapping[2] );
+ const TQString mandir = TQDir::cleanDirPath( mapping[1] );
+ const TQString catmandir = TQDir::cleanDirPath( mapping[2] );
mandb_map[ mandir ] = catmandir;
}
@@ -920,8 +920,8 @@ void MANProtocol::constructPath(QStringList& constr_path, QStringList constr_cat
int i = 0;
while (manpaths[i]) {
- if ( constr_path.findIndex( QString( manpaths[i] ) ) == -1 )
- constr_path += QString( manpaths[i] );
+ if ( constr_path.findIndex( TQString( manpaths[i] ) ) == -1 )
+ constr_path += TQString( manpaths[i] );
i++;
}
@@ -931,16 +931,16 @@ void MANProtocol::constructPath(QStringList& constr_path, QStringList constr_cat
// to the man path (the actual existence check is done further down)
if ( ::getenv("PATH") ) {
- const QStringList path =
- QStringList::split( ":",
- QString::fromLocal8Bit( ::getenv("PATH") ) );
+ const TQStringList path =
+ TQStringList::split( ":",
+ TQString::fromLocal8Bit( ::getenv("PATH") ) );
- for ( QStringList::const_iterator it = path.begin();
+ for ( TQStringList::const_iterator it = path.begin();
it != path.end();
++it )
{
- const QString dir = QDir::cleanDirPath( *it );
- QString mandir = manpath_map[ dir ];
+ const TQString dir = TQDir::cleanDirPath( *it );
+ TQString mandir = manpath_map[ dir ];
if ( !mandir.isEmpty() ) {
// a path mapping exists
@@ -950,18 +950,18 @@ void MANProtocol::constructPath(QStringList& constr_path, QStringList constr_cat
else {
// no manpath mapping, use "<path>/man" and "<path>/../man"
- mandir = dir + QString( "/man" );
+ mandir = dir + TQString( "/man" );
if ( constr_path.findIndex( mandir ) == -1 )
constr_path += mandir;
int pos = dir.findRev( '/' );
if ( pos > 0 ) {
- mandir = dir.left( pos ) + QString("/man");
+ mandir = dir.left( pos ) + TQString("/man");
if ( constr_path.findIndex( mandir ) == -1 )
constr_path += mandir;
}
}
- QString catmandir = mandb_map[ mandir ];
+ TQString catmandir = mandb_map[ mandir ];
if ( !mandir.isEmpty() )
{
if ( constr_catmanpath.findIndex( catmandir ) == -1 )
@@ -988,8 +988,8 @@ void MANProtocol::checkManPaths()
inited = true;
- const QString manpath_env = QString::fromLocal8Bit( ::getenv("MANPATH") );
- //QString mansect_env = QString::fromLocal8Bit( ::getenv("MANSECT") );
+ const TQString manpath_env = TQString::fromLocal8Bit( ::getenv("MANPATH") );
+ //TQString mansect_env = TQString::fromLocal8Bit( ::getenv("MANSECT") );
// Decide if $MANPATH is enough on its own or if it should be merged
// with the constructed path.
@@ -1010,10 +1010,10 @@ void MANProtocol::checkManPaths()
// /etc/man.conf
// default dirs
// $PATH
- QStringList constr_path;
- QStringList constr_catmanpath; // catmanpath
+ TQStringList constr_path;
+ TQStringList constr_catmanpath; // catmanpath
- QString conf_section;
+ TQString conf_section;
if ( construct_path )
{
@@ -1029,20 +1029,20 @@ void MANProtocol::checkManPaths()
// satisfied if any empty string in path_list_env (there
// should be 1 or 0) is replaced by the constructed path.
- const QStringList path_list_env = QStringList::split( ':', manpath_env , true );
+ const TQStringList path_list_env = TQStringList::split( ':', manpath_env , true );
- for ( QStringList::const_iterator it = path_list_env.begin();
+ for ( TQStringList::const_iterator it = path_list_env.begin();
it != path_list_env.end();
++it )
{
struct stat sbuf;
- QString dir = (*it);
+ TQString dir = (*it);
if ( !dir.isEmpty() ) {
// Add dir to the man path if it exists
if ( m_manpath.findIndex( dir ) == -1 ) {
- if ( ::stat( QFile::encodeName( dir ), &sbuf ) == 0
+ if ( ::stat( TQFile::encodeName( dir ), &sbuf ) == 0
&& S_ISDIR( sbuf.st_mode ) )
{
m_manpath += dir;
@@ -1053,7 +1053,7 @@ void MANProtocol::checkManPaths()
// Insert constructed path ($MANPATH was empty, or
// there was a ":" at an end or "::")
- for ( QStringList::Iterator it2 = constr_path.begin();
+ for ( TQStringList::Iterator it2 = constr_path.begin();
it2 != constr_path.end();
it2++ )
{
@@ -1061,7 +1061,7 @@ void MANProtocol::checkManPaths()
if ( !dir.isEmpty() ) {
if ( m_manpath.findIndex( dir ) == -1 ) {
- if ( ::stat( QFile::encodeName( dir ), &sbuf ) == 0
+ if ( ::stat( TQFile::encodeName( dir ), &sbuf ) == 0
&& S_ISDIR( sbuf.st_mode ) )
{
m_manpath += dir;
@@ -1074,14 +1074,14 @@ void MANProtocol::checkManPaths()
/* sections are not used
// Sections
- QStringList m_mansect = QStringList::split( ':', mansect_env, true );
+ TQStringList m_mansect = TQStringList::split( ':', mansect_env, true );
const char* default_sect[] =
{ "1", "2", "3", "4", "5", "6", "7", "8", "9", "n", 0L };
for ( int i = 0; default_sect[i] != 0L; i++ )
- if ( m_mansect.findIndex( QString( default_sect[i] ) ) == -1 )
- m_mansect += QString( default_sect[i] );
+ if ( m_mansect.findIndex( TQString( default_sect[i] ) ) == -1 )
+ m_mansect += TQString( default_sect[i] );
*/
}
@@ -1151,14 +1151,14 @@ int compare_man_index(const void *s1, const void *s2)
#warning using heapsort
// Set up my own man page list,
// with a special compare function to sort itself
-typedef QPtrList<struct man_index_t> QManIndexListBase;
-typedef QPtrListIterator<struct man_index_t> QManIndexListIterator;
+typedef TQPtrList<struct man_index_t> QManIndexListBase;
+typedef TQPtrListIterator<struct man_index_t> QManIndexListIterator;
class QManIndexList : public QManIndexListBase
{
public:
private:
- int compareItems( QPtrCollection::Item s1, QPtrCollection::Item s2 )
+ int compareItems( TQPtrCollection::Item s1, TQPtrCollection::Item s2 )
{
struct man_index_t *m1 = (struct man_index_t *)s1;
struct man_index_t *m2 = (struct man_index_t *)s2;
@@ -1198,11 +1198,11 @@ private:
-void MANProtocol::showIndex(const QString& section)
+void MANProtocol::showIndex(const TQString& section)
{
- QByteArray array;
- QTextStream os(array, IO_WriteOnly);
- os.setEncoding(QTextStream::UnicodeUTF8);
+ TQByteArray array;
+ TQTextStream os(array, IO_WriteOnly);
+ os.setEncoding(TQTextStream::UnicodeUTF8);
// print header
os << "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Strict//EN\">" << endl;
@@ -1220,9 +1220,9 @@ void MANProtocol::showIndex(const QString& section)
infoMessage(i18n("Generating Index"));
// search for the man pages
- QStringList pages = findPages( section, QString::null );
+ TQStringList pages = findPages( section, TQString::null );
- QMap<QString, QString> indexmap = buildIndexMap(section);
+ TQMap<TQString, TQString> indexmap = buildIndexMap(section);
// print out the list
os << "<table>" << endl;
@@ -1230,12 +1230,12 @@ void MANProtocol::showIndex(const QString& section)
#ifdef _USE_OLD_CODE
pages.sort();
- QMap<QString, QString> pagemap;
+ TQMap<TQString, TQString> pagemap;
- QStringList::ConstIterator page;
+ TQStringList::ConstIterator page;
for (page = pages.begin(); page != pages.end(); ++page)
{
- QString fileName = *page;
+ TQString fileName = *page;
stripExtension( &fileName );
@@ -1248,7 +1248,7 @@ void MANProtocol::showIndex(const QString& section)
}
- for (QMap<QString,QString>::ConstIterator it = pagemap.begin();
+ for (TQMap<TQString,TQString>::ConstIterator it = pagemap.begin();
it != pagemap.end(); ++it)
{
os << "<tr><td><a href=\"man:" << it.data() << "\">\n"
@@ -1272,7 +1272,7 @@ void MANProtocol::showIndex(const QString& section)
#endif /* _USE_QSORT */
- QStringList::const_iterator page;
+ TQStringList::const_iterator page;
for (page = pages.begin(); page != pages.end(); ++page)
{
// I look for the beginning of the man page name
@@ -1366,13 +1366,13 @@ void MANProtocol::showIndex(const QString& section)
// sort and print
qsort(indexlist, listlen, sizeof(struct man_index_t *), compare_man_index);
- QChar firstchar, tmp;
- QString indexLine="<div class=\"secidxshort\">\n";
+ TQChar firstchar, tmp;
+ TQString indexLine="<div class=\"secidxshort\">\n";
if (indexlist[0]->manpage_len>0)
{
- firstchar=QChar((indexlist[0]->manpage_begin)[0]).lower();
+ firstchar=TQChar((indexlist[0]->manpage_begin)[0]).lower();
- const QString appendixstr = QString(
+ const TQString appendixstr = TQString(
" [<a href=\"#%1\" accesskey=\"%2\">%3</a>]\n"
).arg(firstchar).arg(firstchar).arg(firstchar);
indexLine.append(appendixstr);
@@ -1397,14 +1397,14 @@ void MANProtocol::showIndex(const QString& section)
continue;
}
- tmp=QChar((manindex->manpage_begin)[0]).lower();
+ tmp=TQChar((manindex->manpage_begin)[0]).lower();
if (firstchar != tmp)
{
firstchar = tmp;
os << "<tr><td class=\"secidxnextletter\"" << " colspan=\"3\">\n <a name=\""
<< firstchar << "\">" << firstchar << "</a>\n</td></tr>" << endl;
- const QString appendixstr = QString(
+ const TQString appendixstr = TQString(
" [<a href=\"#%1\" accesskey=\"%2\">%3</a>]\n"
).arg(firstchar).arg(firstchar).arg(firstchar);
indexLine.append(appendixstr);
@@ -1471,7 +1471,7 @@ void MANProtocol::showIndex(const QString& section)
// print footer
os << "</body></html>" << endl;
- infoMessage(QString::null);
+ infoMessage(TQString::null);
mimeType("text/html");
data(array);
finished();
@@ -1481,15 +1481,15 @@ void MANProtocol::listDir(const KURL &url)
{
kdDebug( 7107 ) << "ENTER listDir: " << url.prettyURL() << endl;
- QString title;
- QString section;
+ TQString title;
+ TQString section;
if ( !parseUrl(url.path(), title, section) ) {
error( KIO::ERR_MALFORMED_URL, url.url() );
return;
}
- QStringList list = findPages( section, QString::null, false );
+ TQStringList list = findPages( section, TQString::null, false );
UDSEntryList uds_entry_list;
UDSEntry uds_entry;
@@ -1498,8 +1498,8 @@ void MANProtocol::listDir(const KURL &url)
uds_atom.m_uds = KIO::UDS_NAME; // we only do names...
uds_entry.append( uds_atom );
- QStringList::Iterator it = list.begin();
- QStringList::Iterator end = list.end();
+ TQStringList::Iterator it = list.begin();
+ TQStringList::Iterator end = list.end();
for ( ; it != end; ++it ) {
stripExtension( &(*it) );
@@ -1522,7 +1522,7 @@ void MANProtocol::getProgramPath()
return;
/* sgml2roff isn't found in PATH. Check some possible locations where it may be found. */
- mySgml2RoffPath = KGlobal::dirs()->findExe("sgml2roff", QString(SGML2ROFF_DIRS));
+ mySgml2RoffPath = KGlobal::dirs()->findExe("sgml2roff", TQString(SGML2ROFF_DIRS));
if (!mySgml2RoffPath.isEmpty())
return;
diff --git a/kioslave/man/kio_man.h b/kioslave/man/kio_man.h
index d1d924ce0..617245f80 100644
--- a/kioslave/man/kio_man.h
+++ b/kioslave/man/kio_man.h
@@ -21,24 +21,24 @@
#define __kio_man_h__
-#include <qstring.h>
-#include <qcstring.h>
-#include <qstringlist.h>
-#include <qdict.h>
-#include <qbuffer.h>
+#include <tqstring.h>
+#include <tqcstring.h>
+#include <tqstringlist.h>
+#include <tqdict.h>
+#include <tqbuffer.h>
#include <kio/global.h>
#include <kio/slavebase.h>
-class MANProtocol : public QObject, public KIO::SlaveBase
+class MANProtocol : public TQObject, public KIO::SlaveBase
{
Q_OBJECT
public:
- MANProtocol(const QCString &pool_socket, const QCString &app_socket);
+ MANProtocol(const TQCString &pool_socket, const TQCString &app_socket);
virtual ~MANProtocol();
virtual void get(const KURL& url);
@@ -47,11 +47,11 @@ public:
virtual void mimetype(const KURL &url);
virtual void listDir(const KURL &url);
- void outputError(const QString& errmsg);
- void outputMatchingPages(const QStringList &matchingPages);
+ void outputError(const TQString& errmsg);
+ void outputMatchingPages(const TQStringList &matchingPages);
void showMainIndex();
- void showIndex(const QString& section);
+ void showIndex(const TQString& section);
// the following two functions are the interface to man2html
void output(const char *insert);
@@ -65,35 +65,35 @@ private slots:
private:
void checkManPaths();
- QStringList manDirectories();
- QMap<QString, QString> buildIndexMap(const QString& section);
- bool addWhatIs(QMap<QString, QString>& i, const QString& f, const QString& mark);
- void parseWhatIs( QMap<QString, QString> &i, QTextStream &t, const QString &mark );
- QStringList findPages(const QString& section,
- const QString &title,
+ TQStringList manDirectories();
+ TQMap<TQString, TQString> buildIndexMap(const TQString& section);
+ bool addWhatIs(TQMap<TQString, TQString>& i, const TQString& f, const TQString& mark);
+ void parseWhatIs( TQMap<TQString, TQString> &i, TQTextStream &t, const TQString &mark );
+ TQStringList findPages(const TQString& section,
+ const TQString &title,
bool full_path = true);
void addToBuffer(const char *buffer, int buflen);
- QString pageName(const QString& page) const;
- QStringList buildSectionList(const QStringList& dirs) const;
- void constructPath(QStringList& constr_path, QStringList constr_catmanpath);
+ TQString pageName(const TQString& page) const;
+ TQStringList buildSectionList(const TQStringList& dirs) const;
+ void constructPath(TQStringList& constr_path, TQStringList constr_catmanpath);
private:
static MANProtocol *_self;
- QCString lastdir;
+ TQCString lastdir;
- void findManPagesInSection(const QString &dir, const QString &title, bool full_path, QStringList &list);
- QStringList m_manpath; ///< Path of man directories
- QStringList m_mandbpath; ///< Path of catman directories
- QStringList section_names;
+ void findManPagesInSection(const TQString &dir, const TQString &title, bool full_path, TQStringList &list);
+ TQStringList m_manpath; ///< Path of man directories
+ TQStringList m_mandbpath; ///< Path of catman directories
+ TQStringList section_names;
- QString myStdStream;
- QString mySgml2RoffPath;
+ TQString myStdStream;
+ TQString mySgml2RoffPath;
void getProgramPath();
- QCString m_htmlPath; ///< Path to KDE resources, encoded for HTML
- QCString m_cssPath; ///< Path to KDE resources, encoded for CSS
- QBuffer m_outputBuffer; ///< Buffer for the output
- QString m_manCSSFile; ///< Path to kio_man.css
+ TQCString m_htmlPath; ///< Path to KDE resources, encoded for HTML
+ TQCString m_cssPath; ///< Path to KDE resources, encoded for CSS
+ TQBuffer m_outputBuffer; ///< Buffer for the output
+ TQString m_manCSSFile; ///< Path to kio_man.css
};
diff --git a/kioslave/man/kio_man_test.cpp b/kioslave/man/kio_man_test.cpp
index bfb78a652..44623cb9f 100644
--- a/kioslave/man/kio_man_test.cpp
+++ b/kioslave/man/kio_man_test.cpp
@@ -1,6 +1,6 @@
-#include <qobject.h>
+#include <tqobject.h>
#include "kio_man.h"
@@ -14,7 +14,7 @@ class kio_man_test : public MANProtocol
Q_OBJECT
public:
- kio_man_test(const QCString &pool_socket, const QCString &app_socket);
+ kio_man_test(const TQCString &pool_socket, const TQCString &app_socket);
protected:
virtual void data(int);
diff --git a/kioslave/man/kmanpart.cpp b/kioslave/man/kmanpart.cpp
index 307a8c6b2..b52085596 100644
--- a/kioslave/man/kmanpart.cpp
+++ b/kioslave/man/kmanpart.cpp
@@ -18,7 +18,7 @@
*/
#include "kmanpart.h"
-#include <qstring.h>
+#include <tqstring.h>
#include <kinstance.h>
#include <kglobal.h>
@@ -39,7 +39,7 @@ extern "C"
KInstance* KManPartFactory::s_instance = 0L;
KAboutData* KManPartFactory::s_about = 0L;
-KManPartFactory::KManPartFactory( QObject* parent, const char* name )
+KManPartFactory::KManPartFactory( TQObject* parent, const char* name )
: KParts::Factory( parent, name )
{}
@@ -50,8 +50,8 @@ KManPartFactory::~KManPartFactory()
delete s_about;
}
-KParts::Part* KManPartFactory::createPartObject( QWidget * parentWidget, const char* /*widgetName*/, QObject *,
- const char* name, const char* /*className*/,const QStringList & )
+KParts::Part* KManPartFactory::createPartObject( TQWidget * parentWidget, const char* /*widgetName*/, TQObject *,
+ const char* name, const char* /*className*/,const TQStringList & )
{
KManPart* part = new KManPart(parentWidget, name );
return part;
@@ -69,7 +69,7 @@ KInstance* KManPartFactory::instance()
}
-KManPart::KManPart( QWidget * parent, const char * name )
+KManPart::KManPart( TQWidget * parent, const char * name )
: KHTMLPart( parent, name )
,m_job(0)
{
@@ -95,12 +95,12 @@ bool KManPart::openFile()
url.setPath( m_file );
m_job = KIO::get( url, true, false );
- connect( m_job, SIGNAL( data( KIO::Job *, const QByteArray &) ), SLOT( readData( KIO::Job *, const QByteArray &) ) );
- connect( m_job, SIGNAL( result( KIO::Job * ) ), SLOT( jobDone( KIO::Job * ) ) );
+ connect( m_job, TQT_SIGNAL( data( KIO::Job *, const TQByteArray &) ), TQT_SLOT( readData( KIO::Job *, const TQByteArray &) ) );
+ connect( m_job, TQT_SIGNAL( result( KIO::Job * ) ), TQT_SLOT( jobDone( KIO::Job * ) ) );
return true;
}
-void KManPart::readData(KIO::Job * , const QByteArray & data)
+void KManPart::readData(KIO::Job * , const TQByteArray & data)
{
write(data,data.size());
}
diff --git a/kioslave/man/kmanpart.h b/kioslave/man/kmanpart.h
index f68b68784..f2d9e3891 100644
--- a/kioslave/man/kmanpart.h
+++ b/kioslave/man/kmanpart.h
@@ -28,7 +28,7 @@
#include <kio/job.h>
#include <kio/jobclasses.h>
-#include <qcstring.h>
+#include <tqcstring.h>
class KInstance;
class KAboutData;
@@ -41,12 +41,12 @@ class KManPartFactory: public KParts::Factory
{
Q_OBJECT
public:
- KManPartFactory( QObject * parent = 0, const char * name = 0 );
+ KManPartFactory( TQObject * parent = 0, const char * name = 0 );
virtual ~KManPartFactory();
- virtual KParts::Part* createPartObject( QWidget * parentWidget, const char * widgetName ,
- QObject* parent, const char* name, const char * classname,
- const QStringList &args);
+ virtual KParts::Part* createPartObject( TQWidget * parentWidget, const char * widgetName ,
+ TQObject* parent, const char* name, const char * classname,
+ const TQStringList &args);
static KInstance * instance();
@@ -60,13 +60,13 @@ class KManPart : public KHTMLPart
{
Q_OBJECT
public:
- KManPart( QWidget * parent, const char * name = 0L );
+ KManPart( TQWidget * parent, const char * name = 0L );
KParts::BrowserExtension * extension() {return m_extension;}
public slots:
virtual bool openURL( const KURL &url );
protected slots:
- void readData(KIO::Job * , const QByteArray & data);
+ void readData(KIO::Job * , const TQByteArray & data);
void jobDone( KIO::Job *);
protected:
virtual bool openFile();
diff --git a/kioslave/man/man2html.cpp b/kioslave/man/man2html.cpp
index b502e8edc..089ba239b 100644
--- a/kioslave/man/man2html.cpp
+++ b/kioslave/man/man2html.cpp
@@ -130,11 +130,11 @@
#include <stdio.h>
-#include <qvaluestack.h>
-#include <qstring.h>
-#include <qptrlist.h>
-#include <qmap.h>
-#include <qdatetime.h>
+#include <tqvaluestack.h>
+#include <tqstring.h>
+#include <tqptrlist.h>
+#include <tqmap.h>
+#include <tqdatetime.h>
#ifdef SIMPLE_MAN2HTML
# include <stdlib.h>
@@ -144,7 +144,7 @@
# define kdDebug(x) cerr
# define kdWarning(x) cerr << "WARNING "
#else
-# include <qtextcodec.h>
+# include <tqtextcodec.h>
# include <kdebug.h>
# include <kdeversion.h>
#endif
@@ -233,7 +233,7 @@ public:
StringDefinition( int len, const char* cstr ) : m_length( len ), m_output( cstr ) {}
public:
int m_length; ///< Length of output text
- QCString m_output; ///< Defined string
+ TQCString m_output; ///< Defined string
};
/**
@@ -255,19 +255,19 @@ class NumberDefinition
/**
* Map of character definitions
*/
-static QMap<QCString,StringDefinition> s_characterDefinitionMap;
+static TQMap<TQCString,StringDefinition> s_characterDefinitionMap;
/**
* Map of string variable and macro definitions
* \note String variables and macros are the same thing!
*/
-static QMap<QCString,StringDefinition> s_stringDefinitionMap;
+static TQMap<TQCString,StringDefinition> s_stringDefinitionMap;
/**
* Map of number registers
* \note Intern number registers (starting with a dot are not handled here)
*/
-static QMap<QCString,NumberDefinition> s_numberDefinitionMap;
+static TQMap<TQCString,NumberDefinition> s_numberDefinitionMap;
static void fill_old_character_definitions( void );
@@ -319,7 +319,7 @@ static void InitStringDefinitions( void )
// \*S "Change to default font size"
#ifndef SIMPLE_MAN2HTML
// Special KDE KIO man:
- const QCString kdeversion(KDE_VERSION_STRING);
+ const TQCString kdeversion(KDE_VERSION_STRING);
s_stringDefinitionMap.insert( ".KDE_VERSION_STRING", StringDefinition( kdeversion.length(), kdeversion ) );
#endif
}
@@ -332,7 +332,7 @@ static void InitNumberDefinitions( void )
{
// As the date number registers are more for end-users, better choose local time.
// Groff seems to support Gregorian dates only
- QDate today( QDate::currentDate( Qt::LocalTime ) );
+ TQDate today( TQDate::currentDate( Qt::LocalTime ) );
s_numberDefinitionMap.insert( "year", today.year() ); // Y2K-correct year
s_numberDefinitionMap.insert( "yr", today.year() - 1900 ); // Y2K-incorrect year
s_numberDefinitionMap.insert( "mo", today.month() );
@@ -639,13 +639,13 @@ static int curpos=0;
static char *scan_troff(char *c, bool san, char **result);
static char *scan_troff_mandoc(char *c, bool san, char **result);
-static QValueList<char*> s_argumentList;
+static TQValueList<char*> s_argumentList;
-static QCString htmlPath, cssPath;
+static TQCString htmlPath, cssPath;
-static QCString s_dollarZero; // Value of $0
+static TQCString s_dollarZero; // Value of $0
-void setResourcePath(const QCString& _htmlPath, const QCString& _cssPath)
+void setResourcePath(const TQCString& _htmlPath, const TQCString& _cssPath)
{
htmlPath=_htmlPath;
cssPath=_cssPath;
@@ -657,7 +657,7 @@ static void fill_old_character_definitions( void )
{
const int nr = standardchar[i].nr;
const char temp[3] = { nr / 256, nr % 256, 0 };
- QCString name( temp );
+ TQCString name( temp );
s_characterDefinitionMap.insert( name, StringDefinition( standardchar[i].slen, standardchar[i].st ) );
}
}
@@ -733,11 +733,11 @@ static void add_links(char *c)
if (g!=c) {
- QCString dir;
- QCString file(g, h - g + 1);
+ TQCString dir;
+ TQCString file(g, h - g + 1);
file = file.stripWhiteSpace();
for (int index = 0; includedirs[index]; index++) {
- QCString str = QCString(includedirs[index]) + "/" + file;
+ TQCString str = TQCString(includedirs[index]) + "/" + file;
if (!access(str, R_OK)) {
dir = includedirs[index];
break;
@@ -751,7 +751,7 @@ static void add_links(char *c)
output_real(c);
*g=t;*h=0;
- QCString str;
+ TQCString str;
str.sprintf("<A HREF=\"file:%s/%s\">%s</A>&gt;", dir.data(), file.data(), file.data());
output_real(str.data());
c=f+6;
@@ -817,8 +817,8 @@ static void add_links(char *c)
}
if (isalnum(*h)) {
char t,sec, *e;
- QString subsec; // ### TODO avoid using QString, as we do not know the encoding
- QString fstr(f); // ### TODO avoid using QString, as we do not know the encoding
+ TQString subsec; // ### TODO avoid using TQString, as we do not know the encoding
+ TQString fstr(f); // ### TODO avoid using TQString, as we do not know the encoding
e=h+1;
sec=f[1];
subsec=f[2];
@@ -836,7 +836,7 @@ static void add_links(char *c)
*h=t;
t=*e;
*e='\0';
- QCString str;
+ TQCString str;
if (subsec.isEmpty())
str.sprintf("<A HREF=\"man:%s(%c)\">%s</A>", h, sec, h);
else
@@ -863,7 +863,7 @@ static void add_links(char *c)
t=*f; *f='\0';
output_real(c);
*f=t; t=*g;*g='\0';
- QCString str;
+ TQCString str;
str.sprintf("<A HREF=\"%s://%s\">%s</A>", ((j==3)?"ftp":"http"), f, f);
output_real(str.data());
*g=t;
@@ -895,7 +895,7 @@ static void add_links(char *c)
*g='\0';
output_real(c);
*g=t;t=*h;*h='\0';
- QCString str;
+ TQCString str;
str.sprintf("<A HREF=\"mailto:%s\">%s</A>", g, g);
output_real(str.data());
*h=t;
@@ -920,7 +920,7 @@ static void add_links(char *c)
*g='\0';
output_real(c);
*g=t; t=*h; *h='\0';
- QCString str;
+ TQCString str;
str.sprintf("<A HREF=\"%s\">%s</A>", g, g);
output_real(str.data());
*h=t;
@@ -947,7 +947,7 @@ static void add_links(char *c)
output_real(c);
}
-static QCString current_font;
+static TQCString current_font;
static int current_size=0;
static int fillout=1;
@@ -1007,10 +1007,10 @@ static void out_html(const char *c)
delete [] c3;
}
-static QCString set_font( const QCString& name )
+static TQCString set_font( const TQCString& name )
{
// Every font but R (Regular) creates <span> elements
- QCString markup;
+ TQCString markup;
if ( current_font != "R" && !current_font.isEmpty() )
markup += "</span>";
const uint len = name.length();
@@ -1075,18 +1075,18 @@ static QCString set_font( const QCString& name )
}
/// \deprecated
-static QCString set_font( const char ch )
+static TQCString set_font( const char ch )
#ifndef SIMPLE_MAN2HTML
KDE_DEPRECATED;
-static QCString set_font( const char ch )
+static TQCString set_font( const char ch )
#endif
{
- const QCString name = &ch;
+ const TQCString name = &ch;
return set_font( name );
}
-static QCString change_to_size(int nr)
+static TQCString change_to_size(int nr)
{
switch (nr)
{
@@ -1097,8 +1097,8 @@ static QCString change_to_size(int nr)
}
if ( nr == current_size )
return "";
- const QCString font ( current_font );
- QCString markup;
+ const TQCString font ( current_font );
+ TQCString markup;
markup = set_font("R");
if (current_size)
markup += "</FONT>";
@@ -1128,21 +1128,21 @@ static int intresult=0;
static bool skip_escape=false;
static bool single_escape=false;
-static char *scan_escape_direct( char *c, QCString& cstr );
+static char *scan_escape_direct( char *c, TQCString& cstr );
/**
* scan a named character
* param c position
*/
-static QCString scan_named_character( char*& c )
+static TQCString scan_named_character( char*& c )
{
- QCString name;
+ TQCString name;
if ( *c == '(' )
{
// \*(ab Name of two characters
if ( c[1] == escapesym )
{
- QCString cstr;
+ TQCString cstr;
c = scan_escape_direct( c+2, cstr );
// ### HACK: as we convert characters too early to HTML, we need to support more than 2 characters here and assume that all characters passed by the variable are to be used.
name = cstr;
@@ -1164,7 +1164,7 @@ static QCString scan_named_character( char*& c )
{
if ( *c == escapesym )
{
- QCString cstr;
+ TQCString cstr;
c = scan_escape_direct( c+1, cstr );
const int result = cstr.find(']');
if ( result == -1 )
@@ -1196,7 +1196,7 @@ static QCString scan_named_character( char*& c )
{
if ( *c == escapesym )
{
- QCString cstr;
+ TQCString cstr;
c = scan_escape_direct( c+1, cstr );
const int result = cstr.find('\'');
if ( result == -1 )
@@ -1223,7 +1223,7 @@ static QCString scan_named_character( char*& c )
// Note: characters with a one character length name doe not exist, as they would collide with other escapes
// Now we have the name, let us find it between the string names
- QMap<QCString,StringDefinition>::iterator it=s_characterDefinitionMap.find(name);
+ TQMap<TQCString,StringDefinition>::iterator it=s_characterDefinitionMap.find(name);
if (it==s_characterDefinitionMap.end())
{
kdDebug(7107) << "EXCEPTION: cannot find character with name: " << name << endl;
@@ -1237,15 +1237,15 @@ static QCString scan_named_character( char*& c )
}
}
-static QCString scan_named_string(char*& c)
+static TQCString scan_named_string(char*& c)
{
- QCString name;
+ TQCString name;
if ( *c == '(' )
{
// \*(ab Name of two characters
if ( c[1] == escapesym )
{
- QCString cstr;
+ TQCString cstr;
c = scan_escape_direct( c+2, cstr );
kdDebug(7107) << "\\(" << cstr << endl;
// ### HACK: as we convert characters too early to HTML, we need to support more than 2 characters here and assume that all characters passed by the variable are to be used.
@@ -1268,7 +1268,7 @@ static QCString scan_named_string(char*& c)
{
if ( *c == escapesym )
{
- QCString cstr;
+ TQCString cstr;
c = scan_escape_direct( c+1, cstr );
const int result = cstr.find(']');
if ( result == -1 )
@@ -1299,7 +1299,7 @@ static QCString scan_named_string(char*& c)
c++;
}
// Now we have the name, let us find it between the string names
- QMap<QCString,StringDefinition>::iterator it=s_stringDefinitionMap.find(name);
+ TQMap<TQCString,StringDefinition>::iterator it=s_stringDefinitionMap.find(name);
if (it==s_stringDefinitionMap.end())
{
kdDebug(7107) << "EXCEPTION: cannot find string with name: " << name << endl;
@@ -1313,7 +1313,7 @@ static QCString scan_named_string(char*& c)
}
}
-static QCString scan_dollar_parameter(char*& c)
+static TQCString scan_dollar_parameter(char*& c)
{
unsigned int argno = 0; // No dollar argument number yet!
if ( *c == '0' )
@@ -1367,8 +1367,8 @@ static QCString scan_dollar_parameter(char*& c)
else if ( ( *c == '*' ) || ( *c == '@' ) )
{
const bool quote = ( *c == '@' );
- QValueList<char*>::const_iterator it = s_argumentList.begin();
- QCString param;
+ TQValueList<char*>::const_iterator it = s_argumentList.begin();
+ TQCString param;
bool space = false;
for ( ; it != s_argumentList.end(); ++it )
{
@@ -1406,7 +1406,7 @@ static QCString scan_dollar_parameter(char*& c)
}
/// return the value of read-only number registers
-static int read_only_number_register( const QCString& name )
+static int read_only_number_register( const TQCString& name )
{
// Internal read-only variables
if ( name == ".$" )
@@ -1459,7 +1459,7 @@ static int scan_number_register( char*& c)
case '-': sign = -1; c++; break;
default: break;
}
- QCString name;
+ TQCString name;
if ( *c == '[' )
{
c++;
@@ -1514,7 +1514,7 @@ static int scan_number_register( char*& c)
}
else
{
- QMap< QCString, NumberDefinition >::iterator it = s_numberDefinitionMap.find( name );
+ TQMap< TQCString, NumberDefinition >::iterator it = s_numberDefinitionMap.find( name );
if ( it == s_numberDefinitionMap.end() )
{
return 0; // Undefined variable
@@ -1528,15 +1528,15 @@ static int scan_number_register( char*& c)
}
/// get and set font
-static QCString scan_named_font( char*& c )
+static TQCString scan_named_font( char*& c )
{
- QCString name;
+ TQCString name;
if ( *c == '(' )
{
// \f(ab Name of two characters
if ( c[1] == escapesym )
{
- QCString cstr;
+ TQCString cstr;
c = scan_escape_direct( c+2, cstr );
kdDebug(7107) << "\\(" << cstr << endl;
// ### HACK: as we convert characters too early to HTML, we need to support more than 2 characters here and assume that all characters passed by the variable are to be used.
@@ -1558,7 +1558,7 @@ static QCString scan_named_font( char*& c )
{
if ( *c == escapesym )
{
- QCString cstr;
+ TQCString cstr;
c = scan_escape_direct( c+1, cstr );
const int result = cstr.find(']');
if ( result == -1 )
@@ -1617,9 +1617,9 @@ static QCString scan_named_font( char*& c )
return "";
}
-static QCString scan_number_code( char*& c )
+static TQCString scan_number_code( char*& c )
{
- QCString number;
+ TQCString number;
if ( *c != '\'' )
return "";
while ( *c && ( *c != '\n' ) && ( *c != '\'' ) )
@@ -1647,7 +1647,7 @@ static QCString scan_number_code( char*& c )
// ### TODO known missing escapes from groff(7):
// ### TODO \& \! \) \: \R
-static char *scan_escape_direct( char *c, QCString& cstr )
+static char *scan_escape_direct( char *c, TQCString& cstr )
{
bool exoutputp;
bool exskipescape;
@@ -1682,7 +1682,7 @@ static char *scan_escape_direct( char *c, QCString& cstr )
c--;
}
else
- cstr = QCString( c, 1 );
+ cstr = TQCString( c, 1 );
break;
}
case 'k': c++; if (*c=='(') c+=2; // ### FIXME \k[REG] exists too
@@ -1807,7 +1807,7 @@ static char *scan_escape_direct( char *c, QCString& cstr )
if (*++c) c++; // c += 2
if (sscanf(c, "%d", &i) != 1) // (### FIXME ugly!)
break;
- QCString temp;
+ TQCString temp;
temp.sprintf( "%d", i ); // Skip over number (### FIXME ugly!)
c += temp.length();
switch(i) {
@@ -1831,7 +1831,7 @@ static char *scan_escape_direct( char *c, QCString& cstr )
static char *scan_escape(char *c)
{
- QCString cstr;
+ TQCString cstr;
char* result = scan_escape_direct( c, cstr );
if ( !skip_escape )
out_html(cstr);
@@ -1916,7 +1916,7 @@ public:
TABLEROW *prev, *next;
private:
- QPtrList<TABLEITEM> items;
+ TQPtrList<TABLEITEM> items;
};
TABLEITEM::TABLEITEM(TABLEROW *row) : contents(0), _parent(row) {
@@ -1927,7 +1927,7 @@ TABLEITEM::TABLEITEM(TABLEROW *row) : contents(0), _parent(row) {
TABLEROW *TABLEROW::copyLayout() const {
TABLEROW *newrow = new TABLEROW();
- QPtrListIterator<TABLEITEM> it(items);
+ TQPtrListIterator<TABLEITEM> it(items);
for ( ; it.current(); ++it) {
TABLEITEM *newitem = new TABLEITEM(newrow);
newitem->copyLayout(it.current());
@@ -2063,7 +2063,7 @@ static char *scan_table(char *c)
char *g;
int center=0, expand=0, box=0, border=0, linesize=1;
int i,j,maxcol=0, finished=0;
- QCString oldfont;
+ TQCString oldfont;
int oldsize,oldfillout;
char itemsep='\t';
TABLEROW *layout=NULL, *currow;
@@ -2775,8 +2775,8 @@ static void request_while( char*& c, int j, bool mdoc )
char* newline = skip_till_newline( c );
const char oldchar = *newline;
*newline = 0;
- // We store the full .while stuff into a QCString as if it would be a macro
- const QCString macro = c ;
+ // We store the full .while stuff into a TQCString as if it would be a macro
+ const TQCString macro = c ;
kdDebug(7107) << "'Macro' of .while" << endl << macro << endl;
// Prepare for continuing after .while loop end
*newline = oldchar;
@@ -3039,7 +3039,7 @@ static int get_request(char *req, int len)
// &%(#@ c programs !!!
//static int ifelseval=0;
// If/else can be nested!
-static QValueStack<int> s_ifelseval;
+static TQValueStack<int> s_ifelseval;
// Process a (mdoc) request involving quotes
static char* process_quote(char* c, int j, const char* open, const char* close)
@@ -3088,7 +3088,7 @@ static bool is_identifier_char( const char c )
return false;
}
-static QCString scan_identifier( char*& c )
+static TQCString scan_identifier( char*& c )
{
char* h = c; // help pointer
// ### TODO Groff seems to eat nearly everything as identifier name (info:/groff/Identifiers)
@@ -3096,7 +3096,7 @@ static QCString scan_identifier( char*& c )
++h;
const char tempchar = *h;
*h = 0;
- const QCString name = c;
+ const TQCString name = c;
*h = tempchar;
if ( name.isEmpty() )
{
@@ -3140,7 +3140,7 @@ static char *scan_request(char *c)
else
{
int nlen = 0;
- QCString macroName;
+ TQCString macroName;
while (c[nlen] && (c[nlen] != ' ') && (c[nlen] != '\t') && (c[nlen] != '\n') && (c[nlen] != escapesym))
{
macroName+=c[nlen];
@@ -3149,11 +3149,11 @@ static char *scan_request(char *c)
int j = nlen;
while (c[j] && c[j]==' ' || c[j]=='\t') j++;
/* search macro database of self-defined macros */
- QMap<QCString,StringDefinition>::iterator it=s_stringDefinitionMap.find(macroName);
+ TQMap<TQCString,StringDefinition>::iterator it=s_stringDefinitionMap.find(macroName);
if (it!=s_stringDefinitionMap.end())
{
kdDebug(7107) << "CALLING MACRO: " << macroName << endl;
- const QCString oldDollarZero = s_dollarZero; // Previous value of $0
+ const TQCString oldDollarZero = s_dollarZero; // Previous value of $0
s_dollarZero = macroName;
sl=fill_words(c+j, wordlist, &words, true, &c);
*sl='\0';
@@ -3176,7 +3176,7 @@ static char *scan_request(char *c)
char* work = new char [length+2];
work[0] = '\n'; // The macro must start after an end of line to allow a request on first line
qstrncpy(work+1,(*it).m_output.data(),length+1);
- const QValueList<char*> oldArgumentList( s_argumentList );
+ const TQValueList<char*> oldArgumentList( s_argumentList );
s_argumentList.clear();
for ( i = 0 ; i < max_wordlist; i++ )
{
@@ -3233,7 +3233,7 @@ static char *scan_request(char *c)
++c;
break;
}
- const QCString name ( scan_identifier( c ) );
+ const TQCString name ( scan_identifier( c ) );
while (*c && *c!='\n') c++;
c++;
h=c;
@@ -3241,7 +3241,7 @@ static char *scan_request(char *c)
*c='\0';
char* result=0;
scan_troff(h,0,&result);
- QMap<QCString,StringDefinition>::iterator it=s_stringDefinitionMap.find(name);
+ TQMap<TQCString,StringDefinition>::iterator it=s_stringDefinitionMap.find(name);
if (it==s_stringDefinitionMap.end())
{
StringDefinition def;
@@ -3267,7 +3267,7 @@ static char *scan_request(char *c)
kdDebug(7107) << "start .ds/.as" << endl;
int oldcurpos=curpos;
c+=j;
- const QCString name( scan_identifier( c) );
+ const TQCString name( scan_identifier( c) );
if ( name.isEmpty() )
break;
while (*c && isspace(*c)) c++;
@@ -3276,7 +3276,7 @@ static char *scan_request(char *c)
curpos=0;
char* result=0;
c=scan_troff(c,1,&result);
- QMap<QCString,StringDefinition>::iterator it=s_stringDefinitionMap.find(name);
+ TQMap<TQCString,StringDefinition>::iterator it=s_stringDefinitionMap.find(name);
if (it==s_stringDefinitionMap.end())
{
StringDefinition def;
@@ -3424,7 +3424,7 @@ static char *scan_request(char *c)
h = skip_till_newline( c );
const char oldChar = *h;
*h = 0;
- const QCString name = c;
+ const TQCString name = c;
// ### TODO: name might contain a variable
if ( name.isEmpty() )
out_html( set_font( "P" ) ); // Previous font
@@ -4075,7 +4075,7 @@ static char *scan_request(char *c)
#else
// kio_man transforms from local to UTF-8
out_html("<meta http-equiv=\"Content-Type\" content=\"text/html; charset=");
- out_html(QTextCodec::codecForLocale()->mimeName());
+ out_html(TQTextCodec::codecForLocale()->mimeName());
out_html("\">\n");
#endif
out_html("<TITLE>");
@@ -4163,13 +4163,13 @@ static char *scan_request(char *c)
{
kdDebug(7107) << "start .rm/.rn" << endl;
c+=j;
- const QCString name( scan_identifier( c ) );
+ const TQCString name( scan_identifier( c ) );
if ( name.isEmpty() )
{
kdDebug(7107) << "EXCEPTION: empty origin string to remove/rename: " << endl;
break;
}
- QCString name2;
+ TQCString name2;
if ( !mode )
{
while (*c && isspace(*c) && *c!='\n') ++c;
@@ -4181,7 +4181,7 @@ static char *scan_request(char *c)
}
}
c=skip_till_newline(c);
- QMap<QCString,StringDefinition>::iterator it=s_stringDefinitionMap.find(name);
+ TQMap<TQCString,StringDefinition>::iterator it=s_stringDefinitionMap.find(name);
if (it==s_stringDefinitionMap.end())
{
kdDebug(7107) << "EXCEPTION: cannot find string to rename or remove: " << name << endl;
@@ -4216,7 +4216,7 @@ static char *scan_request(char *c)
{
kdDebug(7107) << "start .nr" << endl;
c += j;
- const QCString name( scan_identifier( c ) );
+ const TQCString name( scan_identifier( c ) );
if ( name.isEmpty() )
{
kdDebug(7107) << "EXCEPTION: empty name for register variable" << endl;
@@ -4240,7 +4240,7 @@ static char *scan_request(char *c)
c=scan_expression( c, &increment );
}
c = skip_till_newline( c );
- QMap <QCString, NumberDefinition>::iterator it = s_numberDefinitionMap.find( name );
+ TQMap <TQCString, NumberDefinition>::iterator it = s_numberDefinitionMap.find( name );
if ( it == s_numberDefinitionMap.end() )
{
if ( sign < 1 )
@@ -4277,9 +4277,9 @@ static char *scan_request(char *c)
c = nameStart;
while (*c && (*c != ' ') && (*c != '\n')) c++;
*c = '\0';
- const QCString name(nameStart);
+ const TQCString name(nameStart);
- QCString endmacro;
+ TQCString endmacro;
if (words == 1)
{
endmacro="..";
@@ -4297,7 +4297,7 @@ static char *scan_request(char *c)
while (*c && qstrncmp(c,endmacro,length))
c=skip_till_newline(c);
- QCString macro;
+ TQCString macro;
while (sl!=c)
{
if (sl[0]=='\\' && sl[1]=='\\')
@@ -4310,7 +4310,7 @@ static char *scan_request(char *c)
sl++;
}
- QMap<QCString,StringDefinition>::iterator it=s_stringDefinitionMap.find(name);
+ TQMap<TQCString,StringDefinition>::iterator it=s_stringDefinitionMap.find(name);
if (it==s_stringDefinitionMap.end())
{
StringDefinition def;
@@ -5069,14 +5069,14 @@ static char *scan_request(char *c)
// Be careful: unlike .rn, the destination is first, origin is second
kdDebug(7107) << "start .als" << endl;
c+=j;
- const QCString name ( scan_identifier( c ) );
+ const TQCString name ( scan_identifier( c ) );
if ( name.isEmpty() )
{
kdDebug(7107) << "EXCEPTION: empty destination string to alias" << endl;
break;
}
while (*c && isspace(*c) && *c!='\n') ++c;
- const QCString name2 ( scan_identifier ( c ) );
+ const TQCString name2 ( scan_identifier ( c ) );
if ( name2.isEmpty() )
{
kdDebug(7107) << "EXCEPTION: empty origin string to alias" << endl;
@@ -5090,7 +5090,7 @@ static char *scan_request(char *c)
break;
}
// Second parametr is origin (unlike in .rn)
- QMap<QCString,StringDefinition>::iterator it=s_stringDefinitionMap.find(name2);
+ TQMap<TQCString,StringDefinition>::iterator it=s_stringDefinitionMap.find(name2);
if (it==s_stringDefinitionMap.end())
{
kdDebug(7107) << "EXCEPTION: cannot find string to make alias: " << name2 << endl;
@@ -5107,14 +5107,14 @@ static char *scan_request(char *c)
{
kdDebug(7107) << "start .rr" << endl;
c += j;
- const QCString name ( scan_identifier( c ) );
+ const TQCString name ( scan_identifier( c ) );
if ( name.isEmpty() )
{
kdDebug(7107) << "EXCEPTION: empty origin string to remove/rename: " << endl;
break;
}
c = skip_till_newline( c );
- QMap <QCString, NumberDefinition>::iterator it = s_numberDefinitionMap.find( name );
+ TQMap <TQCString, NumberDefinition>::iterator it = s_numberDefinitionMap.find( name );
if ( it == s_numberDefinitionMap.end() )
{
kdDebug(7107) << "EXCEPTION: trying to remove inexistant number register: " << endl;
@@ -5130,21 +5130,21 @@ static char *scan_request(char *c)
{
kdDebug(7107) << "start .rnn" << endl;
c+=j;
- const QCString name ( scan_identifier ( c ) );
+ const TQCString name ( scan_identifier ( c ) );
if ( name.isEmpty() )
{
kdDebug(7107) << "EXCEPTION: empty origin to remove/rename number register" << endl;
break;
}
while (*c && isspace(*c) && *c!='\n') ++c;
- const QCString name2 ( scan_identifier ( c ) );
+ const TQCString name2 ( scan_identifier ( c ) );
if ( name2.isEmpty() )
{
kdDebug(7107) << "EXCEPTION: empty destination to rename number register " << endl;
break;
}
c = skip_till_newline( c );
- QMap<QCString,NumberDefinition>::iterator it=s_numberDefinitionMap.find(name);
+ TQMap<TQCString,NumberDefinition>::iterator it=s_numberDefinitionMap.find(name);
if (it==s_numberDefinitionMap.end())
{
kdDebug(7107) << "EXCEPTION: cannot find number register to rename: " << name << endl;
@@ -5167,14 +5167,14 @@ static char *scan_request(char *c)
// Be careful: unlike .rnn, the destination is first, origin is second
kdDebug(7107) << "start .aln" << endl;
c+=j;
- const QCString name ( scan_identifier( c ) );
+ const TQCString name ( scan_identifier( c ) );
if ( name.isEmpty() )
{
kdDebug(7107) << "EXCEPTION: empty destination number register to alias" << endl;
break;
}
while (*c && isspace(*c) && *c!='\n') ++c;
- const QCString name2 ( scan_identifier( c ) );
+ const TQCString name2 ( scan_identifier( c ) );
if ( name2.isEmpty() )
{
kdDebug(7107) << "EXCEPTION: empty origin number register to alias" << endl;
@@ -5188,7 +5188,7 @@ static char *scan_request(char *c)
break;
}
// Second parametr is origin (unlike in .rnn)
- QMap<QCString,NumberDefinition>::iterator it=s_numberDefinitionMap.find(name2);
+ TQMap<TQCString,NumberDefinition>::iterator it=s_numberDefinitionMap.find(name2);
if (it==s_numberDefinitionMap.end())
{
kdDebug(7107) << "EXCEPTION: cannot find string to make alias: " << name2 << endl;
@@ -5208,7 +5208,7 @@ static char *scan_request(char *c)
while (*h && *h!='\n' && isdigit(*h) ) ++h;
const char tempchar = *h;
*h = 0;
- const QCString number = c;
+ const TQCString number = c;
*h = tempchar;
c = skip_till_newline( h );
unsigned int result = 1; // Numbers of shifts to do
diff --git a/kioslave/man/man2html.h b/kioslave/man/man2html.h
index ab672c4e5..e4d19a87b 100644
--- a/kioslave/man/man2html.h
+++ b/kioslave/man/man2html.h
@@ -6,7 +6,7 @@
*
*/
-#include <qcstring.h>
+#include <tqcstring.h>
/** call this with the buffer you have */
void scan_man_page(const char *man_page);
@@ -19,7 +19,7 @@ void scan_man_page(const char *man_page);
* \since 3.5
*
*/
-extern void setResourcePath(const QCString& _htmlPath, const QCString& _cssPath);
+extern void setResourcePath(const TQCString& _htmlPath, const TQCString& _cssPath);
/** implement this somewhere. It will be called
with HTML contents