Commit graph

29707 commits

Author SHA1 Message Date
Luke Wilde 4bf391ff4b LibJS: Implement Temporal.PlainTime.prototype.add() 2021-11-01 23:51:23 +01:00
Linus Groh 97f6c6029f LibJS: Implement Temporal.TimeZone.prototype.getInstantFor() 2021-11-01 21:39:45 +01:00
Ben Wiederhake 55e1edd51b Meta: Check auto-generated manpages for completeness on CI 2021-11-01 21:12:58 +01:00
Ben Wiederhake 50a65f02a8 Manpages: Auto-generate many through ArgsParser
This set was hand-curated, guided by the questions:
- Does it have at least three options, i.e. is the help page
  non-trivial?
- Is the program unusual, i.e. does listing it in Help or on
  man.serenityos.org spread awareness?
- Is the program common, but we only implement a subset of 'common'
  flags?
2021-11-01 21:12:58 +01:00
Ben Wiederhake a4e805756d Meta: Add script to generate and export manpages 2021-11-01 21:12:58 +01:00
Ben Wiederhake 2caad04d23 Base: Add new system-mode that just generates manpages 2021-11-01 21:12:58 +01:00
Ben Wiederhake 70c7861c33 UserspaceEmulator: Avoid special character in pseudo-identifier
In the generated HTML code, '#' gets interpreted as the beginning of a
shell comment, which throws the syntax highlighting off. Regardless,
spelling out the meaning of the '#' might make it more readable.
2021-11-01 21:12:58 +01:00
Ben Wiederhake ea9f2f80a1 LibCore: Make ArgsParser '--help' description more general
Now that the output may end up in Markdown files (and thus the website),
the help message should no longer be self-referential.
2021-11-01 21:12:58 +01:00
Ben Wiederhake 0372f051e9 LibCore: Enable emitting markdown from ArgsParser
ArgsParser will now automatically look for an environment variable
'ARGSPARSER_EMIT_MARKDOWN', and if it is set to exactly the string "1"
(i.e. mere presence or values like "ON" or "yes" are not enough), then
ArgsParser will emit a Markdown-formatted help message, instead of the
regular help message designed for consumption through a terminal.
2021-11-01 21:12:58 +01:00
Ben Wiederhake d2f9fee4ab LibMarkdown: Recognize and handle comments
This also improves Commonmark coverage, e.g. it fixes tests
HTML_blocks_ex179_2894..2906 and Lists_ex308_5439..5457.

In other words, we go from 271 out of 652 to 273 out of 652.
2021-11-01 21:12:58 +01:00
Ben Wiederhake 3ec87ecc75 Base: Don't start unnecessary services in self-test
These services weren't actually needed or tested. This should speed up
tests a bit. Even if it doesn't, at least we don't do unnecessary work.
2021-11-01 21:12:58 +01:00
Ben Wiederhake c840ed12f4 Manpages: Document path of crash(1)
As /usr/Tests/Kernel/ is not in $PATH, invoking crash(1) does not work
as documented.
2021-11-01 21:12:58 +01:00
Ben Wiederhake 28195032a3 profile: Don't treat '--help' as an error
profile seems to be the only program treating '--help' as an error.
Let's change that.
2021-11-01 21:12:58 +01:00
Ben Wiederhake b8f11b1bae Everywhere: Remove unused ArgsParser header
Found while trying to enumerate all programs that use ArgsParser.
2021-11-01 21:12:58 +01:00
Tim Schumacher 02446a5431 Ports: Enable SDL support in Angband 2021-11-01 11:34:25 +01:00
Ben Wiederhake 4e1318fb0e less: Fix condition to read more data
While mathematically equivalent, the presence of a size_t forces the
comparison to work with size_t's. This means that '-1 < 0' is false,
contrary to the 'mathematically pure' interpretation of the inequality.
2021-11-01 10:55:10 +01:00
Ben Wiederhake 5096f9cff5 hexdump: Avoid using read_all
I like using hexdump to 'have a look' at binary files, for example
/dev/random or /dev/hda. Obviously, this usecase requires that hexdump
tries not to buffer the 'entire' device.
2021-11-01 10:55:10 +01:00
Ben Wiederhake a5dda0b0c5 hexdump: Make non-ASCII output easier to read
Enclose the ASCII-interpretation in pipes, show non-ASCII bytes as a
dot, and fix the length of the last line.

Note that this makes it more similar to the behavior of many other
implementations.
2021-11-01 10:55:10 +01:00
Rodrigo Tobar 866c9cc1a5 echo: Obey -n when text is empty 2021-11-01 10:47:13 +01:00
Tim Schumacher 8e6de62d57 Ports: Fix typo in ffmpeg dependencies
This makes ffmpeg build again!
2021-11-01 10:45:15 +01:00
Brendan Coles aea2583cde Ports: gnucobol: Build with ncurses and without NLS 2021-11-01 10:44:57 +01:00
Arne Elster be9a7057ff HexEditor: Give magic constants names
There are a lot of numbers just floating around in the code.
Give them proper names.
2021-11-01 01:48:51 +01:00
Arne Elster 4aab6ff839 HexEditor: Use size_t where applicable
File positions as well as selection positions should be size_t,
as they are never negative and can become quite big.
2021-11-01 01:48:51 +01:00
Arne Elster 6b5456f132 HexEditor: Remove magic color constant for modified bytes
The magic constant does not work together well with themes.
As there does not seem to be a suitable palette color for this,
simply invert the color.
2021-11-01 01:48:51 +01:00
Arne Elster 41edc21a8e HexEditor: Show blinking caret at current position
For better visibility of wether the editing focus is on the hex or the
ascii view, render a blinking caret instead of a solid cell background.
For that to work, it's also necessary to change the way selection works.
The selection shouldn't extend to the current position but up to the
byte before it.
2021-11-01 01:48:51 +01:00
SeekingBlues b9da877941 Kernel: Do not try opening the same file when dumping perfcore
Dumping perfcore would always fail with EEXIST. This regressed in #10707
because of an incorrect indentation in the for loop.
2021-10-31 21:10:17 +01:00
Kenneth Myhra f848d65fd9 Ports/vim: Add symlink 'vi' pointing to target 'vim'
This adds a symlink named 'vi' which points to the target 'vim'. It's
useful in scenarios where a third-party application might rely on 'vi'.
2021-10-31 21:09:49 +01:00
Andreas Kling 248ff8e971 strace: Teach mmap() pretty-printer about more MAP_FOO flags 2021-10-31 21:07:29 +01:00
Andreas Kling 472401a51e Revert "wc: Count last line even if it doesn't end in newline"
This reverts commit f356c4ab91.

According to Dr. POSIX, `wc -l` should print the number of *newlines*
in the input.
2021-10-31 21:07:29 +01:00
Andreas Kling aff2b42f82 UserspaceEmulator: Fix inconsistent log formatting
Remove some extra { and } around the PID in log output that weren't used
consistently in all logging.
2021-10-31 21:07:29 +01:00
Andreas Kling d3eb513152 Base: Use outln() in the HackStudio basic C++ program template 2021-10-31 21:07:29 +01:00
Timothy Flynn 95e492de59 LibWeb: Convert throw_dom_exception_if_needed() to ThrowCompletionOr
This changes Web::Bindings::throw_dom_exception_if_needed() to return a
JS::ThrowCompletionOr instead of an Optional. This allows callers to
wrap the invocation with a TRY() macro instead of making a follow-up
call to should_return_empty(). Further, this removes all invocations to
vm.exception() in the generated bindings.
2021-10-31 18:51:07 +01:00
Ben Wiederhake e3b7c305bc Kernel: Don't crash on writes to ProcFS 2021-10-31 18:44:12 +01:00
Ben Wiederhake f20a42e871 Kernel: Write test that crashes ProcFS 2021-10-31 18:44:12 +01:00
Ben Wiederhake 03526a7f2b AK: Make BumpAllocator work in multi-threaded environments
Fixes #10578.
2021-10-31 18:43:03 +01:00
Sam Atkins 2c901ae2be Browser: Add "Color scheme" setting
This allows the user to override whether to use a dark or light theme in
supporting websites.
2021-10-31 18:39:13 +01:00
Sam Atkins 84414da546 LibWeb: Implement prefers-color-scheme media query feature
This allows supporting websites to use a light or dark theme to match
our desktop theme, without being limited to palette colors. This can be
overridden with the `WebContentServer::set_preferred_color_scheme()` IPC
call.
2021-10-31 18:39:13 +01:00
Sam Atkins 53edaa3b26 LibWeb+WebContent: Add set_preferred_color_scheme IPC call
This allows the owner of a WebView to override whether to use a dark
theme or not, instead of just using the system theme's IsDark property.
2021-10-31 18:39:13 +01:00
Sam Atkins c8550da9c5 LibWeb: Add Web::CSS::PreferredColorScheme enum 2021-10-31 18:39:13 +01:00
Sam Atkins 079d9e2e0b Base: Add 'IsDark' flag to all system themes 2021-10-31 18:39:13 +01:00
Sam Atkins 4f42e4ba90 LibGfx: Add 'IsDark' flag to SystemTheme and Palette
This explicitly states whether a given theme is a dark theme, so that
applications not using the system palette colors can still attempt to
match the overall theme.
2021-10-31 18:39:13 +01:00
Idan Horowitz 2eaed880b1 LibJS: Remove old Native Functions
Now that all the usages were updated to the new ThrowCompletionOr based
version we can remove the legacy version.
2021-10-31 18:20:37 +02:00
Idan Horowitz 9d1fb85f93 WebContent: Convert ConsoleGlobalObject functions to ThrowCompletionOr 2021-10-31 18:20:37 +02:00
Idan Horowitz 10b93506ad Tests: Convert test-wasm functions to ThrowCompletionOr 2021-10-31 18:20:37 +02:00
Idan Horowitz ae510db72c FuzzilliJS: Convert native functions to ThrowCompletionOr 2021-10-31 18:20:37 +02:00
Idan Horowitz bcf168f771 LibJS: Use ThrowCompletionOr accessors in CreateMappedArgumentsObject 2021-10-31 18:20:37 +02:00
Idan Horowitz aa61110bdd LibWeb: Convert WebAssemblyTablePrototype funcs to ThrowCompletionOr 2021-10-31 18:20:37 +02:00
Idan Horowitz f19512bf55 LibWeb: Convert WebAssemblyMemoryPrototype funcs to ThrowCompletionOr 2021-10-31 18:20:37 +02:00
Idan Horowitz c7c914800c LibWeb: Convert WebAssemblyInstancePrototype funcs to ThrowCompletionOr 2021-10-31 18:20:37 +02:00
Idan Horowitz a8d39bc070 LibWeb: Convert WebAssemblyObject functions to ThrowCompletionOr 2021-10-31 18:20:37 +02:00