diff options
author | Jim Meyering <jim@meyering.net> | 1999-08-22 11:31:08 +0000 |
---|---|---|
committer | Jim Meyering <jim@meyering.net> | 1999-08-22 11:31:08 +0000 |
commit | 7a7ef5ff5befba0d3822b3ab301736fcfc2d0a68 (patch) | |
tree | 58e266c15d6299c7b387024a4bcbd48ad5a0848f /src | |
parent | 2638bf642c6bb3af7516929c1f650809f070da52 (diff) | |
download | coreutils-7a7ef5ff5befba0d3822b3ab301736fcfc2d0a68.tar.xz |
(check_file): Explain why we have separate `if' and `else'
blocks when the code in the else block could handle both cases.
Diffstat (limited to 'src')
-rw-r--r-- | src/uniq.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/uniq.c b/src/uniq.c index a3215646a..9f50d7f4e 100644 --- a/src/uniq.c +++ b/src/uniq.c @@ -238,6 +238,11 @@ check_file (const char *infile, const char *outfile) initbuffer (thisline); initbuffer (prevline); + /* This duplication is to distinguish the common case (in which none of the + following options has been specified: --count, -repeated, --all-repeated, + --unique) from the others. In the common case, we can output each new + line right away, without waiting to see if the next one is different). */ + if (mode == output_all && countmode == count_none) { char *prevfield IF_LINT (= NULL); |