Add missing .clang-format, and fix some spaces that slipped through.

git-svn-id: https://www.unprompted.com/svn/projects/tildefriends/trunk@4856 ed5197a5-7fde-0310-b194-c3ffbd925b24
This commit is contained in:
2024-02-17 19:22:02 +00:00
parent 1958623a7a
commit d0e11bc68b
23 changed files with 583 additions and 597 deletions

View File

@ -42,7 +42,7 @@ struct backtrace_state* g_backtrace_state;
const char* k_db_path_default = "db.sqlite";
#define XOPT_PARSE( \
name, flags, options, config_ptr, argc, argv, extrac_ptr, extrav_ptr, err_ptr, autohelp_file, autohelp_usage, autohelp_prefix, autohelp_suffix, autohelp_spacer) \
name, flags, options, config_ptr, argc, argv, extrac_ptr, extrav_ptr, err_ptr, autohelp_file, autohelp_usage, autohelp_prefix, autohelp_suffix, autohelp_spacer) \
do \
{ \
xoptContext* _xopt_ctx; \
@ -117,8 +117,7 @@ static int _tf_command_test(const char* file, int argc, char* argv[])
const char** extras = NULL;
int extra_count = 0;
const char* err = NULL;
XOPT_PARSE(
file, XOPT_CTX_KEEPFIRST | XOPT_CTX_STRICT, options, &args, argc, (const char**)argv, &extra_count, &extras, &err, stderr, "test [options]", "options:", NULL, 15);
XOPT_PARSE(file, XOPT_CTX_KEEPFIRST | XOPT_CTX_STRICT, options, &args, argc, (const char**)argv, &extra_count, &extras, &err, stderr, "test [options]", "options:", NULL, 15);
if (err)
{
fprintf(stderr, "Error: %s\n", err);
@ -165,7 +164,7 @@ static int _tf_command_import(const char* file, int argc, char* argv[])
int extra_count = 0;
const char* err = NULL;
XOPT_PARSE(file, XOPT_CTX_KEEPFIRST | XOPT_CTX_POSIXMEHARDER | XOPT_CTX_STRICT, options, &args, argc, (const char**)argv, &extra_count, &extras, &err, stderr,
"import [options] [paths] ...", "options:", NULL, 15);
"import [options] [paths] ...", "options:", NULL, 15);
if (err)
{
fprintf(stderr, "Error: %s\n", err);
@ -223,7 +222,7 @@ static int _tf_command_export(const char* file, int argc, char* argv[])
int extra_count = 0;
const char* err = NULL;
XOPT_PARSE(file, XOPT_CTX_KEEPFIRST | XOPT_CTX_POSIXMEHARDER | XOPT_CTX_STRICT, options, &args, argc, (const char**)argv, &extra_count, &extras, &err, stderr,
"export [options] [paths] ...", "options:", NULL, 15);
"export [options] [paths] ...", "options:", NULL, 15);
if (err)
{
fprintf(stderr, "Error: %s\n", err);
@ -440,7 +439,7 @@ static int _tf_command_run(const char* file, int argc, char* argv[])
int extra_count = 0;
const char* err = NULL;
XOPT_PARSE(file, XOPT_CTX_KEEPFIRST | XOPT_CTX_POSIXMEHARDER | XOPT_CTX_STRICT, options, &args, argc, (const char**)argv, &extra_count, &extras, &err, stderr,
"run [options] [paths] ...", "options:", NULL, 15);
"run [options] [paths] ...", "options:", NULL, 15);
if (err)
{
@ -513,7 +512,7 @@ static int _tf_command_sandbox(const char* file, int argc, char* argv[])
int extra_count = 0;
const char* err = NULL;
XOPT_PARSE(file, XOPT_CTX_KEEPFIRST | XOPT_CTX_POSIXMEHARDER | XOPT_CTX_STRICT, options, &args, argc, (const char**)argv, &extra_count, &extras, &err, stderr,
"sandbox [options]", "options:", NULL, 15);
"sandbox [options]", "options:", NULL, 15);
if (err)
{
fprintf(stderr, "Error: %s\n", err);
@ -614,9 +613,9 @@ static void _startup(int argc, char* argv[])
{
if (
#if !defined(_WIN32)
signal(SIGSYS, _error_handler) == SIG_ERR ||
signal(SIGSYS, _error_handler) == SIG_ERR ||
#endif
signal(SIGSEGV, _error_handler) == SIG_ERR)
signal(SIGSEGV, _error_handler) == SIG_ERR)
{
perror("signal");
}