Commit Graph

19564 Commits

Author SHA1 Message Date
Gunnar Beutner
0a94b4233f Kernel: Don't use ref_count() in MasterPTY::close()
With the recent fixes to how close() gets called this is not
necessary anymore.
2021-05-01 23:04:40 +02:00
Gunnar Beutner
9b2dd0f3b4 Ports: Fix building libpuffy 2021-05-01 22:52:15 +02:00
Gunnar Beutner
6cf59b6ae9 Everywhere: Turn #if *_DEBUG into dbgln_if/if constexpr 2021-05-01 21:25:06 +02:00
Valtteri Koskivuori
4e6f03a860 PixelPaint: Add fill mode for the ellipse tool
Functionality was already there, just had to hook it up!
2021-05-01 21:11:33 +02:00
Idan Horowitz
8293b22361 Kernel: Handle both shift keys being pressed and then released
Our current implementation does not work in the special case in which
both shift keys are pressed, and then only one of the keys is released,
as this would result in writing lower case letters, instead of the
expected upper case letters.

This commit fixes that by keeping track of the amount of shift keys
that are pressed (instead of if any are at all), and only switching to
the unshifted keymap once all of them are released.
2021-05-01 21:08:23 +02:00
Gunnar Beutner
63ff271125 Userland: Improve how traceroute reports timing data for packets
Previously we'd include the time required to do DNS resolution in the
time we'd report for traceroute packets. This would skew the times
reported.
2021-05-01 20:52:35 +02:00
Linus Groh
f81e581d50 Meta: Remove trailing whitespace from ro.json
This fixes the CI linting step.
2021-05-01 20:15:24 +02:00
Sahan Fernando
bd563f0b3c Kernel: Make processes start with a 16-byte-aligned stack 2021-05-01 20:08:35 +02:00
Gunnar Beutner
cf7df418ed Kernel: Make sure we read all packets
The previous patch already helped with this, however my idea of only
reading a few packets didn't work and we'd still sometimes end up not
receiving any more packets from the E1000 interface.

With this patch applied my NIC seems to receive packets just fine, at
least for now.
2021-05-01 20:08:08 +02:00
xSlendiX
1dec93f45c Keymap: Added Romanian layout 2021-05-01 20:07:27 +02:00
Valtteri Koskivuori
370231c05c Kernel: Expose minor device numbers for keyboard and mouse
A fix for two FIXMEs, and paving the way for multi-keyboard/mouse
support, I guess.
2021-05-01 20:07:11 +02:00
Andreas Kling
6536a979d8 LibGUI: Improve a FIXME comment in TextDocument 2021-05-01 19:42:29 +02:00
Andreas Kling
a7fb50567b TextEditor: Make sure to mark the Window as unmodified after saving
This comes with a FIXME, as it would be nicer if this information
would propagate from TextDocument all the way out somehow.
2021-05-01 19:42:29 +02:00
Andreas Kling
f0cc712246 TextEditor: Use an automatic "modified" marker in the window title
This simplifies the application somewhat as we no longer need to
manually update the window title whenever the text document changes.
2021-05-01 19:42:29 +02:00
Andreas Kling
20dd5735ce WindowServer+LibGfx: Automatic "modified" markers in window titles
You can now add the string "[*]" to a window title and it will be
replaced with " (*)" if the window is modified, and with "" otherwise.
2021-05-01 19:42:29 +02:00
Andreas Kling
e9c40b0243 TextEditor: Plumb modified state from GUI::TextDocument to GUI::Window
Instead of tracking this stuff ourselves at the application level,
we now just act as an intermediary and pass along the information to
the windowing system.
2021-05-01 19:42:29 +02:00
Andreas Kling
5b68a76c77 LibGUI: Track modified state in GUI::TextDocument
Until now, this has been hackishly tracked by the TextEditor app's
main widget. Let's do it in GUI::TextDocument instead, so that anyone
who uses this class can know whether it's modified or not.
2021-05-01 19:42:29 +02:00
Andreas Kling
443775754f TextEditor: Add some missing curly braces around a nested if statement 2021-05-01 19:42:29 +02:00
Andreas Kling
e5ceabfbbb TextEditor: Remove some unnecessary #include statements 2021-05-01 19:42:29 +02:00
Andreas Kling
b424e6c86f TextEditor: Rename TextEditorWidget => TextEditor::MainWidget 2021-05-01 19:42:29 +02:00
Andreas Kling
2fa765bbd5 LibGUI: Add getter/setter for GUI::Window modified state
This state lives in WindowServer and has no local copy in the client
process for now. This may turn out to be a performance issue, and if
it does we can easily cache it.
2021-05-01 19:42:29 +02:00
Andreas Kling
492464f4c1 WindowServer: Add Window "modified" state
This will be used to track which windows contain some kind of unsaved
data that the user may want some help remembering to save. :^)
2021-05-01 19:42:29 +02:00
Idan Horowitz
5c385d06e8 Lagom/Fuzzers: Add fuzzers for Windows-1251 and Windows-1255 decoders 2021-05-01 17:59:08 +02:00
Idan Horowitz
87cabda80d LibTextCodec: Implement a Windows-1251 decoder
This encoding (a superset of ascii that adds in the cyrillic alphabet)
is currently the third most used encoding on the web, and because
cyrillic glyphs were added by Dmitrii Trifonov recently, we can now
support it as well :^)
2021-05-01 17:59:08 +02:00
Andreas Kling
4b0098e52f Everywhere: Rename app_menu to file_menu or game_menu 2021-05-01 17:40:54 +02:00
Gal Horowitz
b119fa5a0a Base: Add bold Hebrew character glyphs to the Katica Bold 10 font
The glyph for the letter `Shin` (U+05E9) looks a bit wonky because the
width of the font is too small. Unfortunately it doesn't look like the
FontEditor is capable of changing the width of an existing font, so if
that option will be added in the future this glyph can be fixed.
2021-05-01 17:25:43 +02:00
Ali Mohammad Pur
70728b49e2 Shell: Move the heredocs vector to a local value before processing it
Otherwise we would end up trying to parse the same heredoc entry, if it
contained a sequence terminated by a newline.
e.g. `<<-x\n$({` would attempt to read a heredoc entry after `x`, and
then after `{` while inside the first heredoc entry.
To make this work, we can simply empty the instance vector and keep the
state on the stack.
Issue found through oss-fuzz:
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=33852
2021-05-01 15:58:31 +02:00
Ali Mohammad Pur
323a408d8c Shell: Make set_is_syntax_error() also copy the error location 2021-05-01 15:58:31 +02:00
Ali Mohammad Pur
f1d49d391e Shell: Disallow non-bareword nodes as part of a heredoc key
Found by oss-fuzz:
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=33854
2021-05-01 15:58:31 +02:00
Gunnar Beutner
f18895c0d6 LibCore: Fix building the library on macOS 2021-05-01 15:56:16 +02:00
Mango0x45
1635942951 Man: Add a manpage for rev(1) 2021-05-01 14:15:30 +02:00
Mango0x45
10fc9231d5 Userland: Add the rev(1) utility to reverse lines 2021-05-01 14:15:30 +02:00
Mango0x45
ec0abec9ee Userland: Remove an unused function declaration from tac.
The function declaration seems to have come from an earlier commit. The
function is no longer here so there is no reason to keep this around.
2021-05-01 14:15:23 +02:00
Olivier De Cannière
56fc949646 HackStudio: Detection of externally deleted files
HackStudio can now detect that files that have been opened in it were
deleted. When this occurs, it will update the list of open files and
reasign a file to the editors that showed the deleted file before the
deletion. The new file is either another file that was opened or the
default editor is no other open file is available

Closes SerenityOS#6632
2021-05-01 13:39:43 +02:00
Gunnar Beutner
a6201f708e Ports: Generate host keys for OpenSSH 2021-05-01 12:40:12 +02:00
Gunnar Beutner
e69b729733 Ports: Use sendfd()/recvfd() for mm_send_fd()/mm_receive_fd() 2021-05-01 12:40:12 +02:00
Gunnar Beutner
17e5ba70b1 LibC: Make sure that parse_pwddb_entry doesn't write to stderr
Library functions shouldn't write to stdout/stderr as that might not
be expected by the caller.
2021-05-01 12:40:12 +02:00
Gunnar Beutner
302f9798ee LibC: Implement support for getspnam() and friends 2021-05-01 12:40:12 +02:00
Gunnar Beutner
ce77caf479 LibC: Move crypt() and crypt_r() to the right header file
According to POSIX.1 these should be in <crypt.h>.
2021-05-01 12:40:12 +02:00
Brian Gianforcaro
f05086a5d2 Kernel: Harden Ext2FileSystem Vector usage against OOM. 2021-05-01 09:10:30 +02:00
Brian Gianforcaro
2ee1731966 Kernel: Harden Process Vector usage against OOM. 2021-05-01 09:10:30 +02:00
Brian Gianforcaro
ee84b8a845 Kernel: Harden DevFS Vector usage against OOM.
The dance here is not complicated, but it is something that should
be taken note of. Since we append to both lists, we don't want to
orphan the new Inode in the m_links/m_subfolders Vector in the event
that the append to m_parent_fs.m_nodes fails.
2021-05-01 09:10:30 +02:00
Brian Gianforcaro
a678851b41 Kernel: Harden sys$setgroups Vector usage against OOM 2021-05-01 09:10:30 +02:00
Brian Gianforcaro
f0568bff9b Kernel: Harden Socket Vector usage against OOM 2021-05-01 09:10:30 +02:00
Brian Gianforcaro
e8d6d478c4 Kernel: Harden LocalSocket Vector usage against OOM. 2021-05-01 09:10:30 +02:00
Gunnar Beutner
a9f488c55b LibC: Make EWOULDBLOCK an alias for EAGAIN
According to POSIX.1 all error codes have to be distinct - with
the exception for EAGAIN and EWOULDBLOCK. Other libcs including
eglibc and newlib define EWOULDBLOCK as an alias for EAGAIN and
some software including OpenTTD expect this behavior.
2021-05-01 09:02:57 +02:00
Gunnar Beutner
03f4c48de1 Ports: Disable GetPerformanceTimer() for OpenTTD
OpenTTD calls gettimeofday() so many times per second that the
game becomes unusable after joining a reasonably active network
game.
2021-05-01 09:02:57 +02:00
Hendiadyoin1
f6aad70541 LibX86+UserspaceEmulator: Add MMX insns prototypes 2021-05-01 08:56:52 +02:00
Brian Gianforcaro
38fe67abb4 Base: Add a man page for the 'bt' command. 2021-05-01 08:44:33 +02:00
Brian Gianforcaro
ca213ab374 bt: Enumerate all threads when symbolizing stacks in the bt utility.
Enumerate tid's from /proc/{pid}/stacks/ and use it to print the
backtrace for all active threads in the specified process.
2021-05-01 08:44:33 +02:00