Format all sources with Uncrustify

Formatted all sources and manually tuned some files to make the code look
neater.
This commit is contained in:
Markus Mäkelä
2018-09-10 12:40:03 +03:00
parent edd5ddcc88
commit d11c78ad80
183 changed files with 1865 additions and 1695 deletions

View File

@ -86,7 +86,7 @@
#include <threads.h>
#endif
#else // __STDC_VERSION >= 201112
#else // __STDC_VERSION >= 201112
#if defined (__GNUC__)
#define thread_local __thread
@ -96,7 +96,7 @@
#endif
#else // __cplusplus
#else // __cplusplus
// GCC 4.8 added support for native thread_local.
#if __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 8)
@ -109,4 +109,4 @@
#endif
#endif // __cplusplus
#endif // __cplusplus

View File

@ -211,7 +211,7 @@ bool FileLogger::write_header()
asctime_r(&tm, time_string);
size_t size = ident.length() + 2 * sizeof(' ') + m_filename.length() + 2 * sizeof(' ') + strlen(
time_string);
time_string);
char header[size + 2 + 1]; // For the 2 newlines and the trailing NULL.
sprintf(header, "\n\n%s %s %s", ident.c_str(), m_filename.c_str(), time_string);