summaryrefslogtreecommitdiff
path: root/AK
AgeCommit message (Collapse)Author
2019-06-07AK: Add a ScopeGuard helper that invokes a callback when destroyed.Andreas Kling
This is useful when you want to ensure some little thing happens when you exit a certain scope. This patch makes use of it in LibC's netdb code to make sure we close the connection to the LookupServer.
2019-06-06AK: Make timeval_add() and timeval_sub() take references.Andreas Kling
2019-06-04AK: Add String::starts_with to match String::ends_withConrad Pankoff
2019-06-04AK: Add AKString::split_limit to split strings with a limitConrad Pankoff
This is a small change to the existing split() functionality to support the case of splitting a string and stopping at a certain number of tokens. This is useful for parsing e.g. key/value pairs, where the value may contain the delimiter you're splitting on.
2019-06-03LibC: Implement popen() and pclose().Andreas Kling
I feel reasonably confident that I might have gotten these right. :^)
2019-06-03StringViewize a bunch of things -- mostly LibGUIRobin Burchell
2019-06-03StringView: Make construction of String from a StringView containing a ↵Robin Burchell
String cheaper ... at the cost of an additional pointer per view.
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-06-02AK: Add implicit String -> StringView conversionRobin Burchell
And tidy up existing view() users.
2019-06-02AK: Add a comment to String about the relationship with StringImpl.Andreas Kling
2019-06-01LibCore: CObjects without is<T> specialization shouldn't LARP as others.Andreas Kling
2019-06-01Terminal: Settings windows can be opened multiple timesChristopher Dumas
2019-06-01Terminal: Audible vs Visible beep optionChristopher Dumas
2019-05-30ELFLoader: Fix typo in segment naming.Andreas Kling
Executable segments now get an "x" character in their region name.
2019-05-30Kernel: Make the Process allocate_region* API's understand "int prot".Andreas Kling
Instead of having to inspect 'prot' at every call site, make the Process API's take care of that so we can just pass it through.
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-05-28Add clang-format fileRobin Burchell
Also run it across the whole tree to get everything using the One True Style. We don't yet run this in an automated fashion as it's a little slow, but there is a snippet to do so in makeall.sh.
2019-05-28LibC: Move struct timeval to sys/time.h. #POSIXAndreas Kling
2019-05-28Shell: Allow * and ? wildcard expansion in argumentsRobin Burchell
Should also presumably allow for escaping and such, but this is a start. Fixes #112.
2019-05-27AK: Add ensure_capacity() for HashMap and HashTable.Andreas Kling
These functions make sure that the underlying table can accomodate at least 'capacity' entries before needing a rehash.
2019-05-27FileSystemPath: Add a has_extension() helper.Andreas Kling
This code: if (path.string().to_lowercase().ends_with(".foo")) Can now be written as: if (path.has_extension(".foo"))
2019-05-26AK: Implement String::to_int (#99)Faissal Bensefia
2019-05-26QuickSort: Don't sort a single item, nothing to doRobin Burchell
2019-05-24WindowServer: Factor out compositing from WSWindowManager into WSCompositor.Andreas Kling
This is far from finished and the two classes are awkwardly grabbing at each other's innards, but here's a first step in the right direction.
2019-05-23Kernel/AK: Move ELF loader to AKRobin Burchell
This is in preparation for eventually using it in userspace. LinearAddress.h has not been moved for the time being (as it seems to be only used by a very small part of the code).
2019-05-21AK: Always inline convert_between_host_and_network<T>.Andreas Kling
2019-05-21AK: Add some more features to Vector iterators.Andreas Kling
2019-05-19AK: Simplify quick_sort() and improve Vector iterators a bit.Andreas Kling
2019-05-18Kernel: Fix timeout support in selectRobin Burchell
The scheduler expects m_select_timeout to act as a deadline. That is, it should contain the time that a task should wake at -- but we were directly copying the time from userspace, which meant that it always returned virtually immediately. At the same time, fix CEventLoop to not rely on the broken select behavior by subtracting the current time from the time of the nearest timer.
2019-05-17Build: Install most headers to Root (and libcore.a/libgui.a)Robin Burchell
This makes out-of-tree linking possible. And at the same time, add a CMakeToolchain.txt file that can be used to build arbitrary cmake-using applications on Serenity by pointing to the CMAKE_TOOLCHAIN_FILE when running cmake: -DCMAKE_TOOLCHAIN_FILE=~/code/serenity/Toolchain/CMakeToolchain.txt
2019-05-17LibCore: Move AK/ArgsParser to LibCore/CArgsParserRobin Burchell
Also rename the classes to match LibCore naming style. This means that it's no longer incorrectly linked into LibC and Kernel.
2019-05-17ArgsParser: Expand to be able to handle multiple single argumentsRobin Burchell
This is needed for e.g. ln
2019-05-17AK/Userland: Add single value to ArgsParser usage, and port tail to use ↵Robin Burchell
ArgsParser
2019-05-17ArgsParser: Remove prefix from constructorRobin Burchell
It makes sense to keep this consistent between applications, and the purpose of the string is not immediately obvious from an API perspective. If we need to make it configurable later, that can come from a setter.
2019-05-17ArgsParser: Remove boolean trap on add_argRobin Burchell
Rather than requiring a boolean for whether or not the argument is required, add some new methods to make the purpose of the bool explicit.
2019-05-17ArgsParser: Style fixupRobin Burchell
Remove tabs, make whitespace lines a little more in fitting with the rest of the codebase.
2019-05-17Vector: Add insert() overload that takes a const T&.Andreas Kling
2019-05-14Kernel: Encapsulate the Region's COW map a bit better.Andreas Kling
2019-05-14AK: InlineLRUCache was always filling up one short of capacity.Andreas Kling
2019-05-13Feature/pidof (#31)GuillaumeGas
* Added killall command * Fixed feedbacks of awesomekling * Implemented pidof program and helper to parse arguments called ArgsParser. * Fixed feedbacks in pidof implem. Fixes #26
2019-05-07AK: Add InlineLinkedList::remove_tail().Andreas Kling
2019-05-06Make sure all GraphicsBitmap scanlines are 16-byte aligned.Andreas Kling
This is a prerequisite for some optimizations.
2019-05-06AK: Change HashTable and HashMap size/capacity to be ints.Andreas Kling
2019-04-25GTextEditor: Add very basic automatic indentation.Andreas Kling
This is off by default, but enabled by TextEditor. It simply inserts the same number of leading spaces as the previous line when hitting Enter. :^)
2019-04-25Kernel: Add a write cache to DiskBackedFS.Andreas Kling
This way you can spam small write()s on a file without the kernel writing to disk every single time. Flushes are included in the FS::sync() operation and will get triggered regularly by syncd. :^)
2019-04-23Do a pass of compiler warning fixes.Andreas Kling
This is really making me question not using 64-bit integers more.
2019-04-22Kernel: Make sure we don't use any FPU/MMX/SSE instructions.Andreas Kling
2019-04-22Kernel: Don't use MMX memcpy() in the kernel.Andreas Kling
I just discovered the hard way that clobbering FPU/MMX/SSE registers in the kernel makes things very confusing for userspace (and other kernel threads.) Let's banish all of those things from the kernel to keep things simple.
2019-04-20AK: Add String::copy(BufferType) helper.Andreas Kling
This will create a String from any BufferType that has data() and size().
2019-04-20AK: Give Vector the ability to have an inline capacity.Andreas Kling
This makes Vector malloc-free as long as you stay within the templated inline capacity. :^)