From f636ba5ba2df9d34d56b1c85f24c6598fa1cb645 Mon Sep 17 00:00:00 2001 From: tpearson Date: Mon, 27 Jun 2011 05:58:16 +0000 Subject: TQt4 port kdiff3 This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/kdiff3@1238464 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- src/gnudiff_io.cpp | 66 +++++++++++++++++++++++++++--------------------------- 1 file changed, 33 insertions(+), 33 deletions(-) (limited to 'src/gnudiff_io.cpp') diff --git a/src/gnudiff_io.cpp b/src/gnudiff_io.cpp index 922bce7..4241d36 100644 --- a/src/gnudiff_io.cpp +++ b/src/gnudiff_io.cpp @@ -42,7 +42,7 @@ struct equivclass { lin next; /* Next item in this bucket. */ hash_value hash; /* Hash of lines in this class. */ - const QChar *line; /* A line that fits this class. */ + const TQChar *line; /* A line that fits this class. */ size_t length; /* That line's length, not counting its newline. */ }; @@ -78,12 +78,12 @@ static lin equivs_alloc; but an option like -i might cause us to ignore the difference. Return nonzero if the lines differ. */ -bool GnuDiff::lines_differ (const QChar *s1, size_t len1, const QChar *s2, size_t len2 ) +bool GnuDiff::lines_differ (const TQChar *s1, size_t len1, const TQChar *s2, size_t len2 ) { - const QChar *t1 = s1; - const QChar *t2 = s2; - const QChar *s1end = s1+len1; - const QChar *s2end = s2+len2; + const TQChar *t1 = s1; + const TQChar *t2 = s2; + const TQChar *s1end = s1+len1; + const TQChar *s2end = s2+len2; for ( ; ; ++t1, ++t2 ) { @@ -134,13 +134,13 @@ bool GnuDiff::lines_differ (const QChar *s1, size_t len1, const QChar *s2, size_ void GnuDiff::find_and_hash_each_line (struct file_data *current) { hash_value h; - const QChar *p = current->prefix_end; - QChar c; + const TQChar *p = current->prefix_end; + TQChar c; lin i, *bucket; size_t length; /* Cache often-used quantities in local variables to help the compiler. */ - const QChar **linbuf = current->linbuf; + const TQChar **linbuf = current->linbuf; lin alloc_lines = current->alloc_lines; lin line = 0; lin linbuf_base = current->linbuf_base; @@ -148,8 +148,8 @@ void GnuDiff::find_and_hash_each_line (struct file_data *current) struct equivclass *eqs = equivs; lin eqs_index = equivs_index; lin eqs_alloc = equivs_alloc; - const QChar *suffix_begin = current->suffix_begin; - const QChar *bufend = current->buffer + current->buffered; + const TQChar *suffix_begin = current->suffix_begin; + const TQChar *bufend = current->buffer + current->buffered; bool diff_length_compare_anyway = ignore_white_space != IGNORE_NO_WHITE_SPACE || bIgnoreNumbers; bool same_length_diff_contents_compare_anyway = @@ -157,7 +157,7 @@ void GnuDiff::find_and_hash_each_line (struct file_data *current) while ( p < suffix_begin) { - const QChar *ip = p; + const TQChar *ip = p; h = 0; @@ -169,7 +169,7 @@ void GnuDiff::find_and_hash_each_line (struct file_data *current) while ( p