projects
/
finddup.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Cosmetics.
[finddup.git]
/
finddup.c
diff --git
a/finddup.c
b/finddup.c
index
0799503
..
688fb02
100644
(file)
--- a/
finddup.c
+++ b/
finddup.c
@@
-342,7
+342,7
@@
void print_progress(int max, int n, int *pp) {
int width;
if(show_progress && tty_width > 0) {
width = tty_width - 7;
int width;
if(show_progress && tty_width > 0) {
width = tty_width - 7;
- p = (width * n) /
max
;
+ p = (width * n) /
(max - 1)
;
if(p > *pp) {
for(k = 0; k < p; k++) {
fprintf(stderr, "+");
if(p > *pp) {
for(k = 0; k < p; k++) {
fprintf(stderr, "+");
@@
-351,8
+351,8
@@
void print_progress(int max, int n, int *pp) {
fprintf(stderr, "-");
}
*pp = p;
fprintf(stderr, "-");
}
*pp = p;
- p = (100 * n) /
max
;
- fprintf(stderr, " [%
3d%%]\r", p);
+ p = (100 * n) /
(max - 1)
;
+ fprintf(stderr, " [%3d%%]\r", p);
}
}
}
}
}
}
@@
-377,8
+377,7
@@
void start(const char *dirname1, const char *dirname2) {
if(dirname2) {
if(strncmp(dirname2, "not:", 4) == 0) {
not_in = 1;
if(dirname2) {
if(strncmp(dirname2, "not:", 4) == 0) {
not_in = 1;
- /* We should show groups even in that mode. However they are not
- properly calculated for now, so we force it off. */
+ /* groups are not computed in the not: mode */
show_groups = 0;
dirname2 += 4;
}
show_groups = 0;
dirname2 += 4;
}