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
#include <maxscale/cdefs.h>
#include <stdlib.h>
@ -25,31 +25,31 @@ MXS_BEGIN_DECLS
// "caller" arg temporarily disabled so that existing code
// using the previous version of mxs_alloc etc. will continue
// to compile.
void *mxs_malloc(size_t size/*, const char *caller*/);
void *mxs_calloc(size_t nmemb, size_t size/*, const char *caller*/);
void *mxs_realloc(void *ptr, size_t size/*, const char *caller*/);
void mxs_free(void *ptr/*, const char *caller*/);
void* mxs_malloc(size_t size /*, const char *caller*/);
void* mxs_calloc(size_t nmemb, size_t size /*, const char *caller*/);
void* mxs_realloc(void* ptr, size_t size /*, const char *caller*/);
void mxs_free(void* ptr /*, const char *caller*/);
char *mxs_strdup(const char *s/*, const char *caller*/);
char *mxs_strndup(const char *s, size_t n/*, const char *caller*/);
char* mxs_strdup(const char* s /*, const char *caller*/);
char* mxs_strndup(const char* s, size_t n /*, const char *caller*/);
char *mxs_strdup_a(const char *s/*, const char *caller*/);
char *mxs_strndup_a(const char *s, size_t n/*, const char *caller*/);
char* mxs_strdup_a(const char* s /*, const char *caller*/);
char* mxs_strndup_a(const char* s, size_t n /*, const char *caller*/);
/*
* NOTE: USE these macros instead of the functions above.
*/
#define MXS_MALLOC(size) mxs_malloc(size/*, __func__*/)
#define MXS_CALLOC(nmemb, size) mxs_calloc(nmemb, size/*, __func__*/)
#define MXS_REALLOC(ptr, size) mxs_realloc(ptr, size/*, __func__*/)
#define MXS_FREE(ptr) mxs_free(ptr/*, __func__*/)
#define MXS_MALLOC(size) mxs_malloc(size /*, __func__*/)
#define MXS_CALLOC(nmemb, size) mxs_calloc(nmemb, size /*, __func__*/)
#define MXS_REALLOC(ptr, size) mxs_realloc(ptr, size /*, __func__*/)
#define MXS_FREE(ptr) mxs_free(ptr /*, __func__*/)
#define MXS_STRDUP(s) mxs_strdup(s/*, __func__*/)
#define MXS_STRNDUP(s, n) mxs_strndup(s, n/*, __func__*/)
#define MXS_STRDUP(s) mxs_strdup(s /*, __func__*/)
#define MXS_STRNDUP(s, n) mxs_strndup(s, n /*, __func__*/)
#define MXS_STRDUP_A(s) mxs_strdup_a(s/*, __func__*/)
#define MXS_STRNDUP_A(s, n) mxs_strndup_a(s, n/*, __func__*/)
#define MXS_STRDUP_A(s) mxs_strdup_a(s /*, __func__*/)
#define MXS_STRNDUP_A(s, n) mxs_strndup_a(s, n /*, __func__*/)
/**
@ -58,7 +58,7 @@ char *mxs_strndup_a(const char *s, size_t n/*, const char *caller*/);
* To be used in circumstances where a memory allocation failure
* cannot - currently - be dealt with properly.
*/
#define MXS_ABORT_IF_NULL(p) do { if (!p) { abort(); } } while (false)
#define MXS_ABORT_IF_NULL(p) do {if (!p) {abort();}} while (false)
/**
* @brief Abort the process if the provided value is non-zero.
@ -66,7 +66,7 @@ char *mxs_strndup_a(const char *s, size_t n/*, const char *caller*/);
* To be used in circumstances where a memory allocation or other
* fatal error cannot - currently - be dealt with properly.
*/
#define MXS_ABORT_IF_TRUE(b) do { if (b) { abort(); } } while (false)
#define MXS_ABORT_IF_TRUE(b) do {if (b) {abort();}} while (false)
/**
* @brief Abort the process if the provided value is zero.
@ -74,6 +74,6 @@ char *mxs_strndup_a(const char *s, size_t n/*, const char *caller*/);
* To be used in circumstances where a memory allocation or other
* fatal error cannot - currently - be dealt with properly.
*/
#define MXS_ABORT_IF_FALSE(b) do { if (!b) { abort(); } } while (false)
#define MXS_ABORT_IF_FALSE(b) do {if (!b) {abort();}} while (false)
MXS_END_DECLS