Commit Graph

176 Commits

Author SHA1 Message Date
Victor Zverovich
d70729215f Fix constness 2024-01-14 06:44:38 -08:00
Victor Zverovich
971f7ae768 Minor cleanup 2024-01-10 16:43:00 -08:00
Victor Zverovich
fb66131efa Improve arg storage 2024-01-08 21:25:41 -08:00
Victor Zverovich
c142385033 Improve the pipe API 2024-01-01 15:55:37 -08:00
Victor Zverovich
8e6b2541a6 Apply coding conventions 2023-12-30 16:07:35 -08:00
Victor Zverovich
821f8cdb45 Detemplatize printf more 2023-05-17 12:34:12 -07:00
Victor Zverovich
2f605cc896 Deprecate wide printf 2023-05-17 08:58:55 -07:00
Victor Zverovich
5780269d57 Improve API safety 2023-05-11 10:19:56 -07:00
Victor Zverovich
71e4e02722 Cleanup vprintf 2023-01-02 08:37:00 -08:00
Victor Zverovich
ffb9b1d13c Improve handling of signed types 2022-12-30 10:31:39 -08:00
Vladislav Shchapov
31364732dc Replace snprintf-based hex float formatter with internal implementation
Signed-off-by: Vladislav Shchapov <vladislav@shchapov.ru>
2022-11-24 07:15:46 -08:00
Victor Zverovich
0c06c81da8 Deprecated implicit conversion of enums to ints for consistency with scoped enums 2022-07-03 09:02:22 -07:00
Victor Zverovich
f055ebbd25 Make ostream operators opt in to reduce the risk of ODR violations 2022-02-04 15:06:45 -08:00
Victor Zverovich
1b193e7b37 Deprecate more 2022-01-03 11:13:09 -08:00
Victor Zverovich
e421d52713 Simplify error handling in parse_nonnegative_int 2021-06-14 16:05:37 -07:00
Victor Zverovich
2039dce75f Detect consteval 2021-06-07 06:57:43 -07:00
Victor Zverovich
76ee490468 Move wchar/custom char overloads to xchar.h 2021-06-05 22:57:45 -07:00
Victor Zverovich
d338d66324 Cleanup the printf implementation 2021-06-01 19:30:46 -07:00
Victor Zverovich
34b8acaef7 More wchar_t-specific API to wchar.h 2021-05-21 18:24:39 -07:00
Victor Zverovich
9c3af11a92 Cleanup tests 2021-05-05 18:31:41 -07:00
Victor Zverovich
c738c3431f Cleanup tests 2021-05-04 17:23:13 -07:00
Victor Zverovich
c9c0e5077d Cleanup tests 2021-04-30 06:42:38 -07:00
Victor Zverovich
b9ab5c8836 Remove printf.h dependency on ostream.h 2021-04-23 10:42:57 -07:00
Victor Zverovich
6e1fc01752 Move detail::truncating_iterator to fmt/compile.h 2021-03-06 08:35:36 -08:00
rimathia
95c6ac0cc8 fix typo which caused the loss of the counting information when using a printf context with a truncating_iterator 2020-06-05 07:37:54 -07:00
Victor Zverovich
3245145a41 Remove undocumented buffer_range and output_range 2020-05-30 13:07:52 -07:00
rimathia
8c8f74a870 fix zero flag for char types and make zero flag ignored if a precision is specified 2020-05-23 12:46:26 -07:00
rimathia
6b219a58db
fix interaction of space flag and '+' flag, as well as '-' flag and '0' flag (#1687) 2020-05-17 04:27:18 -07:00
rimathia
96c18b26c2
make plus flag for printf not be ignored for char argument (#1683)
* make plus flag for printf not be ignored for char argument

* clarify overwriting of alignment specifiers for printf with char argument
2020-05-15 06:45:51 -07:00
Victor Zverovich
8069265373 internal -> detail (#1538) 2020-05-10 07:34:30 -07:00
Victor Zverovich
7f723fbcb8 Consistently namespace qualify size_t 2020-05-07 15:59:46 -07:00
Victor Zverovich
0463665ef1 Don't access a C string past precision in printf (#1595) 2020-04-22 17:10:23 -07:00
Victor Zverovich
8a4630686e Improve handling of named arguments 2020-04-14 11:56:55 -07:00
Victor Zverovich
e99809f29d Fix ostream support in sprintf (#1631) 2020-04-12 07:53:17 -07:00
Victor Zverovich
7d01859ef1 Fix handling of unsigned char strings in printf 2020-04-08 13:05:42 -07:00
Victor Zverovich
f72a905eb3 Fix handling of volatile enums 2020-03-11 08:40:57 -07:00
Victor Zverovich
8cf4c52068 Apply clang-format 2019-12-21 13:10:45 -08:00
Florin Iucha
d3aa0c3a28 Clean-up sign-conversion warnings in test code 2019-12-08 16:07:43 -08:00
Victor Zverovich
31de9a1b80 Revert "Clean-up sign-conversion warnings in test code"
This reverts commit 227bfe62dd.
2019-12-08 15:47:24 -08:00
Florin Iucha
227bfe62dd Clean-up sign-conversion warnings in test code 2019-12-08 15:21:38 -08:00
Victor Zverovich
dcde089b4e Improve POSIX API detection 2019-11-15 07:28:02 -08:00
Victor Zverovich
40414b3446 Don't emit trailing zeros in exponential notation (#1376) 2019-10-28 12:31:00 -07:00
Victor Zverovich
e4d6d9d7c8 Implement divmod 2019-10-09 13:40:50 -07:00
Orivej Desh
b66bb6b71f Fix undefined in core-test and printf-test (#1345)
* Fix undefined in core-test

Fixes "reference binding to null pointer" in BufferTest.Ctor

buffer.operator[] attempts to return a reference to `buffer.ptr_[0]` when `ptr_`
in `mock_buffer<int> buffer` is null.

* Fix undefined in printf-test

Fixes "signed integer overflow" in PrintfTest.Length

This occurs in `TestLength<long long>("ll")`, since its minimum value minus one
does not fit in long long.

* Fix undefined in printf %0$

Printf counts arguments from 1.

Fixes "shift exponent -4 is negative" in PrintfTest.InvalidArgIndex.

`do_get` is called with index -1 when `basic_printf_context.arg` is called with
id 4294967295 when basic_printf_context::get_arg subtracts 1 from arg_index 0 in
the format string "%0$d".
2019-10-08 06:28:39 -07:00
Victor Zverovich
c85ae23c73 Add max_value 2019-09-08 09:21:30 -07:00
Victor Zverovich
3f75e2b69e Make buffer_range public and update custom formatting docs (#1281) 2019-08-28 06:50:20 -07:00
Victor Zverovich
f6f0415b83 typedef -> using 2019-07-07 17:14:26 -07:00
Victor Zverovich
5488d0b53a spec -> specs 2019-07-07 06:39:20 -07:00
Victor Zverovich
f13906f408 back_insert_range<internal::buffer> -> buffer_range 2019-06-19 14:12:29 -07:00
Victor Zverovich
d07cc2026b FMT_EXPLICIT -> explicit, FMT_NULL -> nullptr 2019-05-30 07:42:36 -07:00