diff options
Diffstat (limited to 'src/codecs/qbig5codec.cpp')
-rw-r--r-- | src/codecs/qbig5codec.cpp | 64 |
1 files changed, 32 insertions, 32 deletions
diff --git a/src/codecs/qbig5codec.cpp b/src/codecs/qbig5codec.cpp index efb90ff39..49ebce4e7 100644 --- a/src/codecs/qbig5codec.cpp +++ b/src/codecs/qbig5codec.cpp @@ -531,7 +531,7 @@ static int qt_UnicodeToBig5(ushort ch, uchar *buf) int TQBig5Codec::mibEnum() const { /* See http://www.iana.org/assignments/character-sets */ - //qDebug("TQBig5Codec::mibEnum() = 2026"); + //tqDebug("TQBig5Codec::mibEnum() = 2026"); return 2026; } @@ -539,7 +539,7 @@ int TQBig5Codec::mibEnum() const /*! \reimp */ const char* TQBig5Codec::name() const { - //qDebug("TQBig5Codec::name() = \"Big5\""); + //tqDebug("TQBig5Codec::name() = \"Big5\""); return "Big5"; } @@ -554,7 +554,7 @@ public: TQString toUnicode(const char* chars, int len) { - //qDebug("TQBig5Decoder::toUnicode(const char* chars = \"%s\", int len = %d)", chars, len); + //tqDebug("TQBig5Decoder::toUnicode(const char* chars = \"%s\", int len = %d)", chars, len); TQString result; for (int i=0; i<len; i++) { uchar ch = chars[i]; @@ -599,7 +599,7 @@ public: /*! \reimp */ TQTextDecoder* TQBig5Codec::makeDecoder() const { - //qDebug("TQBig5Codec::makeDecoder()"); + //tqDebug("TQBig5Codec::makeDecoder()"); return new TQBig5Decoder(); } @@ -607,7 +607,7 @@ TQTextDecoder* TQBig5Codec::makeDecoder() const /*! \reimp */ TQCString TQBig5Codec::fromUnicode(const TQString& uc, int& lenInOut) const { - //qDebug("TQBig5Codec::fromUnicode(const TQString& uc, int& lenInOut = %d)", lenInOut); + //tqDebug("TQBig5Codec::fromUnicode(const TQString& uc, int& lenInOut = %d)", lenInOut); int l = TQMIN((int)uc.length(),lenInOut); int rlen = l*3+1; TQCString rstr(rlen); @@ -639,7 +639,7 @@ TQCString TQBig5Codec::fromUnicode(const TQString& uc, int& lenInOut) const /*! \reimp */ TQString TQBig5Codec::toUnicode(const char* chars, int len) const { - //qDebug("TQBig5Codec::toUnicode(const char* chars \"%s\", int len = %d)", chars, len); + //tqDebug("TQBig5Codec::toUnicode(const char* chars \"%s\", int len = %d)", chars, len); TQString result; for (int i=0; i<len; i++) { uchar ch = chars[i]; @@ -677,7 +677,7 @@ TQString TQBig5Codec::toUnicode(const char* chars, int len) const /*! \reimp */ int TQBig5Codec::heuristicContentMatch(const char* chars, int len) const { - //qDebug("TQBig5Codec::heuristicContentMatch(const char* chars, int len = %d)", len); + //tqDebug("TQBig5Codec::heuristicContentMatch(const char* chars, int len = %d)", len); int score = 0; for (int i=0; i<len; i++) { uchar ch = chars[i]; @@ -705,7 +705,7 @@ int TQBig5Codec::heuristicContentMatch(const char* chars, int len) const return -1; } } - //qDebug("TQBig5Codec::heuristicContentMatch() score = %d", score); + //tqDebug("TQBig5Codec::heuristicContentMatch() score = %d", score); return score; } @@ -713,15 +713,15 @@ int TQBig5Codec::heuristicContentMatch(const char* chars, int len) const /*! \reimp */ int TQBig5Codec::heuristicNameMatch(const char* hint) const { - //qDebug("TQBig5hkscsCodec::heuristicNameMatch(const char* hint = \"%s\")", hint); + //tqDebug("TQBig5hkscsCodec::heuristicNameMatch(const char* hint = \"%s\")", hint); int score = 0; bool zh = FALSE; - if (qstrnicmp(hint, "zh_TW", 5) == 0) { + if (tqstrnicmp(hint, "zh_TW", 5) == 0) { score += 16; zh = TRUE; } - else if ( qstrnicmp(hint, "zh", 2) == 0 || - qstrnicmp(hint, "chinese", 7) == 0) { + else if ( tqstrnicmp(hint, "zh", 2) == 0 || + tqstrnicmp(hint, "chinese", 7) == 0) { score += 2; zh = TRUE; } @@ -735,11 +735,11 @@ int TQBig5Codec::heuristicNameMatch(const char* hint) const p = hint; } if (p) { - if ( qstricmp(p, "Big5") == 0 || - qstricmp(p, "TW-Big5") == 0 ) { + if ( tqstricmp(p, "Big5") == 0 || + tqstricmp(p, "TW-Big5") == 0 ) { return score + 10; } - else if ( qstrnicmp(p, "Big5", 4) == 0 ) + else if ( tqstrnicmp(p, "Big5", 4) == 0 ) return score + 2; } return TQTextCodec::heuristicNameMatch(hint); @@ -817,7 +817,7 @@ int TQBig5hkscsCodec::mibEnum() const { /* See http://www.iana.org/assignments/character-sets */ /* http://www.iana.org/assignments/charset-reg/Big5-HKSCS */ - //qDebug("TQBig5hkscsCodec::mibEnum() = 2101"); + //tqDebug("TQBig5hkscsCodec::mibEnum() = 2101"); return 2101; } @@ -825,7 +825,7 @@ int TQBig5hkscsCodec::mibEnum() const /*! \reimp */ const char* TQBig5hkscsCodec::name() const { - //qDebug("TQBig5hkscsCodec::name() = \"Big5-HKSCS\""); + //tqDebug("TQBig5hkscsCodec::name() = \"Big5-HKSCS\""); return "Big5-HKSCS"; } @@ -840,7 +840,7 @@ public: TQString toUnicode(const char* chars, int len) { - //qDebug("TQBig5hkscsDecoder::toUnicode(const char* chars = \"%s\", int len = %d)", chars, len); + //tqDebug("TQBig5hkscsDecoder::toUnicode(const char* chars = \"%s\", int len = %d)", chars, len); TQString result; for (int i=0; i<len; i++) { uchar ch = chars[i]; @@ -885,7 +885,7 @@ public: /*! \reimp */ TQTextDecoder* TQBig5hkscsCodec::makeDecoder() const { - //qDebug("TQBig5hkscsCodec::makeDecoder()"); + //tqDebug("TQBig5hkscsCodec::makeDecoder()"); return new TQBig5hkscsDecoder(); } @@ -893,7 +893,7 @@ TQTextDecoder* TQBig5hkscsCodec::makeDecoder() const /*! \reimp */ TQCString TQBig5hkscsCodec::fromUnicode(const TQString& uc, int& lenInOut) const { - //qDebug("TQBig5hkscsCodec::fromUnicode(const TQString& uc, int& lenInOut = %d)", lenInOut); + //tqDebug("TQBig5hkscsCodec::fromUnicode(const TQString& uc, int& lenInOut = %d)", lenInOut); int l = TQMIN((int)uc.length(),lenInOut); int rlen = l*3+1; TQCString rstr(rlen); @@ -922,7 +922,7 @@ TQCString TQBig5hkscsCodec::fromUnicode(const TQString& uc, int& lenInOut) const /*! \reimp */ TQString TQBig5hkscsCodec::toUnicode(const char* chars, int len) const { - //qDebug("TQBig5hkscsCodec::toUnicode(const char* chars = \"%s\", int len = %d)", chars, len); + //tqDebug("TQBig5hkscsCodec::toUnicode(const char* chars = \"%s\", int len = %d)", chars, len); TQString result; for (int i=0; i<len; i++) { uchar ch = chars[i]; @@ -960,15 +960,15 @@ TQString TQBig5hkscsCodec::toUnicode(const char* chars, int len) const /*! \reimp */ int TQBig5hkscsCodec::heuristicNameMatch(const char* hint) const { - //qDebug("TQBig5hkscsCodec::heuristicNameMatch(const char* hint = \"%s\")", hint); + //tqDebug("TQBig5hkscsCodec::heuristicNameMatch(const char* hint = \"%s\")", hint); int score = 0; bool zh = FALSE; - if (qstrnicmp(hint, "zh_HK", 5) == 0) { + if (tqstrnicmp(hint, "zh_HK", 5) == 0) { score += 16; zh = TRUE; } - else if ( qstrnicmp(hint, "zh", 2) == 0 || - qstrnicmp(hint, "chinese", 7) == 0) { + else if ( tqstrnicmp(hint, "zh", 2) == 0 || + tqstrnicmp(hint, "chinese", 7) == 0) { score += 2; zh = TRUE; } @@ -982,13 +982,13 @@ int TQBig5hkscsCodec::heuristicNameMatch(const char* hint) const p = hint; } if (p) { - if ( qstricmp(p, "Big5-HKSCS") == 0 || - qstricmp(p, "HKSCS-Big5") == 0 || - qstricmp(p, "Big5HKSCS") == 0 || - qstricmp(p, "hkbig5") == 0 ) { + if ( tqstricmp(p, "Big5-HKSCS") == 0 || + tqstricmp(p, "HKSCS-Big5") == 0 || + tqstricmp(p, "Big5HKSCS") == 0 || + tqstricmp(p, "hkbig5") == 0 ) { return score + 10; } - else if (qstrnicmp(p, "Big5", 4) == 0) { + else if (tqstrnicmp(p, "Big5", 4) == 0) { return score + 2; } } @@ -999,7 +999,7 @@ int TQBig5hkscsCodec::heuristicNameMatch(const char* hint) const /*! \reimp */ int TQBig5hkscsCodec::heuristicContentMatch(const char* chars, int len) const { - //qDebug("TQBig5hkscsCodec::heuristicContentMatch(const char* chars, int len = %d)", len); + //tqDebug("TQBig5hkscsCodec::heuristicContentMatch(const char* chars, int len = %d)", len); int score = 0; for (int i=0; i<len; i++) { uchar ch = chars[i]; @@ -1027,7 +1027,7 @@ int TQBig5hkscsCodec::heuristicContentMatch(const char* chars, int len) const return -1; } } - //qDebug("TQBig5hkscsCodec::heuristicContentMatch() score = %d", score); + //tqDebug("TQBig5hkscsCodec::heuristicContentMatch() score = %d", score); return score; } |