Compare commits
No commits in common. "5cb4b8b1fe1fa968193815f0d2c15d2035b697a4" and "c0cf9521134f56b8b9bb77b90304659f95d0cb2a" have entirely different histories.
5cb4b8b1fe
...
c0cf952113
@ -21,10 +21,6 @@ The script provided by the project to run the system, `tools/run.sh`, assumes th
|
|||||||
|
|
||||||
That being said, there's no requirement to use QEMU. If you want to use a different virtualization program, such as Oracle VirtualBox or VMWare, just use `tools/build-iso.sh` instead of `run.sh` and use the built `Luna.iso` in those programs.
|
That being said, there's no requirement to use QEMU. If you want to use a different virtualization program, such as Oracle VirtualBox or VMWare, just use `tools/build-iso.sh` instead of `run.sh` and use the built `Luna.iso` in those programs.
|
||||||
|
|
||||||
## Formatting/linting
|
|
||||||
|
|
||||||
Please make sure you have `clang-format` installed. Additionally, if your editor does not support format-on-save or you do not have it configured, please run `tools/run-clang-format.sh` before committing, to make sure all code follows the same style conventions.
|
|
||||||
|
|
||||||
## Source dependencies
|
## Source dependencies
|
||||||
TLDR: Luna does not depend on any third-party library.
|
TLDR: Luna does not depend on any third-party library.
|
||||||
|
|
||||||
|
@ -77,7 +77,8 @@ 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(format, [](char c, void*) -> Result<void> { return TextConsole::putchar(c); }, nullptr, ap);
|
auto rc = cstyle_format(
|
||||||
|
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/Alignment.h>
|
|
||||||
#include <luna/CString.h>
|
#include <luna/CString.h>
|
||||||
|
#include <luna/Alignment.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 =
|
const usize rc = TRY(cstyle_format(
|
||||||
TRY(cstyle_format(format, [](char c, void*) -> Result<void> { return putchar(c); }, nullptr, ap));
|
format, [](char c, void*) -> Result<void> { return putchar(c); }, nullptr, ap));
|
||||||
va_end(ap);
|
va_end(ap);
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
@ -34,6 +34,12 @@ struct timeval
|
|||||||
} while (0);
|
} while (0);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define TIMEVAL_TO_TIMESPEC(x) { .tv_sec = (x).tv_sec, .tv_nsec = (x).tv_usec * 1000 }
|
#define TIMEVAL_TO_TIMESPEC(x) \
|
||||||
#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,14 +60,16 @@ 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);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -106,7 +108,8 @@ 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 gui libluna utils shell tests system)
|
FOLDERS=(kernel libc libos libui libluna apps shell tests)
|
||||||
|
|
||||||
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