Commit graph

9 commits

Author SHA1 Message Date
Ben Wiederhake
ede5dbd7b3 Meta+LibC through LibHTTP: Make clang-format-10 clean
Why break at LibHTTP? Because "Meta+Libraries" would be insanely large,
and breaking between LibHTTP and LibJS makes the commits roughly evenly large.
2020-09-25 21:18:17 +02:00
Diego Iastrubni
64c15798e7 LibCore: Add support for double on argparse
Code is pretty trivial. If someone needs "float" support, a copy-paste
will be in place.

Build system was confused between math.h from rootfs, and toolchain. I
fixed the problem caused by `math.h` by locally using the builtin
`isnan()` from the compiler. It's ugly - but works. I am looking for
other alternatives.
2020-08-12 13:57:06 +02:00
Andreas Kling
fdfda6dec2 AK: Make string-to-number conversion helpers return Optional
Get rid of the weird old signature:

- int StringType::to_int(bool& ok) const

And replace it with sensible new signature:

- Optional<int> StringType::to_int() const
2020-06-12 21:28:55 +02:00
Sergey Bugaev
b4ca45b5ec LibCore: Update Core::ArgsParser to the new error message format 2020-05-30 15:01:18 +02:00
AnotherTest
1c4f38749e LibCore: Allow ArgsParser::parse() to not exit on failure
This allows its use in places where multiple calls to
ArgsParser::parse() are needed, such as Shell builtins.
2020-05-17 11:58:08 +02:00
AnotherTest
16ba0b39f3 LibCore: Reset getopt's state when starting parse()
This way, a program can use ArgsParser multiple times, potentially with
multiple different options.
2020-05-17 11:58:08 +02:00
Andreas Kling
37fc6c117c Userspace: Add missing #includes now that AK/StdLibExtras.h is smaller 2020-03-08 13:06:51 +01:00
Andreas Kling
ceec1a7d38 AK: Make Vector use size_t for its size and capacity 2020-02-25 14:52:35 +01:00
Andreas Kling
d17e23bd27 LibCore: Remove leading C from filenames 2020-02-06 15:04:03 +01:00
Renamed from Libraries/LibCore/CArgsParser.cpp (Browse further)