man invokes the pager command via `sh` which, since
beaae6b420 launches `Shell` in posix mode.
As the referenced commits message indicates, launching `Shell` in posix
mode while interactive, makes it choke on the default `.shellrc`. This
made `man` spew out some shell syntax errors to stderr every time it
invoked the pager.
To fix that, invoke `sh` with `--skip-shellrc` for now as suggested by
the aforementioned commit.
This class had slightly confusing semantics and the added weirdness
doesn't seem worth it just so we can say "." instead of "->" when
iterating over a vector of NNRPs.
This patch replaces NonnullRefPtrVector<T> with Vector<NNRP<T>>.
Each time we wrapped a line, we were appending an extra blank span which
wasn't needed. This was leading to an extra blank line after every
single line.
This also removes DirIterator::error_string(), since the same strerror()
string will be included when you print the Error itself. Except in `ls`
which is still using fprintf() for now.
...instead of from a file.
For now, `--name=sRGB` is the only valid value, but more will
probably follow in the future.
Just `icc --name=sRGB` prints the built-in sRGB profile.
`icc --name=sRGB --reencode-to=file.icc` writes it to file.icc.
This is not guaranteed to always work correctly as ArgsParser deals in
StringViews and might have a non-properly-null-terminated string as a
value. As a bonus, using StringView (and DeprecatedString where
necessary) leads to nicer looking code too :^)
This commit moves the implementation of getopt into AK, and converts its
API to understand and use StringView instead of char*.
Everything else is caught in the crossfire of making
Option::accept_value() take a StringView instead of a char const*.
With this, we must now pass a Span<StringView> to ArgsParser::parse(),
applications using LibMain are unaffected, but anything not using that
or taking its own argc/argv has to construct a Vector<StringView> for
this method.
The name "initial containing block" was wrong for this, as it doesn't
correspond to the HTML element, and that's specifically what it's
supposed to do! :^)
Imported functions in Wasm may throw JS exceptions, and we need to
preserve these exceptions so we can pass them to the calling JS code.
This also adds a `assert_wasm_result()` API to Result for cases where
only Wasm traps or values are expected (e.g. internal uses) to avoid
making LibWasm (pointlessly) handle JS exceptions that will never show
up in reality.
This naming scheme matches Vector.
This also changes `take_last` to move the value it takes, and delete by
known pointer, avoiding a full lookup and potential copies.
Instead of just calling JS::Value::to_string_without_side_effects() when
printing values to the console, have all the console clients use
the same JS::Print that the REPL does to print values.
This method leaves some things to be desired as far as OOM hardening
goes, however. We should be able to create a String in a way that
doesn't OOM on failure so hard.
I didn't use it in out_curve(), out_parametric_curve() since it
wouldn't be necessary if I printed the indent with a loop instead
of String::repeated() there.
Using the walk_device_tree helper, we can walk the device tree from the
beginning looking for a specific property node. It's still missing the
ability to get property lists, string lists, and property-specific data.
Previously, we only saved the REPL history when the interpreter was
shutdown with a signal. This change ensures that we save the history
when a user uses `exit()`.
The patch also contains modifications on several classes, functions or
files that are related to the `JPGLoader`.
Renaming include:
- JPGLoader{.h, .cpp}
- JPGImageDecoderPlugin
- JPGLoadingContext
- JPG_DEBUG
- decode_jpg
- FuzzJPGLoader.cpp
- Few string literals or texts
This adds three flags to icc:
* --reencode-to=<file> re-serializes a profile to a given file,
using Gfx::ICC::encode(). This is mainly useful for testing that
code.
* --dump-to=<file> dumps the raw ICC profile bytes read from the
input to disk. This is useful for extracting ICC profiles from
images, and for comparing the raw profile bytes to the profile
bytes written by --reencode-to=.
If either of these flags is passed, icc by default no longer dumps
the icc data to stdout. To force priting of the data even if either
of these flags is present, this also adds:
* --print, which forces printing ICC contents, even if either or
both of the icc-data writing flags are present.
This includes an Error::create overload to create an Error from a UTF-8
StringView. If creating a String from that view fails, the factory will
return an OOM InternalError instead. VM::throw_completion can also make
use of this overload via its perfect forwarding.
It's not needed in such case, and in the near-future when we would want
to use this utility in an initramfs environment where there's no service
such as LookupServer being running, it's still useful to have the option
to invoke this utility with the mentioned limited output functionality.
It's not needed in such case, and in the near-future when we would want
to use this utility in an initramfs environment where there's no service
such as LookupServer being running, it's still useful to have the option
to invoke this utility with the mentioned limited output functionality.