Andreas Kling
3055f73d48
AK+Kernel+LibC: Add vdbgprintf()
...
This is like dbgprintf() except it takes a va_list instead of ...
2020-08-06 13:36:06 +02:00
Andreas Kling
2f1d596dd3
UserspaceEmulator: Fix bad rc check in ttyname and getcwd syscalls
...
Errors here are (rc < 0), not (rc < 1).
2020-08-06 11:45:52 +02:00
Andreas Kling
0d6597df2b
AK: Remove Stream::operator bool()
...
This was only used in one place, and that caused a bug, so I'm removing
this for now since there are no more uses.
2020-08-06 11:37:33 +02:00
Andreas Kling
4c44c96bc6
LibDebug: Unbreak LineProgram::parse_source_directories()
...
This regressed with ac9f6fd1f8
where
we switched to using InputMemoryStream.
2020-08-06 11:35:40 +02:00
Andreas Kling
078969b92f
LibDebug: Fix bitrotted DWARF_DEBUG code
2020-08-06 11:32:17 +02:00
Andreas Kling
ddab7ab693
Kernel: Store TTY's foreground process as a WeakPtr<Process>
...
This ensures that we don't leave a stale PGID assigned to the TTY after
the process exits, which would make PID recycling attacks possible.
2020-08-06 11:17:53 +02:00
AnotherTest
ff01cfa08a
Shell: Mark suspended children as such when receiving a SIGCHLD
2020-08-06 10:35:22 +02:00
AnotherTest
05972668d1
Kernel: Send a SIGCHLD to the parent upon suspension of a process
...
...that is controlling a TTY.
2020-08-06 10:35:22 +02:00
asynts
b3d1a05261
Refactor: Expose const_cast by removing ByteBuffer::warp(const void*, size_t)
...
This function did a const_cast internally which made the call side look
"safe". This method is removed completely and call sites are replaced
with ByteBuffer::wrap(const_cast<void*>(data), size) which makes the
behaviour obvious.
2020-08-06 10:33:16 +02:00
asynts
ac9f6fd1f8
LibDebug: Use InputMemoryStream instead of BufferStream.
...
This removes another call to ByteBuffer::wrap(const void*, size_t).
2020-08-06 10:33:16 +02:00
asynts
5bfa7749c3
AK: Add InputStream abstraction and InputMemoryStream implementation.
2020-08-06 10:33:16 +02:00
asynts
75cde94c6a
AK: Add String constructor from ReadonlyBytes.
2020-08-06 10:33:16 +02:00
asynts
42b4880653
AK: Rename Tests/Span.cpp to Tests/TestSpan.cpp.
2020-08-06 10:33:16 +02:00
asynts
5f7427ba4b
AK: Add Integral and FloatingPoint concepts.
2020-08-06 10:33:16 +02:00
asynts
05abfc0e1f
AK: Rename MakeUnsigned::type to MakeUnsigned::Type.
...
Also renames MakeSigned::type to MakeSigned::Type.
2020-08-06 10:33:16 +02:00
Brian Gianforcaro
7e6fbef8db
Kernel: Partial usage of Userspace<T> for the poll syscall
...
This change mostly converts poll to Userspace<T> with the caveat
of the fds member of SC_poll_params. It's current usage is a bit
too gnarly for me to take on right now, this appears to need a lot
more love.
In addition to enlightening the syscall to use Userspace<T>, I've
also re-worked most of the handling to use validate_read_and_copy
instead of just directly de-referencing the user pointer. We also
appeared to be missing a re-evaluation of the fds array after the
thread block is awoken.
2020-08-06 10:22:44 +02:00
Valtteri Koskivuori
b4a29113e4
Documentation: Add a guide for setting up Qt Creator
...
This was already in video form, but I figured it might be nice to
have this here as well, to make it easier to discover.
2020-08-06 10:22:14 +02:00
Tom
41d2a0e9f7
Kernel: Dequeue dying threads from WaitQueue
...
If a thread is waiting but getting killed, we need to dequeue
the thread from the WaitQueue so that a potential wake before
finalization doesn't happen.
2020-08-06 10:02:55 +02:00
Muhammad Zahalqa
9495eeb075
AK: Make min/max behave like the STL for equivalent inputs ( #2976 )
...
min(a, b) now returns a if both are equivalent.
max(a, b) now returns a if both are equivalent.
2020-08-06 09:58:45 +02:00
Luke
4b6036bc33
Meta: Update CLion configuration to include LibM and generated files
...
Also bumps the CXX Standard to C++20.
2020-08-06 09:43:03 +02:00
Andreas Kling
3ba0164ce0
AK: Fix broken symlink used by JSON test
2020-08-06 00:05:52 +02:00
Andreas Kling
d608d714b9
UserspaceEmulator: Support ioctl(TCGETS) and ioctl(TCSETS)
2020-08-05 22:34:50 +02:00
Andreas Kling
e0e3e5b9b1
UserspaceEmulator: Add the access syscall
2020-08-05 22:34:50 +02:00
Andreas Kling
c497603177
UserspaceEmulator: Add the getcwd syscall
2020-08-05 22:34:50 +02:00
Andreas Kling
b187a42e53
UserspaceEmulator: Add the ttyname syscall
2020-08-05 22:34:50 +02:00
Andreas Kling
9d93e208ac
UserspaceEmulator: Support ioctl(TIOCSPGRP)
2020-08-05 22:34:50 +02:00
Andreas Kling
3717a00290
UserspaceEmulator: Add the getpgrp syscall
2020-08-05 22:34:50 +02:00
Andreas Kling
8dea25d974
UserspaceEmulator: Add support for UNIX signals :^)
...
The emulator will now register signal handlers for all possible signals
and act as a translation layer between the kernel and the emulated
process.
To get an accurate simulation of signal handling, we duplicate the same
trampoline mechanism used by the kernel's signal delivery system, and
also use the "sigreturn" syscall to return from a signal handler.
Signal masking is not fully implemented yet, but this is pretty cool!
2020-08-05 22:34:50 +02:00
Nico Weber
ce95628b7f
Unicode: Try s/codepoint/code_point/g again
...
This time, without trailing 's'. Ran:
git grep -l 'codepoint' | xargs sed -ie 's/codepoint/code_point/g
2020-08-05 22:33:42 +02:00
Nico Weber
19ac1f6368
Revert "Unicode: s/codepoint/code_point/g"
...
This reverts commit ea9ac3155d
.
It replaced "codepoint" with "code_points", not "code_point".
2020-08-05 22:33:42 +02:00
Andreas Kling
9664bac281
Meta: Add Brian Gianforcaro to the contributors list :^)
2020-08-05 22:06:31 +02:00
Andreas Kling
ad2e84b71a
Browser: Move bookmarks.json to ~/.config
2020-08-05 17:40:47 +02:00
Andreas Kling
4f3e8547d2
Base: Add ~/Documents and put miscellaneous files there
2020-08-05 17:40:47 +02:00
Andreas Kling
db450dbc44
Base: Move "js" and "little" HackStudio projects into ~/Source/
2020-08-05 17:40:47 +02:00
Andreas Kling
bc615572a9
LibCore+Base: Move user-specific config files to $HOME/.config
2020-08-05 17:40:47 +02:00
AnotherTest
7b15c85ff5
Shell: Do not assume that stdin/stdout is a TTY
...
This closes #2989 .
2020-08-05 17:30:31 +02:00
AnotherTest
70eb7aa627
LibLine: Check if operating on a TTY before using TTY features
...
This makes the line editor behave well when input is passed in from
pipes as well.
2020-08-05 17:30:31 +02:00
Brian Gianforcaro
a7ea7b3a66
AK: Decorate AK::Result<V, E> with [[nodiscard]]
2020-08-05 17:29:44 +02:00
Nico Weber
a9fb317a63
Build: Clang should get -Werror too
...
I accidentally removed it in a619943001
and #3002 only restored
it for gcc.
2020-08-05 17:29:15 +02:00
Brian Gianforcaro
adb83d3adc
AK: Decorate AK::TriState with [[nodiscard]]
...
TriState is another type of return code, it's value should always be
observed.
2020-08-05 17:29:01 +02:00
Brian Gianforcaro
3319803bd9
AK: Decorate atomic compare exchange operations with [[nodiscard]]
...
All CAS operations should always check return values, so they are
robust to failure in the event of conflict in parallel operation.
2020-08-05 17:28:44 +02:00
Linus Groh
9ef834384d
LibGUI: Use set_cursor() in TextEditor::set_document()
...
Instead of setting m_cursor directly to reset the cursor position,
TextEditor::set_document() now uses set_cursor() which will call cursor
change callback functions, if any.
This fixes a bug in HackStudio where the cursor information text would
not update immediately after changing the active TextDocument, even
though the cursor is always visibly being reset to 0, 0.
2020-08-05 17:27:14 +02:00
Andreas Kling
e2b4fef6c7
LibWeb: Specialize hit testing for text cursor purposes
...
The text cursor follows slightly different "intuitive" rules than the
regular hit testing. Clicking past the right edge of a text box should
still "hit" the text box, and place the cursor at its end, for example.
We solve this by adding a HitTestType enum that is passed to hit_test()
and determines whether past-the-edge candidates are considered.
2020-08-05 16:57:51 +02:00
Linus Groh
5cee150a91
Base: Open .hackstudio files in HackStudio
2020-08-05 16:54:23 +02:00
Linus Groh
a8d7cd5a15
HackStudio: Open project or file from argv[1] if given
...
When HackStudio is invoked with one or more arguments it will attempt to
treat the first argument as a project or source file and open it
accordingly.
2020-08-05 16:54:23 +02:00
Linus Groh
0d493c1879
HackStudio: Rename project file format from .files to .hackstudio
2020-08-05 16:54:23 +02:00
Brian Gianforcaro
f34fcdedef
AK: Decorate AK::NonnullOwnPtr::leak_ptr() with [[nodiscard]]
2020-08-05 16:12:00 +02:00
Brian Gianforcaro
fa625a2690
AK: Decorate AK::OwnPtr::leak_ptr() with [[nodiscard]]
...
We should always leak to an observed variable, otherwise
it's an actual leak. This is similar to AK::RefPtr::leak_ref()
which is also marked as [[nodiscard]].
2020-08-05 16:12:00 +02:00
Andreas Kling
00fe4c7bcb
LibGfx: Make draw_scaled_bitmap() apply relative opacity
...
Instead of overriding the alpha value of all source pixels, apply the
override opacity by multiplying with the source alpha.
Fixes #3004 .
2020-08-05 14:43:36 +02:00
Brian Gianforcaro
f3cbb79f80
Kernel: Decorate KResult with [[nodiscard]]
2020-08-05 14:36:48 +02:00