Victor Zverovich
755ecb0311
Fix warnings
2014-10-13 08:39:38 -07:00
Victor Zverovich
d707adce5c
Fix warning in clang
2014-10-13 06:59:18 -07:00
Victor Zverovich
8b76e97062
Support compilation with exceptions disabled
2014-10-06 08:30:55 -07:00
Victor Zverovich
8c4db5081b
Fix Windows build
2014-09-29 09:17:02 -07:00
Victor Zverovich
d1ded569ff
Separate memory management and formatting
...
Array is split into an abstract Buffer class and a concrete MemoryBuffer class. BasicWriter now does all memory allocation through a Buffer object. Subclasses of BasicWriter may use different buffer types. The new BasicMemoryBuffer class uses the default MemoryBuffer.
2014-09-29 08:48:16 -07:00
Victor Zverovich
f43caef311
Fix linkage
2014-09-25 07:21:48 -07:00
Victor Zverovich
75a2ea03a7
Reduce code bloat
...
Special case C strings because there is no need to handle size for them. Add support for pre-C++11 compilers to make_type.
2014-09-25 07:10:44 -07:00
Victor Zverovich
163178eee1
Make print non-inline
2014-09-25 07:08:25 -07:00
Victor Zverovich
ab6e759291
pointer_value -> pointer
2014-09-23 08:21:58 -07:00
Victor Zverovich
beb00edf73
Store types in ArgList instead of Arg
2014-09-23 07:59:43 -07:00
Victor Zverovich
1d4640415d
Pass ArgList by value
...
This improve bloat test results:
Old stripped size: 67680 (optimized)
New stripped size: 59488 (optimized)
2014-09-21 08:08:52 -07:00
Victor Zverovich
14f2577569
Fix linkage
2014-09-19 08:45:05 -07:00
Victor Zverovich
b9a568b1dd
Add support for custom memory allocator to BasicWriter
2014-09-19 07:51:42 -07:00
Victor Zverovich
f2c9df8e9f
Move safe_strerror to anonymous namespace.
2014-09-05 08:44:41 -07:00
Victor Zverovich
88e0db8486
Test format_error_code.
2014-09-05 08:04:26 -07:00
Victor Zverovich
22f75d8b6d
Don't throw exceptions from error formatting functions. Gracefully fallback to a less descriptive message instead.
2014-09-03 08:03:05 -07:00
Victor Zverovich
5debb2aa86
Refactor error reporting to reduce duplication.
2014-08-29 08:16:10 -07:00
Victor Zverovich
605d2600f8
Improve error reporting.
2014-08-29 07:45:55 -07:00
Victor Zverovich
271fa8c908
Improve handling of format strings in custom arguments.
2014-08-29 07:23:54 -07:00
Victor Zverovich
3947a7a98c
Move check_sign to anonymous namespace.
2014-08-29 06:57:53 -07:00
Victor Zverovich
32344d9b14
Comment
2014-08-28 08:11:21 -07:00
Victor Zverovich
c57d7a506f
Factor out argument processing logic common between format and printf to FormatterBase::{next_arg,get_arg}.
2014-08-28 08:05:47 -07:00
Victor Zverovich
56fc525e98
Get rid of FormatterBase::error_.
2014-08-28 07:48: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
9646e38c3b
Don't use error_ in parse_arg_index.
2014-08-27 09:13:42 -07:00
Victor Zverovich
da0f7c0a51
Improve error reporting in parse_arg_index.
2014-08-27 09:04:51 -07:00
Victor Zverovich
42de4f1f7d
Get rid of FormatErrorReporter.
2014-08-27 08:24:31 -07:00
Victor Zverovich
dd4323f31c
Add fprintf and write docs.
2014-08-21 08:49:13 -07:00
Victor Zverovich
be00d8b272
Convert integer argument like printf does.
2014-08-19 08:49:10 -07:00
Victor Zverovich
406c6123fb
Cleanup
2014-08-19 08:47:38 -07:00
Victor Zverovich
c4a4a05d12
Improve handling of char in printf.
2014-08-19 08:14:21 -07:00
Victor Zverovich
186734cf8b
Fix warnings.
2014-08-18 07:03:12 -07:00
Victor Zverovich
adce0245dc
Fix a warning.
2014-08-17 07:53:55 -07:00
Victor Zverovich
366e852f00
Fix a warning.
2014-08-15 16:35:41 -07:00
Victor Zverovich
bb01633d19
Fix a warning.
2014-08-15 09:03:59 -07:00
Victor Zverovich
fb32161fa4
Move implementation specific stuff from format.h to format.cc.
2014-08-15 08:40:03 -07:00
Victor Zverovich
d4412a01f0
Simplify isinfinity.
2014-08-13 08:01:51 -07:00
Victor Zverovich
1a0c76a81a
Fix formatting of long double.
2014-08-13 07:51:02 -07:00
Victor Zverovich
e488a28601
Fix a warning.
2014-08-13 06:53:43 -07:00
Victor Zverovich
d3a7039e31
Implement 'll' specifier.
2014-08-12 08:36:19 -07:00
Victor Zverovich
316ae7e244
Implement more printf length specifiers.
2014-08-09 10:04:35 -07:00
Victor Zverovich
e22d657202
Fix MSVC warnings.
2014-08-08 06:51: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
Victor Zverovich
f4156b57f0
Implement 'hh' length specifier in printf.
2014-07-30 08:39:07 -07:00
Victor Zverovich
39b0930aee
Improve handling of 'h' length specifier in printf.
2014-07-30 08:08:08 -07:00
Victor Zverovich
eeca22357b
Handle 'h' length specifier in printf.
2014-07-30 07:37:16 -07:00
Victor Zverovich
e4c4e4e944
Improve handling of dynamic precision in printf.
2014-07-30 06:51:35 -07:00
Victor Zverovich
be785a8a43
Fix MSVC build.
2014-07-29 09:14:07 -07:00