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

@ -1,16 +1,16 @@
/* inih -- unit tests
This works simply by dumping a bunch of info to standard output, which is
redirected to an output file (baseline_*.txt) and checked into the Subversion
repository. This baseline file is the test output, so the idea is to check it
once, and if it changes -- look at the diff and see which tests failed.
Here's how I produced the two baseline files (with Tiny C Compiler):
tcc -DINI_ALLOW_MULTILINE=1 ../ini.c -run unittest.c > baseline_multi.txt
tcc -DINI_ALLOW_MULTILINE=0 ../ini.c -run unittest.c > baseline_single.txt
*/
*
* This works simply by dumping a bunch of info to standard output, which is
* redirected to an output file (baseline_*.txt) and checked into the Subversion
* repository. This baseline file is the test output, so the idea is to check it
* once, and if it changes -- look at the diff and see which tests failed.
*
* Here's how I produced the two baseline files (with Tiny C Compiler):
*
* tcc -DINI_ALLOW_MULTILINE=1 ../ini.c -run unittest.c > baseline_multi.txt
* tcc -DINI_ALLOW_MULTILINE=0 ../ini.c -run unittest.c > baseline_single.txt
*
*/
#include <stdio.h>
#include <stdlib.h>
@ -20,21 +20,25 @@ tcc -DINI_ALLOW_MULTILINE=0 ../ini.c -run unittest.c > baseline_single.txt
int User;
char Prev_section[50];
int dumper(void* user, const char* section, const char* name,
int dumper(void* user,
const char* section,
const char* name,
const char* value)
{
User = (int)user;
if (strcmp(section, Prev_section)) {
if (strcmp(section, Prev_section))
{
printf("... [%s]\n", section);
strncpy(Prev_section, section, sizeof(Prev_section));
Prev_section[sizeof(Prev_section) - 1] = '\0';
}
printf("... %s=%s;\n", name, value);
return strcmp(name, "user")==0 && strcmp(value, "parse_error")==0 ? 0 : 1;
return strcmp(name, "user") == 0 && strcmp(value, "parse_error") == 0 ? 0 : 1;
}
void parse(const char* fname) {
void parse(const char* fname)
{
static int u = 100;
int e;