Age | Commit message (Collapse) | Author |
|
Also add a test to prevent this from happening again. There were two
bugs:
* The number of bytes just after processing the last value was written,
instead of the number of bytes after skipping remaining whitespace.
Confirmed by testing against GNU's `scanf()` since the man page
leaves something to be desired.
* The number of bytes was written to the wrong variable argument; i.e.
the first argument was overwritten.
|
|
|
|
On x86_64 GCC implements va_list as an array. This makes the syntax
for taking a pointer to it break & crash. The workaround / solution is
to create a copy. Since va_list is a tiny struct referencing the
actual varargs, this is little overhead (especially compared to
va_args itself)
|
|
These were preventing some AK classes from using the AK Concepts header
due to the non-strictly namespaced ConversionSpecifier::Unsigned, and
are not used as their underlying value, so enum classes are more
appropriate anyways.
|
|
|
|
SPDX License Identifiers are a more compact / standardized
way of representing file license information.
See: https://spdx.dev/resources/use/#identifiers
This was done with the `ambr` search and replace tool.
ambr --no-parent-ignore --key-from-file --rep-from-file key.txt rep.txt *
|
|
The vsscanf library function lets the user skip assigning
parsed values to the arguments, e.g. with %*c - even though
a character is scanned it is not assigned to one of the
arguments.
The figlet port uses this. With this patch the port is actually
usable.
|
|
This commit makes the user-facing StdLibExtras templates and utilities
arguably more nice-looking by removing the need to reach into the
wrapper structs generated by them to get the value/type needed.
The C++ standard library had to invent `_v` and `_t` variants (likely
because of backwards compat), but we don't need to cater to any codebase
except our own, so might as well have good things for free. :^)
|
|
|
|
Previously, `vsscanf()` would crash whenever it encountered a width
specification. Now, it consumes the width specification but does not
yet do anything with it.
|
|
...for 'long long' and 'unsigned long long', instead of reading them as
'long's and 'unsigned long's.
Also add a test for values that can only fit in (unsigned) long long.
Fixes #6096.
|
|
Good-bye LogStream. Long live AK::Format!
|
|
It won't actually work on 64-bit yet, but let's do our future selves
a favor and make it compile.
|
|
(...and ASSERT_NOT_REACHED => VERIFY_NOT_REACHED)
Since all of these checks are done in release builds as well,
let's rename them to VERIFY to prevent confusion, as everyone is
used to assertions being compiled out in release.
We can introduce a new ASSERT macro that is specifically for debug
checks, but I'm doing this wholesale conversion first since we've
accumulated thousands of these already, and it's not immediately
obvious which ones are suitable for ASSERT.
|
|
This makes the gcc port work again.
|
|
This adds support for some previously unsupported features
(e.g. length modifiers) and fixes at least one FIXME.
Fixes #90.
|
|
|