diff options
Diffstat (limited to 'src/data/syntax_xml_generator.cpp')
-rw-r--r-- | src/data/syntax_xml_generator.cpp | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/src/data/syntax_xml_generator.cpp b/src/data/syntax_xml_generator.cpp index 9f3553e..d1d44b5 100644 --- a/src/data/syntax_xml_generator.cpp +++ b/src/data/syntax_xml_generator.cpp @@ -10,8 +10,8 @@ // this program generate xml files for kate highlighting // the original syntax file was created by Alain Gibaud -#include <qfile.h> -#include <qtextstream.h> +#include <tqfile.h> +#include <tqtextstream.h> const char * const DIRECTIVES[] = { "__badram", "__config", "__idlocs", "__maxram", @@ -58,28 +58,28 @@ const char * const INSTRUCTIONS[] = { "tris", "tblrd", "tblwt", "xorlw", "xorwf", 0 }; -QTextStream *initFile(QFile &file) +TQTextStream *initFile(TQFile &file) { if ( !file.open(IO_WriteOnly) ) qFatal("Cannot create \"%s\".", file.name().latin1()); - QTextStream *s = new QTextStream(&file); + TQTextStream *s = new TQTextStream(&file); (*s) << "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" << endl; (*s) << "<!DOCTYPE language SYSTEM \"language.dtd\">" << endl; (*s) << "<!--This file is generated. Do not edit.-->" << endl; return s; } -void addList(QTextStream &s, const QString &name, const char * const *items, bool upper) +void addList(TQTextStream &s, const TQString &name, const char * const *items, bool upper) { s << " <list name=\"" << name << "\">" << endl; for (uint i=0; items[i]; i++) { s << " <item>" << items[i] << "</item>"; - if (upper) s << "<item>" << QString(items[i]).upper() << "</item>"; + if (upper) s << "<item>" << TQString(items[i]).upper() << "</item>"; s << endl; }; s <<" </list>" << endl; } -void addCommon(QTextStream &s) +void addCommon(TQTextStream &s) { addList(s, "instructions", INSTRUCTIONS, true); s << endl; @@ -106,7 +106,7 @@ void addCommon(QTextStream &s) s << " <context name=\"normal\" attribute=\"Normal Text\" lineEndContext=\"#stay\">" << endl; } -void addAsmContexts(QTextStream &s) +void addAsmContexts(TQTextStream &s) { s << " <keyword attribute=\"Directives\" context=\"#stay\" String=\"directives\"/>" << endl; s << " <keyword attribute=\"Instructions\" context=\"#stay\" String=\"instructions\"/>" << endl; @@ -161,7 +161,7 @@ void addAsmContexts(QTextStream &s) s << " </context>" << endl; } -void endFile(QTextStream &s) +void endFile(TQTextStream &s) { s << " </contexts>" << endl; s << "</highlighting>" << endl; @@ -178,8 +178,8 @@ void endFile(QTextStream &s) int main(int, char **) { - QFile afile("asm-pic.xml"); - QTextStream *s = initFile(afile); + TQFile afile("asm-pic.xml"); + TQTextStream *s = initFile(afile); (*s) << "<language name=\"XPicAsm\" version=\"1.5\" kateversion=\"2.0\" section=\"Sources\"" << endl; (*s) << " extensions=\"*.src;*.SRC;*.asm;*.ASM;*.slb;*.SLB;*.pic;*.PIC;*.inc;*.INC;*.pic12;*.pic14;*.PIC12;*.PIC14;*.pic16;*.PIC16\"" << endl; (*s) << " mimetype=\"text/x-PicSrc;text/x-PicHdr\">" << endl; @@ -194,7 +194,7 @@ int main(int, char **) addAsmContexts(*s); endFile(*s); - QFile cfile("coff-pic.xml"); + TQFile cfile("coff-pic.xml"); s = initFile(cfile); (*s) << "<language name=\"XCoffDisasm\" version=\"1.2\" kateversion=\"2.0\" section=\"Sources\">" << endl; (*s) << endl; |