tools: Update sources list and run clang-format
This commit is contained in:
parent
c0cf952113
commit
d9713723c9
@ -77,8 +77,7 @@ static void log_text_console(LogLevel level, const char* format, va_list origin)
|
|||||||
TextConsole::set_foreground(WHITE);
|
TextConsole::set_foreground(WHITE);
|
||||||
|
|
||||||
// NOTE: Same as above.
|
// NOTE: Same as above.
|
||||||
auto rc = cstyle_format(
|
auto rc = cstyle_format(format, [](char c, void*) -> Result<void> { return TextConsole::putchar(c); }, nullptr, ap);
|
||||||
format, [](char c, void*) -> Result<void> { return TextConsole::putchar(c); }, nullptr, ap);
|
|
||||||
|
|
||||||
if (rc.has_error()) { TextConsole::wprint(L"Invalid UTF-8 in log message"); }
|
if (rc.has_error()) { TextConsole::wprint(L"Invalid UTF-8 in log message"); }
|
||||||
|
|
||||||
|
@ -3,8 +3,8 @@
|
|||||||
#include "memory/SharedMemory.h"
|
#include "memory/SharedMemory.h"
|
||||||
#include "video/Framebuffer.h"
|
#include "video/Framebuffer.h"
|
||||||
#include <bits/ioctl-defs.h>
|
#include <bits/ioctl-defs.h>
|
||||||
#include <luna/CString.h>
|
|
||||||
#include <luna/Alignment.h>
|
#include <luna/Alignment.h>
|
||||||
|
#include <luna/CString.h>
|
||||||
|
|
||||||
Result<void> FramebufferDevice::create()
|
Result<void> FramebufferDevice::create()
|
||||||
{
|
{
|
||||||
|
@ -207,8 +207,8 @@ namespace TextConsole
|
|||||||
{
|
{
|
||||||
va_list ap;
|
va_list ap;
|
||||||
va_start(ap, format);
|
va_start(ap, format);
|
||||||
const usize rc = TRY(cstyle_format(
|
const usize rc =
|
||||||
format, [](char c, void*) -> Result<void> { return putchar(c); }, nullptr, ap));
|
TRY(cstyle_format(format, [](char c, void*) -> Result<void> { return putchar(c); }, nullptr, ap));
|
||||||
va_end(ap);
|
va_end(ap);
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
@ -34,12 +34,6 @@ struct timeval
|
|||||||
} while (0);
|
} while (0);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define TIMEVAL_TO_TIMESPEC(x) \
|
#define TIMEVAL_TO_TIMESPEC(x) { .tv_sec = (x).tv_sec, .tv_nsec = (x).tv_usec * 1000 }
|
||||||
{ \
|
#define TIMESPEC_TO_TIMEVAL(x) { .tv_sec = (x).tv_sec, .tv_usec = (x).tv_nsec / 1000 }
|
||||||
.tv_sec = (x).tv_sec, .tv_nsec = (x).tv_usec * 1000 \
|
|
||||||
}
|
|
||||||
#define TIMESPEC_TO_TIMEVAL(x) \
|
|
||||||
{ \
|
|
||||||
.tv_sec = (x).tv_sec, .tv_usec = (x).tv_nsec / 1000 \
|
|
||||||
}
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -60,16 +60,14 @@ extern "C"
|
|||||||
usize strlen(const char* str)
|
usize strlen(const char* str)
|
||||||
{
|
{
|
||||||
const char* i = str;
|
const char* i = str;
|
||||||
for (; *i; ++i)
|
for (; *i; ++i);
|
||||||
;
|
|
||||||
return (usize)(i - str);
|
return (usize)(i - str);
|
||||||
}
|
}
|
||||||
|
|
||||||
usize strnlen(const char* str, usize max)
|
usize strnlen(const char* str, usize max)
|
||||||
{
|
{
|
||||||
const char* i = str;
|
const char* i = str;
|
||||||
for (; *i && max; ++i, --max)
|
for (; *i && max; ++i, --max);
|
||||||
;
|
|
||||||
return (usize)(i - str);
|
return (usize)(i - str);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -108,8 +106,7 @@ extern "C"
|
|||||||
usize wcslen(const wchar_t* str)
|
usize wcslen(const wchar_t* str)
|
||||||
{
|
{
|
||||||
const wchar_t* i = str;
|
const wchar_t* i = str;
|
||||||
for (; *i; ++i)
|
for (; *i; ++i);
|
||||||
;
|
|
||||||
return (usize)(i - str);
|
return (usize)(i - str);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4,7 +4,7 @@ source $(dirname $0)/env.sh
|
|||||||
|
|
||||||
cd $LUNA_ROOT
|
cd $LUNA_ROOT
|
||||||
|
|
||||||
FOLDERS=(kernel libc libos libui libluna apps shell tests)
|
FOLDERS=(kernel libc libos gui libluna utils shell tests system)
|
||||||
|
|
||||||
SOURCES=($(find ${FOLDERS[@]} -type f -name "*.cpp"))
|
SOURCES=($(find ${FOLDERS[@]} -type f -name "*.cpp"))
|
||||||
SOURCES+=($(find ${FOLDERS[@]} -type f -name "*.h"))
|
SOURCES+=($(find ${FOLDERS[@]} -type f -name "*.h"))
|
||||||
|
Loading…
Reference in New Issue
Block a user