diff options
Diffstat (limited to 'diff.c')
-rw-r--r-- | diff.c | 28 |
1 files changed, 15 insertions, 13 deletions
@@ -712,20 +712,22 @@ static int next_byte(const char **cp, const char **endp, if (*cp > *endp) return -1; - if (DIFF_XDL_TST(diffopt, IGNORE_WHITESPACE_CHANGE)) { - while (*cp < *endp && isspace(**cp)) - (*cp)++; - /* - * After skipping a couple of whitespaces, we still have to - * account for one space. - */ - return (int)' '; - } + if (isspace(**cp)) { + if (DIFF_XDL_TST(diffopt, IGNORE_WHITESPACE_CHANGE)) { + while (*cp < *endp && isspace(**cp)) + (*cp)++; + /* + * After skipping a couple of whitespaces, + * we still have to account for one space. + */ + return (int)' '; + } - if (DIFF_XDL_TST(diffopt, IGNORE_WHITESPACE)) { - while (*cp < *endp && isspace(**cp)) - (*cp)++; - /* return the first non-ws character via the usual below */ + if (DIFF_XDL_TST(diffopt, IGNORE_WHITESPACE)) { + while (*cp < *endp && isspace(**cp)) + (*cp)++; + /* return the first non-ws character via the usual below */ + } } retval = (unsigned char)(**cp); |