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.
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.
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.
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 :^)
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.
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
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
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.
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.
When the default build location was moved from /Build to the new
architecture specific directory, /Build/i686, this code broke.
All file names are now path relative one additional level up.
So continue the hack, and introduce another dummy directory to
make the relative paths resolve correctly.
Updated Spreadsheet to use the new way of converting a number to a
String represenation using the alphabet.
The code responsible for this conversion now lives in AK/String, so it
gets deleted from Spreadsheet.cpp.
This allows everybody to create a String version of their number
in a arbitrary bijective base. Bijective base meaning that the mapping
doesn't have a 0. In the usual mapping to the alphabet the follower
after 'Z' is 'AA'.
The mapping using the (uppercase) alphabet is used as a standard but
can be overridden specifying 'base' and 'map'.
The code was directly yanked from the Spreadsheet.
The Fire, LibGfxDemo and LibGfxScaleDemo demos did not have Alt+F4
functionality as they lacked menubars - I just added basic menubars with
Quit entries to allow this shortcut with the demos that didn't have it.
Raw sockets don't need a local port, so we shouldn't fail operations
if allocation yields an ENOPROTOOPT.
I'm not in love with the factoring here, just patching up the bug.
Without this patch we end up with sockets in the listener's accept
queue with state 'closed' when doing stealth SYN scans:
Client -> Server: SYN for port 22
Server -> Client: SYN/ACK
Client -> Server: RST (i.e. don't complete the TCP handshake)