summaryrefslogtreecommitdiffstats
path: root/src/codecs/qbig5codec.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/codecs/qbig5codec.cpp')
-rw-r--r--src/codecs/qbig5codec.cpp64
1 files changed, 32 insertions, 32 deletions
diff --git a/src/codecs/qbig5codec.cpp b/src/codecs/qbig5codec.cpp
index d961dbf..dd71604 100644
--- a/src/codecs/qbig5codec.cpp
+++ b/src/codecs/qbig5codec.cpp
@@ -531,7 +531,7 @@ static int qt_UnicodeToBig5(ushort ch, uchar *buf)
int QBig5Codec::mibEnum() const
{
/* See http://www.iana.org/assignments/character-sets */
- //qDebug("QBig5Codec::mibEnum() = 2026");
+ //tqDebug("QBig5Codec::mibEnum() = 2026");
return 2026;
}
@@ -539,7 +539,7 @@ int QBig5Codec::mibEnum() const
/*! \reimp */
const char* QBig5Codec::name() const
{
- //qDebug("QBig5Codec::name() = \"Big5\"");
+ //tqDebug("QBig5Codec::name() = \"Big5\"");
return "Big5";
}
@@ -554,7 +554,7 @@ public:
QString toUnicode(const char* chars, int len)
{
- //qDebug("QBig5Decoder::toUnicode(const char* chars = \"%s\", int len = %d)", chars, len);
+ //tqDebug("QBig5Decoder::toUnicode(const char* chars = \"%s\", int len = %d)", chars, len);
QString result;
for (int i=0; i<len; i++) {
uchar ch = chars[i];
@@ -599,7 +599,7 @@ public:
/*! \reimp */
QTextDecoder* QBig5Codec::makeDecoder() const
{
- //qDebug("QBig5Codec::makeDecoder()");
+ //tqDebug("QBig5Codec::makeDecoder()");
return new QBig5Decoder();
}
@@ -607,7 +607,7 @@ QTextDecoder* QBig5Codec::makeDecoder() const
/*! \reimp */
QCString QBig5Codec::fromUnicode(const QString& uc, int& lenInOut) const
{
- //qDebug("QBig5Codec::fromUnicode(const QString& uc, int& lenInOut = %d)", lenInOut);
+ //tqDebug("QBig5Codec::fromUnicode(const QString& uc, int& lenInOut = %d)", lenInOut);
int l = QMIN((int)uc.length(),lenInOut);
int rlen = l*3+1;
QCString rstr(rlen);
@@ -639,7 +639,7 @@ QCString QBig5Codec::fromUnicode(const QString& uc, int& lenInOut) const
/*! \reimp */
QString QBig5Codec::toUnicode(const char* chars, int len) const
{
- //qDebug("QBig5Codec::toUnicode(const char* chars \"%s\", int len = %d)", chars, len);
+ //tqDebug("QBig5Codec::toUnicode(const char* chars \"%s\", int len = %d)", chars, len);
QString result;
for (int i=0; i<len; i++) {
uchar ch = chars[i];
@@ -677,7 +677,7 @@ QString QBig5Codec::toUnicode(const char* chars, int len) const
/*! \reimp */
int QBig5Codec::heuristicContentMatch(const char* chars, int len) const
{
- //qDebug("QBig5Codec::heuristicContentMatch(const char* chars, int len = %d)", len);
+ //tqDebug("QBig5Codec::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 QBig5Codec::heuristicContentMatch(const char* chars, int len) const
return -1;
}
}
- //qDebug("QBig5Codec::heuristicContentMatch() score = %d", score);
+ //tqDebug("QBig5Codec::heuristicContentMatch() score = %d", score);
return score;
}
@@ -713,15 +713,15 @@ int QBig5Codec::heuristicContentMatch(const char* chars, int len) const
/*! \reimp */
int QBig5Codec::heuristicNameMatch(const char* hint) const
{
- //qDebug("QBig5hkscsCodec::heuristicNameMatch(const char* hint = \"%s\")", hint);
+ //tqDebug("QBig5hkscsCodec::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 QBig5Codec::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 QTextCodec::heuristicNameMatch(hint);
@@ -817,7 +817,7 @@ int QBig5hkscsCodec::mibEnum() const
{
/* See http://www.iana.org/assignments/character-sets */
/* http://www.iana.org/assignments/charset-reg/Big5-HKSCS */
- //qDebug("QBig5hkscsCodec::mibEnum() = 2101");
+ //tqDebug("QBig5hkscsCodec::mibEnum() = 2101");
return 2101;
}
@@ -825,7 +825,7 @@ int QBig5hkscsCodec::mibEnum() const
/*! \reimp */
const char* QBig5hkscsCodec::name() const
{
- //qDebug("QBig5hkscsCodec::name() = \"Big5-HKSCS\"");
+ //tqDebug("QBig5hkscsCodec::name() = \"Big5-HKSCS\"");
return "Big5-HKSCS";
}
@@ -840,7 +840,7 @@ public:
QString toUnicode(const char* chars, int len)
{
- //qDebug("QBig5hkscsDecoder::toUnicode(const char* chars = \"%s\", int len = %d)", chars, len);
+ //tqDebug("QBig5hkscsDecoder::toUnicode(const char* chars = \"%s\", int len = %d)", chars, len);
QString result;
for (int i=0; i<len; i++) {
uchar ch = chars[i];
@@ -885,7 +885,7 @@ public:
/*! \reimp */
QTextDecoder* QBig5hkscsCodec::makeDecoder() const
{
- //qDebug("QBig5hkscsCodec::makeDecoder()");
+ //tqDebug("QBig5hkscsCodec::makeDecoder()");
return new QBig5hkscsDecoder();
}
@@ -893,7 +893,7 @@ QTextDecoder* QBig5hkscsCodec::makeDecoder() const
/*! \reimp */
QCString QBig5hkscsCodec::fromUnicode(const QString& uc, int& lenInOut) const
{
- //qDebug("QBig5hkscsCodec::fromUnicode(const QString& uc, int& lenInOut = %d)", lenInOut);
+ //tqDebug("QBig5hkscsCodec::fromUnicode(const QString& uc, int& lenInOut = %d)", lenInOut);
int l = QMIN((int)uc.length(),lenInOut);
int rlen = l*3+1;
QCString rstr(rlen);
@@ -922,7 +922,7 @@ QCString QBig5hkscsCodec::fromUnicode(const QString& uc, int& lenInOut) const
/*! \reimp */
QString QBig5hkscsCodec::toUnicode(const char* chars, int len) const
{
- //qDebug("QBig5hkscsCodec::toUnicode(const char* chars = \"%s\", int len = %d)", chars, len);
+ //tqDebug("QBig5hkscsCodec::toUnicode(const char* chars = \"%s\", int len = %d)", chars, len);
QString result;
for (int i=0; i<len; i++) {
uchar ch = chars[i];
@@ -960,15 +960,15 @@ QString QBig5hkscsCodec::toUnicode(const char* chars, int len) const
/*! \reimp */
int QBig5hkscsCodec::heuristicNameMatch(const char* hint) const
{
- //qDebug("QBig5hkscsCodec::heuristicNameMatch(const char* hint = \"%s\")", hint);
+ //tqDebug("QBig5hkscsCodec::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 QBig5hkscsCodec::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 QBig5hkscsCodec::heuristicNameMatch(const char* hint) const
/*! \reimp */
int QBig5hkscsCodec::heuristicContentMatch(const char* chars, int len) const
{
- //qDebug("QBig5hkscsCodec::heuristicContentMatch(const char* chars, int len = %d)", len);
+ //tqDebug("QBig5hkscsCodec::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 QBig5hkscsCodec::heuristicContentMatch(const char* chars, int len) const
return -1;
}
}
- //qDebug("QBig5hkscsCodec::heuristicContentMatch() score = %d", score);
+ //tqDebug("QBig5hkscsCodec::heuristicContentMatch() score = %d", score);
return score;
}