Compare Content - Bug in continuation detect (only 2 lines?)

The behaviour described in the bug report is either by design, or would be far too complex/time-consuming to be changed

Moderators: white, Hacker, petermad, Stefan2

Post Reply
lennart.johansson
Junior Member
Junior Member
Posts: 8
Joined: 2003-12-05, 11:06 UTC

Compare Content - Bug in continuation detect (only 2 lines?)

Post by *lennart.johansson »

Tcmd can most often not even detect the continuation after as little as 2 (two) inserted/removed lines, even though the two compared files are completely identical otherwise. This mainly occurs if the first word (or two) is the same in an inserted line as in the continuation line.
Tcmd seems to make the decision too early.

I agree with another topic here, that tcmd should NOT be too agressive finding continuation lines, but this case seems to be a bug. If there are more differences, it sometimes successfully finds also large groups of lines inserted or removed.

Problem: Due to this failure, when comparing code files where small groups of lines have been added or removed, one have to slowly work down the files manually, to Mark and Resync in many places! Also after each edit + re-compare (eg. after updating lines from one file to the other in tcmd), all this Mark and Resync must be redone again, and again ... through the entire file...

Even when an (inserted) line starts with the same one or two words, but is different otherwise, tcmd should at least try to look more than two line below to find out if this is an inserted line (group of lines) or not.

EXAMPLE below: A header file with two (2) inserted lines, where TCMD does not see them as inserted, even though it is very clear that they are. All other lines in the file are identicaly (before and after these lines). I made at least one inserted line very much different, only the first word is the same as the old line!
The two inserted lines in the left version is the one new text line about entering the err_hnd and the "*" line above it.

Code: Select all

 
___ LEFT is a header file stdlib.h ______________________     ____RIGHT is previous version of stdlib.h _____________

 * @include "stdlib.h"                                         * @include "stdlib.h" 
 *                                                             *
 * @brief Causes abnormal process termination                  * @brief Causes abnormal process termination
 *                                                             *
 * @long abort() causes abnormal process termination.          * @long abort() causes abnormal process termination.
 *       All open streams are closed and flushed.              *       All open streams are closed and flushed.
 *                                                             *
 * @long abort() enters the system err_hnd via an error call.  * @long Standards: SVID 3, POSIX, BSD 4.3, ISO 9899 (C99)
 *                                                             *
 * @long Standards: SVID 3, POSIX, BSD 4.3, ISO 9899 (C99)     * @return Nothing
 *                                                             *
 * @return Nothing. [/color]                                           
 *                                                            
 * @seealso exit                                               * @seealso exit
*/                                                             */


Sorry, I can't get red color in the code part above in this forum. In the example above, tcmd displays everything RED in the left colum after the first word in the added line, i.e. "abort() enters....." in the inserted line. The line with "Standards" is RED, except for the leading "* @". The entire "return" line is red as well as the "*" line below it. The first black line is @seealso exit. In the right column, the line with "Standards" are RED except for the "* @long" and the "return" line is RED except for the "* @"

tcmd 7.04a 32-bit (and all previous) in WinXP:
Lennart Johansson
User avatar
Clo
Moderator
Moderator
Posts: 5731
Joined: 2003-12-02, 19:01 UTC
Location: Bordeaux, France
Contact:

Nowhere---

Post by *Clo »

2lennart.johansson

:) Hello !

• Just an aside :
…Sorry, I can't get red color in the code part above in this forum. …
• AFAIK, the code marker doesn't show the style¦colour, it's the way it's designed for…
- You might use the quote marker instead, then with colours your example'll get more meaningful… ;)

:mrgreen: KR
Claude
Clo
#31505 Traducteur Français de TC French translator Aide en Français Tutoriels Français English Tutorials
User avatar
petermad
Power Member
Power Member
Posts: 14809
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Post by *petermad »

2lennart.johansson

Have you tried checking the option: "Ignore frequent lines" - I think you'll find that it helps a lot!
License #524 (1994)
Danish Total Commander Translator
TC 11.03 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1371a
TC 3.50 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
lennart.johansson
Junior Member
Junior Member
Posts: 8
Joined: 2003-12-05, 11:06 UTC

Thanks for the tip! Ignore frequent lines really helps a lot

Post by *lennart.johansson »

Even though I used TCMD for many years, it seems always to exist some good feature to discover. I seem never to have understood the help text for Ignore frequent lines. Sorry, but happier now.
Lennart Johansson
Post Reply