]> git.ipfire.org Git - thirdparty/ccache.git/commit
Refactor debug mode code
authorJoel Rosdahl <joel@rosdahl.net>
Sun, 7 Oct 2018 18:40:55 +0000 (20:40 +0200)
committerJoel Rosdahl <joel@rosdahl.net>
Sun, 7 Oct 2018 18:40:55 +0000 (20:40 +0200)
commit4c1a92a0d8be2d86a5a9e0c4dbe5a84718d57b3a
treeb92063dddbec5dd613eb1fab44596501f59c3876
parentc319c5666d3670876c23cd56fd50b0a8b2bc8ab6
Refactor debug mode code

Knowledge of the debug mode snuck into the mdfour struct and code, which
did not feel good.

* Introduced a new “struct hash”, which is used by the hash_* functions
  instead of “struct mdfour”. “struct hash” contains the mdfour state
  and also debug file handles that can be set via a new
  hash_enable_debug function.
* Removed “identifier” from the mdfour struct and code.
* Introduced hash.h and all documented hash_* functions.
* Introduced unify.h.
* Removed some global state from util.c.
15 files changed:
dev.mk.in
doc/MANUAL.adoc
src/ccache.c
src/ccache.h
src/hash.c
src/hash.h [new file with mode: 0644]
src/hashutil.c
src/hashutil.h
src/manifest.c
src/mdfour.c
src/mdfour.h
src/unify.c
src/unify.h [new file with mode: 0644]
unittest/test_hash.c
unittest/test_hashutil.c