This adds a generator utility to read an entire file and parse it as a
JSON value. This is heavily used by the CLDR generators. The idea here
is to put the file reading details in the utility so that when we have a
good story for generically reading an entire stream in LibCore, we can
update the generators to use that by only touching this helper.
This also moves the open_file helper to the utility file. It's currently
a lambda redefined in each TZDB/Unicode generator. It used to display
the missing command line flag and other info local to each generator.
After switching to LibMain, it just returns a generic error message, and
is duplicated several times.
The WindowServer _really_ does not need to know the filesystem path to
it's wallpaper, and allows setting arbitrary wallpapers (those outside
of `/res/wallpapers`).
The GUI::Desktop will keep track of the path to the wallpaper (if any),
and save it to config if desired (to be persisted).
This avoids the need to `unveil` paths to the wallpaper, fixing #11158
When requesting a parameter hint message with `Ctrl + p` in a file that
doesn't have a language server, we would crash.
Now, rather than verifying that we have a language server, we return
early if we don't have one.
This method is commonly used by bitmap text rendering. Adding support
for color blending enables support in the browser for text opacity using
their color property.
Previously, when passing 0 as a count number to the ping utility it
would ping the specified host indefinitely. This is obviously not the
intended behavior, so forcing the count to be in the range of 1 <= value
<= UINT32_MAX resolves the issue.
Previously, the count and total_pings comparison was evaluated after a
ping was sent for that iteration. This would cause one extra ping to be
sent greater than the specific count passed.
This makes it consistent with `ImageViewer`, where `F` was unavailable
for use as a shortcut. A small change, but it's nice having the same
keyboard shortcuts where we can :^)
The logic in place for this no longer worked since we abstracted away
the logic for zooming / panning (which changed how scale is stored).
This commit fixes the behaviour so when the first image is opened, the
window resizes to fit it.
We often want to zoom and fit the content of the widget into the
visible frame (or some rect within the frame), and it makes sense to
move this functionality into the AbstractZoomPanWidget to minimize
the amount of coordinate math derived classes need to do.
This commit moves the code that implements this functionality from
`PixelPaint::ImageEditor` into `AbstractZoomPanWidget` so that we
can also use it for other applications (such as ImageViewer!)
du <filename> will not print anything until `-a` option was provided.
Fix the behaviour by taking into account the `-a` option only when a
directory is given as the input.
Previously the nc implementation during listening mode would only accept
a single client and close the listening file description immediately.
Additionally, it did not have support for read/write handling of the
accepted client.
This patch extends the functionality of nc's listening capability by
allowing multiple client connections over TCP. Clients/server are able
to pass data back and forth between the connection.
Being able to listen on sockets and accept connections is helpful for
debugging the networking stack.
This allows us to set a timeout during connection and during receive and
send operations. I didn't add this to the other connect calls as it's
not used anywhere else for the time being.
Previously, we would only resolve libraries from `/usr/lib`, which is
not the only path from which the crashed process could've loaded the
libraries from.
Calculating tiled and miximized window frame have a lot in common. In
fact, we can look at maximized window state as a special case of the
tile type. It simplifies the code since there is a lot of cases when
we take an action only if the window is maximized or tiled.
The SB16 card driver doesn't swallow more than 4096 bytes of data at
once, so instead of asserting just return ENOSPC for now.
To test this, either play normal sound or just this (very!) loud noise:
dd if=/dev/random of=/dev/audio/0 bs=4096
For now, just use the first audio channel in the /dev/audio directory.
In the future we can add support for watching and loading other channels
so we can route audio to multiple sound cards on the system.
We have 3 new components:
1. The AudioManagement singleton. This class like in other subsystems,
is responsible to find hardware audio controllers and keep a reference
to them.
2. AudioController class - this class is the parent class for hardware
controllers like the Sound Blaster 16 or Intel 82801AA (AC97). For now,
this class has simple interface for getting and controlling sample rate
of audio channels, as well a write interface for specific audio channel
but not reading from it. One AudioController object might have multiple
AudioChannel "child" objects to hold with reference counting.
3. AudioChannel class - this is based on the CharacterDevice class, and
represents hardware PCM audio channel. It facilitates an ioctl interface
which should be consistent across all supported hardware currently.
It has a weak reference to a parent AudioController, and when trying to
write to a channel, it redirects the data to the parent AudioController.
Each audio channel device should be added into a new directory under the
/dev filesystem called "audio".
Since we're in an IRQ each of these evaluate_block_conditions() calls
enqueues a new deferred call, so to save on some space in the deferred
call queue let's just do it once.
It's really annoying to write `console.log(JSON.stringify(something))`
in scripts, and the output is less than easily readable.
This exposes the existing `print(Value)` function into the JS world, and
allows us to write `print(something)` and get a neat representation in
the console.