Andreas Kling
301a269ca0
Get rid of SERENITY macro since the compiler already defines __serenity__
...
This makes it a bit easier to use AK templates out-of-tree.
2019-04-20 12:58:49 +02:00
Andreas Kling
87c4d2bc92
Userland: Add a /bin/basename program.
2019-04-15 13:57:09 +02:00
Nicolas Van Bossuyt
37c27e2e39
Userspace: gitignore binaries
2019-04-15 00:35:37 +02:00
Andreas Kling
adc91d92a3
Userland: Oops, that merge broke the build, just needed a few tweaks. :^)
2019-04-14 20:32:44 +02:00
Nicolas Van Bossuyt
40e710da3d
Userland: Maybe find is overkill
2019-04-14 20:15:29 +02:00
Nicolas Van Bossuyt
dfeeaff237
Userland: making the makefile smarter
2019-04-14 19:58:25 +02:00
VAN BOSSUYT Nicolas
12f2d1f2e8
Uptime: making the ouput prettier
...
Just like the -p option on linux
2019-04-14 19:10:24 +02:00
Andreas Kling
c0fe48635b
Kernel: Add /proc/uptime file (number of seconds since boot.)
...
Also added a simple /bin/uptime to pretty-print this information. :^)
2019-04-14 15:19:45 +02:00
Andreas Kling
5e0577a042
Introduce LibCore and move GElapsedTimer => CElapsedTimer.
...
I need a layer somewhere between AK (usable both by userspace and kernel)
and LibGUI (usable by userspace except WindowServer.) So here's LibCore.
2019-04-10 16:14:44 +02:00
Andreas Kling
4ab0cd5d4c
LibGUI: Move frame painting from GFrame to StylePainter.
...
This way it can be used by others who might not have a GFrame object.
2019-04-10 03:43:46 +02:00
Andreas Kling
313ac51832
LibGUI: Turn GTextBox into a wrapper around a single-line GTextEditor.
2019-04-10 03:08:29 +02:00
Andreas Kling
37ae00a4dd
Kernel+Userland: Add the rename() syscall along with a basic /bin/mv.
2019-04-07 23:35:26 +02:00
Andreas Kling
5d72cf5a3f
LibGUI: Improve GFrame's look for Container shapes.
...
This is now starting to look like a proper container. Very nice :^)
2019-03-28 20:15:13 +01:00
Andreas Kling
f939fb7eb7
Userland: Add a simple GFrame testing window to guitest2.
2019-03-28 18:52:03 +01:00
Andreas Kling
9fa21fa585
LibGUI: Add a GPainter class that inherits from Painter.
...
This gets rid of the last little piece of LibGUI knowledge in Painter.
2019-03-28 17:19:56 +01:00
Andreas Kling
0058da734e
Kernel: Add Inode::truncate(size).
...
- Use this to implement the O_TRUNC open flag.
- Fix creat() to pass O_CREAT | O_TRUNC | O_WRONLY.
- Make sure we truncate wherever appropriate.
2019-03-27 16:42:30 +01:00
Andreas Kling
23bb276fcd
LibC: Run constructors on process startup.
...
Cooperate with the compiler to generate and execute the _init_array list
of constructor functions on userspace program statup. This took two days
to get working, my goodness. :^)
2019-03-27 12:48:21 +01:00
Andreas Kling
aef6030a80
LibC: Time-related POSIX compliance fixes.
2019-03-27 01:31:53 +01:00
Andreas Kling
7e54fdce99
QuickShow: Fill the window with white if the opened image has alpha.
2019-03-24 03:07:00 +01:00
Andreas Kling
d563dc0565
LibGUI: Add a setting to make GLabel stretch its icon.
...
Use this in QuickShow to allow arbitrarily scaling the opened image.
2019-03-22 04:20:48 +01:00
Andreas Kling
c3b0c1ba68
LibGUI: Add a GProgressBar widget.
2019-03-22 02:49:45 +01:00
Andreas Kling
e4dfd5a3a4
WindowServer: Support PNG wallpapers.
...
Fix up /bin/pape so it tells the WindowServer which wallpaper file to use.
2019-03-21 15:54:19 +01:00
Andreas Kling
0114c61cf1
Userland: Turn off double buffering in QuickShow.
...
Since this program is primarily used to display potentially huge but still
static images, let's not put extra strain on the system by double buffering.
2019-03-21 13:31:47 +01:00
Andreas Kling
65348e7dc1
PNGLoader: Support for color type 2 (RGB triplets) and multiple IDAT chunks.
2019-03-21 05:25:54 +01:00
Andreas Kling
42755e98cf
SharedGraphics: Implement a simple PNG decoder.
...
This is extremely unoptimized, but it does successfully load "folder32.png"
so it must be at least somewhat correct. :^)
2019-03-21 03:57:42 +01:00
Andreas Kling
4ea625e08b
Userland: Allow ping <hostname> :^)
2019-03-20 03:38:09 +01:00
Andreas Kling
0e4a1936ca
LibC: Implement gethostbyname() by talking to the DNSLookupServer.
...
We now talk to the lookup server over a local socket and it does the lookup
on our behalf. Including some retry logic, which is nice, because it seems
like DNS requests disappear in the ether pretty damn often where I am.
2019-03-20 01:15:22 +01:00
Andreas Kling
57ff293a51
LibGUI: Implement nested event loops to support dialog boxes.
...
This patch adds a simple GMessageBox that can run in a nested event loop.
Here's how you use it:
GMessageBox box("Message text here", "Message window title");
int result = box.exec();
The next step is to make the WindowServer respect the modality flag of
these windows and prevent interaction with other windows in the same
process until the modal window has been closed.
2019-03-19 00:01:02 +01:00
Andreas Kling
4629272135
Userland: Turn the tc test util into a simple dumb HTTP client.
2019-03-14 15:19:20 +01:00
Andreas Kling
3d5296a901
IPv4: Last burst of TCP hacking for today.
...
Connecting to a test server and exchanging data back and forth works.
2019-03-14 01:44:42 +01:00
Andreas Kling
be46f1bb1f
IPv4: More work on the TCP implementation.
...
Reading from the peer now kinda works. Something still going wrong with
sending packets but it's getting closer.
2019-03-14 01:00:10 +01:00
Andreas Kling
032d9d7065
IPv4: More hacking on bringing up TCP support.
...
This was a bit more complicated than I expected, but it's moving forward.
2019-03-13 23:14:30 +01:00
Andreas Kling
7aba68d51c
Userland+LibC: Add a new little "tc" program for testing TCP.
...
Also added send() and recv() to LibC in support of this. They are just
wrappers around sendto() and recvfrom().
2019-03-13 17:33:40 +01:00
Andreas Kling
4dddf949c8
IPv4: More work on UDP support.
...
I'm now able to connect to a simple UDP server on my host machine and
exchange some data. Very cool! :^)
2019-03-13 15:40:30 +01:00
Andreas Kling
ea6a537b70
Userland: Add a simple utility for UDP testing.
2019-03-13 15:00:02 +01:00
Andreas Kling
19a51132f5
Kernel: recvfrom() should treat the address arguments as outparams.
2019-03-13 14:47:21 +01:00
Andreas Kling
562663df7c
Add support for socket send/receive timeouts.
...
Only the receive timeout is hooked up yet. You can change the timeout by
calling setsockopt(..., SOL_SOCKET, SO_RCVTIMEO, ...).
Use this mechanism to make /bin/ping report timeouts.
2019-03-13 13:15:05 +01:00
Andreas Kling
cf250e1245
More work on IPv4 sockets and /bin/ping.
...
It's now actually possible to ping other hosts on the network! :^)
I've switched the "run" script over to starting QEMU with user networking
since that works better for my testing needs right now.
2019-03-13 03:26:01 +01:00
Andreas Kling
a7d5e9781a
Kernel+LibC+Userland: Yet more networking bringup hacking.
...
All ICMP sockets now receive all ICMP packets. All this buffering is gonna
need some limits and such.
2019-03-12 17:27:07 +01:00
Andreas Kling
a017a77442
Kernel+LibC+Userland: Start working on an IPv4 socket backend.
...
The first userland networking program will be "ping" :^)
2019-03-12 15:51:42 +01:00
Andreas Kling
971dd46aec
Userland: Use AK::quick_sort() in /bin/top
2019-03-09 16:20:46 +01:00
Andreas Kling
28a6ba498a
Userland: Fix broken permissions for files created by /bin/cp.
...
When passing O_CREAT to open(), it will grab a third "mode" argument from
the stack. Let's not forget to actually pass this!
Also use the process umask for the created files.
2019-03-07 23:23:07 +01:00
Andreas Kling
3079ef01ce
Userland: /bin/cp needs to handle open(dst) failing with EISDIR.
2019-03-06 20:28:00 +01:00
Andreas Kling
7d46375690
Userland: Support "cp foo somedirectory"
...
Don't overwrite the literal directory inode contents when copying a file
to a directory, duh. :^)
2019-03-06 20:22:23 +01:00
Andreas Kling
66a5ddd94a
More work on the variable-width font support.
...
Katica is now the default system font, and it looks quite nice. :^)
I'm gonna need to refine the GTextBox movement stuff eventually,
but it works well-enough for basic editing now.
2019-03-06 14:06:40 +01:00
Andreas Kling
2c5a378ccc
Kernel+Userland: Add symlink() syscall and add "-s" flag to /bin/ln.
...
It's now possible to create symbolic links! :^)
This exposed an issue in Ext2FS where we'd write uninitialized data past
the end of an inode's content. Fix this by zeroing out the tail end of
the last block in a file.
2019-03-02 01:52:24 +01:00
Andreas Kling
1b16a29044
Kernel+Userland: Implement fchmod() syscall and use it to improve /bin/cp.
...
/bin/cp will now copy the permission bits from source to destination. :^)
2019-03-01 10:39:19 +01:00
Andreas Kling
c09ab7cc40
Kernel: Only allow sending signals to process you own.
2019-02-28 11:46:38 +01:00
Andreas Kling
dda9b9ab1b
Userland: Add a simple /bin/stat program.
2019-02-27 21:45:06 +01:00
Andreas Kling
02bfbb712a
Userland: /bin/ls should show major,minor for block devices.
2019-02-27 21:32:21 +01:00