Uncrustify maxscale

See script directory for method. The script to run in the top level
MaxScale directory is called maxscale-uncrustify.sh, which uses
another script, list-src, from the same directory (so you need to set
your PATH). The uncrustify version was 0.66.
This commit is contained in:
Niclas Antti
2018-09-09 22:26:19 +03:00
parent fa7ec95069
commit c447e5cf15
849 changed files with 35002 additions and 27238 deletions

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
/**
* @file hint.h The generic hint data that may be attached to buffers
@ -28,19 +28,43 @@ typedef enum
HINT_ROUTE_TO_MASTER = 1,
HINT_ROUTE_TO_SLAVE,
HINT_ROUTE_TO_NAMED_SERVER,
HINT_ROUTE_TO_UPTODATE_SERVER, /*< not supported by RWSplit and HintRouter */
HINT_ROUTE_TO_ALL, /*< not supported by RWSplit, supported by HintRouter */
HINT_ROUTE_TO_UPTODATE_SERVER, /*< not supported by RWSplit and HintRouter */
HINT_ROUTE_TO_ALL, /*< not supported by RWSplit, supported by HintRouter */
HINT_ROUTE_TO_LAST_USED,
HINT_PARAMETER
} HINT_TYPE;
#define STRHINTTYPE(t) (t == HINT_ROUTE_TO_MASTER ? "HINT_ROUTE_TO_MASTER" : \
((t) == HINT_ROUTE_TO_SLAVE ? "HINT_ROUTE_TO_SLAVE" : \
((t) == HINT_ROUTE_TO_NAMED_SERVER ? "HINT_ROUTE_TO_NAMED_SERVER" : \
((t) == HINT_ROUTE_TO_UPTODATE_SERVER ? "HINT_ROUTE_TO_UPTODATE_SERVER" : \
((t) == HINT_ROUTE_TO_ALL ? "HINT_ROUTE_TO_ALL" : \
((t) == HINT_ROUTE_TO_LAST_USED ? "HINT_ROUTE_TO_LAST_USED" :\
((t) == HINT_PARAMETER ? "HINT_PARAMETER" : "UNKNOWN HINT TYPE")))))))
#define STRHINTTYPE(t) \
(t == HINT_ROUTE_TO_MASTER ? "HINT_ROUTE_TO_MASTER" \
: ((t) == HINT_ROUTE_TO_SLAVE ? "HINT_ROUTE_TO_SLAVE" \
: ((t) \
== HINT_ROUTE_TO_NAMED_SERVER ? \
"HINT_ROUTE_TO_NAMED_SERVER" \
: ((t) \
== \
HINT_ROUTE_TO_UPTODATE_SERVER \
? \
"HINT_ROUTE_TO_UPTODATE_SERVER" \
: (( \
t) \
== \
HINT_ROUTE_TO_ALL \
? \
"HINT_ROUTE_TO_ALL" \
: (( \
t) \
== \
HINT_ROUTE_TO_LAST_USED \
? \
"HINT_ROUTE_TO_LAST_USED" \
: (( \
t) \
== \
HINT_PARAMETER \
? \
"HINT_PARAMETER" \
: \
"UNKNOWN HINT TYPE")))))))
/**
* A generic hint.
@ -51,19 +75,19 @@ typedef enum
*/
typedef struct hint
{
HINT_TYPE type; /*< The Type of hint */
void *data; /*< Type specific data */
void *value; /*< Parameter value for hint */
unsigned int dsize; /*< Size of the hint data */
struct hint *next; /*< Another hint for this buffer */
HINT_TYPE type; /*< The Type of hint */
void* data; /*< Type specific data */
void* value; /*< Parameter value for hint */
unsigned int dsize; /*< Size of the hint data */
struct hint* next; /*< Another hint for this buffer */
} HINT;
HINT *hint_alloc(HINT_TYPE, void *, unsigned int);
HINT *hint_create_parameter(HINT *, char *, const char *);
HINT *hint_create_route(HINT *, HINT_TYPE, const char *);
HINT *hint_splice(HINT *head, HINT *list);
void hint_free(HINT *);
HINT *hint_dup(const HINT *);
bool hint_exists(HINT **, HINT_TYPE);
HINT* hint_alloc(HINT_TYPE, void*, unsigned int);
HINT* hint_create_parameter(HINT*, char*, const char*);
HINT* hint_create_route(HINT*, HINT_TYPE, const char*);
HINT* hint_splice(HINT* head, HINT* list);
void hint_free(HINT*);
HINT* hint_dup(const HINT*);
bool hint_exists(HINT * *, HINT_TYPE);
MXS_END_DECLS