// ccache -- a fast C/C++ compiler cache
//
// Copyright (C) 2002-2007 Andrew Tridgell
-// Copyright (C) 2009-2017 Joel Rosdahl
+// Copyright (C) 2009-2018 Joel Rosdahl
//
// This program is free software; you can redistribute it and/or modify it
// under the terms of the GNU General Public License as published by the Free
case 'c': // --cleanup
initialize();
- cleanup_all(conf);
+ clean_up_all(conf);
printf("Cleaned cache\n");
break;
// ----------------------------------------------------------------------------
// cleanup.c
-void cleanup_dir(struct conf *conf, const char *dir);
-void cleanup_all(struct conf *conf);
+void clean_up_dir(struct conf *conf, const char *dir);
+void clean_up_all(struct conf *conf);
void wipe_all(struct conf *conf);
// ----------------------------------------------------------------------------
// Clean up one cache subdirectory.
void
-cleanup_dir(struct conf *conf, const char *dir)
+clean_up_dir(struct conf *conf, const char *dir)
{
cc_log("Cleaning up cache directory %s", dir);
}
// Clean up all cache subdirectories.
-void cleanup_all(struct conf *conf)
+void clean_up_all(struct conf *conf)
{
for (int i = 0; i <= 0xF; i++) {
char *dname = format("%s/%1x", conf->cache_dir, i);
- cleanup_dir(conf, dname);
+ clean_up_dir(conf, dname);
free(dname);
}
}
}
// Fix the counters.
- cleanup_all(conf);
+ clean_up_all(conf);
}
}
if (need_cleanup) {
- cleanup_dir(conf, subdir);
+ clean_up_dir(conf, subdir);
}
free(subdir);