Commit Graph

119 Commits

Author SHA1 Message Date
Victor Zverovich
42764e54ae Fix UTF16ToUTF8. 2014-05-01 07:09:08 -07:00
Victor Zverovich
53b4c31afb Move Format*ErrorMessage to internal namespace. 2014-04-30 15:00:41 -07:00
Victor Zverovich
400812a905 CError -> WinError 2014-04-30 12:38:17 -07:00
Victor Zverovich
34712da2e7 Fix MSVC build. 2014-04-30 11:28:07 -07:00
Victor Zverovich
99e6112fda Fix StrError, move Format*ErrorMessage to the implementation. 2014-04-30 11:20:41 -07:00
Victor Zverovich
25ce9e7153 Fix MSVC build. 2014-04-30 10:39:24 -07:00
Victor Zverovich
f79398699b Add ThrowCError to throw an exception on C library errors. 2014-04-30 10:18:11 -07:00
Victor Zverovich
2c6372d790 Add a portable thread-safe version of strerror. 2014-04-30 09:42:48 -07:00
Victor Zverovich
ed2bdbaeaf Fix Windows build. 2014-04-30 07:41:54 -07:00
Victor Zverovich
c16217bf9b Test UTF8ToUTF16 and UTF16ToUTF8. 2014-04-30 07:38:43 -07:00
Victor Zverovich
da9aeab810 Add UTF8ToUTF16 and UTF16ToUTF8. 2014-04-30 07:23:43 -07:00
Victor Zverovich
859a4975f6 Throw SystemError if fwrite fails. 2014-04-30 06:55:21 -07:00
Victor Zverovich
d9db89814f Refactor action classes, Action -> Sink, add comments. 2014-04-28 08:59:29 -07:00
Victor Zverovich
26277c8ab3 Implement move assignment operator for Array. 2014-04-25 08:18:07 -07:00
Victor Zverovich
f28645f900 Fix includes. 2014-04-24 12:37:06 -07:00
Victor Zverovich
cfeba45c35 Let the buffer grow as it pleases. 2014-04-23 18:37:49 -07:00
Victor Zverovich
33baa8f382 Fix the error when formatting a float with a filled buffer on MSVC. 2014-04-23 18:37:08 -07:00
Victor Zverovich
e78904b9b9 Move formatting functionality from BasicFormatter to BasicWriter & FormatPaser to simplify the implementation of standalone formatting methods. 2014-04-23 08:27:50 -07:00
Victor Zverovich
656a8378d1 Use ArgInfo instead of Arg where possible. 2014-04-22 08:58:54 -07:00
Victor Zverovich
03f68857e2 Replace BasicFormatter::Format with BasicWriter::FormatInt. 2014-04-20 08:46:09 -07:00
Victor Zverovich
f2e06804c5 Workaround an issue with Intel C++ compiler. 2014-04-10 10:49:55 -07:00
jdale88
4cabe16241 Should use Char not char, as Char is typedef'd to the correct type (char or wchar_t) 2014-03-11 19:03:26 +00:00
jdale88
a9862fdb22 Fixed some level 4 warnings in VS2013 2014-03-11 18:56:24 +00:00
Victor Zverovich
43fe100875 Move the implementation of ColorWriter::operator() to format.cc 2014-02-19 14:20:26 -08:00
Victor Zverovich
6968ef3bb3 Implement PrintColored.
Thanks https://github.com/jose55 for the idea.
2014-02-19 13:51:23 -08:00
Victor Zverovich
f1d8516467 Fix a warning about empty macro args. 2014-02-19 13:02:22 -08:00
Victor Zverovich
e9b2191689 Add a 32-bit version of CountDigits. 2014-02-19 12:43:55 -08:00
Victor Zverovich
3017fc6fb7 Improve 32-bit integer formatting performance by parameterizing FormatDecimal on integer type. 2014-02-17 09:12:24 -08:00
Victor Zverovich
6f6fe519e2 Fix more warnings. 2014-02-15 11:16:44 -08:00
Victor Zverovich
447e02c54c Add a missing using declaration. 2014-02-15 10:48:34 -08:00
Victor Zverovich
db2cf61cde Fix warnings on older GCC, take 2. 2014-02-15 10:39:41 -08:00
Victor Zverovich
ff0d5d1771 Fix more warnings on older GCC. 2014-02-15 10:17:10 -08:00
Victor Zverovich
0c3a2f5dcb Fix warnings about constants being too large. 2014-02-15 10:08:19 -08:00
Victor Zverovich
6f0387fc22 Expose in-place decimal integer formatting via FormatDec. Improve performance of CountDigits based on the results from https://github.com/localvoid/cxx-benchmark-count-digits. 2014-02-14 10:36:17 -08:00
Victor Zverovich
ea5dce3957 Simplify format specs. 2014-01-28 12:47:37 -08:00
Victor Zverovich
a1bd3358bb Produce a compile error when using wide fill character on a narrow stream. 2014-01-08 08:17:38 -08:00
Victor Zverovich
641df95491 Implement string padding. 2013-12-31 09:43:32 -08:00
Victor Zverovich
a684d0cebf Fix https://github.com/vitaut/format/issues/14 2013-12-27 08:00:10 -08:00
Victor Zverovich
cc6af50514 Fix a warning. 2013-12-10 08:01:08 -08:00
Victor Zverovich
e3b4a3f166 Disallow formatting of wchar_t when using a char formatter. 2013-12-07 08:12:03 -08:00
Victor Zverovich
f406a42baa Fix a warning about long long. 2013-12-06 07:12:38 -08:00
Victor Zverovich
56f12b737c Add support for long long and more tests for unsigned long long. https://github.com/vitaut/format/issues/9 2013-11-22 07:45:43 -08:00
Victor Zverovich
a4e72b4db2 Remove IntTraits<uint32_t> because uint32_t is a typedef, not a built-in type. Rename ULLONG to ULONG_LONG for consistency with ulong_long_value. Remove extra whitespace. 2013-11-21 09:11:58 -08:00
Gregory Czajkowski
a65542bdaf add support for unsigned long long
Want to be able to format the following without any casting

std::cout << fmt::str(fmt::Format("{:x}") << 0xAEull) << std::endl;
std::cout << fmt::str(fmt::Format("{:x}") << 0xAEul) << std::endl;
std::cout << fmt::str(fmt::Format("{:x}") << uint64_t(0xae)) <<
std::endl;
2013-11-21 08:47:55 -08:00
Victor Zverovich
43fa564e9b Remove unused typedef. 2013-11-14 08:44:05 -08:00
Victor Zverovich
b605b3980c Disallow writing a wide string to a char stream and vice versa, because there is no good way to implement these function without knowing the encodings and what std::ostream doesn't make any sense. 2013-09-09 22:21:40 -07:00
Victor Zverovich
65d47e5e09 Add FormatInt for fast stand-alone integer formatting. 2013-09-09 06:51:03 -07:00
Victor Zverovich
c62c475291 Fix a warning. 2013-09-08 14:25:22 -07:00
Victor Zverovich
563a575c0c Fix more warnings. 2013-09-08 13:47:06 -07:00
Victor Zverovich
88972f487b Fix warnings. 2013-09-08 13:30:14 -07:00