Cleanup
Some checks failed
Builds / XTChain (windows) (push) Failing after -59m50s
Builds / XTChain (linux) (push) Failing after 17s

This commit is contained in:
Aiken Harris 2025-07-08 10:24:31 +02:00 committed by CodingWorkshop Signing Team
parent 18c725042a
commit ce388b4ee4
Signed by: CodingWorkshop Signing Team
GPG Key ID: 6DC88369C82795D2

View File

@ -7,57 +7,13 @@
* Rafal Kupiec <belliash@codingworkshop.eu.org> * Rafal Kupiec <belliash@codingworkshop.eu.org>
*/ */
#ifdef UNICODE
#define _UNICODE
#endif
#include <ctype.h>
#include <stdarg.h> #include <stdarg.h>
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
#include <unistd.h>
#define _T(x) x #define _T(x) x
#ifdef _UNICODE
#define TS "%ls"
#else
#define TS "%s"
#endif
static
inline
int
_tcsicmp(const char *a,
const char *b)
{
while(*a && tolower(*a) == tolower(*b))
{
a++;
b++;
}
return *a - *b;
}
static
inline
char *
concat(const char *prefix,
const char *suffix)
{
int prefixlen = strlen(prefix);
int suffixlen = strlen(suffix);
char *buf = malloc((prefixlen + suffixlen + 1) * sizeof(*buf));
strcpy(buf, prefix);
strcpy(buf + prefixlen, suffix);
return buf;
}
static static
inline inline
char * char *
@ -148,15 +104,3 @@ split_argv(const char *argv0,
*exe_ptr = exe; *exe_ptr = exe;
} }
} }
static
inline
int
run_final(const char *executable,
const char *const *argv)
{
execvp(executable, (char **) argv);
perror(executable);
return 1;
}