← Commit list

b7a044043

Matheus Izvekov
Matheus Izvekov
2010-01-20
FAILED Duration: 35s

Subject

diff: honor flag -i (ignore case differences)

Binary

No binary (build failed)

Architecture & Compiler Flags

Architecture: x86_64-linux-gnu Compiler: gcc (Ubuntu 11.4.0-1ubuntu1~22.04.3) 11.4.0

—

Build Log

(log yok)

Commit Diff GitHub →

editors/diff.c+4 -1
@@ -94,7 +94,7 @@ enum { /* Commandline flags */
FLAG_a,
FLAG_b,
FLAG_d,
- FLAG_i, /* unused */
+ FLAG_i,
FLAG_L, /* unused */
FLAG_N,
FLAG_q,
@@ -177,6 +177,9 @@ static int read_token(FILE_and_pos_t *ft, token_t tok)
if (t == '\n')
tok |= TOK_EOL;
+ if (option_mask32 & FLAG(i)) /* Handcoded tolower() */
+ t = (t >= 'A' && t <= 'Z') ? t - ('A' - 'a') : t;
+
if ((option_mask32 & FLAG(w)) && is_space)
continue;