This commit moves the length calculations out to be directly on the
StringView users. This is an important step towards the goal of removing
StringView(char const*), as it moves the responsibility of calculating
the size of the string to the user of the StringView (which will prevent
naive uses causing OOB access).
Some POSIX utilities are specified to return a specific value on error,
which is not 1. `Main::set_return_code_for_errors()` lets you set it to
that value.
This creates an error that contains the name of the syscall that failed.
This allows error handlers to print out the name of the call if they
want to. :^)
By linking with LibMain, your program no longer needs to provide main().
Instead, execution begins in this function:
ErrorOr<int> serenity_main(Main::Arguments);
This allows programs that link with LibMain to use TRY() already in
their entry function, without having to do manual ErrorOr unwrapping.
This is very experimental, but it seems like a nice idea so let's try it
out. :^)