We were already borrowing a getopt() from the BSD family until the day
we write our own. This patch borrows a slightly more modern one so we
also get getopt_long().
Fixes#190.
See also #91 for the desire to eventually NIH our own getopt()..
This was a workaround to be able to build on case-insensitive file
systems where it might get confused about <string.h> vs <String.h>.
Let's just not support building that way, so String.h can have an
objectively nicer name. :^)
This is not as perfect as it is elsewhere in the system, as we cannot
really change how terminal "thinks about" characters and bytes. What
we can do though, and what this commit does, is to *render* emojis, but
make it seem as if they take up all the space, and all the columns their
bytes would take if they were all regular characters.
From here on, all strings displayed to the user are expected to
be encoded as UTF-8. The next few commits will deal with a few
existing places where this requirement is currently violated.
https://github.com/SerenityOS/serenity/issues/490
This class can locate and load emojis, which are expected to be stored
as regular PNG images at /res/emoji/U+XXXX.png, where XXXX is the
character codepoint.
https://github.com/SerenityOS/serenity/issues/490
This commit drastically changes how signals are handled.
In the case that an unblocked thread is signaled it works much
in the same way as previously. However, when a blocking syscall
is interrupted, we set up the signal trampoline on the user
stack, complete the blocking syscall, return down the kernel
stack and then jump to the handler. This means that from the
kernel stack's perspective, we only ever get one system call deep.
The signal trampoline has also been changed in order to properly
store the return value from system calls. This is necessary due
to the new way we exit from signaled system calls.
This can play anything that AWavLoader can load (so obviously only WAV
files at the moment.)
It works by having a timer that wakes up every 100ms and tries to send
a sample buffer to the AudioServer. If our server-side queue is full
then we wait until the next timer iteration and try again.
We display the most recently enqueued sample buffer in a nice little
widget that just plots the samples in green-on-black. :^)
This is a variant of the enqueue() API that returns immediately and
may fail. It's useful when you don't want to block until the audio
server can receive your sample buffer.