~ubuntu-branches/ubuntu/raring/duff/raring

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
Brief hacking guide to duff
===========================

Basic nomenclature
==================

File n.
  A file, specified on the command line or found via directory recursion,
  included in the set of files checked for duplicates.

Cluster n.
  A collection of files with equal contents, i.e. duplicates.

Directory n.
  A physical directory (inode, not link) which has been searched for files.

Function n.
  A specific message digest function.

Invalid a.
  A file becomes invalid if any stage of data gathering failed on it.  An
  invalid file should not be modified or operated upon.


Important files
===============

duff.c
  Program main, information printing and option handling.
  
duffdriver.c
  Primary program logic; file collection and cluster reporting.

dufffile.c
  Functions for working with files.

duffstring.c duffstring.h
  Replacement implementations of various libc string functions.

duffutil.c
  Error reporting, digest selection and various other utility functions.

duff.h
  Main header file.

sha1.c sha1.h sha256.c sha256.h sha384.c sha384.h sha512.c sha512.h
  Implements SHA family message digest calculation.


Important functions
===================

dufffile.c: compare_files()
  The main comparison function for files.  Start here if you wish to modify the
  comparison algorithm.

dufffile.c: compare_file_*() and get_file_*()
  Calculates and compares various file attributes, respectively.  Start here if
  you wish to modify one of the existing comparison methods.

duffdriver.c: process_args()
  The main driver function.  Contains nearly everything except flag parsing.
  Start here if you wish to modify overall program flow.

duffdriver.c: process_path(), process_file() and process_directory()
  The main functions for collecting files.  Start here if you wish to modify the
  traversal algorithm.

duffdriver.c: process_clusters()
  Finds and reports the clusters of duplicates in the list of files.  Start here
  if you wish to optimise list traversal or alter program output.

duffdriver.c: has_recorded_directory() and record_directory()
  Records traversed directories (in a very primitive way).  Start here if you
  wish to modify the directory loop detection algorithm.