Commit graph

12915 commits

Author SHA1 Message Date
asynts a7cbc7fcb2 AK: Remove empty destructor from JsonParser. 2020-09-08 14:01:21 +02:00
asynts 70dd97c46e AK: Remove FixedArray class. 2020-09-08 14:01:21 +02:00
asynts ec1080b18a Refactor: Replace usages of FixedArray with Vector. 2020-09-08 14:01:21 +02:00
asynts 9c83d6ff46 Refactor: Replace usages of FixedArray with Array. 2020-09-08 14:01:21 +02:00
asynts 76e37e8c96 AK: Add Array<T, Size> template. 2020-09-08 14:01:21 +02:00
asynts 1b3ecb01a5 AK: Add generic SimpleIterator class to replace VectorIterator. 2020-09-08 14:01:21 +02:00
Simon Danner 9648bf4ada LibWeb: SVG: implement SmoothQuadraticBezierCurve
For this we need to track the control point of the previous command and
calculate a new control point based on it.
2020-09-08 13:57:18 +02:00
Simon Danner 772fcba814 LibWeb: SVG: draw commands can also be repeated after a comma
Consume comma or whitespace to make it possible to also parse commands
that use comma separation.
2020-09-08 13:57:18 +02:00
Simon Danner 6e61532e06 LibWeb: SVG: T commands only take two coordinates
The shortcut for Bezier curves only takes two coordinates.
2020-09-08 13:57:18 +02:00
Simon Danner 05be6481b7 LibWeb: make it possible to directly load .svg files
Make LibWeb load svg files by guessing the svg mime type from the file
extension and parsing it with the HTML parser.
2020-09-08 13:57:18 +02:00
AnotherTest 699e1fdc07 LibJS: Eliminate some (unnecessary) Vector copies 2020-09-08 13:43:03 +02:00
AnotherTest 8d9c5a8e70 LibJS: Make MarkedValueList inherit from Vector<Value>
This makes the nicer vector API available to MVL without extra wrapper
functions.
2020-09-08 13:43:03 +02:00
AnotherTest 9a00699983 LibJS: Format IndexedProperties.cpp 2020-09-08 13:43:03 +02:00
Tom 0c2d36d1cd WindowServer: Draw minimize animation inverted
Inverting the pixels makes the animation visible over most colors.
2020-09-08 10:45:35 +02:00
Tom 607c78336b LibGfx: Add ability to draw inverted rectangles 2020-09-08 10:45:35 +02:00
Andreas Kling c460f4a3cb IRCClient: Add the "/me" command to send CTCP ACTION emotes :^)
You can now express your feelings and actions with our IRC client by
using the /me command.
2020-09-07 20:49:35 +02:00
Tom 3a4a9d4c6b WindowServer: Fix invalidating window frame
When invalidating the frame we need to properly flag that so that
we trigger rendering the frame, even if "all" was flagged as being
invalidated. Otherwise it will only get rendered if anything else
happens to trigger it (such as focus change).

Fixes #3427
2020-09-07 19:39:48 +02:00
Jakob-Niklas See 86d230ab5f Documentation: Fixed minor typo in UsingQtCreator 2020-09-07 16:53:29 +02:00
Tom c3d231616c Kernel: Fix crash when delivering signal to barely created thread
We need to wait until a thread is fully set up and ready for running
before attempting to deliver a signal. Otherwise we may not have a
user stack yet.

Also, remove the Skip0SchedulerPasses and Skip1SchedulerPass thread
states that we don't really need anymore with software context switching.

Fixes the kernel crash reported in #3419
2020-09-07 16:49:19 +02:00
Noah Rosamilia f1a65d1d70 Ports: Install lua to /usr/local 2020-09-07 13:34:44 +02:00
Noah Rosamilia f35b19e72d Ports: Clean up lua port and enable dynamic library loading 2020-09-07 13:34:27 +02:00
AnotherTest da1b080935 LibLine: Make ^R search match the input anywhere in a given line
This is closer to what other line editors (and shells) do, and makes ^R
actually useful.
2020-09-07 11:42:56 +02:00
AnotherTest da56e208ef LibLine: Disable editing events while searching
This also makes the editor clean as many lines as the searching took,
for instance, in the case of <C-r><C-c>ls<tab>, two lines should be
cleaned, not just one.

Fixes #3413.
2020-09-07 11:42:56 +02:00
Nico Weber e8131f503d Kernel: Let TimeManagement keep epoch time as timespec
Previously, it was kept as just a time_t and the sub-second
offset was inferred from the monotonic clock. This means that
sub-second time adjustments were ignored.

Now that `ntpquery -s` can pass in a time with sub-second
precision, it makes sense to keep time at that granularity
in the kernel.

After this, `ntpquery -s` immediately followed by `ntpquery` shows
an offset of 0.02s (that is, on the order of network roundtrip time)
instead of up to 0.75s previously.
2020-09-07 11:22:48 +02:00
Nico Weber 4ac5cc2461 ntpquery: Compute and print delay and offset 2020-09-07 11:22:48 +02:00
AnotherTest 39d14c22d1 LibLine: Treat ^D as EOF only when the buffer is empty
As opposed to when the cursor is at the start of the buffer.
Fixes #3421.
2020-09-07 11:21:28 +02:00
Andreas Kling 18ff9c3fc2 Meta: Fix shellcheck whines in check-symbols.sh 2020-09-07 00:00:12 +02:00
Andreas Kling 638790c9a4 Travis: Fix wrong path to Meta/check-symbols.sh 2020-09-06 23:49:19 +02:00
AnotherTest 02f251bb4a LibGUI: Fix OOB read in Clipboard::set_data() 2020-09-06 22:22:17 +02:00
Muhammad Zahalqa 125ea6a214 AK: Vector use Traits<T>::equals in find
Use Traits<T>::equals for equality checking in search
functions instead of  operator==
2020-09-06 21:56:32 +02:00
Muhammad Zahalqa ad3e6ef344 AK: SinglyLinkedList use Traits<T>::equals in find
Use Traits<T>::equals for equality checking in search
functions instead of  operator==
2020-09-06 21:56:32 +02:00
Nico Weber f1a6884a51 ntpquery: Add a -s flag to make it adjust the time 2020-09-06 21:50:55 +02:00
Nico Weber 0fff4e11a6 LibC: Add settimeofday 2020-09-06 21:50:55 +02:00
Nico Weber 0736ae4116 ntpquery: Use time.google.com as default NTP server for now
Using a pool.ntp.org server seems nicer and more open-source-y,
but until our pool use is approved, let's put in a default value
that works.

(time.google.com serves smeared time instead of doing leap seconds.
pool.ntp.org doesn't serve smeared time. I intend to implement
client-side leap second smearing since nobody likes jumpy timestamps.
For now, we get this for free.)
2020-09-06 21:50:55 +02:00
Nico Weber 8016b2c546 ntpquery: Record destination timestamp as well 2020-09-06 21:50:55 +02:00
Itamar 1c20e684f3 Travis: Run script that checks for forbidden symbols in LibC
check-symbols.sh fails the build if undefined __cx_guard_* symbols are
found in  LibC.

This will help us catch port breakage sooner.
2020-09-06 21:36:36 +02:00
Itamar 542f665b27 LibC: Avoid generating calls to__cxa_guard_* functions in netdb.cpp
g++ seems to generate calls to __cxa_guard_* functions when we use
non-trivial initialization of local statics.
Requiring these symbols breaks some ports since these symbols are
defined in libcstdc++ which we do not link against when building ports.

This commit turns some local statics into global statics in netdb.cpp so
libc wouldn't need these symbols.
2020-09-06 21:36:36 +02:00
Itamar c5b0e0b96b LibC: Don't include things required for getopt_long in unistd.h
Previously, we were including the whole of <getopt.h> in <unistd.h>.
However according to the posix <unistd.h> doesn't have to contain
everything we had in <getopt.h>.

This fixes some symbol collisions that broke the git port.
2020-09-06 21:36:36 +02:00
Tom efac3d27d2 AK: Add Bitmap::count_in_range and Bitmap::fill_range 2020-09-06 21:20:08 +02:00
asynts cd2815ed87 AK: Add LogStream overload for ReadonlyBytes.
This is extremely useful for debugging.
2020-09-06 20:47:35 +02:00
Andreas Kling bc48181939 Userland: Add missing license headers to "w" and "utmpupdate" 2020-09-06 20:44:16 +02:00
Andreas Kling 4e2ccde85a Userland: Shorten "w" idle time format
Let's just say "123s" for now (instead of "123 sec")
2020-09-06 19:13:52 +02:00
Andreas Kling 6dc5cda50d Userland: Bring back improved "LOGIN@" column in "w"
This actually looks a lot nicer if we slim down the datetime format.
Also remove the "FROM" column which was the one I actually didn't want.
2020-09-06 19:13:00 +02:00
Andreas Kling c995166c56 utmpupdate: Store the login time in /var/run/utmp as a Unix timestamp
This is obviously nicer and makes it easy for other programs to do what
they want with the timestamp.
2020-09-06 19:08:09 +02:00
Andreas Kling d531b4fa61 Userland: Show the current foreground process name in "w" output
Add a "WHAT" column that shows which command is currently executing in
each active session. Very neat :^)
2020-09-06 19:05:08 +02:00
Andreas Kling 6d8c4af9c2 LibCore+top: Use pid_t for pgid/pgrp/sid numbers 2020-09-06 19:04:47 +02:00
Andreas Kling 5a934c37cf Userland: Remove "LOGIN@" column from "w" since it's not really useful
Maybe we can bring this back once we have remote logins, or at least
make it optional then. At the moment, it's not very interesting.
2020-09-06 18:59:56 +02:00
Andreas Kling abce7e7ca2 Userland: Show idle times in "w" output
The idle time is based on the mtime of the session's TTY :^)
2020-09-06 18:58:58 +02:00
Andreas Kling 4527d9852a Kernel: Track time-of-last-write in SlavePTY and report it as mtime 2020-09-06 18:48:24 +02:00
Andreas Kling ae9c5bf216 Userland: Tweak "w" output just slightly 2020-09-06 18:48:00 +02:00