Commit graph

12796 commits

Author SHA1 Message Date
Andreas Kling 37df36dbed LibGUI: Implement move_cursor() in ColumnsView 2020-09-01 16:26:32 +02:00
Andreas Kling 386c7201d8 LibC: Move the static String in getlogin() out of the function
For some reason, this stops it from adding __cxa_guard_acquire/release
calls around its initialization. This unbreaks building ports.
2020-09-01 16:17:17 +02:00
Andreas Kling 27e86c03da LibGUI: Implement the virtual IconView::scroll_into_view()
This is virtual in AbstractView so let's not shadow it with an IconView
specific variant.
2020-09-01 16:17:17 +02:00
Andreas Kling 72443bd1ab LibGUI: Teach IconView to use AbstractView::move_cursor()
This makes it possible to manipulate the cursor programmatically via
the AbstractView interface.
2020-09-01 16:17:17 +02:00
Erlend Fagerheim 22265f1445 LibC: add getopt.h to unistd.h 2020-09-01 15:45:35 +02:00
busybox 5fce518049
Meta: Fixed small typo in readme (#3373) 2020-09-01 13:49:16 +02:00
Andreas Kling e002cbb06b Build: Add some -Wno-unknown-warning-option flags to CXXFLAGS
Patch from Anonymous.
2020-09-01 12:00:53 +02:00
AnotherTest 084a5c6a90 LibLine: Reset suggestion state on any non-tab key
This fixes the following (and more!):
```sh
$ /bin/dis<tab><tab><backspace><backspace><backspace><backspace><tab>
$ /bink_benchmark
```
2020-08-31 23:06:07 +02:00
AnotherTest 7e72285049 Userland: Allow unquoted 'filename' values in 'pro' 2020-08-31 23:05:58 +02:00
AnotherTest 441807f96d AK: Add is_any_of(StringView) to GenericLexer 2020-08-31 23:05:58 +02:00
AnotherTest 861ce62e14 Userland: Improve 'ContentDispositionParser' in 'pro'
This patch just applies a suggestion, making the code more readable.
2020-08-31 23:05:58 +02:00
Luke 124c52b3b5 LibWeb: Implement document ready state 2020-08-31 23:05:51 +02:00
Luke 8aabec1c94 LibWeb: Expose window.self and window.frames
"self" is a way to refer to the global object that will work in both
a window context and a web worker context.

"frames" apparently used to return a list of frame objects according
to MDN, but it now just returns the window object.
2020-08-31 23:05:10 +02:00
asynts 1c8312fa50 LibCompress: Fix a bug when wrapping around the buffer. 2020-08-31 23:04:55 +02:00
asynts 0ebf56efb0 LibCompress: Add support for dynamic deflate blocks. 2020-08-31 23:04:55 +02:00
asynts d5c5507a0e LibCompress: Deflate: Don't assert that the codes are valid. 2020-08-31 23:04:55 +02:00
asynts c4799576ea LibCompess: Add missing state update in DeflateDecompressor::read. 2020-08-31 23:04:55 +02:00
asynts ef7bec6a3b LibCompress: CanonicalCode: Don't leave unused code uninitialized. 2020-08-31 23:04:55 +02:00
Luke 8a2fd0e436 Kernel: Fix Processor::features_string() stopping too early and detect more features
The exit condition for the loop was sizeof(m_features) * 8,
which was 32. Presumably this was supposed to mean 32 bits, but it
actually made it stop as soon as it reached the 6th bit.

Also add detection for more SIMD CPU features.
2020-08-31 18:57:54 +02:00
Peter Nelson 259f8541fc LibGfx: implement GIF RestorePrevious frame disposal mode 2020-08-31 18:54:44 +02:00
Peter Nelson c3ee5e3451 LibGfx: clear previous GIF frame to transparent instead of whole image 2020-08-31 18:54:44 +02:00
Peter Nelson f63592f871 LibGfx: add GIF test suite
Adds a GIF test suite HTML page that contains a selection of test
GIF images and reference PNGs for each frame

Adds a link to the GIF test suite on welcome.html
2020-08-31 18:54:44 +02:00
Luke 8be708454c Kernel: Add more detailed debug output for E1000 {in,out}{8,16,32}
Also adds FIXME for VirtualBox.
2020-08-31 18:54:04 +02:00
Andreas Kling a8d52a68f6 LibWeb: Take care of a FIXME in the "in table text" insertion mode 2020-08-31 18:51:34 +02:00
thankyouverycool 60872a7c5a DevTools+Apps: Set correct icons for ThemeEditor and VisualBuilder
VB appears deprecated in favor of HackStudio, but until it's
officially gone-no app left behind!
2020-08-31 09:14:18 +02:00
AnotherTest 9adbbff4dd LibC: Partially implement 'freopen' 2020-08-31 09:14:11 +02:00
AnotherTest cb7526fca0 Userland: Make 'pro' capable of guessing a filename
The whole thing with `pro url > filename` was getting annoying, so let's
just have it support Content-Disposition and guessing from the URL.
2020-08-31 09:14:11 +02:00
thankyouverycool 199c1da31c LibGUI: Hide ResizeCorner in StatusBar when window is maximized
Fully expands status bars when maximized and prevents maximized
windows from being erroneously resized.
2020-08-31 09:08:26 +02:00
thankyouverycool 72deaa3423 WindowServer: Return correct IsMaximized response 2020-08-31 09:08:26 +02:00
Nico Weber 4b5cfce6b1 UserspaceEmulator: Emulate two FPU instructions! 2020-08-30 19:48:59 +02:00
Tibor Nagy 463ffbf83e Base: Remove obsolete .gitignore files
Leftovers from the time when the system used raw icons instead of PNGs.
2020-08-30 17:37:45 +02:00
Nico Weber d1990281e1 ntpquery: Add routines for converting timeval<->ntp timestamps
Use them to set the transmit timestamp on the outgoing packet and
to print the returned timestamps as ISO 8601 strings.
2020-08-30 17:37:20 +02:00
Nico Weber 73db67e806 Userland: Add an extremely simple NTP client
This only queries a single NTP server, only does a point-to-point
request, doens't do any filtering, doesn't display the response
in any useful format, and is generally very bare-bones.

But maybe, over time it can learn to query more servers, do
filtering, run as a service that keeps state over time to
improve filtering, adjust system time, and maybe learn to
run as an NTP server then.
2020-08-30 17:37:20 +02:00
Nico Weber f2135d7d00 AK: Make %llx work in printf 2020-08-30 17:37:20 +02:00
Sergey Bugaev 3d936d51fd Userland: Fix passing a non-format string to fprintf() 2020-08-30 17:35:27 +02:00
Sergey Bugaev f808810d00 LibC: Deprecate strcpy(), strncpy(), strcat() and strncat() :^)
And also mark strlcpy() and strlcat() with __attribute__((warn_unused_result)).

Since our code is warning-free, this ensures we never misuse those functions.
(Or are very sure about doing it when turning off the warning for a particular
piece of code.)
2020-08-30 17:35:27 +02:00
Sergey Bugaev 0106647ab8 Tests: Assert the path fits 2020-08-30 17:35:27 +02:00
Sergey Bugaev 1cdd798ac7 LibC: Replace some strncpy() calls with memcpy()
In case we know exactly how many bytes we're copying (and not copying a string
while limiting its length to that of a buffer), memcpy() is a more appropriate
function to call.

Also, fix null-terminating the %c pointer.
2020-08-30 17:35:27 +02:00
Sergey Bugaev 34353e18cf LibC: Misc fixes and improvements in netdb 2020-08-30 17:35:27 +02:00
Sergey Bugaev 0817ef563e LibC: strcpy a socket address at compile time
This way, we'd get compile-time errors if the address was too long for the buffer.
2020-08-30 17:35:27 +02:00
Sergey Bugaev 852454746e Everywhere: Port to String::copy_characters_to_buffer() 2020-08-30 17:35:27 +02:00
Sergey Bugaev be6cce5530 AK: Add String::copy_characters_to_buffer()
This is a strcpy()-like method with actually sane semantics:

* It accepts a non-empty buffer along with its size in bytes.
* It copies as much of the string as fits into the buffer.
* It always null-terminates the result.
* It returns, as a non-discardable boolean, whether the whole string has been
copied.

Intended usage looks like this:

bool fits = string.copy_characters_to_buffer(buffer, sizeof(buffer));

and then either

if (!fits) {
    fprintf(stderr, "The name does not fit!!11");
    return nullptr;
}

or, if you're sure the buffer is large enough,

// I'm totally sure it fits because [reasons go here].
ASSERT(fits);

or if you're feeling extremely adventurous,

(void)fits;

but don't do that, please.
2020-08-30 17:35:27 +02:00
Sergey Bugaev 17109a3a31 LibC: Use AK::String-backed buffers instead of static buffers
Also, refactor the hell out of pwd.cpp & grp.cpp
2020-08-30 17:35:27 +02:00
Luke 5fd88e51c5 HackStudio: Highlight register changes, minor disassembly view fix
Also adds shortcuts for step in (F11), step out (Shift-F11) and
step over (F10).
2020-08-30 17:31:33 +02:00
Linus Groh 16da91b7e7 LibWeb: Remove redundant .prettierrc
Now that LibJS's .prettierrc has been moved to the repository root (as
we start having .js files in /res), we don't need to keep a second,
identical copy for the LibWeb tests.
2020-08-30 17:31:08 +02:00
Tom 80560d1be3 AK: Fix FixedArray zero bytes allocations 2020-08-30 17:30:48 +02:00
Tom f5bc7dbfda AK: Fix ByteBuffer zero bytes allocations 2020-08-30 17:30:48 +02:00
Nico Weber 9ad5a261f7 LibCore: Let DateTime::create()/set_time() take summer time into account
DateTime::create() takes a date/time in local time, but it set
tm_isdst to 0, which meant it was in local winter time always.
Set tm_isdst to -1 so that times during summer time are treated
in summer time, and times in winter time are treated as winter
time (when appropriate). When the time is adjusted backward by
one hour, the same time can be in winter time or summer time,
so this isn't 100% reliable, but for most of the year it should
work fine.

Since LibJS uses DateTime, this means that the Date tuple
ctor (which creates a timestamp from year/month/day/hours/etc
in local time) and getTime() should now have consistent (and
correct) output, which should fix #3327.

In Serenity itself, dst handling (and timezones) are unimplemented
and this doens't have any effect yet, but in Lagom this has an effect.
2020-08-30 16:56:47 +02:00
Andreas Kling 57dd3b66c5 Kernel+LibC+UE: Implement sleep() via sys$clock_nanosleep()
This doesn't need to be its own syscall either. :^)
2020-08-30 13:21:24 +02:00
Andreas Kling cc5403f77b Kernel: Remove unused variable PhysicalRegion::m_last 2020-08-30 13:13:55 +02:00