clang-format: update c/cc coding style

Update all cc code using .clang-format; please do so as well for future PRs
etc.; emacs has a handy 'clang-format' mode to make this automatic.

For comparing old changes with git blame, we can disregard this one using
--ignore-rev

(see https://www.moxio.com/blog/43/ignoring-bulk-change-commits-with-git-blame )
This commit is contained in:
Dirk-Jan C. Binnema
2021-10-20 12:18:15 +03:00
parent 09935cc4b3
commit 3dd721d5a3
111 changed files with 13851 additions and 14579 deletions

View File

@ -28,39 +28,36 @@
using namespace Mu;
static void
test_scan_maildir ()
test_scan_maildir()
{
allow_warnings();
Scanner scanner{"/home/djcb/Maildir",
[](const dirent* dentry)->bool {
g_print ("%02x %s\n", dentry->d_type, dentry->d_name);
return true;
},
[](const std::string& fullpath, const struct stat* statbuf,
auto&& info)->bool {
g_print ("%s %zu\n", fullpath.c_str(), statbuf->st_size);
return true;
}
};
g_assert_true (scanner.start());
Scanner scanner{
"/home/djcb/Maildir",
[](const dirent* dentry) -> bool {
g_print("%02x %s\n", dentry->d_type, dentry->d_name);
return true;
},
[](const std::string& fullpath, const struct stat* statbuf, auto&& info) -> bool {
g_print("%s %zu\n", fullpath.c_str(), statbuf->st_size);
return true;
}};
g_assert_true(scanner.start());
while (scanner.is_running()) {
sleep(1);
}
while (scanner.is_running()) {
sleep(1);
}
}
int
main (int argc, char *argv[]) try
{
g_test_init (&argc, &argv, NULL);
main(int argc, char* argv[])
try {
g_test_init(&argc, &argv, NULL);
g_test_add_func ("/utils/scanner/scan-maildir", test_scan_maildir);
return g_test_run ();
g_test_add_func("/utils/scanner/scan-maildir", test_scan_maildir);
return g_test_run();
} catch (const std::runtime_error& re) {
std::cerr << re.what() << "\n";