Commit Graph

346 Commits

Author SHA1 Message Date
Michael Winterberg
4af764d040 Changed ArgMap to be backed by a vector instead of a map.
The main reason for this is to avoid a dynamic memory allocation in every format() call with Visual Studio if there are no named arguments.
2016-01-10 15:30:34 -08: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
535dbdd1c8 Move formatter methods to the header
and improve naming consistency
2015-12-03 09:38:06 -08:00
vitaut
b8bd80ff28 Fix handling of empty non-null-terminated strings 2015-11-25 09:49:01 -08:00
vitaut
1a2a333a1a Use format specifiers when formatting null pointers & strings 2015-11-23 21:01:28 -08:00
vitaut
e5d599875c Improve compatibility with bcc32 2015-11-20 07:56:16 -08:00
vitaut
6606971aae Improve compatibility with bcc32 2015-11-18 08:42:09 -08:00
vitaut
2157375d5c Use textual formatting for bool with %s specifier in printf (#224) 2015-11-13 07:18:44 -08:00
vitaut
7dcf05108e Move cstddef include to format.cc and refactor Buffer::append 2015-11-13 06:52:13 -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
Ingo van Lil
41ebedf516 Fix warning when building with -Wundef and disabled exceptions 2015-11-03 11:21:09 +01:00
Ingo van Lil
f4d8884af1 Add casts to fix warnings with -Wconversion 2015-11-02 19:14:47 +01:00
Ingo van Lil
b4b13ee2b8 Fix warnings when compiling with -Wundef 2015-11-02 13:55:31 +01:00
vitaut
82acd483ae Fix warnings (#216) 2015-10-30 07:54:55 -07:00
vitaut
2d727e7d0e Suppress bogus coverity warnings 2015-10-28 07:01:28 -07:00
vitaut
316b05cf34 Avoid magic constants 2015-10-28 06:31:37 -07:00
vitaut
17960dd3d3 Remove unused parameter name 2015-10-28 06:23:22 -07:00
vitaut
fb27723a9f Try fixing bogus coverity warnings, take n 2015-10-22 07:33:01 -07:00
vitaut
b64913b00b Suppress bogus coverity warnings 2015-10-22 05:58:37 -07:00
vitaut
ab25cd2c8b Suppress a bogus coverity warning 2015-10-21 08:30:10 -07:00
vitaut
cd097d334e Workaround bogus coverity warnings 2015-10-21 06:16:55 -07:00
vitaut
22d572d7a2 Fix potential segfault when exceptions are disabled 2015-10-20 06:23:16 -07:00
vitaut
b2714f83cc FMT_NO_STREAM_LIBRARIES -> FMT_USE_IOSTREAMS
for consistency with similar macros and removed unnecessary
checks.
2015-10-18 08:50:35 -07:00
Richard Maxwell
2cca51c744 Issue 205: Make iostream support optional. 2015-10-16 08:04:53 +13: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
c3ba615c65 Fix warnings 2015-08-07 07:34:58 -07:00
vitaut
ca7478144d Fix warnings 2015-08-07 07:08:46 -07:00
vitaut
ecdc7ec1f1 Fix more warnings 2015-08-04 08:01:28 -07:00
vitaut
7fa17fe772 Fix warnings 2015-08-04 07:55:33 -07:00
Radu Popescu
0affb23560 fixed #190 Argument shadowing and Clang pedantic support 2015-08-04 12:52:44 +02:00
vitaut
200037683e Initialize next_arg_index_ in ctor (#187) 2015-07-28 08:10:46 -07:00
vitaut
0eac037416 Get rid of the BasicFormatter::start_ 2015-07-28 06:46:41 -07:00
vitaut
6484a15ca0 Fix MSVC warnings 2015-07-08 07:35:57 -07:00
vitaut
c669cbedf8 Rename None to Null because of conflict with an xlib.h macro 2015-07-07 07:05:17 -07:00
vitaut
7154238d45 Add terminating null character in UTF coverters 2015-06-27 09:11:15 -07:00
vitaut
ba09c1b56e Fix windows build 2015-06-26 09:23:11 -07:00
vitaut
438bd9b0e6 Add BasicCStringRef to represent a null-termated string (#100)
and use it instead of BasicStringRef in cases that assume that the
string is null-terminated such as POSIX function and format string
parser.
2015-06-26 07:43:54 -07:00
vitaut
8ab665afbc Only use death tests if available 2015-06-22 08:17:23 -07:00
vitaut
147e5ebbbc Move casts to CharTraits for custom character types 2015-06-17 07:21:16 -07:00
vitaut
270069beda Use arg visitor when formatting printf argument
and get rid of ignore_incompatible_str.
2015-06-16 07:36:32 -07:00
vitaut
9b6b3382e3 Don't use ignore_incompatible_str in ArgFormatter 2015-06-15 07:15:28 -07:00
vitaut
63f6c10449 Suppress a warning about unused strerror_r. 2015-06-14 09:36:23 -07:00
vitaut
8725d07d8b Place the anonymous namespace within the fmt namespace
for header-only configuration as suggested by Alf Steinbach.
2015-06-12 07:56:58 -07:00
vitaut
24c309fbfa Don't use windows.h if FMT_USE_WINDOWS_H is set to 0 2015-06-12 07:15:57 -07:00
vitaut
9d09214e7a Use textual representation for bool by default (#170) 2015-06-11 09:00:06 -07:00
vitaut
fd5c2e909b Report error when using precision with char 2015-06-11 08:58:31 -07:00
vitaut
fccff7be5f Minor tweaks to the named arguments support code
* Restore privacy of FormatterBase
* Pass BasicStringRef by value
* Comment on why some overloads of arg are deleted
* Set next_arg_index_ in check_no_auto_index
* A few minor stylistic changes for simplicity & consistency with other code
2015-06-11 07:19:00 -07:00