"Fossies" - the Fresh Open Source Software Archive

Member "duff-0.5.2/HACKING" (24 Jan 2012, 2224 Bytes) of package /linux/privat/old/duff-0.5.2.tar.gz:


As a special service "Fossies" has tried to format the requested text file into HTML format (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file.

    1 Brief hacking guide to duff
    2 ===========================
    3 
    4 Basic nomenclature
    5 ==================
    6 
    7 File n.
    8   A file, specified on the command line or found via directory recursion,
    9   included in the set of files checked for duplicates.
   10 
   11 Cluster n.
   12   A collection of files with equal contents, i.e. duplicates.
   13 
   14 Directory n.
   15   A physical directory (inode, not link) which has been searched for files.
   16 
   17 Function n.
   18   A specific message digest function.
   19 
   20 Invalid a.
   21   A file becomes invalid if any stage of data gathering failed on it.  An
   22   invalid file should not be modified or operated upon.
   23 
   24 
   25 Important files
   26 ===============
   27 
   28 duff.c
   29   Program main, information printing and option handling.
   30   
   31 duffdriver.c
   32   Primary program logic; file collection and cluster reporting.
   33 
   34 dufffile.c
   35   Functions for working with files.
   36 
   37 duffstring.c duffstring.h
   38   Replacement implementations of various libc string functions.
   39 
   40 duffutil.c
   41   Error reporting, digest selection and various other utility functions.
   42 
   43 duff.h
   44   Main header file.
   45 
   46 sha1.c sha1.h sha256.c sha256.h sha384.c sha384.h sha512.c sha512.h
   47   Implements SHA family message digest calculation.
   48 
   49 
   50 Important functions
   51 ===================
   52 
   53 dufffile.c: compare_files()
   54   The main comparison function for files.  Start here if you wish to modify the
   55   comparison algorithm.
   56 
   57 dufffile.c: compare_file_*() and get_file_*()
   58   Calculates and compares various file attributes, respectively.  Start here if
   59   you wish to modify one of the existing comparison methods.
   60 
   61 duffdriver.c: process_args()
   62   The main driver function.  Contains nearly everything except flag parsing.
   63   Start here if you wish to modify overall program flow.
   64 
   65 duffdriver.c: process_path(), process_file() and process_directory()
   66   The main functions for collecting files.  Start here if you wish to modify the
   67   traversal algorithm.
   68 
   69 duffdriver.c: process_clusters()
   70   Finds and reports the clusters of duplicates in the list of files.  Start here
   71   if you wish to optimise list traversal or alter program output.
   72 
   73 duffdriver.c: has_recorded_directory() and record_directory()
   74   Records traversed directories (in a very primitive way).  Start here if you
   75   wish to modify the directory loop detection algorithm.
   76