Commit Graph

81 Commits

Author SHA1 Message Date
vitaut
8474a6232d Don't perform narrowing conversion for integers in printf (#255) 2016-01-24 00:43:42 +01:00
Nicholas Hutchinson
1a5a1708b7 Add fprintf overload that writes to a std::ostream
For completeness, add an overload for printf that takes a std::ostream.
2015-12-23 15:59:13 +13:00
vitaut
1a2a333a1a Use format specifiers when formatting null pointers & strings 2015-11-23 21:01:28 -08:00
vitaut
2157375d5c Use textual formatting for bool with %s specifier in printf (#224) 2015-11-13 07:18:44 -08:00
vitaut
57ba9436a0 Format null string as (nil) with p specifier 2015-11-12 06:09:08 -08:00
vitaut
b5fda1c90d Format null pointer as (nil) and null string as (null) in printf (#226) 2015-11-11 07:57:19 -08:00
vitaut
8b86a74ad5 Allow formatting C strings as pointers (#223) 2015-11-09 07:17:36 -08:00
vitaut
cd097d334e Workaround bogus coverity warnings 2015-10-21 06:16:55 -07:00
vitaut
c684886dfc Make coverity happy 2015-10-20 08:29:41 -07:00
vitaut
d25d775ae6 Suppress bogus coverity warnings 2015-10-20 06:26:31 -07:00
vitaut
56d3b9135f Try a workaround for a bogus Coverity warning 2015-10-19 08:17:05 -07:00
vitaut
ef710dee6c Add sprintf overload for wide strings
and fix an issue in formatting user-defined objects.
Thanks to @ScottLangham
2015-09-18 16:26:41 -07:00
vitaut
79d8f59906 Implement formatting of objects with (s)printf. 2015-09-08 08:36:20 -07:00
vitaut
e39490500c Replace implicit conversion to std::string with to_string 2015-06-17 07:59:41 -07:00
vitaut
cf04d98d06 Pass as many types as possible in a single integer to reduce code bloat 2015-03-24 08:55:40 -07:00
Shauren
a445e727c2 Added support to format more than 16 arguments with printf API when using variadic templates 2015-03-20 21:31:10 +01:00
Victor Zverovich
5821aec7b9 Implement printing of values that are convertible to int such as enums 2015-03-10 07:53:46 -07:00
Victor Zverovich
615c1eef6b Fix error handling in fmt::fprintf. 2014-11-14 09:40:01 -08:00
Victor Zverovich
605d2600f8 Improve error reporting. 2014-08-29 07:45:55 -07:00
Victor Zverovich
279c7a6e6a Change "number is too big in format" to "number is too big" because the error can occur not only in the format function. 2014-08-28 06:50:52 -07:00
Victor Zverovich
526b7fc91d Throw exception in parse_nonnegative_int if the number is too big. 2014-08-28 06:42:59 -07:00
Victor Zverovich
da0293c4dd Add missing include. 2014-08-21 07:29:23 -07:00
Victor Zverovich
03cdf1235a Test printf. 2014-08-21 07:14:02 -07:00
Victor Zverovich
f1ac0a19e9 Test float. 2014-08-20 08:21:06 -07:00
Victor Zverovich
be00d8b272 Convert integer argument like printf does. 2014-08-19 08:49:10 -07:00
Victor Zverovich
c4a4a05d12 Improve handling of char in printf. 2014-08-19 08:14:21 -07:00
Victor Zverovich
f2be7851cc Fix a warning. 2014-08-19 07:29:30 -07:00
Victor Zverovich
e0f92d675e Fix a warning. 2014-08-19 07:14:25 -07:00
Victor Zverovich
39ac84f01e Comment. 2014-08-18 07:03:22 -07:00
Victor Zverovich
186734cf8b Fix warnings. 2014-08-18 07:03:12 -07:00
Victor Zverovich
c7cfa7d4e7 More tests. 2014-08-15 06:58:24 -07:00
Victor Zverovich
18f1e08685 Test 'll' specifier. 2014-08-13 06:59:29 -07:00
Victor Zverovich
ddd087d8d1 Test more length specifiers. 2014-08-13 06:42:15 -07:00
Victor Zverovich
5614295aa1 Test 'l' specifier. 2014-08-12 08:15:39 -07:00
Victor Zverovich
7c14431211 Enable 'h' speciffier tests. 2014-08-12 06:49:27 -07:00
Victor Zverovich
adbf3f8b86 Rewrite length specifier tests without using printf to workaround broken MSVC implementation. 2014-08-11 08:34:17 -07:00
Victor Zverovich
137153b9f0 Take integer promotion into account. 2014-08-11 06:54:58 -07:00
Victor Zverovich
910dec5ed3 Fix 'l' specifier test. 2014-08-11 06:33:40 -07:00
Victor Zverovich
028d12dacd Disable 'l' specifier tests. 2014-08-09 10:12:36 -07:00
Victor Zverovich
316ae7e244 Implement more printf length specifiers. 2014-08-09 10:04:35 -07:00
Victor Zverovich
bdbacde659 Test 'h' specifier. 2014-08-09 08:53:14 -07:00
Victor Zverovich
3465d056e7 Test hh specifier with unsigned char. 2014-08-08 06:59:17 -07:00
Victor Zverovich
566061d1f1 Fix formatting of signed ints in test. 2014-08-06 08:21:12 -07:00
Victor Zverovich
e04b07921f Debug length specifier test. 2014-08-06 07:16:49 -07:00
Victor Zverovich
8b41b09add Test 'hh' and 'h' printf specifiers. 2014-08-06 07:00:04 -07:00
Victor Zverovich
86bbd3c238 Test hh length. 2014-08-05 08:21:47 -07:00
Victor Zverovich
b797d39dd1 Test printf length. 2014-08-05 07:52:59 -07:00
Victor Zverovich
fc10d10b6b Disable hh specifier tests for now because broken MSVC's printf causes test failures. 2014-08-01 08:50:09 -07:00
Victor Zverovich
a259c941e2 Implement 'l' length specifier. 2014-08-01 07:15:27 -07:00
Victor Zverovich
d81fafc295 Fix tests on MSVC, take 2. 2014-07-31 07:43:14 -07:00