From mboxrd@z Thu Jan 1 00:00:00 1970 From: plenz at cis.fu-berlin.de (Julius Plenz) Date: Tue, 30 Oct 2012 15:56:53 +0100 Subject: [PATCH 2/2] bugfix: make ss-diff correctly handle tab expansion In-Reply-To: <1351601762-953642-3-git-send-email-plenz@cis.fu-berlin.de> References: <1351601762-953642-1-git-send-email-plenz@cis.fu-berlin.de> <1351601762-953642-3-git-send-email-plenz@cis.fu-berlin.de> Message-ID: <20121030145653.GB378591@plenz.com> Hi, reading over the patch again, I realize that in the original behaviour: > strcat(result, " "); > strncat(result, spaces, 8 - (strlen(result) % 8)); ... a tab is it least two spaces wide (if strlen == 8*n + 7) and up to nine spaces wide (if strlen == 8*n). This sounds odd, so I'd suggest the obvious fix of adding (7 - ((strlen(result)-1) % 8) spaces, since one space is already there. What do you think? Julius