1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-08 15:07:35 +00:00
Commit graph

1176 commits

Author SHA1 Message Date
ForLoveOfCats
a4f9630470 js: Print ArrayBuffer.maxByteLength when present 2022-03-02 20:53:18 +01:00
TheOddGarlic
6cda142c28 groupdel: Port to LibMain 2022-02-28 14:05:04 +01:00
TheOddGarlic
6499699d6d useradd: Port to LibMain 2022-02-28 14:05:04 +01:00
Michał Lach
665505db42 Utilities: Port pathchk to LibMain 2022-02-27 17:08:27 +01:00
kleines Filmröllchen
084347becc Utilities+Meta: Check icons in markdown-check
We use the environment variable SERENITY_SOURCE_DIR to resolve and check
icon links. This is a bit inconvenient as SERENITY_SOURCE_DIR needs to
be set correctly before invoking the markdown checker, but as we use it
through the check-markdown script anyways, I think it's not a problem.
2022-02-26 20:05:06 +02:00
kleines Filmröllchen
4ef1bedc38 Utilities: Check help:// manpage links in markdown-check 2022-02-26 20:05:06 +02:00
kleines Filmröllchen
7399520e9a Utilities: Perform most markdown-check link checking with URLs
This should be much more robust against weirdly-formatted links that are
still valid URLs, additionally, future URL checkers can immediately
take advantage of the already-existing URL object.

Note that not all markdown links are valid URLs or paths, and that that
is intentional (e.g. only fragments, relative links etc.). We don't just
fail when something is not a URL.
2022-02-26 20:05:06 +02:00
kleines Filmröllchen
9902e71f99 Utilities: Allow link checking in markdown-check to fail during visit
With a special flag, we can now invalidate the links early on.
2022-02-26 20:05:06 +02:00
kleines Filmröllchen
112642a262 Utilities: Partially revert 9ec2b37
This removed checks for missing manpages, which we now need again as the
manpages are checked again.
2022-02-26 20:05:06 +02:00
Itamar
935d023967 Userland: Rename WindowServerConnection=>ConnectionToWindowServer
This was done with CLion's automatic rename feature.
2022-02-25 22:35:12 +01:00
Itamar
3a71748e5d Userland: Rename IPC ClientConnection => ConnectionFromClient
This was done with CLion's automatic rename feature and with:
find . -name ClientConnection.h
    | rename 's/ClientConnection\.h/ConnectionFromClient.h/'

find . -name ClientConnection.cpp
    | rename 's/ClientConnection\.cpp/ConnectionFromClient.cpp/'
2022-02-25 22:35:12 +01:00
Anton Kling
1ad7aa7136 ls: Add option -1 which lists one file per line 2022-02-19 18:18:13 -08:00
Zack Penn
a65e1fa828 killall: Port to LibMain and LibCore 2022-02-19 19:44:29 +01:00
Zack Penn
681b643093 paste: Port to LibMain and LibCore 2022-02-19 19:44:29 +01:00
Idan Horowitz
e2d797dd60 gml-format: Exit with non-0 exit code when the file formatting changes
This let's CI detect when the changes include incorrect GML formatting.
We now also print a message to make it obvious why CI failed.
2022-02-19 02:15:44 +02:00
dayarthvader
5a94402b60 Utilities/nc: Add support to -I/--length option like SO_RCVBUF 2022-02-18 10:43:10 +01:00
Tim Schumacher
b689e8b7f4 tar: Automatically recognize gzip archives 2022-02-18 10:41:44 +01:00
xSlendiX
19b7a5fe0d man: Center "SerenityOS manual" title
This patch calculates how many spaces are needed to center the top
title of "SerenityOS manual".
2022-02-17 19:54:47 +01:00
brapru
4cbce0e34c ping: Fix broken count argument error
By storing count as an Optional<size_t>, we can leverage count's empty
state to proceed with pinging indefinitely, and ensure a proper value is
passed when count does have a value.

This returns pings expected behavior to send infinite packets when a
count is not specified, stop after sending a specified count, and
disallow any count < 1.

Closes #12524
2022-02-17 09:08:40 -05:00
Sam Atkins
cd0ffe5460 LibCore+Everywhere: Return ErrorOr from ConfigFile::sync()
Currently this method always succeeds, but that won't be true once we
switch to the Core::Stream API. :^)

Some of these places would ideally show an error message to the user,
since failure to save a file is significant, but let's not get
distracted right now.
2022-02-16 19:49:41 -05:00
Sam Atkins
8260135d4d LibCore+Everywhere: Return ErrorOr from ConfigFile factory methods
I've attempted to handle the errors gracefully where it was clear how to
do so, and simple, but a lot of this was just adding
`release_value_but_fixme_should_propagate_errors()` in places.
2022-02-16 19:49:41 -05:00
Tim Schumacher
bc67264453 Utilities: Add a basic install utility 2022-02-16 19:51:52 +01:00
serenitydev
083b58fd89 Utilities: Add the 'files' argument to the unzip utility 2022-02-16 10:57:14 +03:30
James Puleo
f7f14d52e0 pape: Improve error handling during option handling and bitmap loading
Improper options now return with an error, and bitmap loading is now
`TRY` instead of `MUST`
2022-02-14 16:38:42 +03:30
James Puleo
a0e7a4b9a8 WindowServer+Userland: Pass wallpapers as Gfx::Bitmap instead of path
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
2022-02-14 16:38:42 +03:30
brapru
75a3be852d ping: Count argument must be greater than zero
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.
2022-02-14 12:48:43 +01:00
brapru
ef3605604e ping: Fix off by one error in count argument
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.
2022-02-14 12:48:43 +01:00
Pankaj Raghav
12daecf72d Utilities: Fix du to print stats for regular files
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.
2022-02-14 11:47:52 +01:00
brapru
b04528c0de nc: Extend TCP listening port functionality
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.
2022-02-14 11:47:14 +01:00
sin-ack
11a2e31306 nc: Convert to Core::Stream::UDPSocket 2022-02-14 11:44:09 +01:00
Jakub Berkop
6218ec8afa profile: Document "read" profiling event 2022-02-14 11:38:13 +01:00
Jakub Berkop
fae991f599 profile: Command recognizes "read" event type 2022-02-14 11:38:13 +01:00
Ali Mohammad Pur
3b04693d7e js: Add a print() function to the environment
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.
2022-02-14 11:30:50 +01:00
Ali Mohammad Pur
75aa900b83 LibJS: Make ASTNode::generate_bytecode() fallible
Instead of crashing on the spot, return a descriptive error that will
eventually continue its days as a javascript "InternalError" exception.
This should make random crashes with BC less likely.
2022-02-13 14:41:33 +00:00
rvictorr
434925bbd8 profile: Port to LibMain 2022-02-13 12:40:36 +01:00
Idan Horowitz
9839a1699f gml-format: Skip writing formatted GML to file if no changes were made
This stops all GML files from appeared under the "Changes not staged
for commit" section of the commit message comment due to the changed
last-modified timestamp of the file.
2022-02-13 02:36:35 +02:00
Idan Horowitz
4c451422c3 gml-format+Playground: Print GML parsing error on formatting failure 2022-02-13 02:36:35 +02:00
itskarudo
16aeb8b51d kill: Parse CLI arguments using Arguments.strings
The previous implementation used argv and LibC to parse arguments,
it now uses the Arguments.strings interface to do so.
2022-02-12 10:53:07 -05:00
itskarudo
500098c76d kill: Port to LibMain 2022-02-12 10:53:07 -05:00
Itamar
2903c47ba0 Utilities: Add update-cpp-test-results utility
This is a small utility that updates the target tests results for the
LibCpp parser and preprocessor regression tests.

It's handy to run after changing something in the output of either the
parser or the preprocessor.
2022-02-12 11:45:15 +00:00
Ali Mohammad Pur
ae68d1f865 strace: Add a chdir formatter 2022-02-12 12:16:59 +01:00
Daniel Bertalan
10c629055f Utilities/readelf: Add printing for RELR relocations 2022-02-11 18:07:53 +01:00
Riccardo Arena
a9b387a1bf pgrep: Port to LibMain
Use unveil to allow access only to required paths. 
Switch to new pledge format.
2022-02-10 14:10:58 +00:00
Riccardo Arena
5c63537ae9 pidof: Port to LibMain
Use pledge/unveil to allow access only to required paths and syscalls.
2022-02-10 14:10:58 +00:00
Timothy Flynn
19d4f52a9e js: Add a command line argument to evaluate a string as a script
For example:

    $ js -c "console.log(42)"
    42
2022-02-10 10:26:12 +00:00
Ryan Chandler
65de0d2910 Utilities: Port realpath to LibMain 2022-02-10 10:25:36 +00:00
Ali Mohammad Pur
3bfcd7b52d LibJS: Implement Sets using Maps
This implements ordered sets using Maps with a sentinel value, and
includes some extra set tests.
Fixes #11004.

Co-Authored-By: davidot <davidot@serenityos.org>
2022-02-09 20:57:41 +00:00
Ali Mohammad Pur
4a73ec07c5 LibJS: Make Map iterators independent of the underlying hashmap
This implements ordered maps as a pair of an RBTree for key order, and
an underlying unordered hash map for storage.
Fixes (part of) #11004.
2022-02-09 20:57:41 +00:00
davidot
9264f9d24e LibJS+Everywhere: Remove VM::exception() and most related functions
This commit removes all exception related code:
Remove VM::exception(), VM::throw_exception() etc. Any leftover
throw_exception calls are moved to throw_completion.
The one method left is clear_exception() which is now a no-op. Most of
these calls are just to clear whatever exception might have been thrown
when handling a Completion. So to have a cleaner commit this will be
removed in a next commit.

It also removes the actual Exception and TemporaryClearException classes
since these are no longer used.

In any spot where the exception was actually used an attempt was made to
preserve that behavior. However since it is no longer tracked by the VM
we cannot access exceptions which were thrown in previous calls.
There are two such cases which might have different behavior:
- In Web::DOM::Document::interpreter() the on_call_stack_emptied hook
  used to print any uncaught exception but this is now no longer
  possible as the VM does not store uncaught exceptions.
- In js the code used to be interruptable by throwing an exception on
  the VM. This is no longer possible but was already somewhat fragile
  before as you could happen to throw an exception just before a VERIFY.
2022-02-08 09:12:42 +00:00
kleines Filmröllchen
4931c88b13 LibGUI: Remove GML prefix in favor of proper namespace
Prefixes are very much a C thing which we don't need in C++. This commit
moves all GML-related classes in LibGUI into the GUI::GML namespace, a
change somewhat overdue.
2022-02-07 18:39:50 +01:00