Commit Graph

19017 Commits

Author SHA1 Message Date
Idan Horowitz
4c1d4baada Base: Update CsillaRegular10's glyph widths
This fixed-width font had some garbage per glyph width values, which
while previously was ok, they now had to be correctly set to indicate
glyph presence.
2021-04-18 22:10:25 +02:00
Idan Horowitz
397269d21e LibGfx: Report font glyph presence based on glyph's specific width
This uses the per glyph width to determine if the glyph is actually
present in the font, and not just inside the range the font can covers

This means that characters that are in the font's range but that are
missing a glyph will show up as the missing character glyph instead of
being invisible.
2021-04-18 22:10:25 +02:00
Idan Horowitz
18ae37439a FontEditor+LibGfx: Allow user to specify if a specific glyph is present
This replaces the glyph width spinbox in the font editor with a
checkbox when editing fixed width fonts that indicates if the
currently selected character's glyph is present in the edited font
(For variable width fonts a non zero width implies presence)

This commit also changes the background color of glyphs in the glyph
map based on the presence of each specific glyph in the font.
2021-04-18 22:10:25 +02:00
Idan Horowitz
08d1b16a8d LibGfx: Always load font widths array and use it for glyph presence
Since we were always saving the glyph widths array to the font file, we
now also always load it, even on (which also simplifies the logic a bit)
fixed width fonts. We also set it initially to 0 instead of the default
fixed width, which allows us to use it to check for glyph presence in
both fixed width and variable width fonts.
2021-04-18 22:10:25 +02:00
Idan Horowitz
3c894d1e6f LibGfx: Use size_t instead of int for glyph count
The count is always non-negative
2021-04-18 22:10:25 +02:00
Lenny Maiorani
c1971df4c7 AK/Hex: Cleanup implementation
Problem:
- Post-increment of loop index.
- `const` variables are not marked `const`.
- Incorrect type for loop index.

Solution:
- Pre-increment loop index.
- Mark all possible variables `const`.
- Corret type for loop index.
2021-04-18 22:09:25 +02:00
Lenny Maiorani
d462a56163 AK/Hex: Decode hex digit in constexpr context
Problem:
- Hex digit decoding is not `constexpr`, but can be.

Solution:
- Move the body of the function to the header and decorate with
  `constexpr`.
- Provide tests for run-time and compile-time evaluation.
2021-04-18 22:09:25 +02:00
Lenny Maiorani
0ac02b9084 AK/Complex: C++20-compatible comparison operators
Problem:
- Clang correctly reports non-`const` member function comparison
  operators as ambiguous.

Solution:
- Make them `const`.
2021-04-18 22:09:25 +02:00
Lenny Maiorani
97f4aa166a CMake: Remove redundancies and support clang ToT
Problem:
- There are redundant options being set for some directories.
- Clang ToT fails to compile the project.

Solution:
- Remove redundancies.
- Fix clang error list.
2021-04-18 22:09:25 +02:00
Idan Horowitz
aaf3d26dae Kernel: Add kernel command line flag to disable VirtIO support
This command line flag can be used to disable VirtIO support on
certain configurations (native windows) where interfacing with
virtio devices can cause qemu to freeze.
2021-04-18 22:06:42 +02:00
Marco Biscaro
7dc95721ee Tests: Fix test-math expected values
Some of the expected values in test-math were wrong, which caused some
tests to fail.

The updated values were generated by Python's math library, and rounded
to 6 decimals places:

>>> import math
>>> round(math.exp(20.99), 6)
1305693298.670892

Examples of failure outputs:

FAIL: ../Userland/Tests/LibM/test-math.cpp:98:
EXPECT_APPROXIMATE(exp(v.x), v.exp) failed with
lhs=1305693298.670892, rhs=1304956710.432034, (lhs-rhs)=736588.238857

FAIL: ../Userland/Tests/LibM/test-math.cpp:99:
EXPECT_APPROXIMATE(sinh(v.x), v.sinh) failed with
lhs=652846649.335446, rhs=652478355.216017, (lhs-rhs)=368294.119428

FAIL: ../Userland/Tests/LibM/test-math.cpp💯
EXPECT_APPROXIMATE(cosh(v.x), v.cosh) failed with
lhs=652846649.335446, rhs=652478355.216017, (lhs-rhs)=368294.119429
2021-04-18 21:41:17 +02:00
Andreas Kling
24dcd99e4b Kernel: Add magic key combo (Alt+Shift+F12) to dump scheduler state
Pressing this combo will dump a list of all threads and their state
to the debug console.

This might be useful to figure out why the system is not responding.
2021-04-18 20:00:10 +02:00
Emanuele Torre
685556ae84 Toolchain/BuildIt.sh: let's have colours on macOS too :^)
MacOS's sed doesn't support "\x1b" expansion unlike GNU sed, but we can
still use bash's $'\x1b' to expand it.
2021-04-18 19:00:49 +02:00
Gal Horowitz
8b78f2741d Base: Add hebrew character glyphs to the Katica Regular 10 font
The newly drawn glyphs cover the Hebrew letters (U+05D0 - U+05EA).
2021-04-18 18:57:35 +02:00
Idan Horowitz
60f82e0626 FontEditor: Update GlyphMap on font type change
Since font type changes also change the amount of glyphs in a font, the
glyph map has to be re-rendered to properly showcase the change.
2021-04-18 18:57:35 +02:00
Idan Horowitz
f461ee7d01 LibGfx: Add support for fonts that include the Hebrew Unicode Block 2021-04-18 18:57:35 +02:00
Linus Groh
8d490aba76 LibJS: Implement console.assert() 2021-04-18 18:28:17 +02:00
Linus Groh
e37421bddc Browser+WebContent: Fix HTML injection in console functions output 2021-04-18 18:28:17 +02:00
Linus Groh
a178255a8b LibJS: Use 'if constexpr' / dbgln_if() instead of '#if LEXER_DEBUG' 2021-04-18 18:14:50 +02:00
Linus Groh
87a43fa87c LibJS: Use 'if constexpr' instead of '#if HEAP_DEBUG' 2021-04-18 18:14:44 +02:00
Linus Groh
51676d7c33 LibJS: Use dbgln_if() instead of '#if OBJECT_DEBUG' 2021-04-18 18:10:42 +02:00
FalseHonesty
969c73660b Meta: Mark x86 debug register macros as false positives for CI 2021-04-18 17:02:40 +02:00
FalseHonesty
52e194c543 HackStudio: Add ability to set hardware watchpoints on variables
We can now add a watchpoint to a variable by right clicking on it
in the variable view, and selecting add watchpoint. To remove a
watchpoint, the exact same action is repeated, except it will now say
remove watchpoint.
2021-04-18 17:02:40 +02:00
FalseHonesty
e0be8a3f59 HackStudio: Don't crash when invalid file is requested to be opened
Previously, if the running debugger asked for HackStudio to open
an invalid file, it would crash trying to switch to it. Now it will
just continue without switching the editor.
2021-04-18 17:02:40 +02:00
FalseHonesty
7a1396f509 LibDebug: Implement ability to set watchpoints
Now we can set hardware watchpoints for our variables! :^)
These watchpoints will be automatically removed when
they go out of scope.
2021-04-18 17:02:40 +02:00
FalseHonesty
3123ffb19d Kernel: Add ptrace commands for reading/writing the debug registers
This adds PT_PEEKDEBUG and PT_POKEDEBUG to allow for reading/writing
the debug registers, and updates the Kernel's debug handler to read the
new information from the debug status register.
2021-04-18 17:02:40 +02:00
FalseHonesty
97a4c627cb Kernel: Add debug register handling
This patch adds functions to read/write from the debug registers,
and implements storing/loading them across context switches.
2021-04-18 17:02:40 +02:00
Luke
c84107a1ab Kernel: Add boot argument to disable the UHCI Controller
Helps with bare metal debugging, as we can't be sure our implementation
will work with a given machine.

As reported by someone on Discord, their machine hangs when we attempt
the dummy transfer.
2021-04-18 17:01:22 +02:00
Andreas Kling
e98091ad15 FileManager: Show action status tips in the status bar :^) 2021-04-18 16:44:00 +02:00
Andreas Kling
8cada904cc Meta: Add a note about spell checking to CONTRIBUTING.md
It's silly to waste review cycles on spelling, so let's ask that
everyone check their spelling before submitting code.
2021-04-18 16:37:30 +02:00
Andreas Kling
12546259ff Everywhere: Rename title_bar => titlebar 2021-04-18 16:35:18 +02:00
Gunnar Beutner
81daca5dd7 LibC: Implement assignment suppression for vsscanf
The vsscanf library function lets the user skip assigning
parsed values to the arguments, e.g. with %*c - even though
a character is scanned it is not assigned to one of the
arguments.

The figlet port uses this. With this patch the port is actually
usable.
2021-04-18 16:35:00 +02:00
Gunnar Beutner
f7c9cd06ac Ports: Build shared library for libtiff 2021-04-18 16:35:00 +02:00
Gunnar Beutner
97ecdd5215 Ports: Fix the tarball hash for nasm
For some reason the hash was incorrect. Also, changed the hash
type to SHA256. We should consider deprecating everything other than
SHA256 maybe.
2021-04-18 16:35:00 +02:00
Gunnar Beutner
4104846bd1 Ports: Fix dependency and linker options for SDL2_image 2021-04-18 16:35:00 +02:00
Hendiadyoin1
f682c9f100 LibC: Add netinet/in_systm.h 2021-04-18 15:52:07 +02:00
Gunnar Beutner
05d140e7bd Toolchain: Add missing buildstep calls 2021-04-18 15:51:56 +02:00
Gunnar Beutner
8a50c8431b Toolchain: Cache the output of uname -s 2021-04-18 15:51:56 +02:00
Gunnar Beutner
c60f02fbc2 Toolchain: Build fix for macOS
Unfortunately their sed behaves a tiny bit different to how
GNU sed does.
2021-04-18 15:51:56 +02:00
Gunnar Beutner
07adbf19c4 LibDebug: Implement support for AttributeDataForm::Data8
I came across this while analyzing a crash dump for openttd.
2021-04-18 15:51:13 +02:00
AnotherTest
ae49171755 LibCrypto: Avoid creating bools from anything except bools 2021-04-18 14:18:16 +02:00
AnotherTest
db8f0a2fa6 LibCore: Remove the no-longer-used Core::DateTime::is_before() function 2021-04-18 14:18:16 +02:00
AnotherTest
38f4441103 LibTLS: Parse X.509 certificates with the new ASN.1 parser
As a nice side effect, also correctly test for certificate validity :^)
2021-04-18 14:18:16 +02:00
AnotherTest
13abbc5ea8 LibCrypto: Implement UTCTime and GeneralizedTime parsers 2021-04-18 14:18:16 +02:00
AnotherTest
39997e2ab1 LibCore: Implement operator less-than for Core::DateTime
that just compares their timestamps.
2021-04-18 14:18:16 +02:00
AnotherTest
ed28008d78 LibCrypo: Add an ASN.1/DER pretty-printer
It's much easier to debug things when we can actually *see* them :P
2021-04-18 14:18:16 +02:00
AnotherTest
65de2d236d LibCrypto: Allow the user to override the DER read kind and class
This is useful for parsing non-universal types.
2021-04-18 14:18:16 +02:00
AnotherTest
581f9ff6bb LibCrypto: Add the GeneralizedTime ASN.1 type 2021-04-18 14:18:16 +02:00
Linus Groh
a48d365046 Meta: Replace /bin/env with /usr/bin/envin serenity.sh shebang
This is more portable.
2021-04-18 14:01:52 +02:00
Sahan Fernando
45f97c1096 Kernel: Make VirtIOConsole block when VirtIOQueue is full 2021-04-18 13:04:55 +02:00