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

@ -19,7 +19,7 @@
static struct
{
bool inited;
} unit = { false };
} unit = {false};
// The functions have been taken from:
// https://mariadb.com/kb/en/mariadb/functions-and-operators/
@ -441,8 +441,8 @@ static const char* BUILTIN_10_2_3_FUNCTIONS[] =
"row_number",
};
const size_t N_BUILTIN_10_2_3_FUNCTIONS =
sizeof(BUILTIN_10_2_3_FUNCTIONS) / sizeof(BUILTIN_10_2_3_FUNCTIONS[0]);
const size_t N_BUILTIN_10_2_3_FUNCTIONS
= sizeof(BUILTIN_10_2_3_FUNCTIONS) / sizeof(BUILTIN_10_2_3_FUNCTIONS[0]);
static const char* ORACLE_FUNCTIONS[] =
{
@ -486,7 +486,9 @@ void finish_builtin_functions()
}
bool is_builtin_readonly_function(const char* key,
uint32_t major, uint32_t minor, uint32_t patch,
uint32_t major,
uint32_t minor,
uint32_t patch,
bool check_oracle)
{
mxb_assert(unit.inited);
@ -495,12 +497,15 @@ bool is_builtin_readonly_function(const char* key,
if (!value)
{
if ((major > 10) ||
((major == 10) && (minor > 2)) ||
((major == 10) && (minor == 2) && (patch >= 3)))
if ((major > 10)
|| ((major == 10) && (minor > 2))
|| ((major == 10) && (minor == 2) && (patch >= 3)))
{
value = bsearch(key, BUILTIN_10_2_3_FUNCTIONS, N_BUILTIN_10_2_3_FUNCTIONS,
sizeof(char*), search_compare);
value = bsearch(key,
BUILTIN_10_2_3_FUNCTIONS,
N_BUILTIN_10_2_3_FUNCTIONS,
sizeof(char*),
search_compare);
}
}

View File

@ -10,7 +10,7 @@
* of this software will be governed by version 2 or later of the General
* Public License.
*/
#pragma once
#pragma once
#include <stdbool.h>
#include <stdint.h>
@ -23,7 +23,9 @@ void init_builtin_functions();
void finish_builtin_functions();
bool is_builtin_readonly_function(const char* zToken,
uint32_t major, uint32_t minor, uint32_t patch,
uint32_t major,
uint32_t minor,
uint32_t patch,
bool check_oracle);
#ifdef __cplusplus

File diff suppressed because it is too large Load Diff