summaryrefslogtreecommitdiff
path: root/AK/BufferStream.h
AgeCommit message (Collapse)Author
2020-02-20AK: Use size_t for ByteBuffer sizesAndreas Kling
This matches what we already do for string types.
2020-02-05AK+IPCCompiler: Get rid of BufferStream overloads for size_tAndreas Kling
Since BufferStream is about creating specific binary stream formats, let's not have a flaky type like size_t in there. Instead, clients of BufferStream can cast their size_t to the binary size they want to use. Account for this in IPCCompiler by making String lengths always 32-bit.
2020-02-05AK: Support 64-bit integers in BufferStreamjoshua stein
2020-01-18Meta: Add license header to source filesAndreas Kling
As suggested by Joshua, this commit adds the 2-clause BSD license as a comment block to the top of every source file. For the first pass, I've just added myself for simplicity. I encourage everyone to add themselves as copyright holders of any file they've added or modified in some significant way. If I've added myself in error somewhere, feel free to replace it with the appropriate copyright holder instead. Going forward, all new source files should include a license header.
2019-12-09AK: Use size_t for the length of stringsAndreas Kling
Using int was a mistake. This patch changes String, StringImpl, StringView and StringBuilder to use size_t instead of int for lengths. Obviously a lot of code needs to change as a result of this.
2019-12-02AK: Allow BufferStream to serialize/deserialize floatsAndreas Kling
2019-09-06AK: Rename <AK/AKString.h> to <AK/String.h>Andreas Kling
This was a workaround to be able to build on case-insensitive file systems where it might get confused about <string.h> vs <String.h>. Let's just not support building that way, so String.h can have an objectively nicer name. :^)
2019-08-03BufferStream: It's not an error to read up to the very end of a bufferAndreas Kling
Don't signal an error before we've reached the very end of the buffer.
2019-08-03BufferStream: Add operator<<(const char*) overloadAndreas Kling
Ext2FS was relying on the presence of a (StringView) overload here and when I added a (bool) overload, it started choosing that for literals.
2019-08-03BufferStream: Support "bool" as a streaming typeAndreas Kling
2019-07-16BufferStream: Add a function to fully reset stateRobin Burchell
This will allow us to reuse the same buffer with the same stream instance. Needed in AudioServer.
2019-07-16BufferStream: Add signed int overloads for read/writeRobin Burchell
This will be required in AudioServer
2019-07-14AK/LibAudio: Add stream read operators to AK::BufferStream, and use it in ↵Robin Burchell
AWavLoader At the same time, we allow chaining of streaming operators, and add a way to check for partial reads (also used in WAV parsing).
2019-07-14AK: Remove some superstition from BufferStream :)Robin Burchell
2019-07-03AK: Rename the common integer typedefs to make it obvious what they are.Andreas Kling
These types can be picked up by including <AK/Types.h>: * u8, u16, u32, u64 (unsigned) * i8, i16, i32, i64 (signed)
2019-06-02Take StringView in more placesRobin Burchell
We should work towards a pattern where we take StringView as function arguments, and store String as member, to push the String construction to the last possible moment.
2019-05-30Kernel: Add InodeFile, a File subclass for regular files.Andreas Kling
Finally everything that can be held by a FileDescriptor actually inherits from the File class.
2019-03-19DNSLookupServer: Start working on a userspace DNS resolver.Andreas Kling
This doesn't have any server functionality just yet, but it does post decent-looking DNS queries and parse the responses.
2019-02-25More moving towards using signed types.Andreas Kling
I'm still feeling this out, but I am starting to like the general idea.
2019-02-02Support font files.Andreas Kling
This only works with the userspace build of SharedGraphics so far. It's also very slow at loading fonts, but that's easy to fix. Let's put fonts in /res/fonts/.
2019-01-23Ext2FS: Factor out block list generation and writing into functions.Andreas Kling
2018-12-02Make it possible to build the Kernel on a macOS host.Andreas Kling
It still requires an ELF compiler and linker, but at least it builds. I need to get rid of the "Unix" namespace. This does a lot of that.
2018-11-13Reduce kmalloc() traffic in directory iteration.Andreas Kling
Pass the file name in a stack-allocated buffer instead of using an AK::String when iterating directories. This dramatically reduces the amount of cycles spent traversing the filesystem.
2018-10-24Lots of hacking to make a very simple "ls" utility.Andreas Kling
I added a dead-simple malloc that only allows allocations < 4096 bytes. It just forwards the request to mmap() every time. I also added simplified versions of opendir() and readdir().