Commit Graph

33216 Commits

Author SHA1 Message Date
thankyouverycool
ff42ad88ee FontEditor: Remove .gitignore artifact from old build system 2022-01-16 21:36:39 +01:00
creator1creeper1
326c6130a5 Kernel: Don't access directory table of uninitialized PageDirectory
PageDirectory gets initialized step-by-step in
PageDirectory::try_create_for_userspace(). This initialization may fail
anywhere in this function - for example, we may not be able to
allocate a directory table, in which case
PageDirectory::try_create_for_userspace() will return a null pointer.
We recognize this condition and early-return ENOMEM. However, at this
point, we need to correctly destruct the only partially initialized
PageDirectory. Previously, PageDirectory::~PageDirectory() would assume
that the object it was destructing was always fully initialized. It now
uses the new helper PageDirectory::is_cr3_initialized() to correctly
recognize when the directory table was not yet initialized. This helper
checks if the pointer to the directory table is null. Only if it is not
null does the destructor try to fetch the directory table using
PageDirectory::cr3().
2022-01-16 12:08:57 -08:00
electrikmilk
3a6d4d14e1 Base: Add some symbols to Katica
Adds 20A0—20CF, 20D0—20FF, and 2150—218F to Katica.
2022-01-16 12:04:41 -08:00
Idan Horowitz
2297d0b4bf LibJS: Rewrite the Encode AO to handle unpaired UTF-16 surrogates 2022-01-16 19:31:59 +01:00
Idan Horowitz
be9cbd428e LibJS: Check validity of encoded unicode code points in the Decode AO
As required by the specification:
7. If Octets does not contain a valid UTF-8 encoding of a Unicode code
point, throw a URIError exception.
2022-01-16 19:31:59 +01:00
Ali Mohammad Pur
afabfc1964 Ports: Correct the config.sub path for freetype
This regressed in cdd6d68, setting the correct path makes it build
again.
2022-01-16 19:57:37 +03:30
Marcus Nilsson
8b39ec7c18 SystemMonitor: Don't display empty CPU graphs when number of CPUs < 4
When we have less than 4 CPUs we don't need to display a whole row of
CPU graphs.
2022-01-16 15:04:40 +01:00
davidot
a5b11f7484 LibJS: Fix that '_' no longer accessed the last value in the REPL
This is now also not a concept that VM knows about and handled
completely by the REPL.
2022-01-16 14:57:12 +01:00
Linus Groh
30af8121ce LibJS: Fix value of Generator.prototype.constructor
The spec says:

    27.5.1.1 Generator.prototype.constructor
    https://tc39.es/ecma262/#sec-generator.prototype.constructor

    The initial value of Generator.prototype.constructor is
    %GeneratorFunction.prototype%.

But we had it set to %GeneratorFunction% (the GeneratorFunction
constructor).
2022-01-16 14:50:22 +01:00
Linus Groh
4ed49e05a9 LibJS: Rename GeneratorObjectPrototype to GeneratorPrototype
Given we usually call objects Foo{Object,Constructor,Prototype} or
Foo{,Constructor,Prototype}, this name was an odd choice.
The new one matches the spec better, which calls it the "Generator
Prototype Object", so we simply omit the Object suffix as usual as it's
implied.
2022-01-16 14:50:22 +01:00
Kenneth Myhra
b76c66a9ed groupadd: Port to LibMain and use the new Core::Group abstraction :^) 2022-01-16 11:19:07 +01:00
Kenneth Myhra
a99b50ce8c LibCore: Add Core::Group abstraction for group management :^)
This adds the Core::Group C++ abstraction to ease interaction with the
group entry database, as well as represent the Group entry.

Core::Group abstraction currently contains the following functionality:
- Add a group entry - 'Core::Group::add_group()'
2022-01-16 11:19:07 +01:00
Michel Hermier
adfdb63e02 LibC: Fix scandir not checking for allocation failure 2022-01-16 11:18:04 +01:00
Michel Hermier
1af072e0f3 LibC: Make *alloc return NULL in case of failure (POSIX) 2022-01-16 11:18:04 +01:00
Michel Hermier
3bf89f1859 LibC: Document some posix *alloc urls 2022-01-16 11:18:04 +01:00
Michel Hermier
cb3cc6ec27 AK: Remove kfree definition 2022-01-16 11:18:04 +01:00
Michel Hermier
9039f8fb0f AK: Remove kcalloc definition 2022-01-16 11:18:04 +01:00
Jan de Visser
6e9f06fc9f LibSQL: Introduce SELECT ... LIMIT xxx OFFSET yyy
What it says on the tin.
2022-01-16 11:17:15 +01:00
Jan de Visser
7fc901d1b3 LibSQL+SQLServer: Implement first cut of SELECT ... ORDER BY foo
Ordering is done by replacing the straight Vector holding the query
result in the SQLResult object with a dedicated Vector subclass that
inserts result rows according to their sort key using a binary search.
This is done in the ResultSet class.

There are limitations:
- "SELECT ... ORDER BY 1" (or 2 or 3 etc) is supposed to sort by the
n-th result column. This doesn't work yet
- "SELECT ... column-expression alias ... ORDER BY alias" is supposed to
sort by the column with the given alias. This doesn't work yet

What does work however is something like
```SELECT foo FROM bar SORT BY quux```
i.e. sorted by a column not in the result set. Once functions are
supported it should be possible to sort by random functions.
2022-01-16 11:17:15 +01:00
Sam Atkins
53cd87cc1d CharacterMap+Base: Give Character Map an icon 2022-01-16 11:17:03 +01:00
Sam Atkins
83a9661c04 CharacterMap+Base: Add man page for Character Map :^) 2022-01-16 11:17:03 +01:00
Sam Atkins
2a7c638cd9 CharacterMap: Add a find-by-name window
This works the same way as the command-line usage, searching against the
display name as provided by LibUnicode.

I've modified the search loop to cover every possible unicode
code-point, since my previous logic was flawed. Code-points are not
dense, there are gaps, so simply iterating up to the count of them will
skip ones with higher values. Surprisingly, iterating all 1,114,112 of
them still runs in a third of a second. Computers are fast!
2022-01-16 11:17:03 +01:00
Sam Atkins
2bf7abcb28 CharacterMap: Add previous, next, and go-to glyph buttons
These work the same as in FontEditor, where I shamelessly stole them
from. :^)
2022-01-16 11:17:03 +01:00
Sam Atkins
e975db23c0 LibGUI+FontEditor: Move seek-prev/next-glyph logic into GlyphMapWidget 2022-01-16 11:17:03 +01:00
Sam Atkins
9ca8428238 CharacterMap: Add output box for copying arbitrary character sequences
This adds a TextBox along the bottom of the window. Double-clicking on a
character will append it to this box, which you can edit as any other
TextBox, or click the copy button to copy the output to the clipboard.
2022-01-16 11:17:03 +01:00
Sam Atkins
ff500ffcc4 LibGUI: Add on_glyph_double_clicked() callback to GlyphMapWidget
This will be used by CharacterMap.

In implementing this, extracted the logic for finding which glyph is at
a given position within the widget.
2022-01-16 11:17:03 +01:00
Sam Atkins
2327ea8970 CharacterMap: Add new Character Map application :^) 2022-01-16 11:17:03 +01:00
Sam Atkins
1d79e8cb0f LibGUI: Preserve glyph selection when changing font 2022-01-16 11:17:03 +01:00
Sam Atkins
70a79ea70c LibGUI: Remove unused method definitions from GlyphMapWidget
These got added recently but were never implemented, so let's remove
them. :^)
2022-01-16 11:17:03 +01:00
Sam Atkins
15a7dfbc30 LibGUI: Recalculate GlyphMapWidget content size when changing font
Previously, if it was displaying N glyphs per line, then you changed
font to one that was a drastically different size, it would continue to
display N glyphs per line until you resized the window. Now, we
immediately recalculate how many to show, so that they fill the
available width. :^)
2022-01-16 11:17:03 +01:00
Sam Atkins
21a24c36a8 LibGUI: Make GlyphMapWidget work with vector fonts
This basically just meant replacing the `m_font` field with the one
inherited from Widget.
2022-01-16 11:17:03 +01:00
Sam Atkins
8175cd0a28 LibGUI+FontEditor: Move GlyphMapWidget to LibGUI
This will allow us to use this in other apps, such as the upcoming
Character Map. :^)
2022-01-16 11:17:03 +01:00
Sam Atkins
dd17df76e9 LibGUI: Make button icons settable in GML
`Widget::load_from_gml()` doesn't yet return `ErrorOr`, so we log a
warning message if loading the icon fails.
2022-01-16 11:17:03 +01:00
kleines Filmröllchen
49011e2030 Documentation: Explain the array-like types and their differences
It's not at all obvious how we need three different array-like types.
This change to the Patterns documentation attempts to explain why they
exist, how they differ (mostly in allocation behavior) and what their
use cases are. This builds on #11844 which fixates and tests the
hereby-described allocation behavior of FixedArray.
2022-01-16 11:14:26 +01:00
Matt Jacobson
47e8d58553 AK: Fix logic in String::operator>(const String&)
Null strings should not compare greater than non-null strings.

Add tests for >, <, >=, and <= comparison involving null strings.
2022-01-16 11:08:23 +01:00
Timothy Flynn
c74f75b910 LibJS: Implement Date.prototype.setUTCDate 2022-01-16 11:07:02 +01:00
Timothy Flynn
0d73da0328 LibJS: Implement Date.prototype.setUTCFullYear 2022-01-16 11:07:02 +01:00
Timothy Flynn
51bc973ecc LibJS: Implement Date.prototype.setUTCHours 2022-01-16 11:07:02 +01:00
Timothy Flynn
6998c0a796 LibJS: Implement Date.prototype.setUTCMilliseconds 2022-01-16 11:07:02 +01:00
Timothy Flynn
2f202e8ef4 LibJS: Implement Date.prototype.setUTCMinutes 2022-01-16 11:07:02 +01:00
Timothy Flynn
f2ffe3bf90 LibJS: Implement Date.prototype.setUTCMonth 2022-01-16 11:07:02 +01:00
Timothy Flynn
c71877b0a6 LibJS: Implement Date.prototype.setUTCSeconds 2022-01-16 11:07:02 +01:00
Timothy Flynn
efda1724e8 LibJS: Protect [TimeValue]FromTime from non-finite times
Includes HourFromTime, MinFromTime, SecFromTime, msFromTime.
2022-01-16 11:07:02 +01:00
Timothy Flynn
4848f587cd LibJS: Protect DayWithinYear against non-finite times 2022-01-16 11:07:02 +01:00
Timothy Flynn
9be0a0fd28 LibJS: Protect YearFromTime against non-finite times 2022-01-16 11:07:02 +01:00
Timothy Flynn
8ad043fe5e LibJS: Ensure final computation in DayFromYear is performed on a double
When we multiple by 365, ensure the result is a double (not an i32) to
prevent overflow.
2022-01-16 11:07:02 +01:00
Ali Mohammad Pur
8d30e14d28 Meta: Ensure that all port patches are documented in the linter
This adds a list of ports without descriptions to filter out the
existing ports with unexplained ports, this list should *not* be
appended to!

It also adds a (for now) disabled check that ensures all ports have
patches made with (or compatible with) git.
2022-01-16 10:32:50 +03:30
Linus Groh
fc02370dc7 Ports: Regenerate patches for python3 2022-01-16 10:32:50 +03:30
Ali Mohammad Pur
bbd4343b31 Ports: Regenerate patches for bash 2022-01-16 10:32:50 +03:30
Ali Mohammad Pur
ae94825cf6 Ports: Regenerate patches for pcre 2022-01-16 10:32:50 +03:30