Andreas Kling
4d904340b4
Kernel: Don't interrupt blocked syscalls to dispatch ignored signals.
...
This was just causing syscalls to return EINTR for no reason.
2019-07-08 18:59:48 +02:00
Andreas Kling
cda5a6eca3
Kernel: Add LogStream operator<< for Process.
...
It simply prints "process-name(pid)", nothing fancy, but kinda useful.
2019-07-08 18:58:19 +02:00
Andreas Kling
fc127eb769
LibHTML: Create anonymous blocks around inline children of blocks.
2019-07-08 17:42:23 +02:00
Andreas Kling
2caec95d30
StringBuilder: Reset the internal builder length after building.
...
This puts the StringBuilder back into a pristine state, allowing you
to use it to build more strings after you've built one.
2019-07-08 15:57:25 +02:00
Andreas Kling
0e75aba7c3
StringView: Rename characters() to characters_without_null_termination().
...
This should make you think twice before trying to use the const char* from
a StringView as if it's a null-terminated string.
2019-07-08 15:38:44 +02:00
Andreas Kling
567551bc12
AK: Add some missing includes in SinglyLinkedList.
2019-07-08 14:06:22 +02:00
Andreas Kling
5b19911025
AK: Add JsonValue::to_bool().
2019-07-08 14:06:03 +02:00
Andreas Kling
56563cb305
CDirIterator: Fix another instance of StringView::characters() misuse.
2019-07-08 14:03:19 +02:00
Andreas Kling
c79b048198
MappedFile: Fix misuse of StringView::characters().
...
This makes me wonder if the open() syscall should take characters+length
and we'd compute the length at the LibC layer instead. That way we could
also provide an optional non-POSIX open() that takes the length directly..
2019-07-08 13:59:10 +02:00
Andreas Kling
a8aadf73e9
AK: Add JsonObject::set(key, &&value) overload.
...
This dodges a whole bunch of value copying in JsonParser.
2019-07-08 13:08:21 +02:00
Andreas Kling
7bb1e465c6
AK: Make it easy to convert between JsonValue and IPv4Address.
...
They still use string storage, but this change makes it nice and easy to
work with IPv4 addresses in JSON data.
2019-07-08 13:03:55 +02:00
Andreas Kling
d8f1a7e046
AK: Add LogStream operator<< for IPv4Address.
2019-07-08 11:43:42 +02:00
Andreas Kling
b6dcb5e7ae
LibC: Use IPv4Address::from_string() in gethostbyname().
2019-07-08 11:40:12 +02:00
Andreas Kling
dddcedfd11
AK: Add IPv4Address::from_string(StringView).
...
This attempts to parse an IPv4Address from a string, and gives us an excuse
to try out the new Optional<T> for the return value. :^)
2019-07-08 11:38:58 +02:00
Andreas Kling
7b2a4c02e7
AK: Add a simple Optional<T> template.
...
This can be used to store any type, with a flag that says if any value
is present or not.
2019-07-08 11:29:38 +02:00
Andreas Kling
a0ee2bad72
String: String::to_int() should fail for any empty string, not just null.
2019-07-08 10:51:45 +02:00
Andreas Kling
f9089da2bc
LogStream: Uninline some public functions so the linker can find them.
2019-07-08 09:22:22 +02:00
Andreas Kling
34709a2c24
IDEDiskDevice: Fix build after merging slave device changes.
2019-07-08 08:20:12 +02:00
Andreas Kling
3c71dc4320
LibHTML: Oops, fix build.
...
It's another "hacking on the train and forgetting to try a full build"
episode, this time starring LibHTML.
2019-07-08 08:18:53 +02:00
Jesse
ab90d2e251
Kernel: Extended IDE interface to allow slave device usage ( #283 )
...
The IDE Disk Controller driver has been extended to allow the secondary device on the channel to be initialised and used. A test as to whether this is working (for anyone interested) is to modify `init.cpp:87` to `auto dev_hd0 = IDEDiskDevice::create(IdeDiskDevice::DeviceType::SLAVE);`. The kernel will fail to boot, as there is no disk attached to CHANNEL 1's slave. This was born out of the fact that my FAT driver can't be tested as easily without creating a partition on `hda`.
2019-07-08 08:16:52 +02:00
Andreas Kling
8812b35c5e
LibHTML: Reorganize layout tree build so that parents add their children.
...
This will allow us to insert anonymous blocks with ease.
2019-07-08 07:33:58 +02:00
Andreas Kling
0ccad4208f
LibHTML: Move layout tree building to a separate function.
2019-07-08 07:24:15 +02:00
Andreas Kling
9526b0e13a
LibHTML: Add InheritStyleValue and InitialStyleValue.
...
These correspond to the 'inherit' and 'initial' CSS values respectively.
2019-07-08 07:15:56 +02:00
Andreas Kling
105a97685e
LibHTML: Fix host build after Libraries/ shuffle.
2019-07-08 07:14:18 +02:00
Andreas Kling
752d297321
IRCClient: Fix build. Forgot to update a function signature.
2019-07-07 22:27:48 +02:00
Andreas Kling
ea9340aeca
IRCClient: Implement the "part from channel" action.
...
Also make sure the action is disabled while we're not in a window that
corresponds to an open channel. :^)
Fixes #277 .
2019-07-07 21:58:57 +02:00
Andreas Kling
d47432487d
GStackWidget: Add a notification hook for when the active widget changes.
2019-07-07 21:50:38 +02:00
Andreas Kling
8b0953a795
Libraries: Unbreak "make install" with new directory locations.
2019-07-04 16:41:42 +02:00
Andreas Kling
04b9dc2d30
Libraries: Create top level directory for libraries.
...
Things were getting a little crowded in the project root, so this patch
moves the Lib*/ directories into Libraries/.
2019-07-04 16:16:50 +02:00
Andreas Kling
63814ffebf
LibHTML: Move CSS value parsing to CSSParser.
2019-07-04 15:49:16 +02:00
Andreas Kling
55a5c46253
AK: Add Vector::insert_before_matching(T&&, callback);
...
This allows you to do things like:
vector.insert_before_matching(value, [](auto& entry) {
return value < entry;
});
Basically it scans until it finds an element that matches the condition
callback and then inserts the new value before the matching element.
2019-07-04 14:20:48 +02:00
Andreas Kling
57da8792fd
Vector: Simplify functions that take both T&& and const T&.
...
We can implement foo(const T&) by invoking foo(T&&) with a temporary T.
2019-07-04 13:54:37 +02:00
Andreas Kling
1791ebaacd
WindowServer: Convert dbgprintf() in WSWindowManager to dbg().
...
Here goes the first trial run for the new LogStream mechanism.
I like it so far. :^)
2019-07-04 07:07:40 +02:00
Andreas Kling
1b013ba699
AK: Move some of LogStream out of line & add overloads for smart pointers.
2019-07-04 07:05:58 +02:00
Andreas Kling
07d11a9b6b
SharedGraphics: Add LogStream operator<<'s for Rect, Point and Size.
2019-07-04 06:45:50 +02:00
Andreas Kling
05cc59921a
AK: Start fleshing out LogStream, a type-aware logging mechanism.
...
The first implementation class is DebugLogStream, which can be used like so:
dbg() << "Hello friends, I am " << m_years << " years old!";
Note that it will automatically print a newline when the object created by
dbg() goes out of scope.
This API will grow and evolve, so let's see what we end up with :^)
2019-07-04 06:43:30 +02:00
Andreas Kling
27f699ef0c
AK: Rename the common integer typedefs to make it obvious what they are.
...
These types can be picked up by including <AK/Types.h>:
* u8, u16, u32, u64 (unsigned)
* i8, i16, i32, i64 (signed)
2019-07-03 21:20:13 +02:00
Dan MacDonald
c4c4bbc5ba
Build: Use sudo -E to preserve EVs when calling build-image-qemu.sh from makeall.sh
2019-07-03 18:12:16 +02:00
Dan MacDonald
0d19a4eaab
Build: Fix incorrect user and group settings for disk image ( #280 )
...
Build: Fix incorrect user and group settings for disk image.
Fixes #261 .
2019-07-03 16:57:37 +02:00
Andreas Kling
b79112e6d6
AK: Add String::number() for creating a String from a number.
...
Instead of manually doing String::format("%d"/"%u") everywhere, let's have
a String API for this. It's just a wrapper around format() for now, but it
could be made more efficient in the future.
2019-07-03 14:56:27 +02:00
Andreas Kling
8ac2b30de7
LibHTML: Add LengthStyleValue and create those when parsing number values.
2019-07-03 07:55:22 +02:00
Andreas Kling
4b82ac3c8e
LibHTML: Rename LayoutStyle => ComputedStyle.
2019-07-03 07:25:04 +02:00
Andreas Kling
c7cf6f00fc
LibHTML: Let the layout tree own the style tree.
...
Each layout node is now constructed with an owning back-pointer to the style
tree node that originated it.
2019-07-03 07:19:29 +02:00
Christopher Dumas
e9ab282cfd
Launcher: Reformat config a little bit ( #279 )
2019-07-03 05:53:44 +02:00
Andreas Kling
d2ec64ace0
Launcher: The "Launcher" config file group shouldn't take up visual space.
...
Also tweak Launcher.ini since CConfigFile bools are 1/0 rather than
true/false. We should probably use true/false. Or switch over to JSON.
2019-07-02 21:49:00 +02:00
Christopher Dumas
8a2123e385
Launcher: Vertical/Horizontal option
2019-07-02 13:29:14 +02:00
Dan MacDonald
0b1ff2d0eb
Userland: Don't return an error when jp is run without arguments
2019-07-02 10:32:49 +02:00
Dan MacDonald
362ac8f1ba
Ports: Force curl to follow redirects in run_fetch_web() ( #266 )
...
This fixes downloading files from github when building ports.
2019-07-01 20:57:46 +02:00
Andreas Kling
54d7670fc3
Kernel+Userland: Convert /proc/df to JSON.
2019-07-01 18:54:02 +02:00
Andreas Kling
aaedc24f15
Kernel+ProcessManager: Convert /proc/memstat to JSON.
2019-07-01 18:43:01 +02:00