`atof()` has now been implemented as part of the standard C library.
It supports scientific notation such as `1.2e-3` etc, ala the version
found as part of `glibc`.
It's a bit chunky, so there's probably room for optimisations here
and there, however, for now it works as intended (and allows Quake
to run).
This patch adds a limit of 200 unsent messages per client. If a client
does not handle its incoming messages and we manage to queue up 200
messages for it, we'll now disconnect that client. :^)
If an IPC client is giving us EAGAIN when trying to send him a message,
we now queue up the messages inside the CoreIPCServer::Connection and
will retry flushing them on next post/receive.
This prevents WindowServer from freezing up when one of its clients is
not taking care of its incoming messages.
The old implementation of sin() had a very unacceptable amount of
error that was causing a lot of texture perspective issues in Quake.
This has been remedied through the use of the hardware `fsin`
x87 instruction. As has been noted in #246, this instruction is both
very slow, and can become wildly inaccurate for more precise values,
however the current implementation made an incorrect assumption about
applications "will end up writing their own implemtnation anyways",
which is not the case for Quake in Software mode, which relies heavily
on a correct `sin()` and `cos()` function for `R_ScanEdges()`.
Realistically, we should be using something like the CORDIC algorithm
(https://en.wikipedia.org/wiki/CORDIC) or `Taylor Expansion`, however
for now these provides a somewhat accurate result that allows Quake to
run without any texture or geometry issues.
Ports/.port_include.sh, Toolchain/BuildIt.sh, Toolchain/UseIt.sh
have been left largely untouched due to use of Bash-exclusive
functions and variables such as $BASH_SOURCE, pushd and popd.
Add dedicated internal types for Int64 and UnsignedInt64. This makes it
a bit more straightforward to work with 64-bit numbers (instead of just
implicitly storing them as doubles.)
With this patch, you can now assign the same GTextDocument to multiple
GTextEditor widgets via GTextEditor::set_document().
The editors have independent cursors and selection, but all changes
are shared, and immediately propagate to all editors.
This is very unoptimized and will do lots of unnecessary invalidation,
especially line re-wrapping and repainting over and over again.
This patch decouples GTextDocument and GTextDocumentLine from the line
wrapping functionality of GTextEditor.
This should basically make it possible to have multiple GTextEditors
editing the same GTextDocument. Of course, that will require a bit more
work since there's no paint invalidation yet.
The idea here is to decouple the document from the editor widget so you
could have multiple editors being views onto the same document.
This doesn't work yet, since the document and editor are coupled in
various ways still (including a per-line back-pointer to the editor.)
This makes double-clicking on a C++ token in HackStudio select the
whole token, which is pretty nice. It's not perfect in all cases,
but a lot nicer than just expanding until we hit whitespace. :^)
This makes the backspace erase backwards until the next soft tab stop.
We currently always use 4 as the soft tab width, but I suppose we could
make it configurable at some point. :^)
Instead of only doing a relayout in the widget you're invalidating,
we now do a recursive top-down relayout so everything gets updated.
This fixes invalid results after updating a preferred size in some
situations with nested layouts.
It's now possible to give GTextEditor a vector of Span objects.
Spans currently tell the editor which color to use for each character
in the span. This can be used to implement syntax highlighting :^)
Added a window creation callback to GApplication that gets called
by GWindow which will reset any pending exit request in the
CEventLoop.
This is to prevent a bug which prevents your application from
starting up if you had a message box or other dialog before
showing your main application form. The bug was triggered by
there being no more visible windows which was triggering a
premature quit().
When using the bounded string operations (e.g. snprintf), the null
terminator was always being written even if there was no space for
it (or indeed any valid buffer at all)
This overwriting caused segmentation faults and memory corruption
This could happen if a child was added to a GTabWidget before the
GTabWidget had its first layout.
Also add an assertion to catch this in GWidget::set_relative_rect()
since it was not immediately obvious what was happening.
Thread::make_userspace_stack_for_main_thread is only ever called from
Process::do_exec, after all the fun ELF loading and TSS setup has
occured.
The calculations in there that check if the combined argv + envp
size will exceed the default stack size are not used in the rest of
the stack setup. So, it should be safe to move this to the beginning
of do_exec and bail early with -E2BIG, just like the man pages say.
Additionally, advertise this limit in limits.h to be a good POSIX.1
citizen. :)
Instead of quitting the application immediately when the pty gives an
EOF, fire an on_command_exit hook so the TerminalWidget client can
decide for himself what to do.
Instead, have TerminalWidget provide an on_title_change hook.
This allows embedders to decide for themselves what to do if we receive
a "set terminal title" escape sequence.
When embedding a TerminalWidget, you might not want it to automatically
update its own size policy based on the exact terminal buffer size.
This behavior is now passed as a flag to the TerminalWidget constructor
which makes it behave nicely both inside HackStudio and in Terminal.