X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=blobdiff_plain;f=aft.c;h=4c5e514309b143ae025dd4d5b64d8934f186c0d9;hp=1d6a5070488ba3beb84a42f37dd0de2d3c0c3789;hb=e8645edf5b100edeb5c0d0f3c3ad31a3853c1dbe;hpb=858cf06b1b89dfa8b561ba270045e8fd5112a808 diff --git a/aft.c b/aft.c index 1d6a5070..4c5e5143 100644 --- a/aft.c +++ b/aft.c @@ -956,7 +956,7 @@ void make_empty_status_items(char *buf) "%s: \n" /* dirname */ "%s: \n" /* basename */ "%s: \n" /* score */ - "%s: \n" /* attributes bitnmap */ + "%s: \n" /* attributes bitmap */ "%s: \n" /* attributes txt */ "%s: \n" /* hash */ "%s: \n" /* image id */ @@ -1441,43 +1441,53 @@ static void save_audio_file_info(HASH_TYPE *hash, const char *path, } /* -input: + +Overview of the add command. + +Input: What was passed to the callback by the command handler. ~~~~~~ -HS: hash sister -PB: path brother -F: force flag given +HS: Hash sister. Whether an audio file with identical hash + already exists in the osl database. + +PB: Path brother. Whether a file with the given path exists + in the table. + +F: Force flag given. Whether add was called with -f. -output: +output: Action performed by the callback. ~~~~~~~ -AFHI: whether afhi and chunk table are computed and sent -ACTION: table modifications to be performed - -+---+----+-----+------+---------------------------------------------------+ -| HS | PB | F | AFHI | ACTION -+---+----+-----+------+---------------------------------------------------+ -| Y | Y | Y | Y | if HS != PB: remove PB. HS: force afhi update, -| | update path, keep afsi -+---+----+-----+------+---------------------------------------------------+ -| Y | Y | N | N | if HS == PB: do not send callback request at all. -| | otherwise: remove PB, HS: update path, keep afhi, -| | afsi. -+---+----+-----+------+---------------------------------------------------+ -| Y | N | Y | Y | (rename) force afhi update of HS, update path of -| | HS, keep afsi -+---+----+-----+------+---------------------------------------------------+ -| Y | N | N | N | (file rename) update path of HS, keep afsi, afhi -+---+----+-----+------+---------------------------------------------------+ -| N | Y | Y | Y | (file change) update afhi, hash, of PB, keep afsi -| | (force has no effect) -+---+----+-----+------+---------------------------------------------------+ -| N | Y | N | Y | (file change) update afhi, hash of PB, keep afsi -+---+----+-----+------+---------------------------------------------------+ -| N | N | Y | Y | (new file) create new entry (force has no effect) -+---+----+-----+------+---------------------------------------------------+ -| N | N | N | Y | (new file) create new entry -+---+----+-----+------+---------------------------------------------------+ - -afhi <=> force or no HS +AFHI: Whether afhi and chunk table are computed and sent. +ACTION: Table modifications to be done by the callback. + ++----+----+---+------+---------------------------------------------------+ +| HS | PB | F | AFHI | ACTION ++----+----+---+------+---------------------------------------------------+ +| Y | Y | Y | Y | if HS != PB: remove PB. HS: force afhi update, +| | update path, keep afsi ++----+----+---+------+---------------------------------------------------+ +| Y | Y | N | N | if HS == PB: do not send callback request at all. +| | otherwise: remove PB, HS: update path, keep afhi, +| | afsi. ++----+----+---+------+---------------------------------------------------+ +| Y | N | Y | Y | (rename) force afhi update of HS, update path of +| | HS, keep afsi ++----+----+---+------+---------------------------------------------------+ +| Y | N | N | N | (file rename) update path of HS, keep afsi, afhi ++----+----+---+------+---------------------------------------------------+ +| N | Y | Y | Y | (file change) update afhi, hash, of PB, keep afsi +| | (force has no effect) ++----+----+---+------+---------------------------------------------------+ +| N | Y | N | Y | (file change) update afhi, hash of PB, keep afsi ++----+----+---+------+---------------------------------------------------+ +| N | N | Y | Y | (new file) create new entry (force has no effect) ++----+----+---+------+---------------------------------------------------+ +| N | N | N | Y | (new file) create new entry ++----+----+---+------+---------------------------------------------------+ + +Notes: + + afhi <=> force or no HS + F => AFHI */