Commit graph

19143 commits

Author SHA1 Message Date
Gunnar Beutner e0363a612d Ports: Fix ports when building with ccache
When building with ccache these ports failed to build because
CC contains more than one word.

The ncurses port also doesn't like how ccache preprocesses
files. This patch fixes that.
2021-04-19 18:27:09 +02:00
Gunnar Beutner 253c1aa644 Ports: Fix SDLPoP
This port was still using the upstream's master branch as opposed to
a fixed git commit.

Also, now that SDL2 is installed into /usr/local the build failed.

I have also removed an obsolete patch because we're now linking
against shared libraries for SDL2 and those already have appropriate
library dependencies.
2021-04-19 18:27:09 +02:00
Leon Albrecht 6f5e92a279
AK/Tests: Install test fixtures required for TestJSON 2021-04-19 18:16:46 +02:00
Itamar e5f84b53d8 HackStudio: Sort ClassView entries 2021-04-19 18:13:30 +02:00
Gunnar Beutner 8388e822cb Ports: Add xz port 2021-04-19 17:55:35 +02:00
Gunnar Beutner bd08f9188a Pthread: Add stubs for pthread_cleanup_{push,pop}
The stubs are necessary to make the xz port properly detect pthread
support. The two functions are only used in the configure script and
nowhere else.
2021-04-19 17:55:35 +02:00
Maciej Zygmanowski 136f6fb7c8 WindowServer: Use VERIFY instead of assert in scale factor check 2021-04-19 17:30:07 +02:00
Ali Mohammad Pur efb14e95c4 Shell: Don't whine about tcsetpgrp() failing
We intentionally skimp out on checking isatty() before them to cut down
on syscalls, so we should also accept the errors and just let them be.
Closes #6471.
2021-04-19 16:28:33 +02:00
Ali Mohammad Pur 74f0fdab98 LibLine: Avoid trying to restore() if the editor isn't initialized
Fixes #6472.
2021-04-19 16:28:33 +02:00
Ali Mohammad Pur e1e84fe0fe LibLine: Redraw the suggestions when terminal size changes 2021-04-19 16:28:33 +02:00
Adam Hodgen 3cfab83e7e Base: Add HTML test page for cursor & table
This page is useful for testing the CSS 'cursor' property, as well as
HTML tables
2021-04-19 12:26:05 +02:00
Adam Hodgen b9c6059984 LibWeb: Correctly calculate height of TableRowGroupBox
As well as correctly calculating the height of TableRowBox, this change
calculates the heights of TableRowGroupBoxs also.

As before, this does not correctly take into consideration the 'height'
attribute.

Now the horizontal layout is approximately correct for the
TableRowGroupBoxs we can now see that the `layout_row` method will need
updating to correctly calculate cell width across all rows, not just the
current TableRowGroupBox.
2021-04-19 12:26:05 +02:00
Adam Hodgen ae02acb8e1 LibWeb: Properly handle thead and tfooter HTML tags
As the spec for the table fixup algorythm says:

> Treat table-row-groups in this spec also encompass the specialized
> table-header-groups and table-footer-groups.
2021-04-19 12:26:05 +02:00
Gunnar Beutner c32b58873a LibELF: Fix calculation for TLS relocations
The calculation for TLS relocations was incorrect which would
result in overlapping TLS variables when more than one shared
object used TLS variables.

This bug can be reproduced with a shared library and a program
like this:

    $ cat tlstest.c
    #include <string.h>
    __thread char tls_val[1024];
    void set_val() { memset(tls_val, 0, sizeof(tls_val)); }

    $ gcc -g -shared -o usr/lib/libtlstest.so tlstest.c

    $ cat test.c
    void set_val();
    int main() { set_val(); }
    $ gcc -g -o tls test.c -ltlstest

Due to the way the TLS relocations are done this program would
clobber libc's TLS variables (e.g. errno).
2021-04-19 12:14:43 +02:00
Gunnar Beutner 0cca23def5 LibELF: Improve error message for missing symbols 2021-04-19 12:00:40 +02:00
Gunnar Beutner 1dab5ca5fd LibELF: Fix support for relocating weak symbols
Having unresolved weak symbols is allowed and we should initialize
them to zero.
2021-04-19 12:00:40 +02:00
Gunnar Beutner 97d7450571 LibELF: Remove VERIFY() calls and let control flow return to the caller
This way we get better error messages for unresolved symbols because
the caller logs the file and symbol names.
2021-04-19 12:00:40 +02:00
Ali Mohammad Pur 55914841b7 Shell/Tests: Replace 'type f -f' with 'type -f f'
The order of arguments seemed be confusing ArgsParser.
Fixes #6467.
2021-04-19 10:07:58 +02:00
Ali Mohammad Pur 061aaa33e8 Userland/test: Handle '!' being used as a string
e.g. `test ! = !`.
Fixes #6465.
2021-04-19 10:07:58 +02:00
xackus 6e2f2cd8b1 Toolchain: Don't produce debug symbols
Previously debug symbols were produced and then stripped.
2021-04-19 09:49:14 +02:00
Brendan Coles 3c4dc5cb11 Meta: Remove references to Userland/Libraries/LibELF/exec_elf.h 2021-04-19 09:19:31 +02:00
Lenny Maiorani df916c9738 CMake: Quiet warnings about literal suffix
Problem:
- Newer versions of clang (ToT) have a similar `-Wliteral-suffix`
  warning as GCC. A previous commit enabled it for all compilers. This
  needs to be silenced for the entire build, but it currently only is
  silenced for some directories.

Solution:
- Move the `-Wno-literal-suffix` option up in the CMakeLists.txt so
  that it gets applied everywhere.
2021-04-19 00:38:31 +02:00
DexesTTP 4f9ab0b982 Userland: Add telws, a CLI REPL to connect to WebSockets 2021-04-18 22:42:10 +02:00
DexesTTP d3a89ce737 LibWebSocket: Add a new websocket library
This library currently contains a basic WebSocket client that can
handle both standard TCP websockets and TLS websockets.
2021-04-18 22:42:10 +02:00
DexesTTP b30f5dc8b5 LibCore: Add ArgsParser::add_option(String&)
The API existed for add_positional_argument, but not for named arguments.
2021-04-18 22:42:10 +02:00
DexesTTP 8e44a0bd46 AK: Add default ports for Websockets to the URL class 2021-04-18 22:42:10 +02:00
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