projects
/
finddup.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Update _BSD_SOURCE to _DEFAULT_SOURCE.
[finddup.git]
/
finddup.c
diff --git
a/finddup.c
b/finddup.c
index
124eaad
..
6f6af38
100644
(file)
--- a/
finddup.c
+++ b/
finddup.c
@@
-23,9
+23,9
@@
*
*/
*
*/
-#define VERSION_NUMBER "1.2"
+#define VERSION_NUMBER "1.2
.1
"
-#define _
BSD
_SOURCE
+#define _
DEFAULT
_SOURCE
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <sys/stat.h>
@@
-56,8
+56,8
@@
int ignore_dotfiles = 0; /* 1 means ignore files and directories
int ignore_empty_files = 0; /* 1 means ignore empty files */
int ignore_empty_files = 0; /* 1 means ignore empty files */
-int show_realpaths = 0; /* 1
means ignore files and directories
-
starting with a dot
*/
+int show_realpaths = 0; /* 1
show the canonical absolute pathname for
+
printed files
*/
int show_progress = 0; /* 1 means show a progress bar when we are in a
tty */
int show_progress = 0; /* 1 means show a progress bar when we are in a
tty */
@@
-333,11
+333,11
@@
int compare_nodes(const void *x1, const void *x2) {
void exec_command(int nb, struct file_node **nodes) {
char **args;
void exec_command(int nb, struct file_node **nodes) {
char **args;
- int max_group_size = 0, group_size, m, n, status;
+ int max_group_size = 0, group_size
= 0
, m, n, status;
pid_t pid;
for(n = 0; n < nb; n++) {
pid_t pid;
for(n = 0; n < nb; n++) {
- if(n
== 0 || n
odes[n]->group_id != nodes[n-1]->group_id) {
+ if(nodes[n]->group_id != nodes[n-1]->group_id) {
group_size = 0;
}
group_size++;
group_size = 0;
}
group_size++;
@@
-511,7
+511,7
@@
void start(const char *dirname1, const char *dirname2) {
struct progress_state progress_state;
int not_in, found;
int nb_groups, nb_nodes;
struct progress_state progress_state;
int not_in, found;
int nb_groups, nb_nodes;
- int list1_length
, previous_progress
;
+ int list1_length;
char *buffer1 = safe_malloc(sizeof(char) * READ_BUFFER_SIZE);
char *buffer2 = safe_malloc(sizeof(char) * READ_BUFFER_SIZE);
char *buffer1 = safe_malloc(sizeof(char) * READ_BUFFER_SIZE);
char *buffer2 = safe_malloc(sizeof(char) * READ_BUFFER_SIZE);
@@
-541,7
+541,6
@@
void start(const char *dirname1, const char *dirname2) {
}
nb_groups = 0;
}
nb_groups = 0;
- previous_progress = -1;
nb_nodes = 0;
progress_state.bar_width = -1;
nb_nodes = 0;
progress_state.bar_width = -1;