Commit Graph

13329 Commits

Author SHA1 Message Date
Luke
0f52144477 Ports: Add OpenSSH port 2020-09-27 01:02:11 +02:00
Luke
bf809226de LibC: Add SCM_RIGHTS to sockets.h and caddr_t to types.h 2020-09-27 01:02:11 +02:00
Luke
1ec59f28ce LibC: Make isalum/isalpha/etc. functions instead of macros
These are supposed to be both functions and macros. I'm not sure
how to provide the functions at the same time as the macros,
as they collide with each other and cause compile errors.

However, some ports fully expect them to be functions.
For example, OpenSSH stores them into structures as function
pointers.
2020-09-27 01:02:11 +02:00
Luke
9266006349 LibC: Add ss_family to sockaddr_storage
I'm not exactly sure if this is in the right spot in the structure,
especially since I read that this is supposed to be cast into other
structures.
2020-09-27 01:02:11 +02:00
Luke
b3be275cf7 LibELF: Validate PT_GNU_RELRO program header
I'm not sure if this is the correct validation. This is based on
it being "read-only after relocation".
2020-09-27 01:02:11 +02:00
Luke
9d8f1032b7 LibC: Add missing utmp backwards compatibility hacks and user/dead process macros
The user/dead process macros are not used anywhere in Serenity right now,
but are required for OpenSSH.
2020-09-27 01:02:11 +02:00
Luke
721788943d Kernel: Implement _SC_OPEN_MAX 2020-09-27 01:02:11 +02:00
Luke
db31452bc2 LibC: Made mbtowc return int instead of size_t 2020-09-27 01:02:11 +02:00
Luke
5fbb8f9c6a LibC: Add FIXME for vsscanf 2020-09-27 01:02:11 +02:00
Luke
7a558d16b0 LibC: Add some missing netinet macros required by OpenSSH
Not used anywhere in Serenity right now, but required for OpenSSH.
2020-09-27 01:02:11 +02:00
Luke
f2cc565670 LibC: Add SSIZE_MAX limit 2020-09-27 01:02:11 +02:00
Luke
83849f0ef3 LibC: Include cdefs.h in getopt.h
Required for __BEGIN_DECLS
2020-09-27 01:02:11 +02:00
Luke
7334f21ef7 LibC: Add EPFNOSUPPORT error number
Not used anywhere in Serenity currently, but required for OpenSSH.
2020-09-27 01:02:11 +02:00
Luke
ec136db592 Kernel: Return ENOPROTOOPT instead of asserting on unimplemented levels in getsockopt 2020-09-27 01:02:11 +02:00
Luke
93b9929391 LibC: Add paths.h with some default mail directory for now 2020-09-27 01:02:11 +02:00
AnotherTest
5f1cc64504 Shell: Fix use-after-move in alias resolution
This unbreaks aliases!
2020-09-26 22:11:28 +02:00
AnotherTest
fa03a2848f Shell: Add live formatting and take an option to enable it
This patchset makes it possible for the shell to format the current
buffer of the line editor live, with somewhat accurate cursor tracking.
Since this feature is pretty goofy at best, let's keep it off by default
for now :^)
2020-09-26 21:28:35 +02:00
AnotherTest
e94ee08eca Shell: Fix a FIXME in the a test about using functions 2020-09-26 21:28:35 +02:00
AnotherTest
b3dd97a694 Shell: Add a (very basic) formatter 2020-09-26 21:28:35 +02:00
AnotherTest
6e6be8e56e Shell: Ignore '\\\n' in input
This allows the user to break a line:
```sh
$ echo \
   foo
```
is the same as
```sh
$ echo    foo
```
2020-09-26 21:28:35 +02:00
AnotherTest
d64e00a5f6 Shell: Rename two 'fd' class members to have an 'm_' prefix 2020-09-26 21:28:35 +02:00
AnotherTest
51e598cf0b Shell: Use NonnullRefPtr to store non-null subnodes
Also replaces null-is-invalid nodes with syntax error nodes.
2020-09-26 21:28:35 +02:00
AnotherTest
2d7aaab897 LibLine: Add a setter for the cursor position 2020-09-26 21:28:35 +02:00
Maciej Zygmanowski
dd682168a9 lsof: Separate file name components
In /proc/PID/fds we get not only file name, but also additional information
about file type, state etc. This commit makes `lsof' command separate these
components. When you are filtering files by file name, only actual file name
is checked (not additional data).
2020-09-26 21:23:58 +02:00
Maciej Zygmanowski
2ed0385075 lsof: Allow selecting files by file name 2020-09-26 21:23:58 +02:00
Andreas Kling
111d63c676 LibJS: Remove two unused Interpreter member functions 2020-09-26 21:23:14 +02:00
Tom
69a9c78783 Kernel: Allow killing queued threads
We need to dequeue and wake threads that are waiting if the process
terminates.

Fixes #3603 without the HackStudio fixes in #3606.
2020-09-26 20:03:16 +02:00
Tibor Nagy
8b293119ab LibGUI: Update color widgets when has_alpha is toggled in ColorPicker
Fixing a bug where the alpha spinbox wasn't immediately disabled when
color_has_alpha_channel was set to false.
2020-09-26 19:55:54 +02:00
asynts
01915a3027 AK+Format: Use the new format backend in the implementation. 2020-09-26 17:19:04 +02:00
asynts
2111fc5f63 AK+Format: Add new integer to string backend.
I put this into the <AK/PrintfImplementation.h> header in the hope that
it could be re-used by the printf implementation. That would not be
super trivial though, so I am not doing that now.
2020-09-26 17:19:04 +02:00
Itamar
8af67210cf HackStudio: Detach from debugged process before terminating
Fixes #3308
2020-09-26 17:18:21 +02:00
Itamar
8ce641cefc LibDebug: Add ability to detach from debuggee 2020-09-26 17:18:21 +02:00
Itamar
6c73fdf8d1 HackStudio: Fix FormEditor widget icons loading
Previously, when resolving the paths for the FormEditor widget icons
we didn't take into the account that calling class_name() returns the
widget name with a "GUI::" prefix.

Also, we now skip over widgets that we don't have an icon for.
2020-09-26 17:18:21 +02:00
Benoit Lormeau
8f34b493e4 AK: Enhance GenericLexer's string consumption
The `consume_quoted_string()` can now take an escape character. This allows it
(for example) to capture a string's enclosing quotes. The escape character is
optional by default.

You can also consume and unescape a quoted string with the eponymous method
`consume_and_unescape_string()`. It takes an escape character as parameter
(backslash by default). It builds a String in which common escape sequences
get... unescaped :^) (e.g. \n, \r, \t...).
2020-09-26 17:17:53 +02:00
Benoit Lormeau
1ab6dd67e9 AK: Alphabetically sort the ctype adapters 2020-09-26 17:17:53 +02:00
Benoit Lormeau
66481ad279 AK: Added explanatory comments in GenericLexer.h 2020-09-26 17:17:53 +02:00
Robbe De Greef
fd7a2278b9 Documentation: Debian gcc-9 installation instructions
We already have installation instructions for ubuntu but not yet for
Debian. Gcc-9 is not available on Debian stable so instructions for
switching to and from Debian testing are added.
2020-09-26 17:16:53 +02:00
Robbe De Greef
926fb3ff48 Documentation: Serenity requires GCC 9 or higher
Gcc 8.3.0 (which is the current version in debian 10 stable) seems to
fail at building AK. New people might get stuck when they try to run
make inside the ./Build folder and fail at building serenity.
2020-09-26 17:16:53 +02:00
Tom
1727b2d7cd Kernel: Fix thread joining issues
The thread joining logic hadn't been updated to account for the subtle
differences introduced by software context switching. This fixes several
race conditions related to thread destruction and joining, as well as
finalization which did not properly account for detached state and the
fact that threads can be joined after termination as long as they're not
detached.

Fixes #3596
2020-09-26 13:03:13 +02:00
Andreas Kling
b245121f13 Spreadsheet: clang-format 2020-09-26 00:10:57 +02:00
asynts
2030084746 AK: Borrow exact format syntax form std::format.
Instead of just implementing format specifiers ad-hog this commit
implements the exact syntax std::format uses.

There are still a ton of features that are not supported by this
implementation, however, the format specifiers should be parsed
correctly.

In some cases however, the format specifiers aren't quite parsed
correctly, for example:

    String::formatted("{:{}}", 42, 4)

should produce the string "  42" however an (unrelated) assertion fails.
This is because vformat doesn't consider nested parentheses. I have to
spend some time coming up with a simple way of doing this, I don't feel
like doing that right now.

The fundamental code for this already exists, by limiting the number of
format arguments (arbitrarily) to 256 large widths are used to encode
that these should be taken from other format parameters.
2020-09-26 00:00:50 +02:00
asynts
84d276dba0 AK: Add GenericLexer::remaining.
This is useful for debugging with printf :^).
2020-09-26 00:00:50 +02:00
Tibor Nagy
5b7decc3af LibGUI: Add alpha preview to ColorPicker 2020-09-26 00:00:08 +02:00
Tibor Nagy
59a0e5ba1e Applications: Paint transparency grids through StylePainter 2020-09-26 00:00:08 +02:00
Tibor Nagy
7ab04ea31a LibGfx: Add painting transparency grids to StylePainter 2020-09-26 00:00:08 +02:00
Linus Groh
7d83665635 LibJS+LibGUI+js: Handle UnterminatedRegexLiteral in syntax highlighters 2020-09-25 23:58:42 +02:00
AnotherTest
43b2928688 Spreadsheet: Add the 'Date' cell type
Since `JS::Date::value_of()' returns the timestamp in ms, this new type
assumes that the value given is also in ms.
2020-09-25 23:55:33 +02:00
AnotherTest
a2efff9287 Spreadsheet: Treat an empty format string as "default" 2020-09-25 23:55:33 +02:00
AnotherTest
e250591ff3 LibGUI: Do not clear the selection on right-click 2020-09-25 23:55:33 +02:00
AnotherTest
4748248fef Spreadsheet: Save and load cell types and formatting options 2020-09-25 23:55:33 +02:00